From: dms Date: Sun, 3 Nov 2002 14:48:12 +0000 (+0000) Subject: - it would help if I had checked before committing to cvs. X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=d9f3b8d511846260afd826fb6e97ec466f12cbc2;p=infobot.git - it would help if I had checked before committing to cvs. moved regex to proper location... before it would give anyone +o for free. last of my changes for +a/+O support. git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@599 c11ca15a-4712-0410-83d8-924469b57eb5 --- diff --git a/src/IRC/IrcHelpers.pl b/src/IRC/IrcHelpers.pl index 68ea164..893011f 100644 --- a/src/IRC/IrcHelpers.pl +++ b/src/IRC/IrcHelpers.pl @@ -266,6 +266,13 @@ sub hookMsg { # &DEBUG("IrcHooks: process returned '$_'."); } + # hack to remove +o from ppl with +O flag. + if (exists $users{$userHandle} && exists $users{$userHandle}{FLAGS} && + $users{$userHandle}{FLAGS} =~ /O/ + ) { + $users{$userHandle}{FLAGS} =~ s/o//g; + } + return; } diff --git a/src/Process.pl b/src/Process.pl index d4473b4..5a166e1 100644 --- a/src/Process.pl +++ b/src/Process.pl @@ -27,7 +27,6 @@ sub process { # is $who arg lowercase? if (exists $channels{$chan}{o}{ $orig{who} } && &IsFlag("O") eq "O") { &status("Gave $who/$chan +o (+O)\'ness"); - $users{$userHandle}{FLAGS} =~ s/o//g; $users{$userHandle}{FLAGS} .= "o"; }