gaim/gaim

part of sf patch #1121104, Yahoo privacy fixes
oldstatus
2005-04-24, Mark Doliner
12a937d9f5a3
Parents d6e675ec3a0f
Children c1b54eb630ac
part of sf patch #1121104, Yahoo privacy fixes

This is mostly (all?) just some cleanup
--- a/src/protocols/yahoo/yahoo.c Sun Apr 24 17:47:58 2005 -0400
+++ b/src/protocols/yahoo/yahoo.c Sun Apr 24 17:56:51 2005 -0400
@@ -70,7 +70,7 @@
gaim_privacy_permit_remove(gc->account,who,TRUE);
}
-gboolean yahoo_check_privacy(GaimConnection *gc, const char *who)
+gboolean yahoo_privacy_check(GaimConnection *gc, const char *who)
{
/* returns TRUE if allowed through, FALSE otherwise */
GSList *list;
@@ -845,7 +845,7 @@
return;
if (!g_ascii_strncasecmp(msg, "TYPING", strlen("TYPING"))
- && (yahoo_check_privacy(gc, from))) {
+ && (yahoo_privacy_check(gc, from))) {
if (*stat == '1')
serv_got_typing(gc, from, 0, GAIM_TYPING);
else
@@ -927,7 +927,7 @@
continue;
}
- if (!yahoo_check_privacy(gc, im->from)) {
+ if (!yahoo_privacy_check(gc, im->from)) {
gaim_debug_info("yahoo", "Message from %s dropped.\n", im->from);
continue;
}
@@ -2119,7 +2119,10 @@
gaim_debug_misc("yahoo", "Warning, nonutf8 audible, ignoring!\n");
return;
}
-
+ if (!yahoo_privacy_check(gc, who)) {
+ gaim_debug_misc("yahoo", "Audible message from %s for %s dropped!\n", gc->account->username, who);
+ return;
+ }
serv_got_im(gc, who, msg, 0, time(NULL));
}
--- a/src/protocols/yahoo/yahoo.h Sun Apr 24 17:47:58 2005 -0400
+++ b/src/protocols/yahoo/yahoo.h Sun Apr 24 17:56:51 2005 -0400
@@ -272,9 +272,8 @@
*
* @param gc The gc handle.
* @param who The sender of the packet to check
- * @param need_reply TRUE if a reply may be required, otherwise FALSE
*/
-gboolean yahoo_check_privacy
+gboolean yahoo_privacy_check
(GaimConnection *gc, const char *who);
#endif /* _YAHOO_H_ */
--- a/src/protocols/yahoo/yahoochat.c Sun Apr 24 17:47:58 2005 -0400
+++ b/src/protocols/yahoo/yahoochat.c Sun Apr 24 17:56:51 2005 -0400
@@ -158,7 +158,7 @@
if (members) {
g_hash_table_replace(components, g_strdup("members"), g_strdup(members->str));
}
- if (!yahoo_check_privacy(gc, who)) {
+ if (!yahoo_privacy_check(gc, who)) {
gaim_debug_info("yahoo",
"Invite to conference %s from %s has been dropped.\n", room, who);
return;
@@ -586,7 +586,7 @@
components = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
g_hash_table_replace(components, g_strdup("room"), g_strdup(room));
- if (!yahoo_check_privacy(gc, who)) {
+ if (!yahoo_privacy_check(gc, who)) {
gaim_debug_info("yahoo",
"Invite to room %s from %s has been dropped.\n", room, who);
return;