mIRC Channel Limiter

By Joe2209144 on Jan 09, 2009

This is a very simple and basic channel limiter for your IRC channel(s). It could be written to include better features or something, but this script does work and it gets the job done.

Please don't criticize my work. You can leave comments but don't say things like "this script sucks, there are better ones". If you don't have anything nice to say, don't say anything at all, seriously.

Basically whenever a user joins your channel, the script sets +l on the given channel (if +l isn't already set on the channel). It uses $nick() to return the total number of nicks on the channel and then increases the user limit by 1 every 30 seconds after a user joins. When a user parts or quits, the script uses $chan() to return the +l limit and uses $calc to reduce that number by 1.

The script also re-enables the +l channel mode if another operator disables it, even if they specify a list of modes to disable (e.g. -qoahkl).

Very effective and it works great. Please enjoy, and feel free to post comments and ideas on how to make it better!

(note: you must change '#chan' in the script to your channel name!)

on *:JOIN:#chan: {
  set %usernum $nick(#chan,0)
  .timer 1 30 mode #chan +l $calc($nick(#chan,0) + 2)
}
on *:PART:#chan: {
  .timer 1 30 mode #chan +l $calc($chan(#chan).limit - 1)
}
on *:QUIT: {
  if ($chan(#chan).limit) && (%usernum < $nick(#chan,0)) {
    .timer 1 30 mode #chan +l $calc($chan(#chan).limit - 1)
  }
}
on *:MODE:#chan: {
  if ($left($1,1) == $chr(45)) && (l isin $1) {
    mode #chan +l $calc($nick(#chan,0) + 2)
  }
}

Comments

Sign in to comment.
nrscripter   -  Oct 02, 2011

For all use on more than 1 channel, just us on :JOIN:#: , on PART:#: etc....

 Respond  
nrscripter   -  Oct 02, 2011

timers conflict on /hop command if you're doing the /hop. needs if ($nick == $me) { halt } under on join, on part, and on quit. otherwise, it's a great script.

 Respond  
ShadowMan   -  Jan 21, 2009

If you wish it to work on all channels you are on, then just change the #chan to #

 Respond  
Bluepower10   -  Jan 17, 2009

I'll try it.

 Respond  
Aucun50   -  Jan 16, 2009

Think its #channel1 && #channel2 && #channel3 but i could be wrong

 Respond  
Bluepower10   -  Jan 16, 2009

Well then, does it only work for one channel or can you do this:

channel1,#channel2,#channel3 and so on?

 Respond  
Aucun50   -  Jan 16, 2009

"COuldn't you just change #chan to $chan?"

No you can't

 Respond  
Bluepower10   -  Jan 16, 2009

COuldn't you just change #chan to $chan?

 Respond  
56Avenue   -  Jan 11, 2009

Isn't that usfull

 Respond  
Aucun50   -  Jan 09, 2009

" Aucun50 sets mode: +l 10" All you have to do is that, where 10 = number of users.
"
Aucun50 sets mode: -l" No limit

But then again this looks handy if your lazy like me :)

 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.