X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_spanningtree%2Fidle.cpp;h=18aeb0ad5ff26aff90cfc8a2af14f17349a3b3ba;hb=4e24fb7c19cff866eda602349fbafce78b7e4c51;hp=59dc839851a5ffafdfa7e581f8eebbde4fce6b03;hpb=7aab0d12db670fea68a258d9ae2b05ea5c4615be;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_spanningtree/idle.cpp b/src/modules/m_spanningtree/idle.cpp index 59dc83985..18aeb0ad5 100644 --- a/src/modules/m_spanningtree/idle.cpp +++ b/src/modules/m_spanningtree/idle.cpp @@ -1,16 +1,22 @@ -/* +------------------------------------+ - * | Inspire Internet Relay Chat Daemon | - * +------------------------------------+ +/* + * InspIRCd -- Internet Relay Chat Daemon * - * InspIRCd: (C) 2002-2010 InspIRCd Development Team - * See: http://wiki.inspircd.org/Credits + * Copyright (C) 2011 Adam * - * This program is free but copyrighted software; see - * the file COPYING for details. + * This file is part of InspIRCd. InspIRCd is free software: you can + * redistribute it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation, version 2. * - * --------------------------------------------------- + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ + #include "inspircd.h" #include "socket.h" #include "xline.h" @@ -34,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)); @@ -53,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;