1 | #! perl |
1 | #! perl |
2 | |
2 | |
3 | # implement a replacement for the built-in chat/shout/tell/reply commands |
3 | # implement a replacement for the built-in chat/shout/tell/reply commands |
4 | # adds ignore/unignore functionality |
4 | # adds ignore/unignore functionality |
5 | |
5 | |
6 | cf::register_command chat => 0, sub |
6 | cf::register_command chat => 0, sub { |
7 | { |
|
|
8 | my ($who, $msg) = @_; |
7 | my ($who, $msg) = @_; |
9 | |
8 | |
10 | if ($msg) { |
9 | if ($msg) { |
11 | my $name = $who->name; |
10 | my $name = $who->name; |
12 | |
11 | |
… | |
… | |
16 | } else { |
15 | } else { |
17 | $who->message ("Chat what?", cf::NDI_UNIQUE); |
16 | $who->message ("Chat what?", cf::NDI_UNIQUE); |
18 | } |
17 | } |
19 | }; |
18 | }; |
20 | |
19 | |
21 | cf::register_command shout => 0, sub |
20 | cf::register_command shout => 0, sub { |
22 | { |
|
|
23 | my ($who, $msg) = @_; |
21 | my ($who, $msg) = @_; |
24 | |
22 | |
25 | if ($msg) { |
23 | if ($msg) { |
26 | my $name = $who->name; |
24 | my $name = $who->name; |
27 | |
25 | |