Use an alias to do your job, and just call it in your event, here is an exemple :
on *:text:*:#:dojob $nick $chan $1-
on *:action:*:#:dojob $nick $chan $1-
on *:notice:*:#:dojob $nick $chan $1-
alias dojob {
;$1 is the nick
;$2 is the channel
;$3 is the text
...
}