Do not forward empty message from any bridge (general). Closes #128

This commit is contained in:
Wim 2017-03-02 23:51:19 +01:00
parent 32bbab8518
commit 35025e164a

View File

@ -178,6 +178,10 @@ func (gw *Gateway) handleMessage(msg config.Message, dest *bridge.Bridge) {
}
func (gw *Gateway) ignoreMessage(msg *config.Message) bool {
if msg.Text == "" {
log.Debugf("ignoring empty message %#v from %s", msg, msg.Account)
return true
}
for _, entry := range strings.Fields(gw.Bridges[msg.Account].Config.IgnoreNicks) {
if msg.Username == entry {
log.Debugf("ignoring %s from %s", msg.Username, msg.Account)