1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Renamed params in jabber_join

This commit is contained in:
James Booth 2012-11-10 18:28:45 +00:00
parent 522102d4ea
commit aebca570a4
3 changed files with 11 additions and 11 deletions

View File

@ -997,7 +997,7 @@ _cmd_msg(const char * const inp, struct cmd_help_t help)
static gboolean
_cmd_join(const char * const inp, struct cmd_help_t help)
{
char *room_jid = NULL;
char *room = NULL;
char *nick = NULL;
jabber_conn_status_t conn_status = jabber_get_connection_status();
@ -1011,12 +1011,12 @@ _cmd_join(const char * const inp, struct cmd_help_t help)
// get room jid
strtok(inp_cpy, " ");
room_jid = strtok(NULL, " ");
if (room_jid == NULL) {
room = strtok(NULL, " ");
if (room == NULL) {
cons_show("Usage: %s", help.usage);
} else {
if ((strlen(inp) > (6 + strlen(room_jid) + 1))) {
nick = strndup(inp+6+strlen(room_jid)+1, strlen(inp)-(6+strlen(room_jid)+1));
if ((strlen(inp) > (6 + strlen(room) + 1))) {
nick = strndup(inp+6+strlen(room)+1, strlen(inp)-(6+strlen(room)+1));
}
// if no nick, set to first part of jid
@ -1026,8 +1026,8 @@ _cmd_join(const char * const inp, struct cmd_help_t help)
strcpy(jid_cpy, jid);
nick = strdup(strtok(jid_cpy, "@"));
}
jabber_join(room_jid, nick);
win_join_chat(room_jid, nick);
jabber_join(room, nick);
win_join_chat(room, nick);
}
}

View File

@ -232,14 +232,14 @@ jabber_subscribe(const char * const recipient)
}
void
jabber_join(const char * const room_jid, const char * const nick)
jabber_join(const char * const room, const char * const nick)
{
xmpp_stanza_t *presence = stanza_create_room_join_presence(jabber_conn.ctx,
room_jid, nick);
room, nick);
xmpp_send(jabber_conn.conn, presence);
xmpp_stanza_release(presence);
room_join(room_jid, nick);
room_join(room, nick);
}
void

View File

@ -46,7 +46,7 @@ jabber_conn_status_t jabber_connect(const char * const user,
void jabber_disconnect(void);
void jabber_process_events(void);
void jabber_subscribe(const char * const recipient);
void jabber_join(const char * const room_jid, const char * const nick);
void jabber_join(const char * const room, const char * const nick);
void jabber_leave_chat_room(const char * const room_jid);
void jabber_send(const char * const msg, const char * const recipient);
void jabber_send_groupchat(const char * const msg, const char * const recipient);