Commit Graph

241 Commits

Author SHA1 Message Date
joeyak 4758cd68bd Add links to open chat, video, and both separatly
closes #77
2019-03-31 17:25:24 -04:00
joeyak 6923b13af9 Fix layout of playing 2019-03-31 17:11:50 -04:00
joeyak 9b409e0118 Make escape key hide the suggestions
closes #78
2019-03-31 16:00:36 -04:00
joeyak e798684b3e Change the show debug names 2019-03-31 15:59:57 -04:00
joeyak bea491e1c0 Remove debug log 2019-03-31 15:23:37 -04:00
joeyak be56cff4ba
Merge pull request #80 from Shuugo/patch-1
Fix Syntax error
2019-03-31 10:36:47 -04:00
Shuugo 345bf622d9
Fix Syntax error
Syntax error
2019-03-31 12:55:30 +02:00
Zorchenhimer 38f2ca9972 Merge branch 'master' into room-access-restrictions
This is mainly for the server-shutdown merge revert.

# Conflicts:
#	main.go
2019-03-31 00:09:42 -04:00
Zorchenhimer 9c559c3818 Revert "Merge branch 'server-shutdown'"
This reverts commit 13d74faf01, reversing
changes made to ec0c6752bc.

These changes completely broke the RTMP stream.  Reverting until I
figure out why.
2019-03-31 00:07:19 -04:00
Zorchenhimer 358a2c068d Add build constraints to wasm source files
Add constraints to the wasm's source files so they're only built for the
js/wasm target.
2019-03-30 23:58:26 -04:00
Zorchenhimer 635b4f75c0 Unbreak settings
Don't try and use the global 'settings' variable when it should be
using the local *Settings variable.
2019-03-30 17:46:31 -04:00
Zorchenhimer 34d8fbf20c Merge branch 'master' into room-access-restrictions
# Conflicts:
#	main.go
2019-03-30 17:45:39 -04:00
Zorchenhimer 2acf382f1f Add some tests for emote parsing 2019-03-30 17:19:14 -04:00
joeyak e5f1598cd0 Add color dropdown
issue #69
2019-03-30 17:01:44 -04:00
Zorchenhimer 13d74faf01 Merge branch 'server-shutdown' 2019-03-30 16:22:21 -04:00
Zorchenhimer ec0c6752bc Fix some imports
Whoops.
2019-03-30 16:20:56 -04:00
Zorchenhimer de2131dd55 Fix some imports
Whoops.
2019-03-30 16:20:06 -04:00
Zorchenhimer b3b63b999d Replace some fmt.Printf()'s that were missed 2019-03-30 16:19:05 -04:00
Zorchenhimer a0a5e4be7d Replace some fmt.Printf()'s that were missed 2019-03-30 16:18:36 -04:00
Zorchenhimer 6b48322626 Use the logger
Replace fmt.Print[f|ln]() with the logger equivalent.
2019-03-30 16:15:22 -04:00
joeyak 5aa41cc80c Hide color div when clicking color button
closes #69
2019-03-30 16:08:41 -04:00
Zorchenhimer 4e35418a79 Merge branch 'master' into room-access-restrictions
# Conflicts:
#	common/chatcommands.go
#	main.go
#	settings.go
2019-03-30 16:04:06 -04:00
Zorchenhimer cc3da4292e Update settings_example.json with new values
This hasn't been updated in a while.  Oops.
2019-03-30 15:55:59 -04:00
Zorchenhimer 0ff872065f Fix trimming characters on non-emote words
Don't trim anything from non-emote words when parsing emotes.
2019-03-30 15:41:33 -04:00
Zorchenhimer 67b3143893 Add rate limiting
This should fix #65, although it may be expanded in the future.

Default settings for limits can be changed or disabled in the settings.
Default values:
- Chat: 1 second
- Duplicate chat: 30 seconds
- /nick: 5 minutes
- /auth: 5 seconds
- /color: 1 minute

