From c35c69fa2e9479628f528c2b45f8f8f2a53aa635 Mon Sep 17 00:00:00 2001 From: dms Date: Sun, 19 Nov 2000 14:54:08 +0000 Subject: [PATCH] Fixed up tell to allow target == 'us'. git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@160 c11ca15a-4712-0410-83d8-924469b57eb5 --- src/UserExtra.pl | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/src/UserExtra.pl b/src/UserExtra.pl index 9e014f6..0e43a3b 100644 --- a/src/UserExtra.pl +++ b/src/UserExtra.pl @@ -550,7 +550,6 @@ sub userCommands { $tell_obj = $4; $query = $tell_obj; - $target = "" if ($target =~ /^us$/i); } elsif ($args =~ /^(\S+) (what|where) (.*?) (is|are)[.?!]*$/i) { $target = lc $1; $qWord = $2; @@ -558,32 +557,25 @@ sub userCommands { $verb = $4; $query = "$qWord $verb $tell_obj"; - $target = "" if ($target =~ /^us$/i); } elsif ($args =~ /^(.*?) to (\S+)$/i) { $target = lc $3; $tell_obj = $2; $query = $tell_obj; - $target = "" if ($target =~ /^us$/i); } - ### FIX IT UP. - # required for privmsg if excessive size.(??) - if ($target =~ /^us$/i) { - $target = $talkchannel; - } elsif ($target =~ /^(me|myself)$/i) { - $target = $who; - } - - &status("target: $target query: $query"); - # check target type. Deny channel targets. if ($target !~ /^$mask{nick}$/ or $target =~ /^$mask{chan}$/) { &msg($who,"No, $who, I won't. (target invalid?)"); return $noreply; } + $target = $talkchannel if ($target =~ /^us$/i); + $target = $who if ($target =~ /^(me|myself)$/i); + + &status("target: $target query: $query"); + # "intrusive". - if (!&IsNickInAnyChan($target)) { + if ($target !~ /^$mask{chan}$/ and !&IsNickInAnyChan($target)) { &msg($who, "No, $target is not in any of my chans."); return $noreply; } -- 2.39.2