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