1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-06-09 21:30:42 +00:00
Commit Graph

524 Commits

Author SHA1 Message Date
IsaacM88
23c6936398 Improve MUC title behaviour for roster, statusbar, and titlebar
## Abstract

Continuation of https://github.com/profanity-im/profanity/pull/1881

Give all MUC title commands a consistent command structure and appearance.

- `/roster room use name|jid` and `/roster room show|hide server` are now `/roster room title bookmark|jid|localpart|name`
- `/statusbar room room|jid` is now `/statusbar room title bookmark|jid|localpart|name`
- `/statusbar show|hide jid` and `/statusbar show|hide name` are now `/titlebar room title bookmark|jid|localpart|name`

Fix both bugs mentioned in https://github.com/profanity-im/profanity/pull/1881

### src/ui/mucwin.c:mucwin_generate_title

Called by each command to generate a properly formatted title. It checks for "name" first because "name" is the default preference for each command. The last if-statement sets the title to "localpart" for special cases when the title should be "localpart" instead of the user-defined preference.

## Testing

### Preparation

Remove preferences that will interfere with testing.

```
sed -i "/roster.rooms.title=/d" profrc
sed -i "/statusbar.room.title=/d" profrc
sed -i "/titlebar.muc.title=/d" profrc
sed -i "/roster.rooms.use.name=/d" profrc
sed -i "/roster.rooms.server=/d" profrc
sed -i "/statusbar.room=/d" profrc
sed -i "/titlebar.muc.title.jid=/d" profrc
sed -i "/titlebar.muc.title.name=/d" profrc
sed -i "/roster.rooms.by=/d" profrc
```

### Command Definitions

| Test | Window |
| :--- | :--- |
| `/help roster` | - /roster room title bookmark\|jid\|localpart\|name<br>- room title bookmark\|jid\|localpart\|name : Display the bookmark name, JID, JID localpart, or room name as the roster title for MUCs.<br>- *No /roster show\|hide server*<br>- *No /roster room use jid\|name* |
| `/help statusbar` | - /statusbar room title bookmark\|jid\|localpart\|name<br>- room title bookmark\|jid\|localpart\|name : Display the bookmark name, JID, JID localpart, or room name as the title for MUC tabs.<br>- *No /statusbar room jid\|room* |
| `/help titlebar` | - /titlebar room title bookmark\|jid\|localpart\|name<br>- room title bookmark\|jid\|localpart\|name : Display the bookmark name, JID, JID localpart, or room name as the MUC window title.<br>- *No /titlebar show\|hide jid\|name* |

### Autocomplete

| Test | Command line |
| :--- | :--- |
| `/roster room <TAB>` | Autocompletes `title` |
| `/roster room title <TAB>` | Autocompletes `bookmark\|jid\|localpart\|name` |
| `/statusbar room <TAB>` | Autocompletes `title` |
| `/statusbar room title <TAB>` | Autocompletes `bookmark\|jid\|localpart\|name` |
| `/titlebar room <TAB>` | Autocompletes `title` |
| `/titlebar room title <TAB>` | Autocompletes `bookmark\|jid\|localpart\|name` |
| `/roster room <TAB>` | Does not autocomplete `use`, `show`, or `hide` |
| `/roster room use <TAB>` | Does not autocomplete `name` |
| `/roster room show <TAB>` | Does not autocomplete `server` |
| `/roster room hide <TAB>` | Does not autocomplete `server` |
| `/statusbar room <TAB>` | Does not autocomplete `jid` or `room` |
| `/titlebar show <TAB>` | Does not autocomplete `jid` or `name` |
| `/titlebar hide <TAB>` | Does not autocomplete `jid` or `name` |

### Set Preferences

