1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391
|
# Third Eye - Configuration schtuff
alias makeconf {
# open the file bit goes here.
@ SAVE.FILE = [$(tebase.cnf)/.conf]
@ unlink($SAVE.FILE)
@ SAVE.FD = open($SAVE.FILE w)
@ write($SAVE.FD # .\(Third Eye\). Configuration File #)
@ write($SAVE.FD ^assign defkick $defkick)
@ write($SAVE.FD ^assign defban $defban)
@ write($SAVE.FD ^assign defaway $defaway)
@ write($SAVE.FD ^assign defback $defback)
@ write($SAVE.FD ^assign defquit $defquit)
@ write($SAVE.FD ^assign defckick $defckick)
@ write($SAVE.Fd ^assign defskick $defskick)
@ write($SAVE.FD ^assign pt_cl $pt_cl)
@ write($SAVE.FD @ awaylog = [$awaylog])
@ write($SAVE.FD @ flood[protect] = [$flood[protect]])
@ write($SAVE.FD @ flood[message] = [$flood[message]])
@ write($SAVE.FD @ flood[notice] = [$flood[notice]])
@ write($SAVE.FD @ flood[nick] = [$flood[nick]])
@ write($SAVE.FD @ flood[version] = [$flood[version]])
@ write($SAVE.FD @ flood[ping] = [$flood[ping]])
@ write($SAVE.FD @ flood[other] = [$flood[other]])
@ write($SAVE.FD @ flood[invite] = [$flood[invite]])
@ write($SAVE.FD @ flood[send] = [$flood[send]])
@ write($SAVE.FD @ flood[chat] = [$flood[chat]])
@ write($SAVE.FD @ flood[edcc] = [$flood[edcc]])
@ write($SAVE.FD @ flood_unignore = [$flood_unignore])
@ write($SAVE.FD @ nsint = [$nsint])
@ write($SAVE.FD @ aatime = [$aatime])
@ write($SAVE.FD @ autorej = [$autorej])
@ write($SAVE.FD @ defumode = [$defumode])
@ write($SAVE.FD @ disphacks = [$disphacks])
@ write($SAVE.FD @ kick_colors = [$kick_colors])
@ write($SAVE.FD @ catch_urls = [$catch_urls])
@ write($SAVE.FD @ url_check = [$url_check])
@ write($SAVE.FD @ nsdetect = [$nsdetect])
@ write($SAVE.FD @ wkl_kick = [$wkl_kick])
@ write($SAVE.FD @ snd_kick = [$snd_kick])
@ write($SAVE.FD @ dcc_ag = [$dcc_ag])
@ write($SAVE.FD @ anc = [$anc])
@ write($SAVE.FD @ edcc = [$edcc])
@ write($SAVE.FD @ picdisplay = [$picdisplay])
@ write($SAVE.FD @ acprompt = [$acprompt])
@ write($SAVE.FD ^assign althl $althl)
@ write($SAVE.FD @ bgswitching = [$bgswitching])
@ write($SAVE.FD @ abl = [$abl])
@ write($SAVE.FD @ defaultbg = [$defaultbg])
@ write($SAVE.FD @ nsdisp = [$nsdisp])
@ write($SAVE.FD @ xtupd = [$xtupd])
@ write($SAVE.FD @ loudaa = [$loudaa])
@ write($SAVE.FD @ sounds = [$sounds])
@ write($SAVE.FD @ soundaway = [$soundaway])
@ write($SAVE.FD @ detatched_playback = [$detatched_playback])
@ write($SAVE.FD @ hidwin = [$hidwin])
@ write($SAVE.FD @ timestamp = [$timestamp])
@ write($SAVE.FD @ mytheme = [$mytheme])
@ write($SAVE.FD @ nhlw = [$nhlw])
@ write($SAVE.FD @ relstrip = [$relstrip])
@ write($SAVE.FD @ cachens = [$cachens])
@ write($SAVE.FD @ bantime = [$bantime])
@ write($SAVE.FD @ unbantimer = [$unbantimer])
@ write($SAVE.FD @ csaop = [$csaop])
@ close($SAVE.FD)
purge SAVE
}
alias makesnddefs {
@ unlink($(tebase.cnf)/.snddefs)
@ sfile = open($(tebase.cnf)/.snddefs W)
@ write($sfile # .\(Third Eye\). Sound definitions file #)
@ write($sfile @ soundprog = [$soundprog])
@ write($sfile @ msgsnd = [$msgsnd])
@ write($sfile @ notsnd = [$notsnd])
@ write($sfile @ kicksnd = [$kicksnd])
@ write($sfile @ invsnd = [$invsnd])
@ write($sfile @ notifysnd = [$notifysnd])
@ write($sfile @ unnotifysnd = [$unnotifysnd])
@ write($sfile @ pingsnd = [$pingsnd])
@ write($sfile @ pubhisnd = [$pubhisnd])
@ write($sfile @ connectsnd = [$connectsnd])
@ write($sfile @ disconnectsnd = [$disconnectsnd])
@ write($sfile @ loadsnd = [$loadsnd])
@ write($sfile @ exitsnd = [$exitsnd])
@ write($sfile @ dccclosesnd = [$dccclosesnd])
@ write($sfile @ mailsnd = [$mailsnd])
@ close($sfile)
}
alias loadsnd {
if (fexist($(tebase.cnf)/.snddefs) == -1) {
teecho SoundDef file not found... creating.
makesnddefs
}{
load $(tebase.cnf)/.snddefs
}}
alias loadconf {
if (fexist($(tebase.cnf)/.conf) == -1) {
teecho Config file not found... creating.
makeconf
}{
load $(tebase.cnf)/.conf
}}
alias makecoldefs {
@ unlink($(tebase.cnf)/.colordefs)
@ cfile = open($(tebase.cnf)/.colordefs W)
@ write($cfile # .\(Third Eye\). Color definitions file #)
@ write($cfile ^assign pubchan $pubchan)
@ write($cfile ^assign pubborders $pubborders)
@ write($cfile ^assign pubnick $pubnick)
@ write($cfile ^assign pubnickhi $pubnickhi)
@ write($cfile ^assign spub $spub)
@ write($cfile ^assign spubbord $spubbord)
@ write($cfile ^assign nick $nick)
@ write($cfile ^assign nborders $nborders)
@ write($cfile ^assign userhost $userhost)
@ write($cfile ^assign chan $chan)
@ write($cfile ^assign nlops $nlops)
@ write($cfile ^assign nlvoice $nlvoice)
@ write($cfile ^assign nlpleeb $nlpleeb)
@ write($cfile ^assign actcol $actcol)
@ write($cfile ^assign mbord1 $mbord1)
@ write($cfile ^assign mbord2 $mbord2)
@ write($cfile ^assign mbord3 $mbord3)
@ write($cfile ^assign mtxt $mtxt)
@ write($cfile ^assign mnick1 $mnick1)
@ write($cfile ^assign mnick2 $mnick2)
@ write($cfile ^assign muhost $muhost)
@ write($cfile ^assign dbord $dbord)
@ write($cfile ^assign dtxt $dtxt)
@ write($cfile ^assign dbord2 $dbord2)
@ write($cfile ^assign dnick1 $dnick1)
@ write($cfile ^assign dnick2 $dnick2)
@ write($cfile ^assign dbord3 $dbord3)
@ write($cfile ^assign nbord $nbord)
@ write($cfile ^assign nnick $nnick)
@ write($cfile ^assign nuhost $nuhost)
@ write($cfile ^assign nnick2 $nnick2)
@ write($cfile ^assign nbord3 $nbord3)
@ write($cfile ^assign ecol[1] $ecol[1])
@ write($cfile ^assign ecol[2] $ecol[2])
@ write($cfile ^assign ecol[3] $ecol[3])
@ write($cfile ^assign wallcol $wallcol)
@ write($cfile ^assign e2col[1] $e2col[1])
@ write($cfile ^assign e2col[2] $e2col[2])
@ write($cfile ^assign e2col[3] $e2col[3])
@ write($cfile ^assign n1col[1] $n1col[1])
@ write($cfile ^assign n1col[2] $n1col[2])
@ write($cfile ^assign n1col[3] $n1col[3])
@ write($cfile ^assign n2col[1] $n2col[1])
@ write($cfile ^assign n2col[2] $n2col[2])
@ write($cfile ^assign n2col[3] $n2col[3])
@ write($cfile ^assign statback $statback)
@ write($cfile ^assign statfor $statfor)
@ write($cfile ^assign statat $statat)
@ write($cfile ^assign stattime $stattime)
@ write($cfile ^assign statnick $statnick)
@ write($cfile ^assign statmode $statmode)
@ write($cfile ^assign statchan $statchan)
@ write($cfile ^assign dccbord $dccbord)
@ write($cfile ^assign dccbordmid $dccbordmid)
@ write($cfile ^assign dccnick $dccnick)
@ write($cfile ^assign dcctype $dcctype)
@ write($cfile ^assign dccfsize $dccfsize)
@ write($cfile ^assign dccfname $dccfname)
@ write($cfile ^assign dccstats $dccstats)
@ write($cfile ^assign inputbord $inputbord)
@ write($cfile ^assign inputmid $inputmid)
@ write($cfile ^assign tsbord $tsbord)
@ write($cfile ^assign tsmid $tsmid)
@ write($cfile ^assign ccl $ccl)
@ close($cfile)
}
alias loadcoldefs {
if (fexist($(tebase.cnf)/.colordefs) == -1) {
teecho ColorDef file not found... creating.
makecoldefs
}{
load $(tebase.cnf)/.colordefs
}
}
alias cfechot {
clear
xecho -window config $cbold$c0\$ccl Config: $cbold$c7$[8]* $cbold$c0\ $ccl
}
alias cfecho {
xecho -window config $cbold$c0\$ccl $*
}
alias cfechob {
xecho -window config $cbold$c0\ $ccl
}
alias cfteecho { xecho -window config $cbold$c0\$c7\TE$c0\$ccl $* }
alias getcol {
cfteecho $c0$cb7$zero\.$ccl $c1\1. $c2\2. $c3\3. $c4\4. $c5\5. $c6\6. $c7\7.
if ([$0]==1) { cfteecho $cbold$c0\A. $c1\B. $c2\C. $c3\D. $c4\E. $c5\F. $c6\G. $c7\H.$ccl }
@ gctmp = [$'Pick a color: ']
if (gctmp == [0]) { @ function_return = [$0]==1?cnorm ## c0:[$0]==2?cb0:c0 }
if (gctmp == 1) { @ function_return = [$0]==1?cnorm ## c1:[$0]==2?cb1:c1 }
if (gctmp == 2) { @ function_return = [$0]==1?cnorm ## c2:[$0]==2?cb2:c2 }
if (gctmp == 3) { @ function_return = [$0]==1?cnorm ## c3:[$0]==2?cb3:c3 }
if (gctmp == 4) { @ function_return = [$0]==1?cnorm ## c4:[$0]==2?cb4:c4 }
if (gctmp == 5) { @ function_return = [$0]==1?cnorm ## c5:[$0]==2?cb5:c5 }
if (gctmp == 6) { @ function_return = [$0]==1?cnorm ## c6:[$0]==2?cb6:c6 }
if (gctmp == 7) { @ function_return = [$0]==1?cnorm ## c7:[$0]==2?cb7:c7 }
if ([$0]==1) {
if (gctmp == [A]) { @ function_return = cbold ## c0 }
if (gctmp == [B]) { @ function_return = cbold ## c1 }
if (gctmp == [C]) { @ function_return = cbold ## c2 }
if (gctmp == [D]) { @ function_return = cbold ## c3 }
if (gctmp == [E]) { @ function_return = cbold ## c4 }
if (gctmp == [F]) { @ function_return = cbold ## c5 }
if (gctmp == [G]) { @ function_return = cbold ## c6 }
if (gctmp == [H]) { @ function_return = cbold ## c7 }
}}
alias confcol {
^local tccol 0
while (tccol != chr(10)) {
cfechot Colors
cfecho $[22] $cbold$c0\[$(c7)P$(c0)]$cnorm Public
cfecho $[22] $cbold$c0\[$(c7)M$(c0)]$cnorm Messages
cfecho $[22] $cbold$c0\[$(c7)N$(c0)]$cnorm Notices
cfecho $[22] $cbold$c0\[$(c7)D$(c0)]$cnorm DCC
cfecho $[22] $cbold$c0\[$(c7)G$(c0)]$cnorm Generic
cfecho $[22] $cbold$c0\[$(c7)I$(c0)]$cnorm Miscellaneous
cfechob
@ tccol = [$'Color config section: ']
switch ([$tccol]) {
([P]) { confcolmenu $(tebase.src)/config/colors.public Public }
([M]) { confcolmenu $(tebase.src)/config/colors.messages Messages }
([N]) { confcolmenu $(tebase.src)/config/colors.notices Notices }
([D]) { confcolmenu $(tebase.src)/config/colors.dcc DCC }
([G]) { confcolmenu $(tebase.src)/config/colors.generic Generic }
([i]) { confcolmenu $(tebase.src)/config/colors.misc Misc. }
}}
makecoldefs
}
alias config {
^local w1lev
@ w1lev = winlevel(1)
^window 1 level all
^window new
^window hide_others
^window name config
title_update Third Eye - Configuration
^local tcm 0
while (tcm != chr(10)) {
cfechot Main
cfecho $[22] $cbold$c0\[$(c7)F$(c0)]$cnorm Flood settings
cfecho $[22] $cbold$c0\[$(c7)T$(c0)]$cnorm Toggles [1/2]
cfecho $[22] $cbold$c0\[$(c7)O$(c0)]$cnorm Toggles [2/2]
cfecho $[22] $cbold$c0\[$(c7)C$(c0)]$cnorm Color definitions
cfecho $[22] $cbold$c0\[$(c7)S$(c0)]$cnorm Sound settings
cfecho $[22] $cbold$c0\[$(c7)M$(c0)]$cnorm Miscellaneous others
cfechob
@ tcm = [$'Config Main: ']
switch ([$tcm]) {
([F]) { confmenu $(tebase.src)/config/flood Flood }
([T]) { confmenu $(tebase.src)/config/toggles_1 Toggles }
([O]) { confmenu $(tebase.src)/config/toggles_2 Toggles }
([C]) { confcol }
([S]) {
confmenu $(tebase.src)/config/sounds Sounds
makesnddefs
}
([M]) { confmenu $(tebase.src)/config/misc Misc. }}}
makeconf
^window kill
if (!hidwin) {
^window show_all
}
^window 1 level $w1lev
updatexstuff
teecho Configuration saved.
}
alias loadconfdata {
^local cfile,str,tvar
@ cfile = open($twiddle($0) R)
while (!eof($cfile)) {
@ str = read($cfile)
@ tvar = word(0 $str)
@ cfdata[$tvar][type] = word(1 $str)
@ cfdata[$tvar][name] = word(2 $str)
@ cfdata[$tvar][desc] = afterw($cfdata[$tvar][name] $str)
}
@ close($cfile)
}
alias loadcoldisplay {
^local cfile,tvar
@ tvar = 0
@ cfile = open($twiddle($0).display R)
while (!eof($cfile)) {
@ coldispdata.${tvar<10?([0] ## tvar):tvar} = read($cfile)
@ tvar++
}
@ close($cfile)
}
alias pval {
if (cfdata[$0][type]==[S]) {
@ function_return = [$($cfdata[$0][name])]
} elsif (cfdata[$0][type]==[T]) {
@ function_return = disptog($($cfdata[$0][name]))
}
}
alias purgeconfigdata {
foreach cfdata xx {
foreach cfdata[$xx] yy {
^assign -cfdata[$xx][$yy]
}
}
}
alias purgecoldispdata {
foreach coldispdata xx {
^assign -coldispdata[$xx]
}
}
alias cfmod {
^local foo $cfdata[$0][desc]
if (cfdata[$0][type]==[T]) {
@ $cfdata[$0][name] = toggle($($cfdata[$0][name]))
} elsif (cfdata[$0][type]==[S]) {
@ $cfdata[$0][name] = [$"$foo: "]
} elsif (cfdata[$0][type]==[L]) {
fe ($cfdata[$0][name]) tvname {
@ $tvname = getcol()
}
} elsif (cfdata[$0][type]==[H]) {
fe ($cfdata[$0][name]) tvname {
@ $tvname = getcol(1)
}
} elsif (cfdata[$0][type]==[B]) {
fe ($cfdata[$0][name]) tvname {
@ $tvname = getcol(2)
}
}
}
alias confmenu {
^local tci,foo
@ foo = [$1-]
@ loadconfdata($0)
while (tci != chr(10)) {
cfechot $foo
foreach cfdata curdat {
cfecho $cbold$(c0)[$c7$curdat$(c0)]$cnorm $[30]cfdata[$curdat][desc] $[4] $cbold$(c0)[$ccl$pval($curdat)$cbold$(c0)]$ccl
}
cfechob
@ tci = [$'Config $foo: ']
if (cfdata[$tci][type]) {
@ cfmod($tci)
}
}
purgeconfigdata
}
alias confcolmenu {
^local tci,foo
@ foo = [$1-]
@ loadconfdata($0)
@ loadcoldisplay($0)
while (tci != chr(10)) {
cfechot $foo
foreach coldispdata curdat {
eval cfecho $coldispdata[$curdat]
}
cfechob
@ tci = [$'Color Config $foo: ']
if (cfdata[$tci][type]) {
@ cfmod($tci)
}
}
purgeconfigdata
purgecoldispdata
}
|