diff options
author | Robin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-09-30 18:45:09 +0000 |
---|---|---|
committer | Robin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-09-30 18:45:09 +0000 |
commit | 2fd6bf39b1b018a7081fafd8350ea88f1b733ea5 (patch) | |
tree | 0dad452b2a0d221aab16417978b4743408c975f4 /src | |
parent | 0f2719990e6b61c9172e0a4593b7a1605bb29f44 (diff) |
Remove 'skeleton' mode. It's not really all that useful.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1200 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r-- | src/botserv.c | 2 | ||||
-rw-r--r-- | src/chanserv.c | 2 | ||||
-rw-r--r-- | src/core/os_admin.c | 5 | ||||
-rw-r--r-- | src/core/os_oper.c | 5 | ||||
-rw-r--r-- | src/datafiles.c | 22 | ||||
-rw-r--r-- | src/hostserv.c | 2 | ||||
-rw-r--r-- | src/init.c | 52 | ||||
-rw-r--r-- | src/main.c | 130 | ||||
-rw-r--r-- | src/memoserv.c | 2 | ||||
-rw-r--r-- | src/messages.c | 12 | ||||
-rw-r--r-- | src/modules/demos/catserv/ircd_catserv.c | 2 | ||||
-rw-r--r-- | src/nickserv.c | 2 | ||||
-rw-r--r-- | src/operserv.c | 14 | ||||
-rw-r--r-- | src/rdb.c | 17 |
14 files changed, 110 insertions, 159 deletions
diff --git a/src/botserv.c b/src/botserv.c index 682bb33a6..556994b0e 100644 --- a/src/botserv.c +++ b/src/botserv.c @@ -93,8 +93,6 @@ void botserv(User * u, char *buf) s = ""; } anope_cmd_ctcp(s_BotServ, u->nick, "PING %s", s); - } else if (skeleton) { - notice_lang(s_BotServ, u, SERVICE_OFFLINE, s_BotServ); } else { mod_run_cmd(s_BotServ, u, BOTSERV, cmd); } diff --git a/src/chanserv.c b/src/chanserv.c index 3881c29d7..442faec59 100644 --- a/src/chanserv.c +++ b/src/chanserv.c @@ -396,8 +396,6 @@ void chanserv(User * u, char *buf) s = ""; } anope_cmd_ctcp(s_ChanServ, u->nick, "PING %s", s); - } else if (skeleton) { - notice_lang(s_ChanServ, u, SERVICE_OFFLINE, s_ChanServ); } else { mod_run_cmd(s_ChanServ, u, CHANSERV, cmd); } diff --git a/src/core/os_admin.c b/src/core/os_admin.c index b3da7dc67..0d2c239db 100644 --- a/src/core/os_admin.c +++ b/src/core/os_admin.c @@ -76,11 +76,6 @@ int do_admin(User * u) NickAlias *na; int res = 0; - if (skeleton) { - notice_lang(s_OperServ, u, OPER_ADMIN_SKELETON); - return MOD_CONT; - } - if (!cmd || (!nick && stricmp(cmd, "LIST") && stricmp(cmd, "CLEAR"))) { syntax_error(s_OperServ, u, "ADMIN", OPER_ADMIN_SYNTAX); } else if (!stricmp(cmd, "ADD")) { diff --git a/src/core/os_oper.c b/src/core/os_oper.c index aac6e14b2..75ef6a0ad 100644 --- a/src/core/os_oper.c +++ b/src/core/os_oper.c @@ -74,11 +74,6 @@ int do_oper(User * u) NickAlias *na; int res = 0; - if (skeleton) { - notice_lang(s_OperServ, u, OPER_OPER_SKELETON); - return MOD_CONT; - } - if (!cmd || (!nick && stricmp(cmd, "LIST") && stricmp(cmd, "CLEAR"))) { syntax_error(s_OperServ, u, "OPER", OPER_OPER_SYNTAX); } else if (!stricmp(cmd, "ADD")) { diff --git a/src/datafiles.c b/src/datafiles.c index a2b210700..6dd7d40dd 100644 --- a/src/datafiles.c +++ b/src/datafiles.c @@ -707,18 +707,16 @@ void backup_databases(void) curday = tm.tm_yday; strftime(ext, sizeof(ext), "%Y%m%d", &tm); - if (!skeleton) { - rename_database(NickDBName, ext); - if (s_BotServ) { - rename_database(BotDBName, ext); - } - rename_database(ChanDBName, ext); - if (s_HostServ) { - rename_database(HostDBName, ext); - } - if (NSEmailReg) { - rename_database(PreNickDBName, ext); - } + rename_database(NickDBName, ext); + if (s_BotServ) { + rename_database(BotDBName, ext); + } + rename_database(ChanDBName, ext); + if (s_HostServ) { + rename_database(HostDBName, ext); + } + if (NSEmailReg) { + rename_database(PreNickDBName, ext); } rename_database(OperDBName, ext); diff --git a/src/hostserv.c b/src/hostserv.c index 01f6ab7ae..65eab319a 100644 --- a/src/hostserv.c +++ b/src/hostserv.c @@ -70,8 +70,6 @@ void hostserv(User * u, char *buf) s = ""; } anope_cmd_ctcp(s_HostServ, u->nick, "PING %s", s); - } else if (skeleton) { - notice_lang(s_HostServ, u, SERVICE_OFFLINE, s_HostServ); } else { if (ircd->vhost) { mod_run_cmd(s_HostServ, u, HOSTSERV, cmd); diff --git a/src/init.c b/src/init.c index 527df792a..96b3ef39f 100644 --- a/src/init.c +++ b/src/init.c @@ -318,10 +318,6 @@ static int parse_options(int ac, char **av) debug++; } else if (strcmp(s, "readonly") == 0) { readonly = 1; - skeleton = 0; - } else if (strcmp(s, "skeleton") == 0) { - readonly = 0; - skeleton = 1; } else if (strcmp(s, "nofork") == 0) { nofork = 1; } else if (strcmp(s, "logchan") == 0) { @@ -364,7 +360,6 @@ static int parse_options(int ac, char **av) fprintf(stdout, "-debug -debug\n"); fprintf(stdout, "-nofork -nofork\n"); fprintf(stdout, "-logchan -logchan channelname\n"); - fprintf(stdout, "-skeleton -skeleton\n"); fprintf(stdout, "-forceload -forceload\n"); fprintf(stdout, "-nothird -nothird\n"); fprintf(stdout, "-support -support\n"); @@ -540,11 +535,10 @@ int init_secondary(int ac, char **av) write_pidfile(); /* Announce ourselves to the logfile. */ - if (debug || readonly || skeleton) { - alog("Anope %s (ircd protocol: %s) starting up (options:%s%s%s)", + if (debug || readonly) { + alog("Anope %s (ircd protocol: %s) starting up (options:%s%s)", version_number, version_protocol, - debug ? " debug" : "", readonly ? " readonly" : "", - skeleton ? " skeleton" : ""); + debug ? " debug" : "", readonly ? " readonly" : ""); } else { alog("Anope %s (ircd protocol: %s) starting up", version_number, version_protocol); @@ -652,32 +646,30 @@ int init_secondary(int ac, char **av) /* Need a better way to handle this -dane */ if (!UseRDB) { #endif - if (!skeleton) { - load_ns_dbase(); + load_ns_dbase(); + if (debug) + alog("debug: Loaded %s database (1/%d)", s_NickServ, + (PreNickDBName ? 8 : 7)); + if (s_HostServ) { + load_hs_dbase(); if (debug) - alog("debug: Loaded %s database (1/%d)", s_NickServ, + alog("debug: Loaded %s database (2/%d)", s_HostServ, (PreNickDBName ? 8 : 7)); - if (s_HostServ) { - load_hs_dbase(); - if (debug) - alog("debug: Loaded %s database (2/%d)", s_HostServ, - (PreNickDBName ? 8 : 7)); - } else if (debug) { - alog("debug: HostServ database (2/%d) not loaded because HostServ is disabled", (PreNickDBName ? 8 : 7)); - } - if (s_BotServ) { - load_bs_dbase(); - if (debug) - alog("debug: Loaded %s database (3/%d)", s_BotServ, - (PreNickDBName ? 8 : 7)); - } else if (debug) { - alog("debug: BotServ database (3/%d) not loaded because BotServ is disabled", (PreNickDBName ? 8 : 7)); - } - load_cs_dbase(); + } else if (debug) { + alog("debug: HostServ database (2/%d) not loaded because HostServ is disabled", (PreNickDBName ? 8 : 7)); + } + if (s_BotServ) { + load_bs_dbase(); if (debug) - alog("debug: Loaded %s database (4/%d)", s_ChanServ, + alog("debug: Loaded %s database (3/%d)", s_BotServ, (PreNickDBName ? 8 : 7)); + } else if (debug) { + alog("debug: BotServ database (3/%d) not loaded because BotServ is disabled", (PreNickDBName ? 8 : 7)); } + load_cs_dbase(); + if (debug) + alog("debug: Loaded %s database (4/%d)", s_ChanServ, + (PreNickDBName ? 8 : 7)); load_os_dbase(); if (debug) alog("debug: Loaded %s database (5/%d)", s_OperServ, diff --git a/src/main.c b/src/main.c index 27f614bb6..7195d06ce 100644 --- a/src/main.c +++ b/src/main.c @@ -39,7 +39,6 @@ char *log_filename = LOG_FILENAME; /* -log filename */ int debug = 0; /* -debug */ int readonly = 0; /* -readonly */ int logchan = 0; /* -logchan */ -int skeleton = 0; /* -skeleton */ int nofork = 0; /* -nofork */ int forceload = 0; /* -forceload */ int nothird = 0; /* -nothrid */ @@ -107,14 +106,12 @@ extern void expire_all(void) waiting = -3; if (debug) alog("debug: Running expire routines"); - if (!skeleton) { - waiting = -21; - expire_nicks(); - waiting = -22; - expire_chans(); - waiting = -23; - expire_requests(); - } + waiting = -21; + expire_nicks(); + waiting = -22; + expire_chans(); + waiting = -23; + expire_requests(); waiting = -25; expire_akills(); if (ircd->sgline) { @@ -146,23 +143,21 @@ void save_databases(void) alog("debug: Saving FFF databases"); waiting = -10; backup_databases(); - if (!skeleton) { - waiting = -11; - save_ns_dbase(); - waiting = -12; - if (PreNickDBName) { - save_ns_req_dbase(); - waiting = -13; - } - save_cs_dbase(); - if (s_BotServ) { - waiting = -14; - save_bs_dbase(); - } - if (s_HostServ) { - waiting = -15; - save_hs_dbase(); - } + waiting = -11; + save_ns_dbase(); + waiting = -12; + if (PreNickDBName) { + save_ns_req_dbase(); + waiting = -13; + } + save_cs_dbase(); + if (s_BotServ) { + waiting = -14; + save_bs_dbase(); + } + if (s_HostServ) { + waiting = -15; + save_hs_dbase(); } waiting = -16; save_os_dbase(); @@ -176,56 +171,53 @@ void save_databases(void) if (debug) alog("debug: Saving RDB databases"); waiting = -10; - if (!skeleton) { - waiting = -11; - save_ns_rdb_dbase(); - /* We send these PONG's when we're not syncing to avoid timeouts. - * If we send them during the sync, we fuck something up there and - * break the syncing process, resulting in lost (literally lost) - * data. -GD - * This used is_sync(serv_uplink) to check for sync states. There's - * only a minor error with this: serv_uplink doesn't exist during - * the first save. So now we check for serv_uplink only; if it - * exists we're safe. -GD - */ - if (serv_uplink) - anope_cmd_pong(ServerName, ServerName); - waiting = -12; - save_cs_rdb_dbase(); - if (serv_uplink) - anope_cmd_pong(ServerName, ServerName); - if (PreNickDBName) { - save_ns_req_rdb_dbase(); - if (serv_uplink) - anope_cmd_pong(ServerName, ServerName); - waiting = -13; - } - if (s_BotServ) { - waiting = -14; - save_bs_rdb_dbase(); - if (serv_uplink) - anope_cmd_pong(ServerName, ServerName); - } - if (s_HostServ) { - waiting = -15; - save_hs_rdb_dbase(); - if (serv_uplink) - anope_cmd_pong(ServerName, ServerName); - } - waiting = -16; - save_os_rdb_dbase(); + waiting = -11; + save_ns_rdb_dbase(); + /* We send these PONG's when we're not syncing to avoid timeouts. + * If we send them during the sync, we fuck something up there and + * break the syncing process, resulting in lost (literally lost) + * data. -GD + * This used is_sync(serv_uplink) to check for sync states. There's + * only a minor error with this: serv_uplink doesn't exist during + * the first save. So now we check for serv_uplink only; if it + * exists we're safe. -GD + */ + if (serv_uplink) + anope_cmd_pong(ServerName, ServerName); + waiting = -12; + save_cs_rdb_dbase(); + if (serv_uplink) + anope_cmd_pong(ServerName, ServerName); + if (PreNickDBName) { + save_ns_req_rdb_dbase(); if (serv_uplink) anope_cmd_pong(ServerName, ServerName); - waiting = -17; - save_rdb_news(); + waiting = -13; + } + if (s_BotServ) { + waiting = -14; + save_bs_rdb_dbase(); if (serv_uplink) anope_cmd_pong(ServerName, ServerName); - waiting = -18; - save_rdb_exceptions(); + } + if (s_HostServ) { + waiting = -15; + save_hs_rdb_dbase(); if (serv_uplink) anope_cmd_pong(ServerName, ServerName); - } + waiting = -16; + save_os_rdb_dbase(); + if (serv_uplink) + anope_cmd_pong(ServerName, ServerName); + waiting = -17; + save_rdb_news(); + if (serv_uplink) + anope_cmd_pong(ServerName, ServerName); + waiting = -18; + save_rdb_exceptions(); + if (serv_uplink) + anope_cmd_pong(ServerName, ServerName); } #endif waiting = -20; diff --git a/src/memoserv.c b/src/memoserv.c index f23324149..95145256f 100644 --- a/src/memoserv.c +++ b/src/memoserv.c @@ -64,8 +64,6 @@ void memoserv(User * u, char *buf) s = ""; } anope_cmd_ctcp(s_MemoServ, u->nick, "PING %s", s); - } else if (skeleton) { - notice_lang(s_MemoServ, u, SERVICE_OFFLINE, s_MemoServ); } else { if (!u->na && stricmp(cmd, "HELP") != 0) notice_lang(s_MemoServ, u, NICK_NOT_REGISTERED_HELP, diff --git a/src/messages.c b/src/messages.c index a92dde620..3176040fc 100644 --- a/src/messages.c +++ b/src/messages.c @@ -20,8 +20,7 @@ int m_nickcoll(char *user) { - if (!skeleton && !readonly) - introduce_user(user); + introduce_user(user); return MOD_CONT; } @@ -47,13 +46,10 @@ int m_kill(char *nick, char *msg) /* Recover if someone kills us. */ /* use nickIsServices() to reduce the number of lines of code - TSL */ if (nickIsServices(nick, 0)) { - if (!readonly && !skeleton) - introduce_user(nick); + introduce_user(nick); } else if (s_BotServ && (bi = findbot(nick))) { - if (!readonly && !skeleton) { - introduce_user(nick); - bot_rejoin_all(bi); - } + introduce_user(nick); + bot_rejoin_all(bi); } else { do_kill(nick, msg); } diff --git a/src/modules/demos/catserv/ircd_catserv.c b/src/modules/demos/catserv/ircd_catserv.c index ae34d6161..784dc666c 100644 --- a/src/modules/demos/catserv/ircd_catserv.c +++ b/src/modules/demos/catserv/ircd_catserv.c @@ -103,8 +103,6 @@ void catserv(User * u, char *buf) if (!(s = strtok(NULL, ""))) s = "\1"; notice(s_CatServ, u->nick, "\1PING %s", s); - } else if (skeleton) { - notice_lang(s_CatServ, u, SERVICE_OFFLINE, s_CatServ); } else { mod_run_cmd(s_CatServ, u, Catserv_cmdTable, cmd); } diff --git a/src/nickserv.c b/src/nickserv.c index abda6e10e..b10805e83 100644 --- a/src/nickserv.c +++ b/src/nickserv.c @@ -255,8 +255,6 @@ void nickserv(User * u, char *buf) s = ""; } anope_cmd_ctcp(s_NickServ, u->nick, "PING %s", s); - } else if (skeleton) { - notice_lang(s_NickServ, u, SERVICE_OFFLINE, s_NickServ); } else { mod_run_cmd(s_NickServ, u, NICKSERV, cmd); } diff --git a/src/operserv.c b/src/operserv.c index d41d2cbd2..b501dd02f 100644 --- a/src/operserv.c +++ b/src/operserv.c @@ -578,9 +578,9 @@ void os_remove_nick(NickCore * nc) int is_services_root(User * u) { if ((NSStrictPrivileges && !is_oper(u)) - || (!skeleton && !nick_identified(u))) + || (!nick_identified(u))) return 0; - if (skeleton || (u->na->nc->flags & NI_SERVICES_ROOT)) + if ((u->na->nc->flags & NI_SERVICES_ROOT)) return 1; return 0; } @@ -592,10 +592,9 @@ int is_services_root(User * u) int is_services_admin(User * u) { if ((NSStrictPrivileges && !is_oper(u)) - || (!skeleton && !nick_identified(u))) + || (!nick_identified(u))) return 0; - if (skeleton - || (u->na->nc->flags & (NI_SERVICES_ADMIN | NI_SERVICES_ROOT))) + if ((u->na->nc->flags & (NI_SERVICES_ADMIN | NI_SERVICES_ROOT))) return 1; return 0; } @@ -607,10 +606,9 @@ int is_services_admin(User * u) int is_services_oper(User * u) { if ((NSStrictPrivileges && !is_oper(u)) - || (!skeleton && !nick_identified(u))) + || (!nick_identified(u))) return 0; - if (skeleton - || (u->na->nc-> + if ((u->na->nc-> flags & (NI_SERVICES_OPER | NI_SERVICES_ADMIN | NI_SERVICES_ROOT))) return 1; @@ -455,20 +455,17 @@ int rdb_load_ns_req_dbase(void) int rdb_load_dbases(void) { - if (!skeleton) { - LOAD_DBASE(1, "NickServ", rdb_load_ns_dbase()); + LOAD_DBASE(1, "NickServ", rdb_load_ns_dbase()); - if (s_HostServ) { - LOAD_DBASE(2, "HostServ", rdb_load_hs_dbase()); - } - - if (s_BotServ) { - LOAD_DBASE(3, "BotServ", rdb_load_bs_dbase()); - } + if (s_HostServ) { + LOAD_DBASE(2, "HostServ", rdb_load_hs_dbase()); + } - LOAD_DBASE(4, "ChanServ", rdb_load_cs_dbase()); + if (s_BotServ) { + LOAD_DBASE(3, "BotServ", rdb_load_bs_dbase()); } + LOAD_DBASE(4, "ChanServ", rdb_load_cs_dbase()); LOAD_DBASE(5, "OperServ", rdb_load_os_dbase()); LOAD_DBASE(6, "News", rdb_load_news()); LOAD_DBASE(7, "Exception", rdb_load_exceptions()); |