mIRC Home    About    Download    Register    News    Help

Print Thread
Ignore identifiers #191906 17/12/07 11:39 PM
Joined: Apr 2007
Posts: 228
M
Mpot Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Apr 2007
Posts: 228
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?

Last edited by Mpot; 17/12/07 11:44 PM.
Re: Ignore identifiers [Re: Mpot] #191908 17/12/07 11:43 PM
Joined: Jan 2007
Posts: 1,156
D
DJ_Sol Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
look up $ignore

Re: Ignore identifiers [Re: DJ_Sol] #191909 17/12/07 11:45 PM
Joined: Apr 2007
Posts: 228
M
Mpot Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Apr 2007
Posts: 228
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?

Re: Ignore identifiers [Re: Mpot] #191911 17/12/07 11:49 PM
Joined: Jan 2007
Posts: 1,156
D
DJ_Sol Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
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.

Re: Ignore identifiers [Re: DJ_Sol] #191912 17/12/07 11:52 PM
Joined: Apr 2007
Posts: 228
M
Mpot Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Apr 2007
Posts: 228
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.

Re: Ignore identifiers [Re: Mpot] #191918 18/12/07 01:32 AM
Joined: Oct 2005
Posts: 1,741
G
genius_at_work Offline
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
Hey, I don't know if it's been suggested yet, but you should try using the $ignore identifier.

-genius_at_work

Re: Ignore identifiers [Re: Mpot] #191921 18/12/07 02:31 AM
Joined: Dec 2002
Posts: 503
B
Bekar Offline
Fjord artisan
Offline
Fjord artisan
B
Joined: Dec 2002
Posts: 503
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.).

Re: Ignore identifiers [Re: Mpot] #191922 18/12/07 02:43 AM
Joined: Jan 2007
Posts: 1,156
D
DJ_Sol Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
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!

Re: Ignore identifiers [Re: DJ_Sol] #191960 19/12/07 12:30 AM
Joined: Apr 2007
Posts: 228
M
Mpot Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Apr 2007
Posts: 228
I've got it all working. Thanks guys!

Last edited by Mpot; 19/12/07 12:49 AM.