summaryrefslogtreecommitdiffstats
path: root/config-default
diff options
context:
space:
mode:
authorLibravatarWilliam Heimbigner <william.heimbigner@gmail.com>2012-01-29 07:50:57 +0000
committerLibravatarWilliam Heimbigner <william.heimbigner@gmail.com>2012-01-29 07:50:57 +0000
commitc6d38c7575a09c2b8344857e01a728298148628b (patch)
tree4f56c3e0e8abc71f2de4e0f59ceb37a32a6a1c2b /config-default
parent471fd83c6e20c9977f5d2271b5c5ce54389dd045 (diff)
State tracking of user accounts, use freenode's CAP features to avoid whois'ing users and improve access control for bot's commands, remove some dead code
Diffstat (limited to 'config-default')
-rw-r--r--config-default/commands.xml45
-rw-r--r--config-default/users.xml59
2 files changed, 46 insertions, 58 deletions
diff --git a/config-default/commands.xml b/config-default/commands.xml
index 098c104..7b8ecab 100644
--- a/config-default/commands.xml
+++ b/config-default/commands.xml
@@ -46,17 +46,25 @@
$conn->privmsg($event->{to}->[0], "$result results found.");
]]>
</command>
- <command cmd="^;user add (\S+) ?(\S*)$" flag="a">
+ <command cmd="^;userx add (\S+) (\S+)$" flag="a">
<![CDATA[
- my $nick = lc $1;
- my $host = $2;
- if ($host eq '') { $host = 'IDENTIFY'; }
- $::users->{person}->{$nick} = { 'host' => $host };
+ my $acct = lc $1;
+ my $flags = $2;
+ if ($flags =~ /d/) {
+ $conn->privmsg($event->{to}->[0], "The d flag may not be assigned over IRC. Edit the configuration manually.");
+ return;
+ }
+ $::users->{person}->{$acct} = { 'flags' => $flags };
ASM::XML->writeUsers();
- $conn->privmsg($event->{to}->[0], "Hiya $nick");
+ $conn->privmsg($event->{to}->[0], "Flags for NickServ account $acct set to $flags");
+ ]]>
+ </command>
+ <command cmd="^;user add (\S+) ?(\S*)$" flag="a">
+ <![CDATA[
+ $conn->privmsg($event->{to}->[0], "This command has been deprecated");
]]>
</command>
- <command cmd="^;user flags (\S+) ?$">
+ <command cmd="^;userx? flags (\S+) ?$">
<![CDATA[
my $nick = lc $1;
if (defined($::users->{person}->{$nick}->{flags})) {
@@ -66,7 +74,7 @@
}
]]>
</command>
- <command cmd="^;user flags (\S+) (\S+)$" flag="a">
+ <command cmd="^;userx? flags (\S+) (\S+)$" flag="a">
<![CDATA[
my $nick = lc $1;
my $flags = $2;
@@ -79,7 +87,7 @@
$conn->privmsg($event->{to}->[0], "Flags for $nick set to $flags");
]]>
</command>
- <command cmd="^;user del (\S+)$" flag="a">
+ <command cmd="^;userx? del (\S+)$" flag="a">
<![CDATA[
my $nick = lc $1;
delete($::users->{person}->{$nick});
@@ -87,25 +95,6 @@
$conn->privmsg($event->{to}->[0], "Byebye $nick");
]]>
</command>
-<!-- <command cmd="^;user flags show (\S+)$" flag="a">
- <![CDATA[
- my $nick = lc $1;
- if (defined($::users->{person}->{$nick}->{flags})) {
- $conn->privmsg($event->{to}->[0], "Flags for $nick: $::users->{person}->{$nick}->{flags}");
- } else {
- $conn->privmsg($event->{to}->[0], "$nick has no flags");
- }
- ]]>
- </command> -->
- <command cmd="^;autoban (\S+)$" flag="a">
- <![CDATA[
- my $chan = $1;
- my $set = $::channels->{channel}->{$chan}->{op};
- if ($set eq "no") { $set = "when"; } else { $set = "no"; }
- $::channels->{channel}->{$chan}->{op} = $set;
- $conn->privmsg($event->{to}->[0], "Operator action for $chan set to \"$set\".");
- ]]>
- </command>
<command cmd="^;target (\S+) (\S+) ?(\S*)$" flag="a">
<![CDATA[
my $chan = $1;
diff --git a/config-default/users.xml b/config-default/users.xml
index f86542d..b4e455b 100644
--- a/config-default/users.xml
+++ b/config-default/users.xml
@@ -1,32 +1,31 @@
<people>
- <person id="afterdeath" flags="hodat" host="freenode/weird-exception/network-troll/afterdeath" />
- <person id="afterdeath_" flags="hodat" host="freenode/weird-exception/network-troll/afterdeath" />
- <person id="dave2" flags="oath" host="freenode/staff/dave2" />
- <person id="denny" flags="ha" host="freenode/staff/denny" />
- <person id="dlange" flags="oath" host="about/linux/staff/dlange" />
- <person id="dmcdevit" flags="oath" host="IDENTIFY" />
- <person id="dungodung" flags="oath" host="wikimedia/dungodung" />
- <person id="errantego" flags="doath" host="freenode/jester/errantego" />
- <person id="gary" flags="oath" host="freenode/staff/colchester-lug.gary" />
- <person id="jonathand" flags="oath" host="freenode/staff/jonathand" />
- <person id="kibble" flags="oath" host="wikimedia/Cbrown1023" />
- <person id="m0trn_th1" flags="th" host="pdpc/supporter/professional/th1" />
- <person id="marienz" flags="oath" host="freenode/staff/marienz" />
- <person id="martinp23" flags="oath" host="freenode/staff/wikimedia.martinp23" />
- <person id="mquin" flags="hota" host="freenode/staff/mquin" />
- <person id="nhandler" flags="oath" host="freenode/staff/ubuntu.member.nhandler" />
- <person id="njan" flags="oath" host="freenode/staff/njan" />
- <person id="petersymonds" flags="oath" host="wikimedia/petersymonds" />
- <person id="pricechild" flags="oath" host="freenode/staff/ubuntu.member.pricechild" />
- <person id="richih" flags="oath" host="freenode/staff/richih" />
- <person id="sauvin" flags="oath" host="about/linux/staff/sauvin" />
- <person id="seanw" flags="oath" host="freenode/staff-emeritus/wikimedia.sean-whitton" />
- <person id="snowolf" flags="oath" host="wikimedia/Snowolf" />
- <person id="thehelpfulone" flags="oath" host="wikimedia/Thehelpfulone" />
- <person id="tomaw" flags="oathd" host="freenode/staff/tomaw" />
- <person id="troubled" flags="oath" host="unaffiliated/troubled" />
- <person id="werdan7" flags="oath" host="freenode/staff/wikimedia.werdan7" />
- <person id="wildpikachu" flags="oath" host="about/linux/staff/wildpikachu" />
- <person id="windowshasyou" flags="o" host="about/linux/staff/windowshasyou" />
- <person id="zymurgy" flags="o" host="about/linux/staff/sauvin" />
+ <person id="afterdeath" flags="hodat" />
+ <person id="cbrown1023" flags="oath" />
+ <person id="charitwo" flags="oath" />
+ <person id="dave2" flags="oath" />
+ <person id="denny" flags="ha" />
+ <person id="dlange" flags="oathd" />
+ <person id="dmcdevit" flags="oath" />
+ <person id="dungodung" flags="oath" />
+ <person id="errantego" flags="doath" />
+ <person id="gary" flags="oath" />
+ <person id="jonathand" flags="oath" />
+ <person id="marienz" flags="oath" />
+ <person id="martinp23" flags="oath" />
+ <person id="mquin" flags="hota" />
+ <person id="nhandler" flags="oath" />
+ <person id="njan" flags="oath" />
+ <person id="petersymonds" flags="oath" />
+ <person id="pricechild" flags="oath" />
+ <person id="richih" flags="oath" />
+ <person id="sauvin" flags="oath" />
+ <person id="seanw" flags="oath" />
+ <person id="snowolf" flags="oath" />
+ <person id="th1" flags="th" />
+ <person id="thehelpfulone" flags="oath" />
+ <person id="tomaw" flags="oathd" />
+ <person id="troubled" flags="oath" />
+ <person id="werdan7" flags="oath" />
+ <person id="wildpikachu" flags="oath" />
+ <person id="windowshasyou" flags="oath" />
</people>