projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Don't always add a colon to custom commands
[quassel.git]
/
src
/
core
/
corenetwork.cpp
diff --git
a/src/core/corenetwork.cpp
b/src/core/corenetwork.cpp
index
3fd0a1a
..
954565c
100644
(file)
--- a/
src/core/corenetwork.cpp
+++ b/
src/core/corenetwork.cpp
@@
-185,7
+185,6
@@
void CoreNetwork::connectToIrc(bool reconnecting)
enablePingTimeout();
#ifdef HAVE_SSL
enablePingTimeout();
#ifdef HAVE_SSL
- socket.setProtocol((QSsl::SslProtocol)server.sslVersion);
if (server.useSsl) {
CoreIdentity *identity = identityPtr();
if (identity) {
if (server.useSsl) {
CoreIdentity *identity = identityPtr();
if (identity) {
@@
-265,11
+264,14
@@
void CoreNetwork::putCmd(const QString &cmd, const QList<QByteArray> ¶ms, co
msg += ":" + prefix + " ";
msg += cmd.toUpper().toAscii();
msg += ":" + prefix + " ";
msg += cmd.toUpper().toAscii();
- for (int i = 0; i < params.size() - 1; i++) {
- msg += " " + params[i];
+ for (int i = 0; i < params.size(); i++) {
+ msg += " ";
+
+ if (i == params.size() - 1 && (params[i].contains(' ') || (!params[i].isEmpty() && params[i][0] == ':')))
+ msg += ":";
+
+ msg += params[i];
}
}
- if (!params.isEmpty())
- msg += " :" + params.last();
putRawLine(msg);
}
putRawLine(msg);
}