summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/helperfuncs.h7
-rw-r--r--src/helperfuncs.cpp13
2 files changed, 16 insertions, 4 deletions
diff --git a/include/helperfuncs.h b/include/helperfuncs.h
index 3eeed21b6..ee434fd08 100644
--- a/include/helperfuncs.h
+++ b/include/helperfuncs.h
@@ -38,6 +38,9 @@ void WriteChannel(chanrec* Ptr, userrec* user, char* text, ...);
void WriteChannelLocal(chanrec* Ptr, userrec* user, char* text, ...);
void WriteChannelWithServ(char* ServName, chanrec* Ptr, char* text, ...);
void ChanExceptSender(chanrec* Ptr, userrec* user, char status, char* text, ...);
+void WriteCommon(userrec *u, char* text, ...);
+void WriteCommonExcept(userrec *u, char* text, ...);
+void WriteOpers(const char* text, ...);
void Write_NoFormat(int sock,const char *text);
void WriteServ_NoFormat(int sock, const char* text);
@@ -49,11 +52,9 @@ void WriteChannelWithServ_NoFormat(char* ServName, chanrec* Ptr, const char* tex
void ChanExceptSender_NoFormat(chanrec* Ptr, userrec* user, char status, const char* text);
void WriteCommon_NoFormat(userrec *u, const char* text);
void WriteCommonExcept_NoFormat(userrec *u, const char* text);
+void WriteOpers_NoFormat(const char* text);
std::string GetServerDescription(char* servername);
-void WriteCommon(userrec *u, char* text, ...);
-void WriteCommonExcept(userrec *u, char* text, ...);
-void WriteOpers(const char* text, ...);
void WriteMode(const char* modes, int flags, const char* text, ...);
void NoticeAll(userrec *source, bool local_only, char* text, ...);
void ServerNoticeAll(char* text, ...);
diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp
index 830e1ef2d..9f184e868 100644
--- a/src/helperfuncs.cpp
+++ b/src/helperfuncs.cpp
@@ -970,6 +970,17 @@ void WriteOpers(const char* text, ...)
vsnprintf(textbuffer, MAXBUF, text, argsPtr);
va_end(argsPtr);
+ WriteOpers_NoFormat(textbuffer);
+}
+
+void WriteOpers_NoFormat(const char* text)
+{
+ if (!text)
+ {
+ log(DEFAULT,"*** BUG *** WriteOpers_NoFormat was given an invalid parameter");
+ return;
+ }
+
for (std::vector<userrec*>::iterator i = all_opers.begin(); i != all_opers.end(); i++)
{
userrec* a = *i;
@@ -979,7 +990,7 @@ void WriteOpers(const char* text, ...)
if (a->modebits & UM_SERVERNOTICE)
{
// send server notices to all with +s
- WriteServ(a->fd,"NOTICE %s :%s",a->nick,textbuffer);
+ WriteServ(a->fd,"NOTICE %s :%s",a->nick,text);
}
}
}