diff options
Diffstat (limited to 'protocols/oscar/buddylist.c')
-rw-r--r-- | protocols/oscar/buddylist.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/protocols/oscar/buddylist.c b/protocols/oscar/buddylist.c index 3335c5ab..8fa7ac01 100644 --- a/protocols/oscar/buddylist.c +++ b/protocols/oscar/buddylist.c @@ -17,8 +17,9 @@ static int buddychange(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_extractuserinfo(sess, bs, &userinfo); - if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) + if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) { return userfunc(sess, rx, &userinfo); + } return 0; } @@ -30,16 +31,17 @@ static int rights(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_m guint16 maxbuddies = 0, maxwatchers = 0; int ret = 0; - /* - * TLVs follow + /* + * TLVs follow */ tlvlist = aim_readtlvchain(bs); /* * TLV type 0x0001: Maximum number of buddies. */ - if (aim_gettlv(tlvlist, 0x0001, 1)) + if (aim_gettlv(tlvlist, 0x0001, 1)) { maxbuddies = aim_gettlv16(tlvlist, 0x0001, 1); + } /* * TLV type 0x0002: Maximum number of watchers. @@ -47,10 +49,11 @@ static int rights(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_m * Watchers are other users who have you on their buddy * list. (This is called the "reverse list" by a certain * other IM protocol.) - * + * */ - if (aim_gettlv(tlvlist, 0x0002, 1)) + if (aim_gettlv(tlvlist, 0x0002, 1)) { maxwatchers = aim_gettlv16(tlvlist, 0x0002, 1); + } /* * TLV type 0x0003: Unknown. @@ -58,21 +61,23 @@ static int rights(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_m * ICQ only? */ - if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) + if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) { ret = userfunc(sess, rx, maxbuddies, maxwatchers); + } aim_freetlvchain(&tlvlist); - return ret; + return ret; } static int snachandler(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs) { - if (snac->subtype == 0x0003) + if (snac->subtype == 0x0003) { return rights(sess, mod, rx, snac, bs); - else if ((snac->subtype == 0x000b) || (snac->subtype == 0x000c)) + } else if ((snac->subtype == 0x000b) || (snac->subtype == 0x000c)) { return buddychange(sess, mod, rx, snac, bs); + } return 0; } |