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

Comparing deliantra/server/ext/chat.ext (file contents):
Revision 1.2 by root, Thu Dec 21 22:41:34 2006 UTC vs.
Revision 1.3 by root, Sun Jan 7 02:39:14 2007 UTC

33 }, 33 },
34); 34);
35 35
36cf::register_command listen => sub { 36cf::register_command listen => sub {
37 my ($who, $msg) = @_; 37 my ($who, $msg) = @_;
38 my $player = cf::player::find $who->name; 38 my $player = cf::player::find_active $who->name;
39 39
40 if ($msg ne "") { 40 if ($msg ne "") {
41 my $prev_listen = $player->listening; 41 my $prev_listen = $player->listening;
42 $player->listening ($msg); 42 $player->listening ($msg);
43 if ($prev_listen == $player->listening) { 43 if ($prev_listen == $player->listening) {
169 169
170 if ($target =~ /irc\//) { 170 if ($target =~ /irc\//) {
171 my (undef, $nick) = split /\//, $target, 2; 171 my (undef, $nick) = split /\//, $target, 2;
172 $who->message ("You tell $target: $args"); 172 $who->message ("You tell $target: $args");
173 ext::schmorp_irc::do_notice (sprintf "(%s) %s: %s\n", $name, $nick, $msg); 173 ext::schmorp_irc::do_notice (sprintf "(%s) %s: %s\n", $name, $nick, $msg);
174 } elsif (my $other = cf::player::find $target) { 174 } elsif (my $other = cf::player::find_active $target) {
175 175
176 if ($msg) { 176 if ($msg) {
177 if ($target eq $name) { 177 if ($target eq $name) {
178 $who->message ("You are talking to yourself, you freak!", cf::NDI_UNIQUE); 178 $who->message ("You are talking to yourself, you freak!", cf::NDI_UNIQUE);
179 } elsif ($other->ob->{ext_ignore_tell}{$name} >= time) { 179 } elsif ($other->ob->{ext_ignore_tell}{$name} >= time) {
205 205
206 if ($who->{ext_last_tell} =~ /irc\//) { 206 if ($who->{ext_last_tell} =~ /irc\//) {
207 my (undef, $nick) = split /\//, $who->{ext_last_tell}, 2; 207 my (undef, $nick) = split /\//, $who->{ext_last_tell}, 2;
208 $who->message ("You tell " . $who->{ext_last_tell} . ": $args"); 208 $who->message ("You tell " . $who->{ext_last_tell} . ": $args");
209 ext::schmorp_irc::do_notice (sprintf "(%s) %s: %s\n", $name, $nick, $args); 209 ext::schmorp_irc::do_notice (sprintf "(%s) %s: %s\n", $name, $nick, $args);
210 } elsif (my $other = cf::player::find $who->{ext_last_tell}) { 210 } elsif (my $other = cf::player::find_active $who->{ext_last_tell}) {
211 211
212 if ($args) { 212 if ($args) {
213 $other->ob->{ext_ignore_tell}{$name} >= time 213 $other->ob->{ext_ignore_tell}{$name} >= time
214 or delete $other->ob->{ext_ignore_tell}{$name}; 214 or delete $other->ob->{ext_ignore_tell}{$name};
215 215
319 my ($who, $args) = @_; 319 my ($who, $args) = @_;
320 320
321 if (my ($login) = $args =~ /(\S+)/) { 321 if (my ($login) = $args =~ /(\S+)/) {
322 if ($login eq $who->name) { 322 if ($login eq $who->name) {
323 $who->message ("Very funny, $login. Ha. Ha.", cf::NDI_UNIQUE); 323 $who->message ("Very funny, $login. Ha. Ha.", cf::NDI_UNIQUE);
324 } elsif (cf::player::find $login) { 324 } elsif (cf::player::find_active $login) {
325 $who->message ("$login is right here on this server!", cf::NDI_UNIQUE); 325 $who->message ("$login is right here on this server!", cf::NDI_UNIQUE);
326 } elsif (cf::player::exists $login 326 } elsif (cf::player::exists $login
327 and stat sprintf "%s/%s/%s/%s.pl", cf::localdir, cf::playerdir, ($login) x 2) { 327 and stat sprintf "%s/%s/%s/%s.pl", cf::localdir, cf::playerdir, ($login) x 2) {
328 my $time = (stat _)[9]; 328 my $time = (stat _)[9];
329 329

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines