Name suggestions would wrap a name in colons instead of just emotes. It
looks like this may have still worked fine, but it wasn't the correct
behavior.
The suggestions popup will now insert wrapped emotes instead of bare
word emotes. This is so the autocompletion will still work if the
WrappedEmotesOnly setting is set to true.
Reworked the emote parsing to properly handle "wrapped" emotes. A
wrapped emote is one that is wrapped in colons or square braces (eg,
:Kappa: or [Kappa]). This allows emotes to be input without a space
between them, like is required with non-wrapped emotes.
A new configuration setting has been added to only allow parsing of
wrapped emotes: "WrappedEmotesOnly". This defaults to False as to not
break current configurations.
The emote autocompletion will only insert non-wrapped emotes. Setting
"WrappedEmotesOnly" configuration value to True will not change this.
Lastly, made the bare-word emote parsing a bit cleaner by removing a for
loop in favor of a map lookup with a check. This should in theory be
more efficient.
This change is in response to #111. The issue should not be considered
resolved until the autocompletion handles the new setting correctly.
The -a flag has been added to allow specifying a new admin password on
the command line. This password will only be used for the current
session and will not be written to the configuration file. If the
password contains spaces, wrap it in quotes on the command line. The
quotes should be omitted with the /auth command.
Eg, starting the server with:
./MovieNight -a "the admin password"
the auth command in chat would be:
/auth the admin password
This commit forces a device-width sized viewport, which makes for a much
more usable chat experience on mobile devices. A chat element min-size
is also removed to avoid screen overflow on mobile devices.
Removed the Darwin and Windows specific build targets. Instead, the
system's build target will be used (as specified with the GOOS and
GOARCH environment variables).
Added a "server" build target. This is mostly just for me to build the
binary that will be deployed on my own server.
Added the GO_VERSION environment variable to all the calls to the go
command. This will allow easier building on systems that have installed
an additional version of Go along side their distribution's version.
Users wanting to build with one of these versions must first install it
with `go get` and `go[version] download` as detailed here:
https://golang.org/doc/install#extra_versions.
Setting the GO_VERSION environment variable to the version number will
use that version. Eg, setting it to "1.13.7" will call `go1.13.7 build
[...]` instead of `go build [...]`.
- Move mutex into Settings struct
- Replace sync.Mutex with a sync.RWMutex
- Move adding approved emotes into a Settings method
- Save settings after adding emotes
- Wrap saving in a lock
It's ugly, but it get's the job done. This list will need to be
improved a lot (ie, make it searchable and maybe even clickable
emotes?). This is for #99, but should not be considered fixed yet.
Opacity was set to zero percent and never changed. This removes the
opacity CSS value. It looks like opacity was used at one point, but
never fully removed.
Don't reload emotes directly into the global common.Emotes variable.
Instead, load them into a new variable and write that to common.Emotes
after the search for new emotes completes. Emotes should no longer
duplicate for each run of `/reloademotes`.
Also tweaked `/addemotes` to automatically reload emotes if nothing went
wrong downloading a new set.
Fix name highlighting when emotes are involved. When the emotes were
moved to subfolders the channel name was put into the URL of the emote
image. If a user with that name joined the chat, all of the emotes in
that folder highlighted the name in the URL, breaking the <img> tag.
This change removes the regex used to identify and replace the user's
name and instead works on whole words delimited by spaces.
* On some systems (currently hypothesized to be Firefox with
GTK+ using a system theme that has always-visible scrollbars with
a minimum size on their long axis), the suggestion menu starts off
visible and obscuring the chat message entry area, then moves to
obscuring the chat history area once it has been invoked. At no
time does it become invisible.
* Fix, by hiding the suggestion menu by default and explicitly
managing its visibility as it is updated.
This reworks how emotes are cached in relation to their physical
location on disk. Functionally, they should be the same from the user
perspective but it sets up some stuff that will make it easier to add
emotes from various sources.