comparison src/server.c @ 243:3414ff74cb0f

[gaim-migrate @ 253] Sat May 20 09:56:16 UTC 2000 EWarmenhoven - That 2 second delay in updates is gone, and I think it's actually faster than the TOC code now. - I figured out why it was segfaulting. I'm stupid sometimes. - I figured out why the idle times were appearing bizarrely. Once again, I'm stupid sometimes. - You can now be idle - You can now get a user's info (sort of - use the debug window) (still no away messages though....) - You can now be away - You can now set your info (but not your dir info - yet) - I think it's almost at a point where it's ready for use. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Sat, 20 May 2000 10:03:16 +0000
parents 14fc16f579c8
children f6e8ea29b24f
comparison
equal deleted inserted replaced
242:14fc16f579c8 243:3414ff74cb0f
169 { 169 {
170 char buf[MSG_LEN]; 170 char buf[MSG_LEN];
171 #ifndef USE_OSCAR 171 #ifndef USE_OSCAR
172 g_snprintf(buf, MSG_LEN, "toc_get_info %s", normalize(name)); 172 g_snprintf(buf, MSG_LEN, "toc_get_info %s", normalize(name));
173 sflap_send(buf, -1, TYPE_DATA); 173 sflap_send(buf, -1, TYPE_DATA);
174 #else
175 aim_getinfo(gaim_sess, gaim_conn, name);
174 #endif 176 #endif
175 } 177 }
176 178
177 void serv_get_dir(char *name) 179 void serv_get_dir(char *name)
178 { 180 {
204 #ifndef USE_OSCAR 206 #ifndef USE_OSCAR
205 g_snprintf(buf, sizeof(buf)/2, "toc_dir_search %s:%s:%s:%s:%s:%s:%s:%s", first, middle, last, maiden, city, state, country, email); 207 g_snprintf(buf, sizeof(buf)/2, "toc_dir_search %s:%s:%s:%s:%s:%s:%s:%s", first, middle, last, maiden, city, state, country, email);
206 sprintf(debug_buff,"Searching for: %s,%s,%s,%s,%s,%s,%s\n", first, middle, last, maiden, city, state, country); 208 sprintf(debug_buff,"Searching for: %s,%s,%s,%s,%s,%s,%s\n", first, middle, last, maiden, city, state, country);
207 debug_print(debug_buff); 209 debug_print(debug_buff);
208 sflap_send(buf, -1, TYPE_DATA); 210 sflap_send(buf, -1, TYPE_DATA);
211 #else
212 if (strlen(email))
213 aim_usersearch_address(gaim_sess, gaim_conn, email);
209 #endif 214 #endif
210 } 215 }
211 216
212 217
213 void serv_set_away(char *message) 218 void serv_set_away(char *message)
217 if (message) 222 if (message)
218 g_snprintf(buf, MSG_LEN, "toc_set_away \"%s\"", message); 223 g_snprintf(buf, MSG_LEN, "toc_set_away \"%s\"", message);
219 else 224 else
220 g_snprintf(buf, MSG_LEN, "toc_set_away \"\""); 225 g_snprintf(buf, MSG_LEN, "toc_set_away \"\"");
221 sflap_send(buf, -1, TYPE_DATA); 226 sflap_send(buf, -1, TYPE_DATA);
227 #else
228 aim_bos_setprofile(gaim_sess, gaim_conn, current_user->user_info,
229 message, AIM_CAPS_CHAT);
222 #endif 230 #endif
223 } 231 }
224 232
225 void serv_set_info(char *info) 233 void serv_set_info(char *info)
226 { 234 {
227 char buf[MSG_LEN]; 235 char buf[MSG_LEN];
228 #ifndef USE_OSCAR 236 #ifndef USE_OSCAR
229 g_snprintf(buf, sizeof(buf), "toc_set_info \"%s\n\"", info); 237 g_snprintf(buf, sizeof(buf), "toc_set_info \"%s\n\"", info);
230 sflap_send(buf, -1, TYPE_DATA); 238 sflap_send(buf, -1, TYPE_DATA);
239 #else
240 if (awaymessage)
241 aim_bos_setprofile(gaim_sess, gaim_conn, info,
242 awaymessage->message, AIM_CAPS_CHAT);
243 else
244 aim_bos_setprofile(gaim_sess, gaim_conn, info,
245 NULL, AIM_CAPS_CHAT);
231 #endif 246 #endif
232 } 247 }
233 248
234 void serv_change_passwd(char *orig, char *new) { 249 void serv_change_passwd(char *orig, char *new) {
235 #ifndef USE_OSCAR 250 #ifndef USE_OSCAR
353 { 368 {
354 char buf[256]; 369 char buf[256];
355 #ifndef USE_OSCAR 370 #ifndef USE_OSCAR
356 g_snprintf(buf, sizeof(buf), "toc_set_idle %d", time); 371 g_snprintf(buf, sizeof(buf), "toc_set_idle %d", time);
357 sflap_send(buf, -1, TYPE_DATA); 372 sflap_send(buf, -1, TYPE_DATA);
373 #else
374 aim_bos_setidle(gaim_sess, gaim_conn, time);
358 #endif 375 #endif
359 } 376 }
360 377
361 378
362 void serv_warn(char *name, int anon) 379 void serv_warn(char *name, int anon)