| Test | Window | profrc |
| :--- | :--- | :--- |
| `/roster room title bookmark` | Roster MUCs will display 'bookmark' as their title. | roster.rooms.title=bookmark |
| `/roster room title jid` | Roster MUCs will display 'jid' as their title. | roster.rooms.title=jid |
| `/roster room title localpart` | Roster MUCs will display 'localpart' as their title. | roster.rooms.title=localpart |
| `/roster room title name` | Roster MUCs will display 'name' as their title. | roster.rooms.title=name |
| `/roster room title invalid` | Invalid usage, see '/help roster' for details. | |
| `/statusbar room title bookmark` | Displaying 'bookmark' as the title for MUC tabs. | statusbar.room.title=bookmark |
| `/statusbar room title jid` | Displaying 'jid' as the title for MUC tabs. | statusbar.room.title=jid |
| `/statusbar room title localpart` | Displaying 'localpart' as the title for MUC tabs. | statusbar.room.title=localpart |
| `/statusbar room title name` | Displaying 'name' as the title for MUC tabs. | statusbar.room.title=name |
| `/statusbar room title invalid` | Invalid usage, see '/help statusbar' for details. |  |
| `/titlebar room title bookmark` | MUC windows will display 'bookmark' as the window title. | titlebar.muc.title=bookmark |
| `/titlebar room title jid` | MUC windows will display 'jid' as the window title. | titlebar.muc.title=jid |
| `/titlebar room title localpart` | MUC windows will display 'localpart' as the window title. | titlebar.muc.title=localpart |
| `/titlebar room title name` | MUC windows will display 'name' as the window title. | titlebar.muc.title=name |
| `/titlebar room title invalid` | Invalid usage, see '/help titlebar' for details. |  |
| `/roster room use jid` | Invalid usage, see '/help roster' for details. |  |
| `/roster room use name` | Invalid usage, see '/help roster' for details. |  |
| `/roster room show server` | Invalid usage, see '/help roster' for details. |  |
| `/roster room hide server` | Invalid usage, see '/help roster' for details. |  |
| `/statusbar room jid` | Invalid usage, see '/help statusbar' for details. |  |
| `/statusbar room room` | Invalid usage, see '/help statusbar' for details. |  |
| `/titlebar show jid` | Invalid usage, see '/help titlebar' for details. |  |
| `/titlebar hide jid` | Invalid usage, see '/help titlebar' for details. |  |
| `/titlebar show name` | Invalid usage, see '/help titlebar' for details. |  |
| `/titlebar hide name` | Invalid usage, see '/help titlebar' for details. |  |

### Display Set Preferences

| Test | Window |
| :--- | :--- |
| /prefs ui | - Roster rooms title (/roster) : name<br>- Room tab display (/statusbar) : name<br>- MUC window title (/titlebar) : name |

### Test MUC Window

#### Test: without *name* preference, without *room name* field

```
/join muc@dmn.im
/room config
/field1 ""
/form submit
/quit
```

| Test | Roster | Statusbar | Titlebar |
| :--- | :--- | :--- | :--- |
| `/join muc@dmn.im` | muc<span/>@dmn.im | muc<span/>@dmn.im | muc<span/>@dmn.im |
| `/room config` |  | muc<span/>@dmn.im conf | muc<span/>@dmn.im config |
| `/field2 edit` |  |  | muc<span/>@dmn.im config * |
| `/msg tst` | tst | muc<span/>@dmn.im/tst | muc<span/>@dmn.im/tst |
| `/roster room by service` | muc |  |  |

#### Test: with *name* preference, without *room name* field

```
/roster room title name
/statusbar room title name
/titlebar room title name
/save
/quit
```

| Test | Roster | Statusbar | Titlebar |
| :--- | :--- | :--- | :--- |
| `/join muc@dmn.im` | muc<span/>@dmn.im | muc<span/>@dmn.im | muc<span/>@dmn.im |
| `/room config` |  | muc<span/>@dmn.im conf | muc<span/>@dmn.im config |
| `/field2 edit` |  |  | muc<span/>@dmn.im config * |
| `/msg tst` | tst | muc<span/>@dmn.im/tst | muc<span/>@dmn.im/tst |
| `/roster room by service` | muc |  |  |

#### Test: without *name* preference, with *room name* field

```
sed -i "/roster.rooms.title=/d" profrc
sed -i "/statusbar.room.title=/d" profrc
sed -i "/titlebar.muc.title=/d" profrc
/join muc@dmn.im
/room config
/field1 "my_room"
/form submit
/quit
```

| Test | Roster | Statusbar | Titlebar |
| :--- | :--- | :--- | :--- |
| `/join muc@dmn.im` | my_room | my_room | my_room |
| `/room config` |  | my_room conf | my_room config |
| `/field2 edit` |  |  | my_room config * |
| `/msg tst` | tst | my_room/tst | my_room/tst |
| `/roster room by service` | my_room |  |  |

