1
0
mirror of https://github.com/anope/anope.git synced 2026-07-08 11:23:13 +02:00

Made db-converter add all of the core clients when converting a 1.8 database

This commit is contained in:
Adam
2010-06-19 20:53:53 -04:00
parent 87aa70f2a9
commit 63c5fa3a44
+31
View File
@@ -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));