Lucius did mention that, but at the same time ini files are slower. Generally in this situation a hash table is suggested, but for this type of script performance isn't normally an issue anyway.
gokussjthunder, it's not as though you can tell when he's online to pester him. Being impatient often makes people less willing to help you, so just try to have some patience. :P
Some of the text in this script suggests that it's created and/or used by someone who is a little abusive while thinking they're only being funny, to be honest.
Also, most networks running Anope should at least have alias commands like /NickServ
You should use those if possible since they only work when the services are online, which is much more secure for things like identifying with a password. :)
Have you checked to see what happens when you use symbols and numbers together? You don't seem to have changed my regex for that line so I think it will only colour as you expect when you don't do things like 1. or .1
If you're only checking whether the left character is a number but the regular expression matches both at once you'll have a problem.
More specifically, the code that I used which you have just replaced with a new colour variable was only designed to prevent breakage when a number interferes with the ctrl+k syntax.
If you use my sub-menu alias it will be much easier for you to add the colours menu for numbers.
Code
Also, you're missing a } at the end.
I did just have another look and considering the fact that you added another set of colours to the script you'd probably want to modify the preset save/load methods too.
Gummocommented on mIRC Snippet: Auto Op
-
Apr 07, 2011
Sorry, Jethro_, the reason I said you might as well check $nick == NickHere is because the code you suggested was no more secure than that. If you are comparing the current address of the person triggering the event (nick!ident@host) against, for example, $address(NickHere,2), the script will be comparing the triggered address with the address of whoever is currently using NickHere.
With that being the case, anyone using NickHere would validate correctly as the desired person.
Jethro_, if you are going to use that first method you might as well check for $nick == NickHere.
The second method is the same deal but it looks at the current address of the nickname compared to the address of the person in the event.
Also, you don't need the iswm operator if you have no wildcard comparison, which is the case when you compare one full address to another full address.
AndroidKnight, use this.
Code
Gummocommented on mIRC Snippet: Auto Op
-
Apr 07, 2011
IllogicTC, should the dialog somehow manage to close without unsetting the timer due to some error, you would be flooded by errors at what should be once every millisecond, though it probably would be much less.
Even so, I'm fine with the check to make sure that the dialog is open within a command called by a timer.
What is your basis for calling it invalid other than the fact that it's never used?
I looked at the IP standard as well as IP address allocation and nothing mentioned 0.0.0.0.
The only mention(s) of it were to say that an IP address is x.x.x.x where x is between 0 and 255.
With 0.0.0.0 alone, you must decide whether your IP address check is based on whether the values are valid (all octets between 0 and 255) or whether the IP address is considered valid (since 0.0.0.0 is never used for anything).
I would personally only change that if 0.0.0.0 is considered invalid by the IP standard.
Your regex is completely invalid.
It matches zero or more number characters (3 times), then zero or more number characters again.
It will be true if you supply a blank string or any reasonable amount of random numbers.
The regular expression for accurately matching an IP address is far more complex.
Yes, I understand the purpose of escaping the \E to prevent your \Q..\E from breaking. It can also still be broken by a backward slash preceding the \E.
Feel free to test a string "\E " against regex "\Q\\E\E" and "\Q\\\E\E" which are your options here.
Jethro_ appears to have a misleading regular expression here, but upon closer inspection it seems to be (for the most part) a readability issue.
There's no need to end an escaping \Q...\E, however, to escape something. \\E would suffice instead of \E\\E\Q.
mIRC's $chr merely associates the letters with their ASCII values, which is where you get \x30 (which is actually hex) and your \60 as octal. That doesn't contribute a lot to this. :(
He checks whether the first character is a 0 or a 1 to determine whether to convert to or from binary. To be honest, I'm not sure why you started talking about 0 and 1 being representative of anything. They're characters. :\
Unless, of course, it was just a misinterpretation.
Code
when you can use
Code
The same goes for the if statement further up. If you want it to be more readable, use $r(0,1) == 1 for example.