From: dms Date: Sat, 2 Nov 2002 15:59:07 +0000 (+0000) Subject: - forgot these changes to allow for +O userfile support. X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=29ab83eb07df08526145d47237eeba489415e082;p=infobot.git - forgot these changes to allow for +O userfile support. 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 --- diff --git a/src/Factoids/Core.pl b/src/Factoids/Core.pl index 41ed537..9b36852 100644 --- a/src/Factoids/Core.pl +++ b/src/Factoids/Core.pl @@ -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; } diff --git a/src/Factoids/Update.pl b/src/Factoids/Update.pl index 07b8ec6..4e78a86 100644 --- a/src/Factoids/Update.pl +++ b/src/Factoids/Update.pl @@ -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; }