#### Test: with *name* preference, with *room name* field

```
/quit
/roster room title name
/statusbar room title name
/titlebar room title name
/save
/quit
```

| Test | Roster | Statusbar | Titlebar |
| :--- | :--- | :--- | :--- |
| `/join muc@dmn.im` | my_room | my_room | my_room |
| `/room config` |  | my_room conf | my_room config |
| `/field2 edit` |  |  | my_room config * |
| `/msg tst` | tst | my_room/tst | my_room/tst |
| `/roster room by service` | my_room |  |  |

#### Test: with *localpart* preference

```
/quit
/roster room title localpart
/statusbar room title localpart
/titlebar room title localpart
/save
/quit
```

| Test | Roster | Statusbar | Titlebar |
| :--- | :--- | :--- | :--- |
| `/join muc@dmn.im` | muc | muc | muc |
| `/room config` |  | muc conf | muc config |
| `/field2 edit` |  |  | muc config * |
| `/msg tst` | tst | muc/tst | muc/tst |
| `/roster room by service` | muc |  |  |

#### Test: with *bookmark* preference, without *bookmark name*

```
/quit
/roster room title bookmark
/statusbar room title bookmark
/titlebar room title bookmark
/save
/quit
/bookmark add muc@dmn.im
```

| Test | Roster | Statusbar | Titlebar |
| :--- | :--- | :--- | :--- |
| `/bookmark join muc@dmn.im` | muc<span/>@dmn.im | muc<span/>@dmn.im | muc<span/>@dmn.im |
| `/room config` |  | muc<span/>@dmn.im conf | muc<span/>@dmn.im config |
| `/field2 edit` |  |  | muc<span/>@dmn.im config * |
| `/msg tst` | tst | muc<span/>@dmn.im/tst | muc<span/>@dmn.im/tst |
| `/roster room by service` | muc |  |  |

#### Test: with *bookmark* preference, with *bookmark name*

```
/quit
/bookmark remove muc@dmn.im
/bookmark add muc@dmn.im name "my_bookmark"
```

| Test | Roster | Statusbar | Titlebar |
| :--- | :--- | :--- | :--- |
| `/bookmark join muc@dmn.im` | my_bookmark | my_bookmark | my_bookmark |
| `/room config` |  | my_bookmark conf | my_bookmark config |
| `/field2 edit` |  |  | my_bookmark config * |
| `/msg tst` | tst | my_bookmark/tst | my_bookmark/tst |
| `/roster room by service` | my_bookmark |  |  |

#### Test: with *jid* preference

```
/quit
/roster room title jid
/statusbar room title jid
/titlebar room title jid
/save
/quit
```

| Test | Roster | Statusbar | Titlebar |
| :--- | :--- | :--- | :--- |
| `/join muc@dmn.im` | muc<span/>@dmn.im | muc<span/>@dmn.im | muc<span/>@dmn.im |
| `/room config` |  | muc<span/>@dmn.im conf | muc<span/>@dmn.im config |
| `/field2 edit` |  |  | muc<span/>@dmn.im config * |
| `/msg tst` | tst | muc<span/>@dmn.im/tst | muc<span/>@dmn.im/tst |
| `/roster room by service` | muc |  |  |

### Test Contact Chat Window Title

#### Test: without contact nick

```
/roster add tst@dmn.im
```

| Test | Titlebar |
| :--- | :--- |
| `/msg tst@dmn.im` | tst<span/>@dmn.im |

#### Test: with contact nick

```
/roster add tst@dmn.im my_tst
```

| Test | Titlebar |
| :--- | :--- |
| `/msg my_tst` | my_tst <tst<span/>@ike.snikket.chat> |

### Test Preference Upgrade

#### Test /roster

