mIRC Homepage
Posted By: The_Game Channel limits - 23/01/03 03:40 AM
can someone help me out on making an "on JOIN" command that when a user joins my channel that the channel limit will increase by 2? Thanks in advance
Posted By: Collective Re: Channel limits - 23/01/03 06:33 AM
Like this?

Code:
on @*:JOIN:[color:green]#channelname[/color]:{
  mode # +l $calc($gettok($chan(#).mode,2,32) + 2)
}
Posted By: The_Game Re: Channel limits - 23/01/03 07:29 AM
That works Thanks Collective...
Posted By: Aubs Re: Channel limits - 23/01/03 05:10 PM
Do you want it so when someone joins a channel:
Code:
Users in chan  |  Chan Limit
 1             |   3
 2             |   4
 3             |   5
 4             |   6
 5             |   7
 6             |   8
 7             |   9
 8             |   10
 9             |   11
10             |   12
11             |   13
12             |   14

so the channel limit is the number of users + 2

or:
Code:
Users in chan  |  Old Limit   | When ONE person joins,
               |  would be    | New Channel Limit
 1             |   3          |  5
 2             |   4          |  7
 3             |   5          |  9
 4             |   6          |  11
 5             |   7          |  13
 6             |   8          |  15
 7             |   9          |  17
 8             |   10         |  19
 9             |   11         |  21
10             |   12         |  23
11             |   13         |  25
12             |   14         |  27

you see the difference?

if you want the second, then use what Collective said.

If you want the first one, where there is space for 2 more people to join (like an eggdrop bot), use:

mode # +l $calc($nick($chan,0) + 2)

Code:
on @*:JOIN:#ChannelName:{
  mode # +l $calc($nick($chan,0) + 2)
}
Posted By: Online Re: Channel limits - 23/01/03 06:46 PM
Immediate update of the channel limit, wouldn't be that effective. After all, channel limit is intended to reduce the number of flood bots that can join at once.

If you update it immediately as the first flood bot arrives, that will allow the other ones to join too. we want to keep them out.

I'd go for a timer, 3secs delayed, which will do the update.

Code:
On @*:join:#:{
   .timerlimit 1 3 mode # +l $calc($nick(#,0) + 3)
}
Posted By: The_Game Re: Channel limits - 23/01/03 08:19 PM
Thank guys for the quick responses i did get it to work thanks to collectives syntax. Whenever a person joins it changes the set channel limit by 2. I will see how this works for the time being. Again thank you all.
© mIRC Discussion Forums