# Srain built-in configuration file
# Application configuration.

version = "1.0.0rc5"        # String; Every configuration file should have a
                            # version, altough it is not used yet
# id = "im.srain.Srain"       # The identifier for Srain
theme = "default-bubble"    # String; Theme; Available values: default
csd = true                  # Bool; Whether enable Client-Side Decoration
send-on-ctrl-enter = false  # Bool; Send messsage on CTRL+Enter pressed
exit-on-close = false       # Bool; Exit program on main window closed
auto-connect = []           # String array; Servers that are auto connected
                            # after startup
server-visibility = true    # Bool; Whether the server buffer is visible
scroll-on-new-message = false # Auto scroll when a new message is recieved
chat-list-order = "recent"  # String; Set to "alphabet" for alphabetical order sort

# If you want to report/fix a bug, terminal log will be helpful.
log =
{
    prompt-color = true     # Bool; Colorful output
    prompt-file = false     # Bool; Display the filename of the file which log
                            # statement is located
    prompt-function = true  # Bool; As aboved, function name
    prompt-line = false     # Bool; As aboved, line number

    # String array; Specify the log level of a group of files
    debug-targets   = []    # Files with debug log level
    info-targets    = []    # Files with information log level
    warn-targets    = [""]  # Files with warning log level
    error-targets   = []    # Files with error" log level
}

# Global IRC Server configuration, this group can also appear in server-list.
server =
{
    auto-join = []  # String array; Chats that are auto joined after server
                    # is created
    auto-run = []   # String array; Commands that are auto run after server
                    # is created

    user =
    {
        nickname = "SrainUser"
        username = "Srain"
        realname = "Can you can a can?"

        login:
        {
            method = "none"     # String; Login method; Available values:
                                # - none: No login method, default value
                                # - nickserv: Login with NICKSERV command
                                # - msg-nickserv: Login with /msg NickServ identify
                                # - sasl-plain: Login with SASL PLAIN mechanism
                                # - sasl-ecdsa: Login with SASL
                                #   ECDSA-NIST256P-CHALLENGE mechanism
                                # - sasl-external: Login with SASL EXTERNAL mechanism
                                #   (requires a TLS certificate set in the **server**
                                #   section, not the one just below)

            # For method "sasl-ecdsa"
            # certificate = ""  # String; Path to login ECDSA certificate file, used for
                                # sasl-ecdsa authentication (**not** sasl-external)
        }

        # Default messages for performing specified action
        part-message = "Leaving."
        kick-message = "Kick."
        away-message = "Away from keyboard."
        quit-message = "El Psy Congroo."
    }

    # Chat configuration, this group can also appear in chat-list.
    chat =
    {
        log = true                      # Bool; Persistent chat log to storage
        notify = true                   # Bool; Send notification when you are
                                        # mentioned by others or receiving any
                                        # ERROR message
        notify-all = true               # Bool; Send notification when receiving
                                        # any PRIVMSG/ACTION/NOTIFY/ERROR message
        show-topic = true               # Bool; Show topic
        show-avatar = false             # Bool; Show user avater
        show-user-list = true           # Bool; Show user list
        render-mirc-color = true        # Bool; Render mirc color
        nick-completion-suffix = ":"    # String; Suffix of completed nick name
                                        # e.g. "nick: msg"

        preview-url = true          # Bool; Show previewer for every URL
        auto-preview-url = true     # Bool; Automatically preview supported URL

        auto-run = []   # String array; Commands that are auto run after
                        # chat is created
    }

    # Specified chat configuration, every element in list should have a unique
    # ``name``.
    chat-list =
    (
        {
            # ``name`` is necessary for a ``chat`` group in ``chat-list``.
            name = "#srain"
            show-topic = true
        }
    )
}

