6 use base qw(Bot::BasicBot);
10 my $arguments = shift;
11 my $nick = $arguments->{who};
12 if ($nick eq $self->pocoirc->nick_name()) {
16 channel => $arguments->{channel},
17 body => "Welcome, $nick!",
23 my $arguments = shift;
25 channel => $arguments->{channel},
26 body => "I'm sad to see $arguments->{who} go.",
32 my $arguments = shift;
35 channel => $arguments->{channel},
36 body => "$arguments->{body} too",
42 my $arguments = shift;
44 my $nick = $arguments->{who};
47 "$nick, please resend this in a normal message",
48 "I'm having a hard time reading your notice.",
50 "Can you message on the public channel instead?",
55 channel => $arguments->{channel},
56 body => $notices[int(rand(4))],
62 my $arguments = shift;
64 if ($arguments->{who} eq $self->pocoirc->nick_name()) {
67 $self->pocoirc->yield('topic' => $arguments->{channel} => "$arguments->{topic} || Don't change the topic!");
75 if ($newnick eq $self->pocoirc->nick_name()) {
79 $self->pocoirc->yield('nick' => "$oldnick");
82 body => "If you don't mind, I'd like to use your old nick.",
88 my $bot = GreetBot->new(
89 server => 'irc.example.com',
91 channels => ['#perl102'],