Educational question - 24/11/13 01:47 AM
Why does this work
but this doesn't work
Calling me confused. Took me a while to move things around to figure out why something I found to be a perfectly fine script no matter how I looked at it, wouldn't work. Surely #2 if wouldn't fire no matter what (if condition isn't met), regardless of where it's positioned? Clearly something I'm missing here.
Thanks!
Code:
on *:TEXT:!youtube*:#: { if (!$2-) { goto b } if ($2- && $nick == %ADMIN. [ $+ [ $chan ] ] || $nick == %SUPERADMIN) { goto a } :a set %YOUTUBE. $+ $chan $2- $msg($chan,New youtube message has been set.) return :b $msg($chan,%YOUTUBE. [ $+ [ $chan ] ] $+ .) return }
but this doesn't work
Code:
on *:TEXT:!youtube*:#: { if ($2- && $nick == %ADMIN. [ $+ [ $chan ] ] || $nick == %SUPERADMIN) { goto a } if (!$2-) { goto b } :a set %YOUTUBE. $+ $chan $2- $msg($chan,New youtube message has been set.) return :b $msg($chan,%YOUTUBE. [ $+ [ $chan ] ] $+ .) return }
Calling me confused. Took me a while to move things around to figure out why something I found to be a perfectly fine script no matter how I looked at it, wouldn't work. Surely #2 if wouldn't fire no matter what (if condition isn't met), regardless of where it's positioned? Clearly something I'm missing here.
Thanks!