Skip to content

Instantly share code, notes, and snippets.

@yappo
Created October 16, 2011 08:53
Show Gist options
  • Select an option

  • Save yappo/1290677 to your computer and use it in GitHub Desktop.

Select an option

Save yappo/1290677 to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl
use strict;
use warnings;
use lib 'lib';
use AnySan;
use AnySan::Provider::IRC;
my $irc = irc
'chat.freenode.net',
key => 'example1',
nickname => 'AnySan1',
recive_commands => [qw/ JOIN /],
channels => {
'#nantoka' => {},
'#nantara' => {},
};
AnySan->register_listener(
on_join => {
cb => sub {
my $receive = shift;
return unless $receive->attribute('command') eq 'JOIN';
$receive->send_reply('たいがーふぁいやーばいばー') while 1;
},
},
);
AnySan->run;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment