Changeset 86fd261
- Timestamp:
- 2015-08-11T06:48:25Z (9 years ago)
- Branches:
- master
- Children:
- b39859e
- Parents:
- 654112d4
- git-author:
- dequis <dx@…> (11-08-15 06:40:11)
- git-committer:
- dequis <dx@…> (11-08-15 06:48:25)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
otr.c
r654112d4 r86fd261 215 215 /* close all active OTR connections */ 216 216 void otr_disconnect_all(irc_t *irc); 217 218 /* modifies string in-place, replacing \x03 with '?', 219 as a quick way to prevent remote users from messing with irc colors */ 220 static char *otr_filter_colors(char *msg); 217 221 218 222 /* functions to be called for certain events */ … … 454 458 } else if (!newmsg) { 455 459 /* this was a non-OTR message */ 456 return msg;460 return otr_filter_colors(msg); 457 461 } else { 458 462 /* we're done with the original msg, which will be caller-freed. */ … … 745 749 } 746 750 751 static char *otr_filter_colors(char *msg) { 752 int i; 753 for (i = 0; msg[i]; i++) { 754 if (msg[i] == '\x03') { 755 msg[i] = '?'; 756 } 757 } 758 return msg; 759 } 760 747 761 /* returns newly allocated string */ 748 762 static char *otr_color_encrypted(char *msg, char *color, gboolean is_query) { … … 777 791 } 778 792 779 g_string_append(out, line);793 g_string_append(out, otr_filter_colors(line)); 780 794 } 781 795
Note: See TracChangeset
for help on using the changeset viewer.