]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
m_watch Be more strict when checking whether the watch list of a user is full
authorAttila Molnar <attilamolnar@hush.com>
Sat, 12 Apr 2014 20:38:34 +0000 (22:38 +0200)
committerAttila Molnar <attilamolnar@hush.com>
Sat, 12 Apr 2014 20:38:34 +0000 (22:38 +0200)
After a rehash MAX_WATCH can become lower than it was before

src/modules/m_watch.cpp

index 0e532d65be1f9ae07e147a1b4336c7555b2a7d5d..be05d7d2d7e2c2154c51ae4abeaf2073b38b54bc 100644 (file)
@@ -214,7 +214,7 @@ class CommandWatch : public Command
                        ext.set(user, wl);
                }
 
                        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;
                {
                        user->WriteNumeric(512, "%s %s :Too many WATCH entries", user->nick.c_str(), nick);
                        return CMD_FAILURE;