#
# Configured servers
#
# silc.silcnet.org is DNS round robin for all (currently) known public SILCNet servers.
#
servers = (
  { address = "silc.silcnet.org"; chatnet = SILCNet; port = 706; autoconnect = "yes"; }
);

#
# Configured chat networks
#
chatnets = {
  SILCNet = { type = "SILC"; };
};

#
# Configured channels
#
channels = (
  { name = "silc"; chatnet = SILCNet; autojoin = No; }
);

#
# Keyboard bindings (BIND command)
#
keyboard = (
  { key = "meta-K"; id = "command"; data = "key channel * change"; }
); 

#
# Your favorite aliases
#
aliases = {
  LEAVE = "part";
  BYE = "quit";
  EXIT = "quit";
  SIGNOFF = "quit";
  DESCRIBE = "action";
  LAST = "lastlog";
  SAY = "msg *";
  WHO = "users *";
  WI = "whois";
  WII = "whois $0 $0";
  WW = "whowas";
  W = "who";
  N = "names";
  M = "msg";
  T = "topic";
  C = "clear";
  CL = "clear";
  K = "kick";
  KB = "kickban";
  KN = "knockout";
  BANS = "ban";
  B = "ban";
  IG = "ignore";
  UNIG = "unignore";
  SB = "scrollback";
  WC = "window close";
  WN = "window new hide";
  GOTO = "sb goto";
  ADMIN = "info";
  RUN = "SCRIPT LOAD";
  UPTIME = "eval exec - expr `date +%s` - \\$F | awk '{print \"Irssi uptime: \"int(\\\\\\$1/3600/24)\"d \"int(\\\\\\$1/3600%24)\"h \"int(\\\\\\$1/60%60)\"m \"int(\\\\\\$1%60)\"s\" }'";
  CALC = "exec - if which bc &>/dev/null\\; then echo '$*' | bc | awk '{print \"$*=\"$$1}'\\; else echo bc was not found\\; fi";
  SBAR = "STATUSBAR";
  Q = "QUERY";
  MOOD = "ATTR status_mood";
  OP = "CUMODE $C +o";
  DEOP = "CUMODE $C -o";
};

#
# Configuration for statusbar and other bars that appear on the screen
#
statusbar = {
  # formats:
  # when using {templates}, the template is shown only if it's argument isn't
  # empty unless no argument is given. for example {sb} is printed always,
  # but {sb $T} is printed only if $T isn't empty.

  items = {
    # start/end text in statusbars
    barstart = "{sbstart}";
    barend = "{sbend}";

    # treated "normally", you could change the time/user name to whatever
    time = "{sb $Z}";
    user = "{sb $cumode$N{sbaway $A}}";
    usermode = " {sbusermode $usermode}";
    topic = " $topic";
    topic_empty = " SILC Client v$J - http://silcnet.org/";

    # treated specially .. window is printed with non-empty windows,
    # window_empty is printed with empty windows
    window = "{sb $winref:$T{sbmode $M}}";
    window_empty = "{sb $winref{sbservertag $tag}}";
    prompt = "{prompt $[.15]T}";
    prompt_empty = "{prompt $winname}";

    # all of these treated specially, they're only displayed when needed
    lag = "{sb Lag: $0-}";
    act = "{sb Act: $0-}";
    more = "-- more --";
  };

  # there's two type of statusbars. root statusbars are either at the top
  # of the screen or at the bottom of the screen. window statusbars are at
  # the top/bottom of each split window in screen.
  default = {
    # the "default statusbar" to be displayed at the bottom of the window.
    # contains all the normal items.
    window = {
      disabled = "no";

      # window, root
      type = "window";
      # top, bottom
      placement = "bottom";
      # number
      position = "1";
      # active, inactive, always
      visible = "active";

      # list of items in statusbar in the display order
      items = {
        barstart = { priority = "100"; };
        time = { };
        user = { };
        window = { };
        window_empty = { };
        lag = { priority = "-1"; };
        act = { priority = "10"; };
        usermode = { priority = "-1"; };
        more = { priority = "10"; alignment = "right"; };
        barend = { priority = "100"; alignment = "right"; };
      };
    };

    # statusbar to use in inactive split windows
    window_inact = {
      type = "window";
      placement = "bottom";
      position = "1";
      visible = "inactive";
      items = {
        barstart = { priority = "100"; };
        window = { };
	window_empty = { };
        more = { priority = "-1"; alignment = "right"; };
        barend = { priority = "100"; alignment = "right"; };
      };
    };

    # we treat input line as yet another statusbar :) It's possible to
    # add other items before or after the input line item.
    prompt = {
      type = "root";
      placement = "bottom";
      # we want to be at the bottom always
      position = "100";
      visible = "always";
      items = {
        prompt = { priority = "-1"; };
        prompt_empty = { priority = "-1"; };
        # treated specially, this is the real input line.
        input = { priority = "10"; };
      };
    };

    # topicbar
    topic = {
      type = "root";
      placement = "top";
      position = "1";
      visible = "always";
      disabled = "no";
      items = {
        barstart = { priority = "100"; };
        topic = { };
        topic_empty = { };
        barend = { priority = "100"; alignment = "right"; };
      };
    };
  };
};

#
# Settings (can be changed with /SET command)
#
# You can set the default cipher, hash function and HMAC to be used
# as setting as well.  You can set it here or use the /SET command.
#
# /set crypto_default_cipher
# /set crypto_default_hash
# /set crypto_default_hmac
#
# Available ciphers are (default: aes-256-cbc):
#
# aes-256-ctr, aes-192-ctr, aes-128-ctr,
# aes-256-cbc, aes-192-cbc, aes-128-cbc,
# twofish-256-cbc, twofish-192-cbc, twofish-128-cbc,
# cast-256-cbc, cast-192-cbc and cast-128-cbc
#
# Available hash functions are (default: sha1):
#
# sha256, sha1 and md5
#
# Available HMAC's are (default: hmac-sha1-96):
#
# hmac-sha1-96, hmac-md5-96, hmac-sha1 and hmac-md5
#
#
# You can set the default nickname formatting string.  If there are multiple
# same nicknames on a SILC channel, this format string defines how they
# appear on the channel.  Default nickname_format is "%n#%a".
#
# /set nickname_format
#
# %n  nickname      - the real nickname returned by the server (mandatory)
# %a  number        - ascending number in case there are several
#                     same nicknames (fe. nick#2 and nick#3)
# %h  hostname      - the stripped hostname of the client
# %H  full hostname - the full hostname of the client
#
# A separator character must follow '%n' if any other formatter follows it.
#
settings = {
  "fe-common/core" = {
    autocreate_own_query = "yes";
    use_status_window = "no";
    autoclose_windows = "no";
    use_msgs_window = "no";
    autocreate_windows = "yes";
    autocreate_query_level = "MSG";
    reuse_unused_windows = "yes";
  };
  core = {
    server_reconnect_time = "10000";
    resolve_reverse_lookup = "yes";
  };
  "fe-text" = { indent = "8"; };
};
