From 969d25fdb5fe8e5e338f8a29eac90228f3fc2eec Mon Sep 17 00:00:00 2001 From: cx uname Date: Thu, 16 May 2013 11:31:23 +0400 Subject: [PATCH] log fix --- main.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/main.go b/main.go index f18b643..8812d9f 100644 --- a/main.go +++ b/main.go @@ -80,12 +80,14 @@ start: case *xmpp.ClientPresence: PresenceHandler(Conn, t) case *xmpp.ClientMessage: - if len(t.Delay.Stamp) == 0 && len(t.Subject) == 0 && GetNick(t.From) != name { + if len(t.Delay.Stamp) == 0 && len(t.Subject) == 0 { log.Println(t) - if t.Type == "groupchat" { - go MessageHandler(Conn, t) - } else if xmpp.RemoveResourceFromJid(strings.ToLower(t.From)) == me { - go SelfHandler(Conn, t) + if GetNick(t.From) != name { + if t.Type == "groupchat" { + go MessageHandler(Conn, t) + } else if xmpp.RemoveResourceFromJid(strings.ToLower(t.From)) == me { + go SelfHandler(Conn, t) + } } } }