char buf1[60];
int carg=2,limdone=0;
sstring *newkey=NULL;
- unsigned int newlim=0;
+ int newlim=0;
if (cargc<1) {
chanservstdmessage(sender,QM_NOTENOUGHPARAMS,"chanmode");
forceflags |= CHANMODE_LIMIT;
denyflags &= ~CHANMODE_LIMIT;
newlim=rcp->limit;
+ } else if ((forceflags & CHANMODE_LIMIT) && (newlim <= 0 || newlim >= 65535)) {
+ newlim=0;
+ forceflags &= ~CHANMODE_LIMIT;
}
/* It parsed OK, so update the structure.. */
flag_t forcemodes; /* Forced modes */
flag_t denymodes; /* Denied modes */
- short limit; /* Limit to enforce if +l is set */
+ unsigned short limit; /* Limit to enforce if +l is set */
short autolimit; /* How many slots to leave when autolimiting */
short banstyle; /* Ban style for +b type bans */