#include <stdio.h>
+#include <string.h>
#include "../core/schedule.h"
#include "../channel/channel.h"
void dodump(void *arg) {
chanindex *c;
int i;
+ nick *n;
+ char buf[512];
FILE *fp = fopen("chandump/chandump.txt.1", "w");
if(!fp)
return;
+ fprintf(fp, "M T %lld\n", (unsigned long long)time(NULL));
+
for(i=0;i<CHANNELHASHSIZE;i++)
for(c=chantable[i];c;c=c->next)
if(c->channel && !IsSecret(c->channel))
- fprintf(fp, "%s %d%s%s\n", c->name->content, c->channel->users->totalusers, (c->channel->topic&&c->channel->topic->content)?" ":"", (c->channel->topic&&c->channel->topic->content)?c->channel->topic->content:"");
+ fprintf(fp, "C %s %d%s%s\n", c->name->content, c->channel->users->totalusers, (c->channel->topic&&c->channel->topic->content)?" ":"", (c->channel->topic&&c->channel->topic->content)?c->channel->topic->content:"");
+
+ for(i=0;i<NICKHASHSIZE;i++)
+ for(n=nicktable[i];n;n=n->next)
+ fprintf(fp, "N %s %s %s %s %s\n", n->nick, n->ident, strchr(visibleuserhost(n, buf), '@') + 1, (IsAccount(n) && n->authname) ? n->authname : "0", n->realname->name->content);
fclose(fp);
}
void _init() {
- dumpsched = (void *)schedulerecurring(time(NULL), 0, 300, &dodump, NULL);
+ dumpsched = (void *)schedulerecurring(time(NULL), 0, 60, &dodump, NULL);
}
void _fini() {
#define RPL_STATSTLINE 246 /* Undernet extension */
#define RPL_STATSGLINE 247 /* Undernet extension */
#define RPL_STATSULINE 248 /* Undernet extension */
+#define RPL_STATSDEBUG 249 /* Extension to RFC1459 */
#define RPL_STATSCONN 250 /* Undernet extension */
#define RPL_STATSDLINE 275 /* Undernet extension */
#define RPL_STATSRLINE 276 /* Undernet extension */
const int numerics[] = { RPL_STATSLINKINFO, RPL_STATSCOMMANDS, RPL_STATSCLINE, RPL_STATSNLINE, RPL_STATSILINE, RPL_STATSKLINE,
RPL_STATSPLINE, RPL_STATSYLINE, RPL_STATSJLINE, RPL_STATSALINE, RPL_STATSQLINE, RPL_STATSVERBOSE,
RPL_STATSENGINE, RPL_STATSFLINE, RPL_STATSLLINE, RPL_STATSUPTIME, RPL_STATSOLINE, RPL_STATSHLINE,
- RPL_STATSTLINE, RPL_STATSGLINE,RPL_STATSULINE, RPL_STATSCONN, RPL_STATSDLINE, RPL_STATSRLINE,
+ RPL_STATSTLINE, RPL_STATSGLINE, RPL_STATSULINE, RPL_STATSDEBUG, RPL_STATSCONN, RPL_STATSDLINE, RPL_STATSRLINE,
RPL_STATSSLINE, 0 };
void _init() {