fixed poke permissions

This commit is contained in:
WolverinDEV 2019-07-21 12:32:29 +02:00
parent d3cc5984e5
commit a5e545afeb

View File

@ -2222,7 +2222,7 @@ CommandResult ConnectedClient::handleCommandClientPoke(Command &cmd) {
auto client = this->server->findClient(cmd["clid"].as<ClientId>());
if (!client) return {findError("client_invalid_id"), "invalid client id"};
if (client->getType() == CLIENT_MUSIC) return {findError("client_invalid_type"), "You cant poke a music bot!"};
CACHED_PERM_CHECK(permission::i_client_poke_power, client->permissionValue(permission::PERMTEST_ORDERED, permission::i_client_needed_poke_power, client->currentChannel));
CACHED_PERM_CHECK(permission::i_client_poke_power, client->permissionValue(permission::PERMTEST_ORDERED, permission::i_client_needed_poke_power, client->currentChannel), false);
client->notifyClientPoke(_this.lock(), cmd["msg"]);
return CommandResult::Success;