summaryrefslogtreecommitdiff
path: root/src/irc/iid.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/irc/iid.cpp')
-rw-r--r--src/irc/iid.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/irc/iid.cpp b/src/irc/iid.cpp
index d442013..6b07793 100644
--- a/src/irc/iid.cpp
+++ b/src/irc/iid.cpp
@@ -34,9 +34,10 @@ Iid::Iid(const std::string& iid, const Bridge *bridge)
void Iid::set_type(const std::set<char>& chantypes)
{
+ if (this->local.empty() && this->server.empty())
+ this->type = Iid::Type::None;
if (this->local.empty())
return;
-
if (chantypes.count(this->local[0]) == 1)
this->type = Iid::Type::Channel;
else
@@ -105,6 +106,8 @@ namespace std {
{
if (iid.type == Iid::Type::Server)
return iid.get_server();
+ else if (iid.get_local().empty() && iid.get_server().empty())
+ return {};
else
return iid.get_encoded_local() + iid.separator + iid.get_server();
}