From 1211f517d5992562e90d6241d6f3fc220ba4068d Mon Sep 17 00:00:00 2001 From: WolverinDEV Date: Tue, 23 Jul 2019 10:21:58 +0200 Subject: [PATCH] Improved channeledit command --- server/src/client/ConnectedClientCommandHandler.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/src/client/ConnectedClientCommandHandler.cpp b/server/src/client/ConnectedClientCommandHandler.cpp index 2bf778b..8e1676e 100644 --- a/server/src/client/ConnectedClientCommandHandler.cpp +++ b/server/src/client/ConnectedClientCommandHandler.cpp @@ -1697,6 +1697,8 @@ CommandResult ConnectedClient:handleCommandChannelEdit(Command &cmd) { for (const auto &key : cmd[0].keys()) { if(key == "cid") continue; + if(key == "return_code") + continue; const auto &property = property::info(key); if(*property == property::CHANNEL_UNDEFINED) { @@ -1714,6 +1716,9 @@ CommandResult ConnectedClient:handleCommandChannelEdit(Command &cmd) { continue; } + if(channel->properties()[*property].as() == cmd[key].as()) + continue; /* we dont need to update stuff which is the same */ + if(key == "channel_icon_id") { CHANNEL_PERMISSION_TEST(permission::i_channel_permission_modify_power, permission::i_channel_needed_permission_modify_power, channel, true); } else if (key == "channel_order") {