From d620d0e92401406431938771c6a76fdf50587128 Mon Sep 17 00:00:00 2001 From: timriker Date: Tue, 23 Nov 2004 22:41:20 +0000 Subject: [PATCH] adduser/deluser git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@1084 c11ca15a-4712-0410-83d8-924469b57eb5 --- files/blootbot.help | 9 +++++++++ src/Modules/UserDCC.pl | 10 +++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/files/blootbot.help b/files/blootbot.help index 796d513..218eb1a 100644 --- a/files/blootbot.help +++ b/files/blootbot.help @@ -49,6 +49,11 @@ redirection: If a factoid x contains simply " see y", then when asked for reply: There is a special tag, , that is used to override the usual response. Usually, a response is "X is Y", but it can be made "Y" by making the entry "X is Y". # now the commands... + +adduser: D: Administrative command to add new user to the .users file +adduser: U: ## +adduser: E: ## bloot bloot!bloot@example.com + addressing: It is a good idea if I stay in REQUIRE mode so that I won't yell out random crap if I listen in too hard. Currently there is no way to turn this off on-the-fly. (REQUIRE mode requires me to be addressed by name if I am to respond) babelfish: D: Frontend to babelfish translating service provided by http://babelfish.altavista.com/ Note that utf8 is used for non-ascii characters. @@ -141,6 +146,10 @@ dauthor: E: ## Wichert potato dbugs: D: Show the current count of release critical bugs (latest versions) dbugs: U: ## +deluser: D: Administrative command to remove a user from the .users file +deluser: U: ## +deluser: E: ## bloot + ddesc: D: Search the Description: lines in Debian packages ddesc: U: ## [dist] ddesc: E: ## mule diff --git a/src/Modules/UserDCC.pl b/src/Modules/UserDCC.pl index 86812df..3e108f0 100644 --- a/src/Modules/UserDCC.pl +++ b/src/Modules/UserDCC.pl @@ -1301,25 +1301,25 @@ sub userDCC { } # adduser/deluser. - if ($message =~ /^(\+|\-|add|del)user(\s+(.*))?$/i) { + if ($message =~ /^(add|del)user(\s+(.*))?$/i) { my $str = $1; my $strstr = $1."user"; my @args = split /\s+/, $3 || ''; my $args = $3; - my $state = ($str =~ /^(\+|add)$/) ? 1 : 0; + my $state = ($str =~ /^(add)$/) ? 1 : 0; if (!scalar @args) { &help($strstr); return; } - if ($str eq "+") { + if ($str eq 'add') { if (scalar @args != 2) { - &pSReply("+user requires hostmask argument."); + &pSReply('adduser requires hostmask argument.'); return; } } elsif (scalar @args != 1) { - &pSReply("too many arguments."); + &pSReply('too many arguments.'); return; } -- 2.39.5