X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=users.pl;h=5e489e5c4c9fcea56781086582924134bfd39a03;hb=d2b25d79058863d3604489e7a36d1c0d1a491b5c;hp=20687a5ca4efad6f794b01de4a25c5ea2e42deb8;hpb=354c2fb813a139fb08476b6d0e7f30308091038a;p=ndwebbie.git diff --git a/users.pl b/users.pl index 20687a5..5e489e5 100644 --- a/users.pl +++ b/users.pl @@ -19,8 +19,6 @@ use strict; use warnings FATAL => 'all'; -no warnings qw(uninitialized); -use POSIX; our $BODY; our $DBH; our $LOG; @@ -31,7 +29,7 @@ die "You don't have access" unless isHC(); my $error = ''; my $user; -if (param('user') =~ /^(\d+)$/){ +if (defined param('user') && param('user') =~ /^(\d+)$/){ my $query = $DBH->prepare(q{ SELECT uid,username,hostmask,coords(x,y,z) AS planet,attack_points,defense_points,scan_points,humor_points FROM users u LEFT OUTER JOIN current_planet_stats p ON u.planet = p.id @@ -41,7 +39,7 @@ WHERE uid = ?; } -if ($user && param('cmd') eq 'change'){ +if ($user && defined param('cmd') && param('cmd') eq 'change'){ $DBH->begin_work; for my $param (param()){ if ($param =~ /^c:(\w+)$/){