]> git.donarmstrong.com Git - infobot.git/commitdiff
CMD: is now cmd:, commands in sqlite will be broken!
authortimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Wed, 2 Mar 2005 06:00:16 +0000 (06:00 +0000)
committertimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Wed, 2 Mar 2005 06:00:16 +0000 (06:00 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@1208 c11ca15a-4712-0410-83d8-924469b57eb5

blootbot/ChangeLog
blootbot/src/CommandStubs.pl
blootbot/src/Factoids/Core.pl
blootbot/src/Factoids/Question.pl
blootbot/src/Factoids/Reply.pl
blootbot/src/Factoids/Statement.pl
blootbot/src/Factoids/Update.pl
blootbot/src/IRC/Schedulers.pl
blootbot/src/Modules/Factoids.pl
blootbot/src/Modules/Topic.pl

index ffe70a602c2832a549a5d978e2fccd4a8863be5a..baed181fe42dc80b63c134ec17a7e6d1706c1415 100644 (file)
@@ -1,3 +1,8 @@
+
+2005-02-18 00:00  timriker
+
+       * CMD: is now cmd:
+
 2005-02-18 00:00  timriker
 
        * src/Factoids/Question.pl: minVolunteerLength now per channel
index 63879713f9ce91abce5d7f5b7af73ba4a3ae7148..1beb9e0a6e899ac97fe7ac3eb5e67d0801ee1839 100644 (file)
@@ -904,6 +904,6 @@ sub nullski {
 ### END OF ADDING HOOKS.
 ###
 
-&status('CMD: loaded '.scalar(keys %cmdhooks).' command hooks.');
+&status('loaded '.scalar(keys %cmdhooks).' command hooks.');
 
 1;
index 684922d0759bcc804a7be7406d12de4c0e4798dc..c3fb474c32c5bedb0c053af1060a342cbca7501d 100644 (file)
@@ -146,7 +146,6 @@ sub FactoidStuff {
        }
 
        $faqtoid =~ tr/A-Z/a-z/;
-       $faqtoid =~ s/^cmd:/CMD:/; # basic command forgetting
        my $result = &getFactoid($faqtoid);
 
        # if it doesn't exist, well... it doesn't!
@@ -306,7 +305,6 @@ sub FactoidStuff {
        }
 
        $faqtoid =~ tr/A-Z/a-z/;
-       $faqtoid =~ s/^cmd:/CMD:/; # basic command undeleteing
        my $result = &getFactoid($faqtoid." #DEL#");
        my $check  = &getFactoid($faqtoid);
 
index b9dfd80cc9ee65fd028706b6ebda97dfa647d34f..0b7ae04c658755ccb7cce13c0d30136bff23d941 100644 (file)
@@ -188,7 +188,7 @@ sub factoidArgs {
     # TODO: cache this, update cache when altered. !!! !!! !!!
 #    my $t = &timeget();
     my ($first) = split(/\s+/, $str);
-    my @list = &searchTable("factoids", "factoid_key", "factoid_key", "^CMD: $first ");
+    my @list = &searchTable("factoids", "factoid_key", "factoid_key", "^cmd: $first ");
 #    my $delta_time = &timedelta($t);
 #    &DEBUG("factArgs: delta_time = $delta_time s");
 #    &DEBUG("factArgs: list => ".scalar(@list) );
@@ -200,7 +200,7 @@ sub factoidArgs {
     foreach (sort { length($b) <=> length($a) } @list) {
        next if (/#DEL#/);      # deleted.
 
-       s/^CMD: //i;
+       s/^cmd: //i;
 #      &DEBUG("factarg: '$str' =~ /^$_\$/");
        my $arg = $_;
 
@@ -230,7 +230,7 @@ sub factoidArgs {
        &status("Question: factoid Arguments for '$str'");
        # TODO: use getReply() - need to modify it :(
        my $i   = 0;
-       my $q   = "CMD: $_";
+       my $q   = "cmd: $_";
        my $r   = &getFactoid($q);
        if (!defined $r) {
            &DEBUG("question: !result... should this happen?");
index b06347dc0e5c436ae10ac2ec4c027c239e76de69..8c72ac1ba62b145a33f6a1d161d5f8d536d8582a 100644 (file)
@@ -27,7 +27,6 @@ sub getReply {
     }
 
     $message =~ tr/A-Z/a-z/;
-    $message =~ s/^cmd:/CMD:/;
 
     @searches = split(/\s+/, &getChanConfDefault('factoidSearch', '_default'));
 
@@ -150,7 +149,7 @@ sub getReply {
     ###
 
     # don't evaluate if it has factoid arguments.
-    if ($message =~ /^CMD:/i) {
+    if ($message =~ /^cmd:/i) {
        &status("Reply: not doing substVars (eval dollar vars)");
     } else {
        $reply = &substVars($reply,1);
index d2c29fe2b067f4f92c098f9501a7c454a58ee6a1..6617dd649a692d42d16c8ad4688e4f3f73f351d8 100644 (file)
@@ -56,7 +56,7 @@ sub doStatement {
        my($lhs, $mhs, $rhs) = ($`, $&, $');
 
        # allows factoid arguments to be updated. -lear.
-       $lhs =~ s/^(CMD: )?(.*)/$1||"" . lc $2/e;
+       $lhs =~ s/^(cmd: )?(.*)/$1||"" . lc $2/e;
 
        # discard article.
        $lhs =~ s/^(the|da|an?)\s+//i;
index 2a02b24d24e5f4b2c611f1d654fed974cfa19c6e..915eec1b45aefbe6ec8d822fc5bc48a12ce57f50 100644 (file)
@@ -61,7 +61,7 @@ sub update {
 
        my @list;
        my $count = 0;
-       $lhs =~ s/^/CMD: /;
+       $lhs =~ s/^/cmd: /;
        while ($lhs =~ s/\$(\S+)/(.*?)/) {
            push(@list, "\$$1");
            $count++;
index 04f90601e342bb229ee896f376f65f7f3c070d42..963cad63d59ac9159bd20918664c4d8cef9288ad 100644 (file)
@@ -165,7 +165,7 @@ sub randomFactoid {
            ($key,$val) = &randKey("factoids","factoid_key,factoid_value");
            &DEBUG("rF: $key, $val");
 ###        $val =~ tr/^[A-Z]/[a-z]/;   # blah is Good => blah is good.
-           last if ((defined $val) and ($val !~ /^</) and ($key !~ /\#DEL\#/) and ($key !~ /^CMD:/));
+           last if ((defined $val) and ($val !~ /^</) and ($key !~ /\#DEL\#/) and ($key !~ /^cmd:/));
 
            $error++;
            if ($error == 5) {
index 351ea2a37329496f9080ede32850e43c4fe50df2..bed96c57af512c59e411d2a3057ceef1c41edb56 100644 (file)
@@ -14,7 +14,6 @@ use vars qw(%param);
 # Usage: &CmdFactInfo($faqtoid, $query);
 sub CmdFactInfo {
     my ($faqtoid, $query) = (lc $_[0], $_[1]);
-    $faqtoid =~ s/^cmd:/CMD:/;
     my @array;
     my $string = "";
 
index 4e8f3d7c4f965a500a526e6425e97a67366c1a0e..2a07c2ee59b99cfb519d172be22850933a05b2cb 100644 (file)
@@ -552,7 +552,7 @@ sub Topic {
        &do_info($chan);
 
     } else {
-       ### CMD: HELP:
+       ### HELP:
        if ($cmd ne "" and $cmd !~ /^help/i) {
            &msg($who, "Invalid command [$cmd].");
            &msg($who, "Try 'help topic'.");