From f442c3c5bb7d67583c875ffbb5aeecc137d6928c Mon Sep 17 00:00:00 2001 From: Michael Andreen Date: Fri, 7 Sep 2007 12:12:21 +0200 Subject: [PATCH] updated addUser --- Usermgm.pm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Usermgm.pm b/Usermgm.pm index 16ef538..e24ee55 100644 --- a/Usermgm.pm +++ b/Usermgm.pm @@ -28,8 +28,16 @@ our @ISA = qw/Exporter/; our @EXPORT = qw/addUser whois flags flag laston addPoints chattrG setHost setPNick deactivateUser getShips/; sub addUser { - my ($nick,$pnick) = @_; - DB(); + my ($msg, $command) = @_; + + my ($nick,$pnick); + if(defined $msg && $msg =~ /^(\w+)(?: ([^.\s]+))?$/){ + $nick = $1; + $pnick = $2; + }else{ + $ND::server->command("notice $ND::nick syntax: .$command nick [pnick] | nick must be alphanum characters, if no pnick is given then it will be set to nick"); + return; + } if (hc()){ $pnick = $nick unless $pnick; my $host = "$pnick.users.netgamers.org"; -- 2.39.2