| Test | profrc |
| :--- | :--- |
| `sed -i '/\[ui\]/a\roster.rooms.use.name=name' profrc` | Original key removed. |
| `sed -i '/\[ui\]/a\roster.rooms.use.name=' profrc` | Original key removed. |
| `sed -i '/\[ui\]/a\roster.rooms.server=' profrc` | Original key removed. |
| `sed -i '/\[ui\]/a\roster.rooms.use.name=jid' profrc` | Original key removed.<br>roster.rooms.title=jid |
| `sed -i '/\[ui\]/a\roster.rooms.use.name=jid' profrc`<br>`sed -i '/\[ui\]/a\roster.rooms.server=false' profrc` | Original keys removed.<br>roster.rooms.title=localpart |
| `sed -i '/\[ui\]/a\roster.rooms.use.name=jid' profrc`<br>`sed -i '/\[ui\]/a\roster.rooms.server=true' profrc` | Original keys removed.<br>roster.rooms.title=jid |
| `sed -i '/\[ui\]/a\roster.rooms.use.name=jid' profrc`<br>`sed -i '/\[ui\]/a\roster.rooms.server=' profrc` | Original keys removed.<br>roster.rooms.title=jid |
| `sed -i '/\[ui\]/a\statusbar.room=' profrc` | Original key removed. |
| `sed -i '/\[ui\]/a\statusbar.room=room' profrc` | Original key removed.<br>statusbar.room.title=localpart |
| `sed -i '/\[ui\]/a\statusbar.room=jid' profrc` | Original key removed.<br>statusbar.room.title=jid |
| `sed -i '/\[ui\]/a\titlebar.muc.title.jid=' profrc` | Original key removed. |
| `sed -i '/\[ui\]/a\titlebar.muc.title.name=' profrc` | Original key removed. |
| `sed -i '/\[ui\]/a\titlebar.muc.title.jid=true' profrc` | Original key removed. |
| `sed -i '/\[ui\]/a\titlebar.muc.title.name=true' profrc` | Original key removed. |
| `sed -i '/\[ui\]/a\titlebar.muc.title.jid=false' profrc` | Original key removed. |
| `sed -i '/\[ui\]/a\titlebar.muc.title.name=false' profrc` | Original key removed. |
| `sed -i '/\[ui\]/a\titlebar.muc.title.jid=true' profrc`<br>`sed -i '/\[ui\]/a\titlebar.muc.title.name=false' profrc` | Original key removed.<br>titlebar.muc.title=jid |
| `sed -i '/\[ui\]/a\titlebar.muc.title.jid=false' profrc`<br>`sed -i '/\[ui\]/a\titlebar.muc.title.name=true' profrc` | Original keys removed. |
| `sed -i '/\[ui\]/a\titlebar.muc.title.jid=true' profrc`<br>`sed -i '/\[ui\]/a\titlebar.muc.title.name=true' profrc` | Original keys removed. |

### Test Valgrind

No memory leaks detected relating to these changes.
2023-10-05 18:16:04 -06:00
Steffen Jaeckel
b36562c6b6 Introduce win_println_va()
Previously we printed a format string into a `GString` to then print that
result again into a `GString` and display that.
This patch removes one level of `GString` printing by forwarding the
`va_arg` to the newly added API `win_println_va()`.

Introducing `static win_println_va_internal()` also allowed refactoring
most of the `win_print*()` and `win_append*()` implementations and removing
all the redundant code.

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2023-09-01 12:12:44 +02:00
Steffen Jaeckel
5657aac33d Fix some more char* -> gchar*.
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2023-08-31 23:14:02 +02:00
Michael Vetter
f7cce4c5c1 Move /os into /privacy os
Related to https://github.com/profanity-im/profanity/issues/1836
2023-07-25 16:35:14 +02:00
Michael Vetter
feba4b8263 Add cons_privacy_setting() to print privacy setting infos 2023-07-24 18:25:34 +02:00
Steffen Jaeckel
76a8de891e Improve const-correctness of API
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2023-05-12 08:39:19 +02:00
Steffen Jaeckel
b1b6c6f62d add /strophe command to modify libstrophe-specific settings
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2023-01-18 17:04:41 +01:00
Michael Vetter
3adc399da0 Update copyright year 2023-01-10 10:37:25 +01:00
Michael Vetter
3bdc14dbcf Merge MAM improvements from #1724
I think this PR already solves and improves the MAM situation a lot.

What's @MarcoPolo-PasTonMolo still wanted to do in this branch is:
* MAM for mucs
* Check if url and quotes autocompletion works fine
* Check if the api still works fine
* Resolve conflicts

Conflicts are solved with this commit.

MAM for mucs can be another feature PR.

