mIRC Homepage
Posted By: BombStrike Somes improvements - 26/04/05 01:09 PM
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
Posted By: Mentality Re: Somes improvements - 26/04/05 04:53 PM
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,
Posted By: Jigsy Re: Somes improvements - 27/04/05 08:40 AM
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 ... ^_^
Posted By: FiberOPtics Re: Somes improvements - 27/04/05 09:37 AM
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.
Posted By: Kelder Re: Somes improvements - 27/04/05 09:38 AM
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)
Posted By: Riamus2 Re: Somes improvements - 27/04/05 02:37 PM
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.)
Posted By: mIRCManiac Re: Somes improvements - 27/04/05 02:52 PM
I'm betting you have a dll to help out with that eh?
Posted By: Riamus2 Re: Somes improvements - 27/04/05 04:09 PM
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.
Posted By: DaveC Re: Somes improvements - 27/04/05 10:43 PM
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)
Posted By: Riamus2 Re: Somes improvements - 28/04/05 12:57 AM
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.
Posted By: TheHouse Re: Somes improvements - 07/05/05 02:28 PM
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
Posted By: Hammer Re: Somes improvements - 09/05/05 12:18 PM
/help /fopen
© mIRC Discussion Forums