summaryrefslogtreecommitdiffstats
path: root/EssentialsXMPP
diff options
context:
space:
mode:
Diffstat (limited to 'EssentialsXMPP')
-rw-r--r--EssentialsXMPP/src/com/earth2me/essentials/xmpp/XMPPManager.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/XMPPManager.java b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/XMPPManager.java
index 4ad3ad35d..f33f29416 100644
--- a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/XMPPManager.java
+++ b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/XMPPManager.java
@@ -68,6 +68,10 @@ public class XMPPManager extends Handler implements MessageListener, ChatManager
}
if (chat != null)
{
+ if (!connection.isConnected()) {
+ disconnect();
+ connect();
+ }
chat.sendMessage(message.replaceAll("ยง[0-9a-f]", ""));
return true;
}