X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcommands%2Fcmd_whois.cpp;h=3a07fce7b1a13d4fec3f9029d5e28eed966c4cf5;hb=8c08130e19247f4a0798613ba6b931cd599115b6;hp=00a9b3409f7192e90eb03f7d2a3b5f27200cca93;hpb=46a39046196f55b52336e19662bb7bac85b731ac;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/commands/cmd_whois.cpp b/src/commands/cmd_whois.cpp index 00a9b3409..3a07fce7b 100644 --- a/src/commands/cmd_whois.cpp +++ b/src/commands/cmd_whois.cpp @@ -64,7 +64,7 @@ CmdResult CommandWhois::Handle (const std::vector& parameters, User else dest = ServerInstance->FindNick(parameters[userindex]); - if (dest) + if ((dest) && (dest->registered == REG_ALL)) { /* * Okay. Umpteenth attempt at doing this, so let's re-comment... @@ -74,9 +74,10 @@ CmdResult CommandWhois::Handle (const std::vector& parameters, User * For remote users (/w remoteuser remoteuser), spanningtree will handle calling do_whois, so we can ignore this case. * Thanks to djGrrr for not being impatient while I have a crap day coding. :p -- w00t */ - if (IS_LOCAL(dest) && (ServerInstance->Config->HideWhoisServer.empty() || parameters.size() > 1)) + LocalUser* localuser = IS_LOCAL(dest); + if (localuser && (ServerInstance->Config->HideWhoisServer.empty() || parameters.size() > 1)) { - idle = abs((long)((dest->idle_lastmsg)-ServerInstance->Time())); + idle = abs((long)((localuser->idle_lastmsg)-ServerInstance->Time())); signon = dest->signon; }