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:
on *:snotice:* Failed OPER*:{
if ( Failed = $4 ) {
inc -u60 %failed. $+ $8
if %failed. [ $+ [ $8 ] ] > 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.
on *:snotice:& & & Failed OPER*:{ ...
& matches a signle word.
Reference.