mIRC Home    About    Download    Register    News    Help

Print Thread
#118562 26/04/05 01:09 PM
B
BombStrike
BombStrike
B
Here are some improvements that would be goods:

1. Let the &bvar loaded in memory, and unload them with a command like /bfree
2. Adding interrupts called at each line parsed by creating a line like:
interrupt <linenumber>:<text>:<commands>
where:
* linenumber can be a number, * for any line, or a range N-M
* text is the line format, like class*, $/class/i$, etc...
* and $linenumber return the line, $1- contain the line
( but it would be slow )
3. improve the speed ( more important than anything )

it's all, have a nice day smile

#118563 26/04/05 04:53 PM
Joined: Jun 2003
Posts: 4,670
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 4,670
Quote:
3. improve the speed ( more important than anything )


As this is the most important thing, I recommend expanding upon what you mean so it's clear. I have always found mIRC starts up quickly, if it isn't, then it might be your computer rather than mIRC itself, or a 3rd party program. If you mean connecting to a server though, that's really not much to do with mIRC but a range of other issues that it may be.

Regards,

#118564 27/04/05 08:40 AM
Joined: Nov 2004
Posts: 822
J
Hoopy frood
Offline
Hoopy frood
J
Joined: Nov 2004
Posts: 822
Quote:
3. improve the speed ( more important than anything )


I like that idea, I have a quote script that has to cycle through 1800 quotes in my quote file and it'd be so much better if $read was faster ... ^_^

#118565 27/04/05 09:37 AM
Joined: Feb 2004
Posts: 2,013
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Feb 2004
Posts: 2,013
Use /filter or the file handling commands, it'll go leaps faster.

Example:

//filter -ffc quotes.txt tmp *blah* | msg #channel $$read(tmp,nt)

That first filters all lines which contain blah in it to a temp file called "tmp" which is first cleared before written to. Then it messages a random quote from tmp to a channel unless if tmp is empty. You can .remove tmp now or perhaps when exiting mIRC.

Don't blame mIRC for your own shortcomings.

#118566 27/04/05 09:38 AM
Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
For your case, here are some suggestions:
-> /help /fopen : Opening a file once and reading sequential lines from it, then closing it is faster than opening file, read line, close file, open file, search for 2nd line, read it, close file, open file, search for 3rd line, read it, close file, ...
-> maybe /filter could be used?
-> put all quotes in a hash file (/help hash files). $hget is about as fast as you can get for getting a specific line, $hfind with some wildcards or a regex should do ok too... Don't forget to /hload at mIRC startup and /hsave at quit (and regularly if your computer crashes a lot)

#118567 27/04/05 02:37 PM
Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
Interesting... I have about 8MB of filelists, that are constantly updated, from all my users that are searched by our bot in a matter a second or two. (We have our own version of @find that I wrote, which works much nicer than the normal @find... basically, it gives all results in a single query window for all servers rather than getting a query window results from every server.)

#118568 27/04/05 02:52 PM
M
mIRCManiac
mIRCManiac
M
I'm betting you have a dll to help out with that eh?

#118569 27/04/05 04:09 PM
Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
Nope. Simple scripting method. I can script, but I've not taken the effort to learn to make a DLL and didn't bother looking for one. It actually does work faster than you'd expect. We've had many comments about how nice it is to use in place of @find.

#118570 27/04/05 10:43 PM
D
DaveC
DaveC
D
Is it multi server aware, i could use one that is, I wrote one awhile ago, and then tried adapting it afterwards to being multi server, (not a good idea at the best of times), and it goes a bit ape if two identicle searches go on two different server. (irc servers)

#118571 28/04/05 12:57 AM
Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
It wasn't designed to be, no. I had originally made it for just our own channel, so it didn't need to be.

However, as long as the channel names weren't the same and you disabled the note about how many matches were found on offline servers, it would work on multiple servers without any other modification, I think. I would have to remove some channel-specific code and make it universal, but otherwise it would work okay.

Another useful thing with it is that it converts any roman numerals to arabic (IV to 4) and vice versa if it's the final "word" in a search. That way it gives you an output for all items with both number formats. And, it displays what trigger the items are on for each server.

The biggest plus to this method, though, is that servers aren't required to use @find. Many people turn that off because with larger lists, it can be cpu intensive when people use it.

The only "downside" from some people's point of view is that it has to get the lists from the servers. For us, we have our servers run a small script to automatically create and send the file lists to the bot when they join the channel. Depending on how "regular" your servers are, this can be a problem. You could have each server forward lists manually, but this doesn't keep them up to date on the bot very well.

Anyhow, if you are interested in seeing it in action, leave me a private message and I can give you the channel name and you can test it out.

#118572 07/05/05 02:28 PM
T
TheHouse
TheHouse
T
Quote:
Quote:
3. improve the speed ( more important than anything )


I like that idea, I have a quote script that has to cycle through 1800 quotes in my quote file and it'd be so much better if $read was faster ... ^_^


the use of hash tables for a list that long would greatly improve speed

#118573 09/05/05 12:18 PM
Joined: Dec 2002
Posts: 1,253
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,253
/help /fopen


Link Copied to Clipboard