Posted to tcl by Jack at Wed Feb 24 22:45:40 GMT 2021view pretty

set ops {jack {españa {} ops {}} rick {españa {} mexico {}} kevin {us {}}}
	 
proc ban:ban1 { nickname hostname handle channel arguments } {
global ban
global ops

    #set chan [encoding convertto utf-8 $channel]
    #chan configure $channel -encoding utf-8
    #chan configure $channel -translation binary
    #fconfigure $channel -encoding utf-8
    #set encoded [encoding convertto utf-8 $normalString]
    #set chan [encoding convertfrom utf-8 $chan]
	
	set chan [lindex [split $channel #] 1]
	set chan [encoding convertto utf-8 $chan]
  
	if {[dict exists $ops $nickname $chan]} {	
	
		set texto [dict keys [dict get $ops $nickname]]
		set texto [encoding convertto utf-8 $texto] 
		
		putquick "PRIVMSG #ops :$channel - $chan"
		putquick "PRIVMSG #ops :12$texto"
		
	}

}