parent
4758cd68bd
commit
791df37030
|
@ -414,6 +414,7 @@ var commands = &CommandControl{
|
|||
return fmt.Sprintf("ERROR: %s", err)
|
||||
}
|
||||
|
||||
cl.belongsTo.AddChatMsg(common.NewChatHiddenMessage(common.CdEmote, common.Emotes))
|
||||
cl.belongsTo.AddModNotice(cl.name + " has reloaded emotes")
|
||||
common.LogInfof("Loaded %d emotes\n", num)
|
||||
return fmt.Sprintf("Emotes loaded: %d", num)
|
||||
|
|
|
@ -226,8 +226,13 @@ func (cr *ChatRoom) AddMsg(from *Client, isAction, isServer bool, msg string) {
|
|||
t = common.MsgServer
|
||||
}
|
||||
|
||||
cr.AddChatMsg(common.NewChatMessage(from.name, from.color, msg, from.CmdLevel, t))
|
||||
}
|
||||
|
||||
// Add a chat message object to the queue
|
||||
func (cr *ChatRoom) AddChatMsg(data common.ChatData) {
|
||||
select {
|
||||
case cr.queue <- common.NewChatMessage(from.name, from.color, msg, from.CmdLevel, t):
|
||||
case cr.queue <- data:
|
||||
default:
|
||||
common.LogErrorln("Unable to queue chat message. Channel full.")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue