X-Git-Url: https://ruin.nu/git/?p=NDIRC.git;a=blobdiff_plain;f=Commands%2FMembers.pm;h=44cfe79d68ac3c62863fb2ec0d2c8f7d017af08f;hp=34ef7d605028efa790c8935fdf336a976019b3dc;hb=0d6e6e233601ba9b1dd9fe874e804424a10fa09c;hpb=cd394b6907c15c9a6a9161022a9e58f403f9618a
diff --git a/Commands/Members.pm b/Commands/Members.pm
index 34ef7d6..44cfe79 100644
--- a/Commands/Members.pm
+++ b/Commands/Members.pm
@@ -107,10 +107,13 @@ sub sms
my ($self,$c,$msg) = @_;
my ($nick) = $msg =~ /(\S+)/ or die 'ARGS';
my $f = $c->model->prepare(q{
-SELECT username,COALESCE(sms,'nothing added') FROM users WHERE username ILIKE ?
+SELECT username,COALESCE(sms,'nothing added'), call_if_needed, timezone, sms_note
+ ,to_char(NOW() AT TIME ZONE timezone,'HH24:MI') AS time
+FROM users WHERE username ILIKE ?
});
- if (my ($username,$sms) = $c->model->selectrow_array($f,undef,$nick)){
- $c->reply("$username has sms $sms");
+ if (my ($username,$sms, $call, $timezone, $note, $time) = $c->model->selectrow_array($f,undef,$nick)){
+ $call = $call ? 'Wake up if needed' : 'Do not wake up';
+ $c->reply("$username has sms $sms, $call, $time ($timezone), $note ");
}else{
$c->reply("No hit, maybe spelling mistake, or add % as wildcard");
}