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: Gary K. <amc...@us...> - 2005-01-13 11:29:40
|
Update of /cvsroot/gaim-bnet/gaim-bnet/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5771 Modified Files: proto.c Log Message: minor tweak Index: proto.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/proto.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** proto.c 13 Jan 2005 08:25:39 -0000 1.12 --- proto.c 13 Jan 2005 11:29:31 -0000 1.13 *************** *** 63,67 **** 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]; --- 63,68 ---- 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]; *************** *** 75,82 **** for (w = msg, k = model; !err && *w && *k; w++, k++) { ! if (*k == '$') { ! k++; ! switch (*k) { case 'n': t = strlen(nick); --- 76,91 ---- for (w = msg, k = model; !err && *w && *k; w++, k++) { ! if(*k != '$') { ! if(*w != *k) { ! err = TRUE; ! break; ! } ! continue; ! } ! ! k++; ! ! switch (*k) { case 'n': t = strlen(nick); *************** *** 112,123 **** default: break; - } - - /* Maybe err == TRUE here */ - } else { - if (*w != *k) { - err = TRUE; - break; - } } } --- 121,124 ---- |
From: Gary K. <amc...@us...> - 2005-01-13 08:25:57
|
Update of /cvsroot/gaim-bnet/gaim-bnet/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4426/src Modified Files: buddy.c buddy.h chat.c conn.c conn.h proto.c proto.h Log Message: Adding Dario's most recent patch, ran into some issues with the last one, hopefully this cleans it up otherwise I'll start hacking it.. Index: buddy.h =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/buddy.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** buddy.h 9 Jan 2005 09:59:59 -0000 1.6 --- buddy.h 13 Jan 2005 08:25:39 -0000 1.7 *************** *** 39,45 **** struct _BNetBuddy { gchar* name; - gboolean online; gchar* flags; gchar* location; }; --- 39,45 ---- struct _BNetBuddy { gchar* name; gchar* flags; gchar* location; + gint fl_position; }; *************** *** 60,64 **** void bnet_buddy_free(BNetBuddy *buddy); void bnet_buddy_add(GaimConnection *gc, GaimBuddy *buddy, GaimGroup *group); ! void 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,64 ---- 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); Index: proto.h =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/proto.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** proto.h 12 Jan 2005 23:27:48 -0000 1.6 --- proto.h 13 Jan 2005 08:25:39 -0000 1.7 *************** *** 29,33 **** typedef struct _BNetProtoProcInfo BNetProtoProcInfo; typedef struct _BNetWhispFromProcInfo BNetWhispFromProcInfo; ! //typedef struct _BNetInfoProcInfo BNetInfoProcInfo; #include "conn.h" --- 29,33 ---- typedef struct _BNetProtoProcInfo BNetProtoProcInfo; typedef struct _BNetWhispFromProcInfo BNetWhispFromProcInfo; ! typedef struct _BNetInfoProcInfo BNetInfoProcInfo; #include "conn.h" *************** *** 48,51 **** --- 48,58 ---- }; + typedef void (*BNetInfoProcFunc)(BNetConn *, GList *args); + + struct _BNetInfoProcInfo { + const gchar* model; + BNetInfoProcFunc func; + }; + #ifdef __cplusplus extern "C" { Index: buddy.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/buddy.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** buddy.c 12 Jan 2005 23:27:47 -0000 1.8 --- buddy.c 13 Jan 2005 08:25:39 -0000 1.9 *************** *** 111,114 **** --- 111,117 ---- buddy->name = g_strdup(name); + buddy->flags = 0; + buddy->location = 0; + buddy->fl_position = -1; return buddy; *************** *** 133,149 **** const gchar *name; name = gaim_normalize(gc->account, buddy->name); if(!g_hash_table_lookup(conn->buddies, name)) g_hash_table_insert(conn->buddies, (gchar *)name, b); } ! void bnet_buddy_add_default(BNetConn *conn, const gchar *name) { GaimBuddy *buddy; GaimGroup *group; ! g_return_if_fail(conn); ! g_return_if_fail(name); buddy = gaim_buddy_new(conn->account, name, NULL); --- 136,159 ---- 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"); ! ! g_return_val_if_fail(conn, NULL); ! g_return_val_if_fail(name, NULL); buddy = gaim_buddy_new(conn->account, name, NULL); *************** *** 155,161 **** } - /* shouldn't we be adding the buddy to the hash table here? */ - gaim_blist_add_buddy(buddy, NULL, group, NULL); } --- 165,176 ---- } 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; } *************** *** 164,168 **** --- 179,187 ---- BNetConn *conn = BNET_CONN(gc->proto_data); + gaim_debug_info("bnet", "bnet_buddy_remove\n"); + g_hash_table_remove(conn->buddies, buddy->name); + + bnet_conn_send(conn, "/friends remove %s\n", buddy->name); } Index: proto.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/proto.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** proto.c 12 Jan 2005 23:27:47 -0000 1.11 --- proto.c 13 Jan 2005 08:25:39 -0000 1.12 *************** *** 46,80 **** static void ! bnet_list_destroy_all(gpointer data, gpointer user_data) { ! free(data); ! } ! ! /****************************************************************************** ! * Whispear From Processing ! *****************************************************************************/ ! static void ! bnet_proto_whispf_login(BNetConn *conn, const gchar *nick, GList *args) { ! GaimConnection *gc; ! 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 */ } static void ! bnet_proto_whispf_logout(BNetConn *conn, const gchar *nick, GList *args) { ! GaimConnection *gc; ! gc = gaim_account_get_connection(conn->account); ! serv_got_update(gc, nick, FALSE, 0, 0, 0, 0); } static gboolean ! bnet_proto_compare_whispf(BNetConn *conn, const gchar* model, const gchar **whisp, ! GList **args) { ! const gchar *nick = whisp[0]; ! const gchar *msg = whisp[1]; const gchar *w, *k; --- 46,69 ---- static void ! bnet_hash_check_buddy(gpointer key, gpointer value, gpointer user_data) { ! BNetConn *conn = BNET_CONN(user_data); ! BNetBuddy *buddy = BNET_BUDDY(value); ! if (buddy->fl_position == -1) { ! bnet_conn_send(conn, "/friends add %s\n", buddy->name); ! buddy->fl_position = 0; ! } } static void ! bnet_list_destroy_all(gpointer data, gpointer user_data) { ! free(data); } 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]; const gchar *w, *k; *************** *** 126,131 **** /* Maybe err == TRUE here */ ! } ! else { if (*w != *k) { err = TRUE; --- 115,119 ---- /* Maybe err == TRUE here */ ! } else { if (*w != *k) { err = TRUE; *************** *** 148,158 **** } static BNetWhispFromProcInfo wfpi[] = { ! { "Your friend $n has entered Battle.net.", bnet_proto_whispf_login }, ! { "Your friend $n has entered a $x game called $x", bnet_proto_whispf_join }, ! { "Your friend $n has exited Battle.net.", bnet_proto_whispf_logout } }; ! #define PROTO_WHISP_MSG_N (sizeof(wfpi) / sizeof(wfpi[0])) /****************************************************************************** --- 136,297 ---- } + /****************************************************************************** + * Whispear From Processing + *****************************************************************************/ + static void + bnet_proto_whispf_login(BNetConn *conn, const gchar *nick, GList *args) { + GaimConnection *gc; + + gaim_debug_info("bnet", "bnet_proto_whispf_login\n"); + + 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"); + } + + static void + bnet_proto_whispf_logout(BNetConn *conn, const gchar *nick, GList *args) { + GaimConnection *gc; + + gaim_debug_info("bnet", "bnet_proto_whispf_logout\n"); + + gc = gaim_account_get_connection(conn->account); + serv_got_update(gc, nick, FALSE, 0, 0, 0, 0); + } + static BNetWhispFromProcInfo wfpi[] = { ! { "Your friend $n has entered Battle.net.", bnet_proto_whispf_login }, ! { "Your friend $n entered a $x game called $x.", bnet_proto_whispf_join }, ! { "Your friend $n has exited Battle.net.", bnet_proto_whispf_logout } }; ! #define PROTO_WHISP_MSGS_N (sizeof(wfpi) / sizeof(wfpi[0])) ! ! /****************************************************************************** ! * Info Processing ! *****************************************************************************/ ! static void ! bnet_proto_info_welcome(BNetConn *conn, GList *args) { ! gaim_debug_info("bnet", "bnet_proto_info_welcome\n"); ! } ! ! static void ! bnet_proto_info_fl_online(BNetConn *conn, GList *args) { ! GaimConnection *gc; ! BNetBuddy *b; ! GList *w = args; ! ! gchar *n, *nick; ! gchar *using, *chan; ! ! gaim_debug_info("bnet", "bnet_proto_info_fl_online\n"); ! ! n = w->data; ! w = g_list_next(w); ! nick = w->data; ! w = g_list_next(w); ! using = w->data; ! w = g_list_next(w); ! 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); ! ! gc = gaim_account_get_connection(conn->account); ! serv_got_update(gc, nick, TRUE, 0, 0, 0, 0); ! } ! ! static void ! bnet_proto_info_fl_offline(BNetConn *conn, GList *args) { ! GaimConnection *gc; ! BNetBuddy *b; ! GList *w = args; ! ! gchar *n, *nick; ! ! gaim_debug_info("bnet", "bnet_proto_info_fl_offline\n"); ! ! n = w->data; ! w = g_list_next(w); ! 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); ! ! gc = gaim_account_get_connection(conn->account); ! serv_got_update(gc, nick, FALSE, 0, 0, 0, 0); ! } ! ! static void ! bnet_proto_info_where(BNetConn *conn, GList *args) { ! GaimConnection *gc; ! GList *w = args; ! gchar *nick, *using, *chan; ! ! gaim_debug_info("bnet", "bnet_proto_info_where\n"); ! ! nick = w->data; ! w = g_list_next(w); ! using = w->data; ! w = g_list_next(w); ! chan = w->data; ! ! /* We receive this message in reply to a /WHERE or /WHOIS command ! * 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); ! } ! ! static void ! bnet_proto_info_whoami(BNetConn *conn, GList *args) { ! GList *w = args; ! gchar *nick, *using, *chan; ! ! gaim_debug_info("bnet", "bnet_proto_info_whoami\n"); ! ! nick = w->data; ! w = g_list_next(w); ! using = w->data; ! w = g_list_next(w); ! chan = w->data; ! ! if (strcmp(nick, conn->nick)) { ! g_free(conn->nick); ! conn->nick = g_strdup(nick); ! } ! ! /* We receive all the server friend list! ! * We must compare our buddy list with it and, if those differ, update ! * the server one. ! */ ! ! g_hash_table_foreach(conn->buddies, bnet_hash_check_buddy, conn); ! ! conn->fl_listing = FALSE; ! } ! ! static BNetInfoProcInfo ipi[] = { ! { "Welcome to Battle.net!", bnet_proto_info_welcome }, ! { "$x: $x, (mutual) 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, 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 } ! }; ! ! #define PROTO_INFO_MSGS_N (sizeof(ipi) / sizeof(ipi[0])) /****************************************************************************** *************** *** 166,171 **** u = BNET_USER(g_hash_table_lookup(conn->users, nick)); if (!u) { ! u = bnet_user_new(nick, game, flags); g_hash_table_insert(conn->users, u->nick, u); } --- 305,316 ---- u = BNET_USER(g_hash_table_lookup(conn->users, nick)); if (!u) { ! /* We can assume strlen(game) always > 2 because its format is ! * "[game_name]"... I hope :) ! */ ! 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); } *************** *** 173,177 **** if (convo) { gaim_conv_chat_add_user(GAIM_CONV_CHAT(convo), ! nick, game, 0, new_arrival); } else { gaim_debug_info("bnet", "JOIN/USER %s\n", nick); --- 318,322 ---- if (convo) { gaim_conv_chat_add_user(GAIM_CONV_CHAT(convo), ! u->nick, u->game, 0, new_arrival); } else { gaim_debug_info("bnet", "JOIN/USER %s\n", nick); *************** *** 213,217 **** const gchar* msg = args[2]; ! const gchar *whisp[2] = { nick, msg }; GList *w_args; gint i; --- 358,362 ---- const gchar* msg = args[2]; ! const gchar *info[2] = { nick, msg }; GList *w_args; gint i; *************** *** 219,224 **** gaim_debug_info("bnet", "WHISP FROM %s - %s\n", nick, msg); ! for (i=0; i < PROTO_WHISP_MSG_N; i++) { ! if (bnet_proto_compare_whispf(conn, wfpi[i].model, (const gchar**)whisp, &w_args)) { wfpi[i].func(conn, nick, w_args); --- 364,369 ---- gaim_debug_info("bnet", "WHISP FROM %s - %s\n", nick, msg); ! for (i=0; i < PROTO_WHISP_MSGS_N; i++) { ! if (bnet_proto_model_compare(conn, wfpi[i].model, (const gchar**)info, &w_args)) { wfpi[i].func(conn, nick, w_args); *************** *** 233,237 **** } ! if (i == PROTO_WHISP_MSG_N) { GaimConnection *gc; gc = gaim_account_get_connection(conn->account); --- 378,382 ---- } ! if (i == PROTO_WHISP_MSGS_N) { GaimConnection *gc; gc = gaim_account_get_connection(conn->account); *************** *** 291,342 **** static void bnet_proto_msg_info(BNetConn *conn, const gchar** args) { ! const gchar* info = args[0]; ! guint len = strlen(info); ! ! GaimConnection *gc; ! gchar *p; ! ! gaim_debug_info("bnet", "INFO %s\n", info); ! ! gc = gaim_account_get_connection(conn->account); ! ! if (len > 4 && ! ((info[1] == ':' && IS_NUM(info[0])) || ! (info[2] == ':' && IS_NUM(info[0]) && IS_NUM(info[1])))) { ! BNetBuddy *b; ! gchar *nick, *state; ! ! p = strchr(info,' '); ! ! sscanf(p, " %a[^,], %as", &nick, &state); ! ! b = g_hash_table_lookup(conn->buddies, nick); ! if (!b) ! bnet_buddy_add_default(conn, nick); ! if (!strcmp(state,"offline")) ! serv_got_update(gc, nick, FALSE, 0, 0, 0, 0); ! else ! serv_got_update(gc, nick, TRUE, 0, 0, 0, 0); ! free(nick); ! free(state); ! } else if ((p = strchr(info, ' ')) && ! (strlen(p) > 10) && ! !memcmp(p, " is using ", 10)) { ! /* We receive this message in reply to a /WHERE or /WHOIS command ! * We can assume it as a confirmation that user is online ! */ ! gchar* nick = (gchar*)malloc(p-info+1); ! memcpy(nick,info,p-info); ! nick[p-info] = 0; ! gaim_debug_info("bnet", "ONLINE FROM /WHERE - \"%s\"\n", nick); ! serv_got_update(gc, nick, TRUE, 0, 0, 0, 0); ! free(nick); ! } ! else { ! gaim_debug_info("bnet", "UNKNOWN INFO\n"); } } --- 436,457 ---- static void bnet_proto_msg_info(BNetConn *conn, const gchar** args) { ! const gchar *info[2] = { NULL, args[0] }; ! GList *w_args; ! gint i; ! gaim_debug_info("bnet", "INFO %s\n", args[0]); ! for (i=0; i < PROTO_INFO_MSGS_N; i++) { ! if (bnet_proto_model_compare(conn, ipi[i].model, (const gchar**)info, ! &w_args)) { ! ipi[i].func(conn, w_args); ! if (w_args) { ! g_list_foreach(w_args, bnet_list_destroy_all, NULL); ! g_list_free(w_args); ! } ! break; ! } } } *************** *** 424,428 **** gchar* args[PROTO_MAX_ARGS]; ! for (i=0,l=0,b=0,e=strlen(msg); i<PROTO_MAX_ARGS; i++,l++,b=l) { if (msg[l]=='"') for (b=++l; l<e && msg[l]!='"'; l++); --- 539,543 ---- gchar* args[PROTO_MAX_ARGS]; ! for (i=0,l=0,b=0,e=strlen(msg); i < PROTO_MAX_ARGS; i++,l++,b=l) { if (msg[l]=='"') for (b=++l; l<e && msg[l]!='"'; l++); Index: chat.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/chat.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** chat.c 11 Jan 2005 21:32:54 -0000 1.3 --- chat.c 13 Jan 2005 08:25:39 -0000 1.4 *************** *** 56,63 **** struct proto_chat_entry *pce; - gaim_debug_info("bnet", "bnet_chat_info\n"); - g_return_val_if_fail(gc, NULL); pce = g_new0(struct proto_chat_entry, 1); pce->label = _("_Channel:"); --- 56,63 ---- struct proto_chat_entry *pce; g_return_val_if_fail(gc, NULL); + gaim_debug_info("bnet", "bnet_chat_info\n"); + pce = g_new0(struct proto_chat_entry, 1); pce->label = _("_Channel:"); Index: conn.h =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/conn.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** conn.h 9 Jan 2005 03:35:24 -0000 1.3 --- conn.h 13 Jan 2005 08:25:39 -0000 1.4 *************** *** 50,54 **** guint inbuf_len; guint inbuf_used; - GSList *exp; gchar *nick; --- 50,53 ---- *************** *** 59,62 **** --- 58,63 ---- GHashTable *buddies; + + gboolean fl_listing; }; Index: conn.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/conn.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** conn.c 10 Jan 2005 02:09:13 -0000 1.6 --- conn.c 13 Jan 2005 08:25:39 -0000 1.7 *************** *** 70,74 **** g_return_if_fail(conn); ! bnet_conn_send(conn, "/f l\n"); } --- 70,80 ---- g_return_if_fail(conn); ! if (!conn->fl_listing) { ! bnet_conn_send(conn, "/friends list\n"); ! /* This is needed to check the end of list */ ! bnet_conn_send(conn, "/whoami\n"); ! ! conn->fl_listing = TRUE; ! } } *************** *** 228,231 **** --- 234,238 ---- conn->users = bnet_users_new(); conn->buddies = bnet_buddies_new(); + conn->fl_listing = FALSE; bnet_conn_update_progress(conn, BNET_CS_SOCK); |
From: Gary K. <amc...@us...> - 2005-01-12 23:27:58
|
Update of /cvsroot/gaim-bnet/gaim-bnet/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31418/src Modified Files: buddy.c proto.c proto.h Log Message: Pulling a luke and committing with out looking... Well actually, I'll be looking after this.. :) Index: proto.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/proto.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** proto.c 9 Jan 2005 05:00:56 -0000 1.10 --- proto.c 12 Jan 2005 23:27:47 -0000 1.11 *************** *** 27,30 **** --- 27,32 ---- #endif + #define _GNU_SOURCE + #include <string.h> *************** *** 35,38 **** --- 37,43 ---- #define IS_NUM(c) ((c) >= '0' && (c) <= '9') + /****************************************************************************** + * Raw Procedures + *****************************************************************************/ static gboolean bnet_hash_destroy_all(gpointer key, gpointer value, gpointer user_data) { *************** *** 41,44 **** --- 46,163 ---- static void + bnet_list_destroy_all(gpointer data, gpointer user_data) { + free(data); + } + + /****************************************************************************** + * Whispear From Processing + *****************************************************************************/ + static void + bnet_proto_whispf_login(BNetConn *conn, const gchar *nick, GList *args) { + GaimConnection *gc; + 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 */ + } + + static void + bnet_proto_whispf_logout(BNetConn *conn, const gchar *nick, GList *args) { + GaimConnection *gc; + gc = gaim_account_get_connection(conn->account); + serv_got_update(gc, nick, FALSE, 0, 0, 0, 0); + } + + static gboolean + bnet_proto_compare_whispf(BNetConn *conn, const gchar* model, const gchar **whisp, + GList **args) { + const gchar *nick = whisp[0]; + const gchar *msg = whisp[1]; + + const gchar *w, *k; + gchar *p, *q; + gint t, tt; + GList *al = NULL; + + gboolean err = FALSE; + + for (w = msg, k = model; !err && *w && *k; w++, k++) { + if (*k == '$') { + k++; + + switch (*k) { + case 'n': + t = strlen(nick); + if (memcmp(w, nick, t)) { + err = TRUE; + break; + } + w += t-1; + break; + + 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; + } + + q = (gchar*)malloc(p-w+1); + memcpy(q, w, p-w); + q[p-w] = 0; + + al = g_list_append(al, q); + + w += p-w + tt - 1; + k += tt; + break; + + case 0: /* Error in model */ + default: + break; + } + + /* Maybe err == TRUE here */ + } + else { + if (*w != *k) { + err = TRUE; + break; + } + } + } + + if (err || *w || *k) { + if (al) { + g_list_foreach(al, bnet_list_destroy_all, NULL); + g_list_free(al); + } + + return FALSE; + } + + *args = al; + return TRUE; + } + + static BNetWhispFromProcInfo wfpi[] = { + { "Your friend $n has entered Battle.net.", bnet_proto_whispf_login }, + { "Your friend $n has entered a $x game called $x", bnet_proto_whispf_join }, + { "Your friend $n has exited Battle.net.", bnet_proto_whispf_logout } + }; + + #define PROTO_WHISP_MSG_N (sizeof(wfpi) / sizeof(wfpi[0])) + + /****************************************************************************** + * Proto Messages Processing + *****************************************************************************/ + static void bnet_proto_msg_join_user(BNetConn *conn, const gchar* nick, const gchar* flags, const gchar* game, gboolean new_arrival) { BNetUser *u; *************** *** 73,78 **** bnet_proto_msg_leave(BNetConn *conn, const gchar** args) { const gchar* nick = args[0]; ! const gchar* game = args[1]; ! const gchar* flags = args[2]; GaimConversation *convo; --- 192,197 ---- bnet_proto_msg_leave(BNetConn *conn, const gchar** args) { const gchar* nick = args[0]; ! //const gchar* game = args[1]; ! //const gchar* flags = args[2]; GaimConversation *convo; *************** *** 91,127 **** bnet_proto_msg_whispearf(BNetConn *conn, const gchar** args) { const gchar* nick = args[0]; ! const gchar* game = args[1]; const gchar* msg = args[2]; ! GaimConnection *gc; ! gchar *tmp; ! gint len; gaim_debug_info("bnet", "WHISP FROM %s - %s\n", nick, msg); ! gc = gaim_account_get_connection(conn->account); ! ! tmp = g_strdup_printf("Your friend %s ", nick); ! if (!memcmp(msg,tmp,len=strlen(tmp))) { ! gchar *p = tmp+len; ! if (!memcmp(p, "has entered ", 12)) { ! p += 8; ! if (!strcmp(p, "Battle.net.")) { ! serv_got_update(gc, nick, TRUE, 0, 0, 0, 0); ! } else if (!memcmp(p, "a *** game called ", 10)) { ! /* What to do here? */ ! } else { ! gaim_debug_info("bnet", "** UNKNOWN SERVER WHISP\n"); } ! } else if (!strcmp(p, "has exited Battle.net.")) { ! serv_got_update(gc, nick, FALSE, 0, 0, 0, 0); ! } else { ! gaim_debug_info("bnet", "** UNKNOWN SERVER WHISP\n"); } ! } else { serv_got_im(gc, nick, msg, 0, time(NULL)); } - g_free(tmp); } --- 210,241 ---- bnet_proto_msg_whispearf(BNetConn *conn, const gchar** args) { const gchar* nick = args[0]; ! //const gchar* game = args[1]; const gchar* msg = args[2]; ! const gchar *whisp[2] = { nick, msg }; ! GList *w_args; ! gint i; gaim_debug_info("bnet", "WHISP FROM %s - %s\n", nick, msg); ! for (i=0; i < PROTO_WHISP_MSG_N; i++) { ! if (bnet_proto_compare_whispf(conn, wfpi[i].model, (const gchar**)whisp, ! &w_args)) { ! wfpi[i].func(conn, nick, w_args); ! if (w_args) { ! g_list_foreach(w_args, bnet_list_destroy_all, NULL); ! g_list_free(w_args); } ! ! break; } ! } ! ! if (i == PROTO_WHISP_MSG_N) { ! GaimConnection *gc; ! gc = gaim_account_get_connection(conn->account); serv_got_im(gc, nick, msg, 0, time(NULL)); } } *************** *** 129,133 **** bnet_proto_msg_talk(BNetConn *conn, const gchar** args) { const gchar* nick = args[0]; ! const gchar* game = args[1]; const gchar* msg = args[2]; GaimConversation *convo; --- 243,247 ---- bnet_proto_msg_talk(BNetConn *conn, const gchar** args) { const gchar* nick = args[0]; ! //const gchar* game = args[1]; const gchar* msg = args[2]; GaimConversation *convo; *************** *** 169,173 **** bnet_proto_msg_whispeart(BNetConn *conn, const gchar** args) { const gchar* nick = args[0]; ! const gchar* game = args[1]; const gchar* msg = args[2]; --- 283,287 ---- bnet_proto_msg_whispeart(BNetConn *conn, const gchar** args) { const gchar* nick = args[0]; ! //const gchar* game = args[1]; const gchar* msg = args[2]; Index: buddy.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/buddy.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** buddy.c 9 Jan 2005 09:59:59 -0000 1.7 --- buddy.c 12 Jan 2005 23:27:47 -0000 1.8 *************** *** 131,136 **** BNetConn *conn = BNET_CONN(gc->proto_data); BNetBuddy *b = bnet_buddy_new(buddy->name); ! g_hash_table_insert(conn->buddies, b->name, b); } --- 131,140 ---- BNetConn *conn = BNET_CONN(gc->proto_data); BNetBuddy *b = bnet_buddy_new(buddy->name); + const gchar *name; ! name = gaim_normalize(gc->account, buddy->name); ! ! if(!g_hash_table_lookup(conn->buddies, name)) ! g_hash_table_insert(conn->buddies, (gchar *)name, b); } Index: proto.h =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/proto.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** proto.h 8 Jan 2005 10:34:46 -0000 1.5 --- proto.h 12 Jan 2005 23:27:48 -0000 1.6 *************** *** 27,31 **** #include "bnet.h" ! typedef struct _BNetProtoProcInfo BNetProtoProcInfo; #include "conn.h" --- 27,33 ---- #include "bnet.h" ! typedef struct _BNetProtoProcInfo BNetProtoProcInfo; ! typedef struct _BNetWhispFromProcInfo BNetWhispFromProcInfo; ! //typedef struct _BNetInfoProcInfo BNetInfoProcInfo; #include "conn.h" *************** *** 39,42 **** --- 41,51 ---- }; + typedef void (*BNetWhispFromProcFunc)(BNetConn *, const gchar *, GList *args); + + struct _BNetWhispFromProcInfo { + const gchar* model; + BNetWhispFromProcFunc func; + }; + #ifdef __cplusplus extern "C" { |
From: Don S. <ri...@us...> - 2005-01-11 21:33:04
|
Update of /cvsroot/gaim-bnet/gaim-bnet/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6391/src Modified Files: chat.c Log Message: Patch 1100453, fixes showing of chan user list on rejoin Index: chat.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/chat.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** chat.c 9 Jan 2005 03:35:24 -0000 1.2 --- chat.c 11 Jan 2005 21:32:54 -0000 1.3 *************** *** 23,28 **** --- 23,37 ---- #include "chat.h" #include "conn.h" + #include "buddy.h" #include "intl.h" + void + bnet_hash_join_all(gpointer key, gpointer value, gpointer user_data) { + GaimConversation *convo = (GaimConversation *)user_data; + BNetUser *u = BNET_USER(value); + + gaim_conv_chat_add_user(GAIM_CONV_CHAT(convo), u->nick, u->game, 0, FALSE); + } + gint bnet_chat_send_im(GaimConnection *gc, const gchar *who, const gchar *what, *************** *** 72,76 **** chan = g_hash_table_lookup(data, "channel"); ! bnet_conn_send(conn, "/join %s\n", chan); } --- 81,99 ---- 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); ! g_return_if_fail(convo); ! ! g_hash_table_foreach(conn->users, bnet_hash_join_all, convo); ! } ! else { ! bnet_conn_send(conn, "/join %s\n", chan); ! } } |
From: Don S. <ri...@us...> - 2005-01-10 02:09:22
|
Update of /cvsroot/gaim-bnet/gaim-bnet/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15852/src Modified Files: conn.c Log Message: fixing comment typo Index: conn.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/conn.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** conn.c 9 Jan 2005 08:17:22 -0000 1.5 --- conn.c 10 Jan 2005 02:09:13 -0000 1.6 *************** *** 248,252 **** gaim_debug_info("bnet", "bnet_conn_close\n"); ! /* we need to remote the input cb that we created... */ if(gc->inpa > 0) gaim_input_remove(gc->inpa); --- 248,252 ---- gaim_debug_info("bnet", "bnet_conn_close\n"); ! /* we need to remove the input cb that we created... */ if(gc->inpa > 0) gaim_input_remove(gc->inpa); |
From: Gary K. <amc...@us...> - 2005-01-09 10:00:23
|
Update of /cvsroot/gaim-bnet/gaim-bnet/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21860/src Modified Files: bnet.c buddy.c buddy.h Log Message: Added the emblem handler, only shows offline right now. Do we want to eventually show an icon of the game that they might be in? Index: bnet.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/bnet.c,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** bnet.c 9 Jan 2005 09:47:54 -0000 1.25 --- bnet.c 9 Jan 2005 09:59:59 -0000 1.26 *************** *** 95,99 **** NO_BUDDY_ICONS, /* icon_spec */ bnet_icon, /* list_icon */ ! NULL, /* list_emblems */ NULL, /* status_text */ NULL, /* tooltip_text */ --- 95,99 ---- NO_BUDDY_ICONS, /* icon_spec */ bnet_icon, /* list_icon */ ! bnet_buddy_emblems, /* list_emblems */ NULL, /* status_text */ NULL, /* tooltip_text */ Index: buddy.h =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/buddy.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** buddy.h 9 Jan 2005 09:47:54 -0000 1.5 --- buddy.h 9 Jan 2005 09:59:59 -0000 1.6 *************** *** 62,65 **** --- 62,66 ---- void 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); /* Buddies API */ Index: buddy.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/buddy.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** buddy.c 9 Jan 2005 09:47:54 -0000 1.6 --- buddy.c 9 Jan 2005 09:59:59 -0000 1.7 *************** *** 163,166 **** --- 163,172 ---- } + void + bnet_buddy_emblems(GaimBuddy *b, char **se, char **sw, char **nw, char **ne) { + if(b->present == GAIM_BUDDY_OFFLINE) + *se = "offline"; + } + /****************************************************************************** * Buddies API |
From: Gary K. <amc...@us...> - 2005-01-09 09:48:04
|
Update of /cvsroot/gaim-bnet/gaim-bnet/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19852/src Modified Files: bnet.c buddy.c buddy.h Log Message: added get info for users, only shows in the debug window, but it's better than nothing.. Index: bnet.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/bnet.c,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** bnet.c 9 Jan 2005 04:03:38 -0000 1.24 --- bnet.c 9 Jan 2005 09:47:54 -0000 1.25 *************** *** 107,111 **** NULL, /* set_info */ NULL, /* send_typing */ ! NULL, /* get_info */ NULL, /* set_away */ NULL, /* set_idle */ --- 107,111 ---- NULL, /* set_info */ NULL, /* send_typing */ ! bnet_user_info, /* get_info */ NULL, /* set_away */ NULL, /* set_idle */ Index: buddy.h =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/buddy.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** buddy.h 8 Jan 2005 11:13:03 -0000 1.4 --- buddy.h 9 Jan 2005 09:47:54 -0000 1.5 *************** *** 51,54 **** --- 51,55 ---- 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); /* Users API */ Index: buddy.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/buddy.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** buddy.c 9 Jan 2005 04:03:38 -0000 1.5 --- buddy.c 9 Jan 2005 09:47:54 -0000 1.6 *************** *** 76,79 **** --- 76,86 ---- } + void + bnet_user_info(GaimConnection *gc, const gchar *who) { + BNetConn *conn = BNET_CONN(gc->proto_data); + + bnet_conn_send(conn, "/whois %s\n", who); + } + /****************************************************************************** * Users API |
From: Gary K. <amc...@us...> - 2005-01-09 08:17:31
|
Update of /cvsroot/gaim-bnet/gaim-bnet/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6244/src Modified Files: conn.c Log Message: Well I managed to kill the segfault after disconnecting/canceling.. but we can't seem to connect after we disconnect/cancel.. Index: conn.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/conn.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** conn.c 9 Jan 2005 04:03:38 -0000 1.4 --- conn.c 9 Jan 2005 08:17:22 -0000 1.5 *************** *** 244,254 **** BNetConn *conn; ! gaim_debug_info("bnet", "bnet_conn_close\n"); ! conn = BNET_CONN(gc->proto_data); ! if (!conn) ! return; g_free(conn); conn = NULL; --- 244,256 ---- BNetConn *conn; ! g_return_if_fail(gc); ! gaim_debug_info("bnet", "bnet_conn_close\n"); ! /* we need to remote 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; |
From: Gary K. <amc...@us...> - 2005-01-09 07:20:33
|
Update of /cvsroot/gaim-bnet/gaim-bnet/pixmaps In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30377/pixmaps Modified Files: bnet.png bnet.xcf Log Message: Added a drop shadow to the icon to make it stand out a bit more, unfortunetly it's still had to tell what it is when it's < 32x32 Index: bnet.xcf =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/pixmaps/bnet.xcf,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvs9T1IRf and /tmp/cvsJymqQG differ Index: bnet.png =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/pixmaps/bnet.png,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsaza5Sp and /tmp/cvsWOLUWQ differ |
From: Don S. <ri...@us...> - 2005-01-09 05:01:26
|
Update of /cvsroot/gaim-bnet/gaim-bnet/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7599/src Modified Files: proto.c Log Message: Handling second echo of user's own emotes Index: proto.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/proto.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** proto.c 9 Jan 2005 04:25:47 -0000 1.9 --- proto.c 9 Jan 2005 05:00:56 -0000 1.10 *************** *** 243,248 **** const gchar* msg = args[2]; ! /* XXX Our own emotes are displaying twice. Probably need to suppress ! * displaying emote here if it is from this user. */ buf = g_strdup_printf("/me %s", msg); --- 243,254 ---- const gchar* msg = args[2]; ! /* Our own emotes are displaying twice. */ ! if (g_utf8_validate(conn->user, -1, NULL) ! && g_utf8_validate(nick, -1, NULL)) { ! if (g_utf8_collate(conn->user, nick) == 0) { ! gaim_debug_info("bnet", "EMOTE FROM %s - %s\n", nick, msg); ! return; ! } ! } buf = g_strdup_printf("/me %s", msg); |
From: Don S. <ri...@us...> - 2005-01-09 04:25:56
|
Update of /cvsroot/gaim-bnet/gaim-bnet/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1391/src Modified Files: proto.c Log Message: For some reason the user's emotes are being printed twice, but regular messages aren't. We'll need to suppress a gaim convo write somewhere, and paco-paco suggested on the receiving end, to keep local echo of regular messages and emotes both printed to prevent weird timing issues. Just committing note for now. Index: proto.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/proto.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** proto.c 9 Jan 2005 04:03:38 -0000 1.8 --- proto.c 9 Jan 2005 04:25:47 -0000 1.9 *************** *** 243,246 **** --- 243,249 ---- const gchar* msg = args[2]; + /* XXX Our own emotes are displaying twice. Probably need to suppress + * displaying emote here if it is from this user. */ + buf = g_strdup_printf("/me %s", msg); |
From: Don S. <ri...@us...> - 2005-01-09 04:03:48
|
Update of /cvsroot/gaim-bnet/gaim-bnet/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29927/src Modified Files: bnet.c buddy.c conn.c proto.c Log Message: style nit-picking. I'm assuming we're going with tabs instead of spaces for indentation Index: bnet.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/bnet.c,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** bnet.c 9 Jan 2005 03:35:24 -0000 1.23 --- bnet.c 9 Jan 2005 04:03:38 -0000 1.24 *************** *** 45,49 **** BNetConn *conn = BNET_CONN(gc->proto_data); ! if(g_list_find(gaim_connections_get_all(), gc)) { gaim_debug_info("bnet", "bnet_raw_request_cb: sending raw message - \"%s\"\n", --- 45,49 ---- BNetConn *conn = BNET_CONN(gc->proto_data); ! if (g_list_find(gaim_connections_get_all(), gc)) { gaim_debug_info("bnet", "bnet_raw_request_cb: sending raw message - \"%s\"\n", *************** *** 56,69 **** static void bnet_send_raw_cmd(GaimPluginAction *action) { ! GaimConnection *gc = (GaimConnection*)action->context; ! gaim_debug_info("bnet", "bnet_send_raw_cmd\n"); ! gaim_request_input(gc, _("Send a raw command"), ! _("Send a raw command to the server"), ! _("Type here."), ! NULL, FALSE, FALSE, NULL, ! _("Send"), G_CALLBACK(bnet_raw_request_cb), ! _("Cancel"), NULL, gc); } --- 56,69 ---- static void bnet_send_raw_cmd(GaimPluginAction *action) { ! GaimConnection *gc = (GaimConnection*)action->context; ! gaim_debug_info("bnet", "bnet_send_raw_cmd\n"); ! gaim_request_input(gc, _("Send a raw command"), ! _("Send a raw command to the server"), ! _("Type here."), ! NULL, FALSE, FALSE, NULL, ! _("Send"), G_CALLBACK(bnet_raw_request_cb), ! _("Cancel"), NULL, gc); } *************** *** 74,80 **** GaimPluginAction *act; ! act = gaim_plugin_action_new(_("Send raw command..."), ! bnet_send_raw_cmd); ! m = g_list_append(m, act); return m; --- 74,80 ---- GaimPluginAction *act; ! act = gaim_plugin_action_new(_("Send raw command..."), ! bnet_send_raw_cmd); ! m = g_list_append(m, act); return m; *************** *** 86,90 **** static const char * bnet_icon(GaimAccount *a, GaimBuddy *b) { ! return "bnet"; } --- 86,90 ---- static const char * bnet_icon(GaimAccount *a, GaimBuddy *b) { ! return "bnet"; } Index: proto.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/proto.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** proto.c 9 Jan 2005 03:35:24 -0000 1.7 --- proto.c 9 Jan 2005 04:03:38 -0000 1.8 *************** *** 187,191 **** gc = gaim_account_get_connection(conn->account); ! if(len > 4 && ((info[1] == ':' && IS_NUM(info[0])) || (info[2] == ':' && IS_NUM(info[0]) && IS_NUM(info[1])))) { --- 187,191 ---- gc = gaim_account_get_connection(conn->account); ! if (len > 4 && ((info[1] == ':' && IS_NUM(info[0])) || (info[2] == ':' && IS_NUM(info[0]) && IS_NUM(info[1])))) { *************** *** 312,320 **** args[i][len] = 0; args_n++; ! //gaim_debug_info("bnet", "args[%d] %s(%d)\n", i, args[i], len); } else { args[i] = 0; ! //gaim_debug_info("bnet", "args[%d] %s(%d)\n", i, args[i], 0); } } --- 312,320 ---- args[i][len] = 0; args_n++; ! //gaim_debug_info("bnet", "args[%d] %s(%d)\n", i, args[i], len); } else { args[i] = 0; ! //gaim_debug_info("bnet", "args[%d] %s(%d)\n", i, args[i], 0); } } Index: conn.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/conn.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** conn.c 9 Jan 2005 03:35:24 -0000 1.3 --- conn.c 9 Jan 2005 04:03:38 -0000 1.4 *************** *** 46,50 **** va_end(args); ! if(!buff) return -1; --- 46,50 ---- va_end(args); ! if (!buff) return -1; *************** *** 82,86 **** break; case BNET_CS_USER: ! if(!strcmp(msg, "Username: ")) { bnet_conn_send(conn, "%s\n", conn->user); bnet_conn_update_progress(conn, BNET_CS_PASS); --- 82,86 ---- break; case BNET_CS_USER: ! if (!strcmp(msg, "Username: ")) { bnet_conn_send(conn, "%s\n", conn->user); bnet_conn_update_progress(conn, BNET_CS_PASS); *************** *** 89,93 **** break; case BNET_CS_PASS: ! if(!strcmp(msg, "Password: ")) { bnet_conn_send(conn, "%s\n", conn->pass); bnet_conn_update_progress(conn, BNET_CS_VRFY); --- 89,93 ---- break; case BNET_CS_PASS: ! if (!strcmp(msg, "Password: ")) { bnet_conn_send(conn, "%s\n", conn->pass); bnet_conn_update_progress(conn, BNET_CS_VRFY); *************** *** 96,100 **** break; case BNET_CS_VRFY: ! if(!strstr(msg, "incorrect")) { GaimConnection *gc; --- 96,100 ---- break; case BNET_CS_VRFY: ! if (!strstr(msg, "incorrect")) { GaimConnection *gc; *************** *** 128,132 **** conn = BNET_CONN(gc->proto_data); ! if(conn->inbuf_len < conn->inbuf_used + BNET_INITIAL_BUFSIZE) { conn->inbuf_len += BNET_INITIAL_BUFSIZE; conn->inbuf = g_realloc(conn->inbuf, conn->inbuf_len); --- 128,132 ---- conn = BNET_CONN(gc->proto_data); ! if (conn->inbuf_len < conn->inbuf_used + BNET_INITIAL_BUFSIZE) { conn->inbuf_len += BNET_INITIAL_BUFSIZE; conn->inbuf = g_realloc(conn->inbuf, conn->inbuf_len); *************** *** 136,143 **** BNET_INITIAL_BUFSIZE - 1); ! if(len < 0) { gaim_connection_error(gc, _("Read error")); return; ! } else if(len == 0) { /* Remote probably closed the connection */ return; --- 136,143 ---- BNET_INITIAL_BUFSIZE - 1); ! if (len < 0) { gaim_connection_error(gc, _("Read error")); return; ! } else if (len == 0) { /* Remote probably closed the connection */ return; *************** *** 150,154 **** * buffered in the BNET_CS_USER and BNET_CS_PASS states */ ! if(conn->state == BNET_CS_CONN || conn->state == BNET_CS_VRFY) { gchar *cur, *end; --- 150,154 ---- * buffered in the BNET_CS_USER and BNET_CS_PASS states */ ! if (conn->state == BNET_CS_CONN || conn->state == BNET_CS_VRFY) { gchar *cur, *end; *************** *** 161,165 **** *end = '\0'; ! if(cur != end) bnet_conn_parse_msg(conn, cur); --- 161,165 ---- *end = '\0'; ! if (cur != end) bnet_conn_parse_msg(conn, cur); *************** *** 168,172 **** /* mmm leftovers */ ! if(cur != conn->inbuf + conn->inbuf_used) { conn->inbuf_used -= (cur - conn->inbuf); memmove(conn->inbuf, cur, conn->inbuf_used); --- 168,172 ---- /* mmm leftovers */ ! if (cur != conn->inbuf + conn->inbuf_used) { conn->inbuf_used -= (cur - conn->inbuf); memmove(conn->inbuf, cur, conn->inbuf_used); *************** *** 186,190 **** GList *l; ! if(source < 0) return; --- 186,190 ---- GList *l; ! if (source < 0) return; *************** *** 192,196 **** l = gaim_connections_get_all(); ! if(!g_list_find(l, gc)) { close(source); return; --- 192,196 ---- l = gaim_connections_get_all(); ! if (!g_list_find(l, gc)) { close(source); return; *************** *** 236,240 **** err = gaim_proxy_connect(account, server, port, bnet_conn_login_cb, gc); ! if(err || !account->gc) gaim_connection_error(gc, _("Could not create socket")); } --- 236,240 ---- err = gaim_proxy_connect(account, server, port, bnet_conn_login_cb, gc); ! if (err || !account->gc) gaim_connection_error(gc, _("Could not create socket")); } *************** *** 248,252 **** conn = BNET_CONN(gc->proto_data); ! if(!conn) return; --- 248,252 ---- conn = BNET_CONN(gc->proto_data); ! if (!conn) return; Index: buddy.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/buddy.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** buddy.c 8 Jan 2005 11:13:03 -0000 1.4 --- buddy.c 9 Jan 2005 04:03:38 -0000 1.5 *************** *** 55,62 **** user->nick = g_strdup(nick); ! if(game) user->game = g_strdup(game); ! if(flags) user->flags = g_strdup(flags); --- 55,62 ---- user->nick = g_strdup(nick); ! if (game) user->game = g_strdup(game); ! if (flags) user->flags = g_strdup(flags); *************** *** 139,143 **** group = gaim_find_group(BNET_DEFAULT_GROUP_NAME); ! if(!group) { group = gaim_group_new(BNET_DEFAULT_GROUP_NAME); gaim_blist_add_group(group, NULL); --- 139,143 ---- group = gaim_find_group(BNET_DEFAULT_GROUP_NAME); ! if (!group) { group = gaim_group_new(BNET_DEFAULT_GROUP_NAME); gaim_blist_add_group(group, NULL); |
From: Don S. <ri...@us...> - 2005-01-09 03:35:36
|
Update of /cvsroot/gaim-bnet/gaim-bnet/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24970/src Modified Files: bnet.c chat.c chat.h conn.c conn.h proto.c Log Message: evew added basic chat and IM functionality. I got emote parsing working. Yay me :p Index: bnet.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/bnet.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** bnet.c 8 Jan 2005 19:54:25 -0000 1.22 --- bnet.c 9 Jan 2005 03:35:24 -0000 1.23 *************** *** 100,104 **** NULL, /* away_states */ NULL, /* blist_node_menu */ ! NULL, /* chat_info */ NULL, /* chat_info_defaults */ bnet_conn_login, /* login */ --- 100,104 ---- NULL, /* away_states */ NULL, /* blist_node_menu */ ! bnet_chat_info, /* chat_info */ NULL, /* chat_info_defaults */ bnet_conn_login, /* login */ *************** *** 121,130 **** NULL, /* set_permit_deny */ NULL, /* warn */ ! NULL, /* join_chat */ NULL, /* reject_chat */ NULL, /* chat_invite */ ! NULL, /* chat_leave */ NULL, /* chat_whisper */ ! NULL, /* chat_send */ NULL, /* keepalive */ NULL, /* register_user */ --- 121,131 ---- NULL, /* set_permit_deny */ NULL, /* warn */ ! bnet_chat_join, /* join_chat */ NULL, /* reject_chat */ + NULL, /* get_chat_name */ NULL, /* chat_invite */ ! bnet_chat_leave, /* chat_leave */ NULL, /* chat_whisper */ ! bnet_chat_send, /* chat_send */ NULL, /* keepalive */ NULL, /* register_user */ Index: conn.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/conn.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** conn.c 8 Jan 2005 10:34:46 -0000 1.2 --- conn.c 9 Jan 2005 03:35:24 -0000 1.3 *************** *** 225,228 **** --- 225,229 ---- conn->user = gaim_account_get_username(account); conn->pass = gaim_account_get_password(account); + conn->nick = g_strdup(conn->user); conn->users = bnet_users_new(); conn->buddies = bnet_buddies_new(); Index: chat.h =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/chat.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** chat.h 8 Jan 2005 11:13:03 -0000 1.1 --- chat.h 9 Jan 2005 03:35:24 -0000 1.2 *************** *** 29,32 **** --- 29,37 ---- gint bnet_chat_send_im(GaimConnection *gc, const gchar *who, const gchar *what, GaimConvImFlags imflags); + GList *bnet_chat_info(GaimConnection *gc); + void bnet_chat_join(GaimConnection *gc, GHashTable *data); + void bnet_chat_leave(GaimConnection *gc, int id); + int bnet_chat_send(GaimConnection *gc, int id, const char *what); + #ifdef __cplusplus Index: proto.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/proto.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** proto.c 8 Jan 2005 10:34:46 -0000 1.6 --- proto.c 9 Jan 2005 03:35:24 -0000 1.7 *************** *** 29,32 **** --- 29,33 ---- #include <string.h> + #include "intl.h" #include "proto.h" #include "buddy.h" *************** *** 34,43 **** #define IS_NUM(c) ((c) >= '0' && (c) <= '9') static void ! bnet_proto_msg_user(BNetConn *conn, const gchar** args) { BNetUser *u; ! const gchar* nick = args[0]; ! const gchar* game = args[1]; ! const gchar* flags = args[2]; u = BNET_USER(g_hash_table_lookup(conn->users, nick)); --- 35,47 ---- #define IS_NUM(c) ((c) >= '0' && (c) <= '9') + static gboolean + bnet_hash_destroy_all(gpointer key, gpointer value, gpointer user_data) { + return TRUE; + } + static void ! bnet_proto_msg_join_user(BNetConn *conn, const gchar* nick, const gchar* flags, const gchar* game, gboolean new_arrival) { BNetUser *u; ! GaimConversation *convo; u = BNET_USER(g_hash_table_lookup(conn->users, nick)); *************** *** 47,58 **** } ! gaim_debug_info("bnet", "USER %02u users on chan now!\n", ! g_hash_table_size(conn->users)); } static void bnet_proto_msg_join(BNetConn *conn, const gchar** args) { ! // reasons to distinguish between JOIN and USER ? ! bnet_proto_msg_user(conn, args); } --- 51,71 ---- } ! convo = gaim_find_conversation_with_account(conn->chan, conn->account); ! if (convo) { ! gaim_conv_chat_add_user(GAIM_CONV_CHAT(convo), ! nick, game, 0, new_arrival); ! } else { ! gaim_debug_info("bnet", "JOIN/USER %s\n", nick); ! } ! } ! ! static void ! bnet_proto_msg_user(BNetConn *conn, const gchar** args) { ! bnet_proto_msg_join_user(conn, args[0], args[1], args[2], FALSE); } static void bnet_proto_msg_join(BNetConn *conn, const gchar** args) { ! bnet_proto_msg_join_user(conn, args[0], args[1], args[2], TRUE); } *************** *** 60,70 **** bnet_proto_msg_leave(BNetConn *conn, const gchar** args) { const gchar* nick = args[0]; ! //const gchar* game = args[1]; ! //const gchar* flags = args[2]; ! g_hash_table_remove(conn->users, nick); ! gaim_debug_info("bnet", "LEAVE %02u users on chan now!\n", ! g_hash_table_size(conn->users)); } --- 73,89 ---- bnet_proto_msg_leave(BNetConn *conn, const gchar** args) { const gchar* nick = args[0]; ! const gchar* game = args[1]; ! const gchar* flags = args[2]; ! GaimConversation *convo; ! g_hash_table_remove(conn->users, nick); ! convo = gaim_find_conversation_with_account(conn->chan, conn->account); ! if (convo) { ! if (gaim_conv_chat_find_user(GAIM_CONV_CHAT(convo), nick)) ! gaim_conv_chat_remove_user(GAIM_CONV_CHAT(convo), nick, ""); ! } else { ! gaim_debug_info("bnet", "LEAVE %s\n", nick); ! } } *************** *** 72,79 **** bnet_proto_msg_whispearf(BNetConn *conn, const gchar** args) { const gchar* nick = args[0]; ! //const gchar* game = args[1]; const gchar* msg = args[2]; gaim_debug_info("bnet", "WHISP FROM %s - %s\n", nick, msg); } --- 91,127 ---- bnet_proto_msg_whispearf(BNetConn *conn, const gchar** args) { const gchar* nick = args[0]; ! const gchar* game = args[1]; const gchar* msg = args[2]; + GaimConnection *gc; + gchar *tmp; + gint len; + gaim_debug_info("bnet", "WHISP FROM %s - %s\n", nick, msg); + + gc = gaim_account_get_connection(conn->account); + + tmp = g_strdup_printf("Your friend %s ", nick); + if (!memcmp(msg,tmp,len=strlen(tmp))) { + gchar *p = tmp+len; + + if (!memcmp(p, "has entered ", 12)) { + p += 8; + if (!strcmp(p, "Battle.net.")) { + serv_got_update(gc, nick, TRUE, 0, 0, 0, 0); + } else if (!memcmp(p, "a *** game called ", 10)) { + /* What to do here? */ + } else { + gaim_debug_info("bnet", "** UNKNOWN SERVER WHISP\n"); + } + } else if (!strcmp(p, "has exited Battle.net.")) { + serv_got_update(gc, nick, FALSE, 0, 0, 0, 0); + } else { + gaim_debug_info("bnet", "** UNKNOWN SERVER WHISP\n"); + } + } else { + serv_got_im(gc, nick, msg, 0, time(NULL)); + } + g_free(tmp); } *************** *** 81,104 **** bnet_proto_msg_talk(BNetConn *conn, const gchar** args) { const gchar* nick = args[0]; ! //const gchar* game = args[1]; const gchar* msg = args[2]; ! gaim_debug_info("bnet", "<%s>: %s\n", nick, msg); } static void bnet_proto_msg_channel(BNetConn *conn, const gchar** args) { ! const gchar* chan = args[0]; ! g_free(conn->chan); conn->chan = g_strdup(chan); ! gaim_debug_info("bnet", "CHAN %s\n", chan); } static void bnet_proto_msg_userflg(BNetConn *conn, const gchar** args) { ! // useless and never seen gaim_debug_info("bnet", "USERFLG\n"); } --- 129,166 ---- bnet_proto_msg_talk(BNetConn *conn, const gchar** args) { const gchar* nick = args[0]; ! const gchar* game = args[1]; const gchar* msg = args[2]; + GaimConversation *convo; ! convo = gaim_find_conversation_with_account(conn->chan, conn->account); ! if (convo) { ! gaim_conv_chat_write(GAIM_CONV_CHAT(convo), nick, msg, 0, time(0)); ! } else { ! gaim_debug_info("bnet", "<%s>: %s\n", nick, msg); ! } } static void bnet_proto_msg_channel(BNetConn *conn, const gchar** args) { ! const gchar* chan; ! GaimConnection *gc; ! gc = gaim_account_get_connection(conn->account); ! chan = args[0]; ! ! if (conn->chan) ! g_free(conn->chan); conn->chan = g_strdup(chan); ! /* We must free the old users list... if any */ ! g_hash_table_foreach_remove(conn->users, bnet_hash_destroy_all, NULL); ! ! serv_got_joined_chat(gc, 1, chan); } static void bnet_proto_msg_userflg(BNetConn *conn, const gchar** args) { ! /* Useless and never seen */ gaim_debug_info("bnet", "USERFLG\n"); } *************** *** 107,111 **** bnet_proto_msg_whispeart(BNetConn *conn, const gchar** args) { const gchar* nick = args[0]; ! //const gchar* game = args[1]; const gchar* msg = args[2]; --- 169,173 ---- bnet_proto_msg_whispeart(BNetConn *conn, const gchar** args) { const gchar* nick = args[0]; ! const gchar* game = args[1]; const gchar* msg = args[2]; *************** *** 118,145 **** guint len = strlen(info); gaim_debug_info("bnet", "INFO %s\n", info); if(len > 4 && ! ((info[1] == ':' && IS_NUM(info[0])) || ! (info[2] == ':' && IS_NUM(info[0]) && IS_NUM(info[1])))) { BNetBuddy *b; ! GaimConnection *gc = gaim_account_get_connection(conn->account); ! gchar *p, *nick, *state; ! p = strchr(info,' '); ! sscanf(p, " %a[^,], %as", &nick, &state); ! b = g_hash_table_lookup(conn->buddies, nick); ! if (!b) ! bnet_buddy_add_default(conn, nick); ! if (!strcmp(state,"offline")) ! serv_got_update(gc, nick, FALSE, 0, 0, 0, 0); ! else ! serv_got_update(gc, nick, TRUE, 0, 0, 0, 0); ! free(nick); ! free(state); } } --- 180,228 ---- guint len = strlen(info); + GaimConnection *gc; + gchar *p; + gaim_debug_info("bnet", "INFO %s\n", info); + gc = gaim_account_get_connection(conn->account); + if(len > 4 && ! ((info[1] == ':' && IS_NUM(info[0])) || ! (info[2] == ':' && IS_NUM(info[0]) && IS_NUM(info[1])))) { BNetBuddy *b; ! gchar *nick, *state; ! p = strchr(info,' '); ! sscanf(p, " %a[^,], %as", &nick, &state); ! b = g_hash_table_lookup(conn->buddies, nick); ! if (!b) ! bnet_buddy_add_default(conn, nick); ! if (!strcmp(state,"offline")) ! serv_got_update(gc, nick, FALSE, 0, 0, 0, 0); ! else ! serv_got_update(gc, nick, TRUE, 0, 0, 0, 0); ! free(nick); ! free(state); ! } else if ((p = strchr(info, ' ')) && ! (strlen(p) > 10) && ! !memcmp(p, " is using ", 10)) { ! /* We receive this message in reply to a /WHERE or /WHOIS command ! * We can assume it as a confirmation that user is online ! */ ! gchar* nick = (gchar*)malloc(p-info+1); ! memcpy(nick,info,p-info); ! nick[p-info] = 0; ! ! gaim_debug_info("bnet", "ONLINE FROM /WHERE - \"%s\"\n", nick); ! serv_got_update(gc, nick, TRUE, 0, 0, 0, 0); ! ! free(nick); ! } ! else { ! gaim_debug_info("bnet", "UNKNOWN INFO\n"); } } *************** *** 154,162 **** static void bnet_proto_msg_emote(BNetConn *conn, const gchar** args) { const gchar* nick = args[0]; //const gchar* game = args[1]; const gchar* msg = args[2]; ! gaim_debug_info("bnet", "EMOTE FROM %s - %s\n", nick, msg); } --- 237,254 ---- static void bnet_proto_msg_emote(BNetConn *conn, const gchar** args) { + GaimConversation *convo; + gchar *buf; const gchar* nick = args[0]; //const gchar* game = args[1]; const gchar* msg = args[2]; ! buf = g_strdup_printf("/me %s", msg); ! ! convo = gaim_find_conversation_with_account(conn->chan, conn->account); ! if (convo) { ! gaim_conv_chat_write(GAIM_CONV_CHAT(convo), nick, buf, 0, time(0)); ! } else { ! gaim_debug_info("bnet", "EMOTE FROM %s - %s\n", nick, msg); ! } } *************** *** 171,174 **** --- 263,271 ---- gaim_debug_info("bnet", "NAME %s\n", name); + + if (conn->nick) + g_free(conn->nick); + + conn->nick = g_strdup(name); } Index: chat.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/chat.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** chat.c 8 Jan 2005 11:13:03 -0000 1.1 --- chat.c 9 Jan 2005 03:35:24 -0000 1.2 *************** *** 19,31 **** * $Id$ */ #include "chat.h" #include "conn.h" gint bnet_chat_send_im(GaimConnection *gc, const gchar *who, const gchar *what, ! GaimConvImFlags imflags) ! { BNetConn *conn; conn = BNET_CONN(gc->proto_data); bnet_conn_send(conn, "/w %s %s\n", who, what); --- 19,39 ---- * $Id$ */ + #include <errno.h> + #include "chat.h" #include "conn.h" + #include "intl.h" gint bnet_chat_send_im(GaimConnection *gc, const gchar *who, const gchar *what, ! GaimConvImFlags imflags) { BNetConn *conn; + gaim_debug_info("bnet", "bnet_chat_send_im\n"); + + g_return_val_if_fail(gc, 0); + g_return_val_if_fail(who, 0); + g_return_val_if_fail(what, 0); + conn = BNET_CONN(gc->proto_data); bnet_conn_send(conn, "/w %s %s\n", who, what); *************** *** 33,34 **** --- 41,104 ---- return 1; } + + GList * + bnet_chat_info(GaimConnection *gc) { + GList *m = NULL; + struct proto_chat_entry *pce; + + gaim_debug_info("bnet", "bnet_chat_info\n"); + + g_return_val_if_fail(gc, NULL); + + pce = g_new0(struct proto_chat_entry, 1); + pce->label = _("_Channel:"); + pce->identifier = "channel"; + m = g_list_append(m, pce); + + return m; + } + + void + bnet_chat_join(GaimConnection *gc, GHashTable *data) { + const gchar *chan; + BNetConn *conn; + + gaim_debug_info("bnet", "bnet_chat_join\n"); + + g_return_if_fail(gc); + g_return_if_fail(data); + + conn = BNET_CONN(gc->proto_data); + chan = g_hash_table_lookup(data, "channel"); + + bnet_conn_send(conn, "/join %s\n", chan); + } + + void + bnet_chat_leave(GaimConnection *gc, int id) { + gaim_debug_info("bnet", "bnet_chat_leave\n"); + } + + int + bnet_chat_send(GaimConnection *gc, int id, const char *what) { + BNetConn *conn; + GaimConversation *convo; + + gaim_debug_info("bnet", "bnet_chat_send\n"); + + g_return_val_if_fail(gc, -EINVAL); + + conn = BNET_CONN(gc->proto_data); + convo = gaim_find_chat(gc, id); + + if (!convo) { + gaim_debug(GAIM_DEBUG_ERROR, "bnet", "chat send on nonexistent chat\n"); + return -EINVAL; + } + + bnet_conn_send(conn, "%s\n", what); + + gaim_conv_chat_write(GAIM_CONV_CHAT(convo), conn->nick, what, 0, time(0)); + + return 0; + } Index: conn.h =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/conn.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** conn.h 8 Jan 2005 10:34:46 -0000 1.2 --- conn.h 9 Jan 2005 03:35:24 -0000 1.3 *************** *** 52,55 **** --- 52,56 ---- GSList *exp; + gchar *nick; gchar *chan; GHashTable *users; |
From: Don S. <ri...@us...> - 2005-01-08 19:54:46
|
Update of /cvsroot/gaim-bnet/gaim-bnet/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29834/src Modified Files: bnet.c Log Message: Going back to string for server since gaim account option list UI isn't implemented in gaim :p Index: bnet.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/bnet.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** bnet.c 8 Jan 2005 19:46:39 -0000 1.21 --- bnet.c 8 Jan 2005 19:54:25 -0000 1.22 *************** *** 176,180 **** --- 176,182 ---- static void init_plugin(GaimPlugin *plugin) { + #if 0 GList *server_list = NULL; + #endif #ifdef ENABLE_NLS *************** *** 188,192 **** GaimAccountOption *option; ! //option = gaim_account_option_string_new(_("Server"), "server", BNET_DEFAULT_SERVER); /* There _must_ be a cooler way to define this list :p */ server_list = g_list_append (server_list, "asia.battle.net"); --- 190,195 ---- GaimAccountOption *option; ! ! #if 0 /* There _must_ be a cooler way to define this list :p */ server_list = g_list_append (server_list, "asia.battle.net"); *************** *** 198,202 **** --- 201,210 ---- server_list = g_list_append (server_list, "uswest.battle.net"); server_list = g_list_append (server_list, _("US - West")); + + /* TODO gaim core account option list has no UI! */ option = gaim_account_option_list_new(_("Server"), "server", server_list); + #endif + + option = gaim_account_option_string_new(_("Server"), "server", BNET_DEFAULT_SERVER); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); |
From: Gary K. <amc...@us...> - 2005-01-08 19:46:48
|
Update of /cvsroot/gaim-bnet/gaim-bnet/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28230 Modified Files: bnet.c Log Message: no sense in making this global.. Index: bnet.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/bnet.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** bnet.c 8 Jan 2005 19:38:47 -0000 1.20 --- bnet.c 8 Jan 2005 19:46:39 -0000 1.21 *************** *** 38,43 **** static GaimPlugin *_bnet_plugin = NULL; - GList *server_list = NULL; - /****************************************************************************** * Raw command stuff --- 38,41 ---- *************** *** 178,181 **** --- 176,181 ---- static void init_plugin(GaimPlugin *plugin) { + GList *server_list = NULL; + #ifdef ENABLE_NLS bindtextdomain(BNET_PACKAGE, LOCALEDIR); |
From: Don S. <ri...@us...> - 2005-01-08 19:39:13
|
Update of /cvsroot/gaim-bnet/gaim-bnet/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26175/src Modified Files: bnet.c Log Message: Setting it in init Index: bnet.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/bnet.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** bnet.c 8 Jan 2005 19:09:47 -0000 1.19 --- bnet.c 8 Jan 2005 19:38:47 -0000 1.20 *************** *** 39,51 **** GList *server_list = NULL; - /* There _must_ be a cooler way to define this list :p */ - server_list = g_list_append (server_list, "asia.battle.net"); - server_list = g_list_append (server_list, _("Asia")); - server_list = g_list_append (server_list, "europe.battle.net"); - server_list = g_list_append (server_list, _("Europe")); - server_list = g_list_append (server_list, "useast.battle.net"); - server_list = g_list_append (server_list, _("US - East")); - server_list = g_list_append (server_list, "uswest.battle.net"); - server_list = g_list_append (server_list, _("US - West")); /****************************************************************************** --- 39,42 ---- *************** *** 198,201 **** --- 189,201 ---- GaimAccountOption *option; //option = gaim_account_option_string_new(_("Server"), "server", BNET_DEFAULT_SERVER); + /* There _must_ be a cooler way to define this list :p */ + server_list = g_list_append (server_list, "asia.battle.net"); + server_list = g_list_append (server_list, _("Asia")); + server_list = g_list_append (server_list, "europe.battle.net"); + server_list = g_list_append (server_list, _("Europe")); + server_list = g_list_append (server_list, "useast.battle.net"); + server_list = g_list_append (server_list, _("US - East")); + server_list = g_list_append (server_list, "uswest.battle.net"); + server_list = g_list_append (server_list, _("US - West")); option = gaim_account_option_list_new(_("Server"), "server", server_list); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); |
From: Gary K. <amc...@us...> - 2005-01-08 19:14:55
|
Update of /cvsroot/gaim-bnet/gaim-bnet In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20960 Modified Files: .cvsignore Added Files: mkinstalldirs Log Message: this is actually needed... --- NEW FILE: mkinstalldirs --- #! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman <fri...@pr...> # Created: 1993-05-16 # Public domain errstatus=0 dirmode="" usage="\ Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." # process command line arguments while test $# -gt 0 ; do case $1 in -h | --help | --h*) # -h for help echo "$usage" 1>&2 exit 0 ;; -m) # -m PERM arg shift test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } dirmode=$1 shift ;; --) # stop option processing shift break ;; -*) # unknown option echo "$usage" 1>&2 exit 1 ;; *) # first non-opt arg break ;; esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac case $dirmode in '') if mkdir -p -- . 2>/dev/null; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" fi ;; *) if mkdir -m "$dirmode" -p -- . 2>/dev/null; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" fi ;; esac for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case $pathcomp in -*) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr="" chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp="$pathcomp/" done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 2 # End: # mkinstalldirs ends here Index: .cvsignore =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/.cvsignore,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** .cvsignore 8 Jan 2005 06:00:04 -0000 1.4 --- .cvsignore 8 Jan 2005 19:14:44 -0000 1.5 *************** *** 18,22 **** m4 missing - mkinstalldirs stamp-h1 --- 18,21 ---- |
From: Don S. <ri...@us...> - 2005-01-08 19:10:03
|
Update of /cvsroot/gaim-bnet/gaim-bnet/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19994/src Modified Files: bnet.c Log Message: Work on glist. Committing so grim can see Index: bnet.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/bnet.c,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** bnet.c 8 Jan 2005 11:24:00 -0000 1.18 --- bnet.c 8 Jan 2005 19:09:47 -0000 1.19 *************** *** 38,41 **** --- 38,52 ---- static GaimPlugin *_bnet_plugin = NULL; + GList *server_list = NULL; + /* There _must_ be a cooler way to define this list :p */ + server_list = g_list_append (server_list, "asia.battle.net"); + server_list = g_list_append (server_list, _("Asia")); + server_list = g_list_append (server_list, "europe.battle.net"); + server_list = g_list_append (server_list, _("Europe")); + server_list = g_list_append (server_list, "useast.battle.net"); + server_list = g_list_append (server_list, _("US - East")); + server_list = g_list_append (server_list, "uswest.battle.net"); + server_list = g_list_append (server_list, _("US - West")); + /****************************************************************************** * Raw command stuff *************** *** 186,190 **** GaimAccountOption *option; ! option = gaim_account_option_string_new(_("Server"), "server", BNET_DEFAULT_SERVER); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); --- 197,202 ---- GaimAccountOption *option; ! //option = gaim_account_option_string_new(_("Server"), "server", BNET_DEFAULT_SERVER); ! option = gaim_account_option_list_new(_("Server"), "server", server_list); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); |
From: Don S. <ri...@us...> - 2005-01-08 18:33:34
|
Update of /cvsroot/gaim-bnet/gaim-bnet In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12450 Modified Files: AUTHORS Log Message: Behold Index: AUTHORS =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/AUTHORS,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** AUTHORS 7 Jan 2005 22:36:23 -0000 1.3 --- AUTHORS 8 Jan 2005 18:33:25 -0000 1.4 *************** *** 5,12 **** Developers ---------- ! Dario 'evew' Zilocchi Don 'rizzo' Seiler <do...@NO...> ! ! Mentor ! ------ ! Gary Kramlich --- 5,9 ---- Developers ---------- ! Gary 'grim' Kramlich Don 'rizzo' Seiler <do...@NO...> ! Dario 'evew' Zilocchi |
From: Gary K. <amc...@us...> - 2005-01-08 12:37:37
|
Update of /cvsroot/gaim-bnet/gaim-bnet/pixmaps In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2438/pixmaps Modified Files: Makefile.am Added Files: bnet.png bnet.xcf Log Message: I decided to put and icon together.. It looks horrible when it's shrunk down for the account editor or the small buddy lists though... :/ --- NEW FILE: bnet.xcf --- (This appears to be a binary file; contents omitted.) Index: Makefile.am =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/pixmaps/Makefile.am,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Makefile.am 28 Jul 2004 03:08:20 -0000 1.1.1.1 --- Makefile.am 8 Jan 2005 12:37:21 -0000 1.2 *************** *** 1,4 **** EXTRA_DIST = \ ! bnet.png bnetconfpixdir = $(datadir)/pixmaps/gaim/status/default --- 1,5 ---- EXTRA_DIST = \ ! bnet.png \ ! bnet.xcf bnetconfpixdir = $(datadir)/pixmaps/gaim/status/default --- NEW FILE: bnet.png --- (This appears to be a binary file; contents omitted.) |
From: Gary K. <amc...@us...> - 2005-01-08 12:37:37
|
Update of /cvsroot/gaim-bnet/gaim-bnet In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2438 Modified Files: Makefile.am Log Message: I decided to put and icon together.. It looks horrible when it's shrunk down for the account editor or the small buddy lists though... :/ Index: Makefile.am =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Makefile.am 8 Jan 2005 10:55:35 -0000 1.3 --- Makefile.am 8 Jan 2005 12:37:21 -0000 1.4 *************** *** 9,13 **** po/ChangeLog ! SUBDIRS = doc intl po src BUILT_SOURCES = bnet_config.h --- 9,13 ---- po/ChangeLog ! SUBDIRS = doc intl pixmaps po src BUILT_SOURCES = bnet_config.h |
From: Gary K. <amc...@us...> - 2005-01-08 11:24:09
|
Update of /cvsroot/gaim-bnet/gaim-bnet/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22887/src Modified Files: bnet.c bnet.h Log Message: hey gaim can load it again.. Index: bnet.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/bnet.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** bnet.c 8 Jan 2005 11:13:03 -0000 1.17 --- bnet.c 8 Jan 2005 11:24:00 -0000 1.18 *************** *** 24,27 **** --- 24,29 ---- #endif + #define GAIM_PLUGINS + #define _GNU_SOURCE *************** *** 173,177 **** static void ! _init_plugin(GaimPlugin *plugin) { #ifdef ENABLE_NLS bindtextdomain(BNET_PACKAGE, LOCALEDIR); --- 175,179 ---- static void ! init_plugin(GaimPlugin *plugin) { #ifdef ENABLE_NLS bindtextdomain(BNET_PACKAGE, LOCALEDIR); *************** *** 197,199 **** }; ! GAIM_INIT_PLUGIN(bnet, _init_plugin, info); --- 199,201 ---- }; ! GAIM_INIT_PLUGIN(bnet, init_plugin, info); Index: bnet.h =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/bnet.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** bnet.h 8 Jan 2005 10:55:36 -0000 1.8 --- bnet.h 8 Jan 2005 11:24:00 -0000 1.9 *************** *** 26,31 **** #define BNET_H - #define GAIM_PLUGINS - #define BNET_DEFAULT_SERVER "europe.battle.net" #define BNET_DEFAULT_PORT 6112 --- 26,29 ---- |
From: Gary K. <amc...@us...> - 2005-01-08 11:13:13
|
Update of /cvsroot/gaim-bnet/gaim-bnet/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21411/src Modified Files: Makefile.am bnet.c buddy.c buddy.h Added Files: chat.c chat.h Log Message: Ok... EVERYTHING should be in a decently namespaced place now.. Index: bnet.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/bnet.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** bnet.c 8 Jan 2005 10:34:46 -0000 1.16 --- bnet.c 8 Jan 2005 11:13:03 -0000 1.17 *************** *** 1,7 **** /* - * @file bnet.c - * * gaim-bnet Protocol Plugin - * * Copyright (C) 2004 by folks in AUTHORS file * --- 1,4 ---- *************** *** 33,36 **** --- 30,34 ---- #include "bnet.h" #include "buddy.h" + #include "chat.h" #include "conn.h" #include "intl.h" *************** *** 38,43 **** static GaimPlugin *_bnet_plugin = NULL; ! ///////////////////////////////////////////////// ! static void bnet_raw_request_cb(GaimConnection *gc, char *msg) { --- 36,42 ---- static GaimPlugin *_bnet_plugin = NULL; ! /****************************************************************************** ! * Raw command stuff ! *****************************************************************************/ static void bnet_raw_request_cb(GaimConnection *gc, char *msg) { *************** *** 53,96 **** } - ///////////////////////////////////////////////// - - static int - bnet_send_im(GaimConnection *gc, const char *who, const char *what, - GaimConvImFlags imflags) - { - BNetConn *conn; - - gaim_debug_info("bnet", "bnet_send_im\n"); - conn = BNET_CONN(gc->proto_data); - - bnet_conn_send(conn, "/w %s %s\n", who, what); - - return 1; - }; - - static const char * - bnet_icon(GaimAccount *a, GaimBuddy *b) { - return "bnet"; - } - - static void - bnet_add_buddy(GaimConnection *gc, GaimBuddy *buddy, GaimGroup *group) { - BNetConn *conn = BNET_CONN(gc->proto_data); - BNetBuddy *b = bnet_buddy_new(buddy->name); - - gaim_debug_info("bnet", "bnet_add_buddy\n"); - - g_hash_table_insert(conn->buddies, b->name, b); - }; - - static void - bnet_remove_buddy(GaimConnection *gc, GaimBuddy *buddy, GaimGroup *group) { - BNetConn *conn = BNET_CONN(gc->proto_data); - - gaim_debug_info("bnet", "bnet_remove_buddy\n"); - - g_hash_table_remove(conn->buddies, buddy->name); - }; - static void bnet_send_raw_cmd(GaimPluginAction *action) { --- 52,55 ---- *************** *** 120,123 **** --- 79,90 ---- } + /****************************************************************************** + * Protocol/Plugin stuff + *****************************************************************************/ + static const char * + bnet_icon(GaimAccount *a, GaimBuddy *b) { + return "bnet"; + } + static GaimPluginProtocolInfo prpl_info = { OPT_PROTO_PASSWORD_OPTIONAL, /* options */ *************** *** 135,139 **** bnet_conn_login, /* login */ bnet_conn_close, /* close */ ! bnet_send_im, /* send_im */ NULL, /* set_info */ NULL, /* send_typing */ --- 102,106 ---- bnet_conn_login, /* login */ bnet_conn_close, /* close */ ! bnet_chat_send_im, /* send_im */ NULL, /* set_info */ NULL, /* send_typing */ *************** *** 142,148 **** NULL, /* set_idle */ NULL, /* change_password */ ! bnet_add_buddy, /* add_buddy */ NULL, /* add_buddies */ ! bnet_remove_buddy, /* remove_buddy */ NULL, /* remove_buddies */ NULL, /* add_permit */ --- 109,115 ---- NULL, /* set_idle */ NULL, /* change_password */ ! bnet_buddy_add, /* add_buddy */ NULL, /* add_buddies */ ! bnet_buddy_remove, /* remove_buddy */ NULL, /* remove_buddies */ NULL, /* add_permit */ Index: Makefile.am =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/Makefile.am,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Makefile.am 8 Jan 2005 10:07:32 -0000 1.6 --- Makefile.am 8 Jan 2005 11:13:03 -0000 1.7 *************** *** 2,5 **** --- 2,6 ---- bnet.h \ buddy.h \ + chat.h \ conn.h \ intl.h \ *************** *** 17,20 **** --- 18,22 ---- bnet.c \ buddy.c \ + chat.c \ conn.c \ proto.c Index: buddy.h =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/buddy.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** buddy.h 8 Jan 2005 10:34:46 -0000 1.3 --- buddy.h 8 Jan 2005 11:13:03 -0000 1.4 *************** *** 58,62 **** --- 58,64 ---- BNetBuddy *bnet_buddy_new(const gchar *name); void bnet_buddy_free(BNetBuddy *buddy); + void bnet_buddy_add(GaimConnection *gc, GaimBuddy *buddy, GaimGroup *group); void bnet_buddy_add_default(BNetConn *conn, const gchar *name); + void bnet_buddy_remove(GaimConnection *gc, GaimBuddy *buddy, GaimGroup *group); /* Buddies API */ --- NEW FILE: chat.h --- /* * gaim-bnet Protocol Plugin * Copyright (C) 2004 by folks in AUTHORS file * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * $Id: chat.h,v 1.1 2005/01/08 11:13:03 amc_grim Exp $ */ #ifndef BNET_CHAT_H #define BNET_CHAT_H #include "bnet.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ gint bnet_chat_send_im(GaimConnection *gc, const gchar *who, const gchar *what, GaimConvImFlags imflags); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* PROTO_H */ --- NEW FILE: chat.c --- /* * gaim-bnet Protocol Plugin * Copyright (C) 2004 by folks in AUTHORS file * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * $Id: chat.c,v 1.1 2005/01/08 11:13:03 amc_grim Exp $ */ #include "chat.h" #include "conn.h" gint bnet_chat_send_im(GaimConnection *gc, const gchar *who, const gchar *what, GaimConvImFlags imflags) { BNetConn *conn; conn = BNET_CONN(gc->proto_data); bnet_conn_send(conn, "/w %s %s\n", who, what); return 1; } Index: buddy.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/buddy.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** buddy.c 8 Jan 2005 10:34:46 -0000 1.3 --- buddy.c 8 Jan 2005 11:13:03 -0000 1.4 *************** *** 121,124 **** --- 121,132 ---- void + bnet_buddy_add(GaimConnection *gc, GaimBuddy *buddy, GaimGroup *group) { + BNetConn *conn = BNET_CONN(gc->proto_data); + BNetBuddy *b = bnet_buddy_new(buddy->name); + + g_hash_table_insert(conn->buddies, b->name, b); + } + + void bnet_buddy_add_default(BNetConn *conn, const gchar *name) { GaimBuddy *buddy; *************** *** 141,144 **** --- 149,159 ---- } + void + bnet_buddy_remove(GaimConnection *gc, GaimBuddy *buddy, GaimGroup *group) { + BNetConn *conn = BNET_CONN(gc->proto_data); + + g_hash_table_remove(conn->buddies, buddy->name); + } + /****************************************************************************** * Buddies API |
From: Gary K. <amc...@us...> - 2005-01-08 10:55:46
|
Update of /cvsroot/gaim-bnet/gaim-bnet In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19178 Modified Files: Makefile.am configure.ac Log Message: add the commands reference.. I might be getting around to implementing them tonight.. Index: configure.ac =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/configure.ac,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** configure.ac 8 Jan 2005 06:00:04 -0000 1.3 --- configure.ac 8 Jan 2005 10:55:35 -0000 1.4 *************** *** 126,129 **** --- 126,130 ---- AC_OUTPUT([Makefile VERSION + doc/Makefile intl/Makefile pixmaps/Makefile Index: Makefile.am =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile.am 8 Jan 2005 06:00:04 -0000 1.2 --- Makefile.am 8 Jan 2005 10:55:35 -0000 1.3 *************** *** 9,13 **** po/ChangeLog ! SUBDIRS = intl po src BUILT_SOURCES = bnet_config.h --- 9,13 ---- po/ChangeLog ! SUBDIRS = doc intl po src BUILT_SOURCES = bnet_config.h |
From: Gary K. <amc...@us...> - 2005-01-08 10:55:45
|
Update of /cvsroot/gaim-bnet/gaim-bnet/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19178/doc Added Files: .cvsignore Makefile.am commands Log Message: add the commands reference.. I might be getting around to implementing them tonight.. --- NEW FILE: .cvsignore --- Makefile Makefile.in --- NEW FILE: commands --- Chat Protection /Options (alias: /o) ==================================== There are three separate flags, which a user can set to customize which incoming chat messages are ignored. Whispers - when on, private messages from people who are not in your friends list will be ignored. /options ignorewhispers (alias: /o igw) This command will ignore whispers from anyone who isn't in your friends list /options unignorewhispers (alias: /o unigw) This command will allow whispers from anyone who isn't in your friends list Public - when on, messages in public channels from people who are not in your friends list will be ignored. /options ignorepublic (alias: /o igpub) - ignore messages in public chat channels from anyone who isn't in your friends list /options unignorepublic (alias: /o unigpub) - allow messages in public chat channels from anyone who isn't in you friends list Private - when on, messages in private channels from people who are not in your friends list will be ignored. /options ignoreprivate (alias: /o igpriv) - ignore messages in private chat channels from anyone who isn't in your friends list /options unignoreprivate (alias: /o unigpriv) - allow messages in private chat channels from anyone who isn't in you friends list This allows users who are interested in playing games instead of reading spam to cut it off permanently as well as providing protection for people who are being harassed by other users. Friends commands ================ /friends (alias /f) The base command for all friends operations, on its own it prints out help about the friends commands. Alias /f /friends list (alias: /friends l or /f l) Displays you current friends list and has a summary of what each friend is doing at the moment on Battle.net. /friends add [accountname] (alias: /friends a) Adds the specified account name to your friends list. You will receive an error if the account name is an invalid account (contains naughty words etc) or if you have too many friends in your list. /friends remove [accountname] (alias: /friends r) Removes the specified account name from your friends list. You will receive an error message if the account isn't in the list. /friends msg [message] (alias: /friends m) Sends a message to all of your friends. /friends promote [accountname] <position> (alias: /friends p) Promotes the account name in your friends list. If no position is supplied (or is zero) then the friend will be promoted up one place in the list. If the position is supplied then the friend will be moved to that position from the top of the list with number 1 being the highest position. /friends demote [accountname] <position> (alias: /friends d) Demotes the account name in your friends list. If no position is supplied (or is zero) then the friend will be demoted one place in the list. If the position is supplied then the friend will be moved to that position from the bottom of the list with number 1 being the lowest position. Universal Chat Commands ======================= The following commands can be used in any chat channel. For StarCraft, Warcraft II BNE, and Warcraft III players, they can also be used during game setup or while a game is in progress. /help - (Ex: /help whisper) Displays usage help for chat topics. /whois [user] - (Ex: /whois TPark) Looks up some basic information on a user, including their account number and their current location. This is an excellent way to find your friends online. typing /whois #[number] (E.G. /whois #1). Aliases for this command : /where /whereis /whoami - (Ex: /whoami) - displays your information on Battle.net. /w [user] - (Ex: /w JohnS) Sends a private message to a user online regardless of the channel they are in. This is an excellent way to let a friend know you are online. Aliases for this command: /msg /whisper /ignore [user] - (Ex: /ignore BFitch) Ignores any future messages from that user effectively muting that user to you. Aliases for this command: /squelch /unignore [user] - (Ex: /unignore BFitch) Allows a previously squelched user to talk to you normally. Aliases for this command: /unsquelch /away [text] - (Ex: /away eating dinner) Displays a message that you are away from your keyboard whenever someone whispers to you or does a /whois command on you. To disable this command, use the command again. /dnd [text] - (Ex: /dnd sorry playing a game with GFraizer) "Do Not Disturb" - prevents ALL whispers from displaying to your screen. Its use is similar to the /away command. To turn the DND mode off, just type /dnd without a reason. This will prevent people from sending whispers to you while in a game as well. You are still able to see all normal public channel messages. /who [channel] - (Ex: /who Open Tech Support) Displays a list of all users in the given channel. /stats [user] ID - (Ex: /stats DavidN STAR) Displays the player's Win/Loss/Disconnect record for both normal and Ladder games. STAR - StarCraft SEXP - StarCraft Expansion (Brood War) W2BNE - Warcraft II Battle.net Edition /users Displays the number of users currently on Battle.net. /time Displays the current Battle.net time. Note: If you are trying to whisper to someone that has the @ symbol in their name such as work@home you need to add @ to the end of the name for the message to get to the correct person. Example: /w work@home@USWest Hello work Chat Room Commands ================== The following commands can only be used while in a chat room. /join [channel name] - (Ex: /join Blizzard Tech Support) Switches to a channel without having to use the channel join screen. Aliases for this command: /channel /me [text] - (Ex: /me is rolling on the floor laughing!) Displays emotion text, as in "PatN is rolling on the floor laughing!" Chat Room Operator Commands =========================== The following commands can only be used by channel operators (the person with the gavel). /designate [user] - (Ex: /designate AlenL) Selects [user] as the next channel operator when you step down, either by resigning or by leaving the channel. If the channel Operator leaves the channel and has designated more than one person, the last person designated will have ops. /resign Step down as channel operator and become a normal user again. /rejoin - (Ex: /rejoin) makes you rejoin the channel you are currently in. /kick [user] - (Ex: /kick TwainM) Kicks a user out of the channel. This is best used as a warning since a kicked user can return at their leisure. /ban [user] - (Ex: /ban RobertB) Kicks a user out of the channel and prevents them from returning until the current operator steps down or leaves the channel. This is the most powerful command at an operator's disposal, use it wisely. /unban [users] - (Ex: /unban RobertB) Allows a banned user to return to the channel. --- NEW FILE: Makefile.am --- EXTRA_DIST = \ commands |