Fixed a client disconnect bug
This commit is contained in:
parent
616149d5dd
commit
b155bf8d5f
@ -125,6 +125,16 @@ void BasicChannel::setChannelType(ChannelType::ChannelType type) {
|
||||
properties()[property::CHANNEL_FLAG_SEMI_PERMANENT] = type == ChannelType::semipermanent;
|
||||
}
|
||||
|
||||
void BasicChannel::updateChannelType(std::vector<property::ChannelProperties> &properties, ChannelType::ChannelType type) {
|
||||
if(this->properties()[property::CHANNEL_FLAG_PERMANENT].update_value(type == ChannelType::permanent)) {
|
||||
properties.push_back(property::CHANNEL_FLAG_PERMANENT);
|
||||
}
|
||||
|
||||
if(this->properties()[property::CHANNEL_FLAG_SEMI_PERMANENT].update_value(type == ChannelType::semipermanent)) {
|
||||
properties.push_back(property::CHANNEL_FLAG_SEMI_PERMANENT);
|
||||
}
|
||||
}
|
||||
|
||||
bool BasicChannel::verify_password(const std::optional<std::string> &password, bool password_hashed) {
|
||||
if(!this->properties()[property::CHANNEL_FLAG_PASSWORD].as_unchecked<bool>()) {
|
||||
return true;
|
||||
|
@ -51,6 +51,7 @@ namespace ts {
|
||||
|
||||
ChannelType::ChannelType channelType();
|
||||
void setChannelType(ChannelType::ChannelType);
|
||||
void updateChannelType(std::vector<property::ChannelProperties>& /* updates */, ChannelType::ChannelType /* target type */);
|
||||
|
||||
[[nodiscard]] bool verify_password(const std::optional<std::string>&, bool /* password already hashed */);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user