summaryrefslogtreecommitdiff
path: root/src/modules/m_check.cpp
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2006-04-12 00:58:45 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2006-04-12 00:58:45 +0000
commit2bed3225ab9545d6d4072788160290bf52d06bbb (patch)
tree125774370ab78ed988019ae378e6437476b98f14 /src/modules/m_check.cpp
parentbad99c30c786bf30e9b5c5473752a8cd611530e1 (diff)
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
Diffstat (limited to 'src/modules/m_check.cpp')
-rw-r--r--src/modules/m_check.cpp40
1 files changed, 39 insertions, 1 deletions
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
{