X-Git-Url: https://ruin.nu/git/?p=NDIRC.git;a=blobdiff_plain;f=Commands%2FSMS.pm;h=eba2d650b72d79919f99a67cd83b1830a2d30e5d;hp=bc0200c08403007300dfccfcc4adb6cda19a59af;hb=a7e034b3599d41cdf5a158b14bd1715451f89a0c;hpb=87ddd7d37d6f5880757a71bfedd3459f4a511d2b diff --git a/Commands/SMS.pm b/Commands/SMS.pm index bc0200c..eba2d65 100644 --- a/Commands/SMS.pm +++ b/Commands/SMS.pm @@ -57,10 +57,10 @@ SELECT sms FROM users WHERE username ilike $1 } my $sms = $dbh->prepare(q{ INSERT INTO sms (uid,number,message) -VALUES((SELECT uid FROM users WHERE hostmask ilike $1),$2,$3) +VALUES($1,$2,$3) RETURNING id }); - $sms->execute($c->host,$number,$message); + $sms->execute($c->uid,$number,$message); my ($id) = $sms->fetchrow_array; $c->reply("Message added to queue, you can see the status with: .smsstatus $id"); }