Skip to content

Commit

Permalink
stop msg-tag from breaking normal binds
Browse files Browse the repository at this point in the history
  • Loading branch information
vanosg committed Feb 8, 2020
1 parent 224328f commit b5c4c33
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/mod/server.mod/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -1279,7 +1279,7 @@ static int server_raw STDVAR
BADARGS(4, 4, " from code args");

CHECKVALIDITY(server_raw);
Tcl_AppendResult(irp, int_to_base10(F(argv[1], argv[3])), NULL);
Tcl_AppendResult(irp, int_to_base10(F(argv[1], argv[3], "")), NULL);
return TCL_OK;
}

Expand Down
20 changes: 10 additions & 10 deletions src/mod/server.mod/servmsg.c
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ static int detect_flood(char *floodnick, char *floodhost, char *from, int which)

/* Got a private message.
*/
static int gotmsg(char *from, char *msg)
static int gotmsg(char *from, char *msg, char *tag)
{
char *to, buf[UHOSTLEN], *nick, ctcpbuf[512], *uhost = buf, *ctcp,
*p, *p1, *code;
Expand Down Expand Up @@ -723,12 +723,12 @@ static int gotnotice(char *from, char *msg)
static int gottagmsg(char *from, char *msg) {
char *nick;
fixcolon(msg);
if (strchr(from, '!')) {
nick = splitnick(&from);
putlog(LOG_SERV, "*", "[#]%s(%s)[#] %s", nick, from, msg);
} else {
putlog(LOG_SERV, "*", "[#]%s[#] %s");
}
if (strchr(from, '!')) {
nick = splitnick(&from);
putlog(LOG_SERV, "*", "[#]%s(%s)[#] %s", nick, from, msg);
} else {
putlog(LOG_SERV, "*", "[#]%s[#] %s");
}
return 0;
}

Expand Down Expand Up @@ -1083,7 +1083,7 @@ static struct dcc_table SERVER_SOCKET = {

static void server_activity(int idx, char *msg, int len)
{
char *from, *code, *tag = 0;
char *from, *code, *tag = NULL;
char s[TAGMAX];
int rawlen;

Expand Down Expand Up @@ -1122,7 +1122,7 @@ static void server_activity(int idx, char *msg, int len)
if (tag) {
rawlen += egg_snprintf(s + rawlen, sizeof s - rawlen, "%s ", tag);
}
if (strcmp(from, "")) {
if (strcmp(from, "") == 0) {
rawlen += egg_snprintf(s + rawlen, sizeof s - rawlen, "%s ", from);
}
egg_snprintf(s + rawlen, sizeof s - rawlen, "%s %s", code, msg);
Expand Down Expand Up @@ -1430,7 +1430,7 @@ void add_cape(char *cape) {
if (!strstr(cap.negotiated, cape)) {
putlog(LOG_DEBUG, "*", "CAP: Adding cape %s to negotiated list", cape);
Tcl_ListObjAppendElement(interp, ncapeslist, Tcl_NewStringObj(cape, -1));
if (!strcmp(cape, "message-tags")) {
if (!strcmp(cape, "message-tags") || !strcmp(cape, "twitch.tv/tags")) {
msgtag = 1;
}
} else {
Expand Down

0 comments on commit b5c4c33

Please sign in to comment.