aboutsummaryrefslogtreecommitdiffstats
path: root/otr.c
diff options
context:
space:
mode:
Diffstat (limited to 'otr.c')
-rw-r--r--otr.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/otr.c b/otr.c
index 201aa816..4888691a 100644
--- a/otr.c
+++ b/otr.c
@@ -750,14 +750,9 @@ void op_create_instag(void *opdata, const char *account, const char *protocol)
}
}
-static char *otr_filter_colors(char *msg) {
- int i;
- for (i = 0; msg[i]; i++) {
- if (msg[i] == '\x02' || msg[i] == '\x03') {
- msg[i] = '?';
- }
- }
- return msg;
+static char *otr_filter_colors(char *msg)
+{
+ return str_reject_chars(msg, "\x02\x03", '?');
}
/* returns newly allocated string */