summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/channels.cpp4
-rw-r--r--src/coremods/core_who.cpp6
-rw-r--r--src/coremods/core_whois.cpp4
-rw-r--r--src/modules/m_check.cpp4
4 files changed, 14 insertions, 4 deletions
diff --git a/src/channels.cpp b/src/channels.cpp
index fcfb524ce..c2060b90e 100644
--- a/src/channels.cpp
+++ b/src/channels.cpp
@@ -664,7 +664,9 @@ void Channel::UserList(User *user)
Membership* memb = i->second;
prefixlist.clear();
- prefixlist.push_back(memb->GetPrefixChar());
+ char prefix = memb->GetPrefixChar();
+ if (prefix)
+ prefixlist.push_back(prefix);
nick = i->first->nick;
FOREACH_MOD(OnNamesListItem, (user, memb, prefixlist, nick));
diff --git a/src/coremods/core_who.cpp b/src/coremods/core_who.cpp
index 670f05a90..2c120e562 100644
--- a/src/coremods/core_who.cpp
+++ b/src/coremods/core_who.cpp
@@ -220,7 +220,11 @@ void CommandWho::SendWhoLine(User* user, const std::vector<std::string>& parms,
}
if (memb)
- wholine.push_back(memb->GetPrefixChar());
+ {
+ char prefix = memb->GetPrefixChar();
+ if (prefix)
+ wholine.push_back(prefix);
+ }
wholine.append(" :0 " + u->fullname);
diff --git a/src/coremods/core_whois.cpp b/src/coremods/core_whois.cpp
index bd0b624d1..934dd2102 100644
--- a/src/coremods/core_whois.cpp
+++ b/src/coremods/core_whois.cpp
@@ -68,7 +68,9 @@ std::string CommandWhois::ChannelList(User* source, User* dest, bool spy)
*/
if (spy != (source == dest || !(c->IsModeSet(privatemode) || c->IsModeSet(secretmode)) || c->HasUser(source)))
{
- list.push_back(memb->GetPrefixChar());
+ char prefix = memb->GetPrefixChar();
+ if (prefix)
+ list.push_back(prefix);
list.append(c->name).push_back(' ');
}
}
diff --git a/src/modules/m_check.cpp b/src/modules/m_check.cpp
index ad0e2394d..35901f8d5 100644
--- a/src/modules/m_check.cpp
+++ b/src/modules/m_check.cpp
@@ -194,7 +194,9 @@ class CommandCheck : public Command
{
Membership* memb = *i;
Channel* c = memb->chan;
- chliststr.push_back(memb->GetPrefixChar());
+ char prefix = memb->GetPrefixChar();
+ if (prefix)
+ chliststr.push_back(prefix);
chliststr.append(c->name).push_back(' ');
}