Mercurial > pidgin.yaz
changeset 694:150214f1d48b
[gaim-migrate @ 704]
bah. oscar sucks a fat one.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Wed, 16 Aug 2000 01:53:59 +0000 |
parents | 30a8e386849d |
children | d3db515e9a6e |
files | src/buddy_chat.c src/gaim.h src/oscar.c src/server.c |
diffstat | 4 files changed, 31 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/buddy_chat.c Wed Aug 16 01:10:22 2000 +0000 +++ b/src/buddy_chat.c Wed Aug 16 01:53:59 2000 +0000 @@ -60,6 +60,23 @@ } +struct conversation *find_chat(char *name) +{ + char cuser[64]; + struct conversation *c = NULL; + GList *cnv = buddy_chats; + + strcpy(cuser, normalize(name)); + + while (cnv) { + c = (struct conversation *)cnv->data; + if (!strcasecmp(cuser, normalize(c->name))) { + return c; + } + cnv = cnv->next; + } + return NULL; +} static void do_join_chat()
--- a/src/gaim.h Wed Aug 16 01:10:22 2000 +0000 +++ b/src/gaim.h Wed Aug 16 01:53:59 2000 +0000 @@ -397,7 +397,7 @@ #define TYPE_SIGNOFF 4 #define TYPE_KEEPALIVE 5 -#define REVISION "gaim:$Revision: 698 $" +#define REVISION "gaim:$Revision: 704 $" #define FLAPON "FLAPON\r\n\r\n" #define ROAST "Tic/Toc" @@ -538,6 +538,7 @@ /* Functions in buddy_chat.c */ extern void join_chat(); +extern struct conversation *find_chat(char *name); extern void chat_write(struct conversation *, char *, int, char *); extern void add_chat_buddy(struct conversation *, char *); extern void remove_chat_buddy(struct conversation *, char *);
--- a/src/oscar.c Wed Aug 16 01:10:22 2000 +0000 +++ b/src/oscar.c Wed Aug 16 01:53:59 2000 +0000 @@ -125,17 +125,21 @@ if (cnv) { make_direct(cnv, FALSE, NULL, 0); } + aim_conn_kill(gaim_sess, &conn); } else if (conn->type = AIM_CONN_TYPE_CHAT) { - /* FIXME! we got kicked out of chat */ - } - aim_conn_kill(gaim_sess, &conn); - if (!aim_getconn_type(gaim_sess, AIM_CONN_TYPE_BOS)) { + struct chat_connection *c = find_oscar_chat(conn->priv); + if (c) { + struct conversation *cnv = find_chat(c->name); + char closebuf[128]; + close_callback(NULL, cnv); + sprintf(closebuf, _("You have been disconnected from %s"), cnv->name); + do_error_dialog(closebuf, _("Disconnected")); + } + } else if (conn->type == AIM_CONN_TYPE_BOS) { debug_print(_("major connection error\n")); signoff(); hide_login_progress(_("Disconnected.")); - aim_logoff(gaim_sess); auth_failed(); - gdk_input_remove(inpa); } } }
--- a/src/server.c Wed Aug 16 01:10:22 2000 +0000 +++ b/src/server.c Wed Aug 16 01:53:59 2000 +0000 @@ -591,12 +591,12 @@ b->name, count); debug_print(debug_buff); - aim_chat_leaveroom(gaim_sess, b->name); +// aim_chat_leaveroom(gaim_sess, b->name); c = find_oscar_chat(b->name); if (c != NULL) { - aim_conn_kill(gaim_sess, &c->conn); oscar_chats = g_list_remove(oscar_chats, c); gdk_input_remove(c->inpa); + aim_conn_kill(gaim_sess, &c->conn); g_free(c->name); g_free(c); }