can anyone help me make a script...

im in undernet so we verify our identities by using the command "/msg x verify $nick" so i need a script when a user joins in a channel the script will perform the verification command the x reply will is like this "-X- nick!~ident@ip.address is logged in as username" it a notice... like the code below but i dont know how to make a code for a notice... hope coders understand my english... thankz for the reply...

Code:
On @*:Join:#channel:{
  .msg x verify $nick
}

alias username {
  return username1 username2 username3 username4 username5
}

on 1:NOTICE:*:?: {
  the script here will detect the notice "-X- nick!~ident@ip.address is logged in as username"
    it will detect if the username have a match on the username variable like above
       then it will use a command to OP the user which was verifed
}