Here's another snippet that I put together, While being on my server, I got tired of giving people Strict Moderation Voice and them not wanting it and having to remove it. so i came up with this. Pretty self-explanatory , basically, if a chatter wants their mode on Strict Moderation Voice can type !green, and the bot with issue them strict moderation voice, if they later decide they don't want it, because they are bipolar or something, all they have to do is type !ungreen. the bot will then take their Strict Moderation Voice status.
Changed the Green stuff to + or - V
On ^*:Text:*:#:{
if ($strip($1) == !+v) {
mode $chan +v $nick
msg $chan Here ya go, $nick
}
if ($strip($1) == !-v) {
mode $chan -v $nick
msg $chan There ya go, $nick
}
}
http://www.hawkee.com/snippet/8799/ This i also another example of something similar to what you have created here. Take a hint that not everyones Nicklist will show up as the color green so + -V would be more suitable.Other wise nice snippet.
would you like some cheese with that?
I pointed out you had a valid point and stated a likely fact you would make a post in regards to the op flag in the on text event. as you have many times in the past.
as for jaytea's post I fully agree with it..
The only person that bother to post the code and still be in the same format that the poster posted was blackvenomm666 and the only one to go and explain the code tho still did not explain why it was used was Abcdefmonkey
I find it rather rude that no one bother to go hey good job and here is how I do it and this is why. the user is a new coder and no one bother to explain as they butchered the post making it "Better" when in fact it was fine how it was.
before any one goes and rewrites some ones work.. at least explain why so they can learn.. and be sure its better.. not just look cooler.
Perhaps refine was a wrong word. Example was the one that should be used. jaytea always has something discouraging, depending on whom he comes across, to say of the comments he sees otherwise. I don't, and will never, claim myself as a regex God but am here to help with the best of my knowledge. And MakiMaki, what makes you think I'll take my time to "go on" about your comments when you've tagged along after jaytea? What good does that do?
On @*:Text:*:#:{
var %i $strip($1)
if (%i == !green) {
mode # +v $nick
msg # Here ya go, $nick
}
elseif (%i == !ungreen) {
mode # -v $nick
msg # There ya go, $nick
} }
donno for sure about the local var use or just having the strip command twice I am sure jaytea can better say if it be better or not, replaced the $chan with #.. I get drilled about elseif use so I been using it more. and added a check if your oped.. as Jethro will go on about it ... he prob right it s a good idea to have if the op you hold is not all the time
@CommonKnowledge
Tokenize just sets the $1 $2 etc spots that are separated by the character specified. For example
tokenize 58 hey:hi:whats up
Separates each of those into $1 $2 $3 respectively because they're separated by $chr(58) which is the colon ( : ). So, $1 = hey $2 = hi $3 = whats up
In Blackvenom666's snippet he used
tokenize 32 $strip($1-)
This does exactly as the example I showed you for a better understanding. Except his is separated by a space ($chr(32))
Hope that helps. :) Also, you can refer to //help in mIRC for anything else. Other than that, feel free to ask any questions :)