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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines