Esempio n. 1
0
void gprintf(const char *fmt,...)
{
   char s[BUFFER_SIZE];
   va_list marker;

   sprintf(s,"%s | ",TimeStr(GetTime()));

   va_start(marker,fmt);
   vsprintf(s+strlen(s),fmt,marker);
   va_end(marker);

   char *excludedword1 = "account";
   char *excludedword2 = "ACCOUNT";
   char *excludedword3 = "email";

   if (strstr(s, excludedword1) != NULL
      || strstr(s, excludedword2) != NULL
      || strstr(s, excludedword3) != NULL)
   {
	   sprintf(s, "%s | Line excluded due to personal information.", TimeStr(GetTime()));
   }

   if (s[strlen(s)-1] != '\n')
      strcat(s,"\r\n");

   WriteStrChannel(CHANNEL_G,s);
}
Esempio n. 2
0
void aprintf(const char *fmt, ...)
{
   char s[BUFFER_SIZE];
   va_list marker;

   va_start(marker, fmt);
   vsnprintf(s, sizeof(s), fmt, marker);
   va_end(marker);

   WriteStrChannel(CHANNEL_A, s);
   AdminBufferSend(s, strlen(s));
}
Esempio n. 3
0
void eprintf(const char *fmt,...)
{
   char s[BUFFER_SIZE];
   va_list marker;

   sprintf(s,"%s | ",TimeStr(GetTime()));

   va_start(marker,fmt);
   vsprintf(s+strlen(s),fmt,marker);
   va_end(marker);

   WriteStrChannel(CHANNEL_E,s);
}
Esempio n. 4
0
void eprintf(const char *fmt,...)
{
   char s[2000];
   va_list marker;

   sprintf(s,"%s | ",TimeStr(GetTime()));

   va_start(marker,fmt);
   vsprintf(s+strlen(s),fmt,marker);
   va_end(marker);

   TermConvertBuffer(s,sizeof(s)); /* makes \n's into CR/LF pairs */

   WriteStrChannel(CHANNEL_E,s);
}
Esempio n. 5
0
void dprintf(const char *fmt,...)
{
   char s[BUFFER_SIZE];
   va_list marker;

   sprintf(s,"%s|",TimeStr(GetTime()));

   va_start(marker,fmt);
   vsprintf(s+strlen(s),fmt,marker);
   va_end(marker);

   if (s[strlen(s)-1] != '\n')
      strcat(s,"\r\n");

   WriteStrChannel(CHANNEL_D,s);
}
Esempio n. 6
0
void lprintf(const char *fmt,...)
{
   char s[1000];
   va_list marker;

   sprintf(s,"%s | ",TimeStr(GetTime()));

   va_start(marker,fmt);
   vsprintf(s+strlen(s),fmt,marker);
   va_end(marker);

   TermConvertBuffer(s,sizeof(s)); /* makes \n's into CR/LF pairs */
   if (s[strlen(s)-1] != '\n')
      strcat(s,"\r\n");

   WriteStrChannel(CHANNEL_L,s);
}