Remove-Access for Idlers

By Noutrious on Oct 05, 2008

Simply checks for idlers at channel(-s) every 30 seconds and if anyone (besides exceptions and script user) with access has idled more than allowed at %maxidle variable, that persons access will be removed.

If no exceptions, remove or leave blank that variable.
For one channel use just #yourchan.
P.S. %maxidle is in seconds.

on *:CONNECT:.timer 0 30 checkidles
alias checkidles {
  ;Editable part
  var %channels = #yourchan,#yourchan2
  var %exceptions = nick1,nick2,nick3
  var %maxidle = 600
  ;End of Editable part
  var %chans = $numtok(%channels,44)
  while %chans {
    var %channel = $gettok(%channels,%chans,44), %nicks = $nick(%channel,0,ohv)
    while %nicks {
      var %nick = $nick(%channel,%nicks,ohv)
      if ($nick(%channel,%nick).idle >= %maxidle) && (!$findtok(%exceptions,%nick,44)) && (%nick != $me) mode %channel -oahv %nick %nick %nick %nick
      dec %nicks
    dec %chans


Sign in to comment.
The_One_And_Only   -  Jan 12, 2010

is it possible to make this script so that if a user has a voice it will devoice them on maxidle
el is user does not have a voice it kicks the user out of the room wit message u have said noting for "amount of time" ?
i realy would like such script.

Cheiron   -  Oct 06, 2008

many ta's for that. gonna have a nose at it and give it a run :)

Noutrious   -  Oct 06, 2008

napa182, yes, i thinked about that when making it, but i maked it more for the starters, so sticked to the "lame" version :)
napalm', thank you.
Cheiron, as napa182 & Gummo mentioned - the idle time starts counting from the time you join the channel (it is 0 then) and increases till any action from the nick & then again starts from 0, not basing on the IRCd version.
rhasttaff, actually yes, i will change that, thanks.

rhasttaff   -  Oct 06, 2008

good script Noutrious ;)
but i like it more in a *On :connect: {** event :)

Jah Bless´´´

Gummo   -  Oct 05, 2008

That being mIRC itself holds record of the idle times for each nick in the channel, rather than requesting the users' idle times network-wide, via /whois nick nick.

napa182   -  Oct 05, 2008

the idle times used on this is the idle times from when you join the room

Cheiron   -  Oct 05, 2008

i have one question and a decent one too. server i use has 2 which it uses for the chat but linked.. IRC3 + IRC4. obviously if you are on the same IRC you will be able to get the idle times but if you are on different IRC's you wont. to get idle time across the 2 you have to do the /whois for it to show.

will yours allow for this and if not any chance of an upgrade to include this type of setup

napalm`   -  Oct 05, 2008

Something original. Cheers.


napa182   -  Oct 05, 2008

this line

mode %channel -oahv %nick %nick %nick %nick

could be

mode %channel -oahv $str($v1 $chr(32),4)

but all in all nice work

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.