fixed channel related crash
This commit is contained in:
parent
3885b426e4
commit
0a762eef76
@ -183,8 +183,8 @@ bool TSServer::assignDefaultChannel(const shared_ptr<ConnectedClient>& client, b
|
||||
channel = this->channelTree->findChannelByPath(str);
|
||||
if (channel) {
|
||||
if(!channel->permission_granted(permission::i_channel_needed_join_power, client->calculate_permission_value(permission::i_channel_join_power, channel->channelId()), false)) {
|
||||
logMessage(this->serverId, "[{}] Client tried to connect to a channel which he hasn't permission for. Channel: {} ({})", CLIENT_STR_LOG_PREFIX_(client), channel->channelId(), channel->name());
|
||||
channel = nullptr;
|
||||
logMessage(this->serverId, "[{}] Client tried to connect to a channel which he hasn't permission for. Channel: {} ({})", CLIENT_STR_LOG_PREFIX_(client), channel->channelId(), channel->name());
|
||||
} else if (!channel->passwordMatch(client->properties()[property::CLIENT_DEFAULT_CHANNEL_PASSWORD], true) && client->permissionValue(permission::PERMTEST_ORDERED, permission::b_channel_join_ignore_password, channel) < 1) {
|
||||
logMessage(this->serverId, "[{}] Client tried to connect to a channel which is password protected and he hasn't the right password. Channel: {} ({})", CLIENT_STR_LOG_PREFIX_(client), channel->channelId(), channel->name());
|
||||
channel = nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user