I was talking about Napa's code being hard to edit, not yours. While his is smaller, that doesn't mean it's better or more efficient. Everyone has their own take on coding, your snippet can work just the same and for editing I would prefer it over Napa's honestly. Not to say his is bad, but I think most would find it difficult to change ;)
By the use of a list and text document, this could be shortened by a lot. You might want to look into lists within dialogs and try using a text document rather then .ini in this case, if you're only going to have a list of channel in the file. Also, for a future note, look into while loops as they can save you a lot of typing.
Few problems with this snippet that can and should be fixed.
First off, the aliases. You can combine your aliases into one. Here is a little example of what I mean putting it in a very simple form.
alias meter {
if ($1 == add) { set $+(%,$2) $calc($($+(%,$2),2) + 1) | msg #lounge 4 $+ $2 $+ 's Douche Meter: $($+(%,$2),2)[+1] }
else if ($1 == show) { msg #lounge 4 $+ $2 $+ 's Douche Meter: $($+(%,$2,),2)[0] }
else if ($1 == take) { set $+(%,$2) $calc($($+(%,$2),2) - 1) | msg #lounge 4 $+ $2 $+ 's Douche Meter: $($+(%,$2),2)[-1] }
}
This alias is then used by typing /meter add/take/show. For the script at hand I wouldn't recommend using variables as 1 can turn into 30 very fast. You should look into using a file like .txt. It will keep your variables down and store your information in a nice and neat file.
Second thing I noticed was your text event, it is only set for one channel, #lounge. You might want to make it work for all channels are let people know they need to edit the snippet if they wish to use it in other channels. For your event you can make use of the else if statement, not a big deal but it's a good habit to use else if rather then all if statements when scripting. In my opinion anyways.
Last but not least your alias power. This doesn't give they anything new for the script, it doesn't allow them to do anything related to this script. The only difference is they will be added to the users file for that mIRC. I don't see a real need for the alias as you don't use the command the way it was intended.
In all this isn't a bad snippet but it could use a little work, with time you might want to update. Also, this snippet can be easily flooded. You might want to look into adding flood control.
In case you didn't understand what I was getting at the first time I will explain myself again. I'm not here to make this hard or try and make you look bad. I posted a simple comment with a question, took that comment the wrong way. I'm not blaming anyone for bad coding and scripting nor was I calling you inexperienced with mIRC scripting. I was simply asking if you had missed a alias as you had a command that was like a alias yet no alias to support it. That problem was fixed when Jethro_ cleared up that you can use the "$mircdir" and the file name together without an error, after that I said it wasn't in the right format, not that you did you code all wrong comment but a hint that you might want to change it.
I really don't care if you think I'm being mean and giving you a hard time, everyone has their days. You don't need to go out of your way to try and make me look bad after I basically said I was sorry for the rudeness in my comment I didn't mean it. That in itself is just rude, throwing it back in my face. If you don't like the comments people post on hawkee there is a simple was to fix this... don't post anymore snippets. You will always have someone, I don't care how perfect your code may be but someone will post a hash comment or, like in this case the author of the snippet takes the comment the wrong way.
I don't want to be your enemy but your making this difficult. Your taking one side and sticking with it, that's fine. I'm sorry if my comments offended you in anyway. I have posted snippet and had comments like that myself, some meant to be hash, other I took the wrong way. I moved on and forgot about it. I hope we can put this aside and forget also as I don't want to make enemies or have a group of people dislike me because others. I ask that you forgive me and I will stop posing comments on your snippets if you like.
Jethro_, I'm not looking to start a little comment war here, but that wasn't harsh the way I see it. The rules say you need to make sure your snippet it working properly. I didn't mean to come off as a bit of an ass but when you post comments like that saying, I didn't test it and so forth are uncalled for. Simply asking what I was talking about would have been a little better.
As Jethro_ said, you need to add a .txt after your file name or it will be saved in the wrong format. Your Windows may have found and read the file fine but mine gave me an error. As for the blank space in the echo message it might be because your trying to use the variable %y when you never set it, a simple fix.
I did test it for you information. Your script is bugged. When it writes the file it writes it as a "File" not a "txt" as you have it reading from. Also, your output messages are a little bugged as well.
(blank space) was added as invite channel.
If you took a little time to read and test your script properly you would catch these easy errors. Anyways, I hope that gives you something it think about.
Maybe you could make use of the sockmark command and get rid of that var.
alias rdmfact {
sockopen randomfact www.randomfunfacts.com 80
sockmark randomfact msg $active 12,1[4,1Random Facts12,1]
}
on *:sockopen:randomfact: {
sockwrite -n $sockname GET / HTTP/1.1
sockwrite -n $sockname Host: $+($sock(randomfact).addr,$str($crlf,2))
}
on *:sockread:randomfact: {
var %randomfact | sockread %randomfact
if ( *<i>* iswm %randomfact) {
$sock(randomfact).mark $remove(%randomfact,<i>,</i>,</strong>,</font>, ,</td>,<strong>)
sockclose randomfact
}
}
I made this snippet because i was really bored.
Really? http://www.sassirc.com/plugins/snippet_system/view.php?snippet=247 Looks a lot like that one... Just saying.
Easy Jethro_, shut up and post a useful comment.
Just looking at this SimplicityX and the way you use it
set %vouches. [ $+ [ $$2 ] ] %vouches. [ $+ [ $$2 ] ] $nick
It seems your looking for a simple command "inc %varname", you only end up counting the number of tokens right? You don't use any of the text why not make things a lot easier.
say I am on $scon(0) networks. I'm an oper on $iif(%oper,%oper,0) networks. I have added $iif(%kline,%kline,0) klines and removed $iif(%rkline,%rkline,0) $+ , I have added %shun shuns and removed $iif(%rshun,%rshun,0) $+ , I have added $iif(%gline,%gline,0) glines and removed $iif(%rgline,%rgline,0) $+ , I have added $iif(%zline,%zline,0) zlines and removed $iif(%rzline,%rzline,0) $+ . I have akilled $iif(%akill,%akill,0) users and removed $iif(%rakill,%rakill,0) akills. I haved killed $iif(%kill,%kill,0) users and used the /sa commands %sa times. I have also sent $iif(%global,%global,0) global messages.
say I also have kicked $iif(%kick,%kick,0) users, and gave $iif(%voice,%voice,0) voices $iif(%halfop,%halfop,0) halfops $iif(%op,%op,0) ops and $iif(%founder,%founder,0) founders.
}