summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-10-06 09:33:56 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-10-06 09:33:56 +0000
commit769a14f1b476de7244b6ab275e44164ea938c683 (patch)
tree3e817aa4959acbaa8f51bd7429db458455c079d0 /src/modules
parent2632def464aa1c695c6985a3dbd0302c6061f5fe (diff)
Update to support modular prefixes, and eliminate some string copying
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5432 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_check.cpp29
1 files changed, 3 insertions, 26 deletions
diff --git a/src/modules/m_check.cpp b/src/modules/m_check.cpp
index 357c1c735..cfb38ceb9 100644
--- a/src/modules/m_check.cpp
+++ b/src/modules/m_check.cpp
@@ -119,35 +119,12 @@ class cmd_check : public command_t
/* note that unlike /names, we do NOT check +i vs in the channel */
for (CUList::iterator i = ulist->begin(); i != ulist->end(); i++)
{
- char list[MAXBUF];
char tmpbuf[MAXBUF];
- char* ptr = list;
- int flags = targchan->GetStatusFlags(i->second);
/*
- * find how many connections from this user's IP -- unlike Asuka,
- * I define a clone as coming from the same host. --w00t
+ * Unlike Asuka, I define a clone as coming from the same host. --w00t
*/
- snprintf(ptr, MAXBUF, "%lu ", i->second->GlobalCloneCount());
-
- if (flags & UCMODE_OP)
- {
- strcat(ptr, "@");
- }
-
- if (flags & UCMODE_HOP)
- {
- strcat(ptr, "%");
- }
-
- if (flags & UCMODE_VOICE)
- {
- strcat(ptr, "+");
- }
-
- snprintf(tmpbuf, MAXBUF, "%s (%s@%s) %s ", i->second->nick, i->second->ident, i->second->dhost, i->second->fullname);
- strlcat(ptr, tmpbuf, MAXBUF);
-
- user->WriteServ(checkstr + " member " + ptr);
+ snprintf(tmpbuf, MAXBUF, "%lu %s%s (%s@%s) %s ", i->second->GlobalCloneCount(), targchan->GetAllPrefixChars(i->second), i->second->nick, i->second->ident, i->second->dhost, i->second->fullname);
+ user->WriteServ(checkstr + " member " + tmpbuf);
}
}
else