|
Joined: Jan 2006
Posts: 107
Vogon poet
|
OP
Vogon poet
Joined: Jan 2006
Posts: 107 |
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
Hoopy frood
|
Hoopy frood
Joined: Aug 2005
Posts: 1,052 |
|
|
|
|
Joined: Aug 2005
Posts: 1,052
Hoopy frood
|
Hoopy frood
Joined: Aug 2005
Posts: 1,052 |
well i tested the script its not looping properly i dont know what im not seeing.
|
|
|
|
Joined: Aug 2004
Posts: 7,168
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,168 |
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 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
}
}
|
|
|
|
Joined: Jan 2006
Posts: 107
Vogon poet
|
OP
Vogon poet
Joined: Jan 2006
Posts: 107 |
Thanks RussellB works just fine, one thing though, anyway to make it automatic, so I dont wake and find loads of idlers.
Fire
|
|
|
|
Joined: Aug 2004
Posts: 7,168
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,168 |
Tried to edit my last code, but waited too long, so here's the updated 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)
|
|
|
|
Joined: Jan 2006
Posts: 107
Vogon poet
|
OP
Vogon poet
Joined: Jan 2006
Posts: 107 |
Thanks again RusselB sadly the auto kick dont work  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
|
|
|
|
|