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
All emotes are set to have a height of 28px. This fixes the
auto-scroll on message when the message has emotes, but it also forces
all emotes to be 28px high.
- When the access mode changes, print the new mode (and pin, if
applicable) to the server console.
- Don't return an HTTP error when getting a session fails, just make a
new session.
- Save pins to the settings
Return the correct IP address on error during
chatConnection.WirteData(). If the server is behind a reverse proxy,
the connection object will have "127.0.0.1" as the remote address.
Use an RW Mutex for chatConnection and use some goroutines when sending
data to clients in Broadcast(). This should prevent blocking on
unresponsive clients.
Return the correct IP address on error during
chatConnection.WirteData(). If the server is behind a reverse proxy,
the connection object will have "127.0.0.1" as the remote address.
So far only PIN and Open modes are implemented. It uses a session
cookie to store the validity of the pin/password.
The "Enter pin" page has some unreadable messages on it right now, but
it kinda works.
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.