]> git.donarmstrong.com Git - infobot.git/commitdiff
adduser/deluser
authortimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Tue, 23 Nov 2004 22:41:20 +0000 (22:41 +0000)
committertimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Tue, 23 Nov 2004 22:41:20 +0000 (22:41 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@1084 c11ca15a-4712-0410-83d8-924469b57eb5

files/blootbot.help
src/Modules/UserDCC.pl

index 796d513683d39dee3c12c42264a3df91d6ae8a4f..218eb1aaeca63b8a31d78fe1866683fd5ded982a 100644 (file)
@@ -49,6 +49,11 @@ redirection: If a factoid x contains simply "<reply> see y", then when asked for
 reply: There is a special tag, <reply>, 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 <reply> Y".
 
 # now the commands...
+
+adduser: D: Administrative command to add new user to the .users file
+adduser: U: ## <user> <mask>
+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: ## <user>
+deluser: E: ## bloot
+
 ddesc: D: Search the Description: lines in Debian packages
 ddesc: U: ## <string> [dist]
 ddesc: E: ## mule
index 86812df4c14b921e50cca5218ec8497e67a99d07..3e108f0c0b9827ed87e75c7b9a73e7966dfe2929 100644 (file)
@@ -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;
        }