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

Comparing deliantra/server/ext/irc.ext (file contents):
Revision 1.5 by elmex, Sat Aug 25 11:51:04 2007 UTC vs.
Revision 1.11 by root, Fri May 2 16:09:36 2008 UTC

35 35
36sub handle_fcmd { 36sub handle_fcmd {
37 my ($name, $me, $msg) = @_; 37 my ($name, $me, $msg) = @_;
38 38
39 if ($msg eq "!who") { 39 if ($msg eq "!who") {
40 # clobbers irc, http is available
41 do_notice "see http://www.deliantra.net/userlist.crossfire.schmorp.de.html";
40 do_notice $_ 42# do_notice $_
41 for ext::commands::who_listing (0, "."); 43# for ext::commands::who_listing (0, ".");
42 44
43 } elsif ($msg =~ /^\!tell/) { 45 } elsif ($msg =~ /^\!tell/) {
44 my (undef, $target, $tmsg) = split / /, $msg, 3; 46 my (undef, $target, $tmsg) = split / /, $msg, 3;
45 47
46 if (my $other = cf::player::find_active $target) { 48 if (my $other = cf::player::find_active $target) {
51 } elsif ($other->ob->{ext_ignore_tell}{$me} >= time) { 53 } elsif ($other->ob->{ext_ignore_tell}{$me} >= time) {
52 $CON->send_chan ($BOTCHAN, NOTICE => "$me: $target ignores what you say. Give up on it.", $BOTCHAN); 54 $CON->send_chan ($BOTCHAN, NOTICE => "$me: $target ignores what you say. Give up on it.", $BOTCHAN);
53 } else { 55 } else {
54 cf::LOG cf::llevDebug, sprintf "TELL [%s/%s>%s] %s\n", $name, $me, $target, $tmsg; 56 cf::LOG cf::llevDebug, sprintf "TELL [%s/%s>%s] %s\n", $name, $me, $target, $tmsg;
55 57
56 $other->ns->send_msg (cf::chat::tell_channel ("$name/$me"), "$name/$me tells you: $tmsg", cf::NDI_DK_ORANGE | cf::NDI_DEF); 58 $other->ns->send_msg (ext::chat::tell_channel ("$name/$me"), "$name/$me tells you: $tmsg", cf::NDI_DK_ORANGE | cf::NDI_DEF);
57 } 59 }
58 } else { 60 } else {
59 do_notice "$me: What do you want to tell $target?"; 61 do_notice "$me: What do you want to tell $target?";
60 } 62 }
61 63
85 utf8::decode $tmsg; 87 utf8::decode $tmsg;
86 88
87 if ($tmsg =~ /^\!/) { 89 if ($tmsg =~ /^\!/) {
88 handle_fcmd ($name, $nick, $tmsg); 90 handle_fcmd ($name, $nick, $tmsg);
89 } elsif ($tmsg =~ m/\S/) { 91 } elsif ($tmsg =~ m/\S/) {
90 $_->ns->send_msg ($ext::chat::CHAT_CHANNEL, 92 $_->ns->send_msg ($cf::CHAT_CHANNEL,
91 "$name/".$nick." chats: $tmsg", cf::NDI_BLUE | cf::NDI_DEF 93 "$name/".$nick." chats: $tmsg", cf::NDI_BLUE | cf::NDI_DEF
92 ) for grep { $_->ob->{ext_ignore_shout}{$name} < $NOW && $_->listening >= 10 } cf::player::list; 94 ) for grep { $_->ob->{ext_ignore_shout}{$name} < $NOW && $_->listening >= 10 } cf::player::list;
95 cf::LOG cf::llevDebug, sprintf "QBERT [%s] %s\n", "$name/$nick", $tmsg;
93 } 96 }
94 1; 97 1;
95 }, 98 },
96# registered => sub { 99# registered => sub {
97# 1; 100# 1;
103 0; 106 0;
104 } 107 }
105 ); 108 );
106} 109}
107 110
108Event->timer ( 111our $RECONNECT = cf::periodic 30, Coro::unblock_sub {
109 reentrant => 0, 112 check_connection;
110 after => 1, 113};
111 interval => 30,
112 data => cf::WF_AUTOCANCEL,
113 cb => Coro::unblock_sub { check_connection },
114);
115 114

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines