pidgin: 500604b1: Send '//message' as '/message', instead

sadrul at pidgin.im sadrul at pidgin.im
Tue Jun 17 23:26:25 EDT 2008


-----------------------------------------------------------------
Revision: 500604b1f22bc5f32a818dc80bbc252bc460dc85
Ancestor: d2c2151625aeda6c5deb918d283fa0025644535e
Author: sadrul at pidgin.im
Date: 2008-06-14T02:03:26
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/500604b1f22bc5f32a818dc80bbc252bc460dc85

Modified files:
        finch/gntconv.c

ChangeLog: 

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

-------------- next part --------------
============================================================
--- finch/gntconv.c	088bc26dadc8d897d322f22a5e5b2d1a22c69b01
+++ finch/gntconv.c	326b123f8f33457266968a55c9857fba6ccff8ee
@@ -141,7 +141,7 @@ entry_key_pressed(GntWidget *w, FinchCon
 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 @@ entry_key_pressed(GntWidget *w, FinchCon
 	}
 	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, "'", "'");
 		g_free(escape);
 		escape = apos;


More information about the Commits mailing list