Changeset 166a571 for protocols/twitter
- Timestamp:
- 2016-04-01T18:06:15Z (9 years ago)
- Branches:
- master
- Children:
- 991c75f
- Parents:
- 0d581bd
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/twitter/twitter_lib.c
r0d581bd r166a571 954 954 955 955 /* Check this is not a tweet that should be muted */ 956 uid_str = g_strdup_printf("%" G_GINT64_FORMAT, status->user->uid); 956 uid_str = g_strdup_printf("%" PRIu64, status->user->uid); 957 if (getenv("BITLBEE_DEBUG")) { 958 GSList *item; 959 fprintf(stderr, "Checking mutes; this uid=%s\n", uid_str); 960 for (item = td->mutes_ids; item != NULL; item = item->next) { 961 fprintf(stderr, " id: %s\n", (char *)item->data); 962 } 963 } 957 964 if (g_slist_find_custom(td->mutes_ids, uid_str, (GCompareFunc)strcmp)) { 958 965 g_free(uid_str); … … 1137 1144 } 1138 1145 } else if (strcmp(type, "mute") == 0) { 1139 GSList *ids = td->mutes_ids; 1146 GSList *found; 1147 char *uid_str; 1140 1148 ut = twitter_xt_get_user(target); 1141 ids = g_slist_prepend(ids, 1142 g_strdup_printf("%" G_GINT64_FORMAT, ut->uid)); 1143 1144 td->mutes_ids = ids; 1149 uid_str = g_strdup_printf("%" PRIu64, ut->uid); 1150 if (!(found = g_slist_find_custom(td->mutes_ids, uid_str, 1151 (GCompareFunc)strcmp))) { 1152 td->mutes_ids = g_slist_prepend(td->mutes_ids, uid_str); 1153 } 1154 twitter_log(ic, "Muted user %s", ut->screen_name); 1155 if (getenv("BITLBEE_DEBUG")) { 1156 fprintf(stderr, "New mute: %s %"PRIu64"\n", 1157 ut->screen_name, ut->uid); 1158 } 1145 1159 } else if (strcmp(type, "unmute") == 0) { 1146 1160 GSList *found; 1147 1161 char *uid_str; 1148 1162 ut = twitter_xt_get_user(target); 1149 uid_str = g_strdup_printf("%" G_GINT64_FORMAT, ut->uid);1163 uid_str = g_strdup_printf("%" PRIu64, ut->uid); 1150 1164 if ((found = g_slist_find_custom(td->mutes_ids, uid_str, 1151 1165 (GCompareFunc)strcmp))) { … … 1153 1167 } 1154 1168 g_free(uid_str); 1169 twitter_log(ic, "Unmuted user %s", ut->screen_name); 1170 if (getenv("BITLBEE_DEBUG")) { 1171 fprintf(stderr, "New unmute: %s %"PRIu64"\n", 1172 ut->screen_name, ut->uid); 1173 } 1155 1174 } 1156 1175
Note: See TracChangeset
for help on using the changeset viewer.