Mercurial > pidgin.yaz
comparison plugins/crazychat/cc_network.c @ 11338:17142948653e
[gaim-migrate @ 13551]
Change the GAIM_CONV_IM and GAIM_CONV_CHAT enums to GAIM_CONV_TYPE_IM
and GAIM_CONV_TYPE_CHAT. This touched A LOT of files. Also combined
two oscar header files (one of them was small and dorky).
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 25 Aug 2005 02:33:44 +0000 |
parents | 80ee726755d4 |
children |
comparison
equal
deleted
inserted
replaced
11337:1462b64f8fc9 | 11338:17142948653e |
---|---|
102 | 102 |
103 session = cc_find_session(cc, name); | 103 session = cc_find_session(cc, name); |
104 if (session) return; /* already have a session with this guy */ | 104 if (session) return; /* already have a session with this guy */ |
105 session = cc_add_session(cc, name); | 105 session = cc_add_session(cc, name); |
106 session->state = INVITE; | 106 session->state = INVITE; |
107 conv = gaim_find_conversation_with_account(GAIM_CONV_ANY, name, account); | 107 conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_ANY, name, account); |
108 if (!conv) { | 108 if (!conv) { |
109 conv = gaim_conversation_new(GAIM_CONV_IM, account, name); | 109 conv = gaim_conversation_new(GAIM_CONV_TYPE_IM, account, name); |
110 } | 110 } |
111 im = gaim_conversation_get_im_data(conv); | 111 im = gaim_conversation_get_im_data(conv); |
112 snprintf(buf, BUFSIZ, "%s%s!%d", CRAZYCHAT_INVITE_CODE, | 112 snprintf(buf, BUFSIZ, "%s%s!%d", CRAZYCHAT_INVITE_CODE, |
113 gaim_network_get_my_ip(-1), cc->tcp_port); | 113 gaim_network_get_my_ip(-1), cc->tcp_port); |
114 Debug("Sent invite to %s for port: %d\n", name, cc->tcp_port); | 114 Debug("Sent invite to %s for port: %d\n", name, cc->tcp_port); |
129 Debug("Received a CrazyChat session invite from %s on port %s!\n", | 129 Debug("Received a CrazyChat session invite from %s on port %s!\n", |
130 name, peer_port); | 130 name, peer_port); |
131 session = cc_find_session(cc, name); | 131 session = cc_find_session(cc, name); |
132 if (!session) { | 132 if (!session) { |
133 Debug("Creating a CrazyChat session invite dialog box!\n"); | 133 Debug("Creating a CrazyChat session invite dialog box!\n"); |
134 conv = gaim_find_conversation_with_account(GAIM_CONV_ANY, name, account); | 134 conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_ANY, name, account); |
135 if (conv) convwin = gaim_conversation_get_window(conv); | 135 if (conv) convwin = gaim_conversation_get_window(conv); |
136 else convwin = NULL; | 136 else convwin = NULL; |
137 /* pop gtk window asking if want to accept */ | 137 /* pop gtk window asking if want to accept */ |
138 GtkWidget *dialog = | 138 GtkWidget *dialog = |
139 gtk_dialog_new_with_buttons("CrazyChat Session Invite", | 139 gtk_dialog_new_with_buttons("CrazyChat Session Invite", |
206 | 206 |
207 /* socket created, send the ready message */ | 207 /* socket created, send the ready message */ |
208 GaimConversation *conv; | 208 GaimConversation *conv; |
209 GaimConvIm *im; | 209 GaimConvIm *im; |
210 | 210 |
211 conv = gaim_find_conversation_with_account(GAIM_CONV_ANY, session->name, account); | 211 conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_ANY, session->name, account); |
212 if (!conv) { | 212 if (!conv) { |
213 conv = gaim_conversation_new(GAIM_CONV_IM, account, | 213 conv = gaim_conversation_new(GAIM_CONV_TYPE_IM, account, |
214 session->name); | 214 session->name); |
215 } | 215 } |
216 im = gaim_conversation_get_im_data(conv); | 216 im = gaim_conversation_get_im_data(conv); |
217 gaim_conv_im_send(im, CRAZYCHAT_READY_CODE); | 217 gaim_conv_im_send(im, CRAZYCHAT_READY_CODE); |
218 | 218 |
270 session->state = ACCEPTED; | 270 session->state = ACCEPTED; |
271 session->peer_ip = args->peer_ip; | 271 session->peer_ip = args->peer_ip; |
272 session->peer_port = args->peer_port; | 272 session->peer_port = args->peer_port; |
273 snprintf(buf, BUFSIZ, "%s%s", CRAZYCHAT_ACCEPT_CODE, | 273 snprintf(buf, BUFSIZ, "%s%s", CRAZYCHAT_ACCEPT_CODE, |
274 gaim_network_get_my_ip(-1)); | 274 gaim_network_get_my_ip(-1)); |
275 conv = gaim_find_conversation_with_account(GAIM_CONV_ANY, args->name, | 275 conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_ANY, args->name, |
276 args->account); | 276 args->account); |
277 if (!conv) { | 277 if (!conv) { |
278 conv = gaim_conversation_new(GAIM_CONV_IM, | 278 conv = gaim_conversation_new(GAIM_CONV_TYPE_IM, |
279 args->account, args->name); | 279 args->account, args->name); |
280 } | 280 } |
281 im = gaim_conversation_get_im_data(conv); | 281 im = gaim_conversation_get_im_data(conv); |
282 gaim_conv_im_send(im, buf); | 282 gaim_conv_im_send(im, buf); |
283 } | 283 } |