2. What I meant was like:
on 1:text:*:#originalchannel: {
var %networkList newnetwork
var %channelList #newchan1
Not sure why you'd want to do it that way, but it would work. The problem with this method is that now only what's said in #originalchannel will be relayed, and nothing said in #newchan1 would be relayed. If that's what you want, then this would do the trick.
3. yes about colorlist what if I want
blue colour --> channel1
and
red colour --> channel2
if another on text event is calling the alias is $chan available then ?
Yes, that's what my alteration using %colorList would have done. Assuming you have 2 channels in the list, you'd use this line
var %colorList $+($chr(3),12 $chr(3),4)
When you use $gettok, and it's for the first channel, it returns $chr(3) $+ 12, which is the blue color. When it's for the second channel, it will return $chr(3) $+ 4, which is the red color.
Yes, $chan becomes the channel the on text event triggered from. $chan in such an event is automatically passed, as is $nick, but $1- you'll have to pass on your own. Remember that in your alias you'll need to check and see if things like $chan exist, if not, check and see if $active is a channel, if it's not, handle how ever you would for no channel being listed (
in this case, halting the script and displaying the error seems most appropriate). I'd check for $nick, because if it's an alias, it could end up being used as a command when no $nick is available, and handle the lack of a $nick appropriately.