mIRC Homepage
Posted By: vinifera ban script help needed - 27/01/12 01:49 AM
for my bot I have this

Code:
on !@*:join:#:{
  if ($level($fulladdress) == 10) { .mode $chan +v $nick }
  if ($level($fulladdress) > 10) { .mode $chan +o $nick }
  if ($readini(blacklist.ini,blackmark,$address($nick,2)) == 1) { .ban -k %empire $nick 2 you just got pooped on }
  if ($readini(blacklist.ini,blackmark,$address($nick,4)) == 1) { .ban -k %empire $nick 4 you just got pooped on }  
}



problem is that second ban detection (last line with ban type 4) doesn't trigger at all
even if correct ban type is added into blacklist.ini


is there a way to make them so they both work ?
(for each ban type, not both for one, as in not both to detect ban type 2 or 4 and just use 2nd or 4th - lol hope that makes sense)
Posted By: Tomao Re: ban script help needed - 27/01/12 09:32 AM
Try:
Code:
on @*:join:#:{
  if ($level($fulladdress) == 10) { .mode $chan +v $nick }
  if ($level($fulladdress) > 10) { .mode $chan +o $nick }
  .timercheck 1 2 checkaddress $nick
}
alias -l checkaddress {
  if ($readini(blacklist.ini,blackmark,$address($1,2)) == 1) { 
    .ban -k %empire $1 2 you just got pooped on 
  }
  if ($readini(blacklist.ini,blackmark,$address($1,4)) == 1) { 
    .ban -k %empire $1 4 you just got pooped on 
  }
}
You don't need the ! prefix. Just the @ will suffice it to not trigger on yourself.
Posted By: Riamus2 Re: ban script help needed - 27/01/12 11:19 AM
Tomao, if you're joining, you don't yet have ops, so @ by itself won't prevent it from triggering on you. smile
Posted By: vinifera Re: ban script help needed - 27/01/12 02:37 PM
can't it be made in normal scripting (as in not in alias) ?
Posted By: Tomao Re: ban script help needed - 27/01/12 08:20 PM
Why don't you store the addresses in mIRC's users list? Then you can do something like this:
Code:
on @*:join:#:{
 if ($ulist($maddress)) { 
 ban -k %empire $nick 2 you just got popped on.
 }
}
Posted By: Wims Re: ban script help needed - 28/01/12 12:28 AM
Yes it will, you can't be an op when you join, so implying that you must be an op to trigger the event will prevent it from triggering on you
Posted By: Riamus2 Re: ban script help needed - 28/01/12 02:35 PM
Yeah, I was thinking backwards yesterday. It's been a really messed up week. Ignore what I said. @ is enough.
Posted By: vinifera Re: ban script help needed - 08/02/12 12:30 AM
Originally Posted By: Tomao
Why don't you store the addresses in mIRC's users list? Then you can do something like this:
Code:
on @*:join:#:{
 if ($ulist($maddress)) { 
 ban -k %empire $nick 2 you just got popped on.
 }
}


even if I did, it still has main problem of banning only with 1 ban type
© mIRC Discussion Forums