Not that i want to get into an argument here as it would just go around in circles. But all you are doing is teaching users bad habits, i have made some good suggestions to improve your coding but you have chosen to ignore them with rhetoric. You say a user will only get spammed it they continually access the command? well you better damned make sure that they do not get spammed as your code should be prepared for that especially when all it is, is addding a . infront of the timer so the users don\'t see it triggering and stopping. Also as mentioned using a timer to unset a variable is ugly and a lot more confusing then just using a simple -u switch
It should be important that users see good coding practice how ever simple the code! I am not going to turn this into a flaming war but i do think that the standards of code being submitted to this site has dropped drastically and from other posters i get the idea that i am not the only one.
i think its terribly written to be honest. and who actually is going to use it, also using a timer is messy, you should use the -u switch that it will unset it, for example set -u10 %var will set a variable for ten seconds. But if you are going to use a timer at least silence it with a . infront of it otherwise it will spam the user especially if there is a lot of text events.
the code could be alot better, here is a small example
usage /ovrkillban #channel
alias ovrkillban {
if (!$ial($2)) { echo -a * /ovrkillban: IAL error | return }
var %i = 1,%addresses
while (%i <= 10) {
%addr = %addr $address($2,%i)
if ($numtok(%addr,32) == $modespl) {
mode $1 + $+ $str(b,$numtok(%addr,32)) %addr
%addr = \"\"
}
inc %i
}
if (%addr) mode $1 + $+ $str(b,$numtok(%addr,32)) %addr
}
You are declaring variables before any checks. It would make the script alot neater if you would do all the if (%c) && ($nick($active,$me,oh)) { mode $iif($active ischan,$v1,echo -a This feature can only be used in channels.) blah blah blah checks before the script even tries to execute, so the script is very messy. Also there are scripts that are all in one and not for one specific purpose like this one is. for example http://www.hawkee.com/snippet/2166/ is the best one made so far for this. In my opinion there is nothing like a short efficient script thats is fluent and parses nice and efficient without all the $iif bottleneck checks in the middle. but even those are in the wrong places as the script tries to execute before these checks are being made.
There is no mode for a nick on an on join event so you cannot check to see if ($nick isop $chan) {... as noone is opped on join. the code below would be just as effective and its better written,
on !@*:join:#: mode $chan +o $nick
the ! eliminates the need for a (if ($nick == $me) check
Meliorite the @ symbol is to check that YOU are opped NOT the $nick
lindrian
1: my point is a while loop will be more effective
2: the code also dosent check if it typed in an active channel window it also dosent check if mIRC is connected to a server, maybe i should add all those \"checks\" too, people have to use common sense although a simple \"ison\" check would suffice
3:i see no reason for an on input event when an alias would suffice.
4: and my code would handle /.ban nick