X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_watch.cpp;h=a86483291805b8250a6320c768b18b48ecba3799;hb=a5d110282a864fd2e91b51ce360a977cd0643657;hp=fa7e212bb5bf2ffac801cc553fc71580602f3ceb;hpb=96d561950c8086d132297eb691bf90bb2bc61a60;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_watch.cpp b/src/modules/m_watch.cpp index fa7e212bb..a86483291 100644 --- a/src/modules/m_watch.cpp +++ b/src/modules/m_watch.cpp @@ -163,9 +163,6 @@ class CommandWatch : public Command /* Yup, is on my list */ watchlist::iterator n = wl->find(nick); - if (!wl) - return CMD_FAILURE; - if (n != wl->end()) { if (!n->second.empty()) @@ -214,7 +211,7 @@ class CommandWatch : public Command ext.set(user, wl); } - if (wl->size() == MAX_WATCH) + if (wl->size() >= MAX_WATCH) { user->WriteNumeric(512, "%s %s :Too many WATCH entries", user->nick.c_str(), nick); return CMD_FAILURE; @@ -238,7 +235,7 @@ class CommandWatch : public Command } User* target = ServerInstance->FindNick(nick); - if (target) + if ((target) && (target->registered == REG_ALL)) { (*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()); @@ -420,7 +417,7 @@ class Modulewatch : public Module { for (std::deque::iterator n = x->second.begin(); n != x->second.end(); n++) { - (*n)->WriteNumeric(inum, numeric); + (*n)->WriteNumeric(inum, (*n)->nick + " " + numeric); } }