1 | #! perl |
1 | #! perl # depends=irc |
2 | #CONVERSION: PARTIAL |
2 | #CONVERSION: PARTIAL |
3 | |
3 | |
4 | # implement a replacement for the built-in say/chat/shout/tell/reply commands |
4 | # implement a replacement for the built-in say/chat/shout/tell/reply commands |
5 | # adds ignore/unignore functionality |
5 | # adds ignore/unignore functionality |
6 | |
6 | |
… | |
… | |
783 | 0..24 |
783 | 0..24 |
784 | ) { |
784 | ) { |
785 | # if some listener teleported us somewhere else, stop right here |
785 | # if some listener teleported us somewhere else, stop right here |
786 | last unless $map->path == $pl->map->path; |
786 | last unless $map->path == $pl->map->path; |
787 | |
787 | |
788 | my $dialog = new NPC_Dialogue ob => $pl, npc => $npc; |
788 | my $dialog = new NPC_Dialogue pl => $pl->contr, npc => $npc; |
789 | my ($reply, @kw) = $dialog->tell ($msg); |
789 | my ($reply, @kw) = $dialog->tell ($msg); |
790 | |
790 | |
791 | if (defined $reply) { |
791 | if (defined $reply) { |
792 | if ($npc->type == cf::MAGIC_EAR) { |
792 | if ($npc->type == cf::MAGIC_EAR) { |
793 | if (length $reply) { |
793 | if (length $reply) { |