Send '//message' as '/message', instead of looking for a 'message' command.

Sat, 14 Jun 2008 02:03:26 +0000

author
Sadrul Habib Chowdhury <sadrul@pidgin.im>
date
Sat, 14 Jun 2008 02:03:26 +0000
changeset 23503
9a0d740df39f
parent 23502
938fcfe1d88d
child 23521
f631ea1a5227

Send '//message' as '/message', instead of looking for a 'message' command.

finch/gntconv.c file | annotate | diff | comparison | revisions
--- 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;

mercurial