/* Should we leave orphaned check here? -- dwr */
if (chmode_table[i].set_func != NULL &&
- chmode_table[i].set_func != chm_nosuch &&
chmode_table[i].set_func != chm_orphaned)
{
*ptr2++ = (char) i;
int c = (unsigned char)c_;
if (chmode_table[c].set_func != NULL &&
- chmode_table[c].set_func != chm_nosuch &&
chmode_table[c].set_func != chm_orphaned)
return 0;
- if (chmode_table[c].set_func == NULL || chmode_table[c].set_func == chm_nosuch)
+ if (chmode_table[c].set_func == NULL)
chmode_table[c].mode_type = find_cflag_slot();
if (chmode_table[c].mode_type == 0)
return 0;
return arg;
}
-/* chm_*()
- *
- * The handlers for each specific mode.
- */
-void
-chm_nosuch(struct Client *source_p, struct Channel *chptr,
- int alevel, const char *arg, int *errors, int dir, char c, long mode_type)
-{
- if(*errors & SM_ERR_UNKNOWN)
- return;
- *errors |= SM_ERR_UNKNOWN;
- sendto_one(source_p, form_str(ERR_UNKNOWNMODE), me.name, source_p->name, c);
-}
-
void
chm_simple(struct Client *source_p, struct Channel *chptr,
int alevel, const char *arg, int *errors, int dir, char c, long mode_type)
break;
default:
- sendto_realops_snomask(SNO_GENERAL, L_ALL, "chm_ban() called with unknown type!");
+ sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "chm_ban() called with unknown type!");
return;
}
bool use_arg = dir == MODE_ADD ? cm->flags & CHM_ARG_SET :
dir == MODE_DEL ? cm->flags & CHM_ARG_DEL :
false;
- if (cm->set_func == NULL || cm->set_func == chm_nosuch)
+ if (cm->set_func == NULL)
{
sendto_one(source_p, form_str(ERR_UNKNOWNMODE), me.name, source_p->name, c);
return;
for (ms = modesets; ms < mend; ms++)
{
ChannelModeFunc *set_func = ms->cm->set_func;
- if (set_func == NULL)
- set_func = chm_nosuch;
set_func(fakesource_p, chptr, alevel, ms->arg, &errors, ms->dir, ms->mode, ms->cm->mode_type);
}