]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modes/cmode_o.cpp
Add newlines to the end :) (\n)
[user/henk/code/inspircd.git] / src / modes / cmode_o.cpp
index caef82bf6033dee4360949df613c282f6cce9517..c4e3c241e8921799b182888aa1d1b5b20cc64d6f 100644 (file)
@@ -46,7 +46,7 @@ ModePair ModeChannelOp::ModeSet(User*, User*, Channel* channel, const std::strin
 }
 
 
-void ModeChannelOp::RemoveMode(Channel* channel)
+void ModeChannelOp::RemoveMode(Channel* channel, irc::modestacker* stack)
 {
        CUList* clist = channel->GetOppedUsers();
        CUList copy;
@@ -60,17 +60,22 @@ void ModeChannelOp::RemoveMode(Channel* channel)
 
        for (CUList::iterator i = copy.begin(); i != copy.end(); i++)
        {
-               sprintf(moderemove,"-%c",this->GetModeChar());
-               const char* parameters[] = { channel->name, moderemove, i->first->nick };
-               ServerInstance->SendMode(parameters, 3, ServerInstance->FakeClient);
+               if (stack)
+                       stack->Push(this->GetModeChar(), i->first->nick);
+               else
+               {
+                       sprintf(moderemove,"-%c",this->GetModeChar());
+                       const char* parameters[] = { channel->name, moderemove, i->first->nick };
+                       ServerInstance->SendMode(parameters, 3, ServerInstance->FakeClient);
+               }
        }
 }
 
-void ModeChannelOp::RemoveMode(User*)
+void ModeChannelOp::RemoveMode(User*, irc::modestacker* stack)
 {
 }
 
-ModeAction ModeChannelOp::OnModeChange(User* source, User*, Channel* channel, std::string &parameter, bool adding)
+ModeAction ModeChannelOp::OnModeChange(User* source, User*, Channel* channel, std::string &parameter, bool adding, bool servermode)
 {
        int status = channel->GetStatus(source);