aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_check.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_check.cpp')
-rw-r--r--src/modules/m_check.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/modules/m_check.cpp b/src/modules/m_check.cpp
index d0b2d1fdb..cbb65264a 100644
--- a/src/modules/m_check.cpp
+++ b/src/modules/m_check.cpp
@@ -168,7 +168,6 @@ class CommandCheck : public Command
User *targuser;
Channel *targchan;
- std::string chliststr;
targuser = ServerInstance->Users.Find(parameters[0]);
targchan = ServerInstance->FindChan(parameters[0]);
@@ -236,16 +235,7 @@ class CommandCheck : public Command
CheckContext::List chanlist(context, "onchans");
for (const auto* memb : targuser->chans)
- {
- Channel* c = memb->chan;
- char prefix = memb->GetPrefixChar();
- if (prefix)
- chliststr.push_back(prefix);
- chliststr.append(c->name);
- chanlist.Add(chliststr);
- chliststr.clear();
- }
-
+ chanlist.Add(memb->GetAllPrefixChars() + memb->chan->name);
chanlist.Flush();
context.DumpExt(targuser);