/*
 * sshchatd.c
 *
 * Server component of sshchat, serves as mailbox for disconnected users.
 *
 * Author: Dario Rodriguez dario@softhome.net
 * This program is licensed under the terms of the GPL v2.1+
 */

#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>

#include "socklib.h"
#include "sbuf.h"

#include "sshchat.h"
#include "sshchatd_config.h"

int
main(int argc, char *argv[])
{
	cconfig *conf;
	if((conf=cconfig_init())==NULL) {
		fprintf(stderr,"ERROR: Couldn't init user data. Maybe there are no users in users/ ?\n");
		return(1);
	}
#warning TODO
	fprintf(stderr,"%i users loaded.\n",conf->numusers);
	{
		int i;
		for(i=0;i<conf->numusers;i++) {
			fprintf(stderr," [%i]: \"%s\"\n",i,conf->users[i]);
		}
	}
#warning TODO
	cconfig_free(conf),conf=NULL;
	return(0);
}