mIRC Home    About    Download    Register    News    Help

Print Thread
#112246 22/02/05 08:45 AM
Joined: Oct 2003
Posts: 37
R
Rumie Offline OP
Ameglian cow
OP Offline
Ameglian cow
R
Joined: Oct 2003
Posts: 37
what are the fastest remote?
if n $iif, which one is faster?
dll, hash table, variable, which one is the best for store data?
whats a smart way to make protection remote?
put all remote in on text event together or separetely?
use alias is better?
how to kick faster?
use signal -n name kick $chan $nick reason? arghh

#112247 22/02/05 10:20 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Code:
(1) what are the fastest remote?                                     The one that reads { }
(2) if n $iif, which one is faster?                                  The one with the letters IF in it
(3) dll,hash table, variable, which one is the best for store data?  Correct
(4) whats a smart way to make protection remote?                     By scripting it
(5) put all remote in on text event together or separetely?          One event multiple .mrc files
(6) use alias is better?                                             Only when and then
(7) how to kick faster?                                              Learn karate
(8) use signal -n name kick $chan $nick reason? arghh                If you insist


real answers (maybe)

1. I dont really know how to answer that, fastest in what way? The smaller/tighter script you put in one the faster it would go.
2. I believe an simple IF is faster
3. I would say hashtable, you can group your data to one hashtable and save a backup of your data in one command and total built into mirc
4. What type of protection services would be a fair reply to that i think.
5. I say together in one, you can strip out burk codes then and do the matchtexts yourself.
6. I dont understand the question
7. Im sure you can kick multiple users in one command
8. Hard to see the advantage over calling an alias, but for a large script that might span 6 mrc files, you can trigger off an NAME signal event in each, thus running 6 alias's (maybe u dont have file 3 loaded) so the other 5 still get there turn, kinda lets you build addons that are designed to handle your pre filtering of events by some master script, if that makes sence.

PS: I could easly be wrong about any/many/some/none of the above answers, if i am please see contact my lawyer at 0800 NOANSWER

#112248 22/02/05 11:22 PM
Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
what are the fastest remote?
-> emtpy ones

if n $iif, which one is faster?
-> /if is faster, but unless you have 2000 of them in the same handler or use a 10MHz cpu, you won't really notice the difference...

dll, hash table, variable, which one is the best for store data?
-> Depends on what data, how much of it, how you access it, how often you access it, what you do with it, etc. I'd use %variables for some global settings, but switch to hash tables when i'd need more than 5 entries, or files if I only need the data once a week or so but need it saved immediately.

whats a smart way to make protection remote?
-> No idea, just try not to insult people or something?

put all remote in on text event together or separetely?
-> If it's related or starts with the same !command or something, I'd put it together, if it's barely related it can be better to make separate triggers.

use alias is better?
-> I'm unsure what you mean, but if it's about using the alias tab instead of an alias definition in remotes, I don't think it really matters and I'd put it with the rest of the script in remotes. Gives you the option of making it a local alias too.

how to kick faster?
-> the built-in kick doesn't really have a delay that I know of, get a good connection to a good server, don't hang your mIRC by running lengthy scripts and same for your computer. Still, I'm not an irc warrior so I really don't care about kicking and such.

use signal -n name kick $chan $nick reason? arghh
-> use /kick $chan $nick or maybe even /ban -k ... I don't see the advantage of signals in this context.

#112249 23/02/05 12:03 AM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
I think by (4) he means he wants to stop remote from opening to hide his code and by (6) he means using aliases is better than just typing code out.


New username: hixxy
#112250 23/02/05 10:45 AM
Joined: Oct 2004
Posts: 72
C
Babel fish
Offline
Babel fish
C
Joined: Oct 2004
Posts: 72
Quote:
what are the fastest remote?
if n $iif, which one is faster?
how to kick faster?

These issues are all about speed. To my experience, if your PC has a fast processor, 1GHz or better, it doesn't matter which technique you use. You can gain some nanoseconds one way or the other, but you won't notice. The biggest delay is caused by the chatserver. Your bot can respond immediately, but it can take some (milli)seconds before its line or command actually arrives. Btw, if you would have a 10MHz processor, you WILL notice difference in techniques, because all time differences will add up.

Quote:
put all remote in on text event together or separetely?

I suggest you make 1 script per function, i.e. a game-script, a protection-script, a bar-script. Per script you can use one or more text events, depending on the functionality you need. Normally one text event section will be enough. Again, don't bother about speed. I have a bot that operates in 5 chatrooms and consists of 40 quite complex scripts. I tried to code it as clean as possible, to make debugging easier. But whatever happens in which room, the bot always reacts within a split second, which is fine for me smile. My PC has a 1GHz processor.

Quote:
dll, hash table, variable, which one is the best for store data?

I love working with ini files and writeini and $readini commands. And since ini files are handled in memory, speed is not an issue.

Quote:
use alias is better?

You need aliases if you re-use the same code several times. You get very clean code if you use aliases in the right way.

Quote:
whats a smart way to make protection remote?

Your will never finish working on your protection. I thought my bot contained every possible defense until last weekend when some rooms at our server were taken over. Fortunately my bot was not attacked, but after investigation I noticed that it was vulnarable too. Tip: if you use somebody else's script, always scan for $read and $readini commands and check whether they contain the n parameter. If not, add it! Another tip: there is much to tell about protection. First try google, search for tutorials and examples. Some months ago Dalnet had quite good examples, but I can't find it anymore.

Quote:
how to kick faster?
use signal -n name kick $chan $nick reason? arghh

Just /kick I would say. Why would you signal an event? That's for too complex for a kick application. Maybe raw commands are faster, but again try to keep your code clean and understandable. Your script will never be finished, so after a few months you still have to understand what your code is doing. Keep it simple!


Link Copied to Clipboard