diff options
| author | 2007-06-28 21:53:01 +0000 | |
|---|---|---|
| committer | 2007-06-28 21:53:01 +0000 | |
| commit | 638d9eae9e63755e26f9843985597e6f1c7c5f8e (patch) | |
| tree | 5a47866dd4422b09af43e22cf156e3006d3a1f74 | |
| parent | 8731d29c1ff810c1bb467e678dfe7e75d8ec83c8 (diff) | |
added user management commands, which clears the TODO list, for now
| -rw-r--r-- | TODO | 2 | ||||
| -rw-r--r-- | config-default/commands.xml | 42 | ||||
| -rw-r--r-- | config-default/users.xml | 14 |
3 files changed, 50 insertions, 8 deletions
@@ -1 +1 @@ -- add users / modify user flags +nothing, for now! :) diff --git a/config-default/commands.xml b/config-default/commands.xml index f3a5f17..b86783e 100644 --- a/config-default/commands.xml +++ b/config-default/commands.xml @@ -7,6 +7,48 @@ $conn->privmsg($event->{to}->[0], "$result results found."); ]]> </command> + <command cmd="^;user add (\S+) ?(\S*)$" flag="d"> + <![CDATA[ + my $nick = lc $1; + my $host = $2; + if ($host eq '') { $host = 'IDENTIFY'; } + $::xusers->{$nick} = { 'host' => $host }; + $::users->{person} = $::xusers; + writeUsers(); + $conn->privmsg($event->{to}->[0], "Hiya $nick"); + ]]> + </command> + <command cmd="^;user flags set (\S+) ?(\S*)$" flag="d"> + <![CDATA[ + my $nick = lc $1; + my $flags = $2; + if ($flags eq '') { delete($::xusers->{$nick}->{flags}); } else { + $::xusers->{$nick}->{flags} = $flags; + } + $::users->{person} = $::xusers; + writeUsers(); + $conn->privmsg($event->{to}->[0], "Flags for $nick set to $flags"); + ]]> + </command> + <command cmd="^;user del (\S+)$" flag="d"> + <![CDATA[ + my $nick = lc $1; + delete($::xusers->{$nick}); + $::users->{person} = $::xusers; + writeUsers(); + $conn->privmsg($event->{to}->[0], "Byebye $nick"); + ]]> + </command> + <command cmd="^;user flags show (\S+)$" flag="d"> + <![CDATA[ + my $nick = lc $1; + if (defined($::xusers->{$nick}->{flags})) { + $conn->privmsg($event->{to}->[0], "Flags for $nick: $::xusers->{$nick}->{flags}"); + } else { + $conn->privmsg($event->{to}->[0], "$nick has no flags"); + } + ]]> + </command> <command cmd="^;autoban (\S+)$" flag="a"> <