Commit Graph

12 Commits

Author SHA1 Message Date
UlisseMini 57c6abe86c Better comments 2019-02-24 09:40:47 -06:00
Robert Hailey 40bf204058 chat: When a user leaves, add time since they joined to the exit message.
* 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
2019-01-02 15:46:21 -05:00
Andrey Petrov 903d6c9420
/ban query support (#286)
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.
2018-12-25 14:29:19 -05:00
Andrey Petrov 66fee99a81 /uptime and /whois relative timestamps made more precise
Replaced go-humanize dependency with our own logic.

Fixes #259.
2018-01-19 12:35:45 -05:00
Andrey Petrov d950112dd9 refactor: Id -> ID 2016-08-24 13:54:20 -04:00
Dmitri Shuralyov 66adee6f9a /whois: Hide IP if user isn't admin; display client and time joined. (#192)
Resolves #170.
2016-08-06 18:20:34 -04:00
Andrey Petrov c8661e6883 motd: Allow for reading the current motd when no additional args given.
Closes #155, merges #157

Squashed commit of the following:

commit bcb0810637c99223753629a2e55169b07ee9fe51
Author: Andrey Petrov <andrey.petrov@shazow.net>
Date:   Wed Aug 3 17:58:37 2016 -0400

    motd: Refactor inner conditions

commit ac28c8cb4e8dc2a0d23abe3dcf52b69175cde51b
Author: Aaron <aaron.ounn@gmail.com>
Date:   Tue Aug 2 09:38:36 2016 +0300

    Fix small issues with the help message

commit a80ae77e1d691a4ec7125be5441d4f6eea767a75
Author: Aaron <aaron.ounn@gmail.com>
Date:   Tue Aug 2 09:30:21 2016 +0300

    Print the motd if no parameters are passed

commit 2db1b3c123661cdbd622d5ba2ff81ede8cb8a951
Author: Aaron <aaron.ounn@gmail.com>
Date:   Tue Aug 2 09:29:41 2016 +0300

    Update the motd command's description
2016-08-03 17:58:49 -04:00
Andrey Petrov 8188deef30 Root sshchat package, main moved into cmd/ssh-chat/. 2015-01-21 11:47:59 -08:00
Andrey Petrov c2adb4d632 ssh-chat/chat/{message,user,theme,history} -> ssh-chat/chat/message 2015-01-20 16:33:52 -08:00
Andrey Petrov 9335a2139b Sanitize names on join and /nick. 2015-01-20 14:13:59 -08:00
Andrey Petrov 0c21486992 History backfill, also tests pass. 2015-01-18 18:55:47 -08:00
Andrey Petrov 3c4e6994c2 chat.Channel->chat.Room, /ban, /whois, chat.User.Identifier
- Renamed chat.Channel -> chat.Room
- /ban works, supports IP also
- /whois works
- chat.User now accepts an Identifier interface rather than name
- Tweaked rate limiting
2015-01-16 21:53:22 -08:00