Guess you could use something like..

on ^*:text:*:#pitstock:{
if ($nick != nickname1) && ($nick != nickname2) && ($nick != nickname3) { halt }
}


Also see /help on text and /help if then else.

Regards,