mIRC Home    About    Download    Register    News    Help

Print Thread
Page 2 of 2 1 2
Joined: Feb 2006
Posts: 307
N
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Feb 2006
Posts: 307
I think this is the code that will work for ips (it wont msg two times the same ip)

Code:
on *:text:*:?: {
  if $read(Hi.txt,w,$1-) {
    inc -u600 %autohi. $+ $address($nick,4)
    if ($($+(%,autohi.,$address($nick,4)),2) < 3) {
      .timer 1 3 msg $nick !$gettok($read(Hi.txt,$readn),-1,45)
    }
  }
}


any corrections?

Joined: Feb 2006
Posts: 307
N
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Feb 2006
Posts: 307
Code:
on *:text:*:?: {
  if $read(hi.txt,w,$1-) {
    inc -u600 %autohi. $+ $address($nick,4)
    if ($($+(%,autohi.,$address($nick,4)),2) < 3) {
      .timer 1 3 msg $nick !$gettok($read(hi.txt,$readn),-1,45)
    }
  }
}


this script doesnt work

it doesnt say the proper reply

whats wrong? frown

PS:

I basically want to match specific queries with specific automatic replies, but to work only once in 600 secs for the same ip/host (*!*@anything)

the specific queries and their automatic replies should be stored in hi.txt in this format:
specificquery - reply
(supporting wildcards)

Last edited by nataliad; 29/04/07 10:21 PM.
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
There's no reason to have a ! before $gettok in there.


Invision Support
#Invision on irc.irchighway.net
Joined: Feb 2006
Posts: 307
N
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Feb 2006
Posts: 307
thanks

I think this works better

Code:
on *:text:*:?:{
  if ($fprot) { return }
  if ($1- iswm hi *) { msg $nick hello $nick | fprot 100 }
  elseif ($1- iswm bye *) { msg $nick goodbye $nick | fprot 100 }
}
alias -l fprot {
  if ($isid) { return $hget(fprot,$site) }
  elseif ($1 isnum) { hadd -mz fprot $site $1 }
}


and it doesnt consumes resources trying to read the text file

however there is a problem:

it stops replying to the same ip if it has replied once to ANY of the hi,bye,etc to this ip

I want to make it stop replying to the same ip if it has replied once to the SAME hi,bye,etc

I mean if someone tells me hi, and then (before 100 secs expire) bye, I want to reply to both

I dont want to reply to the second time he says hi inside 100 seconds, not to any other query he send inside 100 secs

thanks

Last edited by nataliad; 01/05/07 01:36 AM.
Page 2 of 2 1 2

Link Copied to Clipboard