mIRC Home    About    Download    Register    News    Help

Print Thread
Page 2 of 2 1 2
Joined: Oct 2008
Posts: 26
B
Billl Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Oct 2008
Posts: 26
when I do !ip <ip> i see this error in the status window -

Quote:
* No such identifier: $/ (line 80, playerips)


Which is this line;

Code:
    var %reg = $+(/^\[|,$replace(%name,.,\.),$/), %tempini = $qt($shortfn($mircdirini\ipsTEMP.ini))



Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
Oh, my fault. replace it with:
Code:
var %reg = $+(/^\[|,$replace(%name,.,\.),$chr(36),/), %tempini = $qt($shortfn($mircdirini\ipsTEMP.ini))


I have identifier warnings disabled, thus it passed in my tests smile

Joined: Oct 2008
Posts: 26
B
Billl Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Oct 2008
Posts: 26
heh:p

Okay, well it still doesnt work, but in the Bot's client windown this happens,

Quote:
[03:22] <Bill_[BT]> !ip 90.206.230.106
scan for 90.206.230.106 at ini= "C:\Users\Bill\Desktop\MIRCST~1.0\ini\ips.ini" - isIP= $true
scan for IP matches
tempini not created
results in tempini: 0
[03:23] <Bill_[BT]> !ip [BT]_Bill
scan for (BT)_Bill at ini= "C:\Users\Bill\Desktop\MIRCST~1.0\ini\ips.ini" - isIP= $false
scan for name matches
[03:23] <Tyson> IPs used by [BT]_Bill: 90.206.230.106


Bill.

EDIT;

This is in the status window,

Quote:
* $read: invalid parameters (line 94, ipstorage)


Which is this line;

Code:
    if (!$read(%tempini,1)) { msg $chan No entry for IP %name found. }

Last edited by Billl; 03/11/08 03:28 AM.
Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
The regex was an annoying typo by me.

But I really don't understand why, on your system, it's not filtering the "ips.ini" to a "ipsTEMP.ini" - in the very same directory. The $read-error is successive, caused by the ini not being created - the main problem.
Whatever the regex is matching: all lines or no line at all ... the /filter command should create that tempini (maybe an empty one, indicating no matches).

Maybe someone in the forums may be able to provide help/insight on this. smile
(download-file updated (the fixed regex))

I picked a "filter, then writeini in matching lines, and filter again"-method as it should perform much faster than a while-loop through all entries of all ini topics for matching data parts...

Joined: Oct 2008
Posts: 26
B
Billl Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Oct 2008
Posts: 26
Guess we'l just have to wait and see if someone can help frown

Will the version of mirc I am running the bot on effect this ?

It's running of version 6.17

I really don't want to change the version as it would mean moving every script I have associated with it frown

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Why would you have to move the scripts?
Just run the installer for mIRC 6.35 and choose the Upgrade option. All of your scripts and setting will be retained for usage with 6.35.

Joined: Oct 2008
Posts: 26
B
Billl Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Oct 2008
Posts: 26
Well you see the base of my bot is a bot I downloaded called "mIRCStorm" and I've just been building to it adding scripts etc so it would confuse me, I'll only attempt it if I have to.

Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
The file below's now using the filter method like it did before, but is storing the "temp data" in a temporary, hidden mIRC window instead of a temporary .ini file - hopefully this will bypass your issue with !ip <ip>.

The !cleanips command uses the filter command too (again in connection with a hidden mIRC window). But as it seems to me that - on your system - the script is able to write data to the ips.ini, just unable to /filter that .ini to a ipsTEMP.ini, I suppose it will work none the less. (As !cleanips is filtering the cleaned data back to that already-existing ips.ini)

playerips(new).mrc

I removed the "ECHO 7 $chan" lines (orange color debug output) as well.


Joined: Oct 2008
Posts: 26
B
Billl Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Oct 2008
Posts: 26
Horstl, Thank yo very much for all of your help with this script. It works fine now.

I will be able to catch the ban evaders so easily now. Thanks again.

Bill.

Joined: Oct 2008
Posts: 26
B
Billl Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Oct 2008
Posts: 26
Hi, sorry about this, but I am back.

I'm just wondering is it possible to make it so I can search with just part of an ip.

Example;
!ip 90.210.*.*
or just
!ip 90.210.30.*

It will then return the name's who were on the IP's starting wth the given digits, regardless of what the remaining, unwritten digits.

Thank you.

Bill.

Last edited by Billl; 05/11/08 05:24 PM.
Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
Wildcard matching itself isn't a big problem (as the script already uses /filter in the part that is scanning for IPs) - it's more the output part.
To make it clever/useful, I have to modify it in some way. I was thinking about:

1) if a wildcard mask was given: add which IP was matched (I intend to put this in the "full" part)
2) don't show the same name 5 times if 5 IPs of that name were matched by a wildmask. That is: not "Name1 Name1 Name2 Name1 Name3 Name1 Name3 Name3 Name1" but something like: "Name1 (5x) Name2 Name3 (3x)", for the regular output (not "full")

Besides that, someone triggering a *.*.*.* would spam the whole dataset to the channel...

If I only had known in the beginning, I'd have used hash tables and $hfind instead of a (more stable, but less flexible) ini storage approach. wink

I'll have a look at it later on.

Joined: Oct 2008
Posts: 26
B
Billl Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Oct 2008
Posts: 26
Yeah sorry for not letting you know before.
It's just I was looking at it and I thought that's how it would work better.
Thanks for taking a look, dont take this as a priority.

Thanks, Bill.

Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559

playerips(new2).mrc

You now can use both the ? and * wildcards in "!ip <IP>" scans. I fixed some other things as well.
While "*" will match 1-3 digits, "?" will match exactly one digit and "???" exactly 3 digits. ?4* thus will match 14 and 347, but won't match 41 or 4.
Known limitation: I extended the "user wants an scan for IP" regex just a bit (quickly) - therefore, you have to provide one, two or three chars per IP 'octet' (be it digits or wildcards), to make a valid <IP> input. You cannot use e.g. *44*, but have to scan for both 44* and *44 separately - I hope that's no big prob smile
I did my best to keep the new outputs uniform - all matches remain sorted by "age". The output of a "verbose wildcard scan for IPs" with many matches may be hard to read, none the less...

request: !ip <Name>
reply: IPs used by <Name>: IP1 - IP2 - IP3 (...)
request: !ip <Name> full
reply: IPs used by <Name>: IP1 (date, time) - IP2 (date, time) - IP3 (date, time) (...)
request: !ip <IP>
reply: Names used on IP <IP>: Name1 - Name2 - Name3 (...)
request: !ip <IP> full
reply: Names used on IP <IP>: Name1 (date, time) - Name2 (date, time) - Name3 (date, time) (...)
request: !ip <wildmask>
reply: Names used on IPrange <wildmask>: Name1 (2x) - Name2 - Name3 (6x) - Name4 (...)
request: !ip <wildmask> full
reply: Names used on IPrange <wildmask>: Name1: IPmatch (date, time) - Name2: IPmatch (date, time) (...)

Regarding the aforementioned risk ((excess) flood) of "!ip *.*.*.*", wilcard scans will return the search result only if there are <= 20 matches. If there are more matches, a message "Try again with a more specific range" is given. (You can change this value at line 95)

Joined: Oct 2008
Posts: 26
B
Billl Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Oct 2008
Posts: 26
It works, perfect, Thank you so much Horstl.
I wish I was as good as you at this frown

Last edited by Billl; 06/11/08 02:27 PM.
Page 2 of 2 1 2

Link Copied to Clipboard