This should fix#65, although it may be expanded in the future.
Default settings for limits can be changed or disabled in the settings.
Default values:
- Chat: 1 second
- Duplicate chat: 30 seconds
- /nick: 5 minutes
- /auth: 5 seconds
- /color: 1 minute
Creation of the chat Client object has been moved from ChatRoom.Join()
to NewClient(). This function also handles setting the initial name.
Added this to the settings so it can be configured at runtime. If set
to true, a Cache-Control header will be sent with the wasm file as well
as the index html.
This command launches a goroutine that does the actual downloading of
the emotes so the client doesn't hang until the process is finished.
subscribers.json needs to be manually downloaded and added next to the
main executable for now. Eventually, it will download and cache this
file (for 24 hours, at a minimum).
Issue #10 should not be considered finished yet. This needs to be
tested a bit more with multiple channels. Ideally, some that exist and
some that don't to verify that it fails gracefully (ie, adds the emotes
it was able to download).
Make the name highlight code case-insensitive, and only match whole
words.
This fixes an unreported issue with emotes. If a user's name was in
an emote, the emote image was broken by placing the highlight span in
the image's url attribute.
Functions added:
- LogErrorf()
- LogErrorln()
- LogChatf()
- LogChatln()
- LogInfof()
- LogInfoln()
- LogDebugf()
- LogDebugln()
- LogDevf()
- LogDevln()
New settings configure the logging: LogLevel and LogFile. LogLevel can
be set to one of: error, chat, info, or debug and will default to
error. LogFile is an optional file to write to. Providing a file will
not prevent output in the console.
LogDevf() and LogDevln() only compile when the "dev" flag passed to
build. This will cause Travis-CI to fail the build if it finds any
calls to either function.
Names can be passed to commands with @ prefixed to them.
When forcing a color change on another user the @ explicitly defines
the name, instead of simply being stripped off. This will allow the
a user named "red" to have their color changed: `/color @red blue`
A bunch of the color command code has changed with this to make things
less ambiguous and to add some other checks. `/color red #FF0000` and
`/color @red red` will change the color of the user "red" to the color
red while `/color red red`will return with an error. Note that the
color an name arguments can be in any order.
Resolves#64