]> git.donarmstrong.com Git - infobot.git/blobdiff - src/Factoids/Update.pl
- forgot these changes to allow for +O userfile support.
[infobot.git] / src / Factoids / Update.pl
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;
        }