Commit Graph

556 Commits

Author SHA1 Message Date
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
joeyak c3f2c20e4e Add rand seed so the colors aren't the same 2019-04-14 21:02:44 -04:00
joeyak 15a691a1b7 Update go mod 2019-04-14 01:48:00 -04:00
joeyak 7b5f77a14a Get rid of dependency on go-colorful
closes #84
2019-04-14 01:46:24 -04:00
Zorchenhimer 607e61234c Add some more stats
Added a few more stats to keep track of:
- Max users in chat
- Stream start

Also added a `/stats` command to list the user count (current and max),
as well as uptime (sever and stream, separately).

Resolves #85
2019-04-14 00:25:49 -04:00
Zorchenhimer 83477dc0eb Start abstracting template stuff
This is for #32.

This adds a starting framework for loading, caching, and executing
templates on the server and the client.  Currently only the server uses
this functionality.
2019-04-13 17:29:30 -04:00
Zorchenhimer d513fe872d Remove temp connections
Temp connections were removed to reduce some complexity.  Now a
connection is a full client, even before joining chat.  A name is
required to be set to join chat and receive messages.

This change also removes the need for UUIDs on connections and clients.
2019-04-13 15:56:49 -04:00
Zorchenhimer 0c3850d2f7 Make the pin entry screen not look terrible
Change the color of the message to be readable, and some other
positioning tweaks.
2019-04-13 14:21:53 -04:00
Zorchenhimer 332dfdc9cf Fix connecting to websocket with SSL
Request a secure web socket (wss://) when connecting to the site with
https.  Fixes #61.
2019-04-13 13:47:38 -04:00
joeyak ad2579d59a Adding some hardening to user joining
Client sends the server a object to join instead of a message
server can send a message to notify the user

closes #57
2019-04-13 13:12:08 -04:00
Zorchenhimer 5819bdb85a Make links in chat readable 2019-04-11 22:46:04 -04:00
Zorchenhimer 81e647c1c8 Handle command errors differently than responses
Make them red.
2019-04-11 22:01:10 -04:00