server: send contented_server option down websocket to client
This commit is contained in:
parent
b8791f6aa2
commit
37014f7f52
@ -3,6 +3,7 @@ package main
|
||||
type Config struct {
|
||||
App struct {
|
||||
MotdHTML string `json:"motd"`
|
||||
ContentedServer string `json:"contented_server"`
|
||||
}
|
||||
|
||||
Web struct {
|
||||
|
4
main.go
4
main.go
@ -170,6 +170,10 @@ func (this *App) SocketIOServer(so socketio.Socket) {
|
||||
so.Emit("raw", this.cfg.App.MotdHTML+"<br>")
|
||||
so.Emit("sys", "Enter a name to connect as (or name:pass for a registered nick)")
|
||||
|
||||
if len(this.cfg.App.ContentedServer) > 0 {
|
||||
so.Emit("contented", this.cfg.App.ContentedServer)
|
||||
}
|
||||
|
||||
doneChan := make(chan struct{}, 0)
|
||||
|
||||
so.On("hello", func(data map[string]string) {
|
||||
|
Loading…
Reference in New Issue
Block a user