From c102bbf4a018817ab65f356aa8d7724ec52f4fe7 Mon Sep 17 00:00:00 2001 From: Florian Obser Date: Sun, 9 Mar 2014 23:42:06 +0100 Subject: [PATCH] Make pidgin-icb /who and /msg work for real. pidgin-icb seems to treat "." as the current group, so return the who output for the group the icb session is connected to. Turns out the previous commit doesn't fix anything - the tests were wrong, so revert that. --- cmd.c | 6 ++++++ icb.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/cmd.c b/cmd.c index cf8731c..66d2b4e 100644 --- a/cmd.c +++ b/cmd.c @@ -375,6 +375,12 @@ icb_cmd_who(struct icb_session *is, char *arg) if (strlen(arg) == 0) return icb_who(is, NULL); + /* pidgin-icb treats '.' as the current group */ + if (strlen(arg) == 1 && arg[0] == '.') { + icb_who(is, is->group); + return; + } + icb_vis(group, arg, ICB_MAXGRPLEN, VIS_SP); LIST_FOREACH(ig, &groups, entry) { if (strcmp(ig->name, group) == 0) diff --git a/icb.c b/icb.c index 1e9fc09..c2489fd 100644 --- a/icb.c +++ b/icb.c @@ -495,7 +495,7 @@ icb_dowho(struct icb_session *is, struct icb_group *ig) icb_ismod(ig, s) ? 'm' : ' ', ICB_M_SEP, s->nick, ICB_M_SEP, getmonotime() - s->last, ICB_M_SEP, ICB_M_SEP, s->login, ICB_M_SEP, - s->client, ICB_M_SEP, s->host, ICB_M_SEP, "(nr)"); + s->client, ICB_M_SEP, s->host, ICB_M_SEP, " "); icb_cmdout(is, CMDOUT_WL, buf); nusers++; }