add new setting to suppress join/leave announcements
This commit is contained in:
parent
d28d6e7635
commit
9b85475fe4
@ -109,8 +109,9 @@ func (cr *ChatRoom) Join(conn *chatConnection, data common.JoinData) (*Client, e
|
||||
} else {
|
||||
client.Send(playingCommand)
|
||||
}
|
||||
cr.AddEventMsg(common.EvJoin, data.Name, data.Color)
|
||||
|
||||
if !settings.LetThemLurk {
|
||||
cr.AddEventMsg(common.EvJoin, data.Name, data.Color)
|
||||
}
|
||||
sendHiddenMessage(common.CdJoin, nil)
|
||||
sendHiddenMessage(common.CdEmote, common.Emotes)
|
||||
|
||||
@ -135,7 +136,9 @@ func (cr *ChatRoom) Leave(name, color string) {
|
||||
client.conn.Close()
|
||||
cr.delClient(id)
|
||||
|
||||
cr.AddEventMsg(common.EvLeave, name, color)
|
||||
if !settings.LetThemLurk {
|
||||
cr.AddEventMsg(common.EvLeave, name, color)
|
||||
}
|
||||
common.LogChatf("[leave] %s %s\n", host, name)
|
||||
}
|
||||
|
||||
|
@ -26,6 +26,7 @@ type Settings struct {
|
||||
AdminPassword string
|
||||
ApprovedEmotes []string // list of channels that have been approved for emote use. Global emotes are always "approved".
|
||||
Bans []BanInfo
|
||||
LetThemLurk bool // whether or not to announce users joining/leaving chat
|
||||
ListenAddress string
|
||||
LogFile string
|
||||
LogLevel common.LogLevel
|
||||
|
@ -2,6 +2,7 @@
|
||||
"AdminPassword": "",
|
||||
"ApprovedEmotes": null,
|
||||
"Bans": [],
|
||||
"LetThemLurk": false,
|
||||
"ListenAddress": ":8089",
|
||||
"LogFile": "thelog.log",
|
||||
"LogLevel": "debug",
|
||||
|
Loading…
Reference in New Issue
Block a user