mirror of
https://github.com/matrix-construct/construct
synced 2024-12-28 16:34:13 +01:00
extensions/m_roleplay: Properly transmit source name.
This commit is contained in:
parent
2c0450fb60
commit
e03fc000a2
1 changed files with 8 additions and 5 deletions
|
@ -139,6 +139,7 @@ m_displaymsg(struct Client *source_p, const char *channel, int underline, int ac
|
|||
struct membership *msptr;
|
||||
char nick2[NICKLEN+1];
|
||||
char *nick3 = rb_strdup(nick);
|
||||
char text3[BUFSIZE];
|
||||
char text2[BUFSIZE];
|
||||
|
||||
if(!IsFloodDone(source_p))
|
||||
|
@ -195,12 +196,14 @@ m_displaymsg(struct Client *source_p, const char *channel, int underline, int ac
|
|||
return 0;
|
||||
}
|
||||
|
||||
if(action)
|
||||
rb_snprintf(text2, sizeof(text2), "\1ACTION %s\1", text);
|
||||
else
|
||||
rb_snprintf(text2, sizeof(text2), "%s", text);
|
||||
rb_snprintf(text3, sizeof(text3), "%s (%s)", text, source_p->name);
|
||||
|
||||
sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@npc.fakeuser.invalid PRIVMSG %s :%s (%s)", nick2, source_p->name, channel, text2, source_p->name);
|
||||
if(action)
|
||||
rb_snprintf(text2, sizeof(text2), "\1ACTION %s\1", text3);
|
||||
else
|
||||
rb_snprintf(text2, sizeof(text2), "%s", text3);
|
||||
|
||||
sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@npc.fakeuser.invalid PRIVMSG %s :%s", nick2, source_p->name, channel, text2);
|
||||
sendto_match_servs(source_p, "*", CAP_ENCAP, NOCAPS, "ENCAP * ROLEPLAY %s %s :%s",
|
||||
channel, nick2, text2);
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue