diff --git a/common/chatcommands.go b/common/chatcommands.go
index 82ffbbe..c44f689 100644
--- a/common/chatcommands.go
+++ b/common/chatcommands.go
@@ -37,9 +37,12 @@ var (
)
var ChatCommands = []ChatCommandNames{
- CNMe, CNHelp, CNCount, CNColor, CNWhoAmI, CNAuth, CNUsers,
+ // User
+ CNMe, CNHelp, CNCount, CNColor, CNWhoAmI, CNAuth, CNUsers, CNNick,
+ // Mod
CNSv, CNPlaying, CNUnmod, CNKick, CNBan, CNUnban, CNPurge,
- CNMod, CNReloadPlayer, CNReloadEmotes, CNModpass, CNNick,
+ // Admin
+ CNMod, CNReloadPlayer, CNReloadEmotes, CNModpass,
}
func GetFullChatCommand(c string) string {
diff --git a/common/constants.go b/common/constants.go
index 49f110d..f7546e1 100644
--- a/common/constants.go
+++ b/common/constants.go
@@ -2,15 +2,17 @@ package common
type ClientDataType int
+// Data types for communicating with the client
const (
CdMessage ClientDataType = iota // a normal message from the client meant to be broadcast
CdUsers // get a list of users
CdPing // ping the server to keep the connection alive
+ CdHelp // tells server to send help data again for buttons
)
type DataType int
-// Data Types
+// Data types for command messages
const (
DTInvalid DataType = iota
DTChat // chat message
diff --git a/static/js/chat.js b/static/js/chat.js
index dd6f7c3..392a997 100644
--- a/static/js/chat.js
+++ b/static/js/chat.js
@@ -109,14 +109,21 @@ function setNotifyBox(msg = "") {
// Button Wrapper Functions
function auth() {
- let pass = prompt("pass please")
+ let pass = prompt("Enter pass");
if (pass != "") {
sendMessage("/auth " + pass);
}
}
+function nick() {
+ let nick = prompt("Enter new name");
+ if (nick != "") {
+ sendMessage("/nick " + nick);
+ }
+}
+
function help() {
- sendMessage("/help")
+ sendMessage("/help");
}
// Get the websocket setup in a function so it can be recalled
diff --git a/static/main.html b/static/main.html
index a5bd1e4..01d7e49 100644
--- a/static/main.html
+++ b/static/main.html
@@ -52,6 +52,7 @@
+
{{ if .Video }}
{{ end }}