#include "stdinc.h"#include "server.h"Go to the source code of this file.
Functions | |
| static void | showHelp () |
| void | Run (void) |
| void | DaemonSeed (void) |
| void | Banner (void) |
| void | Load_Dbs (void) |
| static void | AtExit (void) |
| void | do_restart (void) |
| void | psr_HandleEvent (Socket *s, int et) |
| int | main (int argc, char **argv, char **env) |
| int | check_for_pid () |
| void | OneTimeAround () |
| void | SetTime () |
| void | Exit (int status) |
| void | Rehash (int status) |
| void | init_lists () |
Variables | |
| int | uselogchan |
| ServCmds * | servcmds_list = NULL |
| UserCmds * | usercmds_list = NULL |
| Module * | module_list = NULL |
| char ** | my_env |
| char ** | my_argv |
| static void AtExit | ( | void | ) | [static] |
AtExit() Called by atexit when program terminates this insures we have proper cleanup :)
Definition at line 393 of file main.c.
References CfgSettings, close_log(), dest_all_threads(), DestAccList(), destroy_config_tree(), destroy_event_list(), Event(), Omega, Conf::pidfile, SHUTDOWN, socket_cleanup(), sync_state, and uplink_cleanup().
Referenced by main().
| void Banner | ( | void | ) |
Definition at line 154 of file main.c.
References COMPILE_DATE, PACKAGE_VERSION, SYSUNAME_SHORT, and VERSION_STRING.
Referenced by Run().
| int check_for_pid | ( | ) |
Move this to its own function
return 0 if there is no pid or -1 if there is no file else return the current active pid.
Definition at line 216 of file main.c.
References CfgSettings, and Conf::pidfile.
Referenced by DaemonSeed().
| void DaemonSeed | ( | void | ) |
Definition at line 171 of file main.c.
References CfgSettings, check_for_pid(), nofork, pid, and Conf::pidfile.
Referenced by main().
| void do_restart | ( | void | ) |
Definition at line 468 of file main.c.
References CfgSettings, Event(), my_argv, Conf::pidfile, SPATH, and uplink_cleanup().
Referenced by SigHandler().
| void Exit | ( | int | status | ) |
Our exit function - since everything is pretty much handled in AtExit we are just calling exit(0) for the time being
Definition at line 448 of file main.c.
Referenced by Core_Construct(), load_modules(), main(), and SigHandler().
| void init_lists | ( | void | ) |
Definition at line 482 of file main.c.
References access_flags, accesslist, connected_sockets, events, servlist, sockets, sockevents, and userlist.
Referenced by main().
| void Load_Dbs | ( | void | ) |
| int main | ( | int | argc, | |
| char ** | argv, | |||
| char ** | env | |||
| ) |
Definition at line 31 of file main.c.
References AtExit(), CfgSettings, Conf::conf_name, config_load(), config_test(), Core_Construct(), DaemonSeed(), debug, DPATH, EPATH, Exit(), init_access(), init_lists(), InitDefaults(), logchan, my_argv, my_env, nofork, nomodules, Omega, PACKAGE_NAME, PACKAGE_VERSION, Run(), SetTime(), showHelp(), starttime, uselogchan, and VERSION_STRING.
| void OneTimeAround | ( | ) |
Definition at line 333 of file main.c.
References alog(), LOG_SOCKET, receive(), RunTimedEvents(), SetTime(), and SOCK_ERR_OK.
Referenced by Run().
| void psr_HandleEvent | ( | Socket * | s, | |
| int | et | |||
| ) |
Definition at line 265 of file parser.c.
References EVENT_READ, GetLine(), and parse().
| void Rehash | ( | int | status | ) |
Definition at line 456 of file main.c.
References CfgSettings, Conf::conf_name, config_load(), destroy_config_tree(), Event(), and sendto_logchan().
Referenced by Core_Construct(), and SigHandler().
| void Run | ( | void | ) |
Definition at line 249 of file main.c.
References add_new_socket(), AddEvent, AddEventEx(), Banner(), burst_local_users(), CfgSettings, Connect(), Link::eos, ev_connectuplink(), ev_housekeeping(), ev_ping(), EVENT_UNLIMITED, Socket::flags, get_config_bool(), init_modules(), init_uid(), introduce_users(), ircd_connect(), Core::me, Socket::name, new_serv(), Omega, OneTimeAround(), open_log(), Conf::port, protocol_init(), psr_HandleEvent(), psr_init(), Conf::servername, servsock, SetSig(), Conf::sid, Link::sid, SOCK_UPLINK, strlcpy(), Conf::uplink, VerifyConf(), and Conf::vhost.
Referenced by main().
| void SetTime | ( | ) |
Definition at line 363 of file main.c.
References curdate, lastdate, and ServerTime.
Referenced by main(), and OneTimeAround().
| Module* module_list = NULL |
| char ** my_argv |
Definition at line 27 of file main.c.
Referenced by do_restart(), and main().
| ServCmds* servcmds_list = NULL |
| int uselogchan |
Definition at line 5 of file log.h.
Referenced by main(), sendto_logchan(), and uplink_cleanup().
| UserCmds* usercmds_list = NULL |
1.6.3