mIRC Home    About    Download    Register    News    Help

Print Thread
#159869 20/09/06 09:01 PM
Joined: Jan 2006
Posts: 108
F
Vogon poet
OP Offline
Vogon poet
F
Joined: Jan 2006
Posts: 108
Hi been looking for one of these things and not found anything that works. Anyone got a good one or know where I can find one?

Thanks
Firestarter

Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
Post deleted by Lpfix5


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
#159871 20/09/06 10:02 PM
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
well i tested the script its not looping properly i dont know what im not seeing.


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
#159872 20/09/06 10:29 PM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
I didn't check Lpfix5's code to see if I could find why it's not working, but instead I wrote (and tested) this
Code:
 menu channel,nicklist {
  Kick Idlers : idle.kick $network $chan
  Set Allowed Idle Time : idle.time $network $chan
}
alias idle.time {
  set %idle $$?="Allowed idle time in minutes or mm:ss format"
  set $+(%,idle.time.,$1,.,$2) $iif($chr(58) isin %idle,$duration(%idle),$calc(%idle * 60))
}
alias -l idle.kick {
  set %chan $2
  if !$+(%,idle.time.,$1,.,$2) {
    idle.time $1 $2
  }
  var %a = 1
  while %a <= $nick($2,0) {
    if $nick($2,%a).idle > $($+(%,idle.time.,$1,.,$2),2) {
      .ban -ku $2 $nick($2,%a) No idling in $2
    }
    inc %a
  }
}
 

#159873 20/09/06 11:29 PM
Joined: Jan 2006
Posts: 108
F
Vogon poet
OP Offline
Vogon poet
F
Joined: Jan 2006
Posts: 108
Thanks RussellB works just fine, one thing though, anyway to make it automatic, so I dont wake and find loads of idlers.

Fire

#159874 21/09/06 12:55 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Tried to edit my last code, but waited too long, so here's the updated
Code:
 menu channel,nicklist {
  Kick Idlers : idle.kick $network $chan
  Set Allowed Idle Time : idle.time $network $chan
  Auto Scan On : auto on $network $chan
  Auto Scan Off : auto off $network $chan
}
alias auto {
  if $1 == off {
    $+(.timer,$2,.,$3) off
  }
  else {
    if !$+(%,idle.time.,$1,.,$2) {
      idle.time $1 $2
    }
    $+(.timer,$2,.,$3) 0 $$?="Time between scans in seconds" idle.kick $network $chan}
  }
}
alias -l idle.time {
  set %idle $$?="Allowed idle time in minutes or mm:ss format"
  set $+(%,idle.time.,$1,.,$2) $iif($chr(58) isin %idle,$duration(%idle),$calc(%idle * 60))
}
alias -l idle.kick {
  set %chan $2
  if !$+(%,idle.time.,$1,.,$2) {
    idle.time $1 $2
  }
  var %a = 1
  while %a <= $nick($2,0) {
    if $nick($2,%a).idle > $($+(%,idle.time.,$1,.,$2),2) {
      .ban -ku $2 $nick($2,%a) No idling in $2
    }
    inc %a
  }
}
 


I tried to get it so that if the Automatic was ON, only the Off option would show, and vice versa, but I wasn't able to do so (although I'm pretty sure I've seen it done before, so someone else might be able to fix up my code with that option)

#159875 21/09/06 01:25 PM
Joined: Jan 2006
Posts: 108
F
Vogon poet
OP Offline
Vogon poet
F
Joined: Jan 2006
Posts: 108
Thanks again RusselB sadly the auto kick dont work frown but it is better than nothing and the manual way does save me looking through the log buffer to see who been idling LOL

Regards
Fire


Link Copied to Clipboard