It's just the way you have formatted it, Try...
Code:
on ^*:HOTLINK:*:*:{
  return 
}

on *:HOTLINK:*:*:{
  if (*a* iswm $1) {
    echo a is in it
  }
  else {
    echo a is not in it
  }
}