Skip to content
TG007 community snippet #124

Idle Check by 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.

By Snippets Added Dec 4, 2023
General IRC All snippets
mIRC script 80 lines
About this snippet

Overview

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.
Source code

mIRC script

80 lines · 1,827 characters
;###
;# 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" $+ . } }
 -
}
Community

Comments

Want to join the discussion? Sign in to TG007.
No comments yet. Start the discussion.