[Pidgin] #4526: Jabber /join-command

Pidgin trac at pidgin.im
Sun Dec 30 17:40:39 EST 2007


#4526: Jabber /join-command
---------------------------+------------------------------------------------
  Reporter:  Solarius      |       Owner:  lschiere
      Type:  enhancement   |      Status:  new     
  Priority:  minor         |   Milestone:          
 Component:  unclassified  |     Version:  2.3.1   
Resolution:                |    Keywords:          
   Pending:  1             |  
---------------------------+------------------------------------------------
Changes (by Solarius):

  * pending:  1 => 0

Comment:

 OK, here it goes:

 {{{
 --- libpurple/protocols/jabber/jabber.c 2007-12-31 00:15:09.000000000
 +0200
 +++ /home/ville/sorsat/pidgin-2.3.1/libpurple/protocols/jabber/jabber.c
 2007-12-07 16:37:06.000000000 +0200
 @@ -2134,32 +2134,14 @@ static PurpleCmdRet jabber_cmd_chat_join
  {
         JabberChat *chat = jabber_chat_find_by_conv(conv);
         GHashTable *components;
 -       size_t str_find;
 -       int str_len;
 -       char roomname[255], servername[255];

         if(!chat || !args || !args[0])
                 return PURPLE_CMD_RET_FAILED;

         components = g_hash_table_new_full(g_str_hash, g_str_equal, NULL,
 NULL);

 -
 -       str_find = strcspn (args[0], "@");
 -       str_len = strlen (args[0]);
 -       memset (roomname, 0x00, 255);
 -       memset (servername, 0x00, 255);
 -
 -       if (str_find!=str_len && str_find < 255 && (str_len-str_find) <
 255) {
 -               strncpy (roomname,args[0], str_find);
 -               strncpy (servername,args[0]+(str_find+1), str_len-
 str_find);
 -
 -               g_hash_table_replace(components, "room", roomname);
 -               g_hash_table_replace(components, "server", servername);
 -       } else {
 -               g_hash_table_replace(components, "room", args[0]);
 -               g_hash_table_replace(components, "server", chat->server);
 -       }
 -
 +       g_hash_table_replace(components, "room", args[0]);
 +       g_hash_table_replace(components, "server", chat->server);
         g_hash_table_replace(components, "handle", chat->handle);
         if(args[1])
                 g_hash_table_replace(components, "password", args[1]);

 }}}

-- 
Ticket URL: <http://developer.pidgin.im/ticket/4526#comment:2>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list