]> ruin.nu Git - NDIRC.git/blobdiff - Commands/Def.pm
Introduce a uid member for the context and use it intead of the host in commands
[NDIRC.git] / Commands / Def.pm
index b115dd44be93aefc3cdcdc315e34fa02a88302fb..7c57099bdd8fd506208f96ad68b30dc9aa8b87ef 100644 (file)
@@ -75,9 +75,9 @@ ORDER BY c.landing_tick;
                        return;
                }
        }
-       $c->message(notice => $ND::memchan, "DEFENSE REQUIRED!! WAKE UP!!");
-       $c->message(privmsg => $ND::memchan, "DEFENSE REQUIRED $mess $callinfo MSG "
-               .$c->nick." TO RESPOND");
+       $c->message(notice => $c->disp->targets->{members}, "DEFENSE REQUIRED!! WAKE UP!!");
+       $c->message(privmsg => $c->disp->targets->{members}, "DEFENSE REQUIRED "
+               ."$mess $callinfo MSG ".$c->nick." TO RESPOND");
 }
 
 sub settype
@@ -172,10 +172,10 @@ sub calltake
 
        $dbh->begin_work;
        my $rows = $dbh->do(q{
-UPDATE calls SET dc = (SELECT uid FROM users WHERE hostmask ILIKE $1)
+UPDATE calls SET dc = $1
        ,status = $3
 WHERE call = $2
-               },undef,$c->host,$id,$status);
+               },undef,$c->uid,$id,$status);
        if ($rows == 1){
                $c->reply("Setting status on call $id to $status");
                $c->def_log($id , "Changed status: [B]$status [/B]");