chanrec* targetchannel = ServerInstance->FindChan(parameters[0]);
userrec* targetuser = ServerInstance->FindNick(parameters[0]);
chanrec* targetchannel = ServerInstance->FindChan(parameters[0]);
userrec* targetuser = ServerInstance->FindNick(parameters[0]);
/* Special case for displaying the list for listmodes,
* e.g. MODE #chan b, or MODE #chan +b without a parameter
/* Special case for displaying the list for listmodes,
* e.g. MODE #chan b, or MODE #chan +b without a parameter
bool adding = true, state_change = false;
unsigned char handler_id = 0;
int parameter_counter = 2; /* Index of first parameter */
bool adding = true, state_change = false;
unsigned char handler_id = 0;
int parameter_counter = 2; /* Index of first parameter */
if ((*watchers)->BeforeMode(user, targetuser, targetchannel, parameter, adding, type) == false)
{
abort = true;
if ((*watchers)->BeforeMode(user, targetuser, targetchannel, parameter, adding, type) == false)
{
abort = true;
/* Call the handler for the mode */
ModeAction ma = modehandlers[handler_id]->OnModeChange(user, targetuser, targetchannel, parameter, adding);
/* Call the handler for the mode */
ModeAction ma = modehandlers[handler_id]->OnModeChange(user, targetuser, targetchannel, parameter, adding);
{
/* The handler nuked the parameter and they are supposed to have one.
* We CANT continue now, even if they actually returned MODEACTION_ALLOW,
{
/* The handler nuked the parameter and they are supposed to have one.
* We CANT continue now, even if they actually returned MODEACTION_ALLOW,
output_sequence.push_back(modechar);
/* Is there a valid parameter for this mode? If so add it to the parameter list */
output_sequence.push_back(modechar);
/* Is there a valid parameter for this mode? If so add it to the parameter list */
* If they do that, thats their problem, and if i ever EVER see an
* official InspIRCd developer do that, i'll beat them with a paddle!
*/
* If they do that, thats their problem, and if i ever EVER see an
* official InspIRCd developer do that, i'll beat them with a paddle!
*/
unsigned char pos = (mode-65) | MASK_CHANNEL;
if ((modehandlers[pos]) && (modehandlers[pos]->GetNumParams(true)))
unsigned char pos = (mode-65) | MASK_CHANNEL;
if ((modehandlers[pos]) && (modehandlers[pos]->GetNumParams(true)))
return type1 + "," + type2 + "," + type3 + "," + type4;
}
return type1 + "," + type2 + "," + type3 + "," + type4;
}
pfxcontainer pfx;
std::map<char,char> prefix_to_mode;
for (unsigned char mode = 'A'; mode <= 'z'; mode++)
{
pfxcontainer pfx;
std::map<char,char> prefix_to_mode;
for (unsigned char mode = 'A'; mode <= 'z'; mode++)
{
unsigned char pos = (mode-65) | MASK_CHANNEL;
if ((modehandlers[pos]) && (modehandlers[pos]->GetPrefix()))
unsigned char pos = (mode-65) | MASK_CHANNEL;
if ((modehandlers[pos]) && (modehandlers[pos]->GetPrefix()))