Tony Olagbaiye 4 years ago
parent cd0beab676
commit fe633d3363
No known key found for this signature in database
GPG Key ID: 9E2FF3BDEBDFC910

@ -16,6 +16,7 @@
[[https://github.com/bqv/weechat-xmpp/issues?q=is:issue+is:closed][file:https://img.shields.io/github/issues-closed/bqv/weechat-xmpp.svg]]
[[https://github.com/bqv/weechat-xmpp/blob/master/LICENSE][file:https://img.shields.io/github/license/bqv/weechat-xmpp.svg]]
[[https://github.com/bqv/weechat-extras/][file:https://img.shields.io/badge/weechat--extras-xmpp-blue.svg]]
[[https://github.com/bqv/weechat-extras/][file:https://inverse.chat/badge.svg?room=weechat@conference.hmm.st]]
| Status: | XMPP for power users and digital masochists |
| Location: | [[http://github.com/bqv/weechat-xmpp]] |

@ -30,6 +30,7 @@ char *account_options[ACCOUNT_NUM_OPTIONS][2] =
{ "autoconnect", "" },
{ "resource", "" },
{ "status", "probably about to segfault" },
{ "autojoin", "" },
};
struct t_account *account__search(const char *name)

@ -17,6 +17,7 @@ enum t_account_option
ACCOUNT_OPTION_AUTOCONNECT,
ACCOUNT_OPTION_RESOURCE,
ACCOUNT_OPTION_STATUS,
ACCOUNT_OPTION_AUTOJOIN,
ACCOUNT_NUM_OPTIONS,
};
@ -50,6 +51,8 @@ enum t_account_option
weechat_config_string(account->options[ACCOUNT_OPTION_RESOURCE])
#define account_status(account) \
weechat_config_string(account->options[ACCOUNT_OPTION_STATUS])
#define account_autojoin(account) \
weechat_config_string(account->options[ACCOUNT_OPTION_AUTOJOIN])
struct t_account
{

@ -5,6 +5,9 @@
#ifndef _WEECHAT_XMPP_COMMAND_H_
#define _WEECHAT_XMPP_COMMAND_H_
int command__enter(const void *pointer, void *data,
struct t_gui_buffer *buffer, int argc,
char **argv, char **argv_eol);
void command__init();
#endif /*WEECHAT_XMPP_COMMAND_H*/

@ -186,6 +186,22 @@ config__account_new_option (struct t_config_file *config_file,
callback_change_data,
NULL, NULL, NULL);
break;
case ACCOUNT_OPTION_AUTOJOIN:
new_option = weechat_config_new_option (
config_file, section,
option_name, "string",
N_("XMPP Channel Autojoin"),
NULL, 0, 0,
default_value, value,
null_value_allowed,
callback_check_value,
callback_check_value_pointer,
callback_check_value_data,
callback_change,
callback_change_pointer,
callback_change_data,
NULL, NULL, NULL);
break;
case ACCOUNT_NUM_OPTIONS:
break;
}

@ -225,6 +225,11 @@ void connection__handler(xmpp_conn_t *conn, xmpp_conn_event_t status,
xmpp_send(conn, pres);
xmpp_stanza_release(pres);
command__enter(NULL, NULL, account->buffer, 2, argv, argv_eol);
xmpp_send(conn, pres);
xmpp_stanza_release(pres);
} else {
//weechat_printf(account->buffer, "DEBUG: disconnected");
//xmpp_stop(account->context);

Loading…
Cancel
Save