mIRC Home    About    Download    Register    News    Help

Print Thread
#221602 25/05/10 07:43 AM
Joined: Mar 2010
Posts: 17
E
Pikka bird
OP Offline
Pikka bird
E
Joined: Mar 2010
Posts: 17
Hey there, I got a problem I don't know how to solve. I have a remote script problem where it keeps auto banning someone even though I listed that user on the remote user list with another number to try to stop it. What is going on is that I have 2:*!~??@* listed on the user list marked to be banned on join due to flood attacks that have been matching that string, but there is an innocent user that is GB!~GB@hostmask that is matching that. I have added them as 20:GB!*GB@hostmask and 20:GB!*@hostmask to try to solve it, but it still keep happening like +2 is proceeding over the +20 or something like mIRC is not recognizing the userlist match exempt on +20. So I am wondering if someone here knows a way to fix this without removing the +2 spammer string, or if this is a mIRC bug. Thank you if you can help me here.

Joined: Jan 2010
Posts: 11
E
Pikka bird
Offline
Pikka bird
E
Joined: Jan 2010
Posts: 11
Both

* !~??@*
GB!~GB@hostmask

are the same exact mask. So this is not a mIRC bug. If you have to have a 2 character ban mask, then I would recommend doing an if level check before banning. For example:

ON 2:JOIN:#: {
if ($level($address($nick,1)) <= 2) {
mode # +b $nick
kick # $nick
}
}

I'm sure there is a better method, but something like this should work.

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
The easiest method is to have a check of IF ($nick != GB) {} before the ban (or check the $address() in that same way).

@extremity: Unless I'm mistaken, everyone who doesn't match a user level is level 1, so it would be better to use == 2 instead of <= 2.


Invision Support
#Invision on irc.irchighway.net
Joined: Mar 2010
Posts: 17
E
Pikka bird
OP Offline
Pikka bird
E
Joined: Mar 2010
Posts: 17
Okay, I have tried this and it is still the same problem I have before, and this is what I have in my remote scripts now while I am testing in #ScriptTesting.

Code:
on +2:JOIN:#ScriptTesting: {
  if ($level($address($nick,6))) <= 2 {
    mode $chan +b $mask($fulladdress,2)
    kick $chan $nick Test Kick
  }
}

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
The level in your ON JOIN event, requires that the person that joins have level 2 access.
Thus the IF statement is useless, since the level comparison will always equal 2.

Check the order that the levels are listed in in your userlist.

I found, via a small experiment that having
Quote:
2:*!*@NetAdmin.XeroMem.Com
20:RusselB-mobile!*r.k.bairs@NetAdmin.XeroMem.Com
gives me 2 with
Code:
on *:join:#: echo $chan $ulevel
yet, using
Quote:
20:RusselB-mobile!*r.k.bairs@NetAdmin.XeroMem.Com
2:*!*@NetAdmin.XeroMem.Com
gives me 20

Joined: Mar 2010
Posts: 17
E
Pikka bird
OP Offline
Pikka bird
E
Joined: Mar 2010
Posts: 17
Originally Posted By: RusselB
The level in your ON JOIN event, requires that the person that joins have level 2 access.
Thus the IF statement is useless, since the level comparison will always equal 2.

Check the order that the levels are listed in in your userlist.

I found, via a small experiment that having
Quote:
2:*!*@NetAdmin.XeroMem.Com
20:RusselB-mobile!*r.k.bairs@NetAdmin.XeroMem.Com
gives me 2 with
Code:
on *:join:#: echo $chan $ulevel
yet, using
Quote:
20:RusselB-mobile!*r.k.bairs@NetAdmin.XeroMem.Com
2:*!*@NetAdmin.XeroMem.Com
gives me 20


Well, that seems to have solved the problem I was having because I had the userlist as
Quote:
2:*!~??!*
20:GB!*GB@hostmas

So I switched my userlist around so that it goes from higher number users to lower number users instead and made it instead
Quote:
20:GB!*GB@hostmask
2:*!~??!*

And put the script back to
Quote:
on +2:JOIN:#ScriptTesting:/mode $chan +b $mask($fulladdress,2) | /kick $chan $nick

which appears to work as it now doesn't trigger on whoever matches level 20, yet will trigger on whoever matches level 2.

Last edited by ErikMouse; 26/05/10 07:28 AM.
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
You could also do it as
Code:
on @+2:join:#ScriptTesting: .ban -k $chan $nick 2 <reason for kick/ban>


The @ symbol in front of the level means that the client running the code has to have full ops in the channel. On most IRC networks this is a requirement before allowing you to kick/ban other people.


Link Copied to Clipboard