File: options

package info (click to toggle)
epic4-script-light 1%3A2.8.0-4
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 772 kB
  • sloc: makefile: 25; sh: 7
file content (441 lines) | stat: -rw-r--r-- 14,134 bytes parent folder | download | duplicates (2)
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
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
# ******************************************
# ** NOTE ** NOTE ** NOTE ** NOTE ** NOTE **
# ******************************************
# ********* DO NOT EDIT THIS FILE! *********
# ******************************************
# ** If you do, you will LOSE all of your **
# **      changes when you upgrade!       **
# ******************************************
# **        Instead, use /config!         **
# ******************************************

#============================
# BAN AND ZAP OPTIONS
#============================

# Control whether Light's bans will follow the old class A/B/C
# divisions (if set to 0), or always ban class Cs (if set to 1).
# If set to 0, user@12.34.56.78 will be banned as *!*@12.*
# If set to 1, user@12.34.56.78 will be banned as *!*@12.34.56.*
@LIGHT.Ban.onlyClassC = 1

# Control whether Light will create *!*@*.host bans, or
# *!*user@*.host bans.
@LIGHT.Ban.includeUser = 0

# Control whether Light's SmartBans(tm) are enabled.  If enabled, Light will
# retain more parts of a user's hostname if we know how that domain
# structures its hostmasks.  For example, 207-172-74-7.s7.tnt2.man.erols.com
# will be banned as *!*@*.erols.com if set to 0, or *!*@*.man.erols.com if
# set to 1.
@LIGHT.Ban.smartBans = 1

# Control how long Light waits before unbanning the recipient of a /zap.
@LIGHT.Zap.time = 15

# Control whether the person just zapped is ignored while zapped
@LIGHT.Zap.ignore = 0

# Control whether Light displays how long the zap was for in the /kick
# message
@LIGHT.Zap.showTime = 0

# Control whether /zaps ban the user's exact host, or bans a wildcard
@LIGHT.Zap.exact = 1

#============================
# CHANNEL OPTIONS
#============================

# Control whether or not Light hides netsplits.
@LIGHT.Channel.hideNetsplits = 1

# An option of dubious value to suppress showing joins and parts.
@LIGHT.Channel.suppressJoinPart = 0

# An option to control whether your public messages look like > blah or
# <nick> blah
@LIGHT.Channel.prefixOwnMessages = 0

# An option to control whether Light checks the length of topic and kick messages.
@LIGHT.Channel.checkLengths = 1

# An option for sorting /NAMES output
@LIGHT.Channel.sortNames = 0

# An option for formatting /NAMES output into nice, neat columns
@LIGHT.Channel.columnarNames = 0

# An option for highlighting public messages
@LIGHT.Channel.highlightPublics = 1

# An option for highlighting nicks in public messages
@LIGHT.Channel.highlightPublicsNicksToo = 0

#============================
# DCC OPTIONS
#============================

# Control whether Light shows a user's IP address when displaying DCC offers.
@LIGHT.DCC.showAddress = 0

# Control whether Light shows a user's user@host when displaying DCC offers.
@LIGHT.DCC.showUserHost = 0

#============================
# DEFAULT MESSAGES
#============================

# Control whether or not Light sends back a PONG message instead of a PING
# time.
@LIGHT.Msgs.sendPong = 0

# The default /back message
@LIGHT.Msgs.back = [hath returned]

# The default CTCP FINGER response
@LIGHT.Msgs.finger = [Keep your fingers to yourself!]

# The default kick/zap comment
# As far as I'm aware, HoopyCat coined this phrase.
@LIGHT.Msgs.kick = [You have activated the Automatic Moron Ejection System\(tm\)]

# The default filterkick comment
# As far as I'm aware, orabidoo coined this phrase.
@LIGHT.Msgs.fkick = [Though names may change, each face retains the mask it wore.]

