aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-05-09 01:40:54 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2010-05-09 01:40:54 +0100
commit75610c3b53a68451d9eaf40fdc8a5e6419a13339 (patch)
tree24e6cca10f3750bbc040383a99d0d23e2b9812a7
parent36577aa5efb2ef3daafd17f9ad179fedef28278e (diff)
Fixed up OSCAR to work with the new way of setting up groupchats.
-rw-r--r--protocols/oscar/oscar.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/protocols/oscar/oscar.c b/protocols/oscar/oscar.c
index a5ca1ac8..de594eee 100644
--- a/protocols/oscar/oscar.c
+++ b/protocols/oscar/oscar.c
@@ -798,7 +798,9 @@ static int conninitdone_chat(aim_session_t *sess, aim_frame_t *fr, ...) {
chatcon = find_oscar_chat_by_conn(ic, fr->conn);
chatcon->id = id;
- chatcon->cnv = imcb_chat_new(ic, chatcon->show);
+ chatcon->cnv = bee_chat_by_title(ic->bee, ic, chatcon->show);
+ if (chatcon->cnv == NULL)
+ chatcon->cnv = imcb_chat_new(ic, chatcon->show);
chatcon->cnv->data = chatcon;
return 1;
@@ -2650,9 +2652,13 @@ struct groupchat *oscar_chat_with(struct im_connection * ic, char *who)
struct groupchat *ret;
static int chat_id = 0;
char * chatname;
+ struct groupchat *c;
- chatname = g_strdup_printf("%s%d", ic->acc->user, chat_id++);
-
+ chatname = g_strdup_printf("%s%s_%d", isdigit(*ic->acc->user) ? "icq_" : "",
+ ic->acc->user, chat_id++);
+
+ c = imcb_chat_new(ic, chatname);
+
ret = oscar_chat_join(ic, chatname, NULL, NULL);
aim_chat_invite(od->sess, od->conn, who, "", 4, chatname, 0x0);