The InspIRCd Project
Home | Developers | Wiki | Forums | Bug Tracker | SVN | Download
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

m_operflood.cpp

Go to the documentation of this file.
00001 /*       +------------------------------------+
00002  *       | Inspire Internet Relay Chat Daemon |
00003  *       +------------------------------------+
00004  *
00005  *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
00006  * See: http://www.inspircd.org/wiki/index.php/Credits
00007  *
00008  * This program is free but copyrighted software; see
00009  *            the file COPYING for details.
00010  *
00011  * ---------------------------------------------------
00012  */
00013 
00014 #include "inspircd.h"
00015 
00016 /* $ModDesc: Removes flood limits from users upon opering up. */
00017 class ModuleOperFlood : public Module
00018 {
00019 public:
00020         ModuleOperFlood(InspIRCd * Me) : Module(Me)
00021         {
00022                 Implementation eventlist[] = { I_OnPostOper };
00023                 ServerInstance->Modules->Attach(eventlist, this, 1);
00024         }
00025 
00026         Version GetVersion()
00027         {
00028                 return Version("$Id: m_operflood.cpp 10622 2008-10-04 21:27:52Z brain $", VF_VENDOR, API_VERSION);
00029         }
00030 
00031         void OnPostOper(User* user, const std::string &opertype, const std::string &opername)
00032         {
00033                 if(!IS_LOCAL(user))
00034                         return;
00035 
00036                 user->ExemptFromPenalty = true;
00037                 user->WriteServ("NOTICE %s :*** You are now free from flood limits.", user->nick.c_str());
00038         }
00039 };
00040 
00041 MODULE_INIT(ModuleOperFlood)