diff options
author | Berke Viktor <bviktor@hexchat.org> | 2012-10-22 14:50:36 +0200 |
---|---|---|
committer | Berke Viktor <bviktor@hexchat.org> | 2012-10-22 14:50:36 +0200 |
commit | 545b7dc6ffc0aff9f2ca2cb4ba10b69e25134a03 (patch) | |
tree | cfb96af58bab32dca37205add2a5be36dd2c23f2 | |
parent | 5c49b45a6deb80d604fd6114bb110358b6ee0687 (diff) |
Variable cleanup for irc_*
-rw-r--r-- | src/common/cfgfiles.c | 81 | ||||
-rw-r--r-- | src/common/ctcp.c | 2 | ||||
-rw-r--r-- | src/common/dcc.c | 2 | ||||
-rw-r--r-- | src/common/inbound.c | 36 | ||||
-rw-r--r-- | src/common/modes.c | 4 | ||||
-rw-r--r-- | src/common/outbound.c | 6 | ||||
-rw-r--r-- | src/common/proto-irc.c | 4 | ||||
-rw-r--r-- | src/common/server.c | 14 | ||||
-rw-r--r-- | src/common/servlist.c | 2 | ||||
-rw-r--r-- | src/common/text.c | 12 | ||||
-rw-r--r-- | src/common/xchat.h | 51 | ||||
-rw-r--r-- | src/fe-gtk/maingui.c | 4 | ||||
-rw-r--r-- | src/fe-gtk/plugin-tray.c | 2 | ||||
-rw-r--r-- | src/fe-gtk/servlistgui.c | 22 | ||||
-rw-r--r-- | src/fe-gtk/setup.c | 32 |
15 files changed, 137 insertions, 137 deletions
diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c index 036ea04d..7e6f7278 100644 --- a/src/common/cfgfiles.c +++ b/src/common/cfgfiles.c @@ -520,32 +520,32 @@ const struct prefs vars[] = {"input_tray_hilight", P_OFFINT (hex_input_tray_hilight), TYPE_BOOL}, {"input_tray_priv", P_OFFINT (hex_input_tray_priv), TYPE_BOOL}, - {"irc_auto_rejoin", P_OFFINT (autorejoin), TYPE_BOOL}, - {"irc_ban_type", P_OFFINT (bantype), TYPE_INT}, - {"irc_conf_mode", P_OFFINT (confmode), TYPE_BOOL}, - {"irc_extra_hilight", P_OFFSET (irc_extra_hilight), TYPE_STR}, - {"irc_hide_version", P_OFFINT (hidever), TYPE_BOOL}, - {"irc_id_ntext", P_OFFSET (irc_id_ntext), TYPE_STR}, - {"irc_id_ytext", P_OFFSET (irc_id_ytext), TYPE_STR}, - {"irc_invisible", P_OFFINT (invisible), TYPE_BOOL}, - {"irc_join_delay", P_OFFINT (irc_join_delay), TYPE_INT}, - {"irc_logging", P_OFFINT (logging), TYPE_BOOL}, - {"irc_logmask", P_OFFSET (logmask), TYPE_STR}, - {"irc_nick1", P_OFFSET (nick1), TYPE_STR}, - {"irc_nick2", P_OFFSET (nick2), TYPE_STR}, - {"irc_nick3", P_OFFSET (nick3), TYPE_STR}, - {"irc_nick_hilight", P_OFFSET (irc_nick_hilight), TYPE_STR}, - {"irc_no_hilight", P_OFFSET (irc_no_hilight), TYPE_STR}, - {"irc_part_reason", P_OFFSET (partreason), TYPE_STR}, - {"irc_quit_reason", P_OFFSET (quitreason), TYPE_STR}, - {"irc_raw_modes", P_OFFINT (raw_modes), TYPE_BOOL}, - {"irc_real_name", P_OFFSET (realname), TYPE_STR}, - {"irc_servernotice", P_OFFINT (servernotice), TYPE_BOOL}, - {"irc_skip_motd", P_OFFINT (skipmotd), TYPE_BOOL}, - {"irc_user_name", P_OFFSET (username), TYPE_STR}, - {"irc_wallops", P_OFFINT (wallops), TYPE_BOOL}, - {"irc_who_join", P_OFFINT (userhost), TYPE_BOOL}, - {"irc_whois_front", P_OFFINT (irc_whois_front), TYPE_BOOL}, + {"irc_auto_rejoin", P_OFFINT (hex_irc_auto_rejoin), TYPE_BOOL}, + {"irc_ban_type", P_OFFINT (hex_irc_ban_type), TYPE_INT}, + {"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}, + {"irc_id_ntext", P_OFFSET (hex_irc_id_ntext), TYPE_STR}, + {"irc_id_ytext", P_OFFSET (hex_irc_id_ytext), TYPE_STR}, + {"irc_invisible", P_OFFINT (hex_irc_invisible), TYPE_BOOL}, + {"irc_join_delay", P_OFFINT (hex_irc_join_delay), TYPE_INT}, + {"irc_logging", P_OFFINT (hex_irc_logging), TYPE_BOOL}, + {"irc_logmask", P_OFFSET (hex_irc_logmask), TYPE_STR}, + {"irc_nick1", P_OFFSET (hex_irc_nick1), TYPE_STR}, + {"irc_nick2", P_OFFSET (hex_irc_nick2), TYPE_STR}, + {"irc_nick3", P_OFFSET (hex_irc_nick3), TYPE_STR}, + {"irc_nick_hilight", P_OFFSET (hex_irc_nick_hilight), TYPE_STR}, + {"irc_no_hilight", P_OFFSET (hex_irc_no_hilight), TYPE_STR}, + {"irc_part_reason", P_OFFSET (hex_irc_part_reason), TYPE_STR}, + {"irc_quit_reason", P_OFFSET (hex_irc_quit_reason), TYPE_STR}, + {"irc_raw_modes", P_OFFINT (hex_irc_raw_modes), TYPE_BOOL}, + {"irc_real_name", P_OFFSET (hex_irc_real_name), TYPE_STR}, + {"irc_servernotice", P_OFFINT (hex_irc_servernotice), TYPE_BOOL}, + {"irc_skip_motd", P_OFFINT (hex_irc_skip_motd), TYPE_BOOL}, + {"irc_user_name", P_OFFSET (hex_irc_user_name), TYPE_STR}, + {"irc_wallops", P_OFFINT (hex_irc_wallops), TYPE_BOOL}, + {"irc_who_join", P_OFFINT (hex_irc_who_join), TYPE_BOOL}, + {"irc_whois_front", P_OFFINT (hex_irc_whois_front), TYPE_BOOL}, {"net_auto_reconnect", P_OFFINT (autoreconnect), TYPE_BOOL}, {"net_auto_reconnectonfail", P_OFFINT (autoreconnectonfail), TYPE_BOOL}, @@ -558,7 +558,6 @@ const struct prefs vars[] = {"net_proxy_type", P_OFFINT (proxy_type), TYPE_INT}, {"net_proxy_use", P_OFFINT (proxy_use), TYPE_INT}, {"net_proxy_user", P_OFFSET (proxy_user), TYPE_STR}, - {"net_reconnect_delay", P_OFFINT (recon_delay), TYPE_INT}, {"net_throttle", P_OFFINT (throttle), TYPE_BOOL}, @@ -655,7 +654,7 @@ load_config (void) /* put in default values, anything left out is automatically zero */ prefs.local_ip = 0xffffffff; - prefs.irc_join_delay = 3; + prefs.hex_irc_join_delay = 3; prefs.show_marker = 1; prefs.hex_gui_tab_newtofront = 2; prefs.hex_completion_amount = 5; @@ -735,7 +734,7 @@ load_config (void) prefs.hex_gui_ulist_icons = 1; prefs.hex_gui_ulist_pos = 3; prefs.hex_gui_win_save = 1; - prefs.bantype = 2; + prefs.hex_irc_ban_type = 2; prefs.hex_input_balloon_time = 20; prefs.hex_input_flash_priv = prefs.hex_input_flash_hilight = 1; prefs.hex_input_tray_priv = prefs.hex_input_tray_hilight = 1; @@ -747,16 +746,16 @@ load_config (void) strcpy (prefs.spell_langs, g_getenv ("LC_ALL") ? g_getenv ("LC_ALL") : "en_US"); strcpy (prefs.stamp_format, "[%H:%M:%S] "); strcpy (prefs.timestamp_log_format, "%b %d %H:%M:%S "); - strcpy (prefs.logmask, "%n-%c.log"); + strcpy (prefs.hex_irc_logmask, "%n-%c.log"); strcpy (prefs.hex_completion_suffix, ","); strcpy (prefs.hex_input_command_char, "/"); - strcpy (prefs.nick1, username); - strcpy (prefs.nick2, username); - strcat (prefs.nick2, "_"); - strcpy (prefs.nick3, username); - strcat (prefs.nick3, "__"); - strcpy (prefs.realname, realname); - strcpy (prefs.username, username); + strcpy (prefs.hex_irc_nick1, username); + strcpy (prefs.hex_irc_nick2, username); + strcat (prefs.hex_irc_nick2, "_"); + strcpy (prefs.hex_irc_nick3, username); + strcat (prefs.hex_irc_nick3, "__"); + strcpy (prefs.hex_irc_real_name, realname); + strcpy (prefs.hex_irc_user_name, username); #ifdef WIN32 strcpy (prefs.sounddir, "./sounds"); { @@ -777,13 +776,13 @@ load_config (void) #endif strcpy (prefs.hex_gui_ulist_doubleclick, "QUOTE WHOIS %s %s"); strcpy (prefs.hex_away_reason, _("I'm busy")); - strcpy (prefs.quitreason, _("Leaving")); - strcpy (prefs.partreason, prefs.quitreason); + strcpy (prefs.hex_irc_quit_reason, _("Leaving")); + strcpy (prefs.hex_irc_part_reason, prefs.hex_irc_quit_reason); strcpy (prefs.font_normal, DEF_FONT); strcpy (prefs.font_main, DEF_FONT); strcpy (prefs.font_alternative, DEF_FONT_ALTER); strcpy (prefs.hex_dnsprogram, "host"); - strcpy (prefs.irc_no_hilight, "NickServ,ChanServ,InfoServ,N,Q"); + strcpy (prefs.hex_irc_no_hilight, "NickServ,ChanServ,InfoServ,N,Q"); g_free ((char *)username); g_free ((char *)realname); @@ -839,7 +838,7 @@ load_config (void) if (prefs.hex_gui_win_width < 106) prefs.hex_gui_win_width = 106; - sp = strchr (prefs.username, ' '); + sp = strchr (prefs.hex_irc_user_name, ' '); if (sp) sp[0] = 0; /* spaces in username would break the login */ } diff --git a/src/common/ctcp.c b/src/common/ctcp.c index ac6a821d..c0d1ce49 100644 --- a/src/common/ctcp.c +++ b/src/common/ctcp.c @@ -135,7 +135,7 @@ ctcp_handle (session *sess, char *to, char *nick, char *ip, if (ignore_check (word[1], IG_CTCP)) return; - if (!g_ascii_strcasecmp (msg, "VERSION") && !prefs.hidever) + if (!g_ascii_strcasecmp (msg, "VERSION") && !prefs.hex_irc_hide_version) { #ifdef WIN32 snprintf (outbuf, sizeof (outbuf), "VERSION HexChat "PACKAGE_VERSION" [x%d] / %s", diff --git a/src/common/dcc.c b/src/common/dcc.c index 86a75754..b697402e 100644 --- a/src/common/dcc.c +++ b/src/common/dcc.c @@ -1022,7 +1022,7 @@ dcc_socks_proxy_traverse (GIOChannel *source, GIOCondition condition, struct DCC sc.type = 1; sc.port = htons (dcc->port); sc.address = htonl (dcc->addr); - strncpy (sc.username, prefs.username, 9); + strncpy (sc.username, prefs.hex_irc_user_name, 9); memcpy (proxy->buffer, &sc, sizeof (sc)); proxy->buffersize = 8 + strlen (sc.username) + 1; proxy->bufferused = 0; diff --git a/src/common/inbound.c b/src/common/inbound.c index 6727a2e8..9d39e5cd 100644 --- a/src/common/inbound.c +++ b/src/common/inbound.c @@ -142,10 +142,10 @@ inbound_make_idtext (server *serv, char *idtext, int max, int id) { if (id) { - safe_strcpy (idtext, prefs.irc_id_ytext, max); + safe_strcpy (idtext, prefs.hex_irc_id_ytext, max); } else { - safe_strcpy (idtext, prefs.irc_id_ntext, max); + safe_strcpy (idtext, prefs.hex_irc_id_ntext, max); } /* convert codes like %C,%U to the proper ones */ check_special_chars (idtext, TRUE); @@ -176,7 +176,7 @@ inbound_privmsg (server *serv, char *from, char *ip, char *text, int id) if (ip && ip[0]) { - if (prefs.logging && sess->logfd != -1 && + if (prefs.hex_irc_logging && sess->logfd != -1 && (!sess->topic || strcmp(sess->topic, ip))) { char tbuf[1024]; @@ -291,14 +291,14 @@ alert_match_text (char *text, char *masks) static int is_hilight (char *from, char *text, session *sess, server *serv) { - if (alert_match_word (from, prefs.irc_no_hilight)) + if (alert_match_word (from, prefs.hex_irc_no_hilight)) return 0; text = strip_color (text, -1, STRIP_ALL); if (alert_match_text (text, serv->nick) || - alert_match_text (text, prefs.irc_extra_hilight) || - alert_match_word (from, prefs.irc_nick_hilight)) + alert_match_text (text, prefs.hex_irc_extra_hilight) || + alert_match_word (from, prefs.hex_irc_nick_hilight)) { g_free (text); if (sess != current_tab) @@ -577,7 +577,7 @@ inbound_ujoin (server *serv, char *chan, char *nick, char *ip) EMIT_SIGNAL (XP_TE_UJOIN, sess, nick, chan, ip, NULL, 0); - if (prefs.userhost) + if (prefs.hex_irc_who_join) { /* sends WHO #channel */ serv->p_user_list (sess->server, chan); @@ -593,7 +593,7 @@ inbound_ukick (server *serv, char *chan, char *kicker, char *reason) { EMIT_SIGNAL (XP_TE_UKICK, sess, serv->nick, chan, kicker, reason, 0); clear_channel (sess); - if (prefs.autorejoin) + if (prefs.hex_irc_auto_rejoin) { serv->p_join (serv, chan, sess->channelkey); safe_strcpy (sess->waitchannel, chan, CHANLEN); @@ -949,7 +949,7 @@ inbound_away (server *serv, char *nick, char *msg) server_away_save_message (serv, nick, msg); } - if (prefs.irc_whois_front) + if (prefs.hex_irc_whois_front) sess = serv->front_session; else { @@ -1080,7 +1080,7 @@ inbound_next_nick (session *sess, char *nick) switch (serv->nickcount) { case 2: - newnick = prefs.nick2; + newnick = prefs.hex_irc_nick2; net = serv->network; /* use network specific "Second choice"? */ if (net && !(net->flags & FLAG_USE_GLOBAL) && net->nick2) @@ -1090,8 +1090,8 @@ inbound_next_nick (session *sess, char *nick) break; case 3: - serv->p_change_nick (serv, prefs.nick3); - EMIT_SIGNAL (XP_TE_NICKCLASH, sess, nick, prefs.nick3, NULL, NULL, 0); + serv->p_change_nick (serv, prefs.hex_irc_nick3); + EMIT_SIGNAL (XP_TE_NICKCLASH, sess, nick, prefs.hex_irc_nick3, NULL, NULL, 0); break; default: @@ -1121,11 +1121,11 @@ set_default_modes (server *serv) modes[0] = '+'; modes[1] = '\0'; - if (prefs.wallops) + if (prefs.hex_irc_wallops) strcat (modes, "w"); - if (prefs.servernotice) + if (prefs.hex_irc_servernotice) strcat (modes, "s"); - if (prefs.invisible) + if (prefs.hex_irc_invisible) strcat (modes, "i"); if (modes[1] != '\0') @@ -1322,8 +1322,8 @@ inbound_login_end (session *sess, char *text) /* send JOIN now or wait? */ if (serv->network && ((ircnet *)serv->network)->nickserv && - prefs.irc_join_delay) - serv->joindelay_tag = fe_timeout_add (prefs.irc_join_delay * 1000, + prefs.hex_irc_join_delay) + serv->joindelay_tag = fe_timeout_add (prefs.hex_irc_join_delay * 1000, check_autojoin_channels, serv); else check_autojoin_channels (serv); @@ -1331,7 +1331,7 @@ inbound_login_end (session *sess, char *text) notify_send_watches (serv); serv->end_of_motd = TRUE; } - if (prefs.skipmotd && !serv->motd_skipped) + if (prefs.hex_irc_skip_motd && !serv->motd_skipped) { serv->motd_skipped = TRUE; EMIT_SIGNAL (XP_TE_MOTDSKIP, serv->server_session, NULL, NULL, diff --git a/src/common/modes.c b/src/common/modes.c index 6eb63f3b..07a5cea4 100644 --- a/src/common/modes.c +++ b/src/common/modes.c @@ -661,7 +661,7 @@ handle_mode (server * serv, char *word[], char *word_eol[], if (word_eol[offset][len] == ' ') word_eol[offset][len] = 0; - if (prefs.raw_modes && !numeric_324) + if (prefs.hex_irc_raw_modes && !numeric_324) EMIT_SIGNAL (XP_TE_RAWMODES, sess, nick, word_eol[offset], 0, 0, 0); if (numeric_324 && !using_front_tab) @@ -717,7 +717,7 @@ handle_mode (server * serv, char *word[], char *word_eol[], argstr = word[arg + offset]; } handle_single_mode (&mr, sign, *modes, nick, chan, - argstr, numeric_324 || prefs.raw_modes, + argstr, numeric_324 || prefs.hex_irc_raw_modes, numeric_324); } diff --git a/src/common/outbound.c b/src/common/outbound.c index 93751fcf..cb96f86c 100644 --- a/src/common/outbound.c +++ b/src/common/outbound.c @@ -123,7 +123,7 @@ server_sendpart (server * serv, char *channel, char *reason) { if (!reason) { - reason = random_line (prefs.partreason); + reason = random_line (prefs.hex_irc_part_reason); serv->p_part (serv, channel, reason); free (reason); } else @@ -140,7 +140,7 @@ server_sendquit (session * sess) if (!sess->quitreason) { - colrea = strdup (prefs.quitreason); + colrea = strdup (prefs.hex_irc_quit_reason); check_special_chars (colrea, FALSE); rea = random_line (colrea); free (colrea); @@ -513,7 +513,7 @@ ban (session * sess, char *tbuf, char *mask, char *bantypestr, int deop) if (*bantypestr) bantype = atoi (bantypestr); else - bantype = prefs.bantype; + bantype = prefs.hex_irc_ban_type; tbuf[0] = 0; if (inet_addr (fullhost) != -1) /* "fullhost" is really a IP number */ diff --git a/src/common/proto-irc.c b/src/common/proto-irc.c index 02df18e0..10c81157 100644 --- a/src/common/proto-irc.c +++ b/src/common/proto-irc.c @@ -456,7 +456,7 @@ process_numeric (session * sess, int n, session *whois_sess = serv->server_session; /* unless this setting is on */ - if (prefs.irc_whois_front) + if (prefs.hex_irc_whois_front) whois_sess = serv->front_session; switch (n) @@ -825,7 +825,7 @@ process_numeric (session * sess, int n, case 372: /* motd text */ case 375: /* motd start */ - if (!prefs.skipmotd || serv->motd_skipped) + if (!prefs.hex_irc_skip_motd || serv->motd_skipped) EMIT_SIGNAL (XP_TE_MOTD, serv->server_session, text, NULL, NULL, NULL, 0); break; diff --git a/src/common/server.c b/src/common/server.c index 66d9d0d6..7728a91a 100644 --- a/src/common/server.c +++ b/src/common/server.c @@ -524,14 +524,14 @@ server_connected (server * serv) (!(((ircnet *)serv->network)->flags & FLAG_USE_GLOBAL) && (((ircnet *)serv->network)->user)) ? (((ircnet *)serv->network)->user) : - prefs.username, + prefs.hex_irc_user_name, (!(((ircnet *)serv->network)->flags & FLAG_USE_GLOBAL) && (((ircnet *)serv->network)->real)) ? (((ircnet *)serv->network)->real) : - prefs.realname); + prefs.hex_irc_real_name); } else { - serv->p_login (serv, prefs.username, prefs.realname); + serv->p_login (serv, prefs.hex_irc_user_name, prefs.hex_irc_real_name); } } else { @@ -975,7 +975,7 @@ server_read_child (GIOChannel *source, GIOCondition condition, server *serv) } else { - identd_start (prefs.username); + identd_start (prefs.hex_irc_user_name); } } #else @@ -984,7 +984,7 @@ server_read_child (GIOChannel *source, GIOCondition condition, server *serv) if (access (outbuf, X_OK) == 0) { snprintf (outbuf, sizeof (outbuf), "exec -d %s/auth/xchat_auth %s", - g_get_home_dir (), prefs.username); + g_get_home_dir (), prefs.hex_irc_user_name); handle_command (serv->server_session, outbuf, FALSE); } #endif @@ -1198,7 +1198,7 @@ traverse_socks (int print_fd, int sok, char *serverAddr, int port) sc.type = 1; sc.port = htons (port); sc.address = inet_addr (serverAddr); - strncpy (sc.username, prefs.username, 9); + strncpy (sc.username, prefs.hex_irc_user_name, 9); send (sok, (char *) &sc, 8 + strlen (sc.username) + 1, 0); buf[1] = 0; @@ -1858,7 +1858,7 @@ server_new (void) serv->id = id++; serv->sok = -1; - strcpy (serv->nick, prefs.nick1); + strcpy (serv->nick, prefs.hex_irc_nick1); server_set_defaults (serv); serv_list = g_slist_prepend (serv_list, serv); diff --git a/src/common/servlist.c b/src/common/servlist.c index 5ca80ed0..c243907b 100644 --- a/src/common/servlist.c +++ b/src/common/servlist.c @@ -613,7 +613,7 @@ servlist_connect (session *sess, ircnet *net, gboolean join) if (net->flags & FLAG_USE_GLOBAL) { - strcpy (serv->nick, prefs.nick1); + strcpy (serv->nick, prefs.hex_irc_nick1); } else { if (net->nick) diff --git a/src/common/text.c b/src/common/text.c index 033b1b2f..e6b00df3 100644 --- a/src/common/text.c +++ b/src/common/text.c @@ -590,9 +590,9 @@ logmask_is_fullpath () * - starts with '\' which denotes the root directory of the current drive letter * - starts with a drive letter and followed by ':' */ - if (prefs.logmask[0] == '\\' || (((prefs.logmask[0] >= 'A' && prefs.logmask[0] <= 'Z') || (prefs.logmask[0] >= 'a' && prefs.logmask[0] <= 'z')) && prefs.logmask[1] == ':')) + if (prefs.hex_irc_logmask[0] == '\\' || (((prefs.hex_irc_logmask[0] >= 'A' && prefs.hex_irc_logmask[0] <= 'Z') || (prefs.hex_irc_logmask[0] >= 'a' && prefs.hex_irc_logmask[0] <= 'z')) && prefs.hex_irc_logmask[1] == ':')) #else - if (prefs.logmask[0] == '/') + if (prefs.hex_irc_logmask[0] == '/') #endif { return 1; @@ -627,7 +627,7 @@ log_create_pathname (char *servname, char *channame, char *netname) channame = log_create_filename (channame); } - log_insert_vars (fname, sizeof (fname), prefs.logmask, channame, netname, servname); + log_insert_vars (fname, sizeof (fname), prefs.hex_irc_logmask, channame, netname, servname); free (channame); /* insert time/date */ @@ -712,7 +712,7 @@ log_open_or_close (session *sess) { if (sess->text_logging == SET_DEFAULT) { - if (prefs.logging) + if (prefs.hex_irc_logging) log_open (sess); else log_close (sess); @@ -776,7 +776,7 @@ log_write (session *sess, char *text) if (sess->text_logging == SET_DEFAULT) { - if (!prefs.logging) + if (!prefs.hex_irc_logging) return; } else @@ -2194,7 +2194,7 @@ text_emit (int index, session *sess, char *a, char *b, char *c, char *d) case XP_TE_PARTREASON: case XP_TE_QUIT: /* implement ConfMode / Hide Join and Part Messages */ - if (chanopt_is_set (prefs.confmode, sess->text_hidejoinpart)) + if (chanopt_is_set (prefs.hex_irc_conf_mode, sess->text_hidejoinpart)) return; break; diff --git a/src/common/xchat.h b/src/common/xchat.h index 33b7822d..e0ba1ff0 100644 --- a/src/common/xchat.h +++ b/src/common/xchat.h @@ -114,6 +114,19 @@ struct hexchatprefs char hex_dnsprogram[72]; char hex_gui_ulist_doubleclick[256]; char hex_input_command_char[4]; + char hex_irc_extra_hilight[300]; + char hex_irc_id_ntext[64]; + char hex_irc_id_ytext[64]; + char hex_irc_logmask[256]; + char hex_irc_nick1[NICKLEN]; + char hex_irc_nick2[NICKLEN]; + char hex_irc_nick3[NICKLEN]; + char hex_irc_nick_hilight[300]; + char hex_irc_no_hilight[300]; + char hex_irc_part_reason[256]; + char hex_irc_quit_reason[256]; + char hex_irc_real_name[127]; + char hex_irc_user_name[127]; int hex_away_size_max; int hex_away_timeout; @@ -162,6 +175,8 @@ struct hexchatprefs int hex_gui_win_top; int hex_gui_win_width; int hex_input_balloon_time; + int hex_irc_ban_type; + int hex_irc_join_delay; unsigned int hex_away_auto_unmark; unsigned int hex_away_omit_alerts; @@ -228,17 +243,21 @@ struct hexchatprefs unsigned int hex_input_tray_chans; unsigned int hex_input_tray_hilight; unsigned int hex_input_tray_priv; + unsigned int hex_irc_auto_rejoin; + unsigned int hex_irc_conf_mode; + unsigned int hex_irc_hide_version; + unsigned int hex_irc_invisible; + unsigned int hex_irc_logging; + unsigned int hex_irc_raw_modes; + unsigned int hex_irc_servernotice; + unsigned int hex_irc_skip_motd; + unsigned int hex_irc_wallops; + unsigned int hex_irc_who_join; + unsigned int hex_irc_whois_front; /* these are the legacy variables */ - char nick1[NICKLEN]; - char nick2[NICKLEN]; - char nick3[NICKLEN]; - char realname[127]; - char username[127]; - char quitreason[256]; - char partreason[256]; char font_normal[4 * FONTNAMELEN + 1]; char font_main[FONTNAMELEN + 1]; char font_alternative[3 * FONTNAMELEN + 1]; @@ -246,15 +265,9 @@ struct hexchatprefs char sounddir[PATHLEN + 1]; char soundcmd[PATHLEN + 1]; char background[PATHLEN + 1]; - char irc_extra_hilight[300]; - char irc_no_hilight[300]; - char irc_nick_hilight[300]; char hostname[127]; - char logmask[256]; char stamp_format[64]; char timestamp_log_format[64]; - char irc_id_ytext[64]; - char irc_id_ntext[64]; char proxy_host[64]; int proxy_port; @@ -272,17 +285,11 @@ struct hexchatprefs int max_lines; int notify_timeout; int recon_delay; - int bantype; guint32 local_ip; guint32 dcc_ip; unsigned int autoreconnect; unsigned int autoreconnectonfail; - unsigned int invisible; - unsigned int servernotice; - unsigned int wallops; - unsigned int skipmotd; - unsigned int autorejoin; unsigned int autocopy_text; unsigned int autocopy_stamp; unsigned int autocopy_color; @@ -293,14 +300,9 @@ struct hexchatprefs unsigned int text_stripcolor_topic; unsigned int timestamp; - unsigned int irc_join_delay; - unsigned int logging; unsigned int timestamp_logs; unsigned int newtabstofront; unsigned int hidever; - unsigned int raw_modes; - unsigned int userhost; - unsigned int irc_whois_front; unsigned int indent_nicks; unsigned int text_replay; unsigned int show_marker; @@ -313,7 +315,6 @@ struct hexchatprefs unsigned int pingtimeout; unsigned int whois_on_notifyonline; unsigned int wait_on_exit; - unsigned int confmode; unsigned int utf8_locale; unsigned int url_grabber; diff --git a/src/fe-gtk/maingui.c b/src/fe-gtk/maingui.c index 325224e5..50b94676 100644 --- a/src/fe-gtk/maingui.c +++ b/src/fe-gtk/maingui.c @@ -1580,10 +1580,10 @@ mg_create_perchannelmenu (session *sess, GtkWidget *menu) submenu = menu_quick_sub (_("_Settings"), menu, NULL, XCMENU_MNEMONIC, -1); - mg_perchan_menu_item (_("_Log to Disk"), submenu, &sess->text_logging, prefs.logging); + mg_perchan_menu_item (_("_Log to Disk"), submenu, &sess->text_logging, prefs.hex_irc_logging); mg_perchan_menu_item (_("_Reload Scrollback"), submenu, &sess->text_scrollback, prefs.text_replay); if (sess->type == SESS_CHANNEL) - mg_perchan_menu_item (_("_Hide Join/Part Messages"), submenu, &sess->text_hidejoinpart, prefs.confmode); + mg_perchan_menu_item (_("_Hide Join/Part Messages"), submenu, &sess->text_hidejoinpart, prefs.hex_irc_conf_mode); } static void diff --git a/src/fe-gtk/plugin-tray.c b/src/fe-gtk/plugin-tray.c index 27d78e31..922515fe 100644 --- a/src/fe-gtk/plugin-tray.c +++ b/src/fe-gtk/plugin-tray.c @@ -629,7 +629,7 @@ tray_priv (char *from, char *text) { const char *network; - if (alert_match_word (from, prefs.irc_no_hilight)) + if (alert_match_word (from, prefs.hex_irc_no_hilight)) return; tray_set_flash (ICON_MSG); diff --git a/src/fe-gtk/servlistgui.c b/src/fe-gtk/servlistgui.c index 95c15785..c0c504f6 100644 --- a/src/fe-gtk/servlistgui.c +++ b/src/fe-gtk/servlistgui.c @@ -654,14 +654,14 @@ servlist_savegui (void) /* if (GTK_ENTRY (entry_greal)->text[0] == 0) return 1; */ - strcpy (prefs.nick1, GTK_ENTRY (entry_nick1)->text); - strcpy (prefs.nick2, GTK_ENTRY (entry_nick2)->text); - strcpy (prefs.nick3, GTK_ENTRY (entry_nick3)->text); - strcpy (prefs.username, GTK_ENTRY (entry_guser)->text); - sp = strchr (prefs.username, ' '); + strcpy (prefs.hex_irc_nick1, GTK_ENTRY (entry_nick1)->text); + strcpy (prefs.hex_irc_nick2, GTK_ENTRY (entry_nick2)->text); + strcpy (prefs.hex_irc_nick3, GTK_ENTRY (entry_nick3)->text); + strcpy (prefs.hex_irc_user_name, GTK_ENTRY (entry_guser)->text); + sp = strchr (prefs.hex_irc_user_name, ' '); if (sp) sp[0] = 0; /* spaces will break the login */ - /* strcpy (prefs.realname, GTK_ENTRY (entry_greal)->text); */ + /* strcpy (prefs.hex_irc_real_name, GTK_ENTRY (entry_greal)->text); */ servlist_save (); return 0; @@ -1713,35 +1713,35 @@ servlist_open_networks (void) gtk_misc_set_alignment (GTK_MISC (label7), 0, 0.5);*/ entry_nick1 = entry1 = gtk_entry_new (); - gtk_entry_set_text (GTK_ENTRY (entry1), prefs.nick1); + gtk_entry_set_text (GTK_ENTRY (entry1), prefs.hex_irc_nick1); gtk_widget_show (entry1); gtk_table_attach (GTK_TABLE (table1), entry1, 1, 2, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); entry_nick2 = entry2 = gtk_entry_new (); - gtk_entry_set_text (GTK_ENTRY (entry2), prefs.nick2); + gtk_entry_set_text (GTK_ENTRY (entry2), prefs.hex_irc_nick2); gtk_widget_show (entry2); gtk_table_attach (GTK_TABLE (table1), entry2, 1, 2, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); entry_nick3 = entry3 = gtk_entry_new (); - gtk_entry_set_text (GTK_ENTRY (entry3), prefs.nick3); + gtk_entry_set_text (GTK_ENTRY (entry3), prefs.hex_irc_nick3); gtk_widget_show (entry3); gtk_table_attach (GTK_TABLE (table1), entry3, 1, 2, 2, 3, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); entry_guser = entry4 = gtk_entry_new (); - gtk_entry_set_text (GTK_ENTRY (entry4), prefs.username); + gtk_entry_set_text (GTK_ENTRY (entry4), prefs.hex_irc_user_name); gtk_widget_show (entry4); gtk_table_attach (GTK_TABLE (table1), entry4, 1, 2, 3, 4, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); /* entry_greal = entry5 = gtk_entry_new (); - gtk_entry_set_text (GTK_ENTRY (entry5), prefs.realname); + gtk_entry_set_text (GTK_ENTRY (entry5), prefs.hex_irc_real_name); gtk_widget_show (entry5); gtk_table_attach (GTK_TABLE (table1), entry5, 1, 2, 4, 5, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), diff --git a/src/fe-gtk/setup.c b/src/fe-gtk/setup.c index 89ed7088..2598a3a3 100644 --- a/src/fe-gtk/setup.c +++ b/src/fe-gtk/setup.c @@ -437,9 +437,9 @@ static const setting alert_settings[] = {ST_HEADER, N_("Highlighted Messages"),0,0,0}, {ST_LABEL, N_("Highlighted messages are ones where your nickname is mentioned, but also:"), 0, 0, 0, 1}, - {ST_ENTRY, N_("Extra words to highlight:"), P_OFFSETNL(irc_extra_hilight), 0, 0, sizeof prefs.irc_extra_hilight}, - {ST_ENTRY, N_("Nick names not to highlight:"), P_OFFSETNL(irc_no_hilight), 0, 0, sizeof prefs.irc_no_hilight}, - {ST_ENTRY, N_("Nick names to always highlight:"), P_OFFSETNL(irc_nick_hilight), 0, 0, sizeof prefs.irc_nick_hilight}, + {ST_ENTRY, N_("Extra words to highlight:"), P_OFFSETNL(hex_irc_extra_hilight), 0, 0, sizeof prefs.hex_irc_extra_hilight}, + {ST_ENTRY, N_("Nick names not to highlight:"), P_OFFSETNL(hex_irc_no_hilight), 0, 0, sizeof prefs.hex_irc_no_hilight}, + {ST_ENTRY, N_("Nick names to always highlight:"), P_OFFSETNL(hex_irc_nick_hilight), 0, 0, sizeof prefs.hex_irc_nick_hilight}, {ST_LABEL, N_("Separate multiple words with commas.\nWildcards are accepted.")}, {ST_END, 0, 0, 0, 0, 0} @@ -458,9 +458,9 @@ static const setting alert_settings_hextray[] = {ST_HEADER, N_("Highlighted Messages"),0,0,0}, {ST_LABEL, N_("Highlighted messages are ones where your nickname is mentioned, but also:"), 0, 0, 0, 1}, - {ST_ENTRY, N_("Extra words to highlight:"), P_OFFSETNL(irc_extra_hilight), 0, 0, sizeof prefs.irc_extra_hilight}, - {ST_ENTRY, N_("Nick names not to highlight:"), P_OFFSETNL(irc_no_hilight), 0, 0, sizeof prefs.irc_no_hilight}, - {ST_ENTRY, N_("Nick names to always highlight:"), P_OFFSETNL(irc_nick_hilight), 0, 0, sizeof prefs.irc_nick_hilight}, + {ST_ENTRY, N_("Extra words to highlight:"), P_OFFSETNL(hex_irc_extra_hilight), 0, 0, sizeof prefs.hex_irc_extra_hilight}, + {ST_ENTRY, N_("Nick names not to highlight:"), P_OFFSETNL(hex_irc_no_hilight), 0, 0, sizeof prefs.hex_irc_no_hilight}, + {ST_ENTRY, N_("Nick names to always highlight:"), P_OFFSETNL(hex_irc_nick_hilight), 0, 0, sizeof prefs.hex_irc_nick_hilight}, {ST_LABEL, N_("Separate multiple words with commas.\nWildcards are accepted.")}, {ST_END, 0, 0, 0, 0, 0} @@ -469,8 +469,8 @@ static const setting alert_settings_hextray[] = static const setting general_settings[] = { {ST_HEADER, N_("Default Messages"),0,0,0}, - {ST_ENTRY, N_("Quit:"), P_OFFSETNL(quitreason), 0, 0, sizeof prefs.quitreason}, - {ST_ENTRY, N_("Leave channel:"), P_OFFSETNL(partreason), 0, 0, sizeof prefs.partreason}, + {ST_ENTRY, N_("Quit:"), P_OFFSETNL(hex_irc_quit_reason), 0, 0, sizeof prefs.hex_irc_quit_reason}, + {ST_ENTRY, N_("Leave channel:"), P_OFFSETNL(hex_irc_part_reason), 0, 0, sizeof prefs.hex_irc_part_reason}, {ST_ENTRY, N_("Away:"), P_OFFSETNL(hex_away_reason), 0, 0, sizeof prefs.hex_away_reason}, {ST_HEADER, N_("Away"),0,0,0}, @@ -489,9 +489,9 @@ static const setting advanced_settings[] = {ST_ENTRY, N_("Alternative fonts:"), P_OFFSETNL(font_alternative), "Separate multiple entries with commas without spaces before or after.", 0, sizeof prefs.font_alternative}, #endif {ST_NUMBER, N_("Auto reconnect delay:"), P_OFFINTNL(recon_delay), 0, 0, 9999}, - {ST_TOGGLE, N_("Display MODEs in raw form"), P_OFFINTNL(raw_modes), 0, 0, 0}, + {ST_TOGGLE, N_("Display MODEs in raw form"), P_OFFINTNL(hex_irc_raw_modes), 0, 0, 0}, {ST_TOGGLE, N_("Whois on notify"), P_OFFINTNL(whois_on_notifyonline), N_("Sends a /WHOIS when a user comes online in your notify list"), 0, 0}, - {ST_TOGGLE, N_("Hide join and part messages"), P_OFFINTNL(confmode), N_("Hide channel join/part messages by default"), 0, 0}, + {ST_TOGGLE, N_("Hide join and part messages"), P_OFFINTNL(hex_irc_conf_mode), N_("Hide channel join/part messages by default"), 0, 0}, {ST_HEADER, N_("Auto Open DCC Windows"),0,0,0}, {ST_TOGGLE, N_("Send window"), P_OFFINTNL(hex_gui_autoopen_send), 0, 0, 0}, {ST_TOGGLE, N_("Receive window"), P_OFFINTNL(hex_gui_autoopen_recv), 0, 0, 0}, @@ -518,9 +518,9 @@ static const setting advanced_settings_oneinstance[] = {ST_HEADER, N_("Advanced Settings"),0,0,0}, {ST_ENTRY, N_("Alternative fonts:"), P_OFFSETNL(font_alternative), "Separate multiple entries with commas without spaces before or after.", 0, sizeof prefs.font_alternative}, {ST_NUMBER, N_("Auto reconnect delay:"), P_OFFINTNL(recon_delay), 0, 0, 9999}, - {ST_TOGGLE, N_("Display MODEs in raw form"), P_OFFINTNL(raw_modes), 0, 0, 0}, + {ST_TOGGLE, N_("Display MODEs in raw form"), P_OFFINTNL(hex_irc_raw_modes), 0, 0, 0}, {ST_TOGGLE, N_("Whois on notify"), P_OFFINTNL(whois_on_notifyonline), N_("Sends a /WHOIS when a user comes online in your notify list"), 0, 0}, - {ST_TOGGLE, N_("Hide join and part messages"), P_OFFINTNL(confmode), N_("Hide channel join/part messages by default"), 0, 0}, + {ST_TOGGLE, N_("Hide join and part messages"), P_OFFINTNL(hex_irc_conf_mode), N_("Hide channel join/part messages by default"), 0, 0}, {ST_TOGGLE, N_("Allow only one instance of HexChat to run"), P_OFFINTNL(hex_gui_single), 0, 0, 0}, {ST_HEADER, N_("Auto Open DCC Windows"),0,0,0}, {ST_TOGGLE, N_("Send window"), P_OFFINTNL(hex_gui_autoopen_send), 0, 0, 0}, @@ -550,8 +550,8 @@ static const setting logging_settings[] = #if 0 /* Now it's done under Colors */ {ST_TOGGLE, N_("Strip colors when displaying scrollback"), P_OFFINTNL(text_stripcolor_replay), 0, 0, 0}, #endif - {ST_TOGGLE, N_("Enable logging of conversations to disk"), P_OFFINTNL(logging), 0, 0, 2}, - {ST_ENTRY, N_("Log filename:"), P_OFFSETNL(logmask), 0, 0, sizeof prefs.logmask}, + {ST_TOGGLE, N_("Enable logging of conversations to disk"), P_OFFINTNL(hex_irc_logging), 0, 0, 2}, + {ST_ENTRY, N_("Log filename:"), P_OFFSETNL(hex_irc_logmask), 0, 0, sizeof prefs.hex_irc_logmask}, {ST_LABEL, N_("%s=Server %c=Channel %n=Network.")}, {ST_HEADER, N_("Time Stamps"),0,0,0}, @@ -1328,9 +1328,9 @@ setup_create_page (const setting *set) if (set == general_settings) { setup_create_id_menu (tab, _("Mark identified users with:"), - row, setup_prefs.irc_id_ytext); + row, setup_prefs.hex_irc_id_ytext); setup_create_id_menu (tab, _("Mark not-identified users with:"), - row + 1, setup_prefs.irc_id_ntext); + row + 1, setup_prefs.hex_irc_id_ntext); } #endif |