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); }
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)); }
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); }
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); }
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); }
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); }