Channel Limiter

By Cheiron on Nov 19, 2007

This is my second script submission for Hawkee members.

a very harsh channel limiter where you have predefined the amount of channels a user can be in whilst in your channel also. at the moment this is set to 6 channels. which means they can be in 6rooms at the same time. if they join with anymore than that.. bye bye :D

kicks and bans.

Obviously... change #channel to your channel
and the > 6 to number of rooms you wish the trigger to take effect from.
Then edit the "Room limit is ..... number

i have had a small issue in it working in other channels other than the one i have set it too.. but hopefully someone out there can do a debug for me.that is the only issue though. otherwise it is ok.

comments please?

cheers, Cheiron

on @*:join:#channel:{ whois $nick }
raw 319:*:{
  set %nochannels $3-
  if ($numtok(%nochannels,32) > 6) {
    var %i = $chan(0)
    while (%i) {
      if ($2 ison $chan(%i)) {
        kick $chan(%i) $2 Room limit is 6 as defined in the channel rules
        ban $chan(%i) $2 3
      }
      dec %i
    }
    unset %nochannels
  }
}

Comments

Sign in to comment.
BunTai   -  Nov 21, 2007

good remote...
but dont u think that we make channel for user join...
if me..
i dont wanna limit my channel..
but nice scripting..
i\'ve dont ever seen it b4..
tq

 Respond  
napa182   -  Nov 20, 2007

SLS10 you can try /server irc.chatrealm.net 6667 it\'s a new server

 Respond  
Cheiron   -  Nov 20, 2007

as for networks.. there are far too many to choose from unfortunately. i run on a private server with 490 channels and 2000 users on average

 Respond  
SLS10   -  Nov 20, 2007

Should work well in theory. But alas, there\'s no channels I find suitable...

Anyone know of a network that\'s not too big, yet not too small?

 Respond  
Cheiron   -  Nov 19, 2007

this was always gonna be the issue lol... this is a tad complex to what i am usually writing. thought i would try and be smart. heh! the coding worked. ops are auto protected by my bot anyway hence why i think i forgot to include ops in the loop. also my ops use a set mode to escape the script knowing where they are... i wont post the mode for obvious reasons lol..

ty for the /var suggestion as a replacement for the /set /unset also.

much appreciated

 Respond  
brinxy   -  Nov 19, 2007

Yes, not bad. But you should check if you are an op in the while loop just to make sure you don\'t receive errors.

 Respond  
guest598594   -  Nov 19, 2007

good job, but a couple suggestions:

1) u should use /var rather than /set and /unset :)
2) try /ban -k (ban and kick together)

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.