]> ruin.nu Git - NDIRC.git/blobdiff - Delling.pm
Fix for perl 5.24
[NDIRC.git] / Delling.pm
index e6ce4e5e328b8a2042ae72c6b66b61e64246f7e5..bf9bb9d665d8e17cb0a5ca44710a308e0c767de4 100644 (file)
@@ -45,7 +45,7 @@ after irc_public => sub {
 
        my $nickname = $irc->nick_name;
        if ($msg =~ /^(\S+): (.+)$/ && $self->disp->has_command('anon',$channel)){
-               my $_ = $1;
+               local $_ = $1;
                my $text = $2;
                unless ($irc->is_channel_member($channel,$1) || /(Constructing|Researching)/){
                        $msg = ".anon $_ $text";
@@ -112,7 +112,7 @@ SELECT uid,pid,hostmask,password
 FROM users u WHERE hostmask = ?
                }, undef, $address);
                if ($user){
-                       if ($user->{password} eq ''){
+                       unless ($user->{password}) {
                                $irc->yield(privmsg => $disp->targets->{members}, "$nick: Get a new random password with /msg delling !getpass . If you don't know your username, then you can get it with .points");
                        }
                        if ($tick > 12 && not defined $user->{pid}){