From: Michael Andreen Date: Fri, 7 Sep 2007 10:30:13 +0000 (+0200) Subject: laston updated X-Git-Url: https://ruin.nu/git/?a=commitdiff_plain;h=34de29a22bce8fb212bac97ac8a8033abe2061c1;hp=f442c3c5bb7d67583c875ffbb5aeecc137d6928c;p=NDIRC.git laston updated --- diff --git a/Usermgm.pm b/Usermgm.pm index e24ee55..a537f77 100644 --- a/Usermgm.pm +++ b/Usermgm.pm @@ -113,7 +113,16 @@ WHERE flag = ?; } sub laston { - my ($flag,$min) = @_; + my ($msg, $command) = @_; + + my ($flag,$min); + if(defined $msg && $msg =~ /^(\w)(?: (\d+))?$/){ + $flag = $1; + $min = $2; + }else{ + $ND::server->command("notice $ND::nick syntax: .$command flag [days] | lists users and the number of days since they were last seen. If days is specified it will only list users with at least that amount of idle time."); + return; + } if (officer()){ my $f = $ND::DBH->prepare(qq{SELECT username,last