+ chliststr = targuser->ChannelList(targuser);
+ std::stringstream dump(chliststr);
+
+ ServerInstance->DumpText(user,checkstr + " onchans ", dump);
+ }
+ else if (targchan)
+ {
+ /* /check on a channel */
+ 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++)