The complete source code of IdealIRC
http://www.idealirc.org/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
648 B
18 lines
648 B
#include "ICommand/ICommandPriv.h"
|
|
#include <QDateTime>
|
|
|
|
void ICommandPriv::cmd_ctcp(const std::string& target, const std::string& command, std::string message)
|
|
{
|
|
if (command == "PING")
|
|
message = std::to_string( QDateTime::currentMSecsSinceEpoch() );
|
|
|
|
QString qmsg = QString::fromStdString(command);
|
|
if (!message.empty() && command != "PING")
|
|
qmsg += " " + QString::fromStdString(message);
|
|
|
|
status.printToActive(PrintType::CTCP, QStringLiteral("Sending [CTCP %1] to %2")
|
|
.arg(qmsg)
|
|
.arg(target.c_str()));
|
|
|
|
connection.ctcpRequest(target, command, message);
|
|
}
|
|
|