I made this as a guide for someone on the Forums and decided i'd post it.
Alias aop {
if ($1 == On) { set %aop On | echo -a Aop is Now On. }
else { if ($1 == Off) { set %aop Off | echo -a Aop is now Off. }
}
}
on *:JOIN:#:{
var %autochan #channel1,#channel2,#channel3,#channel4
var %HaltNick Nick1,Nick2,Nick3,Nick4
if ($chan isin %autochan && %aop == On) {
if ($nick isin %HaltNick) { halt }
if ($me isop $chan) { mode $chan +o $nick }
else { if (%aop == Off) { Halt }
}
}
}
Why would i delete a comment i'm speaking the truth and you all have a right to your opinion. And btw it's not bad scripting if it works as you said "Fool."
This part of the code seems pointless, also:
Code:
else { if (%aop == Off) { Halt }
}
Of course it would have to reach that point if it was on there would be no need for it if the script was always on why shut it off if it's already off Now that is pointless lol
Did you ever think i wanted it that way?
And you are right about it being a Learning site but i did not post this to learn i posted it for others and if they want to alter it good for them go for it but otherwise it stays the same.
It works and it does what it is supposed to so why change it and the code isn't "Bad" If it works so don't even say that lol Give me 2 other reasons and no BS Reasons either.
I found the thread he posted this script in.. It was supposed to op everyone except one person (multiple people in this version) but the fact that he didn't specify anything other than "AutoOp" in this script combined with the fact that it has a list of nicknames is misleading. Anyone glancing at this might assume that it's a list of people they want to op.
This part of the code seems pointless, also:
else { if (%aop == Off) { Halt }
}
Especially since %aop has to be on for it to reach that point.
Another note script-wise, the isin operator should not be used unless you truly know that you want that functionality.
Given a nickname list "bobby,dude,someguy" if "bob" comes online you won't op him because "bob" is in "bobby,dude,someguy".
A better conditional is if ($istok(%HaltNick,$nick,44))
That checks to see if the nickname is equal to any of the tokens between commas, as it should.
if ($chan isin %autochan && %aop == On)
Can be changed in a similar fashion to
if ($istok(%autochan,$chan,44) && %aop == On)
lmao point in sharing ur snippet is to get comments to make it better. Just as it says when you post a snippet
These snippets abide by the Open Source Initiative (OSI) and are considered Open Source. Users can read, redistribute, and modify the source code you submit. This allows people to improve, adapt and evolove your code into something stronger and better. We encourage improvements as much as originality here at Hawkee. Always cite your original source by its URL.
So don't get bent when others make a comment
on a side note it doesn't say it's a pastebin either but rather an
Technology social network hence a place to share talk about an learn.
It's NOT that people take Hawkee to seriously, but rather they don't want to see the site get loaded with trash from people that post just to post.
DragonFlare ur opinion of " If it's not Broken why fix it " is kinda lame. In ur description you said " I made this as a guide for someone on the Forums and decided i'd post it " . The problem with that is you made ur code so inefficient in other words not a good snippet to learn from. All you are going to do is show others bad scripting habits.
Ohwell
There we go again that is your opinion lol
It may not be Wise but it is useful lol
Every Script is useful
Just like if you posted a script i could find some reason it isn't useful
First off you are saying it isn't wise or useful when you don't even know what the script was made for The script works and it does what it was Requested to do
Again we go back to "People" Wanting others to Script like them
And if you must know this Site was made For "People to post other scripts for people" No where in the rules of the site does it say anything about people not being able to post a script for someone When it comes down to it this is just like a pastebin site Why did you post your scripts on here? For decorations? No you posted them on here so other people can use them look at that a pastebin Pfft people take Hawkee to seriously it's pathetic.
Your notion of "If it ain't broke, don't fix it" doesn't apply to the general public, where your posted snippet doesn't quite fit the bill of its usefulness.
If your script was originally made for one particular person, you'd have to make sure you have another version that's gonna benefit the public use.
Giving people +o, excluding those on the list as per your snippet, easily is just not a wise practice.
This goes back to the question, "why do people keep treating Hawkee as a personal pastebin?"
Gummo
I'd just like to point out the fact that when you said that code above was good code, Jethro_, it will actually op everyone who is NOT on the list when aop is enabled..
That's correct.
The code is scripted like that because of a Request from another server i am on.
I have no need to update it because it matches the specifications of the person who Requested it.
In other words "Don't fix what isn't broken."
And no i did not get %HaltNick form another script.
If it's not Broken why fix it because you want it to look like your scripting?
That's basically what you are saying.
See i like my Codes to be different from others.
WorldDMT how have you been?
I don't like to see people fail. I like to see them improve. Accept experienced coders' suggestions and learn from them to refine their MSL. (by the way, I'm still learning; there are way too much to learn from the best!)
Unfortunately, some folks refuse to abide by that, thinking their codes are a definite must-read. The thing I sort of despise the most is to share redundant coding styles or bad habits with novice users. They may not understand much about MSL, and thus take your so-called "guide" or snippet to pass it down from one to another...and that's going to be a vicious cycle, isn't it? Perhaps they were the victims themselves...'cause that's how they were taught to code this way.
Off-Topic?:
Not everyone is on the same level... and as said most people have their own way of coding...
So as long as the scripts / snippets posted follow the rules and actually work like intended... there's no reason to be hating...
HATERs ! - They love to see you fall :P
ooO( Stoners... / Hippies... much more "re-tar-ded" ? ? :P )
EDIT:
It's not that I don't agree ( with some of it anyways )... was just saying... <3
DragonFlare wrote:
everyone has thier own Coding StyleThat is true, but you have to be sure that the code you've given or demonstrated is not redundant and ineffective. Like this one above by WorldDMT is an example of good coding. It doesn't take a genius to distinguish and realize that...
When coding, you have to put certain factors into perspective.