mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Add /fakemsg command (#3448)
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
parent
8e5468c316
commit
ac925d28eb
|
@ -83,6 +83,7 @@
|
||||||
- Dev: Renamed CMake's build option `USE_SYSTEM_QT5KEYCHAIN` to `USE_SYSTEM_QTKEYCHAIN`. (#3103)
|
- Dev: Renamed CMake's build option `USE_SYSTEM_QT5KEYCHAIN` to `USE_SYSTEM_QTKEYCHAIN`. (#3103)
|
||||||
- Dev: Add benchmarks that can be compiled with the `BUILD_BENCHMARKS` CMake flag. Off by default. (#3038)
|
- Dev: Add benchmarks that can be compiled with the `BUILD_BENCHMARKS` CMake flag. Off by default. (#3038)
|
||||||
- Dev: Added CMake build option `BUILD_WITH_QTKEYCHAIN` to build with or without Qt5Keychain support (On by default). (#3318)
|
- Dev: Added CMake build option `BUILD_WITH_QTKEYCHAIN` to build with or without Qt5Keychain support (On by default). (#3318)
|
||||||
|
- Dev: Added /fakemsg command for debugging (#3448)
|
||||||
- Dev: Notebook::select\* functions now take an optional `focusPage` parameter (true by default) which keeps the default behaviour of selecting the page after it has been selected. If set to false, the page is _not_ focused after being selected. (#3446)
|
- Dev: Notebook::select\* functions now take an optional `focusPage` parameter (true by default) which keeps the default behaviour of selecting the page after it has been selected. If set to false, the page is _not_ focused after being selected. (#3446)
|
||||||
|
|
||||||
## 2.3.4
|
## 2.3.4
|
||||||
|
|
|
@ -871,6 +871,22 @@ void CommandController::initialize(Settings &, Paths &paths)
|
||||||
getApp()->twitch2->sendRawMessage(words.mid(1).join(" "));
|
getApp()->twitch2->sendRawMessage(words.mid(1).join(" "));
|
||||||
return "";
|
return "";
|
||||||
});
|
});
|
||||||
|
#ifndef NDEBUG
|
||||||
|
this->registerCommand(
|
||||||
|
"/fakemsg",
|
||||||
|
[](const QStringList &words, ChannelPtr channel) -> QString {
|
||||||
|
if (words.size() < 2)
|
||||||
|
{
|
||||||
|
channel->addMessage(makeSystemMessage(
|
||||||
|
"Usage: /fakemsg (raw irc text) - injects raw irc text as "
|
||||||
|
"if it was a message received from TMI"));
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
auto ircText = words.mid(1).join(" ");
|
||||||
|
getApp()->twitch2->addFakeMessage(ircText);
|
||||||
|
return "";
|
||||||
|
});
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void CommandController::save()
|
void CommandController::save()
|
||||||
|
|
Loading…
Reference in a new issue