//echo -a $iif(test = !$isalnum,a,b)
But I think you are right, if($2 = !$isalnum) was incorrect.
This code works fine, ping and setaccess may need to be properly tested and may need minor adjustments but overall the codes functionality is absolute. I do see where you are coming from I take all valid suggestions/tips, if I don't see how its an efficient way of doing something I ask and if there is no real reason to change what i have then why bother?
The reason you are finding older coding techniques is because I have been coding in MsL for around 8 years and I have only recently started messing around in mIRC 7.*
From mIRC Help file:
The Operators
isin string v1 is in string v2
isincs string v1 is in string v2 (case sensitive)
iswm wildcard string v1 matches string v2
iswmcs wildcard string v1 matches string v2 (case sensitive)
isnum number v1 is a number in the range v2 which is in the form n1-n2 (v2 optional)
isletter letter v1 is a letter in the list of letters in v2 (v2 optional)
isalnum text contains only letters and numbers
isalpha text contains only letters
islower text contains only lower case letters
isupper text contains only upper case letters
That style of array is very nifty, however i think i will stick to if-elseif... for this, but i will definately use that style of array in the future, thanks for the tip
and if ($2 = !$isalnum) is an older form of coding, does the same job just a different way to do it
Thank you for suggestions, i didn't bother using regex because there is no need at this point with a script as simple as this, also the current code was made in less than 15 mins without any testing.
I made this out of boredom for learning purposes, most newbies have unsecure INI based registration/login systems that I see being exploited constantly.
My code should have very few, if any flaws for kiddies to take advantage of, all this code lacks from what i can see is flood protection(1 line of code).
The next version will be a bit more advanced it will be shortened, controlled by dialogs, hash table DB and MySQL supported, however that would be more of an addon. I will also include a method to convert ini data to hash for the people who are already using this code and wish to upgrade.
@Known, why would i use goto for an array for something like commands? 'If' is quite sufficient.
the value of %p is the target carried from the alias to the ctcp reply, that ping code also sends the message dynamically, meaning if you use it in pm it will msg you via pm if you use it in a channel it will msg the channel, rather than static(1 target) like your code.
Also, var is temporary, once the alias function is complete %p would unset, the point of setting %p is to eliminate the need for manually setting a channel, like ur code does: %p #channel
The reason I'm using a new ini file for each nick is for user administration purposes. It's a matter of personal preference, There's no difference using separate ini files, and its not hard to make the script store the user files in a separate directory for tidiness.
Thanks for comments, snippet updated
http://www.hawkee.com/snippet/8261/