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.
This commit is contained in:
Florian Obser 2014-03-09 23:42:06 +01:00
parent c4a43f1f8f
commit c102bbf4a0
2 changed files with 7 additions and 1 deletions

6
cmd.c
View File

@ -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)

2
icb.c
View File

@ -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++;
}