]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - src/modules/m_operflood.cpp
ef09ebd279309fa0ef708a4846cc01b9f9aa6eed
[user/henk/code/inspircd.git] / src / modules / m_operflood.cpp
1 /*       +------------------------------------+
2  *       | Inspire Internet Relay Chat Daemon |
3  *       +------------------------------------+
4  *
5  *  InspIRCd: (C) 2002-2007 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 #include "users.h"
16 #include "channels.h"
17 #include "modules.h"
18
19 /* $ModDesc: Removes flood limits from users upon opering up. */
20 class ModuleOperFlood : public Module
21 {
22 public:
23         ModuleOperFlood(InspIRCd * Me) : Module(Me) {}
24
25         void Implements(char * List)
26         {
27                 List[I_OnPostOper] = 1;
28                 Implementation eventlist[] = { I_OnPostOper };
29                 ServerInstance->Modules->Attach(eventlist, this, 1);
30         }
31
32         Version GetVersion()
33         {
34                 return Version(1,1,0,1,VF_VENDOR,API_VERSION);
35         }
36
37         void OnPostOper(User* user, const std::string &opertype)
38         {
39                 if(!IS_LOCAL(user))
40                         return;
41
42                 user->ExemptFromPenalty = true;
43                 user->WriteServ("NOTICE %s :*** You are now free from flood limits.", user->nick);
44         }
45 };
46
47 MODULE_INIT(ModuleOperFlood)