* | Inspire Internet Relay Chat Daemon |
* +------------------------------------+
*
- * InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ * InspIRCd: (C) 2002-2008 InspIRCd Development Team
* See: http://www.inspircd.org/wiki/index.php/Credits
*
* This program is free but copyrighted software; see
BlockAction action;
public:
- ModuleBlockAmsg(InspIRCd* Me)
- : Module(Me)
+ ModuleBlockAmsg(InspIRCd* Me) : Module(Me)
{
-
this->OnRehash(NULL,"");
Implementation eventlist[] = { I_OnRehash, I_OnPreCommand, I_OnCleanup };
ServerInstance->Modules->Attach(eventlist, this, 3);
}
- void Implements(char* List)
- {
- List[I_OnRehash] = List[I_OnPreCommand] = List[I_OnCleanup] = 1;
- }
virtual ~ModuleBlockAmsg()
{
virtual Version GetVersion()
{
- return Version(1,1,0,0,VF_VENDOR,API_VERSION);
+ return Version(1,2,0,0,VF_VENDOR,API_VERSION);
}
virtual void OnRehash(User* user, const std::string ¶meter)
action = IBLOCK_KILLOPERS;
}
- virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, User *user, bool validated, const std::string &original_line)
+ virtual int OnPreCommand(const std::string &command, const char* const* parameters, int pcnt, User *user, bool validated, const std::string &original_line)
{
// Don't do anything with unregistered users, or remote ones.
if(!user || (user->registered != REG_ALL) || !IS_LOCAL(user))
{
// Block it...
if(action == IBLOCK_KILLOPERS || action == IBLOCK_NOTICEOPERS)
- ServerInstance->WriteOpers("*** %s had an /amsg or /ame denied", user->nick);
+ ServerInstance->SNO->WriteToSnoMask('A', "%s had an /amsg or /ame denied", user->nick);
if(action == IBLOCK_KILL || action == IBLOCK_KILLOPERS)
User::QuitUser(ServerInstance, user, "Global message (/amsg or /ame) detected");