- Timestamp:
- 05/30/06 21:45:47 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ithildin-1.1/modules/ircd/addons/cmode_strip.c
r707 r738 60 60 } 61 61 62 #define ANSI_CHAR '\033'63 #define BLINK_CHAR '\006'64 #define BOLD_CHAR '\002'65 #define COLOR_CHAR '\003'66 #define INVERSE_CHAR '\026'67 #define UNDERLINE_CHAR '\037'62 #define ANSI_CHAR '\033' 63 #define BLINK_CHAR '\006' 64 #define BOLD_CHAR '\002' 65 #define COLOR_CHAR '\003' 66 #define INVERSE_CHAR '\026' 67 #define UNDERLINE_CHAR '\037' 68 68 69 69 HOOK_FUNCTION(strip_conf_hook) { … … 117 117 118 118 if (chanmode_isset(ccap->chan, chanmode_strip)) { 119 char *from, *to;120 from = to = ccap->extra;119 unsigned char *from, *to; 120 from = to = (unsigned char *)ccap->extra; 121 121 122 122 while (*from != '\0') { 123 if (strip_chars[(unsigned char)*from]) { 123 if (strip_chars[*from]) { 124 /* We will always skip the character here, it just may not 125 * match COLOR_CHAR in which case we simply continue on */ 124 126 if (*from++ == COLOR_CHAR) { 125 127 if (isdigit(*from)) { 126 if (isdigit(*++from)) { 127 if (*++from == ',') { 128 if (isdigit(*++from)) { 129 if (isdigit(*from)) 130 from++; 131 } 132 } 128 if (isdigit(*++from)) 129 from++; /* skip second digit which is optional */ 130 131 if (*from == ',' && isdigit(*(from + 1))) { 132 /* background color specified ... */ 133 from += 2; 134 if (isdigit(*from)) 135 from++; 133 136 } 134 137 } 135 138 } 136 continue; 137 } 138 *to++ = *from++; 139 } else 140 *to++ = *from++; 139 141 } 140 142 }
Note: See TracChangeset
for help on using the changeset viewer.
