* move loading whitelist+ops from file to auth and save the loaded files fro reloading
* add /whitelist command with lots of open questions
* add test for /whitelist
* gofmt
* use the same auth (the tests don't seem to care, but htis is more right)
* mutex whitelistMode and remove some deferred TODOs
* s/whitelist/allowlist/ (user-facing); move helper functions outside the handler function
* check for ops in Auth.CheckPublicKey and move /allowlist handling to helper functions
* possibly fix the test timeout in HostNameCollision
* Revert "possibly fix the test timeout in HostNameCollision" (didn't work)
This reverts commit 664dbb0976f8f10ea7a673950a879591c2e7c320.
* managed to reproduce the timeout after updating, hopefully it's the same one
* remove some unimportant TODOs; add a message when reverify kicks people; add a reverify test
* add client connection with key; add test for /allowlist import AGE
* hopefully make test less racy
* s/whitelist/allowlist/
* fix crash on specifying exactly one more -v flag than the max level
* use a key loader function to move file reading out of auth
* add loader to allowlist test
* minor message changes
* add --whitelist with a warning; update tests for messages
* apparently, we have another prefix
* check names directly on the User objects in TestHostNameCollision
* not allowlisted -> not allowed
* small message change
* update test
* Fixes Env Vars to pass config to ssh-chat.
The env vars were beign parsed and set to the host
before the user was even added to the host and
hence ignored. This change moves the env var parsing
to after initializing the user.
TODO: tests, completeness+reliability
* cleaned up the test
* reduced test flakyness by adding wait instead of being optimistic
Co-authored-by: Akshay <akshay.shekher@gmail.com>
made away toggle status, like irc
updated /away feature
* added away message
* added broadcast away message as emote
* updated names list to show away users on the same line, with colors
added /away -> back message
Update away time to be time since marked away
reverted changes made for /list
* addded condition for zero time on lastMsg.
* removed extra paramter in NamePrefix
* moved code from NamePrefix to completeName
* removed extra parameter in tests calling to NamePrefix
* Show the connection duration upon departure
* humantime: ugly sub-second precision replaces grammatically incorrect "1 seconds" message
* simplify function name
* humantime: repair unit test
* move: util/humantime -> internal/humantime
* go fmt everything
For #285
Turns out there were some bugs in Set, and I was using it incorrectly too.
The query syntax is a little awkward but couldn't find a nicer easy to parse format that worked with quoted string values.