tglogo.png
0 LIKES

Snippet


Idle Check by YmmaX

In Category General IRC Posted by Snippets On 12/04/23
Tags: idle ymmax 

This script is mass /whois-ing your channel (except @ops), and you can BAN idlers with a click. Also is showing in red colors the idle time if is more than 4 hours.
;###
;# Idle Check & BAN
;# yM]x @ UnderNet
;###

RAW 311:*: {
 if (%idlecheckvalue == true) {
  if ($2 isop %idlecheckchan) { halt }
  if ($2 !isop %idlecheckchan) {
   echo %idlecheckchan -
   echo %idlecheckchan * $2 $+ ! $+ $3 $+ @ $+ $4-
   halt
  }
 }
}
RAW 319:*: {
 if (%idlecheckvalue == true) { halt }
}
RAW 312:*: {
 if (%idlecheckvalue == true) { halt }
}
RAW 313:*: {
 if (%idlecheckvalue == true) {
  if ($2 isop %idlecheckchan) { halt }
  if ($2 !isop %idlecheckchan) {
   echo %idlecheckchan * $2 is an IRC Operator
   halt
  }
 }
}
RAW 330:*: {
 if (%idlecheckvalue == true) {
  if ($2 isop %idlecheckchan) { halt }
  if ($2 !isop %idlecheckchan) {
   echo %idlecheckchan * $2 is logged in as $3
   halt
  }
 }
}
;If the allowed idle time is other than 4, change the value for this RAW.
RAW 317:*: {
 if (%idlecheckvalue == true) {
  if ($3 >= $calc( 4 * 60 * 60 )) {
   /echo %idlecheckchan * $2 has been idle4 $duration( $+ $3 $+ ) $+ 
   /echo %idlecheckchan * $2 has chan-idle: $duration($nick(%idlecheckchan,$2).idle)
   /echo %idlecheckchan -
   halt
  }
 }
}

alias /idlecheck {
 if ($active ischan) {
  .set %idlecheckvalue true
  .set %idlecheckchan $active
  .set %idlecheckn $nick($active,0)
  .set %idlechecki 1
  :next
   if (%idlechecki > %idlecheckn) { goto done }
   if (%idlechecki <= %idlecheckn) {
    whois $nick($active,%idlechecki) $nick($active,%idlechecki)
    inc %idlechecki
    goto next
   }
  :done
   .timer 1 300 /.set %idlecheckvalue false
   .timer 1 300 /.unset %idlecheck*
 }
}

menu channel {
 -
 Idle Check:idlecheck
 -
}
menu nicklist {
 -
 BAN (Idle):{ if ($1 != $null) { /.msg x ban # $address($1,2) 1h 100 Do not park in this channel, please - your idle was: $$?="Idle Time" $+ . } }
 -
}


Comments 0


Please note that on our website we use cookies necessary for the functioning of our website, cookies that optimize the performance. To learn more about our cookies, how we use them and their benefits, please read our Cookie Policy.
I Understand