summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2013-05-26 23:23:47 +0200
committerattilamolnar <attilamolnar@hush.com>2013-05-27 01:07:30 +0200
commit3406c7234ac15b6a2fc52afa770fb851da25c215 (patch)
treea772480ea9d1d01f038ea4f7704630831ca35541 /include
parent9bb24d3f458274b7485554bc95f1274900a69ec2 (diff)
Simplify user mode removal via ModeHandler::RemoveMode()
The function does not need to be virtual because the core can remove any user mode using the default logic The optional modestack parameter was always NULL, so remove it
Diffstat (limited to 'include')
-rw-r--r--include/builtinmodes.h3
-rw-r--r--include/listmode.h4
-rw-r--r--include/mode.h10
3 files changed, 3 insertions, 14 deletions
diff --git a/include/builtinmodes.h b/include/builtinmodes.h
index 46bfe282b..ba34a3da9 100644
--- a/include/builtinmodes.h
+++ b/include/builtinmodes.h
@@ -52,7 +52,6 @@ class ModeChannelKey : public ModeHandler
public:
ModeChannelKey();
ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding);
- void RemoveMode(User* user, irc::modestacker* stack = NULL);
};
/** Channel mode +l
@@ -94,7 +93,6 @@ class ModeChannelOp : public ModeHandler
ModeChannelOp();
ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding);
unsigned int GetPrefixRank();
- void RemoveMode(User* user, irc::modestacker* stack = NULL);
};
/** Channel mode +p
@@ -136,7 +134,6 @@ class ModeChannelVoice : public ModeHandler
ModeChannelVoice();
ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding);
unsigned int GetPrefixRank();
- void RemoveMode(User* user, irc::modestacker* stack = NULL);
};
/** User mode +i
diff --git a/include/listmode.h b/include/listmode.h
index b4601fcbd..149f41578 100644
--- a/include/listmode.h
+++ b/include/listmode.h
@@ -152,10 +152,6 @@ class CoreExport ListModeBase : public ModeHandler
*/
virtual void RemoveMode(Channel* channel, irc::modestacker& stack);
- /** Listmodes don't get set on users, no-op
- */
- virtual void RemoveMode(User*, irc::modestacker* stack);
-
/** Perform a rehash of this mode's configuration data
*/
virtual void DoRehash();
diff --git a/include/mode.h b/include/mode.h
index 6afd00a86..2cc5d6681 100644
--- a/include/mode.h
+++ b/include/mode.h
@@ -275,15 +275,11 @@ class CoreExport ModeHandler : public ServiceProvider
virtual bool ResolveModeConflict(std::string &their_param, const std::string &our_param, Channel* channel);
/**
- * When a MODETYPE_USER mode handler is being removed, the server will call this method for every user on the server.
- * Your mode handler should remove its user mode from the user by sending the appropriate server modes using
- * InspIRCd::SendMode(). The default implementation of this method can remove simple modes which have no parameters,
- * and can be used when your mode is of this type, otherwise you must implement a more advanced version of it to remove
- * your mode properly from each user.
+ * When a MODETYPE_USER mode handler is being removed, the core will call this method for every user on the server.
+ * The usermode will be removed using the appropiate server mode using InspIRCd::SendMode().
* @param user The user which the server wants to remove your mode from
- * @param stack The mode stack to add the mode change to
*/
- virtual void RemoveMode(User* user, irc::modestacker* stack = NULL);
+ void RemoveMode(User* user);
/**
* When a MODETYPE_CHANNEL mode handler is being removed, the server will call this method for every channel on the server.