mirror of
https://github.com/shazow/ssh-chat.git
synced 2025-07-20 04:24:31 +02:00
/msg: Send SystemMsg confirmation with each PM
This commit is contained in:
parent
66adee6f9a
commit
91c62966fa
8
host.go
8
host.go
@ -288,6 +288,10 @@ func (h *Host) InitCommands(c *chat.Commands) {
|
||||
|
||||
m := message.NewPrivateMsg(strings.Join(args[1:], " "), msg.From(), target)
|
||||
room.Send(&m)
|
||||
|
||||
txt := fmt.Sprintf("[Sent PM to %s]", target.Name())
|
||||
ms := message.NewSystemMsg(txt, msg.From())
|
||||
room.Send(ms)
|
||||
return nil
|
||||
},
|
||||
})
|
||||
@ -310,6 +314,10 @@ func (h *Host) InitCommands(c *chat.Commands) {
|
||||
|
||||
m := message.NewPrivateMsg(strings.Join(args, " "), msg.From(), target)
|
||||
room.Send(&m)
|
||||
|
||||
txt := fmt.Sprintf("[Sent PM to %s]", target.Name())
|
||||
ms := message.NewSystemMsg(txt, msg.From())
|
||||
room.Send(ms)
|
||||
return nil
|
||||
},
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user