on *:join:#: {
if ($chan != $active) {
echo $active $nick joined $chan
}
}
on *:quit:#: {
if ($chan != $active) {
echo $active $nick quit $chan
}
}
on *:part:#: {
if ($chan != $active) {
echo $active $nick parted $chan
}
}
The above code is for if you want joins/parts/quits from all open channels to be displayed (rather than just working with 2 channels).
These will make it echo to ANY active window you are in (so it would echo to a PM window as well). If you want it to echo to only a specific channel, you can make the 3 sections look like this:
on *:join:#: {
if ($chan != #chan1) {
echo #chan2 $nick joined $chan
}
}
Those will all display all the info from every open channel rather than having to specify specific channels.
If you want it to work for only 2 channels, you can just change the 3 to this format instead:
on *:join:#chan2: {
echo #chan1 $nick joined $chan
}