[Pidgin] #11205: IRC: /names command doesn't work for non-joined channels

Pidgin trac at pidgin.im
Sun Jan 17 08:25:07 EST 2010


#11205: IRC: /names command doesn't work for non-joined channels
--------------------+-------------------------------------------------------
 Reporter:  cloph   |     Owner:  elb  
     Type:  defect  |    Status:  new  
Component:  IRC     |   Version:  2.6.5
 Keywords:          |  
--------------------+-------------------------------------------------------
 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, [[BR]]

 void irc_msg_names(struct irc_conn *irc, const char *name, const char
 *from, char **args)[[BR]]
 {[[BR]]
         char *names, *cur, *end, *tmp, *msg;[[BR]]
         PurpleConversation *convo;[[BR]]

         if (!strcmp(name, "366")) {[[BR]]
                 convo =
 purple_find_conversation_with_account(PURPLE_CONV_TYPE_ANY, args[1],
 irc->account);[[BR]]
                 if (!convo) {[[BR]]
                         purple_debug(PURPLE_DEBUG_ERROR, "irc", "Got a
 NAMES list for %s, which doesn't exist\n", args[1]);[[BR]]
                         g_string_free(irc->names, TRUE);[[BR]]
                         irc->names = NULL;[[BR]]
                         return;[[BR]]
                 }[[BR]]
 [...][[BR]]

 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.

-- 
Ticket URL: <http://developer.pidgin.im/ticket/11205>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list