Skip to content

Commit

Permalink
Fix a nick-crushing bug with rx_mode
Browse files Browse the repository at this point in the history
  • Loading branch information
ec429 committed Dec 25, 2011
1 parent 8e8187e commit 9e8f70c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions irc.c
Expand Up @@ -920,7 +920,10 @@ int rx_mode(message pkt, int b)
ms[1]=0;
}
char mm[16+strlen(ms)+strlen(from)];
char *tag=mktag("=%s= ", curr->data);
char *nick=strdup(curr->data);
crush(&nick, maxnlen);
char *tag=mktag("=%s= ", nick);
free(nick);
sprintf(mm, "is now mode %s (%s)", ms, from);
add_to_buffer(b2, c_nick[1], mm, tag);
free(tag);
Expand Down Expand Up @@ -969,7 +972,10 @@ int rx_mode(message pkt, int b)
ms[1]=0;
}
char mm[16+strlen(ms)+strlen(from)];
char *tag=mktag("=%s= ", curr->data);
char *nick=strdup(curr->data);
crush(&nick, maxnlen);
char *tag=mktag("=%s= ", nick);
free(nick);
sprintf(mm, "is now mode %s (%s)", ms, from);
add_to_buffer(b2, c_nick[1], mm, tag);
free(tag);
Expand Down

0 comments on commit 9e8f70c

Please sign in to comment.