Mercurial > pidgin
diff src/protocols/zephyr/zephyr.c @ 7261:1930e3d00ecd
[gaim-migrate @ 7838]
prpl-specific normalize is back, after my crusade to kill it.
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Tue, 14 Oct 2003 05:07:39 +0000 |
parents | eda3de6dacbb |
children | 85fcaff1505d |
line wrap: on
line diff
--- a/src/protocols/zephyr/zephyr.c Tue Oct 14 04:44:43 2003 +0000 +++ b/src/protocols/zephyr/zephyr.c Tue Oct 14 05:07:39 2003 +0000 @@ -71,7 +71,7 @@ return;\ } -static char *zephyr_normalize(const char *); +static const char *zephyr_normalize(const GaimAccount *, const char *); /* this is so bad, and if Zephyr weren't so fucked up to begin with I * wouldn't do this. but it is so i will. */ @@ -307,7 +307,7 @@ { GList *curr; for (curr = pending_zloc_names; curr != NULL; curr = curr->next) { - if (!g_ascii_strcasecmp(zephyr_normalize(who), (char*)curr->data)) { + if (!g_ascii_strcasecmp(zephyr_normalize(NULL, who), (char*)curr->data)) { g_free((char*)curr->data); pending_zloc_names = g_list_remove(pending_zloc_names, curr->data); return TRUE; @@ -465,8 +465,8 @@ if(!GAIM_BLIST_NODE_IS_BUDDY(bnode)) continue; if(b->account->gc == zgc) { - char *chk; - chk = zephyr_normalize(b->name); + const char *chk; + chk = zephyr_normalize(b->account, b->name); /* doesn't matter if this fails or not; we'll just move on to the next one */ ZRequestLocations(chk, &ald, UNACKED, ZAUTH); free(ald.user); @@ -783,9 +783,9 @@ notice.z_class = zt->class; notice.z_class_inst = zt->instance; if (!g_ascii_strcasecmp(zt->recipient, "*")) - notice.z_recipient = zephyr_normalize(""); + notice.z_recipient = zephyr_normalize(NULL, ""); else - notice.z_recipient = zephyr_normalize(zt->recipient); + notice.z_recipient = zephyr_normalize(NULL, zt->recipient); notice.z_sender = 0; notice.z_default_format = "Class $class, Instance $instance:\n" @@ -832,7 +832,7 @@ return 1; } -static char *zephyr_normalize(const char *orig) +static const char *zephyr_normalize(const GaimAccount *account, const char *orig) { static char buf[80]; if (!g_ascii_strcasecmp(orig, "")) { @@ -850,13 +850,13 @@ static void zephyr_zloc(GaimConnection *gc, const char *who) { ZAsyncLocateData_t ald; - - if (ZRequestLocations(zephyr_normalize(who), &ald, UNACKED, ZAUTH) + + if (ZRequestLocations(zephyr_normalize(gc->account, who), &ald, UNACKED, ZAUTH) != ZERR_NONE) { return; } pending_zloc_names = g_list_append(pending_zloc_names, - g_strdup(zephyr_normalize(who))); + g_strdup(zephyr_normalize(gc->account, who))); } static GList *zephyr_buddy_menu(GaimConnection *gc, const char *who)