X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_watch.cpp;h=d0e42af6f8cfbb1014fe1e66a8cb736ac227edb7;hb=045747290ba1088daf7f70d5d36d0eb4c8ba2b4e;hp=94292e4bee930135a61c2454ac465b378ad800f6;hpb=5b1ee304b5e1d71c71eec9ebf8f40758dfce5c1e;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_watch.cpp b/src/modules/m_watch.cpp index 94292e4be..d0e42af6f 100644 --- a/src/modules/m_watch.cpp +++ b/src/modules/m_watch.cpp @@ -156,9 +156,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()) @@ -207,7 +204,7 @@ class CommandWatch : public Command ext.set(user, wl); } - if (wl->size() == MAX_WATCH) + if (wl->size() >= MAX_WATCH) { user->WriteNumeric(512, "%s :Too many WATCH entries", nick); return CMD_FAILURE; @@ -250,7 +247,7 @@ class CommandWatch : public Command return CMD_SUCCESS; } - CommandWatch(Module* parent, unsigned int &maxwatch) : Command(parent,"WATCH", 0), MAX_WATCH(maxwatch), ext("watchlist", parent) + CommandWatch(Module* parent, unsigned int &maxwatch) : Command(parent,"WATCH", 0), MAX_WATCH(maxwatch), ext("watchlist", ExtensionItem::EXT_USER, parent) { syntax = "[C|L|S]|[+|-]"; }