From: Eric W. <war...@us...> - 2001-09-23 20:32:19
|
Update of /cvsroot/gaim/gaim/plugins In directory usw-pr-cvs1:/tmp/cvs-serv13731 Modified Files: lagmeter.c Log Message: handle jabber better. sigh. Index: lagmeter.c =================================================================== RCS file: /cvsroot/gaim/gaim/plugins/lagmeter.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- lagmeter.c 2001/06/02 02:58:03 1.13 +++ lagmeter.c 2001/09/23 20:32:16 1.14 @@ -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 { |