Skip to content
Permalink
Browse files

stop msg-tag from breaking normal binds

  • Loading branch information
vanosg committed Nov 4, 2019
1 parent 224328f commit b5c4c33004c5a53be6a8d0a81e737010e0662134
Showing with 11 additions and 11 deletions.
  1. +1 −1 src/mod/server.mod/server.c
  2. +10 −10 src/mod/server.mod/servmsg.c
@@ -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;
}

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

@@ -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;

@@ -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);
@@ -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 {

0 comments on commit b5c4c33

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