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

fixed a crashbug in os_ignore on db saving and cleaned up the db code in hs_request

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2739 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
DukePyrolator
2010-01-09 06:54:11 +00:00
parent 0761d4f74b
commit a4b015b39d
2 changed files with 6 additions and 15 deletions
+3 -4
View File
@@ -195,10 +195,9 @@ class OSIgnore : public Module
}
else
{
std::string buf = "OS IGNORE ";
buf += ign->mask;
buf += " " + ign->time;
Write(buf);
std::stringstream buf;
buf << "OS IGNORE " << ign->mask << " " << ign->time;
Write(buf.str());
}
}
}
+3 -11
View File
@@ -714,17 +714,9 @@ class HSRequest : public Module
for (std::map<std::string, HostRequest *>::iterator it = Requests.begin(); it != Requests.end(); ++it)
{
HostRequest *hr = it->second;
std::string buf = "HS_REQUEST ";
buf += it->first;
buf += " ";
buf += hr->ident.empty() ? "(null)" : hr->ident;
buf += " ";
buf += hr->host;
buf += " ";
char tsbuf[16];
snprintf(tsbuf, sizeof(tsbuf), "%ld", hr->time);
buf += tsbuf;
Write(buf);
std::stringstream buf;
buf << "HS_REQUEST " << it->first << " " << (hr->ident.empty() ? "(null)" : hr->ident) << " " << hr->host << " " << hr->time;
Write(buf.str());
}
}
};