You did it wrong. This is how you do it:
on ^*:TEXT:*:#chan1,#chan2,#chan3,#chan4: {
Also, you need to be aware that $chan in private message becomes $null.