From c6d38c7575a09c2b8344857e01a728298148628b Mon Sep 17 00:00:00 2001 From: William Heimbigner Date: Sun, 29 Jan 2012 07:50:57 +0000 Subject: 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 --- config-default/commands.xml | 45 +++++++++++++--------------------- config-default/users.xml | 59 ++++++++++++++++++++++----------------------- 2 files changed, 46 insertions(+), 58 deletions(-) (limited to 'config-default') 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."); ]]> - + {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"); + ]]> + + + privmsg($event->{to}->[0], "This command has been deprecated"); ]]> - + {person}->{$nick}->{flags})) { @@ -66,7 +74,7 @@ } ]]> - + privmsg($event->{to}->[0], "Flags for $nick set to $flags"); ]]> - + {person}->{$nick}); @@ -87,25 +95,6 @@ $conn->privmsg($event->{to}->[0], "Byebye $nick"); ]]> - - - {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\"."); - ]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3