#include "network.h"
#include "types.h"
#include "bufferinfo.h"
+#include "messagemodel.h"
#include <QDateTime>
}
void ClientUserInputHandler::handleJoin(const BufferInfo &bufferInfo, const QString &text) {
+ if(text.isEmpty()) {
+ Client::messageModel()->insertErrorMessage(bufferInfo, tr("/JOIN expects a channel"));
+ return;
+ }
switchBuffer(bufferInfo.networkId(), text.section(' ', 0, 0));
// send to core
defaultHandler("JOIN", bufferInfo, text);
}
void ClientUserInputHandler::handleQuery(const BufferInfo &bufferInfo, const QString &text) {
+ if(text.isEmpty()) {
+ Client::messageModel()->insertErrorMessage(bufferInfo, tr("/QUERY expects at least a nick"));
+ return;
+ }
switchBuffer(bufferInfo.networkId(), text.section(' ', 0, 0));
// send to core
defaultHandler("QUERY", bufferInfo, text);