* | 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
seq++;
mask = MASK_CHANNEL;
-
+
while (mode && *mode)
{
unsigned char mletter = *mode;
mode++;
continue;
}
-
+
/* Ensure the user doesnt request the same mode twice,
* so they cant flood themselves off out of idiocy.
*/
for(ModeWatchIter watchers = modewatchers[handler_id].begin(); watchers != modewatchers[handler_id].end(); watchers++)
{
std::string dummyparam;
-
+
if (!((*watchers)->BeforeMode(user, NULL, targetchannel, dummyparam, true, MODETYPE_CHANNEL)))
display = false;
}
*/
if (needed && !prefixmode)
prefixmode = FindPrefix('%');
-
+
unsigned int neededrank = prefixmode->GetPrefixRank();
/* Compare our rank on the channel against the rank of the required prefix,
* allow if >= ours. Because mIRC and xchat throw a tizz if the modes shown
}
bool had_parameter = !parameter.empty();
-
+
for (ModeWatchIter watchers = modewatchers[handler_id].begin(); watchers != modewatchers[handler_id].end(); watchers++)
{
if ((*watchers)->BeforeMode(user, targetuser, targetchannel, parameter, adding, type, servermode) == false)
output_sequence.append(adding ? "+" : "-");
last_successful_state_change = adding;
}
-
+
/* Add the mode letter */
output_sequence.push_back(modechar);
for (unsigned char mode = 'A'; mode <= 'z'; mode++)
{
- if ((!ServerInstance->Config->AllowHalfop) && (mode == 'h'))
- continue;
-
unsigned char pos = (mode-65) | MASK_CHANNEL;
if (modehandlers[pos])
for (unsigned char mode = 'A'; mode <= 'z'; mode++)
{
- if ((!ServerInstance->Config->AllowHalfop) && (mode == 'h'))
- continue;
-
unsigned char pos = (mode-65) | MASK_CHANNEL;
if ((modehandlers[pos]) && (modehandlers[pos]->GetNumParams(true)))
for (unsigned char mode = 'A'; mode <= 'z'; mode++)
{
- if ((!ServerInstance->Config->AllowHalfop) && (mode == 'h'))
- continue;
-
unsigned char pos = (mode-65) | m;
/* One parameter when adding */
if (modehandlers[pos])
- {
+ {
if (modehandlers[pos]->GetNumParams(true))
{
if ((modehandlers[pos]->IsListMode()) && (!modehandlers[pos]->GetPrefix()))
type4 += modehandlers[pos]->GetModeChar();
}
}
-
}
return type1 + "," + type2 + "," + type3 + "," + type4;
}
bool ModeParser::PrefixComparison(prefixtype one, prefixtype two)
-{
+{
return one.second > two.second;
}
for (unsigned char mode = 'A'; mode <= 'z'; mode++)
{
- if ((!ServerInstance->Config->AllowHalfop) && (mode == 'h'))
- continue;
-
unsigned char pos = (mode-65) | MASK_CHANNEL;
if ((modehandlers[pos]) && (modehandlers[pos]->GetPrefix()))