summaryrefslogtreecommitdiff
path: root/src/helperfuncs.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-11 14:47:26 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-11 14:47:26 +0000
commit9a526c77cc57921d81f4d8617b7e42bdb72dc79c (patch)
tree9e3887ecaf3429e05446ab521fea4ca2bb5f3bc4 /src/helperfuncs.cpp
parenta40469c45404d48770ac933aee033b9b2cc34978 (diff)
Start of conversion to const refs for std::strings in module api - A LOT OF STUFF WONT WORK YET
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3654 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/helperfuncs.cpp')
-rw-r--r--src/helperfuncs.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp
index a9e3c0110..9157a7f62 100644
--- a/src/helperfuncs.cpp
+++ b/src/helperfuncs.cpp
@@ -689,7 +689,7 @@ void ChanExceptSender_NoFormat(chanrec* Ptr, userrec* user, char status, const c
}
}
-std::string& GetServerDescription(char* servername)
+std::string GetServerDescription(char* servername)
{
std::string description = "";
@@ -956,7 +956,6 @@ void WriteCommonExcept_NoFormat(userrec *u, const char* text)
void WriteOpers(char* text, ...)
{
char textbuffer[MAXBUF];
- char formatbuffer[MAXBUF];
va_list argsPtr;
if (!text)
@@ -969,8 +968,6 @@ void WriteOpers(char* text, ...)
vsnprintf(textbuffer, MAXBUF, text, argsPtr);
va_end(argsPtr);
- snprintf(formatbuffer,MAXBUF,"NOTICE %s :%s",a->nick,textbuffer);
-
for (std::vector<userrec*>::iterator i = all_opers.begin(); i != all_opers.end(); i++)
{
userrec* a = *i;
@@ -980,7 +977,7 @@ void WriteOpers(char* text, ...)
if (a->modebits & UM_SERVERNOTICE)
{
// send server notices to all with +s
- WriteServ_NoFormat(a->fd,formatbuffer);
+ WriteServ(a->fd,"NOTICE %s :%s",a->nick,textbuffer);
}
}
}
@@ -1031,7 +1028,6 @@ void ServerPrivmsgAll(char* text, ...)
void WriteMode(const char* modes, int flags, const char* text, ...)
{
char textbuffer[MAXBUF];
- char formatbuffer[MAXBUF];
int modelen;
va_list argsPtr;
@@ -1046,8 +1042,6 @@ void WriteMode(const char* modes, int flags, const char* text, ...)
va_end(argsPtr);
modelen = strlen(modes);
- snprintf(formatbuffer,MAXBUF,"NOTICE %s :%s",t->nick,textbuffer);
-
for (std::vector<userrec*>::const_iterator i = local_users.begin(); i != local_users.end(); i++)
{
userrec* t = (userrec*)(*i);
@@ -1082,7 +1076,7 @@ void WriteMode(const char* modes, int flags, const char* text, ...)
if (send_to_user)
{
- WriteServ_NoFormat(t->fd,formatbuffer);
+ WriteServ(t->fd,"NOTICE %s :%s",t->nick,textbuffer);
}
}
}