; /timedban ; ; To install this file please copy and paste into remotes, or save and /load -rs P:ath\to\File.ext in any mIRC. ; Use: ; ---- ; ; /timedban <#channel> [reason] ; ; Adds a timed ban to a channel using ChanServ for a certain mask/nick with the specified duration and reason. ; If no reason is specified then it will just use 'Lamer!'. ; ; Durations must be input in character formation, e.g. 1M will add a ban for one month, 1h will add a ban for one hour etc. ; Kickban output will contain a reason, their nick (if available) and the durationthe ban will end. ; ; Note: This script is *ONLY* for srvx, X2 and X3 IRC services. This will not work on anything else. ; Also, duration for 1y is 365d and 1M is 30d. ; ; Examples: ; --------- ; ; /timedban #Chat Floodbot[1] 1d Flooding. ; /timedban #Chat SomeKid 1h30m Caps abusing, Flooding and Repeating. Refusing to stop. ; /timedban #Woodstock Jigsy 1y Weeeee! xD ; ; ... You get the idea. ; alias timedban { if (($1) && ($2) && ($3)) { var %i = 0, %newduration = 0, %x = y 31536000,M 2592000,w 604800,d 86400,h 3600,m 60,s 1 while (%i < $regex(TimedBan,$3,/(\d+[yMwdhms])/g)) { inc %i 1 var %newduration = %newduration + $calc($left($regml(TimedBan,%i),-1) * $gettok($matchtokcs(%x,$right($regml(TimedBan,%i),1),1,44),2,32)) } cs addtimedban $1 $2 $3 $iif($4-,$ifmatch,Lamer!) - [[ $+ $iif($gettok($ialchan($2,$1,1),1,33),4Nick: $ifmatch $+ $+($chr(44),$chr(32))) $+ 4Ends: $asctime($calc($ctime + %newduration),ddd mmm dd yyyy -- HH:nn:ss) $gettok($asctime(zzzz),2,32) $+ ]] } else { echo -ac info * /timedban: insufficient parameters } }