summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-09-02 16:13:01 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-09-02 16:13:01 +0000
commit687531999ced9e457463b1a6de2bfcef97c6250c (patch)
treeea337c29c56c02c798426f4b4ac183eedf71e9d3 /include
parent40e990ed06126c1ba6164738527127d1f58fc032 (diff)
banexception, chanfilter and inviteexception should now be unloadable :)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5103 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r--include/u_listmode.h40
1 files changed, 32 insertions, 8 deletions
diff --git a/include/u_listmode.h b/include/u_listmode.h
index 6bcbb728a..ff62f2089 100644
--- a/include/u_listmode.h
+++ b/include/u_listmode.h
@@ -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 &parameter)
- {
+ std::pair<bool,std::string> ModeSet(userrec* source, userrec* dest, chanrec* channel, const std::string &parameter)
+ {
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);