0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-27 07:54:05 +01:00

msgbuf: handle me.name properly

This commit is contained in:
William Pitcock 2016-02-20 11:23:44 -06:00
parent 4a13e3f1da
commit 691adddd0e

View file

@ -22,6 +22,8 @@
#include "stdinc.h" #include "stdinc.h"
#include "ircd_defs.h" #include "ircd_defs.h"
#include "msgbuf.h" #include "msgbuf.h"
#include "client.h"
#include "ircd.h"
/* /*
* parse a message into a MsgBuf. * parse a message into a MsgBuf.
@ -150,8 +152,7 @@ msgbuf_unparse_prefix(char *buf, size_t buflen, struct MsgBuf *msgbuf, unsigned
if (msgbuf->n_tags > 0) if (msgbuf->n_tags > 0)
msgbuf_unparse_tags(buf, buflen, msgbuf, capmask); msgbuf_unparse_tags(buf, buflen, msgbuf, capmask);
if (msgbuf->origin) rb_snprintf_append(buf, buflen, ":%s ", msgbuf->origin != NULL ? msgbuf->origin : me.name);
rb_snprintf_append(buf, buflen, ":%s ", msgbuf->origin);
} }
/* /*