ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/ermyth/src/main.C
(Generate patch)

Comparing ermyth/src/main.C (file contents):
Revision 1.7 by pippijn, Thu Aug 30 19:56:26 2007 UTC vs.
Revision 1.8 by pippijn, Sun Sep 9 20:05:52 2007 UTC

1/* 1/*
2 * main.C: Initialisation routine. 2 * main.C: Initialisation routine.
3 * Rights to this code are documented in doc/pod/license.pod. 3 * Rights to this code are documented in doc/pod/license.pod.
4 */ 4 */
5 5
6static char const rcsid[] = "$Id: main.C,v 1.7 2007/08/30 19:56:26 pippijn Exp $"; 6static char const rcsid[] = "$Id: main.C,v 1.8 2007/09/09 20:05:52 pippijn Exp $";
7 7
8#include "atheme.h" 8#include "atheme.h"
9#include "servers.h"
9#include <ermyth/database.h> 10#include <ermyth/database.h>
10#include <ermyth/module.h> 11#include <ermyth/module.h>
11#include <account/kline.h> 12#include <account/kline.h>
12#include <account/myuser.h> 13#include <account/myuser.h>
13#include <account/mynick.h> 14#include <account/mynick.h>
20#include "connection.h" 21#include "connection.h"
21#include "confparse.h" 22#include "confparse.h"
22#include <ermyth/shstr.h> 23#include <ermyth/shstr.h>
23#include <common/random.h> 24#include <common/random.h>
24 25
25extern char **environ;
26
27/* *INDENT-OFF* */ 26/* *INDENT-OFF* */
28static void 27static void
29print_help (void) 28print_help (void)
30{ 29{
31 printf ("usage: %s [-dhnv] [-c conf] [-l logfile] [-p pidfile]\n\n" 30 printf ("usage: %s [-dhnv] [-c conf] [-l logfile] [-p pidfile]\n\n"
296 295
297 /* check expires every hour */ 296 /* check expires every hour */
298 event_add ("expire_check", expire_check, NULL, 3600); 297 event_add ("expire_check", expire_check, NULL, 3600);
299 298
300 /* check kline expires every minute */ 299 /* check kline expires every minute */
301 event_add ("kline_expire", kline_expire, NULL, 60); 300 event_add ("kline_t::expire", kline_t::expire, NULL, 60);
302 301
303 /* check authcookie expires every ten minutes */ 302 /* check authcookie expires every ten minutes */
304 event_add ("authcookie_expire", authcookie_expire, NULL, 600); 303 event_add ("authcookie_expire", authcookie_expire, NULL, 600);
305 304
306 me.connected = false; 305 me.connected = false;
336 335
337 /* free used memory */ 336 /* free used memory */
338 shstr::cleanup (); 337 shstr::cleanup ();
339 modules::cleanup (); 338 modules::cleanup ();
340 myuser_t::cleanup (); // XXX: this currently breaks and I don't know why 339 myuser_t::cleanup (); // XXX: this currently breaks and I don't know why
341 mynick_cleanup (); 340 mynick_t::cleanup ();
342 mychan_t::cleanup (); 341 mychan_t::cleanup ();
343 delete phandler; 342 delete phandler;
343 deinit_conf ();
344 server_delete (me.me, true);
344 345
345 log_shutdown (); 346 log_shutdown ();
346 347
347 return 0; 348 return 0;
348} 349}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines