Something like this?

Code:
on *:text:*:#tristansroom: {
  if ($1 == !hug) {
    if ($2 == $null) { .notice $nick Command incomplete. Syntax: !hug <Username>.  | halt }
    if ($2 !== $null) {
      if ($2 !ison $chan) { .notice $nick Sorry but user $2 is not in $chan  | halt }
      else { .msg $chan $nick goes and hugs $2 tight! | halt }
    }
  }
}


Last edited by jaystew; 14/02/14 06:57 PM. Reason: Cleaned it up a little

Regards

JayStew