Posted to tcl by Jack at Wed Feb 24 22:45:40 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 chan [encoding convertto utf-8 $channel]
  8. #chan configure $channel -encoding utf-8
  9. #chan configure $channel -translation binary
  10. #fconfigure $channel -encoding utf-8
  11. #set encoded [encoding convertto utf-8 $normalString]
  12. #set chan [encoding convertfrom utf-8 $chan]
  13.  
  14. set chan [lindex [split $channel #] 1]
  15. set chan [encoding convertto utf-8 $chan]
  16.  
  17. if {[dict exists $ops $nickname $chan]} {
  18.  
  19. set texto [dict keys [dict get $ops $nickname]]
  20. set texto [encoding convertto utf-8 $texto]
  21.  
  22. putquick "PRIVMSG #ops :$channel - $chan"
  23. putquick "PRIVMSG #ops :12$texto"
  24.  
  25. }
  26.  
  27. }