mIRC Home    About    Download    Register    News    Help

Print Thread
#236004 27/01/12 01:49 AM
Joined: Jun 2009
Posts: 96
V
Babel fish
OP Offline
Babel fish
V
Joined: Jun 2009
Posts: 96
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)

Last edited by vinifera; 27/01/12 02:06 AM.
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
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.

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Tomao, if you're joining, you don't yet have ops, so @ by itself won't prevent it from triggering on you. smile


Invision Support
#Invision on irc.irchighway.net
Joined: Jun 2009
Posts: 96
V
Babel fish
OP Offline
Babel fish
V
Joined: Jun 2009
Posts: 96
can't it be made in normal scripting (as in not in alias) ?

Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
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.
 }
}

Joined: Jul 2006
Posts: 4,145
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
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


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Yeah, I was thinking backwards yesterday. It's been a really messed up week. Ignore what I said. @ is enough.


Invision Support
#Invision on irc.irchighway.net
Joined: Jun 2009
Posts: 96
V
Babel fish
OP Offline
Babel fish
V
Joined: Jun 2009
Posts: 96
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


Link Copied to Clipboard