comparison src/server.c @ 518:091d081a269d

[gaim-migrate @ 528] bleh. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Fri, 21 Jul 2000 19:40:35 +0000
parents ee4e18868584
children d9e638d13e5a
comparison
equal deleted inserted replaced
517:dd4d415dbe52 518:091d081a269d
156 156
157 157
158 void serv_send_im(char *name, char *message, int away) 158 void serv_send_im(char *name, char *message, int away)
159 { 159 {
160 struct conversation *cnv = find_conversation(name); 160 struct conversation *cnv = find_conversation(name);
161 if (!cnv || !cnv->is_direct) { 161 if (cnv && cnv->is_direct) {
162 if (!USE_OSCAR) {
163 /* FIXME */
164 } else {
165 sprintf(debug_buff, "Sending DirectIM to %s\n", name);
166 debug_print(debug_buff);
167 aim_send_im_direct(gaim_sess, cnv->conn, message);
168 }
169 } else {
162 if (!USE_OSCAR) { 170 if (!USE_OSCAR) {
163 char buf[MSG_LEN - 7]; 171 char buf[MSG_LEN - 7];
164 172
165 g_snprintf(buf, MSG_LEN - 8, "toc_send_im %s \"%s\"%s", normalize(name), 173 g_snprintf(buf, MSG_LEN - 8, "toc_send_im %s \"%s\"%s", normalize(name),
166 message, ((away) ? " auto" : "")); 174 message, ((away) ? " auto" : ""));
168 } else { 176 } else {
169 if (away) 177 if (away)
170 aim_send_im(gaim_sess, gaim_conn, name, AIM_IMFLAGS_AWAY, message); 178 aim_send_im(gaim_sess, gaim_conn, name, AIM_IMFLAGS_AWAY, message);
171 else 179 else
172 aim_send_im(gaim_sess, gaim_conn, name, AIM_IMFLAGS_ACK, message); 180 aim_send_im(gaim_sess, gaim_conn, name, AIM_IMFLAGS_ACK, message);
173 }
174 } else {
175 if (!USE_OSCAR) {
176 /* FIXME */
177 } else {
178 sprintf(debug_buff, "Sending DirectIM to %s\n", name);
179 debug_print(debug_buff);
180 aim_send_im_direct(gaim_sess, cnv->conn, message);
181 } 181 }
182 } 182 }
183 if (!away) 183 if (!away)
184 serv_touch_idle(); 184 serv_touch_idle();
185 } 185 }