mirror of
https://github.com/anope/anope.git
synced 2026-07-09 14:43:13 +02:00
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
This commit is contained in:
@@ -763,7 +763,6 @@ E char *log_filename;
|
||||
E int debug;
|
||||
E int readonly;
|
||||
E int logchan;
|
||||
E int skeleton;
|
||||
E int nofork;
|
||||
E int forceload;
|
||||
E int nothird;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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")) {
|
||||
|
||||
@@ -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")) {
|
||||
|
||||
+10
-12
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
+24
-32
@@ -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,
|
||||
(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();
|
||||
if (debug)
|
||||
alog("debug: Loaded %s database (4/%d)", s_ChanServ,
|
||||
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();
|
||||
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,
|
||||
|
||||
+65
-73
@@ -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
|
||||
*/
|
||||
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 = -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();
|
||||
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);
|
||||
|
||||
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();
|
||||
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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
+4
-8
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
+6
-8
@@ -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());
|
||||
}
|
||||
|
||||
LOAD_DBASE(4, "ChanServ", rdb_load_cs_dbase());
|
||||
if (s_HostServ) {
|
||||
LOAD_DBASE(2, "HostServ", rdb_load_hs_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());
|
||||
|
||||
Reference in New Issue
Block a user