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

Comparing deliantra/maps/perl/chat.ext (file contents):
Revision 1.21 by root, Wed Jul 19 22:20:07 2006 UTC vs.
Revision 1.22 by root, Fri Jul 21 00:25:29 2006 UTC

12 for my $hash (@$player{qw(ext_ignore_shout ext_ignore_tell)}) { 12 for my $hash (@$player{qw(ext_ignore_shout ext_ignore_tell)}) {
13 while (my ($k, $v) = each %$hash) { 13 while (my ($k, $v) = each %$hash) {
14 if ($v < $NOW) { 14 if ($v < $NOW) {
15 $player->message ("Your ignore on $k has expired.", cf::NDI_GREEN | cf::NDI_UNIQUE); 15 $player->message ("Your ignore on $k has expired.", cf::NDI_GREEN | cf::NDI_UNIQUE);
16 delete $hash->{$k}; 16 delete $hash->{$k};
17 } elsif (!valid_user $k) { 17 } elsif (!cf::player::exists $k) {
18 $player->message ("Your ignore on $k is no longer valid (no such user).", cf::NDI_GREEN | cf::NDI_UNIQUE); 18 $player->message ("Your ignore on $k is no longer valid (no such user).", cf::NDI_GREEN | cf::NDI_UNIQUE);
19 delete $hash->{$k}; 19 delete $hash->{$k};
20 } 20 }
21 } 21 }
22 } 22 }
206 } elsif ($target && $type) { 206 } elsif ($target && $type) {
207 207
208 $timeout ne "" or $timeout = 24; 208 $timeout ne "" or $timeout = 24;
209 my $absolute_timeout = time + $timeout * 3600; 209 my $absolute_timeout = time + $timeout * 3600;
210 210
211 if (valid_user $target) { 211 if (cf::player::exists $target) {
212 if ($type eq "tell") { 212 if ($type eq "tell") {
213 $who->message ("Now ignoring private messages from $target for $timeout hours.", cf::NDI_UNIQUE); 213 $who->message ("Now ignoring private messages from $target for $timeout hours.", cf::NDI_UNIQUE);
214 $who->{ext_ignore_tell}{$target} = $absolute_timeout; 214 $who->{ext_ignore_tell}{$target} = $absolute_timeout;
215 } elsif ($type eq "shout") { 215 } elsif ($type eq "shout") {
216 $who->message ("Now ignoring shouts from $target for $timeout hours.", cf::NDI_UNIQUE); 216 $who->message ("Now ignoring shouts from $target for $timeout hours.", cf::NDI_UNIQUE);
247 } else { 247 } else {
248 $who->message ("Not ignoring anyone", cf::NDI_UNIQUE); 248 $who->message ("Not ignoring anyone", cf::NDI_UNIQUE);
249 } 249 }
250 } else { 250 } else {
251 251
252 if (valid_user $target) { 252 if (cf::player::exists $target) {
253 if ($type eq "tell") { 253 if ($type eq "tell") {
254 $who->message ("Not ignoring private messages from $target anymore.", cf::NDI_UNIQUE); 254 $who->message ("Not ignoring private messages from $target anymore.", cf::NDI_UNIQUE);
255 delete $who->{ext_ignore_tell} {$target}; 255 delete $who->{ext_ignore_tell} {$target};
256 } elsif ($type eq "shout") { 256 } elsif ($type eq "shout") {
257 $who->message ("Not ignoring shouts from $target anymore.", cf::NDI_UNIQUE); 257 $who->message ("Not ignoring shouts from $target anymore.", cf::NDI_UNIQUE);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines