summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changes4
-rw-r--r--src/datafiles.c34
-rw-r--r--src/rdb.c2
-rw-r--r--version.log6
4 files changed, 35 insertions, 11 deletions
diff --git a/Changes b/Changes
index c722fe039..cde6e6d02 100644
--- a/Changes
+++ b/Changes
@@ -28,6 +28,10 @@ Provided by Jan Milants <jan_renee@msn.com> - 2007
Provided by Jilles Tjoelker <jilles+anope@stack.nl> - 2007
04/21 F Various Charybdis and TS6 related fixes. [#707]
+06/04 F prenick database was not backed up [#713]
+06/04 F Typo in SQL query in rdb.c [#719]
+06/04 F remove_backups() did not check that s_Bot/HostServ != NULL [ #00]
+
Anope Version 1.7.18
--------------------
12/09 A Ability to see if AutoOp is enabled in NickServ INFO displays. [#621]
diff --git a/src/datafiles.c b/src/datafiles.c
index b49780687..b42566848 100644
--- a/src/datafiles.c
+++ b/src/datafiles.c
@@ -619,12 +619,6 @@ static void remove_backups(void)
#else
DeleteFile(path);
#endif
- snprintf(path, sizeof(path), "backups/%s.%s", BotDBName, ext);
-#ifndef _WIN32
- unlink(path);
-#else
- DeleteFile(path);
-#endif
snprintf(path, sizeof(path), "backups/%s.%s", ChanDBName, ext);
#ifndef _WIN32
unlink(path);
@@ -649,12 +643,31 @@ static void remove_backups(void)
#else
DeleteFile(path);
#endif
- snprintf(path, sizeof(path), "backups/%s.%s", HostDBName, ext);
+
+ if (s_BotServ) {
+ snprintf(path, sizeof(path), "backups/%s.%s", BotDBName, ext);
#ifndef _WIN32
- unlink(path);
+ unlink(path);
#else
- DeleteFile(path);
+ DeleteFile(path);
+#endif
+ }
+ if (s_HostServ) {
+ snprintf(path, sizeof(path), "backups/%s.%s", HostDBName, ext);
+#ifndef _WIN32
+ unlink(path);
+#else
+ DeleteFile(path);
#endif
+ }
+ if (NSEmailReg) {
+ snprintf(path, sizeof(path), "backups/%s.%s", PreNickDBName, ext);
+#ifndef _WIN32
+ unlink(path);
+#else
+ DeleteFile(path);
+#endif
+ }
}
/*************************************************************************/
@@ -703,6 +716,9 @@ void backup_databases(void)
if (s_HostServ) {
rename_database(HostDBName, ext);
}
+ if (NSEmailReg) {
+ rename_database(PreNickDBName, ext);
+ }
}
rename_database(OperDBName, ext);
diff --git a/src/rdb.c b/src/rdb.c
index ad399ddb2..8bbaeb601 100644
--- a/src/rdb.c
+++ b/src/rdb.c
@@ -231,7 +231,7 @@ int rdb_ns_set_display(char *newnick, char *oldnick)
if (ret)
ret =
db_mysql_try
- ("UPDATE anope_na_access SET display='%s' WHERE display='%s'",
+ ("UPDATE anope_ns_access SET display='%s' WHERE display='%s'",
q_newnick, q_oldnick);
/* No need to update anope_cs_info here as it is updated when we
diff --git a/version.log b/version.log
index e3b2ac1d4..8b25347d5 100644
--- a/version.log
+++ b/version.log
@@ -9,10 +9,14 @@ VERSION_MAJOR="1"
VERSION_MINOR="7"
VERSION_PATCH="18"
VERSION_EXTRA="-svn"
-VERSION_BUILD="1243"
+VERSION_BUILD="1244"
# $Log$
#
+# BUILD : 1.7.18 (1244)
+# BUGS : 713 719
+# NOTES : Corrected typo in rdb.c, added code in backup_databases() and remove_backups() to backup the prenick db, and added checks in remove_backups() for s_BotServ and s_HostServ being NULL
+#
# BUILD : 1.7.18 (1243)
# BUGS :
# NOTES : Fixed a typo in example.conf