aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree/fjoin.cpp
diff options
context:
space:
mode:
authorGravatar Attila Molnar2014-02-22 14:00:04 +0100
committerGravatar Attila Molnar2014-02-22 14:00:04 +0100
commit7affd6453d9d564636da5fe5c0fe7baba5fecf7a (patch)
tree4fd4c2992e67dfaf6f63935ec9e07b738abb789d /src/modules/m_spanningtree/fjoin.cpp
parentIndex Channel::modes and User::modes with the id of the mode instead of its l... (diff)
Add ModeParser::GetModes(), returns all user/chanmodes
Diffstat (limited to 'src/modules/m_spanningtree/fjoin.cpp')
-rw-r--r--src/modules/m_spanningtree/fjoin.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/m_spanningtree/fjoin.cpp b/src/modules/m_spanningtree/fjoin.cpp
index d697af63d..ea7711332 100644
--- a/src/modules/m_spanningtree/fjoin.cpp
+++ b/src/modules/m_spanningtree/fjoin.cpp
@@ -214,16 +214,16 @@ void CommandFJoin::RemoveStatus(Channel* c)
{
irc::modestacker stack(false);
- for (char modeletter = 'A'; modeletter <= 'z'; ++modeletter)
+ const ModeParser::ModeHandlerMap& mhs = ServerInstance->Modes->GetModes(MODETYPE_CHANNEL);
+ for (ModeParser::ModeHandlerMap::const_iterator i = mhs.begin(); i != mhs.end(); ++i)
{
- ModeHandler* mh = ServerInstance->Modes->FindMode(modeletter, MODETYPE_CHANNEL);
+ ModeHandler* mh = i->second;
/* Passing a pointer to a modestacker here causes the mode to be put onto the mode stack,
* rather than applied immediately. Module unloads require this to be done immediately,
* for this function we require tidyness instead. Fixes bug #493
*/
- if (mh)
- mh->RemoveMode(c, stack);
+ mh->RemoveMode(c, stack);
}
ApplyModeStack(ServerInstance->FakeClient, c, stack);