summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorom <om@e03df62e-2008-0410-955e-edbf42e46eb7>2006-04-04 06:43:26 +0000
committerom <om@e03df62e-2008-0410-955e-edbf42e46eb7>2006-04-04 06:43:26 +0000
commit0a067563630ae108d2cca747e69adf2ead1788be (patch)
tree6a439660b9c589b13a6bb1e36b60bfdab04aca80
parentea27cd70c98339c68eb99d1fa6d9dec46d02a234 (diff)
Add WriteOpers_NoFormat, now to remember what I wanted it for
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3824 e03df62e-2008-0410-955e-edbf42e46eb7
-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);
}
}
}