Commit Graph

18 Commits

Author SHA1 Message Date
Kevin Easton
a220b8aa7f Rename VIF_BITCHX to VF_BITCHX
This flag is part of ->flags, not ->int_flags, so name it appropriately.
2017-10-26 17:41:05 +11:00
Kevin Easton
571aafcb45 Add helper function save_vars_by_flags() for saving variables
The majority of save_variables() and savebitchx_variables() were common code, so pull it
out into a helper function.
2017-10-26 17:36:28 +11:00
Kevin Easton
dc30b852e1 Add VF_NO_SAVE flag to mark variables that shouldn't be saved
This replaces an explicit test for the variable names "DISPLAY" and "CLIENT_INFORMATION".
2017-10-26 16:15:59 +11:00
Kevin Easton
796eef3f99 Removed unused VF_NODAEMON flag
No code ever tests for this flag, so just remove it.
2017-10-26 15:56:31 +11:00
Kevin Easton
46047b058c Remove unused function clear_sets() 2017-10-25 17:00:48 +11:00
Kevin Easton
481970b30d Use correct type for ircii_rem_str() 2017-10-25 16:59:18 +11:00
gdinit
bac141898b Correct spelling of some client messages, comments and function names 2017-10-20 14:57:17 +11:00
Kevin Easton
3c2028e167 Rename crypt_msg() / decrypt_msg() to sed_encrypt_msg() / sed_decrypt_msg() and move to ctcp.c
These functions are really specific to parsing and creating CTCP SED messages, which means they belong
in ctcp.c with the other CTCP code.

Also remove unnecessary inclusions of encrypt.h and ctcp.h.
2017-06-28 22:26:08 +10:00
Kevin Easton
88f93c1de3 Only include color.h in source files that require it
Remove the inclusion of color.h from config.h, which is included by every file via irc.h, and instead
include it only in debug.c, fset.c and vars.c which are the only files that use it.

This minimises the number of files that need to be rebuilt when changing default format strings.
2017-06-27 18:22:45 +10:00
Kevin Easton
686344314f Unsetting CMDCHARS sets it back to the default
Previously you could unset CMDCHARS and the effect would be to treat it like it was set to DEFAULT_CMDCHARS,
except that some code was missing the fallback (eg. ignore_last_nick()) which would make it crash.

Instead of having the fallback everywhere, just make it so that you can't unset the variable - if you try, it
sets it to DEFAULT_CMDCHARS.  This reflects what the behaviour has always been, it just makes it explicit to
the user and the bonus is we don't have the test it for NULL everywhere.
2017-02-16 23:42:52 +11:00
Kevin Easton
1883e2c0c3 Minor fix to /STACK to make it match /SET behaviour
Previously /STACK would not accept just the initial part of a /SET name
even if it wasn't ambiguous.  Now it uses the same matching behaviour
as /SET.

This also removes an unused variable in do_stack_set().
2015-06-12 16:57:19 +10:00
Kevin Easton
6dbc712046 Rework and improve the scheduling of the server lag check
Previously the server lag check was run by update_clock() if the number of
seconds since client startup was a multiple of 20 (unless it had already been
done this second).  This meant that if update_clock() was not being called
frequently (eg. if your IRC connection was very quiet), it might go a long
time between lag checks.

This commit adds a /set LAG_CHECK_INTERVAL (defaulting to 30).  For each
server, a lag check ping is scheduled for every LAG_CHECK_INTERVAL seconds
after the connection is finalised/registered.  Setting this value to 0
disables the lag check pings entirely.

The old code set the lag to 'unknown' immediately after sending out a ping,
which meant that it was quite unpredictable how long the lag value would
stay around for.  The new code only sets this once the current lag value
has become stale (ie. a ping reply is overdue based on the current lag
value).  If your lag is staying the same or reducing, you shouldn't see
the [Lag ??] at all.
2015-06-12 15:54:43 +10:00
Kevin Easton
8cdc62ae0d Wire up /SET DOUBLE_STATUS_LINES so it actually does something
The DOUBLE_STATUS_LINES /SET has existed for a long while, but setting it has
never actually had an effect.  This change causes it to affect the
/window double setting of new windows: 0 means new windows are created without
double status lines, 1 means only the first window is created with double
status lines and subsequent windows aren't (this is the default) and 2 means
that all windows are created with double status lines.

Note that setting this variable in your .ircrc can't actually affect the first
window, because that's created before the .ircrc is loaded.  The compiled-in
default value (DEFAULT_DOUBLE_STATUS_LINES in config.h) is the only thing that
can affect the first window.

Reported by presi.
2015-06-03 23:16:57 +10:00
Tim Cava
2caa8a2637 Use strlcpy, rather than strmcpy, in set_realname().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@344 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-17 05:42:09 +00:00
Kevin Easton
ceb0492734 Cleanup save_formats() by removing unused function argument.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@238 13b04d17-f746-0410-82c6-800466cd88b0
2013-06-16 12:21:03 +00:00
Kevin Easton
97174632dc Add explicit default value for NICK_COMPLETION_CHAR.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@160 13b04d17-f746-0410-82c6-800466cd88b0
2012-03-06 11:14:51 +00:00
Kevin Easton
533c3dbcbf Turn on SVN keyword replacement for $Date$, $Author$, $Revision$, $Id$ for all
*.c and *.h files.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/branches/ircii-pana-1.1@3 13b04d17-f746-0410-82c6-800466cd88b0
2008-02-25 09:49:14 +00:00
Kevin Easton
28febcfea9 Initial import of the ircii-pana-1.1-final source tree.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/tags/ircii-pana-1.1-final@1 13b04d17-f746-0410-82c6-800466cd88b0
2008-02-25 09:25:32 +00:00