]> ruin.nu Git - NDIRC.git/commitdiff
laston updated
authorMichael Andreen <harv@ruin.nu>
Fri, 7 Sep 2007 10:30:13 +0000 (12:30 +0200)
committerMichael Andreen <harv@ruin.nu>
Fri, 7 Sep 2007 10:30:13 +0000 (12:30 +0200)
Usermgm.pm

index e24ee550f195e1460b4ffd676856cccc57b507ae..a537f770ed8f93bc0166a5ce4c850a5fe968d0e8 100644 (file)
@@ -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