mIRC Home    About    Download    Register    News    Help

Print Thread
>2 times ... kill #7351 19/01/03 11:58 AM
Joined: Dec 2002
Posts: 76
A
aZnLupin Offline OP
Babel fish
OP Offline
Babel fish
A
Joined: Dec 2002
Posts: 76
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.

Re: >2 times ... kill #7352 19/01/03 12:32 PM
Joined: Dec 2002
Posts: 1,922
O
Online Offline
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
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.

Re: >2 times ... kill #7353 19/01/03 12:41 PM
Joined: Dec 2002
Posts: 2,985
Watchdog Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
Why don't you allow three attempts then have the bot issue a k:line instead? Killing alone won't stop any re-attempts.

Re: >2 times ... kill #7354 19/01/03 12:54 PM
Joined: Dec 2002
Posts: 76
A
aZnLupin Offline OP
Babel fish
OP Offline
Babel fish
A
Joined: Dec 2002
Posts: 76
i hate bot j/k smile