]> git.donarmstrong.com Git - infobot.git/blobdiff - src/DynaConfig.pl
root[wW]arn -> RootWarn
[infobot.git] / src / DynaConfig.pl
index e5b6eb609117b3793716799647329959439cbe68..dc710d4babcea63cbeb698049d8b4a566992d961 100644 (file)
@@ -32,7 +32,7 @@ sub readUserFile {
        my $s2 = -s "$f~";
 
        if ($s2 > $s1*3) {
-           &DEBUG("rUF: backup file bigger than current file. FIXME");
+           &FIXME("rUF: backup file bigger than current file.");
        }
     }
 
@@ -239,7 +239,7 @@ sub readChanFile {
        my $s2 = -s "$f~";
 
        if ($s2 > $s1*3) {
-           &DEBUG("rCF: backup file bigger than current file. FIXME");
+           &FIXME("rCF: backup file bigger than current file.");
        }
     }
 
@@ -405,7 +405,8 @@ sub writeChanFile {
 ##### USER COMMANDS.
 #####
 
-# todo: support multiple flags.
+# TODO: support multiple flags.
+# TODO: return all flags for opers
 sub IsFlag {
     my $flags = shift;
     my ($ret, $f, $o) = "";
@@ -505,6 +506,7 @@ sub hasFlag {
     }
 }
 
+# expire is time in minutes
 sub ignoreAdd {
     my($mask,$chan,$expire,$comment) = @_;
 
@@ -524,7 +526,7 @@ sub ignoreAdd {
 
     $ignore{$chan}{$mask} = [$expire, time(), $who, $comment];
 
-    # todo: improve this.
+    # TODO: improve this.
     if ($expire == 0) {
        &status("ignore: Added $mask for $chan to NEVER expire, by $who, for $comment");
     } else {
@@ -699,7 +701,7 @@ sub chanSet {
            return;
        }
        $chanconf{$chan}{_time_added}   = time();
-       $chanconf{$chan}{autojoin}      = 1;
+       $chanconf{$chan}{autojoin}      = $conn->nick();
 
        &pSReply("Joining $chan...");
        &joinchan($chan);
@@ -804,17 +806,17 @@ sub rehashConfVars {
        &DEBUG("rehashConfVars: _ => $_");
 
        if (/^news$/ and $i) {
-           &loadMyModule("news");
+           &loadMyModule('News');
            delete $cache{confvars}{$_};
        }
 
        if (/^uptime$/ and $i) {
-           &loadMyModule("uptime");
+           &loadMyModule('uptime');
            delete $cache{confvars}{$_};
        }
 
        if (/^rootwarn$/i and $i) {
-           &loadMyModule($_);
+           &loadMyModule('RootWarn');
            delete $cache{confvars}{$_};
        }
     }
@@ -824,10 +826,9 @@ sub rehashConfVars {
     delete $cache{confvars};
 }
 
-# following arrays are not used... forgot what I intended to use them for.
+# registered flags... not used yet.
 my @regFlagsChan = (
        "autojoin",
-       "freshmeat",
        "limitcheckInterval",
        "limitcheckPlus",
        "allowConv",
@@ -836,23 +837,20 @@ my @regFlagsChan = (
 );
 
 my @regFlagsUser = (
-       "m",            # modify factoid.
-       "r",            # remove factoid.
-       "s",            # search (deprecated)
-       "t",            # teach/add factoid.
-       "a",            # ask/request factoid.
-       "n",            # bot owner
-       "o",            # master of bot (automatic +amrt)
-       "O",            # dynamic ops (as on channel). (automatic +o)
-);     # todo...
+       "m",    # modify factoid. (includes renaming)
+       "r",    # remove factoid.
+       "t",    # teach/add factoid.
+       "a",    # ask/request factoid.
+       "n",    # bot owner
+                       # can "reload"
+       "o",    # master of bot (automatic +amrt)
+                       # can search on factoid strings shorter than 2 chars
+                       # can tell bot to join new channels
+                       # can [un]lock factoids
+       "O",    # dynamic ops (as on channel). (automatic +o)
+       "A",    # bot administration over /msg
+                       # default is only via DCC CHAT
+       "T",    # add topics.
+);
 
 1;
-
-#####
-# Userflags
-#      +r      - ability to remove factoids
-#      +t      - ability to teach factoids
-#      +m      - ability to modify factoids
-#      +n      - bot owner
-#      +o      - authorised user of bot (like +m on eggdrop)
-#####