diff options
| author | 2015-03-01 07:30:30 +0400 | |
|---|---|---|
| committer | 2015-03-01 07:30:30 +0400 | |
| commit | 84f907f09f45aad05b7c4739e8ceb31b700b2fdb (patch) | |
| tree | e5d04ceeb5e67172f73824b76f34e8d2e8f3457f /config-default | |
| parent | 5a5fd4335e46f3b8f77942efa985972ae6403500 (diff) | |
commands.xml: add a ;silence command (like ;monitor) for the silence flag
Diffstat (limited to 'config-default')
| -rw-r--r-- | config-default/commands.xml | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/config-default/commands.xml b/config-default/commands.xml index 6828438..8f6cb41 100644 --- a/config-default/commands.xml +++ b/config-default/commands.xml @@ -149,6 +149,20 @@ } ]]> </command> + <command cmd="^;silence (\S+) ?(yes|no)?$" flag="a"> + <![CDATA[ + my $chan = lc $1; + if (defined($2)) { + my $switch = lc $2; + $::channels->{channel}->{$chan}->{silence} = $switch; + ASM::XML->writeChannels(); + $conn->privmsg($event->replyto, "Silence flag for $chan set to $switch"); + } else { + my $switch = $::channels->{channel}->{$chan}->{silence}; + $conn->privmsg($event->replyto, "Silence flag for $chan is currently set to $switch"); + } + ]]> + </command> <command cmd="^;help$"> <