mIRC Home    About    Download    Register    News    Help

Print Thread
ban script help needed #236004 27/01/12 01:49 AM
Joined: Jun 2009
Posts: 91
V
vinifera Offline OP
Babel fish
OP Offline
Babel fish
V
Joined: Jun 2009
Posts: 91
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.
Re: ban script help needed [Re: vinifera] #236008 27/01/12 09:32 AM
Joined: Jul 2007
Posts: 1,129
T
Tomao Offline
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.

Re: ban script help needed [Re: Tomao] #236010 27/01/12 11:19 AM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
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
Re: ban script help needed [Re: Riamus2] #236011 27/01/12 02:37 PM
Joined: Jun 2009
Posts: 91
V
vinifera Offline OP
Babel fish
OP Offline
Babel fish
V
Joined: Jun 2009
Posts: 91
can't it be made in normal scripting (as in not in alias) ?

Re: ban script help needed [Re: vinifera] #236014 27/01/12 08:20 PM
Joined: Jul 2007
Posts: 1,129
T
Tomao Offline
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.
 }
}

Re: ban script help needed [Re: Riamus2] #236020 28/01/12 12:28 AM
Joined: Jul 2006
Posts: 3,621
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,621
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


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: ban script help needed [Re: Wims] #236029 28/01/12 02:35 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
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
Re: ban script help needed [Re: Tomao] #236153 08/02/12 12:30 AM
Joined: Jun 2009
Posts: 91
V
vinifera Offline OP
Babel fish
OP Offline
Babel fish
V
Joined: Jun 2009
Posts: 91
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