Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Perl Programming Language

DCC Chat in irssi.


Can someone walk me through managing DCC Chat sessions using perl in
irssi, or show me a site that can help? I checked the irssi site, which
is how I got the 'signals' I'll show below.

Specifically, what I'm trying to do is make a sort of game bot that uses
DCC Chat (multiple lines without flooding ftw). I know how to intercept
a DCC Chat message in the script, but not how to use it. Here's the
script I've got at the moment (the relevant part, anyway):

 >signal_add("message dcc", "onCHAT");
 >sub onCHAT {
 >  print "onCHAT: @_";
 >  my ($dcc, $message) = @_;
 >  print "onCHAT; DCC: $dcc Message: $message";
 >  return;
 >}

And the output from that:

 >onCHAT; DCC: Irssi::Irc::Dcc::Chat=HASH(0x82b209c) Message: Testing.

Is there a way to get the username or IP or something from $dcc there?
If so, how do I send a DCC Chat message to the user in response? The
similar output from the "message dcc own" signal isn't much help:

 >onCHATOWN; DCC: Irssi::Irc::Dcc::Chat=HASH(0x82b2054) Message: testing
again

I notice that the HASH() number changes with the time of the message,
but I don't know the significance of that. Any help?

Thanks,
C

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc