on *:start:{ hmake Shortcuts 10 } menu * { Chan Shortcuts:chan_ss } alias chan_ss { dialog -m c_s c_s } dialog c_s { title "Channel Shortcuts" size -1 -1 157 90 option dbu edit "", 1, 6 23 68 10 box "Settings", 2, 3 4 77 63 text "Actual Chan Name", 3, 7 13 47 8 text "Chan Shortcut", 4, 6 44 48 8 edit "", 5, 6 53 68 10 button "Add Shortcut", 7, 23 33 35 9 list 8, 92 23 60 52, sort size vsbar autohs box "Channel List", 9, 89 4 67 85 edit "", 10, 3 78 77 11, read text "Channels", 11, 93 13 52 8 button "Remove", 6, 92 76 26 11 button "Join All", 18, 125 76 26 11 text "Shortcut Name", 13, 4 69 45 8 menu "Menu", 16 item "Exit", 17, 16 menu "Links", 12 item "35k Chat", 14, 12 item "ChatScape", 15, 12 }
on *:dialog:c_s:init:*:{ If (!$hget(Shortcuts)) { hmake Shortcuts 10 } var %c 1 while (%c <= $hget(Shortcuts,0).item) { did -a $dname 8 $+($chr(35),$hget(Shortcuts,%c).item) inc %c } } on *:dialog:c_s:sclick:*:{ If ($did == 7) { If (!4did(1).text) && (!$did(5).text) { noop $input(Nothing Was Enterted,uwo,Error!) | halt } If (!$did(1).text) && ($did(5).text) { noop $input(You Need To Enter The Channels Name.,uwo,Error!) | halt } If ($did(1).text) && (!$did(5).text) { noop $input(You Need To Enter The Channels Shortcut.,uwo,Error!) | halt } If ($left($did(1).text,1) == $chr(35)) || ($left($did(5).text,1) == $chr(35)) { noop $input(You Don't Need To Specify The '#' Symbol.,uwo,Error!) | halt } Else { hadd -m Shortcuts $did(1).text $did(5).text did -a $dname 8 $+($chr(35),$did(1).text) did -r $dname 1,5 noop $input(Your Shortcut Has Been Added,o,Settings) } } If ($did == 6) { If (!$did(8).seltext) { noop $input(You Didn't Select Anything To Delete,uwo,Error!) | halt } Else { hdel Shortcuts $remove($did(8).seltext,$chr(35)) did -d $dname 8 $did(8).sel did -r $dname 10 } } If ($did == 18) { var %j 1 while (%j <= $did(8).lines) { join $did(8,%j) inc %j } } If ($did(8).sel) { did -ra $dname 10 $hget(Shortcuts,$remove($did(8).seltext,$chr(35))) } } on *:dialog:c_s:menu:*:{ If ($did == 14) { run http://35kchat.com } If ($did == 15) { run http://ChatScape.net } If ($did == 17) { dialog -x $dname $dname } } on *:dialog:c_s:dclick:8:{ join $did(8).seltext } alias join { If ($left($1,1) == $chr(35)) { join $1 } Else { var %i 1 while (%i <= $hget(Shortcuts,0).item) { If ($1 == $hget(Shortcuts,$hget(Shortcuts,%i).item)) { join $+($chr(35),$hfind(Shortcuts,$1).data) } inc %i } } }
|