summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-06-19 20:53:53 -0400
committerAdam <Adam@anope.org>2010-06-20 19:41:50 -0400
commit63c5fa3a44dfc7d66495deb1d7c5002885030315 (patch)
treea6bec0afcb16f40778ef4790c91ee030a4e7934a
parent87aa70f2a9313adf40137bb91c43912e0d989be4 (diff)
Made db-converter add all of the core clients when converting a 1.8 database
-rw-r--r--src/tools/db-convert.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/tools/db-convert.c b/src/tools/db-convert.c
index 1bb8f5681..b7df080a8 100644
--- a/src/tools/db-convert.c
+++ b/src/tools/db-convert.c
@@ -497,6 +497,37 @@ int main(int argc, char *argv[])
}
if (input == "y")
broken = 1;
+ input = "";
+ while (input != "y" && input != "n")
+ {
+ std::cout << std::endl << "Are you converting a 1.8.x database? (y/n) " << std::endl << "? ";
+ std::cin >> input;
+ }
+ /* 1.8 doesn't have nickserv etc in bot.db, create them */
+ if (input == "y")
+ {
+ time_t now = time(NULL);
+ fs << "BI NickServ NickServ services.anope.org " << now << " 0 :NickServ" << std::endl;
+ fs << "MD FLAGS NICKSERV" << std::endl;
+
+ fs << "BI ChanServ ChanServ services.anope.org " << now << " 0 :ChanServ" << std::endl;
+ fs << "MD FLAGS CHANSERV" << std::endl;
+
+ fs << "BI BotServ BotServ services.anope.org " << now << " 0 :BotServ" << std::endl;
+ fs << "MD FLAGS BOTSERV" << std::endl;
+
+ fs << "BI HostServ HostServ services.anope.org " << now << " 0 :HostServ" << std::endl;
+ fs << "MD FLAGS HOSTSERV" << std::endl;
+
+ fs << "BI OperServ OperServ services.anope.org " << now << " 0 :OperServ" << std::endl;
+ fs << "MD FLAGS OPERSERV" << std::endl;
+
+ fs << "BI MemoServ MemoServ services.anope.org " << now << " 0 :MemoServ" << std::endl;
+ fs << "MD FLAGS MEMOSERV" << std::endl;
+
+ fs << "BI Global Global services.anope.org " << now << " 0: Global" << std::endl;
+ fs << "MD FLAGS GLOBAL" << std::endl;
+ }
while ((c = getc_db(f)) == 1) {
READ(read_string(&nick, f));