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:
@@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user