X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=Commands%2FUsermgm.pm;fp=Commands%2FUsermgm.pm;h=247fb33a18f1ed865942b3eca44e4e49e4b81ff5;hb=66d9c4c699e149a366290b3891eea87650126b47;hp=deae5a2d93c0742f7b9dd7df19acbcb5b45ae79c;hpb=fd3b4651fa4a5957ff4abc2e75075497f58e857f;p=NDIRC.git diff --git a/Commands/Usermgm.pm b/Commands/Usermgm.pm index deae5a2..247fb33 100644 --- a/Commands/Usermgm.pm +++ b/Commands/Usermgm.pm @@ -404,11 +404,11 @@ SELECT username,hostmask,pnick FROM users WHERE hostmask ILIKE $1 OR pnick ILIKE } sub a - : Help(Usage: .a username [points] | % can be used for wildcards \%arro\% will match barrow, if the number of points isn't specified, then 1 will be assumed.) + : Help(Usage: .a username [points] | % can be used for wildcards %arro% will match barrow, if the number of points isn't specified, then 1 will be assumed.) : ACL(irc_a) { my ($self,$c,$msg) = @_; - my ($nick,$points) = $msg =~ /^(\S+)(?: (-?(\d+)?(\.\d+)?))?$/ or die 'ARGS'; + my ($nick,$points) = $msg =~ /^(\S+)(?: (-?(:?\d+|\d*\.\d+)))?$/ or die 'ARGS'; $points //= 1; my ($fleets) = $c->model->selectrow_array(q{ @@ -427,32 +427,32 @@ WHERE not launched AND tick + 24 > tick() } sub d - : Help(Usage: .d username [points] | % can be used for wildcards \%arro\% will match barrow, if the number of points isn't specified, then 1 will be assumed.) + : Help(Usage: .d username [points] | % can be used for wildcards %arro% will match barrow, if the number of points isn't specified, then 1 will be assumed.) : ACL(irc_d) : Type(def) { my ($self,$c,$msg) = @_; - my ($nick,$points) = $msg =~ /^(\S+)(?: (-?(\d+)?(\.\d+)?))?$/ or die 'ARGS'; + my ($nick,$points) = $msg =~ /^(\S+)(?: (-?(:?\d+|\d*\.\d+)))?$/ or die 'ARGS'; addPoints($c, 'defense', $nick, $points); } sub s - : Help(Usage: .s username [points] | % can be used for wildcards \%arro\% will match barrow, if the number of points isn't specified, then 1 will be assumed.) + : Help(Usage: .s username [points] | % can be used for wildcards %arro% will match barrow, if the number of points isn't specified, then 1 will be assumed.) : ACL(irc_s) { my ($self,$c,$msg) = @_; - my ($nick,$points) = $msg =~ /^(\S+)(?: (-?(\d+)?(\.\d+)?))?$/ or die 'ARGS'; + my ($nick,$points) = $msg =~ /^(\S+)(?: (-?(:?\d+|\d*\.\d+)))?$/ or die 'ARGS'; addPoints($c, 'scan', $nick, $points); } sub h - : Help(Usage: .h username [points] | % can be used for wildcards \%arro\% will match barrow, if the number of points isn't specified, then 1 will be assumed.) + : Help(Usage: .h username [points] | % can be used for wildcards %arro% will match barrow, if the number of points isn't specified, then 1 will be assumed.) : ACL(irc_h) { my ($self,$c,$msg) = @_; - my ($nick,$points) = $msg =~ /^(\S+)(?: (-?(\d+)?(\.\d+)?))?$/ or die 'ARGS'; + my ($nick,$points) = $msg =~ /^(\S+)(?: (-?(:?\d+|\d*\.\d+)))?$/ or die 'ARGS'; addPoints($c, 'humor', $nick, $points); }