The rest we can check while being on master. And more people can help
testing.
2022-10-21 13:30:43 +02:00
Marouane L
f934c5b59f
Add vCard support
Only nicknames, photos, birthdays, addresses, telephone numbers, emails,
JIDs, titles, roles, notes, and URLs are supported

Due to the synopsis array not having enough space, `/vcard photo
open-self` and `/vcard photo save-self` are not documented properly in
the synopsis section of the `/vcard` command, but they are documented in
the arguments section

Fixed memory leak in vcard autocomplete (thanks to debXwoody)
2022-10-18 23:24:30 +01:00
MarcoPolo-PasTonMolo
47b3e528e2 Handle scrolling down when buffer fills up 2022-07-10 11:17:35 +03:00
MarcoPolo-PasTonMolo
6429698f18 Fix initial MAM not displaying
Did this by waiting for a batch of MAM messages to arrive before
prepending them to the buffer. Also limited the number of messages
to fetch to 10 so that the user gets more frequent updates.
2022-07-05 00:06:04 +03:00
MarcoPolo-PasTonMolo
ea83165a35 Get messages from history when scrolling up. 2022-07-03 21:29:36 +03:00
Michael Vetter
918d060817 Display mood preferences 2022-06-22 11:45:13 +02:00
Michael Vetter
2e85f18cd6 Use our omemo sid/fingerprint in qr code
Current clients sid/fingerprint will be shown in following format:
`xmpp:<user@server>?omemo-sid-<numerical-sid>=<omemo-fingerprint-hex-string>`

Fix https://github.com/profanity-im/profanity/issues/1320
2022-05-31 15:44:44 +02:00
Michael Vetter
cf83976b51 Add basic qrcode functions 2022-05-30 18:04:36 +02:00
Michael Vetter
1330ad4e1e Update copyright year 2022-05-09 15:43:33 +02:00
Michael Vetter
b16bdca726 ox: show ox preferences 2022-05-05 23:55:31 +02:00
Steffen Jaeckel
b28ac09368 a tad more const-correctness
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2022-03-22 11:44:00 +01:00
MarcoPolo-PasTonMolo
da3a6d8743 Move declaration and definition of win_get_last_sent_message to the correct place 2021-10-22 10:24:51 +03:00
Michael Vetter
f21595597f Format code correctly 2021-10-05 10:01:27 +02:00
Michael Vetter
06482fdaef Add option to only allow messages from jids in roster
`/silence on` will throw away all messages (type: chat, normal) that
come from jids that are not in the roster.

Implement https://github.com/profanity-im/profanity/issues/955
2021-07-01 18:02:03 +02:00
Michael Vetter
ef96bea82e XEP-0157: Print contact addresses 2021-06-30 10:45:59 +02:00
Michael Vetter
8ef35290bd Add command to show single bookmark details
`/bookmark list` lists all bookmarks with its details.
`/bookmark list <jid>` shows the details of a single bookmark.

Implement https://github.com/profanity-im/profanity/issues/1558
2021-06-09 15:53:21 +02:00
DebXWoody
1526a00123
Attention flag - Implemented Alt+m 2021-05-29 20:16:21 +02:00
DebXWoody
6dd11f0fff
Attention flag for groupchats
Attention flag for groupchat and display the windows via "/wins attention"
2021-05-29 09:30:13 +02:00
Thorben Günther
71236a0d5a
Update ui_ask_password to support confirmation
Just prints a different string to console.
Useful for changing passwords or account registration.
2021-03-11 14:40:17 +01:00
Michael Vetter
44fc3f0506 Add /mam command
Regards https://github.com/profanity-im/profanity/issues/660
2021-01-28 15:11:50 +01:00
Michael Vetter
8c08e64f37 Update copyright 2021-01-08 16:36:30 +01:00
Michael Vetter
7b49fbdf45 Pass window to functions so we dont have to call twice 2020-07-09 16:11:50 +02:00
Michael Vetter
11d849aa7f Dont hilight console once all messages have been read
If we receive a message we get:
<< room message: eagle@conference.anoxinon.me (win 2)

Same for private chats and regular chats.
And several other kinds of notifications.

If we only receive notifications from a chat window it would be nice to
also clear the hilight on the console window since we already catched up
by reading the actual message in the chat window.

