From 3b3422271d77c199118296495dc0dbd86708fdfe Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 16 Dec 2005 01:20:04 +0000 Subject: Some things just cant be static... git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2501 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/helperfuncs.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/helperfuncs.cpp') diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp index 3f7e89d57..691d58509 100644 --- a/src/helperfuncs.cpp +++ b/src/helperfuncs.cpp @@ -64,16 +64,14 @@ extern chan_hash chanlist; extern command_table cmdlist; extern Module* IOHookModule; -static char textbuffer[MAXBUF]; -static char tb[MAXBUF]; - void log(int level,char *text, ...) { va_list argsPtr; struct tm * timeinfo; if (level < Config->LogLevel) return; - + char textbuffer[MAXBUF]; + char tb[MAXBUF]; timeinfo = localtime(&TIME); if (Config->log_file) @@ -136,7 +134,7 @@ void Write(int sock,char *text, ...) return; } va_list argsPtr; - + char textbuffer[MAXBUF],tb[MAXBUF]; va_start (argsPtr, text); vsnprintf(textbuffer, MAXBUF, text, argsPtr); va_end(argsPtr); @@ -170,7 +168,7 @@ void WriteServ(int sock, char* text, ...) } va_list argsPtr; va_start (argsPtr, text); - + char textbuffer[MAXBUF],tb[MAXBUF]; vsnprintf(textbuffer, MAXBUF, text, argsPtr); va_end(argsPtr); int bytes = snprintf(tb,MAXBUF,":%s %s\r\n",Config->ServerName,textbuffer); @@ -203,7 +201,7 @@ void WriteFrom(int sock, userrec *user,char* text, ...) } va_list argsPtr; va_start (argsPtr, 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); @@ -234,6 +232,7 @@ void WriteTo(userrec *source, userrec *dest,char *data, ...) } if (dest->fd == FD_MAGIC_NUMBER) return; + char textbuffer[MAXBUF],tb[MAXBUF]; va_list argsPtr; va_start (argsPtr, data); vsnprintf(textbuffer, MAXBUF, data, argsPtr); -- cgit v1.2.3