Why does this work
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
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!