changeset 2351:4e2d8992774e

[gaim-migrate @ 2364] handle jabber better. sigh. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Sun, 23 Sep 2001 20:32:16 +0000
parents 0264a8a27e69
children 39e66e80bb31
files plugins/lagmeter.c
diffstat 1 files changed, 14 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/lagmeter.c	Sat Sep 22 11:35:00 2001 +0000
+++ b/plugins/lagmeter.c	Sun Sep 23 20:32:16 2001 +0000
@@ -1,5 +1,6 @@
 #define GAIM_PLUGINS
 #include "gaim.h"
+#include "prpl.h"
 
 #include <time.h>
 #include <sys/types.h>
@@ -84,7 +85,19 @@
 	gettimeofday(&my_lag_tv, NULL);
 	if (g_slist_find(connections, my_gc)) {
 		char *m = g_strdup(MY_LAG_STRING);
-		serv_send_im(my_gc, my_gc->username, m, 1);
+		if (my_gc->protocol == PROTO_JABBER) {
+			if (!strchr(my_gc->username, '@')) {
+				char buf = g_strconcat(my_gc->username, "@jabber.org/GAIM", NULL);
+				serv_send_im(my_gc, buf, m, 1);
+				g_free(buf);
+			} else if (!strchr(my_gc->username, '/')) {
+				char buf = g_strconcat(my_gc->username, "@jabber.org/GAIM", NULL);
+				serv_send_im(my_gc, buf, m, 1);
+				g_free(buf);
+			} else
+				serv_send_im(my_gc, my_gc->username, m, 1);
+		} else
+			serv_send_im(my_gc, my_gc->username, m, 1);
 		g_free(m);
 		return TRUE;
 	} else {