hello all,

i've recently become enamored with irssi as my irssi/silc client of
choice, and use it daily at work, as well as my "free" time.. besides
which i'm currently being paid to work on a silc-based bot script which
will end up being a fairly complex beast.  hopefully i'm posting to the
right place(s) here, but kindly redirect me if not ;)

especially with silc, i've noticed some funny things happening that
confuse me, so i've attempted to collect them here in hopes of finding
some help.  

i should say as well that i'm exploring the possibility that my
silc-plugin/irssi build are broken, and will be submitting a bugreport to
[EMAIL PROTECTED] to that end (just need to get a backtrace).

a) "message (silc) action" signal?

i've registered the "message irc action" signal with a subroutine of my
own crafting (similar to the "message public/private" signals i'm
handling with no problem.  but it never gets called in a silc channel.
digging around a bit in the docs/src, i notice that while there are
generic signal handlers for message private/public, but the action
message is specific to the irc messages.c file.

further, i noticed that the silc code defines handlers for "signed
message public" and "signed message private" signals to be fired, and i
assume it is some variation on these i'm catching with my 

add_signal_last("message public",\&silcChannelHandler);

type call.  so would it be possible for someone (maybe me?) to extend
action signals into the realm of the silc protocol?

b) Server::command() output?

again, this is sort of a silc-specific question, i think, but it relates
back to irssi in this way: my script needs to keep track of the
different servers/channels it connects to, as well as the users in each.

the silc protocol helpfully provides a public/private key and unique
client fingerprint for every user connected to a channel, and (as a
human), running the commands: /getkey or /whois allow me to make use of
this information.

i've tried a couple different scripted ways to connect to a server, join
some channels, and identify all users we can see.  the following bunch
of questions relate to this overall idea.  so perl.txt mentions the
Server::command() function as being able to run /commands via a script.
thinking this was a simple way to achieve what i wanted, i wrote:

my $names = $Server::command('names');
foreach (@{$names}) {
 ... 
}

and ran it from a client connected to a silc channel.  the $names var
never gets any info.  i've confirmed with folks in #irssi that the
command() function in fact never returns any of the output from running
the command.  if this is the case, how can i get access to such output?

c) "server connected" signal: silc delay

thinking i could get the information i needed another way, i tried this:
register a signal handler for the "server connected" signal that calls
$server->channels(), and then get a list of 

see attached script server-connected.pl which i ran and then connected
to a silc server, receiving this output:

01:31 -!- Irssi: Loaded script server_connected
01:31 -!- Irssi: Looking up silc.example.org
01:31 -!- Irssi: Connecting to silc.example.org [ip address] port 706
01:31 -!- Irssi: Connection to silc.example.org established
01:31 -!- Irssi: server connected signal received
01:31 -!- Welcome to the SILC Network 
01:31 -!- Your host is gis.example.org, running version 0.9.13

the "server connected signal received" message is from the test script,
and occurs immediately after the line above.  the "Welcome to the SILC
Network" line, however, takes a few moments to connect, and 

d) again.pm?

the script i'm writing is fairly complex and currently uses one .pm
module, where most of the functionality resides.  i've noticed in my
testing that i can't reload the contents of the .pm while irssi is
running, presumably because of the embedded perl environment.  i'd been
hunting for some perl magic to allow irssi/the script to notice when
this .pm changed and reload it's contents on-the-fly (at the moment, i
have to /quit the client and start everything up again).

naturally, i was very excited when i found juerd's again.pm
(http://search.cpan.org/author/JUERD/again/) module, but i was unable to
get it to work with my code, for some reason:

23:04 Not enough arguments for use again at (eval 18) line 1

is all i get when i try to load my script (even the first time) with a
'use again' instead of the normal 'use' line.  anybody have ideas what's
going on here?  some other workaround, perhaps?


thanks a lot!
derek



Reply via email to