1 | #! perl |
1 | #! perl |
|
|
2 | #CONVERSION: PARTIAL |
2 | |
3 | |
3 | # 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 |
4 | # adds ignore/unignore functionality |
5 | # adds ignore/unignore functionality |
5 | |
6 | |
6 | use NPC_Dialogue; |
7 | use NPC_Dialogue; |
… | |
… | |
21 | } |
22 | } |
22 | } |
23 | } |
23 | } |
24 | } |
24 | } |
25 | } |
25 | |
26 | |
26 | sub on_login { |
27 | cf::attach_to_players |
|
|
28 | prio => -1000, |
|
|
29 | on_login => sub { |
27 | my ($pl) = @_; |
30 | my ($pl) = @_; |
28 | |
31 | |
29 | clean_timeouts $pl->ob; |
32 | clean_timeouts $pl->ob; |
30 | } |
33 | }, |
|
|
34 | ; |
31 | |
35 | |
32 | cf::register_command listen => 0, sub { |
36 | cf::register_command listen => 0, sub { |
33 | my ($who, $msg) = @_; |
37 | my ($who, $msg) = @_; |
34 | my $player = cf::player::find $who->name; |
38 | my $player = cf::player::find $who->name; |
35 | |
39 | |