CMessage::SetParams(): forget the colon

1a3e9ec made CMessage try to retain the colon if the original message
contained one. We should not, however, remember that when the params
are replaced entirely. Consider for example an extended-join message
that is made suitable for a client that doesn't have extended-join
capability:

    CMessage msg(":nick!ident@host JOIN #chan account :real name");
    msg.SetParams({msg.GetParam(0)});
    msg.ToString(); // ":nick!ident@host JOIN :#chan"
This commit is contained in:
J-P Nurmi
2015-09-13 02:07:14 +02:00
parent 08ad9c40cc
commit 6d42675a3a

View File

@@ -65,6 +65,7 @@ CString CMessage::GetParams(unsigned int uIdx, unsigned int uLen) const
void CMessage::SetParams(const VCString& vsParams)
{
m_vsParams = vsParams;
m_bColon = false;
if (m_eType == Type::Text || m_eType == Type::Notice || m_eType == Type::Action || m_eType == Type::CTCP) {
InitType();