Creation of the chat Client object has been moved from ChatRoom.Join()
to NewClient().  This function also handles setting the initial name.
2019-03-30 15:40:37 -04:00
joeyak ca72dc28c0 Add autocomplete for emotes
closes #9
2019-03-30 15:23:54 -04:00
Zorchenhimer 8801269969 Fix canceling the Auth popup dialog
Don't try to auth if the user cancels out of the auth popup.
2019-03-30 15:14:30 -04:00
Zorchenhimer e7cfcd8688 Move logging setup to LoadSettings() 2019-03-30 15:14:30 -04:00
Zorchenhimer 0a817eff87 Add a NoCache setting
Added this to the settings so it can be configured at runtime.  If set
to true, a Cache-Control header will be sent with the wasm file as well
as the index html.
2019-03-30 15:14:30 -04:00
joeyak 237619f57e Make font 12px to better fit words and timestamp 2019-03-30 13:17:27 -04:00
joeyak a2cc5115aa Fix timeout not being set and scrolling not catching up with chat 2019-03-28 22:06:57 -04:00
joeyak b281ebe408 Add remote easter egg 2019-03-28 21:55:28 -04:00
joeyak ee2e92a9a5 Adding timestamps
resolves #66
2019-03-28 20:54:29 -04:00
joeyak 10092e1dd5 Change wrappers to div so client can add to beginning and end of message
issue #66
2019-03-28 20:25:46 -04:00
joeyak 8e4ac4d600 Add color cookies
closes #6
2019-03-28 20:01:48 -04:00
joeyak 7a294ea00f Move color and whoami commands into the commands declaration 2019-03-28 18:40:49 -04:00
Zorchenhimer fb2c25dc99 Add the /addemotes command
This command launches a goroutine that does the actual downloading of
the emotes so the client doesn't hang until the process is finished.

subscribers.json needs to be manually downloaded and added next to the
main executable for now.  Eventually, it will download and cache this
file (for 24 hours, at a minimum).

Issue #10 should not be considered finished yet.  This needs to be
tested a bit more with multiple channels.  Ideally, some that exist and
some that don't to verify that it fails gracefully (ie, adds the emotes
it was able to download).
2019-03-28 16:50:24 -04:00
Zorchenhimer 6f865b7a53 Start adding support to download twitch emotes
The code has been transferred over from the utility, and should work,
but it hasn't been tested nor has it been linked to the command.
2019-03-28 16:22:08 -04:00
Zorchenhimer d12434502e Put each CN- command constant on it's own line
This will help with merges that add/remove commands.
2019-03-28 16:21:23 -04:00
Zorchenhimer a8ee9db3b8 Fix #63, case-sensitive highlight
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.
2019-03-28 15:38:00 -04:00
Zorchenhimer 64a6b2943c Fix #70, name change on cancel
Don't send the /nick command if a user clicks on the "nick" button and
cancels out of the prompt.
2019-03-28 15:19:43 -04:00
Zorchenhimer e879112b1b Add some comments clarifying some things 2019-03-28 10:18:17 -04:00
Zorchenhimer 9bcbad6a07 Expand graceful shutdown to use http.Shutdown()
Not sure if this is better or not, but I'm testing it out.
2019-03-28 10:06:18 -04:00
Zorchenhimer b03329772e Fix fmt import error
Not sure how this happened.
2019-03-26 14:30:52 -04:00
Zorchenhimer f5ea701127 Add colon to the emote trim cutset
This enables parsing emotes in the format :emote: as defined in #9.
This does not add auto-complete, just brings emote parsing up to date.
2019-03-26 12:27:18 -04:00
Zorchenhimer 857974aef3 Merge branch 'master' into room-access-restrictions
# Conflicts:
#	main.go
#	settings.go
2019-03-26 12:06:25 -04:00
Zorchenhimer 8e27ce9332 Add /iplist to admin commands
Lists all clients' UUID's, names, and IPs to console.

# Conflicts:
#	chatcommands.go
#	common/chatcommands.go
2019-03-26 11:58:46 -04:00
Zorchenhimer d2b8f3d7be Remove panic()'s from setupSettings()
Now that this is in a called function, instead of an init(), return an
error instead of panicking.
2019-03-26 11:44:19 -04:00
Zorchenhimer 6018b67c25 Add tags file to .gitignore
Add the Vim tags file to the .gitignore.  It's an auto-generated file
that doesn't need to be in git.
2019-03-26 11:43:09 -04:00
joeyak 24b5152c38 Moving suggestion code to a separate file in prep for issue #9 2019-03-25 23:32:44 -04:00