* +------------------------------------+
*
* InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://www.inspircd.org/wiki/index.php/Credits
+ * See: http://wiki.inspircd.org/Credits
*
* This program is free but copyrighted software; see
* the file COPYING for details.
char ModeHandler::GetNeededPrefix()
{
+ if (prefixneeded == '%' && !ServerInstance->Config->AllowHalfop)
+ return '@';
return prefixneeded;
}
/* If the mode defined by the handler is not '\0', but the handler for it
* cannot be found, they probably dont have the right module loaded to implement
* the prefix they want to compare the mode against, e.g. '&' for m_chanprotect.
- * Revert to checking against the minimum core prefix, '%'.
+ * Revert to checking against the minimum core prefix, '%' or '@'.
*/
if (needed && !prefixmode)
- prefixmode = FindPrefix('%');
+ prefixmode = ServerInstance->Config->AllowHalfop ? FindPrefix('%') : FindPrefix('@');
unsigned int neededrank = prefixmode->GetPrefixRank();
/* Compare our rank on the channel against the rank of the required prefix,
sprintf(moderemove,"-%c",this->GetModeChar());
parameters.push_back(user->nick);
parameters.push_back(moderemove);
- ServerInstance->Modes->Process(parameters, ServerInstance->FakeClient, false);
+ ServerInstance->Modes->Process(parameters, ServerInstance->FakeClient, true);
}
}
}