]> git.donarmstrong.com Git - infobot.git/commitdiff
Fixed up tell to allow target == 'us'.
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Sun, 19 Nov 2000 14:54:08 +0000 (14:54 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Sun, 19 Nov 2000 14:54:08 +0000 (14:54 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@160 c11ca15a-4712-0410-83d8-924469b57eb5

src/UserExtra.pl

index 9e014f625f6b5b49f67908aa53d58d4a186035c3..0e43a3b81bcaa62e0f8371cce6e7387cf34a49ad 100644 (file)
@@ -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;
        }