Skip to content
MSN Addons

Host Idle

A TG007 community discussion started by bonTy.

Discussion 12 posts
Page 1 of 1
Open
Topic #2927 · 12 published posts · 866 views

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

for any user or just one user?

For any use and I can add my trust list to halt them with this code

if ($read(~script.trust.txt,s,$msngkshort($nick)) || ($nick == $me)) halt

I halt most of friends by this command so I want it to halt only this users !

sorry, i thought this was easy. it isn't. only part i cannot do is to whisper or deop the person who has been idling for a certain amount of time.

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

OK I added it , do I have to check my slef every time or it check alone ?

I clicked on the Start Idle-Host Scan (every 5 minutes) will that make it work alone or wat ?!

 

 

EDIt:

Does that means it will dehost who will set away for 5 mins ?

Edited Feb 21, 2005 4:50 PM by bonTy

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

Didnt work with me it checks the time but not dehosting!

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
 }
}

Edited Feb 21, 2005 5:51 PM by Warrior124
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

Edited Feb 21, 2005 10:36 PM by bonTy