]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/idle.cpp
m_timedbans Notice user when trying to set a ban that's already set
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / idle.cpp
index 8bc0cd2bbfff9b5a65d5128deb4df1e2cad1cb81..18aeb0ad5ff26aff90cfc8a2af14f17349a3b3ba 100644 (file)
@@ -40,7 +40,7 @@ bool TreeSocket::Whois(const std::string &prefix, parameterlist &params)
                        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 &params)
                {
                        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;