Hopefully I understood you correctly...
Code:
on *:INPUT:@nickserv:{
  if ( $1 == /msg ) {
    .msg $2-
    halt
  }
}

If someone types /msg NickServ identify yada yada in @nickserv with that code then it will send the text but hide that it is doing it.