# ******************************************
# ** 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!         **
# ******************************************

#============================
# CHANNEL 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.Channel.banOnlyClassC = 1

# Control whether Light will create *!*@*.host bans, or 
# *!*user@*.host bans.
@LIGHT.Channel.includeUsernameInBan = 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.Channel.smartBans = 1

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

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

# Control whether the person just zapped is ignored while zapped
@LIGHT.Channel.ignoreZappee = 0

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

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

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

# An option to control the creation of a new window when you join a channel.
@LIGHT.Channel.newWindowOnJoin = 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 nicks in public messages
@LIGHT.Channel.highlightPublics = 1

#============================
# 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

#============================
# FILES
#============================

# The saved messages file.  Note that the current IRC client's process ID
# is appended to this filename (for example. $HOME/.Light/messages.12345).
@LIGHT.Files.awayLog = [$HOME/.Light/messages]

# The configuration file
@LIGHT.Files.config = [$HOME/.Light/config]

# The default /log file
@LIGHT.Files.log = [$HOME/.Light/log]

#============================
# 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]

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

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

# Whether to utilize the xterm titlebar.
@LIGHT.Misc.updateTitleBar = 0

# Set this to 1 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.Misc.alwaysSetTitleBar = 0

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

# Whether to put the server name in the titlebar
@LIGHT.Misc.serverInTitle = 1

# Whether to put the topic in the titlebar
@LIGHT.Misc.topicInTitle = 0

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

# 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.Misc.showLagMeter = 1

# 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.Misc.showLPM = 0

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

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

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

# Timestamping.
@LIGHT.Misc.timeStamps = 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]

#============================
# 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.CMSC = [bold cyan]

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

# 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 = [%T \[%R\] %*%=%@%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 = [%T %*%=%@%N%#%Q%C%+ %>%D%1 ]

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

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

@LIGHT.AutoOp.patternList = []

#==========================================
# 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)
if (1) {
	@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)
} {
	@RED   = cparse(%b%N)
	@YEL   = cparse(%c%N)
	@BLU   = cparse(%r%N)
	@CYA   = cparse(%y%N)
	@BRED  = cparse(%B%N)
	@BYEL  = cparse(%C%N)
	@BBLU  = cparse(%R%N)
	@BCYA  = cparse(%Y%N)
	@BGRED = cparse(%4%N)
	@BGYEL = cparse(%6%N)
	@BGBLU = cparse(%1%N)
	@BGCYA = cparse(%3%N)
}

@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.PMSG = colornameparse($LIGHT.Color.PMSG)
@C.CMSC = colornameparse($LIGHT.Color.CMSC)

@C.SRVN = BYEL ## BGBLU
@C.HLPT = BYEL
@C.HLPA = BCYA

eval ^set status_user11 $colornameparse($LIGHT.StatusBar.currentWindowColor)

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

alias Light.upgradeConfig {
	if (fexist($LIGHT.Files.config) != 1) { return }

    @LIGHT.ConfigUpgraded         = 0
    @LIGHT.Channel.checkLengths  += 5
    @LIGHT.Misc.preferCompletion += 5
    load $LIGHT.Files.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 < 34020756) { # 2.7.30pre20
        if (LIGHT.Channel.checkLengths == 5) {
            @LIGHT.Channel.checkLengths = 1
            @LIGHT.ConfigUpgraded       = 1
        }
    }
    if (cv < 34020761) { # 2.7.30pre25
        if (LIGHT.Channel.hideNetsplits != 1) {
            @LIGHT.Channel.hideNetsplits = 1
            @LIGHT.ConfigUpgraded        = 1
        }
    }
    if (cv < 34020864) { # 2.7.30
        if (LIGHT.Misc.preferCompletion == 5) {
            @LIGHT.Misc.preferCompletion = 1
            @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

