summaryrefslogtreecommitdiffstats
path: root/config-default/commands.xml
diff options
context:
space:
mode:
authorLibravatarJanik Kleinhoff <janik@kleinhoff.de>2015-03-01 07:30:30 +0400
committerLibravatarJanik Kleinhoff <janik@kleinhoff.de>2015-03-01 07:30:30 +0400
commit84f907f09f45aad05b7c4739e8ceb31b700b2fdb (patch)
treee5d04ceeb5e67172f73824b76f34e8d2e8f3457f /config-default/commands.xml
parent5a5fd4335e46f3b8f77942efa985972ae6403500 (diff)
commands.xml: add a ;silence command (like ;monitor) for the silence flag
Diffstat (limited to 'config-default/commands.xml')
-rw-r--r--config-default/commands.xml14
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$">
<![CDATA[
$conn->privmsg($event->replyto, "Please refer to http://antispammeta.net and irc.freenode.net #antispammeta");