1 | #! perl |
1 | #! perl |
2 | |
2 | |
3 | # wizard commands |
3 | # wizard commands |
|
|
4 | |
|
|
5 | cf::register_command shutdown => sub { |
|
|
6 | my ($ob, $arg) = @_; |
|
|
7 | return $ob->reply (undef, "Sorry, you can't shutdown the server.") |
|
|
8 | unless $ob->flag (cf::FLAG_WIZ); |
|
|
9 | |
|
|
10 | my $name = $ob->name; |
|
|
11 | cf::cleanup ("dm '$name' initiated shutdown" . ($arg ? " with reason: $arg" : "."), 0); |
|
|
12 | |
|
|
13 | 1 |
|
|
14 | }; |
4 | |
15 | |
5 | cf::register_command kick => sub { |
16 | cf::register_command kick => sub { |
6 | my ($ob, $arg) = @_; |
17 | my ($ob, $arg) = @_; |
7 | return unless $ob->flag (cf::FLAG_WIZ); |
18 | return unless $ob->flag (cf::FLAG_WIZ); |
8 | |
19 | |