* | Inspire Internet Relay Chat Daemon |
* +------------------------------------+
*
- * InspIRCd: (C) 2002-2008 InspIRCd Development Team
+ * InspIRCd: (C) 2002-2009 InspIRCd Development Team
* See: http://www.inspircd.org/wiki/index.php/Credits
*
* This program is free but copyrighted software; see
{
CUList* clist = channel->GetHalfoppedUsers();
CUList copy;
- char moderemove[MAXBUF];
for (CUList::iterator i = clist->begin(); i != clist->end(); i++)
{
}
else
{
- sprintf(moderemove,"-%c",this->GetModeChar());
- const char* parameters[] = { channel->name, moderemove, i->first->nick };
- ServerInstance->SendMode(parameters, 3, ServerInstance->FakeClient);
+ std::vector<std::string> parameters; parameters.push_back(channel->name); parameters.push_back("-h"); parameters.push_back(i->first->nick);
+ ServerInstance->SendMode(parameters, ServerInstance->FakeClient);
}
}
ModeAction ModeChannelHalfOp::OnModeChange(User* source, User*, Channel* channel, std::string ¶meter, bool adding, bool servermode)
{
- /* If halfops are not enabled in the conf, we don't execute
- * anything in this class at all.
- */
- if (!ServerInstance->Config->AllowHalfop)
- {
- parameter = "";
- return MODEACTION_DENY;
- }
-
int status = channel->GetStatus(source);
/* Call the correct method depending on wether we're adding or removing the mode */
{
if ((status < STATUS_OP) && (!ServerInstance->ULine(user->server)))
{
- user->WriteServ("482 %s %s :You're not a channel operator",user->nick, chan->name);
+ user->WriteServ("482 %s %s :You're not a channel operator",user->nick.c_str(), chan->name.c_str());
return "";
}
}
{
if ((user != d) && ((status < STATUS_OP) && (!ServerInstance->ULine(user->server))))
{
- user->WriteServ("482 %s %s :You are not a channel operator",user->nick, chan->name);
+ user->WriteServ("482 %s %s :You are not a channel operator",user->nick.c_str(), chan->name.c_str());
return "";
}
}