mIRC Home    About    Download    Register    News    Help

Print Thread
#236963 04/04/12 11:45 PM
Joined: Nov 2011
Posts: 30
A
arc123 Offline OP
Ameglian cow
OP Offline
Ameglian cow
A
Joined: Nov 2011
Posts: 30
want to make addon for make auto part for me from a channel called for example #chan1 when im idle more than 50 mins

ty

arc123 #236964 05/04/12 12:56 AM
Joined: Mar 2012
Posts: 38
Ameglian cow
Offline
Ameglian cow
Joined: Mar 2012
Posts: 38
This is just something put together real fast, but can be extended upon fairly easily..

Set the channel(s) you want this to work on as shown below:

Code:
/set %noidlechans #Channel
/set %noidlechans #Channel1,#Channel2,#Channel3


Then use the following code to have it work...

Set the time you want to be allowed idle in mins here, in the '%noidle' variable.
(Which is currently set to 50)

Code:
alias noidle {
  var %noidle = 50, %idle = $nick($1,$me).idle
  if (%idle >= $calc(%noidle * 60)) {
    echo -st Idled $1 for $duration($v1) , max idle allowed $duration($v2) ... Parting $1
    part $1
  }
}
on me:*:join:%noidlechans: { .timernoidle. $+ $chan 0 10 noidle $chan }
on me:*:part:%noidlechans: { if ($timer($+(noidle.,$chan))) { .timernoidle. $+ $chan off } }


This should be pretty simple to understand. Good luck and happy scripting. =)


Lost in your digital reality.
#mIRC / #Helpdesk on DALnet.

Link Copied to Clipboard