$iif($isid,return,msg #) is meant to function in an alias - as an identifier or command to be called from a channel event.

"rapbqr" and "qrpbqr" appear because you're encoding the "encode" and "decode" text in $1-, use $2- instead.

Quote:
The decode option ideally needs to go into the main chat but only seen by whoever requested it. Again, it does this right now but is there a better way?

I don't know what you mean by this. You either send it to the channel or you send it to the user. You can't send it to the channel to be seen by only the user.

Your encode response was not working because you can't use /say in a remote event.

Code:
alias rot13 { return $regsubex($1-,/([a-z])/gi,$chr($calc($asc(\1) $iif($asc($upper(\1)) < 78,+,-) 13))) }

ctcp 1:encode *:?:msg #MarkSpoils $nick $+ : $rot13($$2-) }
ctcp 1:decode *:?:notice $nick $rot13($$2-)


Editing a post is only available for a limited period of time after the post is first made. And aside from very short lines or logically grouping commands it's preferable to break your script into multiple lines.

Last edited by Loki12583; 24/07/15 03:31 PM.