mIRC Homepage
Posted By: pouncer prot kick - 12/12/06 01:05 PM
im a bot confused as to how to do this.

basically what i want to do is when a user goes 'away' (raw 822)
i want to have a timer on them. if they are still away after 2 mins, warn them. after 5 mins anothr warning. after 7 mins, kick them.

its the timer thing that im unsure about. hope someone can help me
Posted By: Zonk Re: prot kick - 12/12/06 01:32 PM
ive never seen raw 822, so i dunno the syntax of it
basically what you need is (im just gonna assume that $2 is the nick of the person going away, if not -> just change that)
Code:
raw 822:*: {
  .timerawaywk1. $+ $2 1 120 notice $2 Do not idle in #yourchanhere
  .timerawaywk2. $+ $2 1 300 notice $2 Last Warning
  .timerawaywk3. $+ $2 1 420 kick #yourchanhere $2 Dont go away..
}

you also need events that will stop the timers if he parts/quits/comes back from away

heres a start
Code:
on *:part:#yourchanhere: {
  var %i = 1
  while ($timer($+(awaywk,%i,.,$nick))) { 
    $+(timerawaywk,%i,.,$nick) off 
    inc %i
  }
}

on *:quit: {
  var %i = 1
  while ($timer($+(awaywk,%i,.,$nick))) { 
    $+(timerawaywk,%i,.,$nick) off 
    inc %i
  }
}


i dunno the raw for coming back, so youd have to do that on your own, but that should be possible given this start =)
Posted By: pouncer Re: prot kick - 13/12/06 02:31 AM
thanks, appreciate it
© mIRC Discussion Forums