parent
e770c0cb62
commit
bdfa75f8bc
@ -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 {
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -52,6 +52,7 @@
|
||||
<button class="button pretty-button" onclick="auth();">Auth</button>
|
||||
<button class="button pretty-button" onclick="help();">Help</button>
|
||||
<button class="button pretty-button" onclick="$('#hiddenColorPicker').trigger('click');">Color</button>
|
||||
<button class="button pretty-button" onclick="nick();">Nick</button>
|
||||
{{ if .Video }}
|
||||
<button class="button pretty-button" onclick="initPlayer();">Reload Player</button>
|
||||
{{ end }}
|
||||
|
Loading…
Reference in New Issue
Block a user