menu * { ChanStats: chanstats } dialog join { title "Channel Statistics" size -1 -1 177 80 option dbu button "Close", 1, 134 62 37 12, ok text "Channel Modes:", 5, 7 4 40 8 edit "", 2, 51 3 120 10, read text "Channel Users", 6, 7 16 36 8 edit "Total", 7, 47 15 124 10, read edit "Op", 8, 134 26 37 10, read text "@", 9, 126 27 6 8 text "%", 10, 126 37 6 8 edit "Hop", 11, 134 36 37 10, read text "+", 12, 126 47 6 8 edit "Voice", 13, 134 46 37 10, read text "Channel Topic", 4, 8 27 37 8 edit "", 14, 8 37 114 39, read multi autovs vsbar button "Echo topic in active window", 3, 48 27 73 8 button "Topic has been echoed", 15, 9 37 113 39, disable hide } alias chanstats { set %C.modes $gettok($chan(#).mode,1,32)) set %C.userT $nick($chan,0) Total set %C.userO $nick($chan,0,o) Op set %C.userH $nick($chan,0,h) Hop set %C.userV $nick($chan,0,v) Voice set %C.Topic $gettok($chan(#).topic,1-,32)) dialog -mo join join did -ra join 2 %C.modes did -ra join 7 %C.userT did -ra join 8 %C.userO did -ra join 11 %C.userH did -ra join 13 %C.userV did -ra join 14 %C.Topic unset %C.modes,%C.userT,%C.userO,%C.userH,%C.userV } on *:dialog:join:sclick:3:{ echo -ta %C.Topic did -h join 14 did -v join 15 }