X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodes%2Fcmode_v.cpp;h=1e244c606eaf74d8b26b142543d1ad8c8d7ce8ae;hb=d2d060d76957addbeb212f304f7f1fdbebb0183b;hp=9fd5df7bdaef9b9885e1aa97eb59d6546f82962c;hpb=26e4582c2ebaa82b63ba1d85d52be7b69d1f468d;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modes/cmode_v.cpp b/src/modes/cmode_v.cpp index 9fd5df7bd..1e244c606 100644 --- a/src/modes/cmode_v.cpp +++ b/src/modes/cmode_v.cpp @@ -1,5 +1,18 @@ -#include "configreader.h" +/* +------------------------------------+ + * | 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 "inspircd.h" +#include "configreader.h" #include "mode.h" #include "channels.h" #include "users.h" @@ -42,13 +55,13 @@ void ModeChannelVoice::RemoveMode(chanrec* channel) for (CUList::iterator i = list->begin(); i != list->end(); i++) { - userrec* n = i->second; - copy.insert(std::make_pair(n,n)); + userrec* n = i->first; + copy.insert(std::make_pair(n,n->nick)); } for (CUList::iterator i = copy.begin(); i != copy.end(); i++) { sprintf(moderemove,"-%c",this->GetModeChar()); - const char* parameters[] = { channel->name, moderemove, i->second->nick }; + const char* parameters[] = { channel->name, moderemove, i->first->nick }; ServerInstance->SendMode(parameters, 3, n); } delete n; @@ -76,7 +89,10 @@ ModeAction ModeChannelVoice::OnModeChange(userrec* source, userrec* dest, chanre * the return value and is always MODEACTION_DENY if the mode is supposed to have * a parameter. */ - return MODEACTION_ALLOW; + if (parameter.length()) + return MODEACTION_ALLOW; + else + return MODEACTION_DENY; } std::string ModeChannelVoice::AddVoice(userrec *user,const char* dest,chanrec *chan,int status)