# Specified server configuration, every element in list should have a unique
# "name".
server-list =
(
    {
        # ``name``, ``addresses`` are necessary for a ``server`` group
        # in ``server-list``, otherwise you can not connect to it.
        name = "Libera Chat"        # String; The unique name of server
        addresses = [
            "irc.libera.chat:6697"
        ]                           # String array; Addresses of IRC server,
                                    # each address follows the format of
                                    # <host>[:<port>]. The port can be omitted,
                                    # default 6667 for non-TLS and 6697 for TLS
        tls = true                  # Bool; Connect with TLS encryption
        # tls-noverify = false      # Bool; Connect with TLS encryption but without
                                    # certificate verification, only used while
                                    # connecting to a self-signed certificate
                                    # verified server
        encoding = "utf-8"          # String; Encoding of IRC server, to get
                                    # all available value of encoding, check the
                                    # output of ``iconv --list``
        # ipv6 = false              # Use IPv6 connection, not yet supported
        # certificate = "/home/you/.config/srain/libera.pem"
                                    # Client TLS certificate, that can be used for
                                    # authentication with CertFP or SASL EXTERNAL (if
                                    # ``method = "sasl-external"`` is set in the
                                    # ``user`` configuration)
    },
    {
        name = "OFTC"
        addresses = ["irc.oftc.net:6697"]
        tls = true
        encoding = "utf-8"
    },
    {
        name = "hackint"
        addresses = ["irc.hackint.org:6697"]
        tls = true
        encoding = "utf-8"
    },
    {
        name = "Rizon"
        addresses = ["irc.rizon.net:6697"]

        tls = true
        encoding = "utf-8"
    },
    {
        name = "DALnet"
        addresses = [
            "irc.dal.net:6697",
            "agility.nl.eu.dal.net:6697",
            "bifrost.ca.us.dal.net:6697",
            "bitcoin.uk.eu.dal.net:6697",
            "choopa.nj.us.dal.net:6697",
            "diamond.hub.dal.net:6697",
            "fidelity.tx.us.dal.net:6697",
            "foxtrot.hub.dal.net:6697",
            "halcyon.il.us.dal.net:6697",
            "hash.ix.nl.dal.net:6697",
            "hoon.ix.au.dal.net:6697",
            "istana.ix.sg.dal.net:6697",
            "jingo.ix.us.dal.net:6697",
            "karsk.ix.eu.dal.net:6697",
            "kiwi.ix.nz.dal.net:6697",
            "koala.vc.au.dal.net:6697",
            "laud.ix.us.dal.net:6697",
            "loyalty.ix.us.dal.net:6697",
            "merlin.hub.dal.net:6697",
            "midnight.hub.dal.net:6697",
            "ninja.hub.dal.net:6697",
            "nonstop.ix.me.dal.net:6697",
            "oi.ix.au.dal.net:6697",
            "oper-e.dal.net:6697",
            "paradigm.hub.dal.net:6697",
            "powertech.no.eu.dal.net:6697",
            "punch.wa.us.dal.net:6697",
            "rangers.ix.us.dal.net:6697",
            "redemption.ix.us.dal.net:6697",
            "renew.hub.dal.net:6697",
            "smurf.hub.dal.net:6697",
            "underworld.se.eu.dal.net:6697",
            "uworld.hub.dal.net:6697"
        ]
        tls = true
        encoding = "utf-8"
    },
    {
        name = "EFnet"
        addresses = [
            "irc.efnet.fr:6667",
            "efnet.port80.se:6697",
            "efnet.portlane.se:6667",
            "irc.du.se:6667",
            "irc.homelien.no:6667",
            "irc.inet.tele.dk:6667",
            "irc.nordunet.se:6667",
            "irc.underworld.no:6667",
            "irc.choopa.net:6697",
            "irc.colosolutions.net:6667",
            "irc.mzima.net:6667",
            "irc.prison.netirc.servercentral.net:6667"
        ]
        tls = false
        encoding = "utf-8"
    },
    {
        name = "IRCnet"
        addresses = [
            "irc.ssl.ircnet.com:6697",
            "irc.ircnet.com:6667",
            "irc.at.ircnet.com:6667",
            "irc.be.ircnet.com:6667",
            "irc.cz.ircnet.com:6667",
            "irc.dk.ircnet.com:6667",
            "irc.ee.ircnet.com:6667",
            "irc.fi.ircnet.com:6667",
            "irc.fr.ircnet.com:6667",
            "irc.de.ircnet.com:6667",
            "irc.hu.ircnet.com:6667",
            "irc.it.ircnet.com:6667",
            "irc.jp.ircnet.com:6667",
            "irc.nl.ircnet.com:6667",
            "irc.no.ircnet.com:6667",
            "irc.pl.ircnet.com:6667",
            "irc.si.ircnet.com:6667",
            "irc.se.ircnet.com:6667",
            "irc.us.ircnet.com:6667"
        ]
        tls = false
        encoding = "utf-8"
    },
    {
        name = "Undernet"
        addresses = [
            "irc.undernet.org:6667",
            "ix1.undernet.org:6667",
            "ix2.undernet.org:6667",
            "ashburn.va.us.undernet.org:6667",
            "bucharest.ro.eu.undernet.org:6667",
            "budapest.hu.eu.undernet.org:6667",
            "chicago.il.us.undernet.org:6667"
        ]
        tls = false
        encoding = "utf-8"
    },
    {
        name = "QuakeNet"
        addresses = [
            "irc.quakenet.org:6667",
            "dreamhack.se.quakenet.org:6667",
            "euroserv.fr.quakenet.org:6667",
            "irc.ipv6.quakenet.org:6667",
            "port80a.se.quakenet.org:6667",
            "port80b.se.quakenet.org:6667",
            "port80c.se.quakenet.org:6667",
            "portlane.se.quakenet.org:6667",
            "servercentral.il.us.quakenet.org:6667",
            "underworld1.no.quakenet.org:6667"
        ]
        tls = false
        encoding = "utf-8"
    },
    {
        name = "freenode"
        addresses = [
            "irc.freenode.net:6697",
            "chat.freenode.net:6697",
            "irc.freenode.org:6697",
            "chat.freenode.org:6697"
        ]
        tls = true
        encoding = "utf-8"
    },
    {
        name = "localhost"
        addresses = ["localhost:6667", "127.0.0.1:6667"]
        tls = false
    }

# TODO: More predefined servers
)
