mIRC Home    About    Download    Register    News    Help

Print Thread
#166561 12/12/06 01:05 PM
Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
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

pouncer #166565 12/12/06 01:32 PM
Joined: Jan 2003
Posts: 53
Z
Babel fish
Offline
Babel fish
Z
Joined: Jan 2003
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 =)

Zonk #166621 13/12/06 02:31 AM
Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
thanks, appreciate it


Link Copied to Clipboard