Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Settings #32

Open
DanielOaks opened this issue Aug 20, 2017 · 1 comment
Open

Settings #32

DanielOaks opened this issue Aug 20, 2017 · 1 comment

Comments

@DanielOaks
Copy link
Member

DanielOaks commented Aug 20, 2017

There are lots of weird little settings to configure when using a bouncer. Nick to use, altnick, username/realname to send, etc.

@prawnsalad recommends that we for the most part clone how weechat does it, with keys like irc.<netname>.nick and similar. I'm a fan of that.

Commands:

  • /msg *status set <key> <value> - sets the given key to the value.
  • /msg *status unset <key> - unsets the given key if appropriate.
  • /msg *status iset <searchstring> - searches for any keys matching the search string, displays them. This roughly matches how /iset is used in weechat, and should help discoverability.

Given it's a key/value format for settings, in the datastore we can just prepend them with a standard key prefix used for settings. Something along the lines of these:

settings.global <key> <value>                     (admin settings shared across the whole bnc)
settings.user <user> <key> <value>                (default nickname, username, etc)
settings.network <user> <network> <key> <value>   (network nick, user, realname, etc)

By default we'll work out whether it's a global, user or network key based on the syntax (for instance, irc.* keys are always user-scoped, etc).

Of course, add *controlpanel aliases so that peeps familiar with ZNC can continue using their syntax instead of ours.

@prawnsalad
Copy link
Contributor

prawnsalad commented Aug 20, 2017

Pasting from #31

Assuming we have a network added called netname:

set irc.netname.logging [true/false/on/off/0/1]
set irc.netname.nick [default nick]
set irc.netname.nick2 [fallback nick 1]
set irc.netname.nick3 [fallback nick 2]

And for our user settings:

set me.nick [default nick]
set me.nick2 [fallback nick 1]
set me.nick3 [fallback nick 2]
set me.username [username]
set me.realname [realname]

If a new setting is not given, read the current value back to the user

[c] set me.nick
[s] me.nick = somenick
[c] set me.*
[s] me.nick = default nick
[s] me.nick2 = fallback nick 1
[s] me.nick3 = fallback nick 3
[s] me.username = username
[s] me.realname = realname

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants