ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/ext/schmorp-irc.ext
(Generate patch)

Comparing deliantra/server/ext/schmorp-irc.ext (file contents):
Revision 1.3 by root, Sun Jan 21 21:28:27 2007 UTC vs.
Revision 1.6 by root, Wed Apr 25 23:53:50 2007 UTC

47 if ($me eq $target) { 47 if ($me eq $target) {
48 $CON->send_chan ($BOTCHAN, NOTICE => "$me: You are talking to yourself, you freak!", $BOTCHAN); 48 $CON->send_chan ($BOTCHAN, NOTICE => "$me: You are talking to yourself, you freak!", $BOTCHAN);
49 } elsif ($other->ob->{ext_ignore_tell}{$me} >= time) { 49 } elsif ($other->ob->{ext_ignore_tell}{$me} >= time) {
50 $CON->send_chan ($BOTCHAN, NOTICE => "$me: $target ignores what you say. Give up on it.", $BOTCHAN); 50 $CON->send_chan ($BOTCHAN, NOTICE => "$me: $target ignores what you say. Give up on it.", $BOTCHAN);
51 } else { 51 } else {
52 utf8::encode $tmsg; # ->message not yet utf8-ified
53 cf::LOG cf::llevDebug, sprintf "TELL [%s/%s>%s] %s\n", $name, $me, $target, $tmsg; 52 cf::LOG cf::llevDebug, sprintf "TELL [%s/%s>%s] %s\n", $name, $me, $target, $tmsg;
54 53
55 $other->ob->message ("$name/$me tells you: $tmsg"); 54 $other->ob->message ("$name/$me tells you: $tmsg");
56 $other->ob->{ext_last_tell} = "$name/$me"; 55 $other->ob->{ext_last_tell} = "$name/$me";
57 } 56 }
78 my $nick = Net::IRC3::Util::prefix_nick ($msg); 77 my $nick = Net::IRC3::Util::prefix_nick ($msg);
79 my $NOW = Time::HiRes::time; 78 my $NOW = Time::HiRes::time;
80 my $tmsg = $msg->{trailing}; 79 my $tmsg = $msg->{trailing};
81 $tmsg =~ s/\x01[^\x01]*\x01//g; 80 $tmsg =~ s/\x01[^\x01]*\x01//g;
82 $tmsg =~ s/\015?\012/ /g; 81 $tmsg =~ s/\015?\012/ /g;
82 utf8::encode $tmsg; # ->message not yet utf8-ified
83 if ($tmsg =~ /^\!/) { 83 if ($tmsg =~ /^\!/) {
84 handle_fcmd ($name, $nick, $tmsg); 84 handle_fcmd ($name, $nick, $tmsg);
85 } elsif ($tmsg =~ m/\S/) { 85 } elsif ($tmsg =~ m/\S/) {
86 $_->ob->message ( 86 $_->ob->message (
87 "$name/".$nick." chats: $tmsg", cf::NDI_BLUE 87 "$name/".$nick." chats: $tmsg", cf::NDI_BLUE
91 }, 91 },
92# registered => sub { 92# registered => sub {
93# 1; 93# 1;
94# }, 94# },
95 disconnect => sub { 95 disconnect => sub {
96 my ($con, $reason) = @_;
97 warn "CFBOT: disconnect: $reason\n";
96 undef $CON; 98 undef $CON;
97 0; 99 0;
98 } 100 }
99 ); 101 );
100} 102}
102Event->timer ( 104Event->timer (
103 reentrant => 0, 105 reentrant => 0,
104 after => 1, 106 after => 1,
105 interval => 30, 107 interval => 30,
106 data => cf::WF_AUTOCANCEL, 108 data => cf::WF_AUTOCANCEL,
107 cb => \&check_connection, 109 cb => Coro::unblock_sub { check_connection },
108); 110);
109 111

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines