]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - src/modules/m_operflood.cpp
Note where to find the docs.
[user/henk/code/inspircd.git] / src / modules / m_operflood.cpp
1 /*       +------------------------------------+
2  *       | Inspire Internet Relay Chat Daemon |
3  *       +------------------------------------+
4  *
5  *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
6  * See: http://www.inspircd.org/wiki/index.php/Credits
7  *
8  * This program is free but copyrighted software; see
9  *            the file COPYING for details.
10  *
11  * ---------------------------------------------------
12  */
13
14 #include "inspircd.h"
15
16 /* $ModDesc: Removes flood limits from users upon opering up. */
17 class ModuleOperFlood : public Module
18 {
19 public:
20         ModuleOperFlood(InspIRCd * Me) : Module(Me)
21         {
22                 Implementation eventlist[] = { I_OnPostOper };
23                 ServerInstance->Modules->Attach(eventlist, this, 1);
24         }
25
26         Version GetVersion()
27         {
28                 return Version("$Id$", VF_VENDOR, API_VERSION);
29         }
30
31         void OnPostOper(User* user, const std::string &opertype, const std::string &opername)
32         {
33                 if(!IS_LOCAL(user))
34                         return;
35
36                 user->ExemptFromPenalty = true;
37                 user->WriteServ("NOTICE %s :*** You are now free from flood limits.", user->nick.c_str());
38         }
39 };
40
41 MODULE_INIT(ModuleOperFlood)