Code:
on @*:JOIN:#: {
  if (*guest* iswm $nick) {
    kick $chan $nick No guest nicks allowed!
  }
  elseif (*visitor* iswm $nick) {
    kick $chan $nick No visitor nicks allowed!
  }
}


Make sure you have the @ there which checks to see if you're an op before kicking. Otherwise you're gonna get alot of:

* LordKnight: you're not channel operator

Messages if you have masses of Guest/Visitor nicks joining.