Commit Graph

567 Commits

Author SHA1 Message Date
Zorchenhimer 94a4f08467 Make suggestions popup insert wrapped emotes
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.
2020-04-19 12:50:26 -04:00
Zorchenhimer fab56e39ea Rework emote parsing to properly handle wrapped emotes
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.
2020-04-19 12:26:27 -04:00
Zorchenhimer ce2150f719 Add ability to set admin password at startup
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
2020-04-18 16:02:41 -04:00
Nick d08eff1bdb
Merge pull request #110 from MichaelThomasMPT/master
Bans was present twice in the example settings.json file.
2020-04-18 15:29:28 -04:00
MichaelThomasMPT 474eeb1153 Bans was present twice in the example settings.json file. 2020-04-11 21:21:11 +08:00
Nick 10c2590677
Merge pull request #107 from nocylah/nocylah-mobile-tweaks
Tweak elements for mobile experience
2020-03-30 20:21:18 -04:00
Nick c85e95ca3f
Merge pull request #108 from nocylah/nocylah-wasm-exec
Use system wasm_exec.js
2020-03-30 20:00:08 -04:00
Louis Jencka 3c55a8a1f3 Use system wasm_exec.js
The wasm_exec.js included in the repo didn't work in go1.14.1 - always
using the local go-provided wasm_exec.js should avoid this problem.
2020-03-29 20:47:42 -06:00
Louis Jencka a399cf38e7 Tweak elements for mobile experience
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.
2020-03-29 20:45:51 -06:00
Nick f7f63207c9
Merge pull request #104 from lukasklinger/master
Add Support for Docker
2020-03-22 11:13:14 -04:00
Zorchenhimer 6996621c0e Update Go version in readme
Also added instructions for installing a newer version of Go alongside
the OS version and using that instead.
2020-03-22 11:06:35 -04:00
Lukas c15bf0c9e5 updated README to include instructions for Docker 2020-03-19 13:34:51 +01:00
Lukas 895cb5d58c added docker-compose file 2020-03-19 12:55:17 +01:00
Lukas b4888d8069 added Dockerfile 2020-03-19 11:49:42 +01:00
Nick 5b06603977
Merge pull request #103 from rinpatch/fix/main-separately-typo
main.html: fix a typo in "Separately"
2020-02-15 14:21:12 -05:00
rinpatch 632efaeab9 main.html: fix a typo in "Separately" 2020-02-14 21:51:14 +03:00
Zorchenhimer 72a44b6170 Clean up Makefile
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 [...]`.
2020-01-30 14:56:44 -05:00
Zorchenhimer c32838def6 Rework settings mutex and saving settings
- 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
2020-01-30 14:32:46 -05:00
Zorchenhimer 7feb277a33 Don't allow names that are the access pin
If a user tries to enter the pin as their name return an error instead
of accepting the name.
2019-11-30 10:27:06 -05:00
Zorchenhimer 8fc3f86135 Add an emote list
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.
2019-11-29 12:48:17 -05:00
Zorchenhimer 528b29e0ff Make the login links easier to see
Changed the color of the three links under the login box to be easier to
read.  Also removed the underline unless it's being hovered over.
2019-11-29 12:46:53 -05:00
Zorchenhimer a85c618e4a Use better name error; Tweak name requirements
- "Invalid name" was replaced with a description of a valid name.
  Fixes #100
- Tweaked the valid name regex to require at least one number or letter.
2019-11-28 20:06:15 -05:00
Zorchenhimer 78ecee1395 Fix chat not showing on join
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.
2019-11-28 20:01:25 -05:00
Zorchenhimer 47c837733d Fix /nick for mods and admins
- Gave mods permission to /nick somebody else
- Don't check for timeout when a mod or admin attempts to change a name.
2019-11-09 19:24:27 -05:00
Nick 39aec91659
Merge pull request #96 from crossworth/adds-macos-compile-target
Adds MacOS Compile target
2019-10-04 01:34:00 -04:00
Pedro Henrique c3ef879726 updates gitignore 2019-10-02 08:57:00 -03:00
Pedro Henrique f0f7a3e7ca change name to reflect goos 2019-10-01 18:39:04 -03:00
Pedro Henrique 2c9953e483 closes #95 2019-10-01 18:35:08 -03:00
Zorchenhimer 99872064f4 Go 1.12 is no longer required to build 2019-09-23 13:08:14 -04:00
Zorchenhimer 32d58f6f3f Make /pin a user level command
The /pin command is now accessable by non-modded users.
2019-09-22 17:02:09 -04:00
Zorchenhimer 54377c65fb Merge branch 'Emotes' 2019-09-22 17:00:58 -04:00
Zorchenhimer 6347065dd4 Fix duplicating emotes with /reloademotes
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.
2019-09-22 16:51:13 -04:00
Zorchenhimer a941e2815e Fix accidental removal of /pin and /changeaccess
These were accidentally removed from the command name list.
2019-09-22 16:15:59 -04:00
Zorchenhimer 7ac34c7d05 Fix name highlighting breaking emotes
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.
2019-09-22 15:42:48 -04:00
joeyak 3ac5af4548 Removed dependency of dennwc\dom\js
This removes the dependency of dennwc\dom\js which allows building with
Go 1.13.
2019-09-22 14:31:04 -04:00
Zorchenhimer 64063de5a8 Github markdown doesn't work apparently
Replace "#94" with the full issue link.
2019-09-19 11:27:22 -04:00
Zorchenhimer 7138361edf Tweak build requirements in readme
Add a reference to the Go 1.12 build requirement issue.
2019-09-19 11:24:57 -04:00
Alastair Bridgewater 42bcead627 Hide suggestion menu explicitly
* 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.
2019-09-16 14:17:31 -04:00
Zorchenhimer 5508cc61f3 Remove goimports from Makefile and readme
(cherry picked from commit 5a5c6c76b0)
2019-06-18 22:15:47 -04:00
Zorchenhimer 5a5c6c76b0 Remove goimports from Makefile and readme 2019-06-18 22:15:10 -04:00
Zorchenhimer a73375f152 Fix emotes
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.
2019-06-18 22:13:53 -04:00
Zorchenhimer 360e1aee77 Remove goimports
Replace it with gofmt.  This has been an issue preventing people from
easily getting setup for dev.

(cherry picked from commit 35774b061f)
2019-06-18 18:52:02 -04:00
Zorchenhimer 35774b061f Remove goimports
Replace it with gofmt.  This has been an issue preventing people from
easily getting setup for dev.
2019-06-18 18:46:35 -04:00
Alastair Bridgewater 26b535a37d Hide suggestion menu explicitly
* 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.
2019-06-10 11:15:41 -04:00
joeyak 7962fad02e commiting so zorch can do my work 2019-06-01 19:41:28 -04:00
joeyak d153c2b4f0 Fix cookies not staying across browser sessions 2019-05-07 19:42:43 -04:00
joeyak 61dd64182e Fix port not being set with command flag 2019-05-05 13:35:36 -04:00
Zorchenhimer 0a4ff49cbb Trim PIN of spaces
Fixes #88
2019-04-22 11:50:42 -04:00
joeyak 40f4cc72ae Make default selection the bottom option
closes #86
2019-04-18 10:31:34 -04:00
Zorchenhimer b41c93d19d Add option to generate new pin on start
Added "NewPin" to the settings to regenarate and save a new pin to the
settings file on server start.
2019-04-15 11:22:53 -04:00