summaryrefslogtreecommitdiff
path: root/src/snomasks.cpp
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2013-05-20 11:05:05 -0700
committerAttila Molnar <attilamolnar@hush.com>2013-05-20 11:05:05 -0700
commit991a6a429bd6abc70c0eac33bcca124b0600cc0f (patch)
tree73961818b96646cfbe0a0ff945a23db04edc4823 /src/snomasks.cpp
parent3ce33ee0e6bc0b8fbe2a564a37e02d2e56510b06 (diff)
parent4e40ee49bba3f7bab05a58516e2039351fb33069 (diff)
Merge pull request #542 from ShutterQuick/inspircd+printfcleanup
Replaced all the individual vsnprintfing with a macro
Diffstat (limited to 'src/snomasks.cpp')
-rw-r--r--src/snomasks.cpp22
1 files changed, 6 insertions, 16 deletions
diff --git a/src/snomasks.cpp b/src/snomasks.cpp
index f018a0d1a..820f65e4b 100644
--- a/src/snomasks.cpp
+++ b/src/snomasks.cpp
@@ -52,26 +52,16 @@ void SnomaskManager::WriteGlobalSno(char letter, const std::string& text)
void SnomaskManager::WriteToSnoMask(char letter, const char* text, ...)
{
- char textbuffer[MAXBUF];
- va_list argsPtr;
-
- va_start(argsPtr, text);
- vsnprintf(textbuffer, MAXBUF, text, argsPtr);
- va_end(argsPtr);
-
- this->WriteToSnoMask(letter, std::string(textbuffer));
+ std::string textbuffer;
+ VAFORMAT(textbuffer, text, text);
+ this->WriteToSnoMask(letter, textbuffer);
}
void SnomaskManager::WriteGlobalSno(char letter, const char* text, ...)
{
- char textbuffer[MAXBUF];
- va_list argsPtr;
-
- va_start(argsPtr, text);
- vsnprintf(textbuffer, MAXBUF, text, argsPtr);
- va_end(argsPtr);
-
- this->WriteGlobalSno(letter, std::string(textbuffer));
+ std::string textbuffer;
+ VAFORMAT(textbuffer, text, text);
+ this->WriteGlobalSno(letter, textbuffer);
}
SnomaskManager::SnomaskManager()