summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-30 00:48:43 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-30 00:48:43 +0000
commit760e6d30174964085ce2b92ecd1b5a7b7080c555 (patch)
tree8a94da34cd5eb5b3a0ececee95f658071b8fcdc3
parent49fa6bdca1d26fb7ed94c2dddb99e8591672eab4 (diff)
Optimized out some more redundant va_args voodoo
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2706 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/inspircd.cpp2
-rw-r--r--src/inspircd_io.cpp2
-rw-r--r--src/modules.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index ed1c8fda8..730e7fea0 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -337,7 +337,7 @@ bool InspIRCd::LoadModule(const char* filename)
{
char modfile[MAXBUF];
#ifdef STATIC_LINK
- snprintf(modfile,MAXBUF,"%s",filename);
+ strlcpy(modfile,filename,MAXBUF);
#else
snprintf(modfile,MAXBUF,"%s/%s",Config->ModPath,filename);
#endif
diff --git a/src/inspircd_io.cpp b/src/inspircd_io.cpp
index dd5b14692..42ae122e8 100644
--- a/src/inspircd_io.cpp
+++ b/src/inspircd_io.cpp
@@ -677,7 +677,7 @@ bool ServerConfig::LoadConf(const char* filename, std::stringstream *target, std
}
snprintf(newconf,10240,"%s/%s",confpath,buf);
}
- else snprintf(newconf,10240,"%s",buf);
+ else strlcpy(newconf,buf,10240);
std::stringstream merge(stringstream::in | stringstream::out);
// recursively call LoadConf and get the new data, use the same errorstream
if (LoadConf(newconf, &merge, errorstream))
diff --git a/src/modules.cpp b/src/modules.cpp
index 87df6bdfc..d76f20f5f 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -454,7 +454,7 @@ void Server::SendTo(userrec* Source, userrec* Dest, std::string s)
void Server::SendChannelServerNotice(std::string ServName, chanrec* Channel, std::string text)
{
- WriteChannelWithServ((char*)ServName.c_str(), Channel, "%s", text.c_str());
+ WriteChannelWithServ_NoFormat((char*)ServName.c_str(), Channel, text.c_str());
}
void Server::SendChannel(userrec* User, chanrec* Channel, std::string s,bool IncludeSender)