All pastes #278582 Raw Edit

p4l / match:rank pro

public text v1 · immutable
·published 2006-12-14 05:51 UTC
rendered paste body
proc match:rank { hand } {
global owner master admin op voice chanmaster chanop chanvoice new

  if { [ matchattr $hand $owner ] } { return "Owner" }
  if { [ matchattr $hand $master ] } { return "Master" }
  if { [ matchattr $hand $admin ] } { return "Admin" }
  if { [ matchattr $hand $op ] } { return "Op" }
  if { [ matchattr $hand $voice ] } { return "Voice" }
  if { [ matchattr $hand $chanmaster ] } { return "Chanmaster" }
  if { [ matchattr $hand $chanop ] } { return "Chanop" }
  if { [ matchattr $hand $chanvoice ] } { return "Chanvoice" }
  if { [ matchattr $hand $new ] } { return "New" }

  return "Invalid"

}