aboutsummaryrefslogtreecommitdiffstats
path: root/src/mode.cpp
diff options
context:
space:
mode:
authorGravatar Daniel De Graaf2010-02-09 12:43:13 -0600
committerGravatar Daniel De Graaf2010-08-03 17:32:34 -0400
commitd439bfcb17ccaf3d8e9366ce8d3922d3b83326b9 (patch)
tree4d7341ebe0413e8f741d4ab11f0a1d592aa324a7 /src/mode.cpp
parentUpdate InspIRCd::SendMode to take a modestacker (diff)
Fixups for s2s sync (currently limited to lettered modes)
Diffstat (limited to 'src/mode.cpp')
-rw-r--r--src/mode.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/mode.cpp b/src/mode.cpp
index 942b0ebd1..df4bf10a9 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -914,31 +914,27 @@ void ModeHandler::RemoveMode(User* user, irc::modestacker* stack)
{
irc::modestacker tmp;
tmp.push(mc);
- ServerInstance->Modes->Process(ServerInstance->FakeClient, user, tmp);
+ ServerInstance->SendMode(ServerInstance->FakeClient, user, tmp, false);
}
}
}
-/** This default implementation can remove simple channel modes
- * (no parameters)
+/** This default implementation can remove non-list modes
*/
void ModeHandler::RemoveMode(Channel* channel, irc::modestacker* stack)
{
- char moderemove[MAXBUF];
- std::vector<std::string> parameters;
-
if (channel->IsModeSet(this))
{
+ irc::modechange mc(id, channel->GetModeParameter(this), false);
if (stack)
{
- stack->push(irc::modechange(id, "", false));
+ stack->push(mc);
}
else
{
- sprintf(moderemove,"-%c",this->GetModeChar());
- parameters.push_back(channel->name);
- parameters.push_back(moderemove);
- ServerInstance->SendMode(parameters, ServerInstance->FakeClient);
+ irc::modestacker ms;
+ ms.push(mc);
+ ServerInstance->SendMode(ServerInstance->FakeClient, channel, ms, false);
}
}
}