diff options
Diffstat (limited to 'src/plugins/irc')
-rw-r--r-- | src/plugins/irc/irc-channel.c | 80 | ||||
-rw-r--r-- | src/plugins/irc/irc-channel.h | 4 | ||||
-rw-r--r-- | src/plugins/irc/irc-ignore.c | 35 | ||||
-rw-r--r-- | src/plugins/irc/irc-ignore.h | 2 | ||||
-rw-r--r-- | src/plugins/irc/irc-info.c | 21 | ||||
-rw-r--r-- | src/plugins/irc/irc-nick.c | 35 | ||||
-rw-r--r-- | src/plugins/irc/irc-nick.h | 2 | ||||
-rw-r--r-- | src/plugins/irc/irc-notify.c | 34 | ||||
-rw-r--r-- | src/plugins/irc/irc-notify.h | 2 | ||||
-rw-r--r-- | src/plugins/irc/irc-redirect.c | 79 | ||||
-rw-r--r-- | src/plugins/irc/irc-redirect.h | 4 | ||||
-rw-r--r-- | src/plugins/irc/irc-server.c | 89 | ||||
-rw-r--r-- | src/plugins/irc/irc-server.h | 2 |
13 files changed, 388 insertions, 1 deletions
diff --git a/src/plugins/irc/irc-channel.c b/src/plugins/irc/irc-channel.c index 8fd832432..e22ddc05c 100644 --- a/src/plugins/irc/irc-channel.c +++ b/src/plugins/irc/irc-channel.c @@ -22,6 +22,7 @@ */ #include <stdlib.h> +#include <stddef.h> #include <unistd.h> #include <stdio.h> #include <string.h> @@ -39,6 +40,10 @@ #include "irc-input.h" +struct t_hdata *irc_channel_hdata_channel = NULL; +struct t_hdata *irc_channel_hdata_channel_speaking = NULL; + + /* * irc_channel_valid: check if a channel pointer exists for a server * return 1 if channel exists @@ -833,6 +838,81 @@ irc_channel_free_all (struct t_irc_server *server) } /* + * irc_channel_hdata_channel_cb: return hdata for channel + */ + +struct t_hdata * +irc_channel_hdata_channel_cb (void *data, const char *hdata_name) +{ + struct t_hdata *hdata; + + /* make C compiler happy */ + (void) data; + + if (irc_channel_hdata_channel) + return irc_channel_hdata_channel; + + hdata = weechat_hdata_new (hdata_name, "prev_channel", "next_channel"); + if (hdata) + { + irc_channel_hdata_channel = hdata; + WEECHAT_HDATA_VAR(struct t_irc_channel, type, INTEGER); + WEECHAT_HDATA_VAR(struct t_irc_channel, name, STRING); + WEECHAT_HDATA_VAR(struct t_irc_channel, topic, STRING); + WEECHAT_HDATA_VAR(struct t_irc_channel, modes, STRING); + WEECHAT_HDATA_VAR(struct t_irc_channel, limit, INTEGER); + WEECHAT_HDATA_VAR(struct t_irc_channel, key, STRING); + WEECHAT_HDATA_VAR(struct t_irc_channel, checking_away, INTEGER); + WEECHAT_HDATA_VAR(struct t_irc_channel, away_message, STRING); + WEECHAT_HDATA_VAR(struct t_irc_channel, has_quit_server, INTEGER); + WEECHAT_HDATA_VAR(struct t_irc_channel, cycle, INTEGER); + WEECHAT_HDATA_VAR(struct t_irc_channel, part, INTEGER); + WEECHAT_HDATA_VAR(struct t_irc_channel, display_creation_date, INTEGER); + WEECHAT_HDATA_VAR(struct t_irc_channel, nick_completion_reset, INTEGER); + WEECHAT_HDATA_VAR(struct t_irc_channel, pv_remote_nick_color, STRING); + WEECHAT_HDATA_VAR(struct t_irc_channel, hook_autorejoin, POINTER); + WEECHAT_HDATA_VAR(struct t_irc_channel, nicks_count, INTEGER); + WEECHAT_HDATA_VAR(struct t_irc_channel, nicks, POINTER); + WEECHAT_HDATA_VAR(struct t_irc_channel, last_nick, POINTER); + WEECHAT_HDATA_VAR(struct t_irc_channel, nicks_speaking, POINTER); + WEECHAT_HDATA_VAR(struct t_irc_channel, nicks_speaking_time, POINTER); + WEECHAT_HDATA_VAR(struct t_irc_channel, last_nick_speaking_time, POINTER); + WEECHAT_HDATA_VAR(struct t_irc_channel, buffer, POINTER); + WEECHAT_HDATA_VAR(struct t_irc_channel, buffer_as_string, STRING); + WEECHAT_HDATA_VAR(struct t_irc_channel, prev_channel, POINTER); + WEECHAT_HDATA_VAR(struct t_irc_channel, next_channel, POINTER); + } + return irc_channel_hdata_channel; +} + +/* + * irc_channel_hdata_channel_speaking_cb: return hdata for channel_speaking + */ + +struct t_hdata * +irc_channel_hdata_channel_speaking_cb (void *data, const char *hdata_name) +{ + struct t_hdata *hdata; + + /* make C compiler happy */ + (void) data; + + if (irc_channel_hdata_channel_speaking) + return irc_channel_hdata_channel_speaking; + + hdata = weechat_hdata_new (hdata_name, "prev_nick", "next_nick"); + if (hdata) + { + irc_channel_hdata_channel_speaking = hdata; + WEECHAT_HDATA_VAR(struct t_irc_channel_speaking, nick, STRING); + WEECHAT_HDATA_VAR(struct t_irc_channel_speaking, time_last_message, TIME); + WEECHAT_HDATA_VAR(struct t_irc_channel_speaking, prev_nick, POINTER); + WEECHAT_HDATA_VAR(struct t_irc_channel_speaking, next_nick, POINTER); + } + return irc_channel_hdata_channel_speaking; +} + +/* * irc_channel_add_to_infolist: add a channel in an infolist * return 1 if ok, 0 if error */ diff --git a/src/plugins/irc/irc-channel.h b/src/plugins/irc/irc-channel.h index d170a10ab..379fed2cf 100644 --- a/src/plugins/irc/irc-channel.h +++ b/src/plugins/irc/irc-channel.h @@ -118,6 +118,10 @@ extern int irc_channel_autorejoin_cb (void *data, int remaining_calls); extern void irc_channel_display_nick_back_in_pv (struct t_irc_server *server, struct t_irc_nick *nick, const char *nickname); +extern struct t_hdata *irc_channel_hdata_channel_cb (void *data, + const char *hdata_name); +extern struct t_hdata *irc_channel_hdata_channel_speaking_cb (void *data, + const char *hdata_name); extern int irc_channel_add_to_infolist (struct t_infolist *infolist, struct t_irc_channel *channel); extern void irc_channel_print_log (struct t_irc_channel *channel); diff --git a/src/plugins/irc/irc-ignore.c b/src/plugins/irc/irc-ignore.c index 50b9b0c1b..71b91b0e6 100644 --- a/src/plugins/irc/irc-ignore.c +++ b/src/plugins/irc/irc-ignore.c @@ -22,6 +22,7 @@ */ #include <stdlib.h> +#include <stddef.h> #include <string.h> #include "../weechat-plugin.h" @@ -34,6 +35,8 @@ struct t_irc_ignore *irc_ignore_list = NULL; /* list of ignore */ struct t_irc_ignore *last_irc_ignore = NULL; /* last ignore in list */ +struct t_hdata *irc_ignore_hdata_ignore = NULL; + /* * irc_ignore_valid: check if an ignore pointer exists @@ -302,6 +305,38 @@ irc_ignore_free_all () } /* + * irc_ignore_hdata_ignore_cb: return hdata for ignore + */ + +struct t_hdata * +irc_ignore_hdata_ignore_cb (void *data, const char *hdata_name) +{ + struct t_hdata *hdata; + + /* make C compiler happy */ + (void) data; + + if (irc_ignore_hdata_ignore) + return irc_ignore_hdata_ignore; + + hdata = weechat_hdata_new (hdata_name, "prev_ignore", "next_ignore"); + if (hdata) + { + irc_ignore_hdata_ignore = hdata; + WEECHAT_HDATA_VAR(struct t_irc_ignore, number, INTEGER); + WEECHAT_HDATA_VAR(struct t_irc_ignore, mask, STRING); + WEECHAT_HDATA_VAR(struct t_irc_ignore, regex_mask, POINTER); + WEECHAT_HDATA_VAR(struct t_irc_ignore, server, STRING); + WEECHAT_HDATA_VAR(struct t_irc_ignore, channel, STRING); + WEECHAT_HDATA_VAR(struct t_irc_ignore, prev_ignore, POINTER); + WEECHAT_HDATA_VAR(struct t_irc_ignore, next_ignore, POINTER); + WEECHAT_HDATA_LIST(irc_ignore_list); + WEECHAT_HDATA_LIST(last_irc_ignore); + } + return irc_ignore_hdata_ignore; +} + +/* * irc_ignore_add_to_infolist: add an ignore in an infolist * return 1 if ok, 0 if error */ diff --git a/src/plugins/irc/irc-ignore.h b/src/plugins/irc/irc-ignore.h index 7078a761f..e52300e59 100644 --- a/src/plugins/irc/irc-ignore.h +++ b/src/plugins/irc/irc-ignore.h @@ -51,6 +51,8 @@ extern int irc_ignore_check (struct t_irc_server *server, const char *host); extern void irc_ignore_free (struct t_irc_ignore *ignore); extern void irc_ignore_free_all (); +extern struct t_hdata *irc_ignore_hdata_ignore_cb (void *data, + const char *hdata_name); extern int irc_ignore_add_to_infolist (struct t_infolist *infolist, struct t_irc_ignore *ignore); extern void irc_ignore_print_log (); diff --git a/src/plugins/irc/irc-info.c b/src/plugins/irc/irc-info.c index c4b173ffd..a482be480 100644 --- a/src/plugins/irc/irc-info.c +++ b/src/plugins/irc/irc-info.c @@ -18,7 +18,7 @@ */ /* - * irc-info.c: info and infolist hooks for IRC plugin + * irc-info.c: info, infolist and hdata hooks for IRC plugin */ #include <stdlib.h> @@ -34,6 +34,7 @@ #include "irc-nick.h" #include "irc-notify.h" #include "irc-protocol.h" +#include "irc-redirect.h" #include "irc-server.h" @@ -626,4 +627,22 @@ irc_info_init () N_("notify pointer (optional)"), N_("server name (can start or end with \"*\" as wildcard) (optional)"), &irc_info_get_infolist_cb, NULL); + + /* hdata hooks */ + weechat_hook_hdata ("irc_nick", N_("irc nick"), + &irc_nick_hdata_nick_cb, NULL); + weechat_hook_hdata ("irc_channel", N_("irc channel"), + &irc_channel_hdata_channel_cb, NULL); + weechat_hook_hdata ("irc_channel_speaking", N_("irc channel_speaking"), + &irc_channel_hdata_channel_speaking_cb, NULL); + weechat_hook_hdata ("irc_ignore", N_("irc ignore"), + &irc_ignore_hdata_ignore_cb, NULL); + weechat_hook_hdata ("irc_notify", N_("irc notify"), + &irc_notify_hdata_notify_cb, NULL); + weechat_hook_hdata ("irc_redirect_pattern", N_("pattern for irc redirect"), + &irc_redirect_hdata_redirect_pattern_cb, NULL); + weechat_hook_hdata ("irc_redirect", N_("irc redirect"), + &irc_redirect_hdata_redirect_cb, NULL); + weechat_hook_hdata ("irc_server", N_("irc server"), + &irc_server_hdata_server_cb, NULL); } diff --git a/src/plugins/irc/irc-nick.c b/src/plugins/irc/irc-nick.c index 322cb10d0..005151db9 100644 --- a/src/plugins/irc/irc-nick.c +++ b/src/plugins/irc/irc-nick.c @@ -22,6 +22,7 @@ */ #include <stdlib.h> +#include <stddef.h> #include <stdio.h> #include <string.h> #include <limits.h> @@ -36,6 +37,9 @@ #include "irc-channel.h" +struct t_hdata *irc_nick_hdata_nick = NULL; + + /* * irc_nick_valid: check if a nick pointer exists for a channel * return 1 if nick exists @@ -928,6 +932,37 @@ irc_nick_color_for_pv (struct t_irc_channel *channel, const char *nickname) } /* + * irc_nick_hdata_nick_cb: return hdata for nick + */ + +struct t_hdata * +irc_nick_hdata_nick_cb (void *data, const char *hdata_name) +{ + struct t_hdata *hdata; + + /* make C compiler happy */ + (void) data; + + if (irc_nick_hdata_nick) + return irc_nick_hdata_nick; + + hdata = weechat_hdata_new (hdata_name, "prev_nick", "next_nick"); + if (hdata) + { + irc_nick_hdata_nick = hdata; + WEECHAT_HDATA_VAR(struct t_irc_nick, name, STRING); + WEECHAT_HDATA_VAR(struct t_irc_nick, host, STRING); + WEECHAT_HDATA_VAR(struct t_irc_nick, prefixes, STRING); + WEECHAT_HDATA_VAR(struct t_irc_nick, prefix, STRING); + WEECHAT_HDATA_VAR(struct t_irc_nick, away, INTEGER); + WEECHAT_HDATA_VAR(struct t_irc_nick, color, STRING); + WEECHAT_HDATA_VAR(struct t_irc_nick, prev_nick, POINTER); + WEECHAT_HDATA_VAR(struct t_irc_nick, next_nick, POINTER); + } + return irc_nick_hdata_nick; +} + +/* * irc_nick_add_to_infolist: add a nick in an infolist * return 1 if ok, 0 if error */ diff --git a/src/plugins/irc/irc-nick.h b/src/plugins/irc/irc-nick.h index e40347f23..f6ee95c9c 100644 --- a/src/plugins/irc/irc-nick.h +++ b/src/plugins/irc/irc-nick.h @@ -90,6 +90,8 @@ extern char *irc_nick_as_prefix (struct t_irc_server *server, const char *force_color); extern const char * irc_nick_color_for_pv (struct t_irc_channel *channel, const char *nickname); +extern struct t_hdata *irc_nick_hdata_nick_cb (void *data, + const char *hdata_name); extern int irc_nick_add_to_infolist (struct t_infolist *infolist, struct t_irc_nick *nick); extern void irc_nick_print_log (struct t_irc_nick *nick); diff --git a/src/plugins/irc/irc-notify.c b/src/plugins/irc/irc-notify.c index fd36d690c..3df305e28 100644 --- a/src/plugins/irc/irc-notify.c +++ b/src/plugins/irc/irc-notify.c @@ -22,6 +22,7 @@ */ #include <stdlib.h> +#include <stddef.h> #include <stdio.h> #include <string.h> @@ -42,6 +43,8 @@ struct t_hook *irc_notify_timer_whois = NULL; /* timer for "whois" */ /* hsignal for redirected commands */ struct t_hook *irc_notify_hsignal = NULL; +struct t_hdata *irc_notify_hdata_notify = NULL; + /* * irc_notify_valid: check if a notify pointer exists for a server @@ -809,6 +812,37 @@ irc_notify_timer_whois_cb (void *data, int remaining_calls) } /* + * irc_notify_hdata_notify_cb: return hdata for notify + */ + +struct t_hdata * +irc_notify_hdata_notify_cb (void *data, const char *hdata_name) +{ + struct t_hdata *hdata; + + /* make C compiler happy */ + (void) data; + + if (irc_notify_hdata_notify) + return irc_notify_hdata_notify; + + hdata = weechat_hdata_new (hdata_name, "prev_notify", "next_notify"); + if (hdata) + { + irc_notify_hdata_notify = hdata; + WEECHAT_HDATA_VAR(struct t_irc_notify, server, POINTER); + WEECHAT_HDATA_VAR(struct t_irc_notify, nick, STRING); + WEECHAT_HDATA_VAR(struct t_irc_notify, check_away, INTEGER); + WEECHAT_HDATA_VAR(struct t_irc_notify, is_on_server, INTEGER); + WEECHAT_HDATA_VAR(struct t_irc_notify, away_message, STRING); + WEECHAT_HDATA_VAR(struct t_irc_notify, ison_received, INTEGER); + WEECHAT_HDATA_VAR(struct t_irc_notify, prev_notify, POINTER); + WEECHAT_HDATA_VAR(struct t_irc_notify, next_notify, POINTER); + } + return irc_notify_hdata_notify; +} + +/* * irc_notify_add_to_infolist: add a notify in an infolist * return 1 if ok, 0 if error */ diff --git a/src/plugins/irc/irc-notify.h b/src/plugins/irc/irc-notify.h index ce6a85c38..c348c9ae3 100644 --- a/src/plugins/irc/irc-notify.h +++ b/src/plugins/irc/irc-notify.h @@ -55,6 +55,8 @@ extern void irc_notify_free_all (struct t_irc_server *server); extern void irc_notify_display_list (struct t_irc_server *server); extern int irc_notify_timer_ison_cb (void *data, int remaining_calls); extern int irc_notify_timer_whois_cb (void *data, int remaining_calls); +extern struct t_hdata *irc_notify_hdata_notify_cb (void *data, + const char *hdata_name); extern int irc_notify_add_to_infolist (struct t_infolist *infolist, struct t_irc_notify *notify); extern void irc_notify_print_log (struct t_irc_server *server); diff --git a/src/plugins/irc/irc-redirect.c b/src/plugins/irc/irc-redirect.c index 1ef7301bc..4f7f83ece 100644 --- a/src/plugins/irc/irc-redirect.c +++ b/src/plugins/irc/irc-redirect.c @@ -22,6 +22,7 @@ */ #include <stdlib.h> +#include <stddef.h> #include <stdio.h> #include <string.h> #include <ctype.h> @@ -36,6 +37,9 @@ struct t_irc_redirect_pattern *irc_redirect_patterns = NULL; struct t_irc_redirect_pattern *last_irc_redirect_pattern = NULL; +struct t_hdata *irc_redirect_hdata_redirect_pattern = NULL; +struct t_hdata *irc_redirect_hdata_redirect = NULL; + /* default redirect patterns */ struct t_irc_redirect_pattern irc_redirect_patterns_default[] = { @@ -952,6 +956,81 @@ irc_redirect_free_all (struct t_irc_server *server) } /* + * irc_redirect_hdata_redirect_pattern_cb: return hdata for redirect pattern + */ + +struct t_hdata * +irc_redirect_hdata_redirect_pattern_cb (void *data, const char *hdata_name) +{ + struct t_hdata *hdata; + + /* make C compiler happy */ + (void) data; + + if (irc_redirect_hdata_redirect_pattern) + return irc_redirect_hdata_redirect_pattern; + + hdata = weechat_hdata_new (hdata_name, "prev_redirect", "next_redirect"); + if (hdata) + { + irc_redirect_hdata_redirect_pattern = hdata; + WEECHAT_HDATA_VAR(struct t_irc_redirect_pattern, name, STRING); + WEECHAT_HDATA_VAR(struct t_irc_redirect_pattern, temp_pattern, INTEGER); + WEECHAT_HDATA_VAR(struct t_irc_redirect_pattern, timeout, INTEGER); + WEECHAT_HDATA_VAR(struct t_irc_redirect_pattern, cmd_start, STRING); + WEECHAT_HDATA_VAR(struct t_irc_redirect_pattern, cmd_stop, STRING); + WEECHAT_HDATA_VAR(struct t_irc_redirect_pattern, cmd_extra, STRING); + WEECHAT_HDATA_VAR(struct t_irc_redirect_pattern, prev_redirect, POINTER); + WEECHAT_HDATA_VAR(struct t_irc_redirect_pattern, next_redirect, POINTER); + WEECHAT_HDATA_LIST(irc_redirect_patterns); + WEECHAT_HDATA_LIST(last_irc_redirect_pattern); + } + return irc_redirect_hdata_redirect_pattern; +} + +/* + * irc_redirect_hdata_redirect_cb: return hdata for redirect + */ + +struct t_hdata * +irc_redirect_hdata_redirect_cb (void *data, const char *hdata_name) +{ + struct t_hdata *hdata; + + /* make C compiler happy */ + (void) data; + + if (irc_redirect_hdata_redirect) + return irc_redirect_hdata_redirect; + + hdata = weechat_hdata_new (hdata_name, "prev_redirect", "next_redirect"); + if (hdata) + { + irc_redirect_hdata_redirect = hdata; + WEECHAT_HDATA_VAR(struct t_irc_redirect, server, POINTER); + WEECHAT_HDATA_VAR(struct t_irc_redirect, pattern, STRING); + WEECHAT_HDATA_VAR(struct t_irc_redirect, signal, STRING); + WEECHAT_HDATA_VAR(struct t_irc_redirect, count, INTEGER); + WEECHAT_HDATA_VAR(struct t_irc_redirect, current_count, INTEGER); + WEECHAT_HDATA_VAR(struct t_irc_redirect, string, STRING); + WEECHAT_HDATA_VAR(struct t_irc_redirect, timeout, INTEGER); + WEECHAT_HDATA_VAR(struct t_irc_redirect, command, STRING); + WEECHAT_HDATA_VAR(struct t_irc_redirect, start_time, TIME); + WEECHAT_HDATA_VAR(struct t_irc_redirect, cmd_start, POINTER); + WEECHAT_HDATA_VAR(struct t_irc_redirect, cmd_stop, POINTER); + WEECHAT_HDATA_VAR(struct t_irc_redirect, cmd_extra, POINTER); + WEECHAT_HDATA_VAR(struct t_irc_redirect, cmd_start_received, INTEGER); + WEECHAT_HDATA_VAR(struct t_irc_redirect, cmd_stop_received, INTEGER); + WEECHAT_HDATA_VAR(struct t_irc_redirect, cmd_filter, POINTER); + WEECHAT_HDATA_VAR(struct t_irc_redirect, output, STRING); + WEECHAT_HDATA_VAR(struct t_irc_redirect, output_size, INTEGER); + WEECHAT_HDATA_VAR(struct t_irc_redirect, prev_redirect, POINTER); + WEECHAT_HDATA_VAR(struct t_irc_redirect, next_redirect, POINTER); + } + return irc_redirect_hdata_redirect; +} + +/* * irc_redirect_pattern_add_to_infolist: add a redirect pattern in an infolist * return 1 if ok, 0 if error */ diff --git a/src/plugins/irc/irc-redirect.h b/src/plugins/irc/irc-redirect.h index 02d03e78f..4d7aef7d1 100644 --- a/src/plugins/irc/irc-redirect.h +++ b/src/plugins/irc/irc-redirect.h @@ -108,6 +108,10 @@ extern int irc_redirect_message (struct t_irc_server *server, const char *arguments); extern void irc_redirect_free (struct t_irc_redirect *redirect); extern void irc_redirect_free_all (struct t_irc_server *server); +extern struct t_hdata *irc_redirect_hdata_redirect_pattern_cb (void *data, + const char *hdata_name); +extern struct t_hdata *irc_redirect_hdata_redirect_cb (void *data, + const char *hdata_name); extern int irc_redirect_pattern_add_to_infolist (struct t_infolist *infolist, struct t_irc_redirect_pattern *redirect_pattern); extern int irc_redirect_add_to_infolist (struct t_infolist *infolist, diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c index c2eca6189..55ca31154 100644 --- a/src/plugins/irc/irc-server.c +++ b/src/plugins/irc/irc-server.c @@ -23,6 +23,7 @@ */ #include <stdlib.h> +#include <stddef.h> #include <unistd.h> #include <errno.h> #include <stdio.h> @@ -64,6 +65,8 @@ struct t_irc_server *last_irc_server = NULL; struct t_irc_message *irc_recv_msgq = NULL; struct t_irc_message *irc_msgq_last_msg = NULL; +struct t_hdata *irc_server_hdata_server = NULL; + char *irc_server_option_string[IRC_SERVER_NUM_OPTIONS] = { "addresses", "proxy", "ipv6", "ssl", "ssl_cert", "ssl_priorities", "ssl_dhkey_size", "ssl_verify", @@ -3935,6 +3938,92 @@ irc_server_xfer_send_accept_resume_cb (void *data, const char *signal, } /* + * irc_server_hdata_server_cb: return hdata for server + */ + +struct t_hdata * +irc_server_hdata_server_cb (void *data, const char *hdata_name) +{ + struct t_hdata *hdata; + + /* make C compiler happy */ + (void) data; + + if (irc_server_hdata_server) + return irc_server_hdata_server; + + hdata = weechat_hdata_new (hdata_name, "prev_server", "next_server"); + if (hdata) + { + irc_server_hdata_server = hdata; + WEECHAT_HDATA_VAR(struct t_irc_server, name, STRING); + WEECHAT_HDATA_VAR(struct t_irc_server, options, POINTER); + WEECHAT_HDATA_VAR(struct t_irc_server, temp_server, INTEGER); + WEECHAT_HDATA_VAR(struct t_irc_server, reloading_from_config, INTEGER); + WEECHAT_HDATA_VAR(struct t_irc_server, reloaded_from_config, INTEGER); + WEECHAT_HDATA_VAR(struct t_irc_server, addresses_count, INTEGER); + WEECHAT_HDATA_VAR(struct t_irc_server, addresses_array, POINTER); + WEECHAT_HDATA_VAR(struct t_irc_server, ports_array, POINTER); + WEECHAT_HDATA_VAR(struct t_irc_server, index_current_address, INTEGER); + WEECHAT_HDATA_VAR(struct t_irc_server, current_address, STRING); + WEECHAT_HDATA_VAR(struct t_irc_server, current_ip, STRING); + WEECHAT_HDATA_VAR(struct t_irc_server, current_port, INTEGER); + WEECHAT_HDATA_VAR(struct t_irc_server, sock, INTEGER); + WEECHAT_HDATA_VAR(struct t_irc_server, hook_connect, POINTER); + WEECHAT_HDATA_VAR(struct t_irc_server, hook_fd, POINTER); + WEECHAT_HDATA_VAR(struct t_irc_server, hook_timer_connection, POINTER); + WEECHAT_HDATA_VAR(struct t_irc_server, hook_timer_sasl, POINTER); + WEECHAT_HDATA_VAR(struct t_irc_server, is_connected, INTEGER); + WEECHAT_HDATA_VAR(struct t_irc_server, ssl_connected, INTEGER); +#ifdef HAVE_GNUTLS + WEECHAT_HDATA_VAR(struct t_irc_server, gnutls_sess, OTHER); + WEECHAT_HDATA_VAR(struct t_irc_server, tls_cert, OTHER); + WEECHAT_HDATA_VAR(struct t_irc_server, tls_cert_key, OTHER); +#endif + WEECHAT_HDATA_VAR(struct t_irc_server, unterminated_message, STRING); + WEECHAT_HDATA_VAR(struct t_irc_server, nicks_count, INTEGER); + WEECHAT_HDATA_VAR(struct t_irc_server, nicks_array, POINTER); + WEECHAT_HDATA_VAR(struct t_irc_server, nick_first_tried, INTEGER); + WEECHAT_HDATA_VAR(struct t_irc_server, nick, STRING); + WEECHAT_HDATA_VAR(struct t_irc_server, nick_modes, STRING); + WEECHAT_HDATA_VAR(struct t_irc_server, isupport, STRING); + WEECHAT_HDATA_VAR(struct t_irc_server, prefix_modes, STRING); + WEECHAT_HDATA_VAR(struct t_irc_server, prefix_chars, STRING); + WEECHAT_HDATA_VAR(struct t_irc_server, reconnect_delay, INTEGER); + WEECHAT_HDATA_VAR(struct t_irc_server, reconnect_start, TIME); + WEECHAT_HDATA_VAR(struct t_irc_server, command_time, TIME); + WEECHAT_HDATA_VAR(struct t_irc_server, reconnect_join, INTEGER); + WEECHAT_HDATA_VAR(struct t_irc_server, disable_autojoin, INTEGER); + WEECHAT_HDATA_VAR(struct t_irc_server, is_away, INTEGER); + WEECHAT_HDATA_VAR(struct t_irc_server, away_message, STRING); + WEECHAT_HDATA_VAR(struct t_irc_server, away_time, TIME); + WEECHAT_HDATA_VAR(struct t_irc_server, lag, INTEGER); + WEECHAT_HDATA_VAR(struct t_irc_server, lag_check_time, OTHER); + WEECHAT_HDATA_VAR(struct t_irc_server, lag_next_check, TIME); + WEECHAT_HDATA_VAR(struct t_irc_server, lag_last_refresh, TIME); + WEECHAT_HDATA_VAR(struct t_irc_server, cmd_list_regexp, POINTER); + WEECHAT_HDATA_VAR(struct t_irc_server, last_user_message, TIME); + WEECHAT_HDATA_VAR(struct t_irc_server, last_away_check, TIME); + WEECHAT_HDATA_VAR(struct t_irc_server, outqueue, POINTER); + WEECHAT_HDATA_VAR(struct t_irc_server, last_outqueue, POINTER); + WEECHAT_HDATA_VAR(struct t_irc_server, redirects, POINTER); + WEECHAT_HDATA_VAR(struct t_irc_server, last_redirect, POINTER); + WEECHAT_HDATA_VAR(struct t_irc_server, notify_list, POINTER); + WEECHAT_HDATA_VAR(struct t_irc_server, last_notify, POINTER); + WEECHAT_HDATA_VAR(struct t_irc_server, manual_joins, POINTER); + WEECHAT_HDATA_VAR(struct t_irc_server, buffer, POINTER); + WEECHAT_HDATA_VAR(struct t_irc_server, buffer_as_string, STRING); + WEECHAT_HDATA_VAR(struct t_irc_server, channels, POINTER); + WEECHAT_HDATA_VAR(struct t_irc_server, last_channel, POINTER); + WEECHAT_HDATA_VAR(struct t_irc_server, prev_server, POINTER); + WEECHAT_HDATA_VAR(struct t_irc_server, next_server, POINTER); + WEECHAT_HDATA_LIST(irc_servers); + WEECHAT_HDATA_LIST(last_irc_server); + } + return irc_server_hdata_server; +} + +/* * irc_server_add_to_infolist: add a server in an infolist * return 1 if ok, 0 if error */ diff --git a/src/plugins/irc/irc-server.h b/src/plugins/irc/irc-server.h index 676959edd..ae2c53677 100644 --- a/src/plugins/irc/irc-server.h +++ b/src/plugins/irc/irc-server.h @@ -272,6 +272,8 @@ extern int irc_server_xfer_resume_ready_cb (void *data, const char *signal, extern int irc_server_xfer_send_accept_resume_cb (void *data, const char *signal, const char *type_data, void *signal_data); +extern struct t_hdata *irc_server_hdata_server_cb (void *data, + const char *hdata_name); extern int irc_server_add_to_infolist (struct t_infolist *infolist, struct t_irc_server *server); extern void irc_server_print_log (); |