summaryrefslogtreecommitdiff
path: root/include/inspstring.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/inspstring.h')
-rw-r--r--include/inspstring.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/inspstring.h b/include/inspstring.h
index eb7b7218f..ccc77da66 100644
--- a/include/inspstring.h
+++ b/include/inspstring.h
@@ -24,6 +24,15 @@
#include "config.h"
#include <cstring>
+/** Sets ret to the formated string. last is the last parameter before ..., and format is the format in printf-style */
+#define VAFORMAT(ret, last, format) \
+ do { \
+ va_list _vaList; \
+ va_start(_vaList, last); \
+ ret = InspIRCd::Format(_vaList, format); \
+ va_end(_vaList); \
+ } while (false);
+
/** Compose a hex string from raw data.
* @param raw The raw data to compose hex from (can be NULL if rawsize is 0)
* @param rawsize The size of the raw data buffer