From 2bed3225ab9545d6d4072788160290bf52d06bbb Mon Sep 17 00:00:00 2001 From: w00t Date: Wed, 12 Apr 2006 00:58:45 +0000 Subject: Delete spanningtree_ng for now, it breaks cygwin compile - and has no changes. Commit /check, though it's probably broken at current. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3873 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_check.cpp | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) (limited to 'src/modules/m_check.cpp') diff --git a/src/modules/m_check.cpp b/src/modules/m_check.cpp index 0b93e0288..c905a56e9 100644 --- a/src/modules/m_check.cpp +++ b/src/modules/m_check.cpp @@ -111,7 +111,45 @@ class cmd_check : public command_t } Srv->SendTo(NULL, user, checkstr + " modes " + chanmodes(targchan, true)); - Srv->SendTo(NULL, user, checkstr + " usercount " + ConvToStr(targchan->GetUserCounter())); + Srv->SendTo(NULL, user, checkstr + " membercount " + ConvToStr(targchan->GetUserCounter())); + + /* now the ugly bit, spool current members of a channel. :| */ + + CUList *ulist= targchan->GetUsers(); + + /* 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 = cflags(i->second, targchan); + /* + * find how many connections from this user's IP -- unlike Asuka, + * I define a clone as coming from the same host. --w00t + */ + sprintf(ptr, "%l ", FindMatchingGlobal(i->second)); + + if (flags & UCMODE_OP) + { + strcat(ptr, "@"); + } + + if (flags & UCMODE_HOP) + { + strcat(ptr, "%"); + } + + if (flags & UCMODE_VOICE) + { + strcat(ptr, "+"); + } + + sprintf(tmpbuf, "%s (%s@%s) %s ", i->second->nick, i->second->ident, i->second->dhost, i->second->fullname); + strcat(ptr, tmpbuf); + + Srv->SendTo(NULL, user, checkstr + " member " + ptr); + } } else { -- cgit v1.3.1-10-gc9f91