]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_nickflood.cpp
Fix the cloaking module on C++98 compilers.
[user/henk/code/inspircd.git] / src / modules / m_nickflood.cpp
index 17d6db9560184802169389466bb70122bc64e580..e20ab1258113c19b50542f222fb5f01afd180c6a 100644 (file)
@@ -1,8 +1,12 @@
 /*
  * InspIRCd -- Internet Relay Chat Daemon
  *
+ *   Copyright (C) 2013, 2016-2019 Sadie Powell <sadie@witchery.services>
+ *   Copyright (C) 2012, 2019 Robby <robby@chatbelgie.be>
+ *   Copyright (C) 2012, 2014 Attila Molnar <attilamolnar@hush.com>
+ *   Copyright (C) 2010 Craig Edwards <brain@inspircd.org>
  *   Copyright (C) 2009 Daniel De Graaf <danieldg@inspircd.org>
- *   Copyright (C) 20072009 Robin Burchell <robin+git@viroteck.net>
+ *   Copyright (C) 2007-2009 Robin Burchell <robin+git@viroteck.net>
  *
  * This file is part of InspIRCd.  InspIRCd is free software: you can
  * redistribute it and/or modify it under the terms of the GNU General Public
@@ -54,10 +58,6 @@ class nickfloodsettings
 
        bool shouldlock()
        {
-               /* XXX HACK: using counter + 1 here now to allow the counter to only be incremented
-                * on successful nick changes; this will be checked before the counter is
-                * incremented.
-                */
                return ((ServerInstance->Time() <= reset) && (counter == this->nicks));
        }
 
@@ -88,6 +88,7 @@ class NickFlood : public ParamMode<NickFlood, SimpleExtItem<nickfloodsettings> >
        NickFlood(Module* Creator)
                : ParamMode<NickFlood, SimpleExtItem<nickfloodsettings> >(Creator, "nickflood", 'F')
        {
+               syntax = "<nick-changes>:<seconds>";
        }
 
        ModeAction OnSet(User* source, Channel* channel, std::string& parameter) CXX11_OVERRIDE
@@ -202,7 +203,7 @@ class ModuleNickFlood : public Module
 
        Version GetVersion() CXX11_OVERRIDE
        {
-               return Version("Provides channel mode +F, nick flood protection", VF_VENDOR);
+               return Version("Adds channel mode F (nickflood) which helps protect against spammers which mass-change nicknames.", VF_VENDOR);
        }
 };