]> git.donarmstrong.com Git - infobot.git/commitdiff
- forgot these changes to allow for +O userfile support.
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Sat, 2 Nov 2002 15:59:07 +0000 (15:59 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Sat, 2 Nov 2002 15:59:07 +0000 (15:59 +0000)
  so... +O => +o == +mrt (modify,remove,teach)
  oh well.. it's there if anyone needs it. undocumented though.

git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@594 c11ca15a-4712-0410-83d8-924469b57eb5

src/Factoids/Core.pl
src/Factoids/Update.pl

index 41ed537399d9de603c3aabbf2b66a14621eec15c..9b36852eba1119ea17d7340e266b5a20dc4990f0 100644 (file)
@@ -166,7 +166,7 @@ sub FactoidStuff {
        my $isau        = (defined $author and &IsHostMatch($author) == 2) ? 1 : 0;
        my $isop        = (&IsFlag("o") eq "o") ? 1 : 0;
 
-       if (IsFlag("r") ne "r") {
+       if (IsFlag("r") ne "r" && !$isop) {
            &msg($who, "you don't have access to remove factoids");
            return;
        }
index 07b8ec6e1c9bbaa413f6dcb15af7e76833c09b2f..4e78a862c987095fb8dc4acace0dfaa6fd5186a1 100644 (file)
@@ -27,7 +27,7 @@ sub update {
     }
 
     # teaching.
-    if (&IsFlag("t") ne "t") {
+    if (&IsFlag("t") ne "t" && &IsFlag("o") ne "o") {
        &msg($who, "permission denied.");
        &status("alert: $who wanted to teach me.");
        return 1;
@@ -213,7 +213,9 @@ sub update {
 
        my $author = &getFactInfo($lhs, "created_by") || "";
 
-       if (IsFlag("m") ne "m" and $author !~ /^\Q$who\E\!/i) {
+       if (IsFlag("m") ne "m" && IsFlag("o") ne "o" &&
+           $author !~ /^\Q$who\E\!/i
+       ) {
            &msg($who, "you can't change that factoid.");
            return 1;
        }