mirror of
https://github.com/anope/anope.git
synced 2026-07-09 06:03:14 +02:00
Trap empty idents from older Anope mysql UseRDB imports, and don't allow them to be set.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1933 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
+13
-2
@@ -403,12 +403,23 @@ void load_hs_dbase(dbFILE * f)
|
||||
SAFE(read_string(&vHost, f));
|
||||
SAFE(read_string(&creator, f));
|
||||
SAFE(read_int32(&time, f));
|
||||
|
||||
// Older Anope could save an empty vident when importing from MySQL, so trap that here.
|
||||
if (!strcmp(vIdent, ""))
|
||||
{
|
||||
delete [] vIdent;
|
||||
vIdent = NULL;
|
||||
}
|
||||
|
||||
addHostCore(nick, vIdent, vHost, creator, time); /* could get a speed increase by not searching the list */
|
||||
delete [] nick; /* as we know the db is in alphabetical order... */
|
||||
delete [] vHost;
|
||||
delete [] creator;
|
||||
delete [] vIdent;
|
||||
} else {
|
||||
if (vIdent)
|
||||
delete [] vIdent;
|
||||
}
|
||||
else
|
||||
{
|
||||
fatal("Invalid format in %s %d", HostDBName, c);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user