aboutsummaryrefslogtreecommitdiff
path: root/connector/xmpp/xmpp.go
diff options
context:
space:
mode:
Diffstat (limited to 'connector/xmpp/xmpp.go')
-rw-r--r--connector/xmpp/xmpp.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/connector/xmpp/xmpp.go b/connector/xmpp/xmpp.go
index a25a31b..64c53d9 100644
--- a/connector/xmpp/xmpp.go
+++ b/connector/xmpp/xmpp.go
@@ -124,8 +124,7 @@ func (xm *XMPP) connectLoop(num int) {
xm.conn, err = options.NewClient()
if err != nil {
xm.connected = false
- log.Debugf("XMPP failed to connect / disconnected: %s\n", err)
- log.Debugf("Retrying in %ds\n", xm.timeout)
+ xm.handler.SystemMessage(fmt.Sprintf("XMPP failed to connect (%s). Retrying in %ds", err, xm.timeout))
time.Sleep(time.Duration(xm.timeout) * time.Second)
xm.timeout *= 2
if xm.timeout > 600 {
@@ -139,7 +138,7 @@ func (xm *XMPP) connectLoop(num int) {
if joined {
_, err := xm.conn.JoinMUCNoHistory(muc, xm.nickname)
if err != nil {
- log.Warnf("Could not rejoin MUC %s after reconnection: %s", muc, err)
+ xm.handler.SystemMessage(fmt.Sprintf("Could not rejoin MUC %s after reconnection: %s", muc, err))
xm.handler.Left(RoomID(muc))
delete(xm.joinedMUC, muc)
}
@@ -149,8 +148,7 @@ func (xm *XMPP) connectLoop(num int) {
err = xm.handleXMPP()
xm.connected = false
- log.Debugf("XMPP disconnected: %s\n", err)
- log.Debugf("Reconnecting.\n")
+ xm.handler.SystemMessage(fmt.Sprintf("XMPP disconnected (%s), reconnecting)", err))
}
}
}