Mercurial > pidgin.yaz
comparison libgaim/protocols/oscar/oscar.c @ 15086:f3573d941d66
[gaim-migrate @ 17871]
Minor cleanup. Mostly make some functions void instead of int where the
return value was always 0 and wasn't used
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sat, 02 Dec 2006 08:03:45 +0000 |
parents | d24de6319f87 |
children | 96c145316f34 |
comparison
equal
deleted
inserted
replaced
15085:e0d70bba8290 | 15086:f3573d941d66 |
---|---|
998 static void | 998 static void |
999 flap_connection_established_bos(OscarData *od, FlapConnection *conn) | 999 flap_connection_established_bos(OscarData *od, FlapConnection *conn) |
1000 { | 1000 { |
1001 GaimConnection *gc = od->gc; | 1001 GaimConnection *gc = od->gc; |
1002 | 1002 |
1003 aim_reqpersonalinfo(od, conn); | 1003 aim_srv_reqpersonalinfo(od, conn); |
1004 | 1004 |
1005 gaim_debug_info("oscar", "ssi: requesting rights and list\n"); | 1005 gaim_debug_info("oscar", "ssi: requesting rights and list\n"); |
1006 aim_ssi_reqrights(od); | 1006 aim_ssi_reqrights(od); |
1007 aim_ssi_reqdata(od); | 1007 aim_ssi_reqdata(od); |
1008 if (od->getblisttimer > 0) | 1008 if (od->getblisttimer > 0) |
3200 od->icontimer = 0; | 3200 od->icontimer = 0; |
3201 | 3201 |
3202 conn = flap_connection_getbytype(od, SNAC_FAMILY_BART); | 3202 conn = flap_connection_getbytype(od, SNAC_FAMILY_BART); |
3203 if (!conn) { | 3203 if (!conn) { |
3204 if (!od->iconconnecting) { | 3204 if (!od->iconconnecting) { |
3205 aim_reqservice(od, SNAC_FAMILY_BART); | 3205 aim_srv_requestnew(od, SNAC_FAMILY_BART); |
3206 od->iconconnecting = TRUE; | 3206 od->iconconnecting = TRUE; |
3207 } | 3207 } |
3208 return FALSE; | 3208 return FALSE; |
3209 } | 3209 } |
3210 | 3210 |
3525 aim_icq_setsecurity(od, | 3525 aim_icq_setsecurity(od, |
3526 gaim_account_get_bool(account, "authorization", OSCAR_DEFAULT_AUTHORIZATION), | 3526 gaim_account_get_bool(account, "authorization", OSCAR_DEFAULT_AUTHORIZATION), |
3527 gaim_account_get_bool(account, "web_aware", OSCAR_DEFAULT_WEB_AWARE)); | 3527 gaim_account_get_bool(account, "web_aware", OSCAR_DEFAULT_WEB_AWARE)); |
3528 } | 3528 } |
3529 | 3529 |
3530 aim_reqservice(od, SNAC_FAMILY_CHATNAV); | 3530 aim_srv_requestnew(od, SNAC_FAMILY_CHATNAV); |
3531 | 3531 |
3532 /* | 3532 /* |
3533 * The "if" statement here is a pathetic attempt to not attempt to | 3533 * The "if" statement here is a pathetic attempt to not attempt to |
3534 * connect to the alerts servce (aka email notification) if this | 3534 * connect to the alerts servce (aka email notification) if this |
3535 * screen name does not support it. I think mail notification | 3535 * screen name does not support it. I think mail notification |
3537 * @anythingelse.com accounts. If that's true then this change | 3537 * @anythingelse.com accounts. If that's true then this change |
3538 * breaks mail notification for @mac.com accounts, but it gets rid | 3538 * breaks mail notification for @mac.com accounts, but it gets rid |
3539 * of an annoying error at signon for @anythingelse.com accounts. | 3539 * of an annoying error at signon for @anythingelse.com accounts. |
3540 */ | 3540 */ |
3541 if ((od->authinfo->email != NULL) && ((strchr(gc->account->username, '@') == NULL))) | 3541 if ((od->authinfo->email != NULL) && ((strchr(gc->account->username, '@') == NULL))) |
3542 aim_reqservice(od, SNAC_FAMILY_ALERT); | 3542 aim_srv_requestnew(od, SNAC_FAMILY_ALERT); |
3543 | 3543 |
3544 return 1; | 3544 return 1; |
3545 } | 3545 } |
3546 | 3546 |
3547 static int gaim_offlinemsg(OscarData *od, FlapConnection *conn, FlapFrame *fr, ...) { | 3547 static int gaim_offlinemsg(OscarData *od, FlapConnection *conn, FlapFrame *fr, ...) { |
4297 else if (!strcmp(status_id, OSCAR_STATUS_ID_INVISIBLE)) | 4297 else if (!strcmp(status_id, OSCAR_STATUS_ID_INVISIBLE)) |
4298 data |= AIM_ICQ_STATE_INVISIBLE; | 4298 data |= AIM_ICQ_STATE_INVISIBLE; |
4299 else if (!strcmp(status_id, OSCAR_STATUS_ID_CUSTOM)) | 4299 else if (!strcmp(status_id, OSCAR_STATUS_ID_CUSTOM)) |
4300 data |= AIM_ICQ_STATE_OUT | AIM_ICQ_STATE_AWAY; | 4300 data |= AIM_ICQ_STATE_OUT | AIM_ICQ_STATE_AWAY; |
4301 | 4301 |
4302 aim_setextstatus(od, data); | 4302 aim_srv_setextstatus(od, data); |
4303 } | 4303 } |
4304 | 4304 |
4305 static void | 4305 static void |
4306 oscar_set_info_and_status(GaimAccount *account, gboolean setinfo, const char *rawinfo, | 4306 oscar_set_info_and_status(GaimAccount *account, gboolean setinfo, const char *rawinfo, |
4307 gboolean setstatus, GaimStatus *status) | 4307 gboolean setstatus, GaimStatus *status) |
5172 struct create_room *cr = g_new0(struct create_room, 1); | 5172 struct create_room *cr = g_new0(struct create_room, 1); |
5173 gaim_debug_info("oscar", "chatnav does not exist, opening chatnav\n"); | 5173 gaim_debug_info("oscar", "chatnav does not exist, opening chatnav\n"); |
5174 cr->exchange = atoi(exchange); | 5174 cr->exchange = atoi(exchange); |
5175 cr->name = g_strdup(name); | 5175 cr->name = g_strdup(name); |
5176 od->create_rooms = g_slist_prepend(od->create_rooms, cr); | 5176 od->create_rooms = g_slist_prepend(od->create_rooms, cr); |
5177 aim_reqservice(od, SNAC_FAMILY_CHATNAV); | 5177 aim_srv_requestnew(od, SNAC_FAMILY_CHATNAV); |
5178 } | 5178 } |
5179 } | 5179 } |
5180 | 5180 |
5181 void | 5181 void |
5182 oscar_chat_invite(GaimConnection *gc, int id, const char *message, const char *name) | 5182 oscar_chat_invite(GaimConnection *gc, int id, const char *message, const char *name) |
5491 | 5491 |
5492 if (flags == 0x41) { | 5492 if (flags == 0x41) { |
5493 if (!flap_connection_getbytype(od, SNAC_FAMILY_BART) && !od->iconconnecting) { | 5493 if (!flap_connection_getbytype(od, SNAC_FAMILY_BART) && !od->iconconnecting) { |
5494 od->iconconnecting = TRUE; | 5494 od->iconconnecting = TRUE; |
5495 od->set_icon = TRUE; | 5495 od->set_icon = TRUE; |
5496 aim_reqservice(od, SNAC_FAMILY_BART); | 5496 aim_srv_requestnew(od, SNAC_FAMILY_BART); |
5497 } else { | 5497 } else { |
5498 struct stat st; | 5498 struct stat st; |
5499 char *iconfile = gaim_buddy_icons_get_full_path(gaim_account_get_buddy_icon(gaim_connection_get_account(gc))); | 5499 char *iconfile = gaim_buddy_icons_get_full_path(gaim_account_get_buddy_icon(gaim_connection_get_account(gc))); |
5500 if (iconfile == NULL) { | 5500 if (iconfile == NULL) { |
5501 aim_ssi_delicon(od); | 5501 aim_ssi_delicon(od); |
5933 OscarData *od = gc->proto_data; | 5933 OscarData *od = gc->proto_data; |
5934 if (!aim_sncmp(gaim_account_get_username(gaim_connection_get_account(gc)), nick)) { | 5934 if (!aim_sncmp(gaim_account_get_username(gaim_connection_get_account(gc)), nick)) { |
5935 if (!flap_connection_getbytype(od, SNAC_FAMILY_ADMIN)) { | 5935 if (!flap_connection_getbytype(od, SNAC_FAMILY_ADMIN)) { |
5936 od->setnick = TRUE; | 5936 od->setnick = TRUE; |
5937 od->newsn = g_strdup(nick); | 5937 od->newsn = g_strdup(nick); |
5938 aim_reqservice(od, SNAC_FAMILY_ADMIN); | 5938 aim_srv_requestnew(od, SNAC_FAMILY_ADMIN); |
5939 } else { | 5939 } else { |
5940 aim_admin_setnick(od, flap_connection_getbytype(od, SNAC_FAMILY_ADMIN), nick); | 5940 aim_admin_setnick(od, flap_connection_getbytype(od, SNAC_FAMILY_ADMIN), nick); |
5941 } | 5941 } |
5942 } else { | 5942 } else { |
5943 gaim_notify_error(gc, NULL, _("The new formatting is invalid."), | 5943 gaim_notify_error(gc, NULL, _("The new formatting is invalid."), |
5967 conn = flap_connection_getbytype(od, SNAC_FAMILY_ADMIN); | 5967 conn = flap_connection_getbytype(od, SNAC_FAMILY_ADMIN); |
5968 if (conn != NULL) { | 5968 if (conn != NULL) { |
5969 aim_admin_reqconfirm(od, conn); | 5969 aim_admin_reqconfirm(od, conn); |
5970 } else { | 5970 } else { |
5971 od->conf = TRUE; | 5971 od->conf = TRUE; |
5972 aim_reqservice(od, SNAC_FAMILY_ADMIN); | 5972 aim_srv_requestnew(od, SNAC_FAMILY_ADMIN); |
5973 } | 5973 } |
5974 } | 5974 } |
5975 | 5975 |
5976 static void oscar_show_email(GaimPluginAction *action) | 5976 static void oscar_show_email(GaimPluginAction *action) |
5977 { | 5977 { |
5981 | 5981 |
5982 if (conn) { | 5982 if (conn) { |
5983 aim_admin_getinfo(od, conn, 0x11); | 5983 aim_admin_getinfo(od, conn, 0x11); |
5984 } else { | 5984 } else { |
5985 od->reqemail = TRUE; | 5985 od->reqemail = TRUE; |
5986 aim_reqservice(od, SNAC_FAMILY_ADMIN); | 5986 aim_srv_requestnew(od, SNAC_FAMILY_ADMIN); |
5987 } | 5987 } |
5988 } | 5988 } |
5989 | 5989 |
5990 static void oscar_change_email(GaimConnection *gc, const char *email) | 5990 static void oscar_change_email(GaimConnection *gc, const char *email) |
5991 { | 5991 { |
5995 if (conn) { | 5995 if (conn) { |
5996 aim_admin_setemail(od, conn, email); | 5996 aim_admin_setemail(od, conn, email); |
5997 } else { | 5997 } else { |
5998 od->setemail = TRUE; | 5998 od->setemail = TRUE; |
5999 od->email = g_strdup(email); | 5999 od->email = g_strdup(email); |
6000 aim_reqservice(od, SNAC_FAMILY_ADMIN); | 6000 aim_srv_requestnew(od, SNAC_FAMILY_ADMIN); |
6001 } | 6001 } |
6002 } | 6002 } |
6003 | 6003 |
6004 static void oscar_show_change_email(GaimPluginAction *action) | 6004 static void oscar_show_change_email(GaimPluginAction *action) |
6005 { | 6005 { |
6326 aim_admin_changepasswd(od, conn, new, old); | 6326 aim_admin_changepasswd(od, conn, new, old); |
6327 } else { | 6327 } else { |
6328 od->chpass = TRUE; | 6328 od->chpass = TRUE; |
6329 od->oldp = g_strdup(old); | 6329 od->oldp = g_strdup(old); |
6330 od->newp = g_strdup(new); | 6330 od->newp = g_strdup(new); |
6331 aim_reqservice(od, SNAC_FAMILY_ADMIN); | 6331 aim_srv_requestnew(od, SNAC_FAMILY_ADMIN); |
6332 } | 6332 } |
6333 } | 6333 } |
6334 } | 6334 } |
6335 | 6335 |
6336 void | 6336 void |