]> ruin.nu Git - ndwebbie.git/blobdiff - users.pl
oops, guess I had forgotten about this file
[ndwebbie.git] / users.pl
index 62988081baf3acade7dcf0d020b98ea26b11096e..20687a5ca4efad6f794b01de4a25c5ea2e42deb8 100644 (file)
--- a/users.pl
+++ b/users.pl
@@ -18,6 +18,8 @@
 #**************************************************************************/
 
 use strict;
+use warnings FATAL => 'all';
+no warnings qw(uninitialized);
 use POSIX;
 our $BODY;
 our $DBH;
@@ -34,10 +36,11 @@ if (param('user') =~ /^(\d+)$/){
 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
 WHERE uid = ?;
-}) or $error .= "<p> Something went wrong: ".$DBH->errstr."</p>";
+}) or $error .= "<p> Something went wrong: </p>";
        $user = $DBH->selectrow_hashref($query,undef,$1) or $error.= "<p> Something went wrong: ".$DBH->errstr."</p>";
 }
 
+
 if ($user && param('cmd') eq 'change'){
        $DBH->begin_work;
        for my $param (param()){
@@ -68,6 +71,7 @@ if ($user && param('cmd') eq 'change'){
        $groups->execute();
        while (my $group = $groups->fetchrow_hashref){
                my $query;
+               next unless defined param($group->{gid});
                if (param($group->{gid}) eq 'remove'){
                        $query = $delgroup;
                }elsif(param($group->{gid}) eq 'add'){