[polari] room: Match identify commands case-insensitively
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari] room: Match identify commands case-insensitively
- Date: Fri, 23 Sep 2016 23:34:12 +0000 (UTC)
commit e518bcb6d7f687a627d3f369889f355186673a7b
Author: Florian Müllner <fmuellner gnome org>
Date: Sat Sep 24 01:09:19 2016 +0200
room: Match identify commands case-insensitively
Most bots accept identify commands that are not all lower-case, reflect
that in the regex we use for matching identify messages.
src/lib/polari-room.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/lib/polari-room.c b/src/lib/polari-room.c
index 7cf9d9d..2310a38 100644
--- a/src/lib/polari-room.c
+++ b/src/lib/polari-room.c
@@ -479,7 +479,8 @@ on_message_sent (TpTextChannel *channel,
if (G_UNLIKELY (identify_message_regex == NULL))
identify_message_regex = g_regex_new ("^identify (?:(\\w+) )?(\\S+)$",
- G_REGEX_OPTIMIZE, 0, NULL);
+ G_REGEX_OPTIMIZE | G_REGEX_CASELESS,
+ 0, NULL);
if (g_regex_match (identify_message_regex, stripped_text, 0, &match))
{
char *username = g_match_info_fetch (match, 1);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]