X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_watch.cpp;h=fdb20be2d3c79bfc8e2b05ca0c66a30288f2b106;hb=226a95aab09b9e1f43f61e78179bfa1135816c2d;hp=3b87ed4c31ea1664ad236e88d6f7bf574d94d534;hpb=fd655fa93a00a5f2993adb7ef562b6dbab8aa87c;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_watch.cpp b/src/modules/m_watch.cpp index 3b87ed4c3..fdb20be2d 100644 --- a/src/modules/m_watch.cpp +++ b/src/modules/m_watch.cpp @@ -92,12 +92,7 @@ * of users using WATCH. */ -/* - * Before you start screaming, this definition is only used here, so moving it to a header is pointless. - * Yes, it's horrid. Blame cl for being different. -- w00t - */ - -typedef std::tr1::unordered_map, irc::hash> watchentries; +typedef TR1NS::unordered_map, irc::hash> watchentries; typedef std::map watchlist; /* Who's watching each nickname. @@ -242,7 +237,7 @@ class CommandWatch : public Command { (*wl)[nick] = std::string(target->ident).append(" ").append(target->dhost).append(" ").append(ConvToStr(target->age)); user->WriteNumeric(604, "%s %s %s :is online",user->nick.c_str(), nick, (*wl)[nick].c_str()); - if (IS_AWAY(target)) + if (target->IsAway()) { user->WriteNumeric(609, "%s %s %s %s %lu :is away", user->nick.c_str(), target->nick.c_str(), target->ident.c_str(), target->dhost.c_str(), (unsigned long) target->awaytime); } @@ -320,7 +315,7 @@ class CommandWatch : public Command { user->WriteNumeric(604, "%s %s %s :is online", user->nick.c_str(), q->first.c_str(), q->second.c_str()); User *targ = ServerInstance->FindNick(q->first.c_str()); - if (IS_AWAY(targ)) + if (targ->IsAway()) { user->WriteNumeric(609, "%s %s %s %s %lu :is away", user->nick.c_str(), targ->nick.c_str(), targ->ident.c_str(), targ->dhost.c_str(), (unsigned long) targ->awaytime); } @@ -527,10 +522,9 @@ class Modulewatch : public Module } } - virtual void On005Numeric(std::string &output) + virtual void On005Numeric(std::map& tokens) { - // we don't really have a limit... - output = output + " WATCH=" + ConvToStr(maxwatch); + tokens["WATCH"] = ConvToStr(maxwatch); } virtual ~Modulewatch() @@ -545,4 +539,3 @@ class Modulewatch : public Module }; MODULE_INIT(Modulewatch) -