mIRC Home    About    Download    Register    News    Help

Topic Options
#166561 - 12/12/06 01:05 PM prot kick
pouncer Offline
Hoopy frood

Registered: 02/10/05
Posts: 827
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

Top
#166565 - 12/12/06 01:32 PM Re: prot kick [Re: pouncer]
Zonk Offline
Babel fish

Registered: 27/01/03
Posts: 53
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 =)

Top
#166621 - 13/12/06 02:31 AM Re: prot kick [Re: Zonk]
pouncer Offline
Hoopy frood

Registered: 02/10/05
Posts: 827
thanks, appreciate it

Top