changeset 23363:54aaea893a89

Send '//message' as '/message', instead of looking for a 'message' command.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sat, 14 Jun 2008 02:03:26 +0000
parents d1eee441bf25
children 3f765f7e79d4
files finch/gntconv.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/finch/gntconv.c	Sat Jun 14 02:01:41 2008 +0000
+++ b/finch/gntconv.c	Sat Jun 14 02:03:26 2008 +0000
@@ -141,7 +141,7 @@
 entry_key_pressed(GntWidget *w, FinchConv *ggconv)
 {
 	const char *text = gnt_entry_get_text(GNT_ENTRY(ggconv->entry));
-	if (*text == '/')
+	if (*text == '/' && *(text + 1) != '/')
 	{
 		PurpleConversation *conv = ggconv->active_conv;
 		PurpleCmdStatus status;
@@ -191,7 +191,7 @@
 	}
 	else
 	{
-		char *escape = g_markup_escape_text(text, -1);
+		char *escape = g_markup_escape_text((*text == '/' ? text + 1 : text), -1);
 		char *apos = purple_strreplace(escape, "&apos;", "'");
 		g_free(escape);
 		escape = apos;