74 Commits

Author SHA1 Message Date
themester
229c2d793d Adapted my repo to shazow. Changes...
- Added new rank: Administators (or masters). This rank can add or delete operators, but cannot add or remove another administrators. Administrators rank is designed by public key on server startup.
- Added "vim mode". With this mode you can use commands as ':' instead of '/'. As you can see in the code, the Prefix parameter of Command structure was changed by a neutral parameter for future introductions of prefixes.
- New Help function. This function add help for admin rank.
- Added the following commands:
  - setnick: Administrators can change the nick of another user.
  - private: Users can stablish privates conversations. This conversations are permanent until they execute endprivate command.
  - endprivate: Finish private conversation.
  - welcome: Prints motd. Only admins can execute this.
  - whois: In whois only admins can see ip.
  - delop: Allow admins to delete an operator (or moderator as is mentioned in some parts of the code).
- Changed historyLen and roomBuffer vars.
- In cmd tool have been added fsnotify to update public key files (admin and moderator public key files). This is to prevent to restart the server everytime we want to add an administrator.
- Added new prompt mode. In this mode you can see in which room you are talking. As default is 'general'. If you start private conversation the room will be the name of the another user. This part has been introduced for future implementations.
- As I said before now exists private conversations (unlike msg command).
2018-01-12 20:04:39 +01:00
goose121
fd77009f8d Strip control characters from metadata inputs (#257) 2018-01-02 20:27:54 -05:00
Steven L
206a9073f0 Colorize /name output with selected theme (#249)
* command.go: colorizing names according to theme (#205)

* Adding safety check for nil and mono

* Refactoring coloring into a function
2017-10-04 13:20:01 -04:00
Dmitri Shuralyov
50001bf172 Travis: Check for gofmt issues. (#241)
* Travis: Check for gofmt issues.

This will help catch issues like https://github.com/shazow/ssh-chat/pull/240#discussion_r127626103
in CI.

* chat: Fix gofmt issue.
2017-07-17 15:03:55 -04:00
Andrey Petrov
e3b5c3712c chat/doc: gofmt 2017-07-17 10:28:33 -04:00
JimmyBot
2c1e5239c5 docs: Typo and odd grammar fix (#240)
* Typo and odd grammar

* Forgot a word in my edit
2017-07-16 10:47:45 -04:00
Oliver Graff
a631215f5b /nick: Avoid announcing when it's the same nick (#237)
Fixes #234
2017-06-13 11:12:32 -04:00
Andrey Petrov
25689a88ed chat: Emit BEL when receiving a PM.
Also get rid of extraneous SetReplyTo which was not getting set before because we were switching on the wrong type.

Closes #207
CC @sleibrock
2017-05-11 11:23:29 -04:00
Steven L
227dad7492 command.go: modifying Theme command to show all available themes (#232)
command.go: modifying Theme command to show all available themes
2017-05-07 17:48:08 -04:00
Andrey Petrov
cdcc4a9931 refactor: User.Config -> User.Config() and User.SetConfig(UserConfig) 2016-08-29 10:11:39 -04:00
Andrey Petrov
454777448f refactor: User.SetColorIdx -> User.setColorIdx, preparing to abstract user 2016-08-29 09:58:17 -04:00
Andrey Petrov
33d7d26a17 chat/message: Remove User.Ignore(...) and User.Unignore(...)
Also changes some messaging
2016-08-27 15:15:07 -04:00
Andrey Petrov
d950112dd9 refactor: Id -> ID 2016-08-24 13:54:20 -04:00
Andrey Petrov
0fcc076c74 set: Switch to a common set implementation 2016-08-24 13:54:20 -04:00
Andrey Petrov
981376f018 /help: Improve help for /ignore and /theme 2016-08-16 10:19:47 -04:00
Andrey Petrov
1b7af5e559 chat/message/theme: Cleanup and refactor, tweak solarized. 2016-08-13 13:59:37 -04:00
Andrey Petrov
972bb86621 chat/message/theme: Tweak default colorscheme
Fewer grey names, lighter grey for system messages.
2016-08-12 17:13:11 -04:00
Andrey Petrov
f6e022548c chat/message: Fix highlighting and BEL, fix race condition.
Fixes #169
2016-08-11 15:35:50 -04:00
Andrey Petrov
92d821387b chat/message/theme: Apply PM colors, add new themes to /help, cleanup.
Fixes #191.
2016-08-11 15:09:59 -04:00
S Leibrock
f870c5761d chat/message/theme: Two new themes, solarized and hacker (#196) 2016-08-08 13:23:51 -04:00
S Leibrock
ef2cec2758 chat/message/theme: Fixing zero division error for one color themes (#195) 2016-08-07 15:12:19 -04:00
A. Campbell
a55b78ccdb Limit username length to 16 chars (#167) 2016-08-03 12:59:02 -04:00
Andrey Petrov
c4604fde94 Disabled autocomplete due to #166.
Also added mutex for user replyTo pointer, since that's being set by
both the host and user.
2016-08-03 12:19:33 -04:00
Federico Ruggi
58e1cb60bd commands: /ignore, /unignore
#154
* Add `/ignore`/`/unignore` commands
* Move set to common package, use set for ignores
* `chat/set.go` is now `common/set.go`
* use `*IdSet` as type for ignored list for users
* remove `IsIgnoring` and `IgnoredNames` user functions, so to use directly `IdSet` methods
* refactor code accordingly
2016-08-01 11:19:12 -04:00
Andrey Petrov
2abe368022 style: Fix gofmt and vet complaints 2016-07-31 12:18:06 -04:00
Andrey Petrov
50d2be3a88 Fixed message buffer timeout 2016-07-24 16:17:02 -04:00
Andrey Petrov
3ba0c59341 Unflake tests, remove lock from chat/message.User 2016-07-24 16:17:02 -04:00
Andrey Petrov
e6f7dba34e Progress: Unchan user 2016-07-24 16:17:02 -04:00
Andrey Petrov
62fbe2dc32 chat/message: Consistent value receivers 2016-07-17 14:51:03 -04:00
Andrey Petrov
9bf1f53445 Fixed /kick command to actually close target 2016-07-15 16:22:25 -04:00
Andrey Petrov
ea2d4d0dfc chat: Fix race conditions. 2016-07-12 11:18:07 -04:00
Matt Day
0ab31046c0 Fix go vet nitpicks.
Fixes #130:
* pass by reference into AllowAnonymous
* check return value of From() rather than value of From function
2015-08-20 04:28:52 -06:00
Andrey Petrov
bb1d568b38 Make Set private. 2015-01-20 16:44:35 -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
797d8c92be --log file with timestamps 2015-01-18 22:05:49 -08:00
Andrey Petrov
6c83bcb06a Rename fix. 2015-01-18 20:16:08 -08:00
Andrey Petrov
76bfdeeb70 /slap 2015-01-18 20:07:21 -08:00
Andrey Petrov
84df305ddf /op with pubkey. 2015-01-18 20:03:08 -08:00
Andrey Petrov
c33f4284f9 Colorize Sys/Announce messages. 2015-01-18 19:27:49 -08:00
Andrey Petrov
0c21486992 History backfill, also tests pass. 2015-01-18 18:55:47 -08:00
Andrey Petrov
544c9789c0 /reply command with autocomplete. 2015-01-18 18:11:30 -08:00
Andrey Petrov
391a66a876 BEL 2015-01-17 15:56:29 -08:00
Andrey Petrov
838285ba43 chat.Color->chat.Style, highlighting works. 2015-01-17 13:26:26 -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
Andrey Petrov
b94911f052 Fix hang condition on kick. 2015-01-11 14:31:51 -08:00
Andrey Petrov
e626eab624 /kick and /msg 2015-01-10 18:05:31 -08:00
Andrey Petrov
d5626b7514 Abstracted sshd.Connection; Op works now. 2015-01-10 13:46:36 -08:00
Nick Presta
a2ee2000bb Adding impl for quiet mode with tests. 2015-01-03 01:52:11 -05:00
Nick Presta
e29540c73b Fixing /names from panic 2015-01-03 01:28:48 -05:00