changeset 32119:df7a22ec0bc3

No more warnings when receiving Gadu-Gadu system messages - fixes #13914
author tomkiewicz@cpw.pidgin.im
date Mon, 13 Jun 2011 19:22:24 +0000
parents 7675022d2312
children 84152881ad5d
files libpurple/protocols/gg/gg.c
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/gg/gg.c	Mon Jun 13 17:31:03 2011 +0000
+++ b/libpurple/protocols/gg/gg.c	Mon Jun 13 19:22:24 2011 +0000
@@ -1914,6 +1914,17 @@
 				PURPLE_CONNECTION_ERROR_NETWORK_ERROR,
 				_("Connection failed"));
 			break;
+		case GG_EVENT_MSG:
+			if (ev->event.msg.sender == 0)
+				/* system messages are mostly ads */
+				purple_debug_info("gg", "System message:\n%s\n",
+					ev->event.msg.message);
+			else
+				purple_debug_warning("gg", "GG_EVENT_MSG: message from user %u "
+					"unexpected while connecting:\n%s\n",
+					ev->event.msg.sender,
+					ev->event.msg.message);
+			break;
 		default:
 			purple_debug_error("gg", "strange event: %d\n", ev->type);
 			break;