Skip to content
Permalink
Browse files

remove log_raw tag double-print

  • Loading branch information
vanosg committed Feb 12, 2020
1 parent 7a490c5 commit 592607095174690abeed47f8e0e5bf528d4239fc
Showing with 11 additions and 11 deletions.
  1. +11 −11 src/mod/server.mod/servmsg.c
@@ -1111,8 +1111,8 @@ static void server_activity(int idx, char *tagmsg, int len)
if (*tagmsg == '@') {
taglen = 0;
memset(tagdict, '\0', TOTALTAGMAX);
strncpy(tagstr, tagmsg, TOTALTAGMAX);
tagstrptr = strtok_r(tagmsg, " ", &msgptr);
tagstrptr = newsplit(&msgptr);
strncpy(tagstr, tagstrptr, TOTALTAGMAX);
tagstrptr++; /* Remove @ */
/* Split each key/value pair apart, then split the key from the value */
for (i = 0, s1 = tagstrptr; ; i++, s1 = NULL){
@@ -1149,15 +1149,15 @@ static void server_activity(int idx, char *tagmsg, int len)
code = newsplit(&msgptr);
if (raw_log && ((strcmp(code, "PRIVMSG") && strcmp(code, "NOTICE")) ||
!match_ignore(from))) {
rawlen = egg_snprintf(s, sizeof s, "[@] ");
if (tagstrptr) {
rawlen += egg_snprintf(s + rawlen, sizeof s - rawlen, "%s ", tagstr);
}
if (strcmp(from, "") == 0) {
rawlen += egg_snprintf(s + rawlen, sizeof s - rawlen, "%s ", from);
}
egg_snprintf(s + rawlen, sizeof s - rawlen, "%s %s", code, msgptr);
putlog(LOG_RAW, "*", "%s", s);
rawlen = egg_snprintf(s, sizeof s, "[@] ");
if (tagstrptr) {
rawlen += egg_snprintf(s + rawlen, sizeof s - rawlen, "%s ", tagstr);
}
if (strcmp(from, "") == 0) {
rawlen += egg_snprintf(s + rawlen, sizeof s - rawlen, "%s ", from);
}
egg_snprintf(s + rawlen, sizeof s - rawlen, "%s %s", code, msgptr);
putlog(LOG_RAW, "*", "%s", s);
}
/* Check both raw and rawt, to allow backwards compatibility with older
* scripts */

0 comments on commit 5926070

Please sign in to comment.
You can’t perform that action at this time.