some random code taken from other tcl scripts
user flag check[edit]
#Dekadent Learn v1.0.1 by CoolMaster for eggdrop # Verify if user have access flags to use learn changes, return 1 if yes else return 2 proc check_access {hand type} { global learn if {[matchattr $hand $learn($type)] == 1} {return 1} else {return 2} }