Blob
1 #!/usr/bin/perl2 use strict;3 use warnings;5 package IDBot;6 use base qw(Bot::BasicBot);8 sub said {9 my $self = shift;10 my $arguments = shift;11 if ($arguments->{who} =~ /^yournick$/) {12 return "You're the boss!";13 } else {14 return "I don't recognize you!";15 }16 }18 package main;20 my $bot = IDBot->new(21 server => 'irc.example.com',22 port => '6667',23 channels => ['#perl101'],24 nick => 'nickname',25 name => 'username',26 );27 $bot->run();
