diff options
Diffstat (limited to 'src/modes/cmode_o.cpp')
-rw-r--r-- | src/modes/cmode_o.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/modes/cmode_o.cpp b/src/modes/cmode_o.cpp index 85eb08c38..b9fb0208b 100644 --- a/src/modes/cmode_o.cpp +++ b/src/modes/cmode_o.cpp @@ -32,6 +32,33 @@ ModePair ModeChannelOp::ModeSet(userrec* source, userrec* dest, chanrec* channel return std::make_pair(false, parameter); } + +void ModeChannelOp::RemoveMode(chanrec* channel) +{ + CUList* list = channel->GetOppedUsers(); + CUList copy; + char moderemove[MAXBUF]; + userrec* n = new userrec(ServerInstance); + n->SetFd(FD_MAGIC_NUMBER); + + for (CUList::iterator i = list->begin(); i != list->end(); i++) + { + userrec* n = i->second; + copy.insert(std::make_pair(n,n)); + } + for (CUList::iterator i = copy.begin(); i != copy.end(); i++) + { + sprintf(moderemove,"-%c",this->GetModeChar()); + const char* parameters[] = { channel->name, moderemove, i->second->nick }; + ServerInstance->SendMode(parameters, 3, n); + } + delete n; +} + +void ModeChannelOp::RemoveMode(userrec* user) +{ +} + ModeAction ModeChannelOp::OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string ¶meter, bool adding) { int status = channel->GetStatus(source); |