You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(5) |
Aug
(1) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(63) |
Feb
(32) |
Mar
(20) |
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(2) |
2006 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Don S. <ri...@us...> - 2005-02-07 15:35:24
|
Update of /cvsroot/gaim-bnet/gaim-bnet In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9655 Added Files: Makefile.mingw bnet_config.h.mingw Log Message: Committing patch #1117931 for win32 build support from Daniel Atallah --- NEW FILE: bnet_config.h.mingw --- /* pre_config.h. Generated by configure. */ /* pre_config.h.in. Generated from configure.ac by autoheader. */ /* our header */ #ifndef BNET_CONFIG_H #define BNET_CONFIG_H /* Gaim-BNET Website */ #define BNET_WEBSITE "http://gaim-bnet.sourceforge.net" /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP systems. This function is required for `alloca.c' support on those systems. */ /* #undef CRAY_STACKSEG_END */ /* Define to 1 if using `alloca.c'. */ /* #undef C_ALLOCA */ /* Define if debugging is enabled. */ #define DEBUG 1 /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 /* Define to 1 if you have `alloca', as a function or macro. */ #define HAVE_ALLOCA 1 /* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix). */ #define HAVE_ALLOCA_H 1 /* Define to 1 if you have the <argz.h> header file. */ #define HAVE_ARGZ_H 1 /* Define to 1 if you have the `asprintf' function. */ #define HAVE_ASPRINTF 1 /* Define if the GNU dcgettext() function is already present or preinstalled. */ #define HAVE_DCGETTEXT 1 /* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you don't. */ #define HAVE_DECL_FEOF_UNLOCKED 1 /* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if you don't. */ #define HAVE_DECL_FGETS_UNLOCKED 0 /* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you don't. */ #define HAVE_DECL_GETC_UNLOCKED 1 /* Define to 1 if you have the declaration of `_snprintf', and to 0 if you don't. */ #define HAVE_DECL__SNPRINTF 0 /* Define to 1 if you have the declaration of `_snwprintf', and to 0 if you don't. */ #define HAVE_DECL__SNWPRINTF 0 /* Define to 1 if you have the <dlfcn.h> header file. */ #define HAVE_DLFCN_H 1 /* Define to 1 if you have the `fwprintf' function. */ #define HAVE_FWPRINTF 1 /* Define if we've found gaim. */ #define HAVE_GAIM 1 /* Define to 1 if you have the `getcwd' function. */ #define HAVE_GETCWD 1 /* Define to 1 if you have the `getegid' function. */ #define HAVE_GETEGID 1 /* Define to 1 if you have the `geteuid' function. */ #define HAVE_GETEUID 1 /* Define to 1 if you have the `getgid' function. */ #define HAVE_GETGID 1 /* Define to 1 if you have the `getpagesize' function. */ #define HAVE_GETPAGESIZE 1 /* Define if the GNU gettext() function is already present or preinstalled. */ #define HAVE_GETTEXT 1 /* Define to 1 if you have the `getuid' function. */ #define HAVE_GETUID 1 /* Define if you have the iconv() function. */ #define HAVE_ICONV 1 /* Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>. */ #define HAVE_INTMAX_T 1 /* Define if <inttypes.h> exists and doesn't clash with <sys/types.h>. */ #define HAVE_INTTYPES_H 1 /* Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, and declares uintmax_t. */ #define HAVE_INTTYPES_H_WITH_UINTMAX 1 /* Define if you have <langinfo.h> and nl_langinfo(CODESET). */ #define HAVE_LANGINFO_CODESET 1 /* Define if your <locale.h> file defines LC_MESSAGES. */ #define HAVE_LC_MESSAGES 1 /* Define to 1 if you have the <limits.h> header file. */ #define HAVE_LIMITS_H 1 /* Define to 1 if you have the <locale.h> header file. */ #define HAVE_LOCALE_H 1 /* Define if you have the 'long double' type. */ #define HAVE_LONG_DOUBLE 1 /* Define if you have the 'long long' type. */ #define HAVE_LONG_LONG 1 /* Define to 1 if you have the <malloc.h> header file. */ #define HAVE_MALLOC_H 1 /* Define to 1 if you have the <memory.h> header file. */ #define HAVE_MEMORY_H 1 /* Define to 1 if you have the `mempcpy' function. */ #define HAVE_MEMPCPY 1 /* Define to 1 if you have a working `mmap' system call. */ #define HAVE_MMAP 1 /* Define to 1 if you have the `munmap' function. */ #define HAVE_MUNMAP 1 /* Define to 1 if you have the <nl_types.h> header file. */ #define HAVE_NL_TYPES_H 1 /* Define if your printf() function supports format strings with positions. */ #define HAVE_POSIX_PRINTF 1 /* Define to 1 if you have the `putenv' function. */ #define HAVE_PUTENV 1 /* Define to 1 if you have the `setenv' function. */ #define HAVE_SETENV 1 /* Define to 1 if you have the `setlocale' function. */ #define HAVE_SETLOCALE 1 /* Define to 1 if you have the `snprintf' function. */ #define HAVE_SNPRINTF 1 /* Define to 1 if you have the <stddef.h> header file. */ #define HAVE_STDDEF_H 1 /* Define to 1 if you have the <stdint.h> header file. */ #define HAVE_STDINT_H 1 /* Define if <stdint.h> exists, doesn't clash with <sys/types.h>, and declares uintmax_t. */ #define HAVE_STDINT_H_WITH_UINTMAX 1 /* Define to 1 if you have the <stdlib.h> header file. */ #define HAVE_STDLIB_H 1 /* Define to 1 if you have the `stpcpy' function. */ #define HAVE_STPCPY 1 /* Define to 1 if you have the `strcasecmp' function. */ #define HAVE_STRCASECMP 1 /* Define to 1 if you have the `strdup' function. */ #define HAVE_STRDUP 1 /* Define to 1 if you have the <strings.h> header file. */ #define HAVE_STRINGS_H 1 /* Define to 1 if you have the <string.h> header file. */ #define HAVE_STRING_H 1 /* Define to 1 if you have the `strtoul' function. */ #define HAVE_STRTOUL 1 /* Define to 1 if you have the <sys/param.h> header file. */ #define HAVE_SYS_PARAM_H 1 /* Define to 1 if you have the <sys/stat.h> header file. */ #define HAVE_SYS_STAT_H 1 /* Define to 1 if you have the <sys/types.h> header file. */ #define HAVE_SYS_TYPES_H 1 /* Define to 1 if you have the `tsearch' function. */ #define HAVE_TSEARCH 1 /* Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>. */ #define HAVE_UINTMAX_T 1 /* Define to 1 if you have the <unistd.h> header file. */ #define HAVE_UNISTD_H 1 /* Define if you have the 'unsigned long long' type. */ #define HAVE_UNSIGNED_LONG_LONG 1 /* Define if you have the 'wchar_t' type. */ #define HAVE_WCHAR_T 1 /* Define to 1 if you have the `wcslen' function. */ #define HAVE_WCSLEN 1 /* Define if you have the 'wint_t' type. */ #define HAVE_WINT_T 1 /* Define to 1 if you have the `__argz_count' function. */ #define HAVE___ARGZ_COUNT 1 /* Define to 1 if you have the `__argz_next' function. */ #define HAVE___ARGZ_NEXT 1 /* Define to 1 if you have the `__argz_stringify' function. */ #define HAVE___ARGZ_STRINGIFY 1 /* Define to 1 if you have the `__fsetlocking' function. */ #define HAVE___FSETLOCKING 1 /* Define as const if the declaration of iconv() needs const. */ #define ICONV_CONST /* Define if integer division by zero raises signal SIGFPE. */ #define INTDIV0_RAISES_SIGFPE 1 /* Name of package */ #define BNET_PACKAGE "gaim-bnet" /* Define to the address where bug reports for this package should be sent. */ #define BNET_PACKAGE_BUGREPORT "gai...@li..." /* Define to the full name of this package. */ #define BNET_PACKAGE_NAME "gaim-bnet" /* Define to the full name and version of this package. */ /* #undef BNET_PACKAGE_STRING "gaim-bnet 0.1.0cvs" */ /* Define to the one symbol short name of this package. */ #define BNET_PACKAGE_TARNAME "gaim-bnet" /* Define to the version of this package. */ /* #undef BNET_PACKAGE_VERSION "0.1.0cvs" */ /* Define if <inttypes.h> exists and defines unusable PRI* macros. */ /* #undef PRI_MACROS_BROKEN */ /* Define as the maximum value of type 'size_t', if the system doesn't define it. */ /* #undef SIZE_MAX */ /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown */ /* #undef STACK_DIRECTION */ /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Version number of package */ /* #undef VERSION "0.1.0cvs" */ /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus /* #undef inline */ #endif /* Define to `long' if <sys/types.h> does not define. */ /* #undef off_t */ /* Define as the type of the result of subtracting two pointers, if the system doesn't define it. */ /* #undef ptrdiff_t */ /* Define to empty if the C compiler doesn't support this keyword. */ /* #undef signed */ /* Define to `unsigned' if <sys/types.h> does not define. */ /* #undef size_t */ /* Define to unsigned long or unsigned long long if <stdint.h> and <inttypes.h> don't define. */ /* #undef uintmax_t */ #endif /* BNET_CONFIG_H */ --- NEW FILE: Makefile.mingw --- # # Makefile.mingw # # Description: Makefile for win32 (mingw) gaim-bnet # # # PATHS # BN_SRC := ./src BN_PIXMAPS := ./pixmaps BN_PO := ./po GAIM_INSTALL_DIR := ../../win32-install-dir ## ## VARIABLE DEFINITIONS ## BN_VERSION := $(shell cat ./VERSION) GAIM_VERSION := $(shell cat ../../VERSION) all: cp bnet_config.h.mingw bnet_config.h $(MAKE) -C $(BN_SRC) -f Makefile.mingw $(MAKE) -C $(BN_PO) -f Makefile.mingw install: all cp ./pixmaps/bnet.png $(GAIM_INSTALL_DIR)/pixmaps/gaim/status/default $(MAKE) -C $(BN_SRC) -f Makefile.mingw install $(MAKE) -C $(BN_PO) -f Makefile.mingw install #installer: all # makensis.exe /DGAIM-BNET_VERSION="$(GF_VERSION)" /DGAIM_VERSION="$(GAIM_VERSION)" gaim-bnet-installer.nsi clean: $(MAKE) -C $(BN_SRC) -f Makefile.mingw clean rm -f bnet_config.h gaim-bnet-*.exe |
From: Don S. <ri...@us...> - 2005-02-07 15:35:24
|
Update of /cvsroot/gaim-bnet/gaim-bnet/po In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9655/po Added Files: Makefile.mingw Log Message: Committing patch #1117931 for win32 build support from Daniel Atallah --- NEW FILE: Makefile.mingw --- # Makefile.mingw # # Description: Makefile to generate mo files # PACKAGE = gaim-bnet ## ## PATHS ## srcdir = . GAIM_TOP = ../../.. GAIM_INSTALL_DIR = $(GAIM_TOP)/win32-install-dir LOCALEDIR = $(GAIM_INSTALL_DIR)/locale GTK_BIN = $(GAIM_TOP)/../win32-dev/gtk_2_0/bin ## ## TOOLS ## GMSGFMT = $(GTK_BIN)/msgfmt .SUFFIXES: .SUFFIXES: .po .gmo ## ## SOURCES, OBJECTS ## CATALOGS = $(patsubst %.po,%.gmo,$(wildcard *.po)) ## ## RULES ## .po.gmo: rm -f $@ && $(GMSGFMT) --statistics -o $@ $< ## ## TARGETS ## all: $(CATALOGS) install: all mkdir -p $(LOCALEDIR) @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed 's/\.gmo$$//'`; \ dir=$(LOCALEDIR)/$$lang/LC_MESSAGES; \ mkdir -p $$dir; \ if test -r $$cat; then \ cp $$cat $$dir/$(PACKAGE).mo; \ echo "installing $$cat as $$dir/$(PACKAGE).mo"; \ else \ cp $(srcdir)/$$cat $$dir/$(PACKAGE).mo; \ echo "installing $(srcdir)/$$cat as" \ "$$dir/$(PACKAGE).mo"; \ fi; \ done clean: rm -f *.gmo |
From: Don S. <ri...@us...> - 2005-02-04 20:31:59
|
Update of /cvsroot/gaim-bnet/gaim-bnet/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18139 Modified Files: bnet.c buddy.c buddy.h Log Message: Privacy support for RFE #1115491 Index: bnet.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/bnet.c,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** bnet.c 27 Jan 2005 21:26:41 -0000 1.34 --- bnet.c 4 Feb 2005 20:31:34 -0000 1.35 *************** *** 35,38 **** --- 35,39 ---- #include "conn.h" #include "intl.h" + #include "privacy.h" static GaimPlugin *_bnet_plugin = NULL; *************** *** 171,174 **** --- 172,203 ---- } + + static void bnet_set_permit_deny(GaimConnection *gc) { + GaimAccount *account = gaim_connection_get_account(gc); + GSList *deny; + + switch (account->perm_deny) { + case GAIM_PRIVACY_ALLOW_ALL: + for (deny = account->deny; deny; deny = deny->next) + bnet_user_unsquelch(gc, deny->data); + break; + + case GAIM_PRIVACY_ALLOW_USERS: + for (deny = account->deny; deny; deny = deny->next) + bnet_user_unsquelch(gc, deny->data); + break; + + case GAIM_PRIVACY_ALLOW_BUDDYLIST: + case GAIM_PRIVACY_DENY_USERS: + for (deny = account->deny; deny; deny = deny->next) + bnet_user_squelch(gc, deny->data); + break; + + case GAIM_PRIVACY_DENY_ALL: + default: + break; + } + } + /****************************************************************************** * Protocol/Plugin stuff *************** *** 206,213 **** NULL, /* remove_buddies */ NULL, /* add_permit */ ! NULL, /* add_deny */ NULL, /* rem_permit */ ! NULL, /* rem_deny */ ! NULL, /* set_permit_deny */ NULL, /* warn */ bnet_chat_join, /* join_chat */ --- 235,242 ---- NULL, /* remove_buddies */ NULL, /* add_permit */ ! bnet_user_squelch, /* add_deny */ NULL, /* rem_permit */ ! bnet_user_unsquelch, /* rem_deny */ ! bnet_set_permit_deny, /* set_permit_deny */ NULL, /* warn */ bnet_chat_join, /* join_chat */ Index: buddy.h =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/buddy.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** buddy.h 21 Jan 2005 05:45:52 -0000 1.9 --- buddy.h 4 Feb 2005 20:31:34 -0000 1.10 *************** *** 56,59 **** --- 56,61 ---- void bnet_user_free(BNetUser *user); void bnet_user_info(GaimConnection *gc, const gchar *who); + void bnet_user_squelch(GaimConnection *gc, const gchar *who); + void bnet_user_unsquelch(GaimConnection *gc, const gchar *who); /* Users API */ Index: buddy.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/buddy.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** buddy.c 4 Feb 2005 19:41:28 -0000 1.15 --- buddy.c 4 Feb 2005 20:31:34 -0000 1.16 *************** *** 90,93 **** --- 90,116 ---- } + + void bnet_user_squelch(GaimConnection *gc, const gchar *who) { + BNetConn *conn = BNET_CONN(gc->proto_data); + + if (conn->vw_nick) + g_free(conn->vw_nick); + conn->vw_nick = g_strdup(gaim_normalize(conn->account, who)); + + gaim_debug_info("bnet", "/squelch %s\n", who); + bnet_conn_send(conn, "/squelch %s\n", who); + } + + void bnet_user_unsquelch(GaimConnection *gc, const gchar *who) { + BNetConn *conn = BNET_CONN(gc->proto_data); + + if (conn->vw_nick) + g_free(conn->vw_nick); + conn->vw_nick = g_strdup(gaim_normalize(conn->account, who)); + + gaim_debug_info("bnet", "/unsquelch %s\n", who); + bnet_conn_send(conn, "/unsquelch %s\n", who); + } + /****************************************************************************** * Users API |
From: Don S. <ri...@us...> - 2005-02-04 19:41:38
|
Update of /cvsroot/gaim-bnet/gaim-bnet/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5462 Modified Files: buddy.c Log Message: Fix for bug #1111075, don't add same buddy to blist multiple times Index: buddy.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/buddy.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** buddy.c 27 Jan 2005 21:26:41 -0000 1.14 --- buddy.c 4 Feb 2005 19:41:28 -0000 1.15 *************** *** 152,157 **** g_hash_table_insert(conn->buddies, b->norm, b); ! bnet_conn_request_friends_list(conn); } } --- 152,160 ---- g_hash_table_insert(conn->buddies, b->norm, b); ! } else { ! /* Buddy already exists in local list, remove it */ ! gaim_blist_remove_buddy(buddy); } + bnet_conn_request_friends_list(conn); } |
From: Don S. <ri...@us...> - 2005-02-03 20:30:07
|
Update of /cvsroot/gaim-bnet/gaim-bnet/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22285 Modified Files: proto.c Log Message: I think this is supposed to be whisper, not whispear Index: proto.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/proto.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** proto.c 3 Feb 2005 15:12:48 -0000 1.20 --- proto.c 3 Feb 2005 20:29:48 -0000 1.21 *************** *** 161,165 **** /****************************************************************************** ! * Whispear From Processing *****************************************************************************/ static void --- 161,165 ---- /****************************************************************************** ! * Whisper From Processing *****************************************************************************/ static void *************** *** 527,531 **** static void ! bnet_proto_msg_whispearf(BNetConn *conn, const gchar** args) { const gchar* nick = args[0]; //const gchar* game = args[1]; --- 527,531 ---- static void ! bnet_proto_msg_whisperf(BNetConn *conn, const gchar** args) { const gchar* nick = args[0]; //const gchar* game = args[1]; *************** *** 600,604 **** static void ! bnet_proto_msg_whispeart(BNetConn *conn, const gchar** args) { const gchar* nick = args[0]; //const gchar* game = args[1]; --- 600,604 ---- static void ! bnet_proto_msg_whispert(BNetConn *conn, const gchar** args) { const gchar* nick = args[0]; //const gchar* game = args[1]; *************** *** 708,716 **** { 1002, 3, bnet_proto_msg_join }, { 1003, 2, bnet_proto_msg_leave }, ! { 1004, 3, bnet_proto_msg_whispearf }, { 1005, 3, bnet_proto_msg_talk }, { 1007, 1, bnet_proto_msg_channel }, { 1009, 2, bnet_proto_msg_userflg }, ! { 1010, 3, bnet_proto_msg_whispeart }, { 1018, 1, bnet_proto_msg_info }, { 1019, 1, bnet_proto_msg_error }, --- 708,716 ---- { 1002, 3, bnet_proto_msg_join }, { 1003, 2, bnet_proto_msg_leave }, ! { 1004, 3, bnet_proto_msg_whisperf }, { 1005, 3, bnet_proto_msg_talk }, { 1007, 1, bnet_proto_msg_channel }, { 1009, 2, bnet_proto_msg_userflg }, ! { 1010, 3, bnet_proto_msg_whispert }, { 1018, 1, bnet_proto_msg_info }, { 1019, 1, bnet_proto_msg_error }, |
From: Don S. <ri...@us...> - 2005-02-03 18:24:18
|
Update of /cvsroot/gaim-bnet/htdocs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28419 Modified Files: faq.php Log Message: Updates Index: faq.php =================================================================== RCS file: /cvsroot/gaim-bnet/htdocs/faq.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** faq.php 3 Feb 2005 18:21:34 -0000 1.4 --- faq.php 3 Feb 2005 18:24:09 -0000 1.5 *************** *** 31,35 **** <p>You could either send an email to the <a href="https://lists.sourceforge.net/mailman/listinfo/gaim-bnet-devel">development mailing list</a>, or via IRC in #gaim-bnet on <a href="http://www.freenode.net/">freenode</a>. Do not email individual developers directly, you are likely to be ignored or your email lost.</p> <p>Do <b>NOT</b> ask gaim-bnet questions in #gaim.</p> - <br /> </dd> </dl> --- 31,34 ---- *************** *** 41,44 **** --- 40,44 ---- <dt id="q1"><b>What are the available Battle.net servers?</b></dt> <dd> + <p> <ul> <li>asia.battle.net</li> *************** *** 47,51 **** <li>uswest.battle.net</li> </ul> ! <br /> </dd> <dt id="q2"><b>Can I log onto any of these Battle.net servers with my account?</b></dt> --- 47,51 ---- <li>uswest.battle.net</li> </ul> ! </p> </dd> <dt id="q2"><b>Can I log onto any of these Battle.net servers with my account?</b></dt> *************** *** 53,57 **** <p>No. You can only log into the Battle.net server with which you registered that account. Logins are not transferred across servers.</p> - <br /> </dd> </dl> --- 53,56 ---- |
From: Don S. <ri...@us...> - 2005-02-03 18:21:47
|
Update of /cvsroot/gaim-bnet/htdocs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27857 Modified Files: faq.php Log Message: Updates Index: faq.php =================================================================== RCS file: /cvsroot/gaim-bnet/htdocs/faq.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** faq.php 3 Feb 2005 18:14:52 -0000 1.3 --- faq.php 3 Feb 2005 18:21:34 -0000 1.4 *************** *** 8,11 **** --- 8,18 ---- <p> + <b>Contact</b> + <ul> + <li><a href="#q3">I need help. How can I contact you?</a></li> + </ul> + </p> + + <p> <b>Servers</b> <ul> *************** *** 15,18 **** --- 22,39 ---- </p> + <hr noshade="noshade" size="1" /> + + <p> + <a name="Contact"><b>Contact</b></a> + <dl> + <dt id="q3"><b>I need help. How can I contact you?</b></dt> + <dd> + <p>You could either send an email to the <a href="https://lists.sourceforge.net/mailman/listinfo/gaim-bnet-devel">development mailing list</a>, or via IRC in #gaim-bnet on <a href="http://www.freenode.net/">freenode</a>. Do not email individual developers directly, you are likely to be ignored or your email lost.</p> + <p>Do <b>NOT</b> ask gaim-bnet questions in #gaim.</p> + <br /> + </dd> + </dl> + </p> + <p> <a name="Servers"><b>Servers</b></a> *************** *** 30,35 **** <dt id="q2"><b>Can I log onto any of these Battle.net servers with my account?</b></dt> <dd> ! No. You can only log into the Battle.net server with which you registered ! that account. Logins are not transferred across servers. <br /> </dd> --- 51,56 ---- <dt id="q2"><b>Can I log onto any of these Battle.net servers with my account?</b></dt> <dd> ! <p>No. You can only log into the Battle.net server with which you registered ! that account. Logins are not transferred across servers.</p> <br /> </dd> |
From: Don S. <ri...@us...> - 2005-02-03 18:15:04
|
Update of /cvsroot/gaim-bnet/htdocs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25979 Modified Files: faq.php footer.php header.php Log Message: Updates Index: header.php =================================================================== RCS file: /cvsroot/gaim-bnet/htdocs/header.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** header.php 26 Jan 2005 17:09:18 -0000 1.4 --- header.php 3 Feb 2005 18:14:52 -0000 1.5 *************** *** 22,26 **** <a href="index.php#news">News</a> | <a href="index.php#downloads">Downloads</a> | ! <a href="docs.php">Documentation</a> | <a href="faq.php">FAQ</a> </td> --- 22,26 ---- <a href="index.php#news">News</a> | <a href="index.php#downloads">Downloads</a> | ! <!-- <a href="docs.php">Documentation</a> | --> <a href="faq.php">FAQ</a> </td> Index: footer.php =================================================================== RCS file: /cvsroot/gaim-bnet/htdocs/footer.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** footer.php 10 Sep 2004 18:07:57 -0000 1.3 --- footer.php 3 Feb 2005 18:14:52 -0000 1.4 *************** *** 6,10 **** <hr noshade size="1"> <a href="http://<?php echo $sfname ?>.sourceforge.net"><?php echo $name ?></a> is <a href="http://www.gnu.org/licenses/gpl.txt">GPL</a><br /> ! ©2003-2004 Don Seiler & Gary Kramlich </BODY> </HTML> --- 6,10 ---- <hr noshade size="1"> <a href="http://<?php echo $sfname ?>.sourceforge.net"><?php echo $name ?></a> is <a href="http://www.gnu.org/licenses/gpl.txt">GPL</a><br /> ! ©2003-2005 Don Seiler, Gary Kramlich, & Dario Zilocchi </BODY> </HTML> Index: faq.php =================================================================== RCS file: /cvsroot/gaim-bnet/htdocs/faq.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** faq.php 26 Jan 2005 17:11:37 -0000 1.2 --- faq.php 3 Feb 2005 18:14:52 -0000 1.3 *************** *** 26,34 **** <li>uswest.battle.net</li> </ul> </dd> <dt id="q2"><b>Can I log onto any of these Battle.net servers with my account?</b></dt> <dd> ! No. You can only log into the Battle.net server with which you registered that ! account. Logins are not transferred across servers. </dd> </dl> --- 26,36 ---- <li>uswest.battle.net</li> </ul> + <br /> </dd> <dt id="q2"><b>Can I log onto any of these Battle.net servers with my account?</b></dt> <dd> ! No. You can only log into the Battle.net server with which you registered ! that account. Logins are not transferred across servers. ! <br /> </dd> </dl> |
From: Don S. <ri...@us...> - 2005-02-03 15:12:59
|
Update of /cvsroot/gaim-bnet/gaim-bnet/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18198/src Modified Files: chat.c conn.h proto.c Log Message: Patch 1111122 from evew to fix Bug 1111086 about multiple chats and text going to wrong chan Index: proto.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/proto.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** proto.c 27 Jan 2005 21:26:41 -0000 1.19 --- proto.c 3 Feb 2005 15:12:48 -0000 1.20 *************** *** 590,594 **** g_hash_table_foreach_remove(conn->users, bnet_hash_destroy_all, NULL); ! serv_got_joined_chat(gc, 1, chan); } --- 590,594 ---- g_hash_table_foreach_remove(conn->users, bnet_hash_destroy_all, NULL); ! serv_got_joined_chat(gc, ++conn->chan_id, chan); } *************** *** 680,683 **** --- 680,685 ---- gaim_debug_info("bnet", "EMOTE FROM %s - %s\n", nick, msg); } + + g_free(buf); } Index: chat.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/chat.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** chat.c 13 Jan 2005 08:25:39 -0000 1.4 --- chat.c 3 Feb 2005 15:12:48 -0000 1.5 *************** *** 71,74 **** --- 71,75 ---- bnet_chat_join(GaimConnection *gc, GHashTable *data) { const gchar *chan; + GaimConversation *convo; BNetConn *conn; *************** *** 80,90 **** conn = BNET_CONN(gc->proto_data); chan = g_hash_table_lookup(data, "channel"); if (!strcmp(conn->chan, chan)) { - GaimConversation *convo; - /* We are already on chan, simply show the window and populate it! */ ! ! serv_got_joined_chat(gc, 1, chan); convo = gaim_find_conversation_with_account(conn->chan, conn->account); --- 81,89 ---- conn = BNET_CONN(gc->proto_data); chan = g_hash_table_lookup(data, "channel"); + convo = gaim_find_conversation_with_account(conn->chan, conn->account); if (!strcmp(conn->chan, chan)) { /* We are already on chan, simply show the window and populate it! */ ! serv_got_joined_chat(gc, ++conn->chan_id, chan); convo = gaim_find_conversation_with_account(conn->chan, conn->account); *************** *** 94,97 **** --- 93,106 ---- } else { + convo = gaim_find_conversation_with_account(conn->chan, conn->account); + + if (convo) { + gaim_conv_chat_write(GAIM_CONV_CHAT(convo), + "", + _("Left channel."), + GAIM_MESSAGE_SYSTEM, + time(0)); + } + bnet_conn_send(conn, "/join %s\n", chan); } *************** *** 120,126 **** } ! bnet_conn_send(conn, "%s\n", what); ! ! gaim_conv_chat_write(GAIM_CONV_CHAT(convo), conn->nick, what, 0, time(0)); return 0; --- 129,142 ---- } ! if (id == conn->chan_id) { ! bnet_conn_send(conn, "%s\n", what); ! gaim_conv_chat_write(GAIM_CONV_CHAT(convo), conn->nick, what, 0, time(0)); ! } else { ! gaim_conv_chat_write(GAIM_CONV_CHAT(convo), ! "", ! _("You are not in channel."), ! GAIM_MESSAGE_ERROR, ! time(0)); ! } return 0; Index: conn.h =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/conn.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** conn.h 27 Jan 2005 21:26:41 -0000 1.7 --- conn.h 3 Feb 2005 15:12:48 -0000 1.8 *************** *** 63,66 **** --- 63,67 ---- gchar *nick; gchar *chan; + guint chan_id; GHashTable *users; |
From: Don S. <ri...@us...> - 2005-01-27 21:26:57
|
Update of /cvsroot/gaim-bnet/gaim-bnet/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29492/src Modified Files: bnet.c bnet.h buddy.c conn.c conn.h proto.c proto.h Log Message: Patch #1110361 Index: conn.h =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/conn.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** conn.h 21 Jan 2005 05:45:52 -0000 1.6 --- conn.h 27 Jan 2005 21:26:41 -0000 1.7 *************** *** 74,77 **** --- 74,78 ---- gboolean welcome; gboolean fl_listing; + gchar *vw_nick; // verbose where - nick }; Index: bnet.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/bnet.c,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** bnet.c 21 Jan 2005 05:45:52 -0000 1.33 --- bnet.c 27 Jan 2005 21:26:41 -0000 1.34 *************** *** 42,45 **** --- 42,67 ---- *****************************************************************************/ static void + bnet_check_info_cb(GaimConnection *gc, char *nick) { + if (g_list_find(gaim_connections_get_all(), gc)) { + gaim_debug_info("bnet", "bnet_check_status_cb: nick \"%s\"\n", nick); + + bnet_user_info(gc, nick); + } + } + + static void bnet_check_info(GaimPluginAction *action) { + GaimConnection *gc = (GaimConnection*)action->context; + + gaim_debug_info("bnet", "bnet_check_status\n"); + + gaim_request_input(gc, _("Get user info"), + _("Retrieve info about a user"), + _("Type the nick here"), + NULL, FALSE, FALSE, NULL, + _("OK"), G_CALLBACK(bnet_check_info_cb), + _("Cancel"), NULL, gc); + } + + static void bnet_raw_request_cb(GaimConnection *gc, char *msg) { BNetConn *conn = BNET_CONN(gc->proto_data); *************** *** 72,75 **** --- 94,101 ---- GaimPluginAction *act; + act = gaim_plugin_action_new(_("Get user info"), + bnet_check_info); + m = g_list_append(m, act); + act = gaim_plugin_action_new(_("Send raw command..."), bnet_send_raw_cmd); Index: conn.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/conn.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** conn.c 21 Jan 2005 05:45:52 -0000 1.9 --- conn.c 27 Jan 2005 21:26:41 -0000 1.10 *************** *** 36,39 **** --- 36,50 ---- }; + /****************************************************************************** + * Raw Procedures + *****************************************************************************/ + static void + bnet_list_destroy_all(gpointer data, gpointer user_data) { + free(data); + } + + /****************************************************************************** + * Connection API + *****************************************************************************/ void bnet_conn_send(BNetConn *conn, const gchar *fmt, ...) { *************** *** 68,74 **** while (queue && (cur = queue->data, !conn->flood_sent || conn->flood_sent + strlen(cur) < BNET_FLOOD_MAX)) { ! ret = send(conn->fd, cur, strlen(cur), 0); ! if (ret > 0) ! conn->flood_sent += ret; g_free(cur); --- 79,90 ---- while (queue && (cur = queue->data, !conn->flood_sent || conn->flood_sent + strlen(cur) < BNET_FLOOD_MAX)) { ! ret = write(conn->fd, cur, strlen(cur)); ! if (ret < 0) { ! gaim_connection_error(gaim_account_get_connection(conn->account), ! _("Write error")); ! return; ! } ! ! conn->flood_sent += ret; g_free(cur); *************** *** 319,322 **** --- 335,340 ---- if (conn->last_stat.nick) g_free(conn->last_stat.nick); + if (conn->vw_nick) + g_free(conn->vw_nick); g_hash_table_destroy(conn->users); *************** *** 325,328 **** --- 343,348 ---- if (conn->flood_timer) gaim_timeout_remove(conn->flood_timer); + g_list_foreach(conn->out_queue, bnet_list_destroy_all, NULL); + g_list_free(conn->out_queue); g_free(conn); Index: proto.h =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/proto.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** proto.h 13 Jan 2005 08:25:39 -0000 1.7 --- proto.h 27 Jan 2005 21:26:41 -0000 1.8 *************** *** 30,33 **** --- 30,34 ---- typedef struct _BNetWhispFromProcInfo BNetWhispFromProcInfo; typedef struct _BNetInfoProcInfo BNetInfoProcInfo; + typedef struct _BNetInfoProcInfo BNetErrorProcInfo; #include "conn.h" Index: bnet.h =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/bnet.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** bnet.h 8 Jan 2005 11:24:00 -0000 1.9 --- bnet.h 27 Jan 2005 21:26:41 -0000 1.10 *************** *** 35,40 **** #include <glib.h> #include <string.h> - #include <sys/socket.h> - #include <sys/types.h> #include <unistd.h> --- 35,38 ---- Index: proto.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/proto.c,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** proto.c 26 Jan 2005 16:48:29 -0000 1.18 --- proto.c 27 Jan 2005 21:26:41 -0000 1.19 *************** *** 125,129 **** p = (gchar *)(w + strlen(w)); else { ! if (!(p = strstr(w, k+1))) { err = TRUE; break; --- 125,129 ---- p = (gchar *)(w + strlen(w)); else { ! if (!(p = memmem(w, strlen(w), k+1, tt))) { err = TRUE; break; *************** *** 288,292 **** using = w->data; w = g_list_next(w); ! chan = w->data; /* We receive this message in reply to a /WHERE or /WHOIS command --- 288,292 ---- using = w->data; w = g_list_next(w); ! chan = w?w->data:"*Private Channel*"; /* We receive this message in reply to a /WHERE or /WHOIS command *************** *** 301,304 **** --- 301,322 ---- if (b) bnet_buddy_set_info(b, using, chan); + + if (conn->vw_nick && !strcmp(conn->vw_nick, norm)) { + gchar *msg; + + msg = g_strdup_printf("%s: %s\n%s: %s\n", + _("Game"), using, + _("Location"), chan); + + gaim_notify_message(NULL, + GAIM_NOTIFY_MSG_INFO, + _("Information"), + _("User is ONLINE"), + msg, NULL, NULL); + + g_free(msg); + g_free(conn->vw_nick); + conn->vw_nick = 0; + } } *************** *** 406,409 **** --- 424,428 ---- { "$x: $x, using $x in the game $x.", bnet_proto_info_fl_online }, { "$x: $x, offline", bnet_proto_info_fl_offline }, + { "$x is using $x in a private channel.", bnet_proto_info_where }, { "$x is using $x in the channel $x.", bnet_proto_info_where }, { "You are $x, using $x in the channel $x.", bnet_proto_info_whoami }, *************** *** 416,419 **** --- 435,468 ---- /****************************************************************************** + * Error Processing + *****************************************************************************/ + static void + bnet_proto_error_not_logged(BNetConn *conn, GList *args) { + gaim_debug_info("bnet", "bnet_proto_info_welcome\n"); + + if (conn->vw_nick) { + gchar *msg; + + msg = g_strdup_printf("%s %s\n", _("Nothing about"), conn->vw_nick); + + gaim_notify_message(NULL, + GAIM_NOTIFY_MSG_INFO, + _("Information"), + _("User is OFFLINE"), + msg, NULL, NULL); + + g_free(msg); + g_free(conn->vw_nick); + conn->vw_nick = 0; + } + } + + static BNetErrorProcInfo epi[] = { + { "That user is not logged on.", bnet_proto_error_not_logged } + }; + + #define PROTO_ERROR_MSGS_N (sizeof(epi) / sizeof(epi[0])) + + /****************************************************************************** * Proto Messages Processing *****************************************************************************/ *************** *** 585,590 **** --- 634,656 ---- bnet_proto_msg_error(BNetConn *conn, const gchar** args) { const gchar* error = args[0]; + const gchar *info[2] = { NULL, error }; + GList *w_args; + gint i; gaim_debug_info("bnet", "ERROR %s\n", error); + + for (i=0; i < PROTO_ERROR_MSGS_N; i++) { + if (bnet_proto_model_compare(conn, epi[i].model, (const gchar**)info, + &w_args)) { + epi[i].func(conn, w_args); + + if (w_args) { + g_list_foreach(w_args, bnet_list_destroy_all, NULL); + g_list_free(w_args); + } + + break; + } + } } Index: buddy.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/buddy.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** buddy.c 21 Jan 2005 05:45:52 -0000 1.13 --- buddy.c 27 Jan 2005 21:26:41 -0000 1.14 *************** *** 83,87 **** BNetConn *conn = BNET_CONN(gc->proto_data); ! bnet_conn_send(conn, "/whois %s\n", who); } --- 83,91 ---- BNetConn *conn = BNET_CONN(gc->proto_data); ! if (conn->vw_nick) ! g_free(conn->vw_nick); ! conn->vw_nick = g_strdup(gaim_normalize(conn->account, who)); ! ! bnet_conn_send(conn, "/where %s\n", who); } *************** *** 238,246 **** void bnet_buddy_set_info(BNetBuddy *b, const gchar *game, const gchar *location) { ! if (!b->game || strcmp(b->game, game)) { g_free(b->game); b->game = g_strdup(game); } ! if (!b->location || strcmp(b->location, location)) { g_free(b->location); b->location = g_strdup(location); --- 242,250 ---- void bnet_buddy_set_info(BNetBuddy *b, const gchar *game, const gchar *location) { ! if (game && (!b->game || strcmp(b->game, game))) { g_free(b->game); b->game = g_strdup(game); } ! if (location && (!b->location || strcmp(b->location, location))) { g_free(b->location); b->location = g_strdup(location); |
From: Don S. <ri...@us...> - 2005-01-26 17:12:01
|
Update of /cvsroot/gaim-bnet/htdocs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22853 Modified Files: faq.php Log Message: Fixing unterminated anchor Index: faq.php =================================================================== RCS file: /cvsroot/gaim-bnet/htdocs/faq.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** faq.php 26 Jan 2005 17:09:18 -0000 1.1 --- faq.php 26 Jan 2005 17:11:37 -0000 1.2 *************** *** 16,21 **** <p> ! <a name="Servers" /> ! <b>Servers</b> <dl> <dt id="q1"><b>What are the available Battle.net servers?</b></dt> --- 16,20 ---- <p> ! <a name="Servers"><b>Servers</b></a> <dl> <dt id="q1"><b>What are the available Battle.net servers?</b></dt> |
From: Don S. <ri...@us...> - 2005-01-26 17:09:27
|
Update of /cvsroot/gaim-bnet/htdocs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22268 Modified Files: header.php Added Files: faq.php Log Message: Adding FAQ Index: header.php =================================================================== RCS file: /cvsroot/gaim-bnet/htdocs/header.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** header.php 13 Jan 2005 18:56:42 -0000 1.3 --- header.php 26 Jan 2005 17:09:18 -0000 1.4 *************** *** 22,26 **** <a href="index.php#news">News</a> | <a href="index.php#downloads">Downloads</a> | ! <a href="docs.php">Documentation</a> </td> <td align="right"> --- 22,27 ---- <a href="index.php#news">News</a> | <a href="index.php#downloads">Downloads</a> | ! <a href="docs.php">Documentation</a> | ! <a href="faq.php">FAQ</a> </td> <td align="right"> --- NEW FILE: faq.php --- <?php /** * @version $Id: faq.php,v 1.1 2005/01/26 17:09:18 rizzo Exp $ */ require_once("header.php") ?> <h2>Frequently Asked Questions</h2> <p> <b>Servers</b> <ul> <li><a href="#q1">What are the available Battle.net servers?</a></li> <li><a href="#q2">Can I log onto any of these Battle.net servers with my account?</a></li> </ul> </p> <p> <a name="Servers" /> <b>Servers</b> <dl> <dt id="q1"><b>What are the available Battle.net servers?</b></dt> <dd> <ul> <li>asia.battle.net</li> <li>europe.battle.net</li> <li>useast.battle.net</li> <li>uswest.battle.net</li> </ul> </dd> <dt id="q2"><b>Can I log onto any of these Battle.net servers with my account?</b></dt> <dd> No. You can only log into the Battle.net server with which you registered that account. Logins are not transferred across servers. </dd> </dl> </p> <?php require_once("footer.php") ?> |
From: Gary K. <amc...@us...> - 2005-01-26 16:48:38
|
Update of /cvsroot/gaim-bnet/gaim-bnet/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16823/src Modified Files: proto.c Log Message: Some sanity fixes (is that literally possible?) anyways.. lets use glib a little bit more since it save us some work :) Index: proto.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/proto.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** proto.c 26 Jan 2005 16:44:41 -0000 1.17 --- proto.c 26 Jan 2005 16:48:29 -0000 1.18 *************** *** 72,76 **** static void bnet_list_destroy_all(gpointer data, gpointer user_data) { ! free(data); } --- 72,76 ---- static void bnet_list_destroy_all(gpointer data, gpointer user_data) { ! g_free(data); } *************** *** 131,135 **** } ! q = (gchar*)malloc(p-w+1); memcpy(q, w, p-w); q[p-w] = 0; --- 131,135 ---- } ! q = g_new0(gchar, p - w + 1); memcpy(q, w, p-w); q[p-w] = 0; |
From: Don S. <ri...@us...> - 2005-01-26 16:44:50
|
Update of /cvsroot/gaim-bnet/gaim-bnet/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15962/src Modified Files: proto.c Log Message: Using strstr() instead of memmem() Index: proto.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/proto.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** proto.c 21 Jan 2005 05:45:52 -0000 1.16 --- proto.c 26 Jan 2005 16:44:41 -0000 1.17 *************** *** 125,129 **** p = (gchar *)(w + strlen(w)); else { ! if (!(p = memmem(w, strlen(w), k+1, tt))) { err = TRUE; break; --- 125,129 ---- p = (gchar *)(w + strlen(w)); else { ! if (!(p = strstr(w, k+1))) { err = TRUE; break; |
From: Gary K. <amc...@us...> - 2005-01-21 05:46:03
|
Update of /cvsroot/gaim-bnet/gaim-bnet/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15620/src Modified Files: bnet.c buddy.c buddy.h conn.c conn.h proto.c Log Message: updated from dario.. Index: bnet.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/bnet.c,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** bnet.c 17 Jan 2005 01:56:50 -0000 1.32 --- bnet.c 21 Jan 2005 05:45:52 -0000 1.33 *************** *** 126,132 **** --- 126,147 ---- } + static GList *bnet_away_states(GaimConnection *gc) { + return g_list_append(NULL, (gpointer)GAIM_AWAY_CUSTOM); + } + static void bnet_set_away(GaimConnection *gc, const char *state, const char *msg) { + BNetConn *conn = BNET_CONN(gc->proto_data); + if (gc->away) { + g_free(gc->away); + gc->away = NULL; + } + if (msg) { + gc->away = g_strdup(msg); + bnet_conn_send(conn, "/away %s\n", msg); + } else + bnet_conn_send(conn, "/away\n"); + } /****************************************************************************** *************** *** 146,151 **** bnet_buddy_emblems, /* list_emblems */ NULL, /* status_text */ ! NULL, /* tooltip_text */ ! NULL, /* away_states */ blist_node_menu, /* blist_node_menu */ bnet_chat_info, /* chat_info */ --- 161,166 ---- bnet_buddy_emblems, /* list_emblems */ NULL, /* status_text */ ! bnet_buddy_tooltip_text, /* tooltip_text */ ! bnet_away_states, /* away_states */ blist_node_menu, /* blist_node_menu */ bnet_chat_info, /* chat_info */ *************** *** 157,161 **** NULL, /* send_typing */ bnet_user_info, /* get_info */ ! NULL, /* set_away */ NULL, /* set_idle */ NULL, /* change_password */ --- 172,176 ---- NULL, /* send_typing */ bnet_user_info, /* get_info */ ! bnet_set_away, /* set_away */ NULL, /* set_idle */ NULL, /* change_password */ Index: conn.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/conn.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** conn.c 17 Jan 2005 01:56:50 -0000 1.8 --- conn.c 21 Jan 2005 05:45:52 -0000 1.9 *************** *** 66,70 **** queue = conn->out_queue; ! while (queue && conn->flood_sent + strlen(cur = queue->data) < BNET_FLOOD_MAX) { ret = send(conn->fd, cur, strlen(cur), 0); if (ret > 0) --- 66,71 ---- queue = conn->out_queue; ! while (queue && (cur = queue->data, !conn->flood_sent || ! conn->flood_sent + strlen(cur) < BNET_FLOOD_MAX)) { ret = send(conn->fd, cur, strlen(cur), 0); if (ret > 0) *************** *** 89,94 **** else conn->flood_sent = 0; - gaim_debug_info("bnet", "conn->flood_sent now %u (queue %p)\n", - conn->flood_sent, conn->out_queue); bnet_conn_out_queue_check(conn); --- 90,93 ---- *************** *** 129,132 **** --- 128,135 ---- static void bnet_conn_parse_msg(BNetConn *conn, const gchar *msg) { + GaimConnection *gc; + + gc = gaim_account_get_connection(conn->account); + switch(conn->state) { case BNET_CS_SOCK: *************** *** 147,155 **** break; case BNET_CS_VRFY: ! if (!strstr(msg, "incorrect")) { ! GaimConnection *gc; ! ! gc = gaim_account_get_connection(conn->account); bnet_conn_update_progress(conn, BNET_CS_CONN); gaim_connection_set_state(gc, GAIM_CONNECTED); --- 150,156 ---- break; case BNET_CS_VRFY: ! conn->vrfy_attempts++; + if (!strstr(msg, "incorrect")) { bnet_conn_update_progress(conn, BNET_CS_CONN); gaim_connection_set_state(gc, GAIM_CONNECTED); *************** *** 157,160 **** --- 158,166 ---- bnet_conn_request_friends_list(conn); } else { + if (conn->vrfy_attempts > 1) + /* We must stop to try... our user/pass are not valid + */ + gaim_connection_error(gc, _("Invalid user/pass")); + bnet_conn_update_progress(conn, BNET_CS_USER); } *************** *** 311,316 **** if (conn->chan) g_free(conn->chan); - if (conn->away) - g_free(conn->away); if (conn->last_stat.nick) g_free(conn->last_stat.nick); --- 317,320 ---- Index: conn.h =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/conn.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** conn.h 17 Jan 2005 01:56:50 -0000 1.5 --- conn.h 21 Jan 2005 05:45:52 -0000 1.6 *************** *** 50,53 **** --- 50,54 ---- BNetConnState state; + guint vrfy_attempts; gint fd; *************** *** 64,69 **** GHashTable *users; - gchar *away; - struct { gchar *nick; --- 65,68 ---- *************** *** 73,76 **** --- 72,76 ---- GHashTable *buddies; + gboolean welcome; gboolean fl_listing; }; Index: proto.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/proto.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** proto.c 17 Jan 2005 01:56:50 -0000 1.15 --- proto.c 21 Jan 2005 05:45:52 -0000 1.16 *************** *** 51,57 **** if (buddy->fl_position == -1) { ! bnet_conn_send(conn, "/friends add %s\n", buddy->name); ! bnet_conn_send(conn, "/where %s\n", buddy->name); ! buddy->fl_position = 0; } } --- 51,70 ---- if (buddy->fl_position == -1) { ! if (!buddy->new_entry) { ! /* Consider server list authoritative... if buddy was added by ! * local list and don't exist on server, then delete it ! */ ! GaimBuddy *gb = gaim_find_buddy(conn->account, buddy->name); ! g_return_if_fail(gb); ! ! gaim_blist_remove_buddy(gb); ! g_hash_table_remove(conn->buddies, buddy->name); ! } else { ! /* Buddy is added manually now... then we should add it to ! * the server list too ! */ ! bnet_conn_send(conn, "/friends add %s\n", buddy->name); ! bnet_conn_send(conn, "/where %s\n", buddy->name); ! } } } *************** *** 63,71 **** static void ! bnet_stat_resolve(BNetGameStat *stat, const gchar *msg) ! { bzero(stat, sizeof(BNetGameStat)); - - gaim_debug_info("bnet", "msg(%s)\n", msg); sscanf(msg, "%u-%u-%u", &stat->win, &stat->loss, &stat->disc); } --- 76,81 ---- static void ! bnet_stat_resolve(BNetGameStat *stat, const gchar *msg) { bzero(stat, sizeof(BNetGameStat)); sscanf(msg, "%u-%u-%u", &stat->win, &stat->loss, &stat->disc); } *************** *** 73,78 **** static gboolean bnet_proto_model_compare(BNetConn *conn, const gchar* model, ! const gchar **msginfo, GList **args) ! { const gchar *nick = msginfo[0]; const gchar *msg = msginfo[1]; --- 83,87 ---- static gboolean bnet_proto_model_compare(BNetConn *conn, const gchar* model, ! const gchar **msginfo, GList **args) { const gchar *nick = msginfo[0]; const gchar *msg = msginfo[1]; *************** *** 162,171 **** gc = gaim_account_get_connection(conn->account); serv_got_update(gc, nick, TRUE, 0, 0, 0, 0); } static void bnet_proto_whispf_join(BNetConn *conn, const gchar *nick, GList *args) { ! /* Nothing to do here */ gaim_debug_info("bnet", "bnet_proto_whispf_join\n"); } --- 171,195 ---- gc = gaim_account_get_connection(conn->account); serv_got_update(gc, nick, TRUE, 0, 0, 0, 0); + + bnet_conn_send(conn, "/where %s\n", nick); } static void bnet_proto_whispf_join(BNetConn *conn, const gchar *nick, GList *args) { ! BNetBuddy *b; ! GList *w = args; ! ! gchar *game, *room; ! gaim_debug_info("bnet", "bnet_proto_whispf_join\n"); + + game = w->data; + w = g_list_next(w); + room = w->data; + + b = bnet_buddy_hard_lookup(conn, nick); + g_return_if_fail(b); + + bnet_buddy_set_info(b, game, room); } *************** *** 194,197 **** --- 218,223 ---- bnet_proto_info_welcome(BNetConn *conn, GList *args) { gaim_debug_info("bnet", "bnet_proto_info_welcome\n"); + + conn->welcome = TRUE; } *************** *** 219,222 **** --- 245,249 ---- sscanf(n, "%u", &b->fl_position); + bnet_buddy_set_info(b, using, chan); gc = gaim_account_get_connection(conn->account); *************** *** 250,254 **** --- 277,283 ---- bnet_proto_info_where(BNetConn *conn, GList *args) { GaimConnection *gc; + BNetBuddy *b; GList *w = args; + const gchar *norm; gchar *nick, *using, *chan; *************** *** 266,269 **** --- 295,304 ---- gc = gaim_account_get_connection(conn->account); serv_got_update(gc, nick, TRUE, 0, 0, 0, 0); + + norm = gaim_normalize(conn->account, nick); + b = g_hash_table_lookup(conn->buddies, norm); + + if (b) + bnet_buddy_set_info(b, using, chan); } Index: buddy.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/buddy.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** buddy.c 17 Jan 2005 01:56:50 -0000 1.12 --- buddy.c 21 Jan 2005 05:45:52 -0000 1.13 *************** *** 116,121 **** buddy->norm = g_strdup(norm); buddy->name = g_strdup(name); - buddy->flags = 0; - buddy->location = 0; buddy->fl_position = -1; --- 116,119 ---- *************** *** 129,133 **** g_free(buddy->norm); g_free(buddy->name); ! g_free(buddy->flags); g_free(buddy->location); g_free(buddy); --- 127,131 ---- g_free(buddy->norm); g_free(buddy->name); ! g_free(buddy->game); g_free(buddy->location); g_free(buddy); *************** *** 146,149 **** --- 144,149 ---- if (!g_hash_table_lookup(conn->buddies, norm)) { b = bnet_buddy_new(norm, buddy->name); + if (conn->welcome) + b->new_entry = TRUE; g_hash_table_insert(conn->buddies, b->norm, b); *************** *** 178,181 **** --- 178,182 ---- b = bnet_buddy_new(norm, name); + b->new_entry = TRUE; g_hash_table_insert(conn->buddies, b->norm, b); } *************** *** 201,204 **** --- 202,251 ---- } + gchar * + bnet_buddy_tooltip_text(GaimBuddy *b) { + BNetConn *conn; + BNetBuddy *bb; + GString *ret = g_string_new(""); + const gchar *norm; + + conn = BNET_CONN(b->account->gc->proto_data); + norm = gaim_normalize(conn->account, b->name); + + if ((bb = g_hash_table_lookup(conn->buddies, norm))) { + switch (b->present) { + case GAIM_BUDDY_SIGNING_OFF: + break; + case GAIM_BUDDY_OFFLINE: + g_string_append_printf(ret, + "\n<b>%s:</b> Offline", _("Status")); + break; + case GAIM_BUDDY_ONLINE: + if (bb->game) + g_string_append_printf(ret, + "\n<b>%s:</b> %s", _("Game"), bb->game); + if (bb->location) + g_string_append_printf(ret, + "\n<b>%s:</b> %s", _("Location"), bb->location); + break; + case GAIM_BUDDY_SIGNING_ON: + break; + } + } + + return g_string_free(ret, FALSE); + } + + void + bnet_buddy_set_info(BNetBuddy *b, const gchar *game, const gchar *location) { + if (!b->game || strcmp(b->game, game)) { + g_free(b->game); + b->game = g_strdup(game); + } + if (!b->location || strcmp(b->location, location)) { + g_free(b->location); + b->location = g_strdup(location); + } + } + /****************************************************************************** * Buddies API Index: buddy.h =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/buddy.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** buddy.h 13 Jan 2005 15:50:54 -0000 1.8 --- buddy.h 21 Jan 2005 05:45:52 -0000 1.9 *************** *** 41,47 **** gchar* norm; gchar* name; ! gchar* flags; gchar* location; gint fl_position; }; --- 41,48 ---- gchar* norm; gchar* name; ! gchar* game; gchar* location; gint fl_position; + gboolean new_entry; }; *************** *** 66,69 **** --- 67,72 ---- void bnet_buddy_remove(GaimConnection *gc, GaimBuddy *buddy, GaimGroup *group); void bnet_buddy_emblems(GaimBuddy *buddy, char **se, char **sw, char **nw, char **ne); + gchar *bnet_buddy_tooltip_text(GaimBuddy *b); + void bnet_buddy_set_info(BNetBuddy *b, const gchar *game, const gchar *location); /* Buddies API */ |
From: Don S. <ri...@us...> - 2005-01-18 21:49:11
|
Update of /cvsroot/gaim-bnet/gaim-bnet In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16980 Modified Files: .cvsignore ChangeLog Log Message: Some updates Index: .cvsignore =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/.cvsignore,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** .cvsignore 17 Jan 2005 01:49:52 -0000 1.6 --- .cvsignore 18 Jan 2005 21:48:25 -0000 1.7 *************** *** 19,21 **** --- 19,23 ---- missing stamp-h1 + stamp-h + stamp-h.in *.diff Index: ChangeLog =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/ChangeLog,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ChangeLog 28 Jul 2004 15:15:31 -0000 1.2 --- ChangeLog 18 Jan 2005 21:48:26 -0000 1.3 *************** *** 1,6 **** ! # ChangeLog for gaim-bnet ! # $Id$ ! ! 27 Jul 2004; Don Seiler <do...@se...> ! Started development. --- 1,10 ---- ! ChangeLog for gaim-bnet ! $Id$ + *gaim-bnet-0.1.0cvs: + New Features: + * Logging into Battle.net + * Chat public chat rooms + * Private (whisper) chat with users + * Adding friends to buddy list + * Checking buddy stats via buddy node menu |
From: Gary K. <amc...@us...> - 2005-01-17 01:57:01
|
Update of /cvsroot/gaim-bnet/gaim-bnet/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24966/src Modified Files: bnet.c buddy.c conn.c conn.h proto.c Log Message: Adding dario's latest patch... Index: bnet.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/bnet.c,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** bnet.c 15 Jan 2005 02:27:01 -0000 1.31 --- bnet.c 17 Jan 2005 01:56:50 -0000 1.32 *************** *** 54,59 **** } ! static void bnet_send_raw_cmd(GaimPluginAction *action) ! { GaimConnection *gc = (GaimConnection*)action->context; --- 54,58 ---- } ! static void bnet_send_raw_cmd(GaimPluginAction *action) { GaimConnection *gc = (GaimConnection*)action->context; *************** *** 68,73 **** } ! static GList *bnet_actions(GaimPlugin *plugin, gpointer context) ! { //GaimConnection *gc = (GaimConnection*)context; GList *m = NULL; --- 67,71 ---- } ! static GList *bnet_actions(GaimPlugin *plugin, gpointer context) { //GaimConnection *gc = (GaimConnection*)context; GList *m = NULL; Index: buddy.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/buddy.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** buddy.c 13 Jan 2005 22:43:25 -0000 1.11 --- buddy.c 17 Jan 2005 01:56:50 -0000 1.12 *************** *** 79,83 **** } - void bnet_user_info(GaimConnection *gc, const gchar *who) { --- 79,82 ---- *************** *** 160,164 **** const gchar *norm; ! gaim_debug_info("bnet", "bnet_buddy_add_default\n"); g_return_val_if_fail(conn, NULL); --- 159,163 ---- const gchar *norm; ! gaim_debug_info("bnet", "bnet_buddy_hard_lookup\n"); g_return_val_if_fail(conn, NULL); Index: proto.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/proto.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** proto.c 13 Jan 2005 15:50:54 -0000 1.14 --- proto.c 17 Jan 2005 01:56:50 -0000 1.15 *************** *** 62,65 **** --- 62,74 ---- } + static void + bnet_stat_resolve(BNetGameStat *stat, const gchar *msg) + { + bzero(stat, sizeof(BNetGameStat)); + + gaim_debug_info("bnet", "msg(%s)\n", msg); + sscanf(msg, "%u-%u-%u", &stat->win, &stat->loss, &stat->disc); + } + static gboolean bnet_proto_model_compare(BNetConn *conn, const gchar* model, *************** *** 100,110 **** case 'x': if (!(p = strchr(k, '$'))) ! tt = strlen(k) - 1; else tt = p-k - 1; ! if (!(p = memmem(w, strlen(w), k+1, tt))) { ! err = TRUE; ! break; } --- 109,123 ---- case 'x': if (!(p = strchr(k, '$'))) ! tt = strlen(k+1); else tt = p-k - 1; ! if (!tt) ! p = (gchar *)(w + strlen(w)); ! else { ! if (!(p = memmem(w, strlen(w), k+1, tt))) { ! err = TRUE; ! break; ! } } *************** *** 282,285 **** --- 295,367 ---- } + static void + bnet_proto_info_record_bg(BNetConn *conn, GList *args) { + gchar *nick; + + gaim_debug_info("bnet", "bnet_proto_info_record_bg\n"); + + nick = args->data; + + if (conn->last_stat.nick) + g_free(conn->last_stat.nick); + + conn->last_stat.nick = g_strdup(nick); + } + + static void + bnet_proto_info_record_n(BNetConn *conn, GList *args) { + BNetGameStat *stat; + gchar *msg; + + gaim_debug_info("bnet", "bnet_proto_info_record_n\n"); + + msg = args->data; + + stat = &conn->last_stat.normal; + bnet_stat_resolve(stat, msg); + } + + static void + bnet_proto_info_record_l(BNetConn *conn, GList *args) { + BNetGameStat *normal; + BNetGameStat ladder; + gchar *msg; + gchar *notice; + + gaim_debug_info("bnet", "bnet_proto_info_record_l\n"); + + normal = &conn->last_stat.normal; + + msg = args->data; + bnet_stat_resolve(&ladder, msg); + + notice = g_strdup_printf("%s stats are:\n" + "Normal games:\n" + " %u win\n" + " %u loss\n" + " %u disc\n" + "Ladder games:\n" + " %u win\n" + " %u loss\n" + " %u disc\n", + conn->last_stat.nick, + normal->win, + normal->loss, + normal->disc, + ladder.win, + ladder.loss, + ladder.disc); + + gaim_notify_message(NULL, + GAIM_NOTIFY_MSG_INFO, + "Information", + "User stats", + notice, + NULL, + NULL); + + g_free(notice); + } + static BNetInfoProcInfo ipi[] = { { "Welcome to Battle.net!", bnet_proto_info_welcome }, *************** *** 290,294 **** { "$x: $x, offline", bnet_proto_info_fl_offline }, { "$x is using $x in the channel $x.", bnet_proto_info_where }, ! { "You are $x, using $x in the channel $x.", bnet_proto_info_whoami } }; --- 372,379 ---- { "$x: $x, offline", bnet_proto_info_fl_offline }, { "$x is using $x in the channel $x.", bnet_proto_info_where }, ! { "You are $x, using $x in the channel $x.", bnet_proto_info_whoami }, ! { "$x's record:", bnet_proto_info_record_bg }, ! { "Normal games: $x", bnet_proto_info_record_n }, ! { "Ladder games: $x", bnet_proto_info_record_l } }; *************** *** 544,547 **** --- 629,639 ---- gchar* args[PROTO_MAX_ARGS]; + if (!strcmp(msg, "You have been disconnected for flooding.")) { + GaimConnection *gc; + gc = gaim_account_get_connection(conn->account); + gaim_connection_error(gc, _("You have been disconnected for flooding")); + return; + } + for (i=0,l=0,b=0,e=strlen(msg); i < PROTO_MAX_ARGS; i++,l++,b=l) { if (msg[l]=='"') Index: conn.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/conn.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** conn.c 13 Jan 2005 08:25:39 -0000 1.7 --- conn.c 17 Jan 2005 01:56:50 -0000 1.8 *************** *** 24,27 **** --- 24,30 ---- #include "proto.h" + #define BNET_FLOOD_CHARPERSEC 10 + #define BNET_FLOOD_MAX 50 + static const gchar *status[] = { N_("Connection to server"), *************** *** 33,56 **** }; ! gint bnet_conn_send(BNetConn *conn, const gchar *fmt, ...) { va_list args; ! gchar *buff; ! gint ret; ! g_return_val_if_fail(conn, -1); ! g_return_val_if_fail(fmt, -1); va_start(args, fmt); ! buff = g_strdup_vprintf(fmt, args); va_end(args); ! if (!buff) ! return -1; ! ret = send(conn->fd, buff, strlen(buff), 0); ! g_free(buff); ! return ret; } --- 36,101 ---- }; ! void bnet_conn_send(BNetConn *conn, const gchar *fmt, ...) { va_list args; ! gchar *buf; ! g_return_if_fail(conn); ! g_return_if_fail(fmt); va_start(args, fmt); ! buf = g_strdup_vprintf(fmt, args); va_end(args); ! if (buf) ! bnet_conn_out_queue_push(conn, buf); ! } ! void ! bnet_conn_out_queue_push(BNetConn *conn, gchar *msg) { ! conn->out_queue = g_list_append(conn->out_queue, msg); ! bnet_conn_out_queue_check(conn); ! } ! void ! bnet_conn_out_queue_check(BNetConn *conn) { ! GList *queue; ! gchar *cur; ! gint ret; ! ! queue = conn->out_queue; ! ! while (queue && conn->flood_sent + strlen(cur = queue->data) < BNET_FLOOD_MAX) { ! ret = send(conn->fd, cur, strlen(cur), 0); ! if (ret > 0) ! conn->flood_sent += ret; ! ! g_free(cur); ! queue = g_list_remove_link(queue, queue); ! } ! ! conn->out_queue = queue; ! ! if (conn->flood_sent && !conn->flood_timer) ! conn->flood_timer = gaim_timeout_add(1000, bnet_conn_out_queue_to, conn); ! } ! ! gboolean ! bnet_conn_out_queue_to(gpointer p) { ! BNetConn *conn = BNET_CONN(p); ! ! if (conn->flood_sent >= BNET_FLOOD_CHARPERSEC) ! conn->flood_sent -= BNET_FLOOD_CHARPERSEC; ! else ! conn->flood_sent = 0; ! gaim_debug_info("bnet", "conn->flood_sent now %u (queue %p)\n", ! conn->flood_sent, conn->out_queue); ! ! bnet_conn_out_queue_check(conn); ! ! if (!conn->flood_sent) ! conn->flood_timer = 0; ! ! return conn->flood_sent != 0; } *************** *** 146,150 **** return; } else if (len == 0) { ! /* Remote probably closed the connection */ return; } --- 191,195 ---- return; } else if (len == 0) { ! gaim_connection_error(gc, _("Server has disconnected")); return; } *************** *** 153,157 **** conn->inbuf[conn->inbuf_used] = '\0'; ! /* We must swtich between the two cases beacuse input is _NOT_ line * buffered in the BNET_CS_USER and BNET_CS_PASS states */ --- 198,202 ---- conn->inbuf[conn->inbuf_used] = '\0'; ! /* We must switch between the two cases beacuse input is _NOT_ line * buffered in the BNET_CS_USER and BNET_CS_PASS states */ *************** *** 160,166 **** cur = conn->inbuf; ! while(cur < conn->inbuf + conn->inbuf_used && ! ((end = strstr(cur, "\r\n")) || (end = strstr(cur, "\n")))) ! { gint step = (*end == '\r' ? 2 : 1); --- 205,210 ---- cur = conn->inbuf; ! while (cur < conn->inbuf + conn->inbuf_used && ! ((end = strstr(cur, "\r\n")) || (end = strstr(cur, "\n")))) { gint step = (*end == '\r' ? 2 : 1); *************** *** 173,177 **** } - /* mmm leftovers */ if (cur != conn->inbuf + conn->inbuf_used) { conn->inbuf_used -= (cur - conn->inbuf); --- 217,220 ---- *************** *** 256,264 **** /* we need to remove the input cb that we created... */ ! if(gc->inpa > 0) gaim_input_remove(gc->inpa); conn = BNET_CONN(gc->proto_data); g_free(conn); ! conn = NULL; } --- 299,327 ---- /* we need to remove the input cb that we created... */ ! if (gc->inpa > 0) gaim_input_remove(gc->inpa); conn = BNET_CONN(gc->proto_data); + g_return_if_fail(conn); + + g_free(conn->inbuf); + + if (conn->nick) + g_free(conn->nick); + if (conn->chan) + g_free(conn->chan); + if (conn->away) + g_free(conn->away); + if (conn->last_stat.nick) + g_free(conn->last_stat.nick); + + g_hash_table_destroy(conn->users); + g_hash_table_destroy(conn->buddies); + + if (conn->flood_timer) + gaim_timeout_remove(conn->flood_timer); + g_free(conn); ! ! gc->proto_data = NULL; } Index: conn.h =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/conn.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** conn.h 13 Jan 2005 08:25:39 -0000 1.4 --- conn.h 17 Jan 2005 01:56:50 -0000 1.5 *************** *** 25,28 **** --- 25,29 ---- typedef struct _BNetConn BNetConn; + typedef struct _BNetGameStat BNetGameStat; typedef enum _BNetConnState BNetConnState; *************** *** 38,41 **** --- 39,46 ---- }; + struct _BNetGameStat { + guint win, loss, disc; + }; + struct _BNetConn { GaimAccount *account; *************** *** 51,54 **** --- 56,63 ---- guint inbuf_used; + guint flood_timer; + guint flood_sent; + GList *out_queue; + gchar *nick; gchar *chan; *************** *** 57,60 **** --- 66,74 ---- gchar *away; + struct { + gchar *nick; + BNetGameStat normal; + } last_stat; + GHashTable *buddies; *************** *** 66,70 **** #endif /* __cplusplus */ ! gint bnet_conn_send(BNetConn *conn, const gchar *fmt, ...); void bnet_conn_update_progress(BNetConn *conn, BNetConnState cs); void bnet_conn_request_friends_list(BNetConn *conn); --- 80,87 ---- #endif /* __cplusplus */ ! void bnet_conn_send(BNetConn *conn, const gchar *fmt, ...); ! void bnet_conn_out_queue_push(BNetConn *conn, gchar *msg); ! void bnet_conn_out_queue_check(BNetConn *conn); ! gboolean bnet_conn_out_queue_to(gpointer p); void bnet_conn_update_progress(BNetConn *conn, BNetConnState cs); void bnet_conn_request_friends_list(BNetConn *conn); |
From: Gary K. <amc...@us...> - 2005-01-17 01:50:02
|
Update of /cvsroot/gaim-bnet/gaim-bnet In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23740 Modified Files: .cvsignore Log Message: avoid some annoyance.. Index: .cvsignore =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/.cvsignore,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** .cvsignore 8 Jan 2005 19:14:44 -0000 1.5 --- .cvsignore 17 Jan 2005 01:49:52 -0000 1.6 *************** *** 19,21 **** missing stamp-h1 ! --- 19,21 ---- missing stamp-h1 ! *.diff |
From: Don S. <ri...@us...> - 2005-01-15 02:29:37
|
Update of /cvsroot/gaim-bnet/gaim-bnet/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7718/src Modified Files: bnet.c Log Message: Fixed a warning and fixed that author line Index: bnet.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/bnet.c,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** bnet.c 14 Jan 2005 15:27:50 -0000 1.30 --- bnet.c 15 Jan 2005 02:27:01 -0000 1.31 *************** *** 102,107 **** GList *m = NULL; - g_return_if_fail(node != NULL); - if(!GAIM_BLIST_NODE_IS_BUDDY(node)) return NULL; --- 102,105 ---- *************** *** 217,221 **** NULL, /* summary */ NULL, /* description */ ! "Don Seiler <do...@se...>", /* author */ BNET_WEBSITE, /* homepage */ NULL, /* load */ --- 215,219 ---- NULL, /* summary */ NULL, /* description */ ! "Gary Kramlich, Don Seiler, Dario Zilocchi", /* author */ BNET_WEBSITE, /* homepage */ NULL, /* load */ |
From: Don S. <ri...@us...> - 2005-01-14 15:28:03
|
Update of /cvsroot/gaim-bnet/gaim-bnet/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28828/src Modified Files: bnet.c Log Message: Doing buddy list the right way Index: bnet.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/bnet.c,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** bnet.c 14 Jan 2005 05:25:45 -0000 1.29 --- bnet.c 14 Jan 2005 15:27:50 -0000 1.30 *************** *** 81,144 **** } ! void ! bnet_user_stats(GaimBlistNode *node, gpointer data) { GaimBuddy *buddy; ! GaimAccount *account; ! GaimConnection *conn; g_return_if_fail(GAIM_BLIST_NODE_IS_BUDDY(node)); buddy = (GaimBuddy *) node; ! account = buddy->account; ! //conn = gaim_account_get_connection(account); ! conn = account->gc; gaim_debug_info("bnet_user_stats", "I want to call stats for %s in %s\n", buddy->name, data); ! bnet_conn_send(conn->proto_data, "/stats %s %s\n", buddy->name, data); } ! /* ! * Statistics sub-menu ! */ ! static void blist_node_menu(GaimBlistNode *node, GList **menu, gpointer data) { GaimBlistNodeAction *act; g_return_if_fail(node != NULL); - g_return_if_fail(menu != NULL); - - if(! GAIM_BLIST_NODE_IS_BUDDY(node)) - return; ! *menu = g_list_append(*menu, NULL); act = gaim_blist_node_action_new(_("StarCraft Stats"), ! bnet_user_stats, ! "STAR"); ! *menu = g_list_append(*menu, act); act = gaim_blist_node_action_new(_("StarCraft Broodwar Stats"), ! bnet_user_stats, ! "SEXP"); ! *menu = g_list_append(*menu, act); act = gaim_blist_node_action_new(_("WarCraft II Battle.net Edition Stats"), ! bnet_user_stats, ! "W2BN"); ! *menu = g_list_append(*menu, act); act = gaim_blist_node_action_new(_("WarCraft III Stats"), ! bnet_user_stats, ! "WAR3"); ! *menu = g_list_append(*menu, act); act = gaim_blist_node_action_new(_("WarCraft III The Frozen Throne Stats"), ! bnet_user_stats, ! "W3XP"); ! *menu = g_list_append(*menu, act); ! ! *menu = g_list_append(*menu, NULL); } --- 81,131 ---- } ! static void bnet_user_stats(GaimBlistNode *node, gpointer data) { GaimBuddy *buddy; ! GaimConnection *gc; ! BNetConn *conn; g_return_if_fail(GAIM_BLIST_NODE_IS_BUDDY(node)); buddy = (GaimBuddy *) node; ! gc = gaim_account_get_connection(buddy->account); ! conn = gc->proto_data; gaim_debug_info("bnet_user_stats", "I want to call stats for %s in %s\n", buddy->name, data); ! bnet_conn_send(conn, "/stats %s %s\n", buddy->name, data); } ! static GList *blist_node_menu(GaimBlistNode *node) { GaimBlistNodeAction *act; + GList *m = NULL; g_return_if_fail(node != NULL); ! if(!GAIM_BLIST_NODE_IS_BUDDY(node)) ! return NULL; act = gaim_blist_node_action_new(_("StarCraft Stats"), ! bnet_user_stats, "STAR"); ! m = g_list_append(m, act); act = gaim_blist_node_action_new(_("StarCraft Broodwar Stats"), ! bnet_user_stats, "SEXP"); ! m = g_list_append(m, act); act = gaim_blist_node_action_new(_("WarCraft II Battle.net Edition Stats"), ! bnet_user_stats, "W2BN"); ! m = g_list_append(m, act); act = gaim_blist_node_action_new(_("WarCraft III Stats"), ! bnet_user_stats, "WAR3"); ! m = g_list_append(m, act); act = gaim_blist_node_action_new(_("WarCraft III The Frozen Throne Stats"), ! bnet_user_stats, "W3XP"); ! m = g_list_append(m, act); + return m; } *************** *** 165,169 **** NULL, /* tooltip_text */ NULL, /* away_states */ ! NULL, /* blist_node_menu */ bnet_chat_info, /* chat_info */ NULL, /* chat_info_defaults */ --- 152,156 ---- NULL, /* tooltip_text */ NULL, /* away_states */ ! blist_node_menu, /* blist_node_menu */ bnet_chat_info, /* chat_info */ NULL, /* chat_info_defaults */ *************** *** 243,247 **** static void init_plugin(GaimPlugin *plugin) { - void *blist_handle = gaim_blist_get_handle(); #if 0 GList *server_list = NULL; --- 230,233 ---- *************** *** 258,264 **** - gaim_signal_connect(blist_handle, "blist-node-extended-menu", plugin, - GAIM_CALLBACK(blist_node_menu), NULL); - GaimAccountOption *option; --- 244,247 ---- |
From: Don S. <ri...@us...> - 2005-01-14 05:25:54
|
Update of /cvsroot/gaim-bnet/gaim-bnet/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2518/src Modified Files: bnet.c Log Message: Some formatting Index: bnet.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/bnet.c,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** bnet.c 14 Jan 2005 04:52:59 -0000 1.28 --- bnet.c 14 Jan 2005 05:25:45 -0000 1.29 *************** *** 104,108 **** static void blist_node_menu(GaimBlistNode *node, GList **menu, gpointer data) { - //GaimBuddy *buddy = (GaimBuddy *) node; GaimBlistNodeAction *act; --- 104,107 ---- *************** *** 113,133 **** return; - //if(buddy->account != mw_acct) return; - *menu = g_list_append(*menu, NULL); ! act = gaim_blist_node_action_new(_("StarCraft Stats"), bnet_user_stats, "STAR"); *menu = g_list_append(*menu, act); ! act = gaim_blist_node_action_new(_("StarCraft Broodwar Stats"), bnet_user_stats, "SEXP"); *menu = g_list_append(*menu, act); ! act = gaim_blist_node_action_new(_("WarCraft II Battle.net Edition Stats"), bnet_user_stats, "W2BN"); *menu = g_list_append(*menu, act); ! act = gaim_blist_node_action_new(_("WarCraft III Stats"), bnet_user_stats, "WAR3"); *menu = g_list_append(*menu, act); ! act = gaim_blist_node_action_new(_("WarCraft III The Frozen Throne Stats"), bnet_user_stats, "W3XP"); *menu = g_list_append(*menu, act); --- 112,140 ---- return; *menu = g_list_append(*menu, NULL); ! act = gaim_blist_node_action_new(_("StarCraft Stats"), ! bnet_user_stats, ! "STAR"); *menu = g_list_append(*menu, act); ! act = gaim_blist_node_action_new(_("StarCraft Broodwar Stats"), ! bnet_user_stats, ! "SEXP"); *menu = g_list_append(*menu, act); ! act = gaim_blist_node_action_new(_("WarCraft II Battle.net Edition Stats"), ! bnet_user_stats, ! "W2BN"); *menu = g_list_append(*menu, act); ! act = gaim_blist_node_action_new(_("WarCraft III Stats"), ! bnet_user_stats, ! "WAR3"); *menu = g_list_append(*menu, act); ! act = gaim_blist_node_action_new(_("WarCraft III The Frozen Throne Stats"), ! bnet_user_stats, ! "W3XP"); *menu = g_list_append(*menu, act); |
From: Don S. <ri...@us...> - 2005-01-14 04:53:10
|
Update of /cvsroot/gaim-bnet/gaim-bnet/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29272/src Modified Files: bnet.c Log Message: Got statistic working for buddies. Just need a way to handle INFO response Index: bnet.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/bnet.c,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** bnet.c 13 Jan 2005 22:43:25 -0000 1.27 --- bnet.c 14 Jan 2005 04:52:59 -0000 1.28 *************** *** 84,98 **** bnet_user_stats(GaimBlistNode *node, gpointer data) { GaimBuddy *buddy; ! /* ! BNetConn *conn = BNET_CONN(gc->proto_data); - bnet_conn_send(conn, "/stats %s %s\n", who, gametype); - */ - g_return_if_fail(GAIM_BLIST_NODE_IS_BUDDY(node)); buddy = (GaimBuddy *) node; gaim_debug_info("bnet_user_stats", "I want to call stats for %s in %s\n", buddy->name, data); } --- 84,99 ---- bnet_user_stats(GaimBlistNode *node, gpointer data) { GaimBuddy *buddy; ! GaimAccount *account; ! GaimConnection *conn; g_return_if_fail(GAIM_BLIST_NODE_IS_BUDDY(node)); buddy = (GaimBuddy *) node; + account = buddy->account; + //conn = gaim_account_get_connection(account); + conn = account->gc; gaim_debug_info("bnet_user_stats", "I want to call stats for %s in %s\n", buddy->name, data); + bnet_conn_send(conn->proto_data, "/stats %s %s\n", buddy->name, data); } *************** *** 103,107 **** static void blist_node_menu(GaimBlistNode *node, GList **menu, gpointer data) { ! GaimBuddy *buddy = (GaimBuddy *) node; GaimBlistNodeAction *act; --- 104,108 ---- static void blist_node_menu(GaimBlistNode *node, GList **menu, gpointer data) { ! //GaimBuddy *buddy = (GaimBuddy *) node; GaimBlistNodeAction *act; *************** *** 116,134 **** *menu = g_list_append(*menu, NULL); ! act = gaim_blist_node_action_new(_("StarCraft"), bnet_user_stats, "STAR"); *menu = g_list_append(*menu, act); ! act = gaim_blist_node_action_new(_("StarCraft Broodwar"), bnet_user_stats, "SEXP"); *menu = g_list_append(*menu, act); ! act = gaim_blist_node_action_new(_("WarCraft II Battle.net Edition"), bnet_user_stats, "W2BN"); *menu = g_list_append(*menu, act); ! act = gaim_blist_node_action_new(_("WarCraft III"), bnet_user_stats, "WAR3"); *menu = g_list_append(*menu, act); ! act = gaim_blist_node_action_new(_("WarCraft III The Frozen Throne"), bnet_user_stats, "W3XP"); *menu = g_list_append(*menu, act); } --- 117,137 ---- *menu = g_list_append(*menu, NULL); ! act = gaim_blist_node_action_new(_("StarCraft Stats"), bnet_user_stats, "STAR"); *menu = g_list_append(*menu, act); ! act = gaim_blist_node_action_new(_("StarCraft Broodwar Stats"), bnet_user_stats, "SEXP"); *menu = g_list_append(*menu, act); ! act = gaim_blist_node_action_new(_("WarCraft II Battle.net Edition Stats"), bnet_user_stats, "W2BN"); *menu = g_list_append(*menu, act); ! act = gaim_blist_node_action_new(_("WarCraft III Stats"), bnet_user_stats, "WAR3"); *menu = g_list_append(*menu, act); ! act = gaim_blist_node_action_new(_("WarCraft III The Frozen Throne Stats"), bnet_user_stats, "W3XP"); *menu = g_list_append(*menu, act); + *menu = g_list_append(*menu, NULL); + } |
From: Don S. <ri...@us...> - 2005-01-13 22:43:48
|
Update of /cvsroot/gaim-bnet/gaim-bnet/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22610/src Modified Files: bnet.c buddy.c Log Message: Checking in some in-progress code for calling /stats from buddy menu. Not working yet but not breaking anything Index: bnet.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/bnet.c,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** bnet.c 9 Jan 2005 09:59:59 -0000 1.26 --- bnet.c 13 Jan 2005 22:43:25 -0000 1.27 *************** *** 81,84 **** --- 81,140 ---- } + void + bnet_user_stats(GaimBlistNode *node, gpointer data) { + GaimBuddy *buddy; + /* + BNetConn *conn = BNET_CONN(gc->proto_data); + + bnet_conn_send(conn, "/stats %s %s\n", who, gametype); + */ + + g_return_if_fail(GAIM_BLIST_NODE_IS_BUDDY(node)); + + buddy = (GaimBuddy *) node; + + gaim_debug_info("bnet_user_stats", "I want to call stats for %s in %s\n", buddy->name, data); + } + + + /* + * Statistics sub-menu + */ + static void blist_node_menu(GaimBlistNode *node, GList **menu, gpointer data) { + + GaimBuddy *buddy = (GaimBuddy *) node; + GaimBlistNodeAction *act; + + g_return_if_fail(node != NULL); + g_return_if_fail(menu != NULL); + + if(! GAIM_BLIST_NODE_IS_BUDDY(node)) + return; + + //if(buddy->account != mw_acct) return; + + *menu = g_list_append(*menu, NULL); + + act = gaim_blist_node_action_new(_("StarCraft"), bnet_user_stats, "STAR"); + *menu = g_list_append(*menu, act); + + act = gaim_blist_node_action_new(_("StarCraft Broodwar"), bnet_user_stats, "SEXP"); + *menu = g_list_append(*menu, act); + + act = gaim_blist_node_action_new(_("WarCraft II Battle.net Edition"), bnet_user_stats, "W2BN"); + *menu = g_list_append(*menu, act); + + act = gaim_blist_node_action_new(_("WarCraft III"), bnet_user_stats, "WAR3"); + *menu = g_list_append(*menu, act); + + act = gaim_blist_node_action_new(_("WarCraft III The Frozen Throne"), bnet_user_stats, "W3XP"); + *menu = g_list_append(*menu, act); + + } + + + + + /****************************************************************************** * Protocol/Plugin stuff *************** *** 177,180 **** --- 233,237 ---- static void init_plugin(GaimPlugin *plugin) { + void *blist_handle = gaim_blist_get_handle(); #if 0 GList *server_list = NULL; *************** *** 190,193 **** --- 247,254 ---- info.description = _("Allows Gaim to send messages over Battle.net."); + + gaim_signal_connect(blist_handle, "blist-node-extended-menu", plugin, + GAIM_CALLBACK(blist_node_menu), NULL); + GaimAccountOption *option; Index: buddy.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/buddy.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** buddy.c 13 Jan 2005 15:50:54 -0000 1.10 --- buddy.c 13 Jan 2005 22:43:25 -0000 1.11 *************** *** 20,23 **** --- 20,24 ---- */ #include "buddy.h" + #include "intl.h" /****************************************************************************** *************** *** 78,81 **** --- 79,83 ---- } + void bnet_user_info(GaimConnection *gc, const gchar *who) { |
From: Don S. <ri...@us...> - 2005-01-13 18:56:51
|
Update of /cvsroot/gaim-bnet/htdocs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1156 Modified Files: header.php Added Files: bnet.png Log Message: Adding logo Index: header.php =================================================================== RCS file: /cvsroot/gaim-bnet/htdocs/header.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** header.php 10 Sep 2004 18:07:57 -0000 1.2 --- header.php 13 Jan 2005 18:56:42 -0000 1.3 *************** *** 16,20 **** </HEAD> <BODY> ! <h1><?php echo $name ?></h1> <table width="100%"> <tr valign="bottom"> --- 16,20 ---- </HEAD> <BODY> ! <h1><?php echo $name ?><img src="bnet.png" alt="bnet logo" /></h1> <table width="100%"> <tr valign="bottom"> --- NEW FILE: bnet.png --- (This appears to be a binary file; contents omitted.) |
From: Gary K. <amc...@us...> - 2005-01-13 15:51:25
|
Update of /cvsroot/gaim-bnet/gaim-bnet/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23736/src Modified Files: buddy.c buddy.h proto.c Log Message: updates from dario Index: proto.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/proto.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** proto.c 13 Jan 2005 11:29:31 -0000 1.13 --- proto.c 13 Jan 2005 15:50:54 -0000 1.14 *************** *** 52,55 **** --- 52,56 ---- if (buddy->fl_position == -1) { bnet_conn_send(conn, "/friends add %s\n", buddy->name); + bnet_conn_send(conn, "/where %s\n", buddy->name); buddy->fl_position = 0; } *************** *** 201,207 **** chan = w->data; ! b = g_hash_table_lookup(conn->buddies, nick); ! if (!b) ! b = bnet_buddy_add_default(conn, nick); sscanf(n, "%u", &b->fl_position); --- 202,207 ---- chan = w->data; ! b = bnet_buddy_hard_lookup(conn, nick); ! g_return_if_fail(b); sscanf(n, "%u", &b->fl_position); *************** *** 225,231 **** nick = w->data; ! b = g_hash_table_lookup(conn->buddies, nick); ! if (!b) ! b = bnet_buddy_add_default(conn, nick); sscanf(n, "%u", &b->fl_position); --- 225,230 ---- nick = w->data; ! b = bnet_buddy_hard_lookup(conn, nick); ! g_return_if_fail(b); sscanf(n, "%u", &b->fl_position); *************** *** 252,256 **** * We can assume it as a confirmation that user is online */ - gc = gaim_account_get_connection(conn->account); serv_got_update(gc, nick, TRUE, 0, 0, 0, 0); --- 251,254 ---- *************** *** 279,286 **** * the server one. */ - g_hash_table_foreach(conn->buddies, bnet_hash_check_buddy, conn); ! conn->fl_listing = FALSE; } --- 277,283 ---- * the server one. */ g_hash_table_foreach(conn->buddies, bnet_hash_check_buddy, conn); ! conn->fl_listing = FALSE; } *************** *** 288,292 **** --- 285,291 ---- { "Welcome to Battle.net!", bnet_proto_info_welcome }, { "$x: $x, (mutual) using $x in the channel $x.", bnet_proto_info_fl_online }, + { "$x: $x, using $x in the channel $x.", bnet_proto_info_fl_online }, { "$x: $x, (mutual) using $x in the game $x.", bnet_proto_info_fl_online }, + { "$x: $x, using $x in the game $x.", bnet_proto_info_fl_online }, { "$x: $x, offline", bnet_proto_info_fl_offline }, { "$x is using $x in the channel $x.", bnet_proto_info_where }, *************** *** 303,308 **** BNetUser *u; GaimConversation *convo; ! u = BNET_USER(g_hash_table_lookup(conn->users, nick)); if (!u) { /* We can assume strlen(game) always > 2 because its format is --- 302,310 ---- BNetUser *u; GaimConversation *convo; + const gchar *norm; ! norm = gaim_normalize(conn->account, nick); ! ! u = BNET_USER(g_hash_table_lookup(conn->users, norm)); if (!u) { /* We can assume strlen(game) always > 2 because its format is *************** *** 311,316 **** gchar *game_snip = g_strdup(game); game_snip[strlen(game)-1] = 0; ! u = bnet_user_new(nick, game_snip+1, flags); ! g_hash_table_insert(conn->users, u->nick, u); g_free(game_snip); } --- 313,318 ---- gchar *game_snip = g_strdup(game); game_snip[strlen(game)-1] = 0; ! u = bnet_user_new(norm, nick, game_snip+1, flags); ! g_hash_table_insert(conn->users, u->norm, u); g_free(game_snip); } *************** *** 341,346 **** //const gchar* flags = args[2]; GaimConversation *convo; ! ! g_hash_table_remove(conn->users, nick); convo = gaim_find_conversation_with_account(conn->chan, conn->account); --- 343,350 ---- //const gchar* flags = args[2]; GaimConversation *convo; ! const gchar *norm; ! ! norm = gaim_normalize(conn->account, nick); ! g_hash_table_remove(conn->users, norm); convo = gaim_find_conversation_with_account(conn->chan, conn->account); *************** *** 566,570 **** if (pi->id == id) { if (pi->args_n+2 != args_n) { ! gaim_debug_info("bnet", "bnet_proto_process_msg: wrong args number\n"); } else { --- 570,585 ---- if (pi->id == id) { if (pi->args_n+2 != args_n) { ! gaim_debug_info("bnet", ! "bnet_proto_process_msg: id(%d) wrong args number\n", ! id); ! gaim_debug_info("bnet", ! "bnet_proto_process_msg: full message \"%s\"\n", ! msg); ! ! for (i = 0; i < args_n; i++) { ! gaim_debug_info("bnet", ! "bnet_proto_process_msg: arg(%d) \"%s\"\n", ! i, args[i]); ! } } else { Index: buddy.h =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/buddy.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** buddy.h 13 Jan 2005 08:25:39 -0000 1.7 --- buddy.h 13 Jan 2005 15:50:54 -0000 1.8 *************** *** 32,35 **** --- 32,36 ---- struct _BNetUser { + gchar* norm; gchar* nick; gchar* game; *************** *** 38,41 **** --- 39,43 ---- struct _BNetBuddy { + gchar* norm; gchar* name; gchar* flags; *************** *** 49,53 **** /* User API */ ! BNetUser *bnet_user_new(const gchar *nick, const gchar *game, const gchar *flags); void bnet_user_free(BNetUser *user); void bnet_user_info(GaimConnection *gc, const gchar *who); --- 51,56 ---- /* User API */ ! BNetUser *bnet_user_new(const gchar *norm, const gchar *nick, ! const gchar *game, const gchar *flags); void bnet_user_free(BNetUser *user); void bnet_user_info(GaimConnection *gc, const gchar *who); *************** *** 57,64 **** /* Buddy API */ ! BNetBuddy *bnet_buddy_new(const gchar *name); void bnet_buddy_free(BNetBuddy *buddy); void bnet_buddy_add(GaimConnection *gc, GaimBuddy *buddy, GaimGroup *group); ! BNetBuddy *bnet_buddy_add_default(BNetConn *conn, const gchar *name); void bnet_buddy_remove(GaimConnection *gc, GaimBuddy *buddy, GaimGroup *group); void bnet_buddy_emblems(GaimBuddy *buddy, char **se, char **sw, char **nw, char **ne); --- 60,67 ---- /* Buddy API */ ! BNetBuddy *bnet_buddy_new(const gchar *norm, const gchar *name); void bnet_buddy_free(BNetBuddy *buddy); void bnet_buddy_add(GaimConnection *gc, GaimBuddy *buddy, GaimGroup *group); ! BNetBuddy *bnet_buddy_hard_lookup(BNetConn *conn, const gchar *name); void bnet_buddy_remove(GaimConnection *gc, GaimBuddy *buddy, GaimGroup *group); void bnet_buddy_emblems(GaimBuddy *buddy, char **se, char **sw, char **nw, char **ne); Index: buddy.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/buddy.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** buddy.c 13 Jan 2005 08:25:39 -0000 1.9 --- buddy.c 13 Jan 2005 15:50:54 -0000 1.10 *************** *** 45,51 **** *****************************************************************************/ BNetUser * ! bnet_user_new(const gchar *nick, const gchar *game, const gchar *flags) { BNetUser *user; g_return_val_if_fail(nick, NULL); --- 45,53 ---- *****************************************************************************/ BNetUser * ! bnet_user_new(const gchar *norm, const gchar *nick, ! const gchar *game, const gchar *flags) { BNetUser *user; + g_return_val_if_fail(norm, NULL); g_return_val_if_fail(nick, NULL); *************** *** 53,56 **** --- 55,59 ---- g_return_val_if_fail(user, NULL); + user->norm = g_strdup(norm); user->nick = g_strdup(nick); *************** *** 68,77 **** g_return_if_fail(user); g_free(user->nick); g_free(user->game); g_free(user->flags); g_free(user); - - user = NULL; } --- 71,79 ---- g_return_if_fail(user); + g_free(user->norm); g_free(user->nick); g_free(user->game); g_free(user->flags); g_free(user); } *************** *** 102,108 **** *****************************************************************************/ BNetBuddy * ! bnet_buddy_new(const gchar *name) { BNetBuddy *buddy; g_return_val_if_fail(name, NULL); --- 104,111 ---- *****************************************************************************/ BNetBuddy * ! bnet_buddy_new(const gchar *norm, const gchar *name) { BNetBuddy *buddy; + g_return_val_if_fail(norm, NULL); g_return_val_if_fail(name, NULL); *************** *** 110,113 **** --- 113,117 ---- g_return_val_if_fail(buddy, NULL); + buddy->norm = g_strdup(norm); buddy->name = g_strdup(name); buddy->flags = 0; *************** *** 122,131 **** g_return_if_fail(buddy); g_free(buddy->name); g_free(buddy->flags); g_free(buddy->location); g_free(buddy); - - buddy = NULL; } --- 126,134 ---- g_return_if_fail(buddy); + g_free(buddy->norm); g_free(buddy->name); g_free(buddy->flags); g_free(buddy->location); g_free(buddy); } *************** *** 133,154 **** bnet_buddy_add(GaimConnection *gc, GaimBuddy *buddy, GaimGroup *group) { BNetConn *conn = BNET_CONN(gc->proto_data); ! BNetBuddy *b = bnet_buddy_new(buddy->name); ! const gchar *name; gaim_debug_info("bnet", "bnet_buddy_add\n"); ! name = gaim_normalize(gc->account, buddy->name); ! if(!g_hash_table_lookup(conn->buddies, name)) ! g_hash_table_insert(conn->buddies, (gchar *)name, b); ! bnet_conn_request_friends_list(conn); } BNetBuddy * ! bnet_buddy_add_default(BNetConn *conn, const gchar *name) { GaimBuddy *buddy; GaimGroup *group; ! BNetBuddy *b; gaim_debug_info("bnet", "bnet_buddy_add_default\n"); --- 136,160 ---- bnet_buddy_add(GaimConnection *gc, GaimBuddy *buddy, GaimGroup *group) { BNetConn *conn = BNET_CONN(gc->proto_data); ! BNetBuddy *b; ! const gchar *norm; gaim_debug_info("bnet", "bnet_buddy_add\n"); ! norm = gaim_normalize(gc->account, buddy->name); ! if (!g_hash_table_lookup(conn->buddies, norm)) { ! b = bnet_buddy_new(norm, buddy->name); ! g_hash_table_insert(conn->buddies, b->norm, b); ! bnet_conn_request_friends_list(conn); ! } } BNetBuddy * ! bnet_buddy_hard_lookup(BNetConn *conn, const gchar *name) { GaimBuddy *buddy; GaimGroup *group; ! BNetBuddy *b = NULL; ! const gchar *norm; gaim_debug_info("bnet", "bnet_buddy_add_default\n"); *************** *** 157,174 **** g_return_val_if_fail(name, NULL); ! buddy = gaim_buddy_new(conn->account, name, NULL); ! group = gaim_find_group(BNET_DEFAULT_GROUP_NAME); ! if (!group) { ! group = gaim_group_new(BNET_DEFAULT_GROUP_NAME); ! gaim_blist_add_group(group, NULL); ! } ! gaim_blist_add_buddy(buddy, NULL, group, NULL); ! /* We must add it also to our buddy list... */ ! b = bnet_buddy_new(name); ! g_hash_table_insert(conn->buddies, b->name, b); return b; --- 163,182 ---- g_return_val_if_fail(name, NULL); ! norm = gaim_normalize(conn->account, name); ! if (!(b = g_hash_table_lookup(conn->buddies, norm))) { ! buddy = gaim_buddy_new(conn->account, name, NULL); ! group = gaim_find_group(BNET_DEFAULT_GROUP_NAME); ! if (!group) { ! group = gaim_group_new(BNET_DEFAULT_GROUP_NAME); ! gaim_blist_add_group(group, NULL); ! } ! gaim_blist_add_buddy(buddy, NULL, group, NULL); ! b = bnet_buddy_new(norm, name); ! g_hash_table_insert(conn->buddies, b->norm, b); ! } return b; |