Fix erroric console output [$5 awarded] #153

Closed
opened 2026-10-05 04:01:32 +02:00 by adam · 3 comments
Owner

The "[ !! ]" overwrites part of error message.

The $5 bounty on this issue has been claimed at Bountysource.

The "[ !! ]" overwrites part of error message. ## <bountysource-plugin> The **[$5 bounty](https://www.bountysource.com/issues/638-fix-erroric-console-output?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github)** on this issue has been claimed at [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github). </bountysource-plugin> <!-- github-sync-id:7133372 -->
adam closed this issue 2026-10-05 04:01:32 +02:00
Author
Owner

A few examples when current behavior is broken:

[ ?? ] Listen Host (Blank for all ips): ::1
[    ] Verifying the listener... [2013-12-30 22:40:38.867839]  == SockError(Cannot assign requested address, Cannot assign requested address)
[ !! ]le to bind [Invalid argument] ]
[    ] Loading global module [abcdefghijklmnopqrstuvwxyz0123456789]... [ Unable to find module [abcdefghijklmnopq
[ !! ]xyz0123456789] ]
A few examples when current behavior is broken: ``` [ ?? ] Listen Host (Blank for all ips): ::1 [ ] Verifying the listener... [2013-12-30 22:40:38.867839] == SockError(Cannot assign requested address, Cannot assign requested address) [ !! ]le to bind [Invalid argument] ] ``` ``` [ ] Loading global module [abcdefghijklmnopqrstuvwxyz0123456789]... [ Unable to find module [abcdefghijklmnopq [ !! ]xyz0123456789] ] ``` <!-- github-comment-id:31374012 -->
Author
Owner

Hmm, I thought I had avoided submitting the test case?

Might just send a brand new pull request. When fixed.

Hmm, I thought I had avoided submitting the test case? Might just send a brand new pull request. When fixed. <!-- github-comment-id:31392821 -->
Author
Owner

Test cases. Blocks 1 and 2 are fixed.

    CUtils::PrintStatus(true, "USAGE: " + CString(appname) + " [options]");
    CUtils::PrintStatus(false, "USAGE: " + CString(appname) + " [options]");
    CUtils::PrintStatus(true);
    CUtils::PrintStatus(false);

    CUtils::PrintAction("Checking for list of available modules");
    CUtils::PrintStatus(false, "");
    CUtils::PrintAction("Checking for list of available modules");
    CUtils::PrintStatus(true, "");

    CUtils::PrintAction("Checking for list of available modules");
    CUtils::PrintStatus(false, "another message");
    CUtils::PrintAction("Checking for list of available modules");
    CUtils::PrintStatus(true, "another message");

output

[ ok ] USAGE: ./znc [options]
[ !! ][ USAGE: ./znc [options] ]
[ ok ]
[ !! ]
[ !! ] Checking for list of available modules... 
[ ok ] Checking for list of available modules... 
[ !! ][ another message ]of available modules... 
[ ok ] another messagest of available modules... 
Test cases. Blocks 1 and 2 are fixed. ``` CUtils::PrintStatus(true, "USAGE: " + CString(appname) + " [options]"); CUtils::PrintStatus(false, "USAGE: " + CString(appname) + " [options]"); CUtils::PrintStatus(true); CUtils::PrintStatus(false); CUtils::PrintAction("Checking for list of available modules"); CUtils::PrintStatus(false, ""); CUtils::PrintAction("Checking for list of available modules"); CUtils::PrintStatus(true, ""); CUtils::PrintAction("Checking for list of available modules"); CUtils::PrintStatus(false, "another message"); CUtils::PrintAction("Checking for list of available modules"); CUtils::PrintStatus(true, "another message"); ``` output ``` [ ok ] USAGE: ./znc [options] [ !! ][ USAGE: ./znc [options] ] [ ok ] [ !! ] [ !! ] Checking for list of available modules... [ ok ] Checking for list of available modules... [ !! ][ another message ]of available modules... [ ok ] another messagest of available modules... ``` <!-- github-comment-id:31394185 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/znc#153