Probably not the best description :-) I hope you get it..

Regards https://github.com/profanity-im/profanity/issues/1399
2020-07-09 15:44:35 +02:00
Michael Vetter
a2726b6a7d Apply coding style 2020-07-07 14:18:57 +02:00
Michael Vetter
a4cadf78fa Revert "Apply coding style"
This reverts commit 9b55f2dec0.

Sorting the includes creates some problems.
2020-07-07 13:53:30 +02:00
Michael Vetter
9b55f2dec0 Apply coding style
Regards https://github.com/profanity-im/profanity/issues/1396
2020-07-07 09:43:28 +02:00
Michael Vetter
f121554088 List ignored bookmarks
`/bookmarl ignore` lists the ignored bookmarks.

Regards https://github.com/profanity-im/profanity/issues/1115
2020-05-24 17:55:08 +02:00
Michael Vetter
7b541d0a6d Add /executable command
This is used to set the openers for various commands.
So far for /avatar and /urlopen.
2020-05-20 14:14:49 +02:00
Michael Vetter
3c56b289ed Add slashguard feature
New command `/slashguard` tries to protect against typing ` /quit` by
not allowing a slash in the first 4 characters.
2020-03-18 18:20:05 +01:00
Michael Vetter
52e7e596aa xep-0084/avatar: add option to open avatar directly
Change:
`/avatar me@somewhere.org` -> `/avatar get me@somewhere.org`

New:
`/avatar cmd feh`
`/avatar open me@somewhere.org`

Implement https://github.com/profanity-im/profanity/issues/1281
2020-03-10 07:12:13 +01:00
Michael Vetter
eb2fbdba2e Dont filter out own MUC messages if muc history is set to 'regular'
We use the same incoming function as for regular incoming text here. But
don't want to filter out our own messages since we didn't print them
during sending.

Follow up to 8ee2cdadc8
2020-02-21 18:46:09 +01:00
Michael Vetter
1f8b1eb740 Allow utf8 symbols as omemo/pgp/otr indicator char
Fix https://github.com/profanity-im/profanity/issues/1264
2020-02-20 23:36:10 +01:00
Michael Vetter
8ee2cdadc8 Parse mentions and triggers in muc history if display is 'regular'
Fix https://github.com/profanity-im/profanity/issues/1261
2020-02-20 10:28:24 +01:00
Michael Vetter
6aa793fca6 Refactor mucwin_history()
Just pass ProfMessage.
2020-02-19 16:57:37 +01:00
Michael Vetter
cf36a92dcb Add define names to comment 2020-02-19 16:36:54 +01:00
Michael Vetter
50271493b7 xep-0308: remove replace_id from privwin signature
No `/correct` allowed in privwins
2020-02-14 10:17:07 +01:00
Michael Vetter
4ec005e4c3 xep-0308: Implement LMC for outgoing MUC messages
Including OMEMO encrypted ones.
Also rename `win_println_me_message()` to `win_print_outgoing_muc_msg()
as I think it's a more descriptive name.
2020-02-14 10:17:07 +01:00
Michael Vetter
66d3f572f9 xep-0308: Dont allow to correct MUC PMs
People could change messages of other people if the nick isn't
registered.
2020-02-14 10:17:00 +01:00
Michael Vetter
b6b7dd5ad4 xep-0308: update the UI upon sending a corrected message
So far we don't do this for encrypted messages. Still needs to be done.
And MUC also needs to be done.
2020-02-11 15:26:58 +01:00
Michael Vetter
039bf5d04d xep-0308: add correction autocompletion 2020-02-10 13:35:46 +01:00
Michael Vetter
4bc82a5318 XEP-0092: Add configuration option to choose whether to send OS name
`/os on|off` now let's one choose whether to include the OS name once
`/software` (XEP-0092) is ran on us.
2020-01-24 19:27:42 +01:00
Michael Vetter
ddf6ada3d1 Add initial support for XEP-0392
The last 3 commits added basic support.
Thanks @aaptel!

This commit adds basic settings interface to use it.
See `/color on|off`.

We still have to enable settings for color blindness.
And maybe another setting to decide whether to color the
occupantslist/roster with the same algo.

Regards https://github.com/profanity-im/profanity/issues/1191
2019-12-09 16:12:54 +01:00