summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
1cb98a4)
Adapts MR84 to the refactored ClientUserInputHandler
Thanks johu for the initial fix!
Fixes #831 and renders MR84 obsolete.
#include "network.h"
#include "types.h"
#include "bufferinfo.h"
#include "network.h"
#include "types.h"
#include "bufferinfo.h"
+#include "messagemodel.h"
}
void ClientUserInputHandler::handleJoin(const BufferInfo &bufferInfo, const QString &text) {
}
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) {
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);
switchBuffer(bufferInfo.networkId(), text.section(' ', 0, 0));
// send to core
defaultHandler("QUERY", bufferInfo, text);
#ifndef CLIENTUSERINPUTHANDLER_H_
#define CLIENTUSERINPUTHANDLER_H_
#ifndef CLIENTUSERINPUTHANDLER_H_
#define CLIENTUSERINPUTHANDLER_H_
-//#include "bufferinfo.h"
#include "basichandler.h"
class BufferInfo;
#include "basichandler.h"
class BufferInfo;