summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_groupchat.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-02-26 00:26:13 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-02-26 00:26:13 +0300
commit1bf0fece31876c453bea93479e6d0d40bd8a564d (patch)
treeed0361cc6c51ec8c0c74829df6d24d2a22e70f45 /protocols/JabberG/src/jabber_groupchat.cpp
parentea88e2c53d3ac0840955eb703213ca1430bb4361 (diff)
fixes #1865 (Joining Password Protected Jabber Conference is not working since last updates) + code cleaning
Diffstat (limited to 'protocols/JabberG/src/jabber_groupchat.cpp')
-rw-r--r--protocols/JabberG/src/jabber_groupchat.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/protocols/JabberG/src/jabber_groupchat.cpp b/protocols/JabberG/src/jabber_groupchat.cpp
index 2719ba4690..a23038c6a2 100644
--- a/protocols/JabberG/src/jabber_groupchat.cpp
+++ b/protocols/JabberG/src/jabber_groupchat.cpp
@@ -255,11 +255,11 @@ void CJabberProto::GroupchatJoinRoom(const char *server, const char *room, const
replaceStr(item->password, info.m_password);
int status = (m_iStatus == ID_STATUS_INVISIBLE) ? ID_STATUS_ONLINE : m_iStatus;
- XmlNode x("x"); x << XATTR("xmlns", JABBER_FEAT_MUC);
- if (info.m_password && info.m_password[0])
- x << XCHILD("password", info.m_password);
-
- SendPresenceTo(status, text, x.ToElement());
+ if (mir_strlen(info.m_password)) {
+ XmlNode x("x"); x << XATTR("xmlns", JABBER_FEAT_MUC) << XCHILD("password", info.m_password);
+ SendPresenceTo(status, text, x);
+ }
+ else SendPresenceTo(status, text);
}
////////////////////////////////////////////////////////////////////////////////
@@ -744,7 +744,7 @@ static VOID CALLBACK JabberGroupchatChangeNickname(void* arg)
if (param->ppro->EnterString(szBuffer, szTitle, ESF_COMBO, "gcNick_")) {
T2Utf newNick(szBuffer);
replaceStr(item->nick, newNick);
- param->ppro->SendPresenceTo(param->ppro->m_iStatus, CMStringA(FORMAT, "%s/%s", item->jid, newNick.get()), nullptr);
+ param->ppro->SendPresenceTo(param->ppro->m_iStatus, CMStringA(FORMAT, "%s/%s", item->jid, newNick.get()));
}
}
@@ -992,7 +992,7 @@ void CJabberProto::GroupchatProcessPresence(const TiXmlElement *node)
replaceStr(item->nick, newNick);
char text[1024];
mir_snprintf(text, "%s/%s", item->jid, newNick);
- SendPresenceTo(m_iStatus, text, nullptr);
+ SendPresenceTo(m_iStatus, text);
}
else {
CallFunctionAsync(JabberGroupchatChangeNickname, new JabberGroupchatChangeNicknameParam(this, from));