znc/znc — pull request #356 by ravomavain (2013-05-12 07:25:57+00:00)
Title: Strip control codes (including colors) from debug output. (v2)

Should fix #350. Strip any control code from DEBUG message to avoid messing terminal output.
I added StripControls() and StripControls_n() functions to the CString class to provide a generic way to strip control characters (can be reused for log -sanitize option).

Control codes are either color codes, or any character define in C0 set:
https://en.wikipedia.org/wiki/C0_and_C1_control_codes

I do agree with Apache 2 (or any other if you ever need to change again)