[mICQ] How to use the micq-script?

dokubuntux at arcor.de dokubuntux at arcor.de
Sun Apr 22 17:46:32 CEST 2007


Vladimír Marek schrieb:
> Hi,
>
>   
>> I think I've read that it is possible to forward incoming messages to a 
>> php or bash-script. How does this exactly work? And is it even possible 
>> to use the script to send a message?
>>     
>
> Yes & yes
>
>   
>> What I think about is to send something like encrypted messages. If I 
>> receive a (encrypted) message, my bash/php-script decryts it that I can 
>> read it. And if I answer, I type my message in the script, the scripts 
>> encryts the message and uses micq to send it.
>>     
>
> I'm afraid that micq always displays the incomming message, and then
> calls your script. So the best you could have is to see encrypted
> message and then output of your script.
>
>   
>> Is this possible or are encrypted messages (like the gaim encryption 
>> plugin) already integrated or planned in micq?
>>     
>
> I'm not avare of this.
>
> My micqrc contains:
>
> ----------------------------------------------------------------------
> [...]
> [Connection]
> type remote auto
> version 0
> server remote-control
>
> event icq_event.pl
> [...]
> ----------------------------------------------------------------------
>
> The Connection bit creates fifo queue
>
> $ ls -l  ~/.micq/remote-control
> prw------- 1 neuron neuron 0 2007-04-16 09:25 /home/neuron/.micq/remote-control
>
> The "event" clausule specifies script which is to be called for each
> event hapeening.
>
>
> My icq_event.pl is simple:
>
> ----------------------------------------------------------------------
> #!/usr/bin/perl
>
> open F, '>/home/neuron/log/icq.txt';
> for (@ARGV) {
>    print F "->$_\n";
> }
> close F;
>
> if ($ARGV[4] eq 'msg') {
>    system 'aplay /home/neuron/.micq/sound.wav &> /dev/null &';
> }
> ----------------------------------------------------------------------
>
> First part just dupms all arguments to a file, so that I can see what
> was passed in. Basically debug code.
> Second part sounds a 'ding' if someone sends me message.
>
> Now part of my .procmailrc:
>
> :0 ch
> | ~/bin/oznam_mail.pl &> /dev/null
>
> Calls script for every mail I get.
>
> The script basically does:
>
> ----------------------------------------------------------------------
> $PIPE="$ENV{'HOME'}/.micq/remote-control";
>
> open F, ">$PIPE" or die "Can't open '$PIPE': $!\n";
> print F "!echo -ne 'Incomming Mail:\\n";
> print F "$subj\\n";
> print F "$from\\n'";
> print F "\n";
> ----------------------------------------------------------------------
>
> I'm attaching the whole scritp, it decodes encoded mail headers so it's
> a bit too long for pasting here.
>
> Combining this two things you could get encrypted messages IMO.
>
>
> Hope this helps
>
>   

Hi!

Thank you for your answer! After learning a little bit perl and testing 
the skript now I'm able to read incoming messages with the skript.
But I don't really understand how to send messages with the skript.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://micq.org/pipermail/micq-list/attachments/20070422/f8dcca9d/attachment.htm 


More information about the mICQ-List mailing list