summaryrefslogtreecommitdiffstats
path: root/config-default/commands.xml
diff options
context:
space:
mode:
authorLibravatarWilliam Heimbigner <william.heimbigner@gmail.com>2007-06-26 09:17:21 +0000
committerLibravatarWilliam Heimbigner <william.heimbigner@gmail.com>2007-06-26 09:17:21 +0000
commit14bd999ada56e20ffc355ef32d7a8a0bbf9d1032 (patch)
tree05e8351b5dca645e6fd6eaf86db5813227af4083 /config-default/commands.xml
parent7e08e2e87e3de903b8810a0bd357a45a65cc3b49 (diff)
new commands, users, hilights, rules, bugfixes, and all sorts of other good stuff
Diffstat (limited to 'config-default/commands.xml')
-rw-r--r--config-default/commands.xml39
1 files changed, 34 insertions, 5 deletions
diff --git a/config-default/commands.xml b/config-default/commands.xml
index 4d543c9..77ee1c7 100644
--- a/config-default/commands.xml
+++ b/config-default/commands.xml
@@ -1,4 +1,38 @@
<commands>
+ <command cmd="^;query (\S+) (\S+)$">
+ <![CDATA[
+ my $channel = $1;
+ my @nuh = split(/(\!|\@)/, $2);
+ my $result = sql_query($channel, $nuh[0], $nuh[2], $nuh[4]);
+ $conn->privmsg($event->{to}->[0], "$result results found.");
+ ]]>
+ </command>
+ <command cmd="^;hilight (\S+) (\S+) ?(\S*)$" flag="a">
+ <![CDATA[
+ my $chan = $1;
+ my $nick = $2;
+ my $level= $3;
+ if ($level eq '') { $level = 'low'; }
+ my @tmphl = @{$::channels->{channel}->{$chan}->{hilights}->{$level}};
+ push(@tmphl, $nick);
+ $::channels->{channel}->{$chan}->{hilights}->{$level} = \@tmphl;
+ writeChannels();
+ $conn->privmsg($event->{to}->[0], "$nick added to $level risk hilights for $chan");
+ ]]>
+ </command>
+ <command cmd="^;dehilight (\S+) (\S+)" flag="a">
+ <![CDATA[
+ my $chan = $1;
+ my $nick = $2;
+ foreach my $risk ( keys %::RISKS ) {
+ my @ppl = @{$::channels->{channel}->{$chan}->{hilights}->{$risk}};
+ @ppl = grep { lc $_ ne lc $nick } @ppl;
+ $::channels->{channel}->{$chan}->{hilights}->{$level} = \@ppl;
+ }
+ writeUsers();
+ $conn->privmsg($event->{to}->[0], "kthxbai $nick");
+ ]]>
+ </command>
<command cmd="^;join (.*)" flag="a">
<![CDATA[
$conn->join($1);
@@ -59,9 +93,4 @@
chomp @eline;
]]>
</command>
- <command cmd="^;remove (.*)$" flag="o">
- <![CDATA[
- $conn->sl("remove $event->{to}->[0] $1");
- ]]>
- </command>
</commands>