DNB claims this will work. Lets seeeeeeeee :)
This commit is contained in:
parent
435e02be63
commit
bd98477ea6
1 changed files with 6 additions and 11 deletions
|
@ -394,21 +394,16 @@ static void do_limit_set(ls_channel *ls_chan, Channel *c)
|
|||
{
|
||||
static char limitsize[10];
|
||||
unsigned int limit;
|
||||
unsigned int grace;
|
||||
|
||||
if( c->users != ( c->limit - lsbuffer ) )
|
||||
{
|
||||
limit = ( c->users + lsbuffer );
|
||||
/* if the limit is within the grace, don't change anything */
|
||||
if (c->limit < limit) {
|
||||
/* its a increase in users */
|
||||
if ((limit - c->limit) < lsgrace) {
|
||||
return;
|
||||
}
|
||||
} else if (c->limit > limit) {
|
||||
/* its a decrease in users */
|
||||
if ((c->limit - limit) < lsgrace) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
grace = ( limit - c->limit );
|
||||
if ( grace < lsgrace) {
|
||||
return;
|
||||
}
|
||||
ircsnprintf( limitsize, 10, "%d", limit );
|
||||
irc_cmode( ls_bot, ls_chan->name, "+l", limitsize );
|
||||
}
|
||||
|
|
Reference in a new issue