Stream statistics will now print when enabled in settings.json. There is messages in, messages out,
and total time running. The main function was changed so the server setups for the main and rtmp
are in separate functions, and both are started with their own goroutine. OS Interrupt catching was added,
and if stream stats is true, the stats will be printed.
The UsernameMaxLength and MinLength constants were removed because common.IsValidUsername checks that.
Changed queue sizes to 1000 because if 25 people are joined and 4 say a message at the same time
it results in 100 messages.
The processing of ChatData was changed so ChatData has a DataInterface object, which will be converted to a
ChatDataJSON that will have the DataInterface field converted to a json.RawMessage field. This change allows
greater customizability in the chat messages, since the Data field can still be read and modified.
ChatRoom.delClient() wasn't updated to use UUID's instead of names.
The calling functions were passing in a name instead of a suid, so
attempting to delete the client silently failed.
Fixes#52
Parse the X-Forwarded-For header if it exists in the connection. This
will allow bans to work if the server is sitting behind an Nginx
reverse proxy (that has been configured to add the header).
Also added a safe-guard to disallow bans for localhost so you cannot
accidentally ban everybody from connecting if the server is behind a
reverse proxy.
This should resolve#49
Added the "Cache-Control" header to responses for the main.wasm file.
This should help with debugging and updates by telling the browser not
to cache the web assembly binary.
Moved to common/utils.go:
- IsValidName() (function replaces direct calls to regexp.MatchString())
- RandomColor()
Moved to common/emotes.go:
- LoadEmotes()
Using this command will change the current user's nickname in chat.
It has an alias of /name.
An admin can force a name change by supplying the current name and a new
name. If a name has been changed by an admin, that user can no longer
change their name (similar to forced color change).
Resolves#42
This is an icon that I threw together in a few minutes. I don't want
my avatar as the favicon for this repository.
Also, the favicon.png has moved to the root directory as it is
something that is meant to be customized along with the settings that
is also in the root.
Changed playing div to be outside of hidden and the color to be darker
Make the notifyBox a smaller font to not be as imposing
Changed joinbox to have a better style that matches the rest of the website
Changed UI to scale better
Moved info box into a hidden div that shows when the notifyBox is hovered
Added a color button that sends the /color command
Split client.js into separate files that the video and chat call separatly
The reload player button only shows up in chat when there is a video
added references to other code so code complete can work in js files
Fixes#40
Added a limit to how long the title can be when set from the /playing
command. The default value is 50 if it is not in the settings file or
if the value in the settings is below zero.
Resolves#43
Move the help html to a template and populate the lists dynamically.
This also splits out the base HTML stuff (eg, the <html> and <body>
tags) to a base template file.
Wrapping the connection with a mutex prevents the "concurrent write to
websocket connection" panic. The new functions are ReadData() and
WriteData so as to not collide with ReadJSON() and WriteJSON().