+ time_t creation_time = targchan->created;
+ time_t topic_time = targchan->topicset;
+
+ mytime = gmtime(&creation_time);
+ strftime(timebuf, 59, "%Y/%m/%d - %H:%M:%S", mytime);
+ user->WriteServ(checkstr + " created " + timebuf);
+
+ if (targchan->topic[0] != 0)
+ {
+ /* there is a topic, assume topic related information exists */
+ user->WriteServ(checkstr + " topic " + targchan->topic);
+ user->WriteServ(checkstr + " topic_setby " + targchan->setby);
+ mytime = gmtime(&topic_time);
+ strftime(timebuf, 59, "%Y/%m/%d - %H:%M:%S", mytime);
+ user->WriteServ(checkstr + " topic_setat " + timebuf);
+ }
+
+ user->WriteServ(checkstr + " modes " + targchan->ChanModes(true));
+ user->WriteServ(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 tmpbuf[MAXBUF];
+ /*
+ * Unlike Asuka, I define a clone as coming from the same host. --w00t
+ */
+ snprintf(tmpbuf, MAXBUF, "%lu %s%s (%s@%s) %s ", i->first->GlobalCloneCount(), targchan->GetAllPrefixChars(i->first), i->first->nick, i->first->ident, i->first->dhost, i->first->fullname);
+ user->WriteServ(checkstr + " member " + tmpbuf);
+ }