]> 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 d7862a364fdbe6d1ddda62cfeda6a0f34e4e6096..7c57099bdd8fd506208f96ad68b30dc9aa8b87ef 100644 (file)
@@ -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]");