/***************************************************************************
- * Copyright (C) 2005-2014 by the Quassel Project *
+ * Copyright (C) 2005-2015 by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
QString verboseMessage = tr("sending CTCP-%1 request to %2").arg(ctcpTag).arg(nick);
if (ctcpTag == "PING") {
- uint now = QDateTime::currentDateTime().toTime_t();
- message = QString::number(now);
+ message = QString::number(QDateTime::currentMSecsSinceEpoch());
}
// FIXME make this a proper event
// For example, blowfish-ebc seems to create 8-char chunks.
static const char *cmd = "PRIVMSG";
- static const char *splitter = " .,-";
+ static const char *splitter = " .,-!?";
int maxSplitPos = message.count();
int splitPos = maxSplitPos;
// that means that the last message can be as long as:
// 512 - nicklen - userlen - hostlen - commandlen - sum(param[0]..param[n-1])) - 2 (for CRLF) - 4 (":!@" + 1space between prefix and command) - max(paramcount - 1, 0) (space for simple params) - 2 (space and colon for last param)
IrcUser *me = network()->me();
- int maxLen = 480 - cmd.toAscii().count(); // educated guess in case we don't know us (yet?)
+ int maxLen = 480 - cmd.toLatin1().count(); // educated guess in case we don't know us (yet?)
if (me)
- maxLen = 512 - serverEncode(me->nick()).count() - serverEncode(me->user()).count() - serverEncode(me->host()).count() - cmd.toAscii().count() - 6;
+ maxLen = 512 - serverEncode(me->nick()).count() - serverEncode(me->user()).count() - serverEncode(me->host()).count() - cmd.toLatin1().count() - 6;
if (!params.isEmpty()) {
for (int i = 0; i < params.count() - 1; i++) {