Opened 9 years ago

#11205 new defect

IRC: /names command doesn't work for non-joined channels

Reported by: cloph Owned by: elb
Milestone: Component: IRC
Version: 2.6.5 Keywords:
Cc:

Description

It is impossible to use the /names command for channels that aren't currently joined.

To reproduce: use "/names #channelname" on IRC

expected result: The list of users currently in that channel is given

Actual result: Works when one already joined the channel (but why would you use the command then, you got the list of users right in front of you already) Doesn't work when not joined. If not joined, all the debug window shows is:

irc: Got a NAMES list for #channelname, which doesn't exist

getting the banlist for a non-joined channel is possible however (prints the banlist into the debug window)

libpurple/protocols/irc/msgs.c,

void irc_msg_names(struct irc_conn *irc, const char *name, const char *from, char args)
{

char *names, *cur, *end, *tmp, *msg;
PurpleConversation? *convo;

if (!strcmp(name, "366")) {

convo = purple_find_conversation_with_account(PURPLE_CONV_TYPE_ANY, args[1], irc->account);
if (!convo) {

purple_debug(PURPLE_DEBUG_ERROR, "irc", "Got a NAMES list for %s, which doesn't exist\n", args[1]);
g_string_free(irc->names, TRUE);
irc->names = NULL;
return;

}

[...]

I cannot think of a rationale of just dropping the namelist, but printing the banlist. I mean output goes to the debug-window anyway, so why not display the namelist instead of "I received the name list you requested, but I won't show it to you"? Just do it with the banlist: if there is a conversation window, use that to print the result, if there is none, print the result to the debug window.

Change History (0)

Note: See TracTickets for help on using tickets.
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!