… | |
… | |
243 | }; |
243 | }; |
244 | |
244 | |
245 | cf::register_command afk => sub { |
245 | cf::register_command afk => sub { |
246 | my ($ob, $arg) = @_; |
246 | my ($ob, $arg) = @_; |
247 | |
247 | |
248 | $ob->contr->ns->afk ($ob->contr->ns->afk ? 0 : 1); |
248 | $ob->contr->ns->afk (!(length $arg ? !$arg : $ob->contr->ns->afk)); |
249 | $ob->reply (undef, $ob->contr->ns->afk ? "You are now AFK" : "You are no longer AFK"); |
249 | $ob->reply (undef, $ob->contr->ns->afk ? "You are now AFK." : "You are no longer AFK."); |
|
|
250 | }; |
|
|
251 | |
|
|
252 | cf::register_command bumpmsg => sub { |
|
|
253 | my ($ob, $arg) = @_; |
|
|
254 | |
|
|
255 | $ob->contr->ns->bumpmsg (!(length $arg ? !$arg : $ob->contr->ns->bumpmsg)); |
|
|
256 | $ob->reply (undef, $ob->contr->ns->bumpmsg ? "Bumping into walls sounds more painful now." : "Bumping into walls will now be silent."); |
|
|
257 | }; |
|
|
258 | |
|
|
259 | cf::register_command brace => sub { |
|
|
260 | my ($ob, $arg) = @_; |
|
|
261 | |
|
|
262 | $ob->contr->braced (!(length $arg ? !$arg : $ob->contr->ns->braced)); |
|
|
263 | $ob->reply (undef, $ob->contr->braced ? "You are braced." : "Not braced."); |
250 | }; |
264 | }; |
251 | |
265 | |
252 | cf::register_command sound => sub { |
266 | cf::register_command sound => sub { |
253 | my ($ob, $arg) = @_; |
267 | my ($ob, $arg) = @_; |
254 | |
268 | |
255 | $ob->contr->ns->sound ($ob->contr->ns->sound ? 0 : 1); |
269 | $ob->contr->ns->sound (!(length $arg ? !$arg : $ob->contr->ns->sound)); |
256 | $ob->reply (undef, $ob->contr->ns->sound ? "The sounds are enabled." : "Silence is golden..."); |
270 | $ob->reply (undef, $ob->contr->ns->sound ? "The sounds are enabled." : "Silence is golden..."); |
257 | }; |
|
|
258 | |
|
|
259 | cf::register_command brace => sub { |
|
|
260 | my ($ob, $arg) = @_; |
|
|
261 | |
|
|
262 | $ob->contr->braced ($ob->contr->braced ? 0 : 1); |
|
|
263 | $ob->reply (undef, $ob->contr->braced ? "You are braced." : "Not braced."); |
|
|
264 | }; |
271 | }; |
265 | |
272 | |
266 | cf::register_command 'output-rate' => sub { |
273 | cf::register_command 'output-rate' => sub { |
267 | my ($ob, $arg) = @_; |
274 | my ($ob, $arg) = @_; |
268 | |
275 | |