Symptom
The +userinfo value column does not line up. It jumps between two positions, and the Sent: / Received: pair sits offset from the block above it:
Nick: [HUBOWNER]Aybo
Version: AirDC++ 4.30 <- value pushed further right than the lines above
SID: RXVV
...
Sent: 686 B <- these two land in a different column
Received: 41.68 KB
Cosmetic only, no functional impact. Pre-existing since cmd_userinfo v0.14 ("using tabs for cleaner look"); not introduced by the #447 dead-code sweep, which only removed the unused msg_denied local from this plugin.
Root cause
The line is assembled from two places:
Tabs snap to 8-column stops, so with a fixed tab count the value column depends on label length: a short label like SID: lands the value at column 16, but Version: (10 chars) pushes it to column 24. That is the raggedness.
Second, separate defect: Sent: and Received: are prepended with a single "\t" (:239-240) while every other field uses "\t\t". That is why those two lines are visibly offset from the block above. This half is a trivial fix on its own.
Why it is not a one-liner: the labels are translated
Tabs were originally chosen precisely because the labels are in the lang file and differ per language. The German file translates some labels and not others - Gesendet: (9) / Empfangen: (10) vs English Sent: (5) / Received: (9), while Nick: / Share: / Version: stay English (scripts/lang/cmd_userinfo.lang.de). So the column math is different in each language, and any fix has to be done per language and touch .en + .de together (guarded by plugin_lang_test.lua).
Fix options
- Space-pad each label to a fixed width and drop the leading tabs. Deterministic regardless of the client's tab-stop width (DC++ / AirDC++ / NMDC bridges all render tabs differently). Downside: the pad width is per-language and has to be maintained if a label is retranslated.
- Keep tabs but make the count clear the longest label in each language, and normalize the trailing spaces. Less churn, but still depends on the client rendering an 8-column tab stop, so alignment is not guaranteed across clients.
Recommend (1): space-padding in a monospace chat is the only client-independent alignment. The Sent/Received single-tab normalization rides along in the same PR. scriptversion bump on the fix (behaviour-neutral, but user-visible output changes).
Not in scope
Whether Sent/Received map to the right rstat/sstat is a separate question and not asserted here.
Symptom
The
+userinfovalue column does not line up. It jumps between two positions, and theSent:/Received:pair sits offset from the block above it:Cosmetic only, no functional impact. Pre-existing since cmd_userinfo v0.14 ("using tabs for cleaner look"); not introduced by the #447 dead-code sweep, which only removed the unused
msg_deniedlocal from this plugin.Root cause
The line is assembled from two places:
Nick:(1 space),Desc:(2),Version:(2),SU:(1), ... (scripts/lang/cmd_userinfo.lang.en:19-44)."\t\t"prepended in code (scripts/cmd_userinfo.lua:218-241).Tabs snap to 8-column stops, so with a fixed tab count the value column depends on label length: a short label like
SID:lands the value at column 16, butVersion:(10 chars) pushes it to column 24. That is the raggedness.Second, separate defect:
Sent:andReceived:are prepended with a single"\t"(:239-240) while every other field uses"\t\t". That is why those two lines are visibly offset from the block above. This half is a trivial fix on its own.Why it is not a one-liner: the labels are translated
Tabs were originally chosen precisely because the labels are in the lang file and differ per language. The German file translates some labels and not others -
Gesendet:(9) /Empfangen:(10) vs EnglishSent:(5) /Received:(9), whileNick:/Share:/Version:stay English (scripts/lang/cmd_userinfo.lang.de). So the column math is different in each language, and any fix has to be done per language and touch.en+.detogether (guarded byplugin_lang_test.lua).Fix options
Recommend (1): space-padding in a monospace chat is the only client-independent alignment. The
Sent/Receivedsingle-tab normalization rides along in the same PR.scriptversionbump on the fix (behaviour-neutral, but user-visible output changes).Not in scope
Whether
Sent/Receivedmap to the rightrstat/sstatis a separate question and not asserted here.