X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_spanningtree%2Fidle.cpp;h=18aeb0ad5ff26aff90cfc8a2af14f17349a3b3ba;hb=4e24fb7c19cff866eda602349fbafce78b7e4c51;hp=8bc0cd2bbfff9b5a65d5128deb4df1e2cad1cb81;hpb=44f42a13de52c8025942ddab42f51feb36821782;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_spanningtree/idle.cpp b/src/modules/m_spanningtree/idle.cpp index 8bc0cd2bb..18aeb0ad5 100644 --- a/src/modules/m_spanningtree/idle.cpp +++ b/src/modules/m_spanningtree/idle.cpp @@ -40,7 +40,7 @@ bool TreeSocket::Whois(const std::string &prefix, parameterlist ¶ms) User* x = ServerInstance->FindNick(params[0]); if ((x) && (IS_LOCAL(x))) { - long idle = abs((long)((x->idle_lastmsg) - ServerInstance->Time())); + long idle = labs((long)((x->idle_lastmsg) - ServerInstance->Time())); parameterlist par; par.push_back(prefix); par.push_back(ConvToStr(x->signon)); @@ -59,7 +59,7 @@ bool TreeSocket::Whois(const std::string &prefix, parameterlist ¶ms) { std::string who_did_the_whois = params[0]; User* who_to_send_to = ServerInstance->FindNick(who_did_the_whois); - if ((who_to_send_to) && (IS_LOCAL(who_to_send_to))) + if ((who_to_send_to) && (IS_LOCAL(who_to_send_to)) && (who_to_send_to->registered == REG_ALL)) { // an incoming reply to a whois we sent out std::string nick_whoised = prefix;