mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-11 08:20:17 +00:00
Added preferences options to enable the server-time extension when available.
(Internationalization messages missing.)
This commit is contained in:
@@ -507,6 +507,7 @@ const struct prefs vars[] =
|
||||
|
||||
{"irc_auto_rejoin", P_OFFINT (hex_irc_auto_rejoin), TYPE_BOOL},
|
||||
{"irc_ban_type", P_OFFINT (hex_irc_ban_type), TYPE_INT},
|
||||
{"irc_cap_server_time", P_OFFINT (hex_irc_cap_server_time), TYPE_BOOL},
|
||||
{"irc_conf_mode", P_OFFINT (hex_irc_conf_mode), TYPE_BOOL},
|
||||
{"irc_extra_hilight", P_OFFSET (hex_irc_extra_hilight), TYPE_STR},
|
||||
{"irc_hide_version", P_OFFINT (hex_irc_hide_version), TYPE_BOOL},
|
||||
@@ -748,6 +749,7 @@ load_default_config(void)
|
||||
prefs.hex_text_thin_sep = 1;
|
||||
prefs.hex_text_wordwrap = 1;
|
||||
prefs.hex_url_grabber = 1;
|
||||
prefs.hex_irc_cap_server_time = 0;
|
||||
|
||||
/* NUMBERS */
|
||||
prefs.hex_away_size_max = 300;
|
||||
|
||||
@@ -215,6 +215,7 @@ struct hexchatprefs
|
||||
unsigned int hex_irc_wallops;
|
||||
unsigned int hex_irc_who_join;
|
||||
unsigned int hex_irc_whois_front;
|
||||
unsigned int hex_irc_cap_server_time;
|
||||
unsigned int hex_net_auto_reconnect;
|
||||
unsigned int hex_net_auto_reconnectonfail;
|
||||
unsigned int hex_net_proxy_auth;
|
||||
|
||||
@@ -1665,14 +1665,12 @@ inbound_cap_ls (server *serv, char *nick, char *extensions_str,
|
||||
*/
|
||||
if (!strcmp (extension, "znc.in/server-time"))
|
||||
{
|
||||
strcat (buffer, "znc.in/server-time");
|
||||
strcat (buffer, " ");
|
||||
strcat (buffer, "znc.in/server-time ");
|
||||
}
|
||||
else if (!strcmp (extension, "server-time"))
|
||||
if (prefs.hex_irc_cap_server_time
|
||||
&& !strcmp (extension, "server-time"))
|
||||
{
|
||||
/* ignore. it is best to have server-time explicitly enabled or have
|
||||
* a option in the preferences (or per server).
|
||||
*/
|
||||
strcat (buffer, "server-time ");
|
||||
}
|
||||
|
||||
/* if the SASL password is set AND auth mode is set to SASL, request SASL auth */
|
||||
|
||||
Reference in New Issue
Block a user