Guys I need a code for host Idle so if the host is idleing for a certain of time the script will dehost him!
hey nick you have been idle for a long time -o $nick
menu * {
Start Idle-Host Scan (every 5 minutes):/.timerhostidler 0 300 hostidle
}
alias hostidle {
set %hi 1
:next
set %hnick $nick($comchan($me,1),%hi)
if (!%hnick) { halt }
if (%hnick == $me) { inc %hi | goto next }
if ((%hnick isop $comchan($me,1)) && (%hnick !isowner $comchan($me,1))) { whois %hnick }
inc %hi
goto next
}
raw 317:*:{
if ($3 > 600) {
mode $comchan($me,1) -o $2
msg $comchan($me,1) Sorry $2 You have been at Idle Too Long $duration($3,1)
}
}
Here, work from that..its works right now just need to add what he wants.
Custom Computer
AMD Athlon 64 x2 Dual Core 5200+
Asus M2N-SLI MOB
2GB DDR2 @ 800mhz
160GB Hard Drive
NVidia GeForce 8400GS 256
Well the scripts checks the time you set.
Custom Computer
AMD Athlon 64 x2 Dual Core 5200+
Asus M2N-SLI MOB
2GB DDR2 @ 800mhz
160GB Hard Drive
NVidia GeForce 8400GS 256
Well look on Rumbaar's forum that's where the code came from.
Custom Computer
AMD Athlon 64 x2 Dual Core 5200+
Asus M2N-SLI MOB
2GB DDR2 @ 800mhz
160GB Hard Drive
NVidia GeForce 8400GS 256
Try this code...
alias idledeop { mode $comchan(%idledeop,1) -o %idledeop }
on *:JOIN:#:{
if ($nick != $me) {
set %idlenick $+ $nick $nick
.timer $+ %idlenick $+ $nick off
.timer $+ %idlenick $+ $nick $+ 1 off
.timer $+ %idlenick $+ $nick 1 299 set %idledeop %idlenick $+ $nick
.timer $+ %idlenick $+ $nick $+ 1 1 300 idledeop
}
}
on *:TEXT:*:#:{
if (%idlenick $+ $nick) {
.timer $+ %idlenick $+ $nick off
.timer $+ %idlenick $+ $nick $+ 1 off
.timer $+ %idlenick $+ $nick 1 299 set %idledeop %idlenick $+ $nick
.timer $+ %idlenick $+ $nick $+ 1 1 300 idledeop
}
}
on *:OP:#:{
if ($nick != $me) {
set %idlenick $+ $nick $nick
.timer $+ %idlenick $+ $nick off
.timer $+ %idlenick $+ $nick $+ 1 off
.timer $+ %idlenick $+ $nick 1 299 set %idledeop %idlenick $+ $nick
.timer $+ %idlenick $+ $nick $+ 1 1 300 idledeop
}
}
on *:OWNER:#:{
if ($nick != $me) {
set %idlenick $+ $nick $nick
.timer $+ %idlenick $+ $nick off
.timer $+ %idlenick $+ $nick $+ 1 off
.timer $+ %idlenick $+ $nick 1 299 set %idledeop %idlenick $+ $nick
.timer $+ %idlenick $+ $nick $+ 1 1 300 idledeop
}
}
Well look on Rumbaar's forum that's where the code came from.
I posted it on rumbaars forum lol
it checks every 5 minutes but only dehosts after 10 minutes of idle
therefore every 5 minutes it checks the hosts then if they have been at idle more than 10 minutes it dehosts them
This code works fine with me but when it msg the chan it says you have been idle for to long and instead of the $duration , it gives the msn clock emoticon , lol here is the code am using
#idle on
alias hostidle {
 var %i = 1, %chan = $comchan($me,1)
 var %nick = $nick(%chan,1,o)
 while (%nick) {
  if (%nick != $me) && ($nick(%chan,%i)$idle >= 3600) {
   mode %chan -o %nick
   msg %chan Sorry %nick $+ , You have been idle too long ( $+ $duration($nick(%chan,%i)$idle) $+ )
  }
  inc %i
  %nick = $nick(%chan,%i,0)
 }
}
#idle end
menu * {
 Idle-Host ( $+ $group(#idle) $+ )
 .On:{ .enable #idle | echo -a 4..::Idle-Host Enabled::.. }
 .Off:{ .disable #idle | echo -a 4..::Idle-Host Disabled::.. } Â
 .Start Idle-Host Scan (every 5 minutes):/.timerhostidler 0 300 hostidle
}
Rudeboy yea it set to dehost after 10 mins , for my code I posted now it dehost after 1 hour 3600 = 1 hour
Sign in to reply or start a new topic where your account has permission.