Posted to tcl by b0t at Thu Feb 25 14:19:08 GMT 2021view raw

  1. set ops {jack {españa {} ops {}} rick {españa {} mexico {}} kevin {us {}}}
  2.  
  3. proc ban:ban1 { nickname hostname handle channel arguments } {
  4. global ban
  5. global ops
  6.  
  7. set channel [lindex [split $channel #] 1]
  8. set channel [encoding convertfrom utf-8 $channel]
  9.  
  10. set ops [encoding convertfrom utf-8 $ops]
  11.  
  12. if {[dict exists $ops [string tolower $nickname] $channel]} {
  13.  
  14. #YES, EXISTS!
  15. }
  16.  
  17. }