From 769a14f1b476de7244b6ab275e44164ea938c683 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 6 Oct 2006 09:33:56 +0000 Subject: 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 --- src/modules/m_check.cpp | 29 +++-------------------------- 1 file changed, 3 insertions(+), 26 deletions(-) (limited to 'src') 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 -- cgit v1.2.3