summaryrefslogtreecommitdiff
path: root/src/modules/hs_request.c
diff options
context:
space:
mode:
authorDukePyrolator <DukePyrolator@5417fbe8-f217-4b02-8779-1006273d7864>2010-01-09 06:54:11 +0000
committerDukePyrolator <DukePyrolator@5417fbe8-f217-4b02-8779-1006273d7864>2010-01-09 06:54:11 +0000
commita4b015b39d0e232121e060466a979277f0f28ce2 (patch)
tree1b4c53b24865ac9bcd64ccd64d82ba47ff611e86 /src/modules/hs_request.c
parent0761d4f74bc47191e9dde4591cc3a8a46878b4d0 (diff)
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
Diffstat (limited to 'src/modules/hs_request.c')
-rw-r--r--src/modules/hs_request.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/modules/hs_request.c b/src/modules/hs_request.c
index 70be073ec..3973f6006 100644
--- a/src/modules/hs_request.c
+++ b/src/modules/hs_request.c
@@ -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());
}
}
};