/pidgin/main: a3f772577f7f: Merge

Daniel Atallah datallah at pidgin.im
Tue Jan 28 10:38:16 EST 2014


Changeset: a3f772577f7f124184bf5d3a47e9a75cff47ec1b
Author:	 Daniel Atallah <datallah at pidgin.im>
Date:	 2014-01-21 21:19 -0500
Branch:	 release-2.x.y
URL: https://hg.pidgin.im/pidgin/main/rev/a3f772577f7f

Description:

Merge

diffstat:

 libpurple/protocols/irc/irc.h   |   6 +-
 libpurple/protocols/irc/msgs.c  |  32 +++++++++---
 libpurple/protocols/irc/parse.c |   1 +
 libpurple/tests/test_util.c     |  11 ++++-
 libpurple/util.c                |   2 +-
 po/de.po                        |  99 +++++++++++++++++++++-------------------
 6 files changed, 92 insertions(+), 59 deletions(-)

diffs (288 lines):

diff --git a/libpurple/protocols/irc/irc.h b/libpurple/protocols/irc/irc.h
--- a/libpurple/protocols/irc/irc.h
+++ b/libpurple/protocols/irc/irc.h
@@ -72,9 +72,11 @@ struct irc_conn {
 	GString *names;
 	struct _whois {
 		char *nick;
+		char *real;
+		char *login;
+		char *ident;
+		char *host;
 		char *away;
-		char *userhost;
-		char *name;
 		char *server;
 		char *serverinfo;
 		GString *channels;
diff --git a/libpurple/protocols/irc/msgs.c b/libpurple/protocols/irc/msgs.c
--- a/libpurple/protocols/irc/msgs.c
+++ b/libpurple/protocols/irc/msgs.c
@@ -366,8 +366,9 @@ void irc_msg_whois(struct irc_conn *irc,
 	if (!strcmp(name, "301")) {
 		irc->whois.away = g_strdup(args[2]);
 	} else if (!strcmp(name, "311") || !strcmp(name, "314")) {
-		irc->whois.userhost = g_strdup_printf("%s@%s", args[2], args[3]);
-		irc->whois.name = g_strdup(args[5]);
+		irc->whois.ident = g_strdup(args[2]);
+		irc->whois.host = g_strdup(args[3]);
+		irc->whois.real = g_strdup(args[5]);
 	} else if (!strcmp(name, "312")) {
 		irc->whois.server = g_strdup(args[2]);
 		irc->whois.serverinfo = g_strdup(args[3]);
@@ -385,6 +386,11 @@ void irc_msg_whois(struct irc_conn *irc,
 		}
 	} else if (!strcmp(name, "320")) {
 		irc->whois.identified = 1;
+	} else if (!strcmp(name, "330")) {
+		g_message("msg %s: 1=[%s] 2=[%s] 3=[%s]",
+				name, args[1], args[2], args[3]);
+		if (!strcmp(args[3], "is logged in as"))
+			irc->whois.login = g_strdup(args[2]);
 	}
 }
 
@@ -421,13 +427,21 @@ void irc_msg_endwhois(struct irc_conn *i
 		purple_notify_user_info_add_pair(user_info, _("Away"), tmp);
 		g_free(tmp);
 	}
-	if (irc->whois.userhost) {
-		tmp = g_markup_escape_text(irc->whois.name, strlen(irc->whois.name));
-		g_free(irc->whois.name);
-		purple_notify_user_info_add_pair(user_info, _("Username"), irc->whois.userhost);
-		purple_notify_user_info_add_pair(user_info, _("Real name"), tmp);
-		g_free(irc->whois.userhost);
-		g_free(tmp);
+	if (irc->whois.real) {
+		purple_notify_user_info_add_pair_plaintext(user_info, _("Real name"), irc->whois.real);
+		g_free(irc->whois.real);
+	}
+	if (irc->whois.login) {
+		purple_notify_user_info_add_pair_plaintext(user_info, _("Login name"), irc->whois.login);
+		g_free(irc->whois.login);
+	}
+	if (irc->whois.ident) {
+		purple_notify_user_info_add_pair_plaintext(user_info, _("Ident name"), irc->whois.ident);
+		g_free(irc->whois.ident);
+	}
+	if (irc->whois.host) {
+		purple_notify_user_info_add_pair_plaintext(user_info, _("Host name"), irc->whois.host);
+		g_free(irc->whois.host);
 	}
 	if (irc->whois.server) {
 		tmp = g_strdup_printf("%s (%s)", irc->whois.server, irc->whois.serverinfo);
diff --git a/libpurple/protocols/irc/parse.c b/libpurple/protocols/irc/parse.c
--- a/libpurple/protocols/irc/parse.c
+++ b/libpurple/protocols/irc/parse.c
@@ -69,6 +69,7 @@ static struct _irc_msg {
 	{ "318", "nt:", 2, irc_msg_endwhois },		/* End of WHOIS			*/
 	{ "319", "nn:", 3, irc_msg_whois },		/* Whois channels		*/
 	{ "320", "nn:", 2, irc_msg_whois },		/* Whois (fn ident)		*/
+	{ "330", "nnv:", irc_msg_whois },	/* Whois (fn login)		*/
 	{ "314", "nnnvv:", 6, irc_msg_whois },		/* Whowas user			*/
 	{ "315", "nt:", 0, irc_msg_who },		/* end of WHO channel		*/
 	{ "369", "nt:", 2, irc_msg_endwhois },		/* End of WHOWAS		*/
diff --git a/libpurple/tests/test_util.c b/libpurple/tests/test_util.c
--- a/libpurple/tests/test_util.c
+++ b/libpurple/tests/test_util.c
@@ -156,10 +156,19 @@ END_TEST
 
 START_TEST(test_util_str_to_time)
 {
+	struct tm tm;
+	long tz_off;
+	const char *rest;
+	time_t timestamp;
+
 	fail_unless(377182200 == purple_str_to_time("19811214T12:50:00", TRUE, NULL, NULL, NULL));
 	fail_unless(1175919261 == purple_str_to_time("20070407T04:14:21", TRUE, NULL, NULL, NULL));
 	fail_unless(1282941722 == purple_str_to_time("2010-08-27.204202", TRUE, NULL, NULL, NULL));
-	fail_unless(1282941722 == purple_str_to_time("2010-08-27.134202-0700PDT", FALSE, NULL, NULL, NULL));
+
+	timestamp = purple_str_to_time("2010-08-27.134202-0700PDT", FALSE, &tm, &tz_off, &rest);
+	fail_unless(1282941722 == timestamp);
+	fail_unless((-7 * 60 * 60) == tz_off);
+	assert_string_equal("PDT", rest);
 }
 END_TEST
 
diff --git a/libpurple/util.c b/libpurple/util.c
--- a/libpurple/util.c
+++ b/libpurple/util.c
@@ -866,7 +866,7 @@ purple_str_to_time(const char *timestamp
 		*tm = t;
 
 	if (tzoff != PURPLE_NO_TZ_OFF)
-		retval += tzoff;
+		retval -= tzoff;
 
 	if (tz_off != NULL)
 		*tz_off = tzoff;
diff --git a/po/de.po b/po/de.po
--- a/po/de.po
+++ b/po/de.po
@@ -4,7 +4,7 @@
 # Copyright (C) 2002, Karsten Weiss <knweiss at gmx.de>
 # Copyright (C) 2002-2013, Björn Voigt <bjoernv at arcor.de>,
 #                     Jochen Kemnade <jochenkemnade at web.de>
-# Copyright (C) 2013, Björn Voigt <bjoernv at arcor.de>,
+# Copyright (C) 2013-2014, Björn Voigt <bjoernv at arcor.de>
 #
 # This file is distributed under the same license as the Pidgin package.
 #
@@ -12,8 +12,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: de\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-07-18 21:34+0200\n"
-"PO-Revision-Date: 2013-07-18 21:34+0200\n"
+"POT-Creation-Date: 2014-01-21 19:13+0100\n"
+"PO-Revision-Date: 2014-01-21 19:10+0100\n"
 "Last-Translator: Björn Voigt <bjoern at cs.tu-berlin.de>\n"
 "Language-Team: German <de at li.org>\n"
 "Language: de\n"
@@ -3290,18 +3290,6 @@ msgstr "Es gibt keine Benutzer, die Ihre
 msgid "Unable to read from socket"
 msgstr "Socket kann nicht gelesen werden"
 
-msgid "Buddy list downloaded"
-msgstr "Buddy-Liste heruntergeladen"
-
-msgid "Your buddy list was downloaded from the server."
-msgstr "Ihre Buddy-Liste wurde von Server geladen."
-
-msgid "Buddy list uploaded"
-msgstr "Buddy-Liste hochgeladen"
-
-msgid "Your buddy list was stored on the server."
-msgstr "Ihre Buddy-Liste wurde auf dem Server gespeichert."
-
 #. The session is now set up, ready to be connected. This emits the
 #. * signedOn signal, so clients can now do anything with msimprpl, and
 #. * we're ready for it (session key, userid, username all setup).
@@ -3341,15 +3329,6 @@ msgstr "Finde Buddys..."
 msgid "Change password..."
 msgstr "Passwort ändern..."
 
-msgid "Upload buddylist to Server"
-msgstr "Buddy-Liste zum Server hochladen"
-
-msgid "Download buddylist from Server"
-msgstr "Buddy-Liste vom Server herunterladen"
-
-msgid "Delete buddylist from Server"
-msgstr "Löschen der Buddy-Liste vom Server"
-
 msgid "Save buddylist to file..."
 msgstr "Buddy-Liste in Datei speichern..."
 
@@ -3491,6 +3470,9 @@ msgstr "Kodierungen"
 msgid "Auto-detect incoming UTF-8"
 msgstr "Eingehendes UTF-8 automatisch erkennen"
 
+msgid "Ident name"
+msgstr "Benutzername"
+
 msgid "Real name"
 msgstr "Echter Name"
 
@@ -11880,7 +11862,8 @@ msgstr "Webmaster"
 msgid "win32 port"
 msgstr "Win32 Portierung"
 
-#. feel free to not translate this
+#. Translators: This is a person's name. For most languages we recommend
+#. not translating it.
 msgid "Ka-Hing Cheung"
 msgstr "Ka-Hing Cheung"
 
@@ -12122,6 +12105,9 @@ msgstr "Albanisch"
 msgid "Serbian"
 msgstr "Serbisch"
 
+msgid "Serbian Latin"
+msgstr "Serbisch (Latin)"
+
 msgid "Sinhala"
 msgstr "Singhalesisch"
 
@@ -12140,30 +12126,30 @@ msgstr "Telugu"
 msgid "Thai"
 msgstr "Thailändisch"
 
+msgid "Ukranian"
+msgstr "Ukrainisch"
+
+msgid "Urdu"
+msgstr "Urdu"
+
+msgid "Vietnamese"
+msgstr "Vietnamesisch"
+
+msgid "Simplified Chinese"
+msgstr "Vereinfachtes Chinesisch"
+
+msgid "Hong Kong Chinese"
+msgstr "Hong Kong Chinesisch"
+
+msgid "Traditional Chinese"
+msgstr "Traditionelles Chinesisch"
+
+msgid "Amharic"
+msgstr "Amharisch"
+
 msgid "Turkish"
 msgstr "Türkisch"
 
-msgid "Ukranian"
-msgstr "Ukrainisch"
-
-msgid "Urdu"
-msgstr "Urdu"
-
-msgid "Vietnamese"
-msgstr "Vietnamesisch"
-
-msgid "Simplified Chinese"
-msgstr "Vereinfachtes Chinesisch"
-
-msgid "Hong Kong Chinese"
-msgstr "Hong Kong Chinesisch"
-
-msgid "Traditional Chinese"
-msgstr "Traditionelles Chinesisch"
-
-msgid "Amharic"
-msgstr "Amharisch"
-
 msgid "T.M.Thanh and the Gnome-Vi Team"
 msgstr "T.M.Thanh und das Gnome-Vi Team"
 
@@ -15247,6 +15233,27 @@ msgstr ""
 msgid "You do not have permission to uninstall this application."
 msgstr "Sie haben keine Berechtigung, diese Anwendung zu deinstallieren."
 
+#~ msgid "Buddy list downloaded"
+#~ msgstr "Buddy-Liste heruntergeladen"
+
+#~ msgid "Your buddy list was downloaded from the server."
+#~ msgstr "Ihre Buddy-Liste wurde von Server geladen."
+
+#~ msgid "Buddy list uploaded"
+#~ msgstr "Buddy-Liste hochgeladen"
+
+#~ msgid "Your buddy list was stored on the server."
+#~ msgstr "Ihre Buddy-Liste wurde auf dem Server gespeichert."
+
+#~ msgid "Upload buddylist to Server"
+#~ msgstr "Buddy-Liste zum Server hochladen"
+
+#~ msgid "Download buddylist from Server"
+#~ msgstr "Buddy-Liste vom Server herunterladen"
+
+#~ msgid "Delete buddylist from Server"
+#~ msgstr "Löschen der Buddy-Liste vom Server"
+
 #~ msgid "Hidden Number"
 #~ msgstr "Versteckte Nummer"
 



More information about the Commits mailing list