DCC Chat in irssi.

C

Ceil

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top