Anywhere you're using a global variable such as %links use a dynamic variable with the channel name:

Code:
set %links. [ $+ [ # ] ] On


Instead of using global variables you can also use ini files or hash tables