# The default PONG message (not used unless you enabled sendPong above)
@LIGHT.Msgs.pong = [Ding-dong, you're wrong!]

# The default /quit message
@LIGHT.Msgs.quit = [changing universes]

# Auto-away message
@LIGHT.Msgs.aaway = [be right back]

#============================
# STATUS BAR OPTIONS
#============================

# Controls whether Light will automatically turn on double-height status bars.
@LIGHT.StatusBar.autoDouble = 1

# Controls whether or not Light uses the LagMeter.  (Note: the LagMeter only
# shows up if you enable double-height status bars (/window double on).)
@LIGHT.StatusBar.showLagMeter = 1

# Controls how often the LagMeter updates.
@LIGHT.StatusBar.lagMeterInterval = 60

# Controls whether or not Light will do lines-per-minute counts on your
# channels.  (Note: the LPM Counter only shows up if you enable double-
# height status bars (/window double on).)
@LIGHT.StatusBar.showLPM = 0

# Controls whether Light shows the On Channel widget.
@LIGHT.StatusBar.showOC = 1

# Controls whether Light shows ops in the OC widget too.
@LIGHT.StatusBar.showOCOps = 0

# Controls whether Light shows halfops in the OC widget too.
@LIGHT.StatusBar.showOCHops = 0

# Controls whether Light shows voices in the OC widget too.
@LIGHT.StatusBar.showOCVoices = 0

# Controls whether Light shows empty slots in the OC widget.
@LIGHT.StatusBar.showOCEmpty = 1

# Controls whether Light shows the Notify widget.
@LIGHT.StatusBar.showNotify = 1

# Controls how long information stays in the notify widget.
@LIGHT.StatusBar.notifyTime = 120

# Whether or not to colorize the status bar
@LIGHT.StatusBar.colored = 1

# Status bar color (if enabled above)
@LIGHT.StatusBar.color = [light cyan on blue]

# Current window highlight in status bar color
@LIGHT.StatusBar.currentWindowColor = []

# The format of the single-line statusbar.
@LIGHT.StatusBar.format = [%\{2\}0%T %\{1\}1\[%R\]%\{1\}0 %*%=%@%N%#%S%K%H%B%Q%A%C%+%O%M%F%L%D%>%1]

# The format of the top line of the double-line statusbar.
@LIGHT.StatusBar.format1 = [%\{2\}0%T %*%=%@%N%#%Q%C%+%>%D%1]

# The format of the bottom line of the double-line statusbar.
@LIGHT.StatusBar.format2 = [%\{2\}0 %\{1\}1\[%R\]%\{1\}0%S%K%H%B%A%O%M%F%L%6 %>%5%4%2%3 ]

#============================
# TITLE BAR OPTIONS
#============================

# Whether to utilize the xterm titlebar.
@LIGHT.TitleBar.enabled = 0

# Whether or not to force title bar updates.
# NOTE: If you do this and your terminal doesn't support it, you could hang
# your terminal.  Use at your own risk!  I provide this only for users of
# CRT and SecureCRT (these programs honor the xterm "set titlebar" sequence,
# but not the "get titlebar" sequence).
@LIGHT.TitleBar.alwaysSet = 0

# Whether to save the titlebar and restore it on exit
@LIGHT.TitleBar.save = 1

# Whether to put the server name in the titlebar
@LIGHT.TitleBar.showServer = 1

# Whether to put the topic in the titlebar
@LIGHT.TitleBar.showTopic = 0

#============================
# MISCELLANEOUS OPTIONS
#============================

# Controls whether Light uses color.
@LIGHT.Misc.color = 1

# How many nicks to remember in the TabKey list
@LIGHT.Misc.maxNicks = 100

# Text to highlight, wherever it's found
@LIGHT.Misc.highlightText = []

# Timestamping.
@LIGHT.Misc.timeStamps = 0

# Daystamping.
@LIGHT.Misc.dayStamps = 0

# Prefer completion over TabKey
@LIGHT.Misc.preferCompletion = 1

# LightPaste(tm)
@LIGHT.Misc.lightPaste = 0

# Number of lines before LightPaste triggers
@LIGHT.Misc.lightPasteCount = 4

# Show topic in titlebar
@LIGHT.Misc.topicInTitle = 0

# Use menu completion
@LIGHT.Misc.menuCompletion = 0

# DICT server
@LIGHT.Misc.dictServer = [dict.org]

# Auto-away
@LIGHT.Misc.idle = 0

# Auto-away timer
@LIGHT.Misc.idleTime = 60

# Controls whether Light uses the terminal's box-drawing characters, if supported by the terminal
@LIGHT.Misc.drawBoxes = 1

# The default /log file
@LIGHT.Misc.logFile = [~/.Light/log]

#============================
# WINDOW OPTIONS
#============================

# Automatically create a new window when you /join a channel
@LIGHT.Window.joinInNew = 0

# Automatically create a new window when you start a /query
@LIGHT.Window.queryInNew = 0

# doesn't work yet
# Automatically create /query window when you start a DCC CHAT
@LIGHT.Window.dccInNew = 0

# doesn't work yet
# Automatically create /query windows when you receive a /msg
@LIGHT.Window.autoNewQuery = 0

# Automatically 'maximize' (hide_other) windows
@LIGHT.Window.autoMaximize = 0

# doesn't work yet
# Create a Messages window for privmsgs and DCC CHATs
#bool Window.createMsgs false

#============================
# COLOR OPTIONS
#============================

# Highlight color
@LIGHT.Color.highlight = []

@LIGHT.Color.CHAN = [bold red]
@LIGHT.Color.MODE = [bold cyan]
@LIGHT.Color.HOST = [bold yellow]
@LIGHT.Color.NICK = [bold green]
@LIGHT.Color.FILE = [bold yellow]
@LIGHT.Color.TIME = [bold yellow]
@LIGHT.Color.PMSG = [bold cyan]
@LIGHT.Color.PNCK = [bold green]
@LIGHT.Color.NCKH = [bold yellow]
@LIGHT.Color.CMSC = [bold cyan]

#==========================================
# AUTO-OP/AUTO-VOICE STUFF
#==========================================

@LIGHT.AutoOp.patternList = []

#==========================================
# KEYBINDING STUFF
#==========================================

@LIGHT.KeyMapper.enabled = 0

#==========================================
# NO USER-SERVICEABLE PARTS PAST THIS POINT
#==========================================

@RST   = cparse(%n%N)
@BLK   = cparse(%k%N)
@RED   = cparse(%r%N)
@GRN   = cparse(%g%N)
@YEL   = cparse(%y%N)
@BLU   = cparse(%b%N)
@MAG   = cparse(%m%N)
@CYA   = cparse(%c%N)
@WHT   = cparse(%w%N)
@BBLK  = cparse(%K%N)
@BRED  = cparse(%R%N)
@BGRN  = cparse(%G%N)
@BYEL  = cparse(%Y%N)
@BBLU  = cparse(%B%N)
@BMAG  = cparse(%M%N)
@BCYA  = cparse(%C%N)
@BWHT  = cparse(%W%N)
@BGBLK = cparse(%0%N)
@BGRED = cparse(%1%N)
@BGGRN = cparse(%2%N)
@BGYEL = cparse(%3%N)
@BGBLU = cparse(%4%N)
@BGMAG = cparse(%5%N)
@BGCYA = cparse(%6%N)
@BGWHT = cparse(%7%N)
@RED   = cparse(%r%N)
@YEL   = cparse(%y%N)
@BLU   = cparse(%b%N)
@CYA   = cparse(%c%N)
@BRED  = cparse(%R%N)
@BYEL  = cparse(%Y%N)
@BBLU  = cparse(%B%N)
@BCYA  = cparse(%C%N)
@BGRED = cparse(%1%N)
@BGYEL = cparse(%3%N)
@BGBLU = cparse(%4%N)
@BGCYA = cparse(%6%N)

alias Light.upgradeItem (oldname, newname) {
	if (aliasctl(assign match $oldname)) {
		^assign $newname $($oldname)
		^assign -$oldname
		@LIGHT.ConfigUpgraded = 1
	}
}

alias Light.upgradeConfig {
	if (fexist(~/.Light/config) != 1) { return }
	load ~/.Light/config

	Light.upgradeItem LIGHT.General.showLagMeter LIGHT.Misc.showLagMeter
	Light.upgradeItem LIGHT.General.lagMeterInterval LIGHT.Misc.lagMeterInterval
	Light.upgradeItem LIGHT.TabKey.maxNicks LIGHT.Misc.maxNicks
	Light.upgradeItem LIGHT.Misc.highlightColor LIGHT.Color.highlight

	@:cv = Light.parseVersion($LIGHT.ConfigVersion)
	if (cv < 34078595) { # 2.8pre3
		Light.upgradeItem LIGHT.Misc.autoDoubleStatusBars LIGHT.StatusBar.autoDouble
		Light.upgradeItem LIGHT.Misc.lagMeterInterval LIGHT.StatusBar.lagMeterInterval
		Light.upgradeItem LIGHT.Misc.showLagMeter LIGHT.StatusBar.showLagMeter
		Light.upgradeItem LIGHT.Misc.showLPM LIGHT.StatusBar.showLPM

		Light.upgradeItem LIGHT.Misc.alwaysSetTitleBar LIGHT.TitleBar.alwaysSet
		Light.upgradeItem LIGHT.Misc.saveTitleBar LIGHT.TitleBar.save
		Light.upgradeItem LIGHT.Misc.serverInTitle LIGHT.TitleBar.showServer
		Light.upgradeItem LIGHT.Misc.topicInTitle LIGHT.TitleBar.showTopic
		Light.upgradeItem LIGHT.Misc.updateTitleBar LIGHT.TitleBar.enabled

		Light.upgradeItem LIGHT.Channel.banOnlyClassC LIGHT.Ban.onlyClassC
		Light.upgradeItem LIGHT.Channel.exactZap LIGHT.Zap.exact
		Light.upgradeItem LIGHT.Channel.ignoreZappee LIGHT.Zap.ignore
		Light.upgradeItem LIGHT.Channel.includeUsernameInBan LIGHT.Ban.includeUser
		Light.upgradeItem LIGHT.Channel.showTimeInZap LIGHT.Zap.showTime
		Light.upgradeItem LIGHT.Channel.smartBans LIGHT.Ban.smartBans
		Light.upgradeItem LIGHT.Channel.zapTimer LIGHT.Zap.time
	}
	if (cv < 34078601) { # 2.8pre9
		Light.upgradeItem LIGHT.Channel.newWindowOnJoin LIGHT.Window.joinInNew
		Light.upgradeItem LIGHT.Files.log LIGHT.Misc.logFile
		if ([] != LIGHT.Files.awayLog) {
			^assign -LIGHT.Files.awayLog
			@LIGHT.ConfigUpgraded = 1
		}
		if ([] != LIGHT.Files.config) {
			^assign -LIGHT.Files.config
			@LIGHT.ConfigUpgraded = 1
		}
	}

	if (LIGHT.Channel.checkLengths < 0 || LIGHT.Channel.checkLengths > 1) {
		@LIGHT.Channel.checkLengths = !!LIGHT.Channel.checkLengths
		@LIGHT.ConfigUpgraded = 1
	}
	if (LIGHT.Misc.preferCompletion < 0 || LIGHT.Misc.preferCompletion > 1) {
		@LIGHT.Misc.preferCompletion = !!LIGHT.Misc.preferCompletion
		@LIGHT.ConfigUpgraded = 1
	}

	if (LIGHT.ConfigUpgraded) {
		lecho L Upgrading configuration...
		lsave -quiet
	}

	^assign -LIGHT.ConfigVersion
	^assign -LIGHT.ConfigUpgraded
}

Light.upgradeConfig
alias -Light.upgradeItem
alias -Light.upgradeConfig

@C.CHAN = colornameparse($LIGHT.Color.CHAN)
@C.MODE = colornameparse($LIGHT.Color.MODE)
@C.HOST = colornameparse($LIGHT.Color.HOST)
@C.NICK = colornameparse($LIGHT.Color.NICK)
@C.FILE = colornameparse($LIGHT.Color.FILE)
@C.TIME = colornameparse($LIGHT.Color.TIME)
@C.NCKH = colornameparse($LIGHT.Color.NCKH)
@C.CMSC = colornameparse($LIGHT.Color.CMSC)
@C.OPER = BGRN ## BGBLU
Light.fixPmsgAndPnck

@C.ON  = BGRN
@C.OFF = BRED

fe (lsat last  mgs msg  pnig ping  sever server  srever server  vre ver  vresion version) xx yy { @LIGHT.Misc.typoMap[$xx] = yy }
Light.setupTypos

if (LIGHT.epicVersion < 65795) { # EPIC4-1.1.3
	@LIGHT.Misc.commands  = [# : abort admin alias assign away beep bind bless break bye call cd channel clear comment connect continue ctcp date dcc deop describe die disconnect do dump echo encrypt eval exec exit fe fec flush for foreach help history hook host hostname if ignore info input input_char invite irchost ircname ircuser ison join kick kill knock lastlog leave license links list load local lusers map me mesg mode motd msg names nick note notice notify on oper package parsekey part pause ping pop pretend push query queue quit quote rbind realname reconnect redirect rehash repeat restart return rping save say send sendline server servlist set setenv shift shook signoff silence sleep squery squit stack stats stub switch time timer topic trace type unclear unless unload unshift until uping userhost userip usleep usrip version wait wallchops wallops which while who whois whowas window xdebug xecho xeval xquote xtype]
	if (LIGHT.epicVersion >= 2560) { # EPIC4-0.10.0
		@LIGHT.Misc.commands = sort(defer $LIGHT.Misc.commands)
	}
} {
	@LIGHT.Misc.commands = tolower($sort($getcommands()))
}