]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_watch.cpp
m_dccallow Add config option to control max entries on a list
[user/henk/code/inspircd.git] / src / modules / m_watch.cpp
index 0e532d65be1f9ae07e147a1b4336c7555b2a7d5d..a86483291805b8250a6320c768b18b48ecba3799 100644 (file)
@@ -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;
@@ -420,7 +417,7 @@ class Modulewatch : public Module
                {
                        for (std::deque<User*>::iterator n = x->second.begin(); n != x->second.end(); n++)
                        {
-                               (*n)->WriteNumeric(inum, numeric);
+                               (*n)->WriteNumeric(inum, (*n)->nick + " " + numeric);
                        }
                }