[Pidgin] #4526: Jabber /join-command
Pidgin
trac at pidgin.im
Sun Dec 30 17:49:50 EST 2007
#4526: Jabber /join-command
--------------------------+-------------------------------------------------
Reporter: Solarius | Owner: nwalp
Type: enhancement | Status: new
Priority: minor | Milestone:
Component: XMPP | Version: 2.3.1
Resolution: | Keywords:
Pending: 0 |
--------------------------+-------------------------------------------------
Comment (by Solarius):
...and because the description text needs modifications also, this would
be the better patch:
{{{
--- libpurple/protocols/jabber/jabber.c 2007-12-31 01:11:46.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]);
@@ -2375,7 +2357,7 @@ void jabber_register_commands(void)
PURPLE_CMD_FLAG_CHAT | PURPLE_CMD_FLAG_PRPL_ONLY
|
PURPLE_CMD_FLAG_ALLOW_WRONG_ARGS, "prpl-jabber",
jabber_cmd_chat_join,
- _("join: <room[@server]> [password]: Join
a chat on this server."),
+ _("join: <room> [server]: Join a chat on
this server."),
NULL);
purple_cmd_register("kick", "ws", PURPLE_CMD_P_PRPL,
PURPLE_CMD_FLAG_CHAT | PURPLE_CMD_FLAG_PRPL_ONLY
|
}}}
--
Ticket URL: <http://developer.pidgin.im/ticket/4526#comment:4>
Pidgin <http://pidgin.im>
Pidgin
More information about the Tracker
mailing list