diff --git a/lib/PBot/Users.pm b/lib/PBot/Users.pm index bb0674e2..54587c5f 100644 --- a/lib/PBot/Users.pm +++ b/lib/PBot/Users.pm @@ -206,7 +206,7 @@ sub cmd_useradd { if (not defined $name or not defined $hostmasks) { return "Usage: useradd [channels [capabilities [password]]]"; } - $channels = 'global' if $channels !~ /^#/; + $channels = 'global' if !$channels or $channels !~ /^#/; my $u; foreach my $channel (sort split /\s*,\s*/, lc $channels) {