summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-01-31 21:27:03 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-01-31 21:27:03 +0000
commit69fffba1faaaae5dd253174780b0a7ca20836e62 (patch)
tree074a37f3293d5ae21ef56948680353f276bdcad5 /src
parent94d1d02c4c43ad3a77529cfef15a18a576a4d0f2 (diff)
Optimized WriteServ - why use %s!%s@%s when we have the more optimal userrec::GetFullHost() ?
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2997 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/helperfuncs.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp
index 2923041fc..d76c708b2 100644
--- a/src/helperfuncs.cpp
+++ b/src/helperfuncs.cpp
@@ -237,7 +237,7 @@ void WriteFrom_NoFormat(int sock, userrec *user, const char* text)
if ((sock < 0) || (!text) || (!user))
return;
char tb[MAXBUF];
- int bytes = snprintf(tb,MAXBUF,":%s!%s@%s %s\r\n",user->nick,user->ident,user->dhost,text);
+ int bytes = snprintf(tb,MAXBUF,":%s %s\r\n",user->GetFullHost(),text);
chop(tb);
if (fd_ref_table[sock])
{
@@ -270,7 +270,7 @@ void WriteFrom(int sock, userrec *user,char* text, ...)
char textbuffer[MAXBUF],tb[MAXBUF];
vsnprintf(textbuffer, MAXBUF, text, argsPtr);
va_end(argsPtr);
- int bytes = snprintf(tb,MAXBUF,":%s!%s@%s %s\r\n",user->nick,user->ident,user->dhost,textbuffer);
+ int bytes = snprintf(tb,MAXBUF,":%s %s\r\n",user->GetFullHost(),textbuffer);
chop(tb);
if (fd_ref_table[sock])
{
@@ -308,7 +308,7 @@ void WriteTo(userrec *source, userrec *dest,char *data, ...)
// if no source given send it from the server.
if (!source)
{
- WriteServ(dest->fd,":%s %s",Config->ServerName,textbuffer);
+ WriteServ_NoFormat(dest->fd,textbuffer);
}
else
{
@@ -322,7 +322,7 @@ void WriteTo_NoFormat(userrec *source, userrec *dest, const char *data)
return;
if (!source)
{
- WriteServ(dest->fd,":%s %s",Config->ServerName,data);
+ WriteServ_NoFormat(dest->fd,data);
}
else
{