mIRC Homepage
Posted By: Mpot Ignore identifiers - 17/12/07 11:39 PM
I'm working on a shitlist for my bot. IE, if it receives the command shitlist, it would check if the $address($$2,2) was ignored. But... how do I check the ignore list for an address? I've been running through the help files for the past half hour and I still can't figure it out. Perhaps a $read on control.ini? I dont' know how I would do that, though.

Ideas?
Posted By: DJ_Sol Re: Ignore identifiers - 17/12/07 11:43 PM
look up $ignore
Posted By: Mpot Re: Ignore identifiers - 17/12/07 11:45 PM
Originally Posted By: DJ_Sol
look up $ignore


Originally Posted By: Mpot
I'm working on a shitlist for my bot. IE, if it receives the command shitlist, it would check if the $address($$2,2) was ignored. But... how do I check the ignore list for an address? I've been running through the help files for the past half hour and I still can't figure it out. Perhaps a $read on control.ini? I dont' know how I would do that, though.

Ideas?
Posted By: DJ_Sol Re: Ignore identifiers - 17/12/07 11:49 PM
Well when I looked up $ignore, this is what I got.


$ignore(N/address)

Returns the Nth address in the ignore list.



Properties: type, secs



$ignore(0) returns the total number of addresses in the ignore list

$ignore(1) returns the 1st address in the ignore list

$ignore(2).type returns the ignore flags for the 2nd address in the ignore list

$ignore(2).secs returns number of seconds until ignore is removed if /ignore -uN was used



Note: If you specify an address, the first matching address in the ignore list is returned.



Now all you have to do is match the format of the mask you ignore.
Posted By: Mpot Re: Ignore identifiers - 17/12/07 11:52 PM
Originally Posted By: DJ_Sol
Well when I looked up $ignore, this is what I got.


$ignore(N/address)

Returns the Nth address in the ignore list.



Properties: type, secs



$ignore(0) returns the total number of addresses in the ignore list

$ignore(1) returns the 1st address in the ignore list

$ignore(2).type returns the ignore flags for the 2nd address in the ignore list

$ignore(2).secs returns number of seconds until ignore is removed if /ignore -uN was used



Note: If you specify an address, the first matching address in the ignore list is returned.



Now all you have to do is match the format of the mask you ignore.


Anyone else have any ideas? I really have no idea what he is talking about.
Posted By: genius_at_work Re: Ignore identifiers - 18/12/07 01:32 AM
Hey, I don't know if it's been suggested yet, but you should try using the $ignore identifier.

-genius_at_work
Posted By: Bekar Re: Ignore identifiers - 18/12/07 02:31 AM
Alright, here's a concept for you..

Code:
var %count = $ignore(0)
while (%count > 0) {
  if ($address($$2, 2) iswm $ignore(%count)) {
    do something
  }
  dec %count
}

You may want to check the $ignore(%count).type to see if a specific type of ignore is set (channel, private, ctcp, etc.).
Posted By: DJ_Sol Re: Ignore identifiers - 18/12/07 02:43 AM
Sorry, I assumed since you already knew to check the mirc help first that you were comfortable with this stuff.

mIRC user lists can be a little tricky. I don't really use them so I don't understand when it adds wildcards and when it doesn't.

If you ignore by nickname:

/ignore $nick

it will probably get added this way: nickname!*@*

So you cannot just search for the nick, you have to match:

Quote:
$+($nick,!*@*)

or

$ignore($+($nick,!*@*))



$ignore(0) = total in the ignore list.
$ignore(1) = 1st in ignore list
$ignore($address($nick,3)) will return the mask ($true) if it matches.

Basically, decide how you want to set the ignore. Set it, then see how mIRC sets it by looking at $ignore(1). ( //echo -a $ignore(1) )

You will have to match this style, so if mIRC adds a * wildcard to the front of it, you will have to add it as well to match.



THANKS FOR CHECKING THE HELP FILE FIRST!
Posted By: Mpot Re: Ignore identifiers - 19/12/07 12:30 AM
I've got it all working. Thanks guys!
© mIRC Discussion Forums