+void ClientUserInputHandler::handleIgnore(const BufferInfo &bufferInfo, const QString &text)
+{
+ if (text.isEmpty()) {
+ emit Client::instance()->displayIgnoreList("");
+ return;
+ }
+ // If rule contains no ! or @, we assume it is just a nickname, and turn it into an ignore rule for that nick
+ QString rule = (text.contains('!') || text.contains('@')) ? text : text + "!*@*";
+
+ Client::ignoreListManager()->requestAddIgnoreListItem(
+ IgnoreListManager::IgnoreType::SenderIgnore,
+ rule,
+ false,
+ // Use a dynamic ignore rule, for reversibility
+ IgnoreListManager::StrictnessType::SoftStrictness,
+ // Use current network as scope
+ IgnoreListManager::ScopeType::NetworkScope,
+ Client::network(bufferInfo.networkId())->networkName(),
+ true
+ );
+}
+
+