From 8705de3da60bcffa11169218441f1782fb55fe86 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Wed, 26 Feb 2020 02:37:14 -0500 Subject: Use %n for tags when formatting intercepted PRIVMSG/NOTICE --- client.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/client.c b/client.c index 2405004..088691a 100644 --- a/client.c +++ b/client.c @@ -227,20 +227,16 @@ static void handleQuit(struct Client *client, struct Message *msg) { static void handlePrivmsg(struct Client *client, struct Message *msg) { if (!msg->params[0] || !msg->params[1]) return; + + int origin; char line[MessageCap]; - if (msg->tags) { - snprintf( - line, sizeof(line), "@%s :%s %s %s :%s", - msg->tags, stateEcho(), msg->cmd, msg->params[0], msg->params[1] - ); - } else { - snprintf( - line, sizeof(line), ":%s %s %s :%s", - stateEcho(), msg->cmd, msg->params[0], msg->params[1] - ); - } + snprintf( + line, sizeof(line), "@%s %n:%s %s %s :%s", + (msg->tags ? msg->tags : ""), &origin, + stateEcho(), msg->cmd, msg->params[0], msg->params[1] + ); size_t diff = ringDiff(client->consumer); - ringProduce(line); + ringProduce((msg->tags ? line : &line[origin])); if (!diff) ringConsume(NULL, client->consumer); if (!strcmp(msg->params[0], stateNick())) return; -- cgit 1.4.1 f/.gitignore?id=ab9dd9d87c57ffe7521d89593d548fe30f00f125&follow=1'>commit diff
path: root/etc/psf/.gitignore (unfollow)
Commit message (Collapse)Author
2018-10-03Fill E0 through FE of sans6x10June McEnroe
2018-10-03Fill 03 through 1F of sans6x10June McEnroe
2018-10-03Fix ¼ glyph of sans6x8June McEnroe
2018-10-03Fill A6 through AF of sans6x10June McEnroe
2018-10-02Rewrite schemeJune McEnroe
2018-10-02Allow setting colors in psf2pngJune McEnroe
2018-09-30Add some '80s music notesJune McEnroe
2018-09-30Fix case of ASCII constants in psfedJune McEnroe
2018-09-29Squish Ñ in sans6x10 consistentlyJune McEnroe
2018-09-29Add -c and -s to psf2pngJune McEnroe
2018-09-29Add box drawing glyphs to sans6x10June McEnroe
2018-09-29Tweak sans6x8 shading blocksJune McEnroe
2018-09-29Fill 7F through A5 of sans6x10June McEnroe
2018-09-29Add f and ' to psfedJune McEnroe
2018-09-28Add sans6x10 basic glyphsJune McEnroe
2018-09-28Make sans6x8 double quote narrowerJune McEnroe
2018-09-28Add greek glyphs to sans6x8June McEnroe
2018-09-28Add png target in etc/psfJune McEnroe
2018-09-28Disable visual bell in light terminal profileJune McEnroe
2018-09-28Add psf2pngJune McEnroe
2018-09-27Add HJKL for moving glyphs to psfedJune McEnroe
2018-09-27Move psfed paste to edit modeJune McEnroe
2018-09-27Export PWDJune McEnroe
Without it, $(PWD) is unset in GNU make.
2018-09-27Add sans6x8 PSF2 fontJune McEnroe
2018-09-26Add copy paste to psfedJune McEnroe
2018-09-25Add r to psfed for invertJune McEnroe
2018-09-24Add psfed, a PSF2 font editorJune McEnroe
2018-09-21Add scheme -i to swap white and blackJune McEnroe
2018-09-21Map caps lock to escape on Linux consoleJune McEnroe
2018-09-19Fix README mandoc lintsJune McEnroe
2018-09-19Un-NOT trans.alpha values in pngoJune McEnroe
2018-09-18Refactor reads in pngo and clear palette between filesJune McEnroe
2018-09-17Add tRNS support to pngoJune McEnroe
2018-09-11Move gfx man pages to gfx/manJune McEnroe
2018-09-11Move bin man pages to bin/manJune McEnroe
2018-09-11Rewrite gfx.7 and render plaintext READMEJune McEnroe
2018-09-11Remove GAMES from BINSJune McEnroe
2018-09-11Rewrite bin.7 and render to plaintext READMEJune McEnroe
2018-09-11Add "blank" lines to man pagesJune McEnroe
2018-09-10Add mdoc syntax fileJune McEnroe
2018-09-08Fix Nm usage in multi-name man pagesJune McEnroe
2018-09-08Put real dates on man pagesJune McEnroe
2018-09-08Replace gfx README with REAMDE.7June McEnroe
2018-09-08Link gfx man pages in ~/.localJune McEnroe