if (BadPtr(tmpstr))
{
/* Invalid ban. See if we can send an error about that */
- if ((param[0] == '~') && MyClient(cptr) && !bounce)
+ if ((param[0] == '~') && MyClient(cptr) && !bounce && (strlen(param) > 2))
{
Extban *p = findmod_by_bantype(param[1]);
if (p && p->is_ok)
tmpstr = clean_ban_mask(param, what, cptr);
if (BadPtr(tmpstr))
break; /* ignore except, but eat param */
- if ((tmpstr[0] == '~') && MyClient(cptr) && !bounce)
+ if ((tmpstr[0] == '~') && MyClient(cptr) && !bounce && (strlen(param) > 2))
{
/* extban: check access if needed */
Extban *p = findmod_by_bantype(tmpstr[1]);
tmpstr = clean_ban_mask(param, what, cptr);
if (BadPtr(tmpstr))
break; /* ignore except, but eat param */
- if ((tmpstr[0] == '~') && MyClient(cptr) && !bounce)
+ if ((tmpstr[0] == '~') && MyClient(cptr) && !bounce && (strlen(param) > 2))
{
/* extban: check access if needed */
Extban *p = findmod_by_bantype(tmpstr[1]);