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.21 by root, Fri Jul 20 16:11:10 2007 UTC vs.
Revision 1.44 by root, Fri Sep 19 01:39:45 2008 UTC

1#! perl # depends=irc 1#! perl # depends=irc mandatory
2#CONVERSION: PARTIAL
3 2
4# implement a replacement for the built-in say/chat/shout/tell/reply commands 3# implement a replacement for the built-in say/chat/shout/tell commands
5# adds ignore/unignore functionality 4# adds ignore/unignore functionality
6 5
7use NPC_Dialogue; 6use NPC_Dialogue;
8use POSIX (); # for strftime only 7use POSIX (); # for strftime only
8
9sub tell_channel($) {
10 my ($target) = @_;
11
12 {
13 id => "tell-$target",
14 title => "$target",
15 reply => "tell $target ",
16 tooltip => "Private messages from/to $target",
17 }
18}
19
20sub send_msg($$$$$) {
21 my ($pl, $channel, $msg, $flags, $sound) = @_;
22 $pl->play_sound (cf::sound::find $sound) if defined $sound;
23 $pl->send_msg ($channel, $msg, $flags);
24 ()
25}
9 26
10sub clean_timeouts($) { 27sub clean_timeouts($) {
11 my ($player) = @_; 28 my ($player) = @_;
12 my $NOW = time; 29 my $NOW = time;
13 30
14 for my $hash (@$player{qw(ext_ignore_shout ext_ignore_tell)}) { 31 for my $hash (@$player{qw(ext_ignore_shout ext_ignore_tell)}) {
15 while (my ($k, $v) = each %$hash) { 32 while (my ($k, $v) = each %$hash) {
16 if ($v < $NOW) { 33 if ($v < $NOW) {
17 $player->message ("Your ignore on $k has expired.", cf::NDI_GREEN | cf::NDI_UNIQUE); 34 $player->message ("Your ignore on $k has expired.", cf::NDI_GREEN);
18 delete $hash->{$k}; 35 delete $hash->{$k};
19 } elsif (!cf::player::exists $k) { 36 } elsif (!cf::player::exists $k) {
20 $player->message ("Your ignore on $k is no longer valid (no such user).", cf::NDI_GREEN | cf::NDI_UNIQUE); 37 $player->message ("Your ignore on $k is no longer valid (no such user).", cf::NDI_GREEN);
21 delete $hash->{$k}; 38 delete $hash->{$k};
22 } 39 }
23 } 40 }
24 } 41 }
25} 42}
38 prio => -1000, 55 prio => -1000,
39 on_login => sub { 56 on_login => sub {
40 my ($pl) = @_; 57 my ($pl) = @_;
41 58
42 clean_timeouts $pl->ob; 59 clean_timeouts $pl->ob;
60
61 $pl->send_msg ($cf::SAY_CHANNEL);
62 $pl->send_msg ($cf::CHAT_CHANNEL);
43 }, 63 },
44); 64);
45 65
66# TODO: remove once safe
46cf::register_command listen => sub { 67cf::register_command listen => sub {
47 my ($pl, $msg) = @_;
48 my $player = cf::player::find_active $pl->name;
49
50 if ($msg ne "") {
51 $msg = 10 if $msg > 10;
52
53 my $prev_listen = $player->listening;
54 $player->listening ($msg);
55 if ($prev_listen == $player->listening) {
56 $pl->message ("Your verbose level stays at $prev_listen.", cf::NDI_UNIQUE);
57 } else {
58 $pl->message ("Your verbose level is now " . $player->listening . ". (previously: $prev_listen)", cf::NDI_UNIQUE);
59 }
60 } else {
61 $pl->message ("Your verbose level is " . $player->listening . ".", cf::NDI_UNIQUE);
62 }
63}; 68};
64 69
65cf::register_command cointoss => sub { 70cf::register_command cointoss => sub {
66 my ($pl, $msg) = @_; 71 my ($ob, $msg) = @_;
67 72
73 my $pl = $ob->contr;
68 my $name = $pl->name; 74 my $name = $ob->name;
75
69 my $coin = int rand 2 ? "Heads" : "Tails"; 76 my $coin = int rand 2 ? "Heads" : "Tails";
70 77
78 send_msg $_, $cf::SAY_CHANNEL => "$name flips a coin.... $coin!", cf::NDI_GREY, "msg_say"
71 for my $other ( grep { $pl->on_same_map_as ($_->ob) } cf::player::list ) { 79 for grep { $ob->on_same_map_as ($_->ob) && $_ != $pl} cf::player::list;
72 next
73 if $other->ob == $pl;
74 $other->ob->message ("$name flips a coin.... $coin!", cf::NDI_GREY | cf::NDI_UNIQUE);
75 }
76 80
77 $pl->message ("You flip a coin.... $coin!", cf::NDI_GREY | cf::NDI_UNIQUE); 81 $pl->send_msg ($cf::SAY_CHANNEL => "You flip a coin.... $coin!", cf::NDI_GREY | cf::NDI_REPLY);
78}; 82};
79 83
80cf::register_command orcknuckle => sub { 84cf::register_command orcknuckle => sub {
81 my ($pl, $msg) = @_; 85 my ($ob, $msg) = @_;
86
87 my $pl = $ob->contr;
88 my $name = $ob->name;
89
82 my @orcknuckle = ("none", "beholder", "ghost", "knight", "princess", "dragon", "orc"); 90 my @orcknuckle = ("beholder", "ghost", "knight", "princess", "dragon", "orc");
83 91 my ($i, $j, $k, $l) = (rand 5, rand 5, rand 5, rand 6);
84 my $name = $pl->name;
85
86 my ($i, $j, $k, $l) = ((int rand 5) + 1, (int rand 5) + 1, (int rand 5) + 1, (int rand 6) + 1);
87 my $result = "$orcknuckle[$i], $orcknuckle[$j], $orcknuckle[$k], $orcknuckle[$l]"; 92 my $result = "$orcknuckle[$i], $orcknuckle[$j], $orcknuckle[$k], $orcknuckle[$l]";
88 93
94 send_msg $_, $cf::SAY_CHANNEL => "$name throws his orc-knuckles and rolls $result!", cf::NDI_GREY, "msg_say"
89 for my $other ( grep { $pl->on_same_map_as ($_->ob) } cf::player::list ) { 95 for grep { $ob->on_same_map_as ($_->ob) && $_ != $pl} cf::player::list;
90 next
91 if $other->ob == $pl;
92 $other->ob->message ("$name rolls $result!", cf::NDI_GREY | cf::NDI_UNIQUE);
93 } 96
94
95 $pl->message ("You roll $result!", cf::NDI_GREY | cf::NDI_UNIQUE); 97 $pl->send_msg ($cf::SAY_CHANNEL => "You roll $result!", cf::NDI_GREY | cf::NDI_REPLY);
96}; 98};
97 99
98my $emotes = { 100my $emotes = {
99 growl => { 101 growl => {
100 noparams => { 102 noparams => {
146 self => { 148 self => {
147 }, 149 },
148 }, 150 },
149 scream => { 151 scream => {
150 noparams => { 152 noparams => {
151 other => "<self> screams at the top of his lungs!", 153 other => "<self> screams at the top of G<his|her> lungs!",
152 self => "ARRRRRRRRRRGH!!!!!", 154 self => "ARRRRRRRRRRGH!!!!!",
153 }, 155 },
154 params => { 156 params => {
155 }, 157 },
156 self => { 158 self => {
165 target => "<self> pukes on your clothes!", 167 target => "<self> pukes on your clothes!",
166 other => "<self> pukes on <other>.", 168 other => "<self> pukes on <other>.",
167 self => "You puke on <other>.", 169 self => "You puke on <other>.",
168 }, 170 },
169 self => { 171 self => {
170 other => "<self> pukes on his clothes.", 172 other => "<self> pukes on G<his|her> clothes.",
171 self => "You puke on yourself.", 173 self => "You puke on yourself.",
172 }, 174 },
173 }, 175 },
174 strut => { 176 strut => {
175 noparams => { 177 noparams => {
224 self => "You kiss <other>.", 226 self => "You kiss <other>.",
225 }, 227 },
226 self => { 228 self => {
227 }, 229 },
228 }, 230 },
231 smother => {
232 noparams => {
233 other => "<self> makes weird facial contortions",
234 self => "All the lonely people..",
235 },
236 params => {
237 target => "<self> smothers you with kisses.",
238 other => "<self> smothers <other> with kisses.",
239 self => "You smother <other> with kisses.",
240 },
241 self => {
242 },
243 },
229 wink => { 244 wink => {
230 noparams => { 245 noparams => {
231 other => "<self> winks suggestively.", 246 other => "<self> winks suggestively.",
232 self => "Have you got something in your eye?", 247 self => "Have you got something in your eye?",
233 }, 248 },
235 target => "<self> winks at you.", 250 target => "<self> winks at you.",
236 other => "<self> winks at <other>.", 251 other => "<self> winks at <other>.",
237 self => "You wink suggestively at <other>.", 252 self => "You wink suggestively at <other>.",
238 }, 253 },
239 self => { 254 self => {
240 other => "<self> winks at himself - something strange is going on...", 255 other => "<self> winks at G<him|her>self - something strange is going on...",
241 self => "You wink at yourself?? What are you up to?", 256 self => "You wink at yourself?? What are you up to?",
242 }, 257 },
243 }, 258 },
244 pout => { 259 pout => {
245 noparams => { 260 noparams => {
251 self => { 266 self => {
252 }, 267 },
253 }, 268 },
254 cackle => { 269 cackle => {
255 noparams => { 270 noparams => {
256 other => "<self> throws back his head and cackles with insane glee!", 271 other => "<self> throws back G<his|her> head and cackles with insane glee!",
257 self => "You cackle gleefully.", 272 self => "You cackle gleefully.",
258 }, 273 },
259 params => { 274 params => {
260 }, 275 },
261 self => { 276 self => {
270 target => "<self> sniffs you.", 285 target => "<self> sniffs you.",
271 other => "<self> sniffs <other>", 286 other => "<self> sniffs <other>",
272 self => "You sniff <other>.", 287 self => "You sniff <other>.",
273 }, 288 },
274 self => { 289 self => {
275 other => "<self> sniffs himself.", 290 other => "<self> sniffs G<him|her>self.",
276 self => "You sniff yourself.", 291 self => "You sniff yourself.",
277 }, 292 },
278 }, 293 },
279 nod => { 294 nod => {
280 noparams => { 295 noparams => {
281 other => "<self> nods solemnly.", 296 other => "<self> nods solemnly.",
282 self => "You nod solemnly.", 297 self => "You nod solemnly.",
283 }, 298 },
284 params => { 299 params => {
285 target => "<self> nods solemnly to you.", 300 target => "<self> nods solemnly at you.",
286 other => "<self> nods solemnly to <other>.", 301 other => "<self> nods solemnly at <other>.",
287 self => "You nod solemnly to <other>.", 302 self => "You nod solemnly at <other>.",
288 }, 303 },
289 self => { 304 self => {
290 }, 305 },
291 }, 306 },
292 frown => { 307 frown => {
298 target => "<self> frowns darkly at you.", 313 target => "<self> frowns darkly at you.",
299 other => "<self> frowns darkly at <other>.", 314 other => "<self> frowns darkly at <other>.",
300 self => "You frown darkly at <other>.", 315 self => "You frown darkly at <other>.",
301 }, 316 },
302 self => { 317 self => {
303 other => "<self> frowns at himself.", 318 other => "<self> frowns at G<him|her>self.",
304 self => "You frown at yourself.", 319 self => "You frown at yourself.",
305 }, 320 },
306 }, 321 },
307 snicker => { 322 snicker => {
308 noparams => { 323 noparams => {
331 noparams => { 346 noparams => {
332 other => "<self> is bleeding all over the carpet - got a spare tourniquet?", 347 other => "<self> is bleeding all over the carpet - got a spare tourniquet?",
333 self => "You bleed all over your nice new armour.", 348 self => "You bleed all over your nice new armour.",
334 }, 349 },
335 params => { 350 params => {
336 target => "<self> slashes his wrist and bleeds all over you.", 351 target => "<self> slashes G<his|her> wrist and bleeds all over you.",
337 other => "<self> slashes his wrist and bleeds all over <other>.", 352 other => "<self> slashes G<his|her> wrist and bleeds all over <other>.",
338 self => "You slash your wrist and bleed all over <other>", 353 self => "You slash your wrist and bleed all over <other>",
339 }, 354 },
340 self => { 355 self => {
341 other => "<self> performs some satanic ritual while wiping his blood on himself.", 356 other => "<self> performs some satanic ritual while wiping G<his|her> blood on G<him|her>self.",
342 self => "Very impressive! You wipe your blood all over yourself.", 357 self => "Very impressive! You wipe your blood all over yourself.",
343 }, 358 },
344 }, 359 },
345 twiddle => { 360 twiddle => {
346 noparams => { 361 noparams => {
347 other => "<self> patiently twiddles his thumbs.", 362 other => "<self> patiently twiddles G<his|her> thumbs.",
348 self => "You patiently twiddle your thumbs.", 363 self => "You patiently twiddle your thumbs.",
349 }, 364 },
350 params => { 365 params => {
351 }, 366 },
352 self => { 367 self => {
353 }, 368 },
354 }, 369 },
355 spit => { 370 spit => {
356 noparams => { 371 noparams => {
357 other => "<self> spits over his left shoulder.", 372 other => "<self> spits over G<his|her> left shoulder.",
358 self => "You spit over your left shoulder.", 373 self => "You spit over your left shoulder.",
359 }, 374 },
360 params => { 375 params => {
361 target => "<self> spits in your face!", 376 target => "<self> spits in your face!",
362 other => "<self> spits in <other>'s face.", 377 other => "<self> spits in <other>'s face.",
363 self => "You spit on <other>.", 378 self => "You spit on <other>.",
364 }, 379 },
365 self => { 380 self => {
366 other => "<self> drools all over himself.", 381 other => "<self> drools all over G<him|her>self.",
367 self => "You drool all over yourself.", 382 self => "You drool all over yourself.",
368 }, 383 },
369 }, 384 },
370 glare => { 385 glare => {
371 noparams => { 386 noparams => {
372 other => "<self> glares around him.", 387 other => "<self> glares around G<him|her>.",
373 self => "You glare at nothing in particular.", 388 self => "You glare at nothing in particular.",
374 }, 389 },
375 params => { 390 params => {
376 target => "<self> glares icily at you, you feel cold to your bones.", 391 target => "<self> glares icily at you, you feel cold to your bones.",
377 other => "<self> glares at <other>.", 392 other => "<self> glares at <other>.",
378 self => "You glare icily at <other>.", 393 self => "You glare icily at <other>.",
379 }, 394 },
380 self => { 395 self => {
381 other => "<self> glares at his feet, what is bothering him?", 396 other => "<self> glares at G<his|her> feet, what is bothering G<him|her>?",
382 self => "You glare icily at your feet, they are suddenly very cold.", 397 self => "You glare icily at your feet, they are suddenly very cold.",
383 }, 398 },
384 }, 399 },
385 bow => { 400 bow => {
386 noparams => { 401 noparams => {
391 target => "<self> bows before you.", 406 target => "<self> bows before you.",
392 other => "<self> bows before <other>.", 407 other => "<self> bows before <other>.",
393 self => "You bow before <other>.", 408 self => "You bow before <other>.",
394 }, 409 },
395 self => { 410 self => {
396 other => "<self> folds up like a jackknife and kisses his own toes.", 411 other => "<self> folds up like a jackknife and kisses G<his|her> own toes.",
397 self => "You kiss your toes.", 412 self => "You kiss your toes.",
398 }, 413 },
399 }, 414 },
400 dance => { 415 dance => {
401 noparams => { 416 noparams => {
402 other => "<self> expresses himself through interpretive dance.", 417 other => "<self> expresses G<him|her>self through interpretive dance.",
403 self => "You dance with glee.", 418 self => "You dance with glee.",
404 }, 419 },
405 params => { 420 params => {
406 target => "<self> grabs you, and begins dancing!", 421 target => "<self> grabs you, and begins dancing!",
407 other => "Yipe! <self> and <other> are doing the Macarena!", 422 other => "Yipe! <self> and <other> are doing the Macarena!",
408 self => "You grab <other> and begin doing the Cha-Cha!", 423 self => "You grab <other> and begin doing the Cha-Cha!",
409 }, 424 },
410 self => { 425 self => {
411 other => "<self> embraces himself and begins to dance!", 426 other => "<self> embraces G<him|her>self and begins to dance!",
412 self => "You skip and dance around by yourself.", 427 self => "You skip and dance around by yourself.",
413 }, 428 },
414 }, 429 },
415 snore => { 430 snore => {
416 noparams => { 431 noparams => {
432 self => { 447 self => {
433 }, 448 },
434 }, 449 },
435 snap => { 450 snap => {
436 noparams => { 451 noparams => {
437 other => "<self> snaps his fingers.", 452 other => "<self> snaps G<his|her> fingers.",
438 self => "PRONTO! you snap your fingers.", 453 self => "PRONTO! you snap your fingers.",
439 }, 454 },
440 params => { 455 params => {
441 }, 456 },
442 self => { 457 self => {
451 target => "<self> waves goodbye to you. Have a good journey.", 466 target => "<self> waves goodbye to you. Have a good journey.",
452 other => "<self> waves goodbye to <other>.", 467 other => "<self> waves goodbye to <other>.",
453 self => "You wave goodbye to <other>.", 468 self => "You wave goodbye to <other>.",
454 }, 469 },
455 self => { 470 self => {
456 other => "<self> waves goodbye to himself.", 471 other => "<self> waves goodbye to G<him|her>self.",
457 self => "Are you going on adventures as well??", 472 self => "Are you going on adventures as well??",
458 }, 473 },
459 }, 474 },
460 smile => { 475 smile => {
461 noparams => { 476 noparams => {
475 other => "<self> sneezes.", 490 other => "<self> sneezes.",
476 self => "Gesundheit!", 491 self => "Gesundheit!",
477 }, 492 },
478 params => { 493 params => {
479 target => "<self> sneezes on you, you feel the snot cover you. EEEEEEW.", 494 target => "<self> sneezes on you, you feel the snot cover you. EEEEEEW.",
480 other => "<self> sneezes on <other> and a film of snot covers him.", 495 other => "<self> sneezes on <other> and a film of snot covers G<him|her>.",
481 self => "You sneeze at <other> and a film of snot shoots onto him.", 496 self => "You sneeze at <other> and a film of snot shoots onto G<him|her>.",
482 }, 497 },
483 self => { 498 self => {
484 other => "<self> sneezes, and covers himself in a slimy substance.", 499 other => "<self> sneezes, and covers G<him|her>self in a slimy substance.",
485 self => "You sneeze on yourself, what a mess!", 500 self => "You sneeze on yourself, what a mess!",
486 }, 501 },
487 }, 502 },
488 bounce => { 503 bounce => {
489 noparams => { 504 noparams => {
498 self => { 513 self => {
499 }, 514 },
500 }, 515 },
501 shake => { 516 shake => {
502 noparams => { 517 noparams => {
503 other => "<self> shakes his head.", 518 other => "<self> shakes G<his|her> head.",
504 self => "You shake your head.", 519 self => "You shake your head.",
505 }, 520 },
506 params => { 521 params => {
507 target => "<self> shakes your hand.", 522 target => "<self> shakes your hand.",
508 other => "<self> shakes <other>'s hand.", 523 other => "<self> shakes <other>'s hand.",
513 self => "You are shaken by yourself.", 528 self => "You are shaken by yourself.",
514 }, 529 },
515 }, 530 },
516 lick => { 531 lick => {
517 noparams => { 532 noparams => {
518 other => "<self> licks his mouth and smiles.", 533 other => "<self> licks G<his|her> mouth and smiles.",
519 self => "You lick your mouth and smile.", 534 self => "You lick your mouth and smile.",
520 }, 535 },
521 params => { 536 params => {
522 target => "<self> licks you.", 537 target => "<self> licks you.",
523 other => "<self> licks <other>.", 538 other => "<self> licks <other>.",
524 self => "You lick <other>.", 539 self => "You lick <other>.",
525 }, 540 },
526 self => { 541 self => {
527 other => "<self> licks himself - YUCK.", 542 other => "<self> licks G<him|her>self - YUCK.",
528 self => "You lick yourself.", 543 self => "You lick yourself.",
529 }, 544 },
530 }, 545 },
531 flip => { 546 flip => {
532 noparams => { 547 noparams => {
538 self => { 553 self => {
539 }, 554 },
540 }, 555 },
541 think => { 556 think => {
542 noparams => { 557 noparams => {
543 other => "<self> closes his eyes and thinks really hard.", 558 other => "<self> closes G<his|her> eyes and thinks really hard.",
544 self => "Anything in particular that you'd care to think about?", 559 self => "Anything in particular that you'd care to think about?",
545 }, 560 },
546 params => { 561 params => {
547 }, 562 },
548 self => { 563 self => {
612 target => "<self> cries on your shoulder.", 627 target => "<self> cries on your shoulder.",
613 other => "<self> cries on <other>'s shoulder.", 628 other => "<self> cries on <other>'s shoulder.",
614 self => "You cry on <other>'s shoulder.", 629 self => "You cry on <other>'s shoulder.",
615 }, 630 },
616 self => { 631 self => {
617 other => "<self> sobs quietly to himself.", 632 other => "<self> sobs quietly to G<him|her>self.",
618 self => "You cry to yourself.", 633 self => "You cry to yourself.",
619 }, 634 },
620 }, 635 },
621 sulk => { 636 sulk => {
622 noparams => { 637 noparams => {
636 params => { 651 params => {
637 target => "<self> whistles at <other>.", 652 target => "<self> whistles at <other>.",
638 self => "You whistle at <other>.", 653 self => "You whistle at <other>.",
639 }, 654 },
640 self => { 655 self => {
641 other => "<self> whistles to himself in boredom.", 656 other => "<self> whistles to G<him|her>self in boredom.",
642 self => "You whistle while you work.", 657 self => "You whistle while you work.",
643 }, 658 },
644 }, 659 },
645 groan => { 660 groan => {
646 noparams => { 661 noparams => {
677 }, 692 },
678}; 693};
679 694
680for my $emotion (keys %$emotes) { 695for my $emotion (keys %$emotes) {
681 cf::register_command $emotion => sub { 696 cf::register_command $emotion => sub {
682 my ($pl, $tname) = @_; 697 my ($ob, $tname) = @_;
698
699 my $pl = $ob->contr;
683 700
684 cf::async { 701 cf::async {
685 my $name = $pl->name; 702 my $name = $ob->name;
703 $Coro::current->{desc} = "emote handler for $name";
686 704
687 if ($tname eq $name) { 705 if ($tname eq $name) {
688 my $emote = $emotes->{$emotion}->{self}; 706 my %emote = %{ $emotes->{$emotion}->{self} || {} };
689 707
690 $emote->{other} = "You look away from <self>." 708 $emote{other} ||= "You look away from <self>.";
691 if !$emote->{other};
692 $emote->{self} = "My god! Is that LEGAL?" 709 $emote{self} ||= "My god! Is that LEGAL?";
693 if !$emote->{self};
694 710
695 $emote->{other} =~ s/<self>/$name/; 711 $emote{other} =~ s/<self>/$name/;
712
713 $_ = $pl->expand_cfpod ($_)
714 for values %emote;
696 715
716 send_msg $_, $cf::CHAT_CHANNEL, $emote{other}, cf::NDI_GREY | cf::NDI_VERBATIM, "msg_chat"
697 for my $other ( grep { $pl->on_same_map_as ($_->ob) } cf::player::list ) { 717 for grep { $ob->on_same_map_as ($_->ob) && $_ != $ob} cf::player::list;
698 next
699 if $other->ob == $pl;
700 $other->ob->message ($emote->{other}, cf::NDI_GREY | cf::NDI_UNIQUE);
701 }
702 718
703 $pl->message ($emote->{self}, cf::NDI_GREY | cf::NDI_UNIQUE); 719 $pl->send_msg ($emote{self}, cf::NDI_GREY | cf::NDI_REPLY | cf::NDI_VERBATIM);
704 } elsif ($tname) { 720 } elsif ($tname) {
705 my $target = cf::player::find $tname 721 my $target = cf::player::find $tname
706 or return $pl->reply (undef, "$tname is not around."); 722 or return send_msg $pl, tell_channel $tname, "$tname is not around.", cf::NDI_DK_ORANGE | cf::NDI_REPLY, "msg_chat";
707 723
708 my $emote = $emotes->{$emotion}->{params}; 724 my %emote = %{ $emotes->{$emotion}->{params} || {} };
709 725
710 $emote->{other} = "<self> is eyeing <other> quizzically." 726 $emote{other} ||= "<self> is eyeing <other> quizzically.";
711 if !$emote->{other};
712 $emote->{self} = "You are still nuts." 727 $emote{self} ||= "You are still nuts.";
713 if !$emote->{self};
714 $emote->{target} = "You get the distinct feeling that <other> is nuts." 728 $emote{target} ||= "You get the distinct feeling that <self> is nuts.";
715 if !$emote->{target};
716 729
717 $emote->{self} =~ s/<other>/$tname/; 730 $emote{self} =~ s/<other>/$tname/;
718 $emote->{target} =~ s/<self>/$name/; 731 $emote{target} =~ s/<self>/$name/;
719 $emote->{other} =~ s/<other>/$tname/; 732 $emote{other} =~ s/<other>/$tname/;
720 $emote->{other} =~ s/<self>/$name/; 733 $emote{other} =~ s/<self>/$name/;
721 734
722 for my $other ( grep { $pl->on_same_map_as ($_->ob) } cf::player::list ) { 735 $_ = $pl->expand_cfpod ($_)
723 next 736 for values %emote;
724 if $other->ob == $pl or $other == $target;
725 $other->ob->message ($emote->{other}, cf::NDI_GREY | cf::NDI_UNIQUE);
726 }
727 737
728 $target->ob->message ($emote->{target}, cf::NDI_GREY | cf::NDI_UNIQUE); 738 send_msg $_, $cf::CHAT_CHANNEL, $emote{other}, cf::NDI_GREY | cf::NDI_VERBATIM, "msg_chat"
729 $pl->message ($emote->{self}, cf::NDI_GREY | cf::NDI_UNIQUE); 739 for grep { $_ != $pl && $_ != $target && $ob->on_same_map_as ($_->ob) } cf::player::list;
740
741 send_msg $target, tell_channel $name, $emote{target}, cf::NDI_GREY | cf::NDI_VERBATIM, "msg_shout";
742 $pl->send_msg (tell_channel $tname, $emote{self}, cf::NDI_GREY | cf::NDI_REPLY | cf::NDI_VERBATIM);
730 } else { 743 } else {
731 my $emote = $emotes->{$emotion}->{noparams}; 744 my %emote = %{ $emotes->{$emotion}->{noparams} || {} };
732 $emote->{other} =~ s/<self>/$name/;
733 745
734 $emote->{other} = "<self> dances with glee." 746 $emote{other} ||= "<self> dances with glee.";
735 if !$emote->{other};
736 $emote->{self} = "You are a nut." 747 $emote{self} ||= "You are a nut.";
737 if !$emote->{self};
738 748
749 $emote{other} =~ s/<self>/$name/;
750
751 $_ = $pl->expand_cfpod ($_)
752 for values %emote;
753
754 send_msg $_, $cf::CHAT_CHANNEL, $emote{other}, cf::NDI_GREY | cf::NDI_VERBATIM, "msg_chat"
739 for my $other ( grep { $pl->on_same_map_as ($_->ob) } cf::player::list ) { 755 for grep { $ob->on_same_map_as ($_->ob) && $_ != $pl } cf::player::list;
740 next
741 if $other->ob == $pl;
742 $other->ob->message ($emote->{other}, cf::NDI_GREY | cf::NDI_UNIQUE);
743 }
744 756
745 $pl->message ($emote->{self}, cf::NDI_GREY | cf::NDI_UNIQUE); 757 $pl->send_msg ($cf::CHAT_CHANNEL, $emote{self}, cf::NDI_GREY | cf::NDI_REPLY | cf::NDI_VERBATIM);
746 } 758 }
747 }; 759 };
748 }; 760 };
749} 761}
750
751our $SAY_CHANNEL = {
752 id => "say",
753 title => "Map",
754 reply => "say ",
755 tooltip => "Things said to and replied from npcs near you and other players on the same map only.",
756};
757 762
758cf::register_command me => sub { 763cf::register_command me => sub {
759 my ($pl, $msg) = @_; 764 my ($pl, $msg) = @_;
760 765
761 my $name = $pl->name; 766 my $name = $pl->name;
762 767
763 $_->ns->send_msg ($SAY_CHANNEL => "* $name $msg", cf::NDI_GREY, $_ == $pl ? (reply => 1) : ()) 768 send_msg $_, $cf::SAY_CHANNEL => "* $name $msg", cf::NDI_GREY | cf::NDI_DEF | ($_ == $pl ? cf::NDI_REPLY : 0), "msg_say"
764 for grep $pl->on_same_map_as ($_->ob), cf::player::list; 769 for grep $pl->on_same_map_as ($_->ob), cf::player::list;
765}; 770};
766 771
767cf::register_command say => sub { 772cf::register_command say => sub {
768 my ($pl, $msg) = @_; 773 my ($ob, $msg) = @_;
769 774
770 utf8::decode $msg; 775 utf8::decode $msg;
771 776
772 return if $pl->contr->invoke (cf::EVENT_PLAYER_SAY, $msg); 777 return if $ob->contr->invoke (cf::EVENT_PLAYER_SAY, $msg);
773 778
774 if ($msg) { 779 if ($msg) {
775 my $name = $pl->name; 780 my $name = $ob->name;
776 my @plonmap = grep $pl->on_same_map_as ($_->ob), cf::player::list; 781 my @plonmap = grep $ob->on_same_map_as ($_->ob), cf::player::list;
777 782
778 $_->ns->send_msg ($SAY_CHANNEL => "$name says: $msg", cf::NDI_GREY, $_ == $pl ? (reply => 1) : ()) 783 send_msg $_, $cf::SAY_CHANNEL => "$name says: $msg", cf::NDI_GREY, "msg_say"
779 for @plonmap; 784 for grep $_ != $ob->contr, @plonmap;
785 $ob->contr->send_msg ($cf::SAY_CHANNEL => "$name says: $msg", cf::NDI_GREY | cf::NDI_REPLY);
780 786
781 # npcs, magic_ears etc. 787 # npcs, magic_ears etc.
782 # first find all objects and their first-level inventories 788 # first find all objects and their first-level inventories
783 # within a 5x5 square that have something resembling 789 # within a 5x5 square that have something resembling
784 # dialogue or support on_say. 790 # dialogue or support on_say.
785 my ($map, $x, $y) = ($pl->map, $pl->x - 2, $pl->y - 2); 791 my ($map, $x, $y) = ($ob->map, $ob->x - 2, $ob->y - 2);
786 792
787 for my $npc ( 793 for my $npc (
788 grep +($_->invoke (cf::EVENT_OBJECT_SAY, $pl->contr, $msg) && return) || NPC_Dialogue::has_dialogue $_, 794 grep +($_->invoke (cf::EVENT_OBJECT_SAY, $ob->contr, $msg) && return) || $_->has_dialogue,
789 map +($_, $_->inv), 795 map +($_, $_->inv),
790 grep $_, 796 grep $_,
791 map $map->at ($x + $_ % 5, $y + (int $_ / 5)), 797 map $map->at ($x + $_ % 5, $y + (int $_ / 5)),
792 0..24 798 0..24
793 ) { 799 ) {
794 # if some listener teleported us somewhere else, stop right here 800 # if some listener teleported us somewhere else, stop right here
795 last unless $map->path == $pl->map->path; 801 last unless $map->path == $ob->map->path;
796 802
797 my $dialog = new NPC_Dialogue pl => $pl->contr, npc => $npc; 803 my $dialog = new NPC_Dialogue pl => $ob->contr, npc => $npc;
798 my ($reply, @kw) = $dialog->tell ($msg); 804 my ($reply, @kw) = $dialog->tell ($msg);
799 805
800 if (defined $reply) { 806 if (defined $reply) {
801 if ($npc->type == cf::MAGIC_EAR) { 807 if ($npc->type == cf::MAGIC_EAR) {
802 if (length $reply) { 808 if (length $reply) {
803 $_->contr->send_msg ($SAY_CHANNEL => $reply, cf::NDI_BROWN) 809 send_msg $_, $cf::SAY_CHANNEL => $reply, cf::NDI_BROWN, "msg_say"
804 for @plonmap; 810 for @plonmap;
805 } 811 }
806 $npc->use_trigger; 812 $npc->use_trigger;
807 } else { 813 } else {
808 if (length $reply) { 814 if (length $reply) {
809 $_->contr->send_msg ($SAY_CHANNEL => $npc->name . " says: $reply", cf::NDI_BROWN) 815 send_msg $_, $cf::SAY_CHANNEL => $npc->name . " says: $reply", cf::NDI_BROWN, "msg_say"
810 for @plonmap; 816 for @plonmap;
811 } 817 }
812 } 818 }
813 } 819 }
814 820
815 if (@kw) { 821 if (@kw) {
816 $_->contr->send_msg ($SAY_CHANNEL => "[further topics: " . (join ", ", @kw) . "]", cf::NDI_BROWN) 822 $_->send_msg ($cf::SAY_CHANNEL => "[further topics: " . (join ", ", @kw) . "]", cf::NDI_BROWN)
817 for @plonmap; 823 for @plonmap;
818 } 824 }
819 } 825 }
820 826
821 } else { 827 } else {
822 $pl->contr->send_msg ($SAY_CHANNEL => "What do you want to say?", 0, reply => 1); 828 $ob->send_msg ($cf::SAY_CHANNEL => "What do you want to say?", cf::NDI_GREY | cf::NDI_REPLY);
823 } 829 }
824}; 830};
825 831
826our $CHAT_CHANNEL = {
827 id => "chat",
828 title => "Chat",
829 reply => "chat ",
830 tooltip => "Player chat and shouts, global to the server.",
831};
832
833cf::register_command chat => sub { 832cf::register_command chat => sub {
834 my ($pl, $msg) = @_; 833 my ($ob, $msg) = @_;
835 834
836 utf8::decode $msg; 835 utf8::decode $msg;
837 836
837 my $pl = $ob->contr;
838
838 return if $pl->contr->invoke (cf::EVENT_PLAYER_CHAT, $msg); 839 return if $pl->invoke (cf::EVENT_PLAYER_CHAT, $msg);
839 840
840 if ($msg) { 841 if ($msg) {
841 my $name = $pl->name; 842 my $name = $ob->name;
842 my $NOW = time; 843 my $NOW = time;
843 844
844 cf::LOG cf::llevDebug, sprintf "QBERT [%s] %s\n", $name, $msg; 845 cf::LOG cf::llevDebug, sprintf "QBERT [%s] %s\n", $name, $msg;
845 send_irc ("[%s] %s", $name, $msg); 846 send_irc ("[%s] %s", $name, $msg);
846 847
847 $_->ns->send_msg ($CHAT_CHANNEL => "$name chats: $msg", cf::NDI_BLUE, $_ == $pl ? (reply => 1) : ()) 848 send_msg $_, $cf::CHAT_CHANNEL => "$name chats: $msg", cf::NDI_BLUE | cf::NDI_DEF | ($_ == $pl ? cf::NDI_REPLY : 0), "msg_chat"
848 for grep { $_->ob->{ext_ignore_shout}{$name} < $NOW && $_->listening >= 10 } cf::player::list; 849 for grep { $_->ob->{ext_ignore_shout}{$name} < $NOW } cf::player::list;
849 850
850 } else { 851 } else {
851 $pl->ns->send_msg ($CHAT_CHANNEL => "Chat what?"); 852 $pl->send_msg ($cf::CHAT_CHANNEL => "Chat what?", cf::NDI_BLUE | cf::NDI_DEF | cf::NDI_REPLY);
852 } 853 }
853}; 854};
854 855
855cf::register_command shout => sub { 856cf::register_command shout => sub {
856 my ($pl, $msg) = @_; 857 my ($ob, $msg) = @_;
857 858
858 utf8::decode $msg; 859 utf8::decode $msg;
859 860
861 my $pl = $ob->contr;
862
860 return if $pl->contr->invoke (cf::EVENT_PLAYER_SHOUT, $msg); 863 return if $pl->invoke (cf::EVENT_PLAYER_SHOUT, $msg);
861 864
862 if ($msg) { 865 if ($msg) {
863 my $NOW = time; 866 my $NOW = time;
864 my $name = $pl->name; 867 my $name = $ob->name;
865 868
866 cf::LOG cf::llevDebug, sprintf "QBERT {%s} %s\n", $name, $msg; 869 cf::LOG cf::llevDebug, sprintf "QBERT {%s} %s\n", $name, $msg;
867 send_irc ("\007\0034{%s} %s\n", $name, $msg); 870 send_irc ("\007\0034{%s} %s\n", $name, $msg);
868 871
869 $_->ns->send_msg ($CHAT_CHANNEL => "$name shouts: $msg", cf::NDI_BLUE, $_ == $pl ? (reply => 1) : ()) 872 send_msg $_, $cf::CHAT_CHANNEL => "$name shouts: $msg", cf::NDI_RED | cf::NDI_DEF | ($_ == $pl ? cf::NDI_REPLY : 0), "msg_shout"
870 for grep { $_->ob->{ext_ignore_shout}{$name} < $NOW && $_->listening >= 2 } cf::player::list; 873 for grep { $_->ob->{ext_ignore_shout}{$name} < $NOW } cf::player::list;
871 874
872 } else { 875 } else {
873 $pl->ns->send_msg ($CHAT_CHANNEL => "Shout what?"); 876 $pl->send_msg ($cf::CHAT_CHANNEL => "Shout what?", cf::NDI_RED | cf::NDI_DEF | cf::NDI_REPLY);
874 } 877 }
875}; 878};
876 879
877cf::register_command tell => sub { 880cf::register_command tell => sub {
878 my ($ob, $args) = @_; 881 my ($ob, $args) = @_;
885 or return; 888 or return;
886 my $name = $ob->name; 889 my $name = $ob->name;
887 890
888 return if $pl->invoke (cf::EVENT_PLAYER_TELL, $target, $msg); 891 return if $pl->invoke (cf::EVENT_PLAYER_TELL, $target, $msg);
889 892
890 my $pl_channel = { 893 my $pl_channel = tell_channel $target;
891 id => "tell-$target",
892 title => "$target",
893 reply => "tell $target ",
894 tooltip => "Private messages from/to $target",
895 };
896 894
897 if ($target =~ /irc\//) { 895 if ($target =~ /irc\//) {
898 my (undef, $nick) = split /\//, $target, 2; 896 my (undef, $nick) = split /\//, $target, 2;
899 $ns->send_msg ($pl_channel => "You tell $target: $args", reply => 1); 897 $ns->send_msg ($pl_channel => "You tell $target: $args", cf::NDI_DK_ORANGE | cf::NDI_DEF | cf::NDI_REPLY);
900 send_irc ("(%s) %s: %s\n", $name, $nick, $msg); 898 send_irc ("(%s) %s: %s\n", $name, $nick, $msg);
899
901 } elsif (my $other = cf::player::find_active $target) { 900 } elsif (my $other = cf::player::find_active $target) {
902 my $other_channel = { 901 my $other_channel = tell_channel $name;
903 id => "tell-$name",
904 title => "$name",
905 reply => "tell $name ",
906 tooltip => "Private messages from/to $name",
907 };
908 902
909 if ($msg) { 903 if ($msg) {
910 if ($target eq $name) { 904 if ($target eq $name) {
911 $ns->send_msg ($pl_channel => "You are talking to yourself, you freak!", reply => 1); 905 $ns->send_msg ($pl_channel => "You are talking to yourself, you freak!", cf::NDI_DK_ORANGE | cf::NDI_DEF | cf::NDI_REPLY);
912 } elsif ($other->ob->{ext_ignore_tell}{$name} >= time) { 906 } elsif ($other->ob->{ext_ignore_tell}{$name} >= time) {
913 $ns->send_msg ($pl_channel => "$target ignores what you say. Give up on it.", reply => 1); 907 $ns->send_msg ($pl_channel => "$target ignores what you say. Give up on it.", cf::NDI_DK_ORANGE | cf::NDI_DEF | cf::NDI_REPLY);
914 } else { 908 } else {
915 return if $other->invoke (cf::EVENT_PLAYER_TOLD, $pl->contr, $msg); 909 return if $other->invoke (cf::EVENT_PLAYER_TOLD, $pl, $msg);
916 cf::LOG cf::llevDebug, sprintf "TELL [%s>%s] %s\n", $name, $target, $msg; 910 cf::LOG cf::llevDebug, sprintf "TELL [%s>%s] %s\n", $name, $target, $msg;
917 911
918 $ns->send_msg ($pl_channel => "You tell $target: $msg", reply => 1); 912 $ns->send_msg ($pl_channel => "You tell $target: $msg", cf::NDI_DK_ORANGE | cf::NDI_DEF | cf::NDI_REPLY);
919 $other->ns->send_msg ($other_channel => "$name tells you: $msg"); 913 send_msg $other, $other_channel => "$name tells you: $msg", cf::NDI_DK_ORANGE | cf::NDI_DEF, "msg_tell";
920 } 914 }
921 } else { 915 } else {
922 $ns->send_msg ($pl_channel => "What do you want to tell $target?"); 916 $ns->send_msg ($pl_channel => "What do you want to tell $target?", cf::NDI_DK_ORANGE | cf::NDI_DEF | cf::NDI_REPLY);
923 } 917 }
924 918
925 } else { 919 } else {
926 $ns->send_msg ($pl_channel => "No such player. Your message: $msg"); 920 $ns->send_msg ($pl_channel => "No such player. Your message: $msg", cf::NDI_DK_ORANGE | cf::NDI_DEF | cf::NDI_REPLY);
927 } 921 }
928}; 922};
929 923
930cf::register_command ignore => sub { 924cf::register_command ignore => sub {
931 my ($pl, $args) = @_; 925 my ($pl, $args) = @_;
934 if ($args eq "list") { 928 if ($args eq "list") {
935 clean_timeouts $pl; 929 clean_timeouts $pl;
936 930
937 if ((my @ignored_tell = sort keys %{$pl->{ext_ignore_tell}}) 931 if ((my @ignored_tell = sort keys %{$pl->{ext_ignore_tell}})
938 + (my @ignored_shout = sort keys %{$pl->{ext_ignore_shout}})) { 932 + (my @ignored_shout = sort keys %{$pl->{ext_ignore_shout}})) {
939 $pl->message ("Currently ignoring private messages from: ", cf::NDI_UNIQUE); 933 $pl->message ("Currently ignoring private messages from: ", cf::NDI_REPLY);
940 $pl->message ((join ", ", @ignored_tell), cf::NDI_UNIQUE); 934 $pl->message ((join ", ", @ignored_tell), cf::NDI_REPLY);
941 $pl->message ("Currently ignoring shouts from: ", cf::NDI_UNIQUE); 935 $pl->message ("Currently ignoring shouts from: ", cf::NDI_REPLY);
942 $pl->message ((join ", ", @ignored_shout), cf::NDI_UNIQUE); 936 $pl->message ((join ", ", @ignored_shout), cf::NDI_REPLY);
943 $pl->message ("To stop ignoring one, use unignore.", cf::NDI_UNIQUE); 937 $pl->message ("To stop ignoring one, use unignore.", cf::NDI_REPLY);
944 } else { 938 } else {
945 $pl->message ("Not ignoring anyone", cf::NDI_UNIQUE); 939 $pl->message ("Not ignoring anyone", cf::NDI_REPLY);
946 } 940 }
947 941
948 } elsif ($target && $type) { 942 } elsif ($target && $type) {
949 943
950 $timeout ne "" or $timeout = 24; 944 $timeout ne "" or $timeout = 24;
951 my $absolute_timeout = time + $timeout * 3600; 945 my $absolute_timeout = time + $timeout * 3600;
952 946
953 if (cf::player::exists $target) { 947 if (cf::player::exists $target) {
954 if ($type eq "tell") { 948 if ($type eq "tell") {
955 $pl->message ("Now ignoring private messages from $target for $timeout hours.", cf::NDI_UNIQUE); 949 $pl->message ("Now ignoring private messages from $target for $timeout hours.", cf::NDI_REPLY);
956 $pl->{ext_ignore_tell}{$target} = $absolute_timeout; 950 $pl->{ext_ignore_tell}{$target} = $absolute_timeout;
957 } elsif ($type eq "shout") { 951 } elsif ($type eq "shout") {
958 $pl->message ("Now ignoring shouts from $target for $timeout hours.", cf::NDI_UNIQUE); 952 $pl->message ("Now ignoring shouts from $target for $timeout hours.", cf::NDI_REPLY);
959 $pl->{ext_ignore_shout}{$target} = $absolute_timeout; 953 $pl->{ext_ignore_shout}{$target} = $absolute_timeout;
960 } elsif ($type eq "all") { 954 } elsif ($type eq "all") {
961 $pl->message ("Now ignoring everything from $target for $timeout hours.", cf::NDI_UNIQUE); 955 $pl->message ("Now ignoring everything from $target for $timeout hours.", cf::NDI_REPLY);
962 $pl->{ext_ignore_tell}{$target} = $absolute_timeout; 956 $pl->{ext_ignore_tell}{$target} = $absolute_timeout;
963 $pl->{ext_ignore_shout}{$target} = $absolute_timeout; 957 $pl->{ext_ignore_shout}{$target} = $absolute_timeout;
964 } else { 958 } else {
965 $pl->message ("You need to specify tell, shout or all.", cf::NDI_UNIQUE); 959 $pl->message ("You need to specify tell, shout or all.", cf::NDI_REPLY);
966 } 960 }
967 } else { 961 } else {
968 $pl->message ("No such player: $target", cf::NDI_UNIQUE); 962 $pl->message ("No such player: $target", cf::NDI_REPLY);
969 } 963 }
970 964
971 } else { 965 } else {
972 $pl->message ("Usage: ignore <player> <tell|shout|all> <timeout>\n" 966 $pl->message ("Usage: ignore <player> <tell|shout|all> <timeout>\n"
973 . "will ignore a player for <timeout> hours.\n" 967 . "will ignore a player for <timeout> hours.\n"
974 . "Usage: ignore list\n" 968 . "Usage: ignore list\n"
975 . "will show you a list of players currently ignored.", cf::NDI_UNIQUE); 969 . "will show you a list of players currently ignored.", cf::NDI_REPLY);
976 } 970 }
977}; 971};
978 972
979cf::register_command unignore => sub { 973cf::register_command unignore => sub {
980 my ($pl, $args) = @_; 974 my ($pl, $args) = @_;
981 my ($target, $type) = split /\s+/, $args; 975 my ($target, $type) = split /\s+/, $args;
982 976
983 if ($args eq "") { 977 if ($args eq "") {
984 if ($pl->{ext_ignore_tell}) { 978 if ($pl->{ext_ignore_tell}) {
985 $pl->message ("Currently ignoring private messages from: ", cf::NDI_UNIQUE); 979 $pl->message ("Currently ignoring private messages from: ", cf::NDI_REPLY);
986 $pl->message ((join ", ", sort keys %{ $pl->{ext_ignore_tell} }), cf::NDI_UNIQUE); 980 $pl->message ((join ", ", sort keys %{ $pl->{ext_ignore_tell} }), cf::NDI_REPLY);
987 $pl->message ("Currently ignoring shouts from: ", cf::NDI_UNIQUE); 981 $pl->message ("Currently ignoring shouts from: ", cf::NDI_REPLY);
988 $pl->message ((join ", ", sort keys %{ $pl->{ext_ignore_shout} }), cf::NDI_UNIQUE); 982 $pl->message ((join ", ", sort keys %{ $pl->{ext_ignore_shout} }), cf::NDI_REPLY);
989 } else { 983 } else {
990 $pl->message ("Not ignoring anyone", cf::NDI_UNIQUE); 984 $pl->message ("Not ignoring anyone", cf::NDI_REPLY);
991 } 985 }
992 } else { 986 } else {
993 if (cf::player::exists $target) { 987 if (cf::player::exists $target) {
994 if ($type eq "tell") { 988 if ($type eq "tell") {
995 $pl->message ("Not ignoring private messages from $target anymore.", cf::NDI_UNIQUE); 989 $pl->message ("Not ignoring private messages from $target anymore.", cf::NDI_REPLY);
996 delete $pl->{ext_ignore_tell} {$target}; 990 delete $pl->{ext_ignore_tell} {$target};
997 } elsif ($type eq "shout") { 991 } elsif ($type eq "shout") {
998 $pl->message ("Not ignoring shouts from $target anymore.", cf::NDI_UNIQUE); 992 $pl->message ("Not ignoring shouts from $target anymore.", cf::NDI_REPLY);
999 delete $pl->{ext_ignore_shout}{$target}; 993 delete $pl->{ext_ignore_shout}{$target};
1000 } elsif ($type eq "all") { 994 } elsif ($type eq "all") {
1001 $pl->message ("Not ignoring anything from $target anymore.", cf::NDI_UNIQUE); 995 $pl->message ("Not ignoring anything from $target anymore.", cf::NDI_REPLY);
1002 delete $pl->{ext_ignore_tell} {$target}; 996 delete $pl->{ext_ignore_tell} {$target};
1003 delete $pl->{ext_ignore_shout}{$target}; 997 delete $pl->{ext_ignore_shout}{$target};
1004 } else { 998 } else {
1005 $pl->message ("You need to specify tell, shout or all.", cf::NDI_UNIQUE); 999 $pl->message ("You need to specify tell, shout or all.", cf::NDI_REPLY);
1006 } 1000 }
1007 } else { 1001 } else {
1008 $pl->message ("No such player or ambiguous name: $target", cf::NDI_UNIQUE); 1002 $pl->message ("No such player or ambiguous name: $target", cf::NDI_REPLY);
1009 } 1003 }
1010 } 1004 }
1011}; 1005};
1012 1006

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines