X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodes%2Fcmode_b.cpp;h=5a6960831828864de283af3ff9374829ad80827b;hb=02ccf82812a189c46d0495580b7d96ada34851b5;hp=82e57ea7bb1e3bddd406482b9b4dfa6dc560a1fe;hpb=e84bf9f3ec5a60078c32b272d3d7885c0708c544;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modes/cmode_b.cpp b/src/modes/cmode_b.cpp index 82e57ea7b..5a6960831 100644 --- a/src/modes/cmode_b.cpp +++ b/src/modes/cmode_b.cpp @@ -1,3 +1,16 @@ +/* +------------------------------------+ + * | Inspire Internet Relay Chat Daemon | + * +------------------------------------+ + * + * InspIRCd: (C) 2002-2007 InspIRCd Development Team + * See: http://www.inspircd.org/wiki/index.php/Credits + * + * This program is free but copyrighted software; see + * the file COPYING for details. + * + * --------------------------------------------------- + */ + #include #include #include "inspircd_config.h" @@ -7,7 +20,7 @@ #include "mode.h" #include "channels.h" #include "users.h" -#include "helperfuncs.h" + #include "modules.h" #include "inspstring.h" #include "hashcomp.h" @@ -37,6 +50,31 @@ ModeAction ModeChannelBan::OnModeChange(userrec* source, userrec* dest, chanrec* return MODEACTION_ALLOW; } +void ModeChannelBan::RemoveMode(chanrec* channel) +{ + BanList copy; + char moderemove[MAXBUF]; + userrec* n = new userrec(ServerInstance); + n->SetFd(FD_MAGIC_NUMBER); + + for (BanList::iterator i = channel->bans.begin(); i != channel->bans.end(); i++) + { + copy.push_back(*i); + } + for (BanList::iterator i = copy.begin(); i != copy.end(); i++) + { + sprintf(moderemove,"-%c",this->GetModeChar()); + const char* parameters[] = { channel->name, moderemove, i->data }; + ServerInstance->SendMode(parameters, 3, n); + } + + delete n; +} + +void ModeChannelBan::RemoveMode(userrec* user) +{ +} + void ModeChannelBan::DisplayList(userrec* user, chanrec* channel) { /* Display the channel banlist */