ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cf.schmorp.de/maps/perl/schmorp-neko.ext
(Generate patch)

Comparing cf.schmorp.de/maps/perl/schmorp-neko.ext (file contents):
Revision 1.16 by root, Fri Mar 31 22:47:20 2006 UTC vs.
Revision 1.19 by root, Thu Aug 10 23:25:11 2006 UTC

107} 107}
108 108
109sub on_attack { 109sub on_attack {
110 my ($event, $ob, $who) = @_; 110 my ($event, $ob, $who) = @_;
111 111
112 if ($who->{neko_last_attack} < time - 300) {
113 $who->{neko_attack} = 0;
114 }
115
116 $who->{neko_last_attack} = time;
112 $who->{neko_attack}++ 117 $who->{neko_attack}++
113 or cf::LOG cf::llevDebug, sprintf "QBERT Neko-san was attacked by %s!\n", $who->name; 118 or cf::ext::schmorp_irc::do_notice "Neko-san was attacked by ". $who->name . "!\n";
114 119
115 $who->message ("Meoow! (Please do not hurt me)") 120 $who->message ("Meoow! (Please do not hurt me)")
116 if !($who->{neko_attack} & 15); 121 if !($who->{neko_attack} & 15);
117 122
118 if ($who->{neko_attack} > 512) { 123 if ($who->{neko_attack} > 512) {
128 133
129sub on_say { 134sub on_say {
130 my ($event, $ob, $who, $msg) = @_; 135 my ($event, $ob, $who, $msg) = @_;
131 136
132 cf::LOG cf::llevDebug, sprintf "QBERT [Neko-fon] %s: %s\n", $who->name, $msg; 137 cf::LOG cf::llevDebug, sprintf "QBERT [Neko-fon] %s: %s\n", $who->name, $msg;
138 cf::ext::schmorp_irc::do_notice (sprintf "[Neko-fon] %s: %s\n", $who->name, $msg);
133} 139}
134 140

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines