mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-11 11:39:02 -04:00
banexception, chanfilter and inviteexception should now be unloadable :)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5103 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
parent
40e990ed06
commit
687531999c
@ -65,22 +65,22 @@ class ListModeBase : public ModeHandler
|
||||
infokey = "exceptionbase_mode_" + std::string(1, mode) + "_list";
|
||||
}
|
||||
|
||||
std::pair<bool,std::string> ModeSet(userrec* source, userrec* dest, chanrec* channel, const std::string ¶meter)
|
||||
{
|
||||
std::pair<bool,std::string> ModeSet(userrec* source, userrec* dest, chanrec* channel, const std::string ¶meter)
|
||||
{
|
||||
modelist* el;
|
||||
channel->GetExt(infokey, el);
|
||||
if (el)
|
||||
{
|
||||
for (modelist::iterator it = el->begin(); it != el->end(); it++)
|
||||
{
|
||||
if(parameter == it->mask)
|
||||
{
|
||||
for (modelist::iterator it = el->begin(); it != el->end(); it++)
|
||||
{
|
||||
if(parameter == it->mask)
|
||||
{
|
||||
return std::make_pair(true, parameter);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return std::make_pair(false, parameter);
|
||||
}
|
||||
}
|
||||
|
||||
virtual void DisplayList(userrec* user, chanrec* channel)
|
||||
{
|
||||
@ -96,6 +96,30 @@ class ListModeBase : public ModeHandler
|
||||
user->WriteServ( "%s %s %s %s", endoflistnumeric.c_str(), user->nick, channel->name, endofliststring.c_str());
|
||||
}
|
||||
|
||||
virtual void RemoveMode(chanrec* channel)
|
||||
{
|
||||
modelist* el;
|
||||
channel->GetExt(infokey, el);
|
||||
if (el)
|
||||
{
|
||||
char moderemove[MAXBUF];
|
||||
userrec* n = new userrec(ServerInstance);
|
||||
n->SetFd(FD_MAGIC_NUMBER);
|
||||
for(modelist::iterator it = el->begin(); it != el->end(); it++)
|
||||
{
|
||||
sprintf(moderemove,"-%c",this->GetModeChar());
|
||||
const char* parameters[] = { channel->name, moderemove, it->mask.c_str() };
|
||||
ServerInstance->SendMode(parameters, 3, n);
|
||||
}
|
||||
delete n;
|
||||
}
|
||||
}
|
||||
|
||||
virtual void RemoveMode(userrec* user)
|
||||
{
|
||||
/* Listmodes dont get set on users */
|
||||
}
|
||||
|
||||
virtual void DoRehash()
|
||||
{
|
||||
ConfigReader Conf(ServerInstance);
|
||||
|
@ -93,11 +93,12 @@ public:
|
||||
|
||||
virtual Version GetVersion()
|
||||
{
|
||||
return Version(1, 0, 0, 3, VF_STATIC | VF_VENDOR);
|
||||
return Version(1, 0, 0, 3, VF_COMMON | VF_VENDOR);
|
||||
}
|
||||
|
||||
virtual ~ModuleBanException()
|
||||
{
|
||||
ServerInstance->Modes->DelMode(be);
|
||||
DELETE(be);
|
||||
}
|
||||
};
|
||||
|
@ -141,11 +141,12 @@ class ModuleChanFilter : public Module
|
||||
|
||||
virtual Version GetVersion()
|
||||
{
|
||||
return Version(1,0,0,1,VF_STATIC|VF_VENDOR);
|
||||
return Version(1, 0, 0, 1, VF_COMMON | VF_VENDOR);
|
||||
}
|
||||
|
||||
virtual ~ModuleChanFilter()
|
||||
{
|
||||
ServerInstance->Modes->DelMode(cf);
|
||||
DELETE(cf);
|
||||
}
|
||||
};
|
||||
|
@ -95,7 +95,13 @@ public:
|
||||
|
||||
virtual Version GetVersion()
|
||||
{
|
||||
return Version(1, 0, 0, 3, VF_VENDOR | VF_STATIC);
|
||||
return Version(1, 0, 0, 3, VF_VENDOR | VF_COMMON);
|
||||
}
|
||||
|
||||
~ModuleInviteException()
|
||||
{
|
||||
ServerInstance->Modes->DelMode(ie);
|
||||
DELETE(ie);
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user