mIRC Homepage
Posted By: aZnLupin >2 times ... kill - 19/01/03 11:58 AM
i have:
Code:
on *:snotice:* Failed OPER*: {
  if ( Failed = $4 ) {
    kill $8 No O-lines for your host - Fake Oper
  }
}

can you help me set: if Failed OPER => 2, i'll kill $8.
Posted By: Online Re: >2 times ... kill - 19/01/03 12:32 PM
By creating a temporary variable, %failed.<nick>, and increasing its value by 1 each time one fails to oper, you can keep track of his previous attempts.

Here's a non-tested example:
Code:
on *:snotice:* Failed OPER*:{ 
  if ( Failed = $4 ) { 
    inc -u60 %failed. $+ $8
    if %failed. [ $+ [ $8 ] ] &gt; 2 {
      kill $8 No O-lines for your host - Fake Oper 
    }
  }
}

By the way, there's no need for the if ( Failed = $4 ) condition. instead, you can use the & wildcard char (ampersand) in the matchtext area.
Code:
on *:snotice:&amp; &amp; &amp; Failed OPER*:{ ...

& matches a signle word. Reference.
Posted By: Watchdog Re: >2 times ... kill - 19/01/03 12:41 PM
Why don't you allow three attempts then have the bot issue a k:line instead? Killing alone won't stop any re-attempts.
Posted By: aZnLupin Re: >2 times ... kill - 19/01/03 12:54 PM
i hate bot j/k smile
© mIRC Discussion Forums