Comments

 (309) 
  1. Everything
  2. Snippets
  3. Images
  4. Hardware
Gummo commented on Comment: Yet another Random password generator  -  2 days ago
I don't understand the use of $regex() in

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.
Gummo commented on mIRC Snippet: Hostmask/nick database and watcher  -  Oct 24, 2011
The easiest way to allow any wildcard host matching is a hash table.
Gummo commented on mIRC Snippet: Rainbow Colors  -  Aug 11, 2011
Even without updating, you still have $regsub.
Gummo commented on mIRC Snippet: 5 color text script  -  Jun 09, 2011
That's in mIRC's own options, not this script.
Tools (menu)->Options->Display
Gummo commented on mIRC Snippet: Money System/RPG Basis  -  May 24, 2011
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.
Gummo commented on mIRC Snippet: Text Colour Changer v4.6.2 by gummo edited v2  -  Apr 14, 2011
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
Gummo commented on mIRC Snippet: Oper Help Script For Torn  -  Apr 11, 2011
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. :)
Gummo commented on mIRC Snippet: Chronometer  -  Apr 09, 2011
Yes, doing it once instead of twice would make sense.
Gummo commented on mIRC Snippet: Text Colour Changer v4.6.2 by gummo edited v2  -  Apr 08, 2011
My script only changes the colour of your own text. This version adds the "theme" stuff from the old one they used before.
Gummo commented on mIRC Snippet: Text Colour Changer v4.6.2 by gummo edited v2  -  Apr 08, 2011
If you set the background to transparent it shouldn't have a background.
Gummo commented on mIRC Snippet: Text Colour Changer v4.6.2 by gummo edited v2  -  Apr 07, 2011
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.
Gummo commented on mIRC Snippet: Text Colour Changer v4.6.2 by gummo edited v2  -  Apr 07, 2011
You seem to have mis-typed my aliases and variables since you use "color" instead of "colour".
That's probably why it didn't work previously too. :P
Gummo commented on mIRC Snippet: Text Colour Changer v4.6.2 by gummo edited v2  -  Apr 07, 2011
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.
Gummo commented 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.
Gummo commented on mIRC Snippet: Chronometer  -  Apr 07, 2011
No, since a timer is not called from within the script you have no way of knowing whether the dialog is still open.
Gummo commented on mIRC Snippet: Auto Op  -  Apr 07, 2011
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

 
Gummo commented on mIRC Snippet: Auto Op  -  Apr 07, 2011
Or you can use

Code

 

..Which is what they want.
Gummo commented on mIRC Snippet: Chronometer  -  Apr 06, 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.
Gummo commented on mIRC Snippet: IP address functions  -  Apr 06, 2011
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.
Gummo commented on mIRC Snippet: IP address functions  -  Apr 06, 2011
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.
Gummo commented on mIRC Snippet: IP address functions  -  Apr 06, 2011
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.
Gummo commented on mIRC Snippet: IP address functions  -  Apr 06, 2011
No.. Why would it?
Gummo commented on mIRC Snippet: IP address functions  -  Apr 05, 2011
Thanks napa. :)
Gummo commented on mIRC Snippet: RegEx Swear Kick  -  Apr 04, 2011
It seems my test for the \Q..\E was not correct to begin with. Thanks for making me look at it again, jaytea. :P
Gummo commented on mIRC Snippet: RegEx Swear Kick  -  Apr 04, 2011
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.
Gummo commented on mIRC Snippet: Text Colour Changer v4.6.2  -  Apr 04, 2011
I would consider that sort of thing to be a tacky addon if it were to be included within this script itself, considering the complexity difference.
Gummo commented on mIRC Snippet: RegEx Swear Kick  -  Apr 04, 2011
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.
Gummo commented on mIRC Snippet: Text Changer  -  Apr 04, 2011
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. :(
Gummo commented on mIRC Snippet: Text Changer  -  Apr 04, 2011
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.
Gummo commented on mIRC Snippet: Text Changer  -  Apr 03, 2011
When dealing with characters, 0 and 1 are decimal 48 and 49 respectively, not 0 and 1.
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. Next
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.