CVS log for epic4/source/server.c

Epicsol.org
(back) Up to [Epic CVS] / epic4 / source

Request diff between arbitrary revisions


Default branch: MAIN
Bookmark a link to: HEAD / (download)

Revision 1.114 / (view) - annotate - [select for diffs] , Sat Jun 17 03:11:18 2006 UTC (2 years, 1 month ago) by jnelson
Branch: MAIN
CVS Tags: epic4-2_8, epic4-2_6, epic4-2_10, HEAD
Changes since 1.113: +3 -2 lines
Diff to previous 1.113
Fix crash when doing /nick <unique id> on ircnet.

Revision 1.113 / (view) - annotate - [select for diffs] , Sat Jun 4 03:32:53 2005 UTC (3 years, 2 months ago) by jnelson
Branch: MAIN
CVS Tags: epic4-2_4
Changes since 1.112: +33 -8 lines
Diff to previous 1.112
* Fix error messages when you /exec -direct asdf, from epic5.
* Add more gracious support for unique id's and nickname 0, from epic5.

Revision 1.112 / (view) - annotate - [select for diffs] , Tue May 3 02:51:56 2005 UTC (3 years, 3 months ago) by jnelson
Branch: MAIN
Changes since 1.111: +8 -3 lines
Diff to previous 1.111
* Fix 'get_local_server_port', add $serverctl(GET * LOCALPORT). (fudd)

Revision 1.111 / (view) - annotate - [select for diffs] , Sat Aug 7 18:54:55 2004 UTC (4 years ago) by jnelson
Branch: MAIN
CVS Tags: epic4-2_2, epic4-2_1_3, epic4-2_1_2, epic4-2_1_1
Changes since 1.110: +2 -2 lines
Diff to previous 1.110
* Allow /userhost <uniqueid> for ircnet.
* Allow 'epic 0 <servername' for ircnet.

Revision 1.110 / (view) - annotate - [select for diffs] , Sat Aug 7 17:33:35 2004 UTC (4 years ago) by jnelson
Branch: MAIN
Changes since 1.109: +20 -8 lines
Diff to previous 1.109
* Implement "unique id" support for ircnet (042 numeric)
* You can /nick 0 or /nick <unique_id>
* You can use $servertctl([SET|GET] <refnum> UNIQUE_ID)

Revision 1.109 / (view) - annotate - [select for diffs] , Sat Jan 24 15:00:53 2004 UTC (4 years, 6 months ago) by crazyed
Branch: MAIN
CVS Tags: epic4-2_0, epic4-1_2_9, epic4-1_2_8
Changes since 1.108: +11 -7 lines
Diff to previous 1.108
* Patch from |Rain| which fixes the SSL bug he reported to the list.

Revision 1.108 / (view) - annotate - [select for diffs] , Fri Nov 21 05:57:38 2003 UTC (4 years, 8 months ago) by jnelson
Branch: MAIN
CVS Tags: epic4-1_2_7, epic4-1_2_6, epic4-1_2_5, epic4-1_2_4, epic4-1_2_3, epic4-1_2_2, epic4-1_2_1, epic4-1_2_0
Changes since 1.107: +4 -4 lines
Diff to previous 1.107
Changes agreed to in principle by: ce
* Make /server <host> honor server groups if can't connect to <host>
* Make reconnects use the server group of NEW server not OLD server.

Revision 1.107 / (view) - annotate - [select for diffs] , Fri Nov 21 04:38:40 2003 UTC (4 years, 8 months ago) by jnelson
Branch: MAIN
Changes since 1.106: +13 -3 lines
Diff to previous 1.106
Clean up after the server lists upon exit, for valgrind users.

Revision 1.106 / (view) - annotate - [select for diffs] , Sun Oct 19 20:38:59 2003 UTC (4 years, 9 months ago) by jnelson
Branch: MAIN
CVS Tags: epic4-1_1_17, epic4-1_1_16, epic4-1_1_15, epic4-1_1_14
Changes since 1.105: +2 -2 lines
Diff to previous 1.105
* Allow $serverctl(SET <refnum> UMODES)

Revision 1.105 / (view) - annotate - [select for diffs] , Thu Sep 25 02:33:11 2003 UTC (4 years, 10 months ago) by jnelson
Branch: MAIN
CVS Tags: epic4-1_1_13
Changes since 1.104: +8 -2 lines
Diff to previous 1.104
Fix panic caused by accidentally allowing the user to /server -delete all
their servers. (fix is to not allow them to delete the last server)

Revision 1.104 / (view) - annotate - [select for diffs] , Sun Aug 31 00:33:48 2003 UTC (4 years, 11 months ago) by jnelson
Branch: MAIN
Changes since 1.103: +2 -2 lines
Diff to previous 1.103
* Fix buffer overrun crash with CTCP UTC.

Revision 1.103 / (view) - annotate - [select for diffs] , Thu Jul 10 12:08:57 2003 UTC (5 years, 1 month ago) by jnelson
Branch: MAIN
Changes since 1.102: +6 -6 lines
Diff to previous 1.102
Overhaul of malloced string handling functions:
* Convert m_[s]c3cat[_s]() to malloc_strcat_wordlist_c()
* Nix m_e3cat(), m_s3cat(), m_s3cat_s(), m_3cat()
* Nix m_ec3cat(), m_sc3cat(), m_sc3cat_s(), m_c3cat().
* Convert m_dupchar() to malloc_dupchar().
* Convert m_strndup() to malloc_strndup().
* Make malloc_strcpy/malloc_strcat/malloc_strcat2/malloc_strcat_wordlist macros
* Convert m_2dup() to malloc_strdup2().
* Convert m_3cat() to malloc_strcat2[_c]().
* Convert m_3dup() to malloc_strdup3().
* Convert m_ec3cat() to malloc_strcat2_c()
* Use strlcat_c() in $repeat() instead of strlcpy(). whee!
* Sanity check first arg to $regcomp(), to avoid crashes.
* Don't pass NULL to bsearch(), even if 'nmem' is 0 [$remws()]
* Nix the original malloc_strcpy (supplanted by malloc_strcpy_c)
* Comment out all the deprecated functions

Revision 1.102 / (view) - annotate - [select for diffs] , Wed Jul 9 20:10:25 2003 UTC (5 years, 1 month ago) by jnelson
Branch: MAIN
Changes since 1.101: +6 -6 lines
Diff to previous 1.101
Convert m_strdup() to malloc_strdup().

Revision 1.101 / (view) - annotate - [select for diffs] , Mon Jun 30 21:42:19 2003 UTC (5 years, 1 month ago) by jnelson
Branch: MAIN
Changes since 1.100: +2 -2 lines
Diff to previous 1.100
Fix bug where /away <new reason> would not overwrite previous reason.
Reported by hsoc.

Revision 1.100 / (view) - annotate - [select for diffs] , Fri May 9 03:29:52 2003 UTC (5 years, 3 months ago) by jnelson
Branch: MAIN
CVS Tags: epic4-1_1_12
Changes since 1.99: +27 -23 lines
Diff to previous 1.99
* Rename 'dcc()' to 'dcc_cmd()' so we can use dcc as variable
* Garbage collect unused 'irc_path' global variable.
* Add --with-warns to configure to do FreeBSD "WARNS" like compiler checks
* Many hundreds of changes to improve the "quality of code" in epic, including:
* - Treat all literal strings as (const char *) and fix const correctness.
* - Mopping up all remaining const-correctness issues
* - Do not "launder" a (const char *) to a (char *) in string searches, (ala
    strchr) but rather return a ssize_t offset value.
* - Particular, MatchingBracket() returns (ssize_t) and not (char *).
* - Eliminate all "shadow" variable names by changing them to something else.
* - Eliminate most function decls that do not include a prototype list.
* - Add prototypes for all extern functions that are missing them.
* - Ensure most function pointers include a prototype list.
* - In term.c, most of those (char *)'s are really (const char *)'s.
* - Explicitly specify 'static' functions as 'static'
* - Ensure every function is either 'static' or has a prototype.
* - Eliminate (unsigned) < (signed) type comparisons.
* Hopefully you should not notice any changes!

Revision 1.99 / (view) - annotate - [select for diffs] , Thu May 1 11:04:23 2003 UTC (5 years, 3 months ago) by crazyed
Branch: MAIN
Changes since 1.98: +2 -2 lines
Diff to previous 1.98
These are relatively minor changes except for the $prefix() fix.

* commandqueues as per UPDATES.
* $prefix() fix and regression test as per KNOWNBUGS.
* /exec and nick rolling as per KNOWN bugs.

Revision 1.98 / (view) - annotate - [select for diffs] , Thu Apr 24 20:49:25 2003 UTC (5 years, 3 months ago) by jnelson
Branch: MAIN
Changes since 1.97: +20 -18 lines
Diff to previous 1.97
Nominally remove all uses of "unsafe" functions: (Commit 506)
* Convert all uses of strcpy() to strlcpy()
* Convert all uses of strcat() to strlcat()
* Convert all uses of strmcpy() to strlcpy()
* Convert all uses of strmcat() to strlcat()
* Convert all uses of sprintf() to snprintf()
* As much as possible, use 'sizeof var' in snprintf/strlcpy/strlcat.
* Qualify the size of some global vars so we can sizeof() them.
* Nuke strmcpy(), strmcat(), strmcat_ue(), strmccat(),
* Change strmopencat() to strlopencat().
* Change strmpcat() to strlpcat().
* Fix switch_hostname so it doesn't return a (const) string.
* Fix TimerTimeout so it doesn't return a (const) Timeval.
* Change things like (ret) to do ret while (0); for when "ret" is "{}".
* Fix initialization for load_level
* Stop passing in static strings into io(), so we can modify them.
* Make messages passed to io() more informative to the user.
* Fix CTCP FINGER handler not to assume (struct pw) strings can be overwritten.
* Use (socklen_t) and not an (int) for socket sizes.
* Don't return a value in a void function...
* Don't use return value of process_dcc_chat_ctcps() for assignment.
* Don't put semicolons after function bodies
* Fix $getopt() to save 'input_size' so we can use it with strl*().
* Convert all uses of stpcpy() to strlcat() and strlopencat().
* Nix checks for stpcpy() in configure -- regen configure.

Revision 1.97 / (view) - annotate - [select for diffs] , Sat Mar 29 08:10:22 2003 UTC (5 years, 4 months ago) by jnelson
Branch: MAIN
Changes since 1.96: +2 -1 lines
Diff to previous 1.96
* New /set, /SET SWITCH_CHANNELS_BETWEEN_WINDOWS
* C language issues (const correctness, integer size correctness)
* Revamp channel structure to hold window refnum and not window pointer
* Add "current channel counter" to channel structure.
* Determine "current channel" by election.
* Garbage collect a lot of now unnecessary code.
* Add get_echannel_by_refnum(), returns window's "elected" current channel
* Add internal function is_waiting_for_channel()
* Add internal function move_waiting_channel()
* Add internal function get_winref_by_bound_channel()
* Add internal function get_bound_channel_by_refnum()
* Convert uses of get_channel_by_refnum() to get_echannel_by_refnum()
* Fix $winbound() to work when given a window refnum
* Fix valgrind issue with $regcomp()
* Remove sanity checks from traverse_all_channels(); handled elsewhere now
* Change traverse_all_channels() with "this server" or "not this server" arg
* Nuke (Window *)->current_channel.  Handled by channels now.  HUZZAH!
* Implement /ON SWITCH_WINDOWS again.

Revision 1.73.2.3 / (view) - annotate - [select for diffs] , Wed Mar 26 09:20:46 2003 UTC (5 years, 4 months ago) by wd
Branch: wd-devel
Changes since 1.73.2.2: +2 -2 lines
Diff to previous 1.73.2.2 to branch point 1.73 to next main 1.74
Okay.  User input is now handled specially, and parse_command() will not
accept incomplete command names anymore.
-wd

Revision 1.73.2.2 / (view) - annotate - [select for diffs] , Mon Mar 24 17:53:02 2003 UTC (5 years, 4 months ago) by wd
Branch: wd-devel
Changes since 1.73.2.1: +24 -6 lines
Diff to previous 1.73.2.1 to branch point 1.73
Another merge.

Revision 1.96 / (view) - annotate - [select for diffs] , Mon Mar 24 09:20:29 2003 UTC (5 years, 4 months ago) by jnelson
Branch: MAIN
CVS Tags: epic4-1_1_11
Changes since 1.95: +2 -3 lines
Diff to previous 1.95
Whooo!  I'm on a roll!  Commit #487

* Add /timer -delete_for_window <winref> to delete window's timer.
* Enhance my_strerror() to take an EPIC Network Error and an errno.
* Enhance Getaddrinfo() to use AF_UNIX path as 'path' not 'host'.
* Confirmed that $match("\\[s s1 "s *"\\]" "s s") works like it should now.
* Store a "current window priority" number in each window.
* Add get_winref_by_servref() returns highest "priority" window for a server
* Have /defer track server, use server's "current window" (per above)
* I'd like to have other things use this, like maybe /xeval -s.

Revision 1.95 / (view) - annotate - [select for diffs] , Mon Mar 24 03:03:19 2003 UTC (5 years, 4 months ago) by jnelson
Branch: MAIN
Changes since 1.94: +11 -1 lines
Diff to previous 1.94
* Move add_user_who, add_user_end from parse.c to numbers.c
* Add (set|get)_server_max_cached_chan_size(), max chan size for u@h caching.
* Add $serverctl(SET|GET <refnum> MAXCACHESIZE), largest channel we do WHO for.
* Move 'whobase' call from /on join to /on 324.
* Don't call 'whobase' (userhost caching) if too many users on channel.

Revision 1.94 / (view) - annotate - [select for diffs] , Mon Mar 24 01:23:37 2003 UTC (5 years, 4 months ago) by jnelson
Branch: MAIN
Changes since 1.93: +8 -3 lines
Diff to previous 1.93
Fix various specious warnings from gcc, also, don't test for "sun_len"
in configure; use "sa_len" test for that.

Revision 1.93 / (view) - annotate - [select for diffs] , Sun Mar 23 02:48:33 2003 UTC (5 years, 4 months ago) by jnelson
Branch: MAIN
Changes since 1.92: +5 -2 lines
Diff to previous 1.92
* Reorganize param list to dgets() to include a length argument
* Add (set|get)_server_line_length(), the maximum size of an irc protocol line.
* Convert dgets() callers to the new calling style.

Revision 1.92 / (view) - annotate - [select for diffs] , Mon Mar 17 19:39:39 2003 UTC (5 years, 4 months ago) by crazyed
Branch: MAIN
Changes since 1.91: +2 -1 lines
Diff to previous 1.91
* $dccctl() changes as per UPDATES.
* Misc bug fixes as per KNOWNBUGS.

Revision 1.73.2.1 / (view) - annotate - [select for diffs] , Thu Feb 27 15:29:56 2003 UTC (5 years, 5 months ago) by wd
Branch: wd-devel
Changes since 1.73: +1043 -980 lines
Diff to previous 1.73
Yikes.  Merged to become consistent with HEAD.  Sorry for all the commits,
I'll be quiet again soon. :)
-wd

Revision 1.91 / (view) - annotate - [select for diffs] , Mon Feb 17 23:48:48 2003 UTC (5 years, 5 months ago) by crazyed
Branch: MAIN
Changes since 1.90: +7 -4 lines
Diff to previous 1.90
* "Word Philosophy" alterations, /alias leak, flood checking, $glob(),
  tabkey.ce, regression tests, autoget, /fe, /fec, safe_new_next_arg, as
  per KNOWNBUGS.
* $findws(), functions (script), ${i}finditems(), $dccctl(), as per
  UPDATES.

Revision 1.90 / (view) - annotate - [select for diffs] , Wed Feb 5 21:48:12 2003 UTC (5 years, 6 months ago) by crazyed
Branch: MAIN
Changes since 1.89: +4 -1 lines
Diff to previous 1.89
* New aliases for script/functions as per UPDATES.
* A tentative solution for the $glob() problem as per KNOWNBUGS.
* A leak fix for /list as per KNOWNBUGS.
* $timerctl() tuning as per UPDATES.

Revision 1.89 / (view) - annotate - [select for diffs] , Fri Jan 31 23:50:18 2003 UTC (5 years, 6 months ago) by jnelson
Branch: MAIN
Changes since 1.88: +14 -1 lines
Diff to previous 1.88
Commit 443
* Uniformly use 32 bit file sizes in dcc.  That's the way it has to be.
* Split process_incoming_chat into modular functions.  It's an experiment.
* Remove the old, #if 0'd dcc_getfile_resume.
* Remove the second, redundant warning from /window refnum(_or_swap).
* Make the ArgList portion of server messages const.  All const!  Huzzah!
* Roll /names, /list, and /mode numeric handlers into numbers.c
* Roll "funny" global variables into server-specific variables
* Nuke funny.c and funny.h -- huzzah!
* /on window_kill provides two args now, $0 is refnum, $1 is name/refnum.
* Rename "numeric_banner" to "banner"
* Rename "parse_notice" to "p_notice"
* In /xecho, rename 'banner' local var to 'want_banner'.
* Revamp p_notice to look like and act like p_privmsg as much as possible.
* Finish the rest of the larnifications.  Done with phase 1.  Huzzah!

Revision 1.88 / (view) - annotate - [select for diffs] , Fri Jan 31 09:43:36 2003 UTC (5 years, 6 months ago) by crazyed
Branch: MAIN
Changes since 1.87: +6 -6 lines
Diff to previous 1.87
* Whoops, two mistakes..  Forgot to swap $serverctl() UMODE and UMODES,
  and also forgot to commit it afterwards.  :-)

Revision 1.87 / (view) - annotate - [select for diffs] , Wed Jan 29 21:56:01 2003 UTC (5 years, 6 months ago) by crazyed
Branch: MAIN
Changes since 1.86: +68 -51 lines
Diff to previous 1.86
* Added Tyraks /stack patch as per KNOWNBUGS.
* $afterw(), $beforew(), $fromw(), $tow() as per UPDATES.  *potential bug*
* Regress tests as per KNOWNBUGS.
* ERROR hook fix as per KNOWNBUGS.
* autoget script as per KNOWNBUGS.
* $serverctl() as per UPDATES.
* $writeb() as per UPDATES.
* /sleep as per UPDATES.

Revision 1.86 / (view) - annotate - [select for diffs] , Wed Jan 29 06:31:27 2003 UTC (5 years, 6 months ago) by wd
Branch: MAIN
Changes since 1.85: +4 -4 lines
Diff to previous 1.85
Fixed a bug where epic would crash if you tried to connect to a non-ssl
server using ssl.
-wd

Revision 1.85 / (view) - annotate - [select for diffs] , Sun Jan 26 03:25:38 2003 UTC (5 years, 6 months ago) by jnelson
Branch: MAIN
Changes since 1.84: +55 -2 lines
Diff to previous 1.84
Commit 436
This commit is deceptive because it is huge in scope but can be explained
pretty simply.

* Const correctness improvements.
* Invert the meaning of 'new_check_flooding' to return TRUE if flooding.
* Revamp funny.c, /list, /names, /mode reply handling.
* Remove unused joined_nick, public_nick
* Change got_initial_version_28() arguments singly and not an array
* Change signature of protocol handling to take "command" as an argument
* The above change cascades to a lot of other changes.
* Allow the /msg'ing of @W<refnum> to msg a window's refnum.
* First round of larnification (Protection against unexpected server data)
* This involved substantial rewrites of parse.c, and numbers.c
* Now "fake" stuff goes through /on odd_server_stuff.
* Fix /on invite so it takes 3 arguments, not 2.

Revision 1.84 / (view) - annotate - [select for diffs] , Mon Jan 13 04:44:35 2003 UTC (5 years, 6 months ago) by jnelson
Branch: MAIN
Changes since 1.83: +2 -2 lines
Diff to previous 1.83
Commit #430
Fix bug when you're connected to two servers in two windows, each with
channels, and you /server from one over to the other.  The bug was a
panic caused by me changing a -2 into NOSERV instead of into a -3.  Doh.

Revision 1.83 / (view) - annotate - [select for diffs] , Thu Dec 26 16:40:31 2002 UTC (5 years, 7 months ago) by jnelson
Branch: MAIN
CVS Tags: epic4-1_1_10
Changes since 1.82: +4 -7 lines
Diff to previous 1.82
Fix all the rest of the compile issues. bleh.

Revision 1.82 / (view) - annotate - [select for diffs] , Wed Dec 25 06:26:45 2002 UTC (5 years, 7 months ago) by crazyed
Branch: MAIN
CVS Tags: epic4-1_1_9
Changes since 1.81: +11 -1 lines
Diff to previous 1.81
* Fixed a leak in /window channel.
* Fixed a couple of leaks in /server -d.
* Added $finditems() but it isn't finished yet, so it's #ifed out.

Revision 1.81 / (view) - annotate - [select for diffs] , Mon Dec 23 18:37:15 2002 UTC (5 years, 7 months ago) by jnelson
Branch: MAIN
CVS Tags: epic4-1_1_8
Changes since 1.80: +3 -3 lines
Diff to previous 1.80
* Fix minor bug with /xquote
* Fix minor bug with reconnecting after server write failed.
* Set input idle timer better.
* Rewrite /stack (push|pop) set so they actually work now.

Revision 1.80 / (view) - annotate - [select for diffs] , Mon Dec 23 15:11:27 2002 UTC (5 years, 7 months ago) by jnelson
Branch: MAIN
Changes since 1.79: +154 -119 lines
Diff to previous 1.79
* Remove colon at end of RETURN_MSTR so it is like others.
* Unify dgets() and SSL_dgets()
* Add a 4th argument to dgets(), an (SSL *) for ssl reads, NULL for normals
* Integrate SSL stuff more tightly by removing unecessary #ifdef's
* Change 'enable_ssl' to 'try_ssl' to avoid confusion with 'ssl_enabled'
* Remove uneccesary members of (Window)
* #include "functions.h" in any file implementing built in functions.
* panic if ssl op attempted on non-ssl connection.
* Don't call functions in RETURN_* macros. (they're evaled twice)
* Nuke #ifdef 0'd uses of 'ceiling_of_display'

Revision 1.79 / (view) - annotate - [select for diffs] , Thu Dec 19 16:37:55 2002 UTC (5 years, 7 months ago) by jnelson
Branch: MAIN
Changes since 1.78: +3 -4 lines
Diff to previous 1.78
Fix bugs with send_to_aserver().

Revision 1.78 / (view) - annotate - [select for diffs] , Thu Dec 19 15:18:08 2002 UTC (5 years, 7 months ago) by jnelson
Branch: MAIN
Changes since 1.77: +2 -2 lines
Diff to previous 1.77
Don't throw a random number into /ON SEND_TO_SERVER.

Revision 1.77 / (view) - annotate - [select for diffs] , Thu Dec 19 03:22:59 2002 UTC (5 years, 7 months ago) by jnelson
Branch: MAIN
Changes since 1.76: +768 -856 lines
Diff to previous 1.76
* Use server_list_size() and not number_of_servers outside of server.c
* Use NOSERV and not -1 for "no server"
* Use (Timeval) and not (struct timeval)
* Fix (get|set)_server_sent_*() et al to take server refnum.
* Use parse_server_index() and not my_atol() to parse server refnums
* re-indent quotecmd
* Rename is_server_connected() to is_server_registered
* Make /quote work as long as server is open (not registered)
* Use send_to_aserver() when it can avoid setting from_server unecessarily
* Change sent_to_server and clear_sent_to_server to (set|get)server_sent().
* Change doing_* to get_server_doing_*.
* Use (unsigned short) and not (u_short)
* Use (unsigned long) and not (u_long)
* Make output_reject_ctcp() take a refnum
* Lock a dcc while we are connecting it, just in case. ;-)
* Fix /dcc send -p <port>
* Store protocol enforcements as (get|set)_server_protocol_state().
* Use (Stat) and not (struct stat)
* Rewrite $timerctl() so it works like $logctl()
* Rename is_server_connected() to is_server_registered()
* Fix an off-by-one error with /FOR ... IN ...
* Keep track of both readable and writable fd's with newio stuff.
* Convert server_list to an array of pointers
* When user /server -delete's, leave a gap, don't change refnums around.
* Nix code that handles deleting server refnums.
* New function, new_open_for_writing(), for when we do nonblocking connects.
* Change new_open() to deregister fd as "writable"
* Renovate the notify stuff to take refnums and not just use from_server.
* Renovate /WHO, /ISON, /USERHOST to take refnums and not just use from_server.
* Make everything that uses server_list[] use get_server() instead.
* Make everything capable of dealing with "gaps" in server_list[].
* Use a bunch of macros, to handle with getting and setting server attrs.
* Make as much as possible use refnums as params and not from_server.
* And a lot of other stuff...

Revision 1.76 / (view) - annotate - [select for diffs] , Wed Dec 11 19:20:23 2002 UTC (5 years, 7 months ago) by crazyed
Branch: MAIN
Changes since 1.75: +25 -10 lines
Diff to previous 1.75
* Added functions $asciiq() $chrq() $exec() $timerctl() $tcl() $winline()
  and $floodinfo().
* Altered the two argument version of $read() to ctcp quote the strings it
  returns.
* Added sets FLOOD_RATE_PER and FLOOD_MASKUSER.
* Altered the "accept" mode of the dcc_raw and dcc_connect hooks to refer
  to the local port instead of the remote port.
* Added a "-closein %proc" switch to /exec.
* Altered the arg list mode of /alias to use extractw instead of next_arg.
* Added the documented "words" argument to the above.
* Tuned autoget, mudirc, tabkey.ce and commandqueues.
* Altered /pretend to not chop the string.
* Set about rewriting the flood detection and then decided that it's better
  off being a script.
* Moved the function macros to their own file (functions.h) and replaced
  all the copies that are strewn throughout the source with an #include.
  The exception is array.c which broke when I tried it.
* Moved the ctcp enquoting/dequoting functions to ircaux.c.
* Added some command/function ordering checks to funcs/regress, and a check
  for all the functions that are undocumented.
* Rewrote function chanmodetype() so that it doesn't have all those flakey
  buffering things.  Hopefully it's readable now.  The significant change
  is that if a mode character appears twice in CHANMODES, the first one is
  returned instead of the last.
* Added EPIC::call() in the perl routines and an equivalent under tcl.
  this is designed to call a $function() directly, but it isn't really that
  fast, so I might rip them out again.
* The /wait internals used to store a few other settings, which were taken
  out, so I put them back.
* Fixed a few problems with normalize_filename() around the place.
* Fixed a bug with /timer in which it would never show the timers after a
  callback.

Revision 1.75 / (view) - annotate - [select for diffs] , Mon Dec 2 01:01:59 2002 UTC (5 years, 8 months ago) by jnelson
Branch: MAIN
Changes since 1.74: +5 -1 lines
Diff to previous 1.74
* Fix /wait (server_hard_wait()) so it tracks/resets from_server (fb CE)
* Fix /timer so it tracks from_server properly (fb CE)

Revision 1.74 / (view) - annotate - [select for diffs] , Tue Nov 26 23:03:14 2002 UTC (5 years, 8 months ago) by jnelson
Branch: MAIN
Changes since 1.73: +3 -1 lines
Diff to previous 1.73
* Change do_input_timeouts() to a timer callback.
* Nuke the now unused global /wait stuff
* Revamp timer.c so you can add/change/delete/update timers during a timer
* Change add_timer() so it takes a winref not a window pointer.
* Make the "key timeout" thing happen on demand instead of a recurring timer
* Remove the recurring "key timeout" timer.
* Remove the 'key timeout' thing from io(), also 'first time' stuff.
* Call get_time() after select() in io().
* Fix two compile bugs found by larne.
* Fix bug when you did /flush on a /clear window.

Revision 1.73 / (view) - annotate - [select for diffs] , Fri Nov 8 23:36:13 2002 UTC (5 years, 9 months ago) by jnelson
Branch: MAIN
Branch point for: wd-devel
Changes since 1.72: +229 -1 lines
Diff to previous 1.72
Another round of epic5 changes...
* Make $B, $., $,, $:, $;, $I, /WAIT stuff server specific, from epic5
* Make tracking of doing_(privmsg|notice|ctcp) server specific, from epic5
* Fixes for Const Correctness.

Revision 1.72 / (view) - annotate - [select for diffs] , Thu Oct 24 21:28:07 2002 UTC (5 years, 9 months ago) by jnelson
Branch: MAIN
Changes since 1.71: +1 -17 lines
Diff to previous 1.71
* Remove /set suppress_server_motd which didn't really work anyways.
* Add function decls for bsd_arc4* to ircaux.c
* Always check (window->hold_mode || window->autohold) together!
* Unhold_window()s only if both hold_mode and autohold are off!
* unhold_window()s instead of doing scrollback_end for robustness.
* Attempt to recover from the "output is below bottom of window" bug, whine.

Revision 1.71 / (view) - annotate - [select for diffs] , Tue Oct 22 22:18:44 2002 UTC (5 years, 9 months ago) by jnelson
Branch: MAIN
Changes since 1.70: +4 -1 lines
Diff to previous 1.70
* Add checks/workaround for linux's broken realpath(). Bleh.
* Add arc4random stuff to compat.c -- will be used later!
* Fix $realpath() to use normalize_filename() so it gets realpath() fix.
* Add $serverctl(SET <refnum> PRIMARY) to set primary server.  User beware!

Revision 1.70 / (view) - annotate - [select for diffs] , Fri Oct 18 20:10:23 2002 UTC (5 years, 9 months ago) by jnelson
Branch: MAIN
Changes since 1.69: +26 -29 lines
Diff to previous 1.69
* Change expand_twiddle(), path_search() to take results as params, int retval
* Add normalize_filename(), to do job expand_twiddle() used to do.
* Add isdir(), just because
* Change /CD, /LOAD, /SAVE, /DCC SEND, /DCC GET, to use normalize_filename.
* Change /DCC RESUME, $open(), $which(), $unlink() to use normalize_filename.
* Change $rename(), $rmdir(), $fexist(), $fsize() to use normalize_filename.
* Change $glob(), $globi(), $mkdir(), $chmod() to use normalize_filename.
* Change $ftime(), $randread(), and uzfopen() to use normalize_filename.
* Change /LOG, /SET LOGFILE, servers file to use normalize_filename.
* Fix /LOG so maximum number of targets per log is a compile time #define.
* Revamp expand_twiddle() and uzfopen().
* Fix uzfopen() to look for 'bunzip2' in addition to 'bunzip'.
* Fix bug with /QUEUE -delete
* Remove unused variable in window_scroll().

Revision 1.69 / (view) - annotate - [select for diffs] , Thu Sep 26 21:41:43 2002 UTC (5 years, 10 months ago) by jnelson
Branch: MAIN
Changes since 1.68: +1 -3 lines
Diff to previous 1.68
Ach.  Here goes nothing.
Major commit which does many things, but the most prominent of which
is the final integration of the scrollback buffer with the hold buffer.
This fixes several annoying "features" and introduces a small truckload
of new features which have been requested recently.  Please see the
KNOWNBUGS or UPDATES file for more info, since I don't want this message
to be ridiculously long.

Revision 1.68 / (view) - annotate - [select for diffs] , Sun Sep 1 17:27:52 2002 UTC (5 years, 11 months ago) by jnelson
Branch: MAIN
Changes since 1.67: +3 -3 lines
Diff to previous 1.67
* Fix expand_twiddle to take a (const char *)
* Fix do_log and set_log_file to take a (const char *)
* Remove a couple of no-ops in keys.c
* Revamp do_log into two parts; open_log and close_log; do_log now a wrapper.
* Fix a string that had a newline in it. spotted by Szabolcs Rumi.

Revision 1.67 / (view) - annotate - [select for diffs] , Fri Aug 30 15:51:25 2002 UTC (5 years, 11 months ago) by crazyed
Branch: MAIN
Changes since 1.66: +1 -3 lines
Diff to previous 1.66
Cleaned up a few -Wall warnings.

Revision 1.66 / (view) - annotate - [select for diffs] , Fri Aug 9 14:10:16 2002 UTC (6 years ago) by jnelson
Branch: MAIN
CVS Tags: epic4-1_1_7, epic4-1_1_6
Changes since 1.65: +2 -2 lines
Diff to previous 1.65
Reword the /set dcc_use_gateway_addr warning to make it clear that
this warning is only for IPv4 addresses.

Revision 1.65 / (view) - annotate - [select for diffs] , Tue Aug 6 14:21:13 2002 UTC (6 years ago) by wd
Branch: MAIN
Changes since 1.64: +2 -2 lines
Diff to previous 1.64
Fix $ischannel() (actually, is_channel()) to return 0 if a NULL or
empty_string is passed.  Also fixed a typo inre serverctl comments.
-wd

Revision 1.64 / (view) - annotate - [select for diffs] , Tue Jul 30 15:12:59 2002 UTC (6 years ago) by crazyed
Branch: MAIN
Changes since 1.63: +15 -1 lines
Diff to previous 1.63
* Added support for CHANMODES, PREFIX and CHANTYPES in the processing of
  modes.  If the server doesn't support these, then hopefuly sane default
  strings are chosen, and these _don't_ include the wacky extensions that
  have been added over the years, so conceivably, this could break things
  like halfops and ban/invite exemptions.
* Stored the UMODES field from the 004 numeric in the server data.  Can be
  retrieved with $serverctl(get x umodes).
* Altered "/msg @$fd" so that $fd must be a number, otherwise, it will be
  treated as a privmsg.
* Added $xdebug() which returns all single bit flags with + or - added as
  appropriate.  /xdebug $xdebug() is a no-op.
* Fixed an /xdebug bug in which - would cause all subsequent flags to be
  switched off.  For bug compatibility, it still works this way, but you
  can specify + to turn all subsequent values on.
* Altered m_sc3cat_s() to call m_sc3cat rather than m_c3cat, which results
  in a cleaner string.  Examination of the uses of this function showed
  that they all dealt with this bug in some way.
* Altered $which() to call path_search() directly, rather than uzfopen().
  It may be useful to add a flag to path_search indicating which attributes
  we are searching for.  This could cause problems since the old method
  would skip over a file if it wasn't readable.
* Added clue variables for $unsplit().

Revision 1.63 / (view) - annotate - [select for diffs] , Sat Jul 27 04:16:29 2002 UTC (6 years ago) by wd
Branch: MAIN
Changes since 1.62: +3 -1 lines
Diff to previous 1.62
Updated comment field for serverctl()
-wd

Revision 1.62 / (view) - annotate - [select for diffs] , Wed Jul 17 21:52:53 2002 UTC (6 years ago) by jnelson
Branch: MAIN
Changes since 1.61: +31 -2 lines
Diff to previous 1.61
Update copyright notices and copyright dates.

Revision 1.61 / (view) - annotate - [select for diffs] , Mon Jul 15 17:11:22 2002 UTC (6 years ago) by crazyed
Branch: MAIN
Changes since 1.60: +89 -1 lines
Diff to previous 1.60
* Added 005 framework.  The internal interfaces to this are
  get_server_005() and set_server_005().  The scripting interface is
  $serverctl([gs]et [ref] 005 [set] [[value]]).  Unsetting is done by
  setting a null value, and $serverctl(..set..) will return 1 for set or
  0 for unset.  All values are reset upon successful reconnect.
* Altered $rand() to be more conservative when drawing on the random data
  source.  It should be faster for lower max-values now.
* Altered $splice() somehow.  I think it was for the clue variables.  It
  didn't improve the speed due to other problems, but it still works.

Revision 1.60 / (view) - annotate - [select for diffs] , Sun Jun 16 03:09:58 2002 UTC (6 years, 1 month ago) by jnelson
Branch: MAIN
Changes since 1.59: +2 -2 lines
Diff to previous 1.59
* Add Getnameinfo(), front end to getnameinfo() takes GNI_INTEGER for DCC use
* Fix inet_ntostr() to use Getnameinfo() instead of getnameinfo() directly.
* Fix inet_ntostr() to return int for success/failure, not hostname.
* Fix the DCC handshake generator to use inet_ntostr().
* Fix callers of inet_ntostr() to handle integer return values.

Revision 1.59 / (view) - annotate - [select for diffs] , Thu Jun 6 12:13:43 2002 UTC (6 years, 2 months ago) by jnelson
Branch: MAIN
Changes since 1.58: +11 -5 lines
Diff to previous 1.58
* Allow $listen() to take a family argument, like $connect().
* Add some V6 macros in ircaux.h, modeled after V4 macros.
* Add a "family" member to the dcc structure.  Default to AF_INET for now.
* Start fetching ports by calling inet_ntostr() instead of peeking directly
  -- into the sockaddr.  This yields protocol independance.
* Fix bug where $listen() or /dcc send w/o a virtual host caused NULL deref.

Revision 1.58 / (view) - annotate - [select for diffs] , Mon Jun 3 03:35:14 2002 UTC (6 years, 2 months ago) by jnelson
Branch: MAIN
Changes since 1.57: +2 -2 lines
Diff to previous 1.57
Due to the way the new attribute parser works, mangle_line needs a destination
buffer that is at least eleven times as large as the original string.  Change
all uses of mangle_line to pass in 11 times as much as necessary.  This avoids
uneccesary truncation of input lines with excessive attribute changes in them.

Revision 1.57 / (view) - annotate - [select for diffs] , Wed May 29 23:01:23 2002 UTC (6 years, 2 months ago) by jnelson
Branch: MAIN
Changes since 1.56: +1 -1 lines
Diff to previous 1.56
Technically speaking, a zero-length format is considered bad style, but not
illegal.  Anyhow, printf() in an empty_string to satisfy pedantry.

Revision 1.56 / (view) - annotate - [select for diffs] , Wed May 29 03:15:32 2002 UTC (6 years, 2 months ago) by crazyed
Branch: MAIN
Changes since 1.55: +28 -16 lines
Diff to previous 1.55
* Fix for an SSL problem where SSL fails to negotiate.  It will bail to
  non-encrytion in this case now.
* Fix for splitw() which is used by $uniq() and other functions where some
  of the elements could be null pointers due to its use of new_next arg.
  This would cause qsort() to coredump.  Switched to safe_new_next_arg
  which seems to have a performance penalty of about 4%.
* Added an "OTHER" flag to $stripcrap() and the mangle settings, which
  catches all characters that other flags don't.  It isn't included in
  the ALL flag.

Revision 1.55 / (view) - annotate - [select for diffs] , Mon May 27 15:21:28 2002 UTC (6 years, 2 months ago) by jnelson
Branch: MAIN
Changes since 1.54: +10 -7 lines
Diff to previous 1.54
* Fix parse_server_info() to properly handle ipv6 p-addrs
* Add support for [<ipv6 p-addr>] to parse_server_info().
* Fix an off-by-one error in Getaddrinfo.  Bleh.
* Fix a malloc() size mistake in Getaddrinfo.

Revision 1.54 / (view) - annotate - [select for diffs] , Mon May 27 14:46:19 2002 UTC (6 years, 2 months ago) by jnelson
Branch: MAIN
Changes since 1.53: +9 -0 lines
Diff to previous 1.53
Try to support [<ipv6 p-addr>] for rain in /server.

Revision 1.53 / (view) - annotate - [select for diffs] , Mon May 27 14:13:00 2002 UTC (6 years, 2 months ago) by jnelson
Branch: MAIN
Changes since 1.52: +1 -1 lines
Diff to previous 1.52
Fix some function names that I didn't like after sleeping on them.
Add extra argument to inet_ntostr() which is passed to getaddrinfo().

Revision 1.52 / (view) - annotate - [select for diffs] , Mon May 27 01:43:35 2002 UTC (6 years, 2 months ago) by jnelson
Branch: MAIN
Changes since 1.51: +2 -2 lines
Diff to previous 1.51
Huge major commit #1 in the great IPv6 support addition...
Rather than include all of the changes here, read KNOWNBUGS changes.

Revision 1.51 / (view) - annotate - [select for diffs] , Thu May 23 02:35:17 2002 UTC (6 years, 2 months ago) by jnelson
Branch: MAIN
Changes since 1.50: +2 -2 lines
Diff to previous 1.50
No functional changes, just removal of unecessary whitespace at the end
of lines.  From adm.

Revision 1.50 / (view) - annotate - [select for diffs] , Fri May 17 17:10:25 2002 UTC (6 years, 2 months ago) by crazyed
Branch: MAIN
CVS Tags: epic4-1_1_5, epic4-1_1_4
Changes since 1.49: +1 -1 lines
Diff to previous 1.49
* Applied patch from Kurt Roeckx which does better SSL detection.

* New /fe and /fec functionality which allows it to work much like perls
  map command.  The form is "fe var tmpvar ... {code}".

  The difference between it and the "fe (list) tmpvar {code}" form is                                                                 that the value of var is taken for the list, and more importantly, the                                                              value of tmpvar is retrieved after each iteration and string appended to
  a new value for var. This is subject to the following caveats:

    * The new value of var is written back only after the fe/fec exits.
    * /break will cut the variable short _after_ the current value.

  This was designed at least in part to make it possible for scripts to
  make use of the extended strcat functionality and indeed, this works in
  linear time which makes it useful for very large strings/values.

* Fixed the default bailout return value in get_server_port() to return
  the value from server_list.

Revision 1.49 / (view) - annotate - [select for diffs] , Thu May 9 05:48:53 2002 UTC (6 years, 3 months ago) by jnelson
Branch: MAIN
Changes since 1.48: +4 -4 lines
Diff to previous 1.48
Functionally complete the protocol independance of DCC.
There are no more ISA's in server code or dcc.
To phrase that differently, every IPv4 assumption in the server code or
dcc has been identified and conditionalized.  Adding support for ipv6 is
now simply a matter of adding the conditionals to make it happen.

Now we need to test what we have here and see how badly i've broken things.

The only remaining IPv4 customers are /WINDOW CREATE (which is likely to
stay ipv4 only for the time being) and $iptolong() and $longtoip() which
clearly are IPv4 only concepts.

Revision 1.48 / (view) - annotate - [select for diffs] , Thu May 9 04:50:07 2002 UTC (6 years, 3 months ago) by jnelson
Branch: MAIN
Changes since 1.47: +14 -6 lines
Diff to previous 1.47
Move the transition macros into ircaux.h.  Migrate the server over into
protocol independance.  That was pretty painless.

If you're reading this with rapt attention, please understand that
'protocol independance' does not mean "multi-protocol support".  What
it means is that instead of using (struct sockaddr_in)s, we're using
(struct sockaddr_storage)s, and we conditionalize all IPv4 specific code
to work only on (struct sockaddr_storage)s whose family has been set to
AF_INET (ipv4).  Once total protocol independance has been acheived,
adding support for IPv6 will be a matter of adding conditionals to handle
it in the same manner IPv4 is already supported.

So the current project i'm working on is the protocol independance of
epic.  Multi-protocol support comes later.

Revision 1.47 / (view) - annotate - [select for diffs] , Tue May 7 14:07:26 2002 UTC (6 years, 3 months ago) by jnelson
Branch: MAIN
Changes since 1.46: +10 -21 lines
Diff to previous 1.46
Nuke "local_addr" in server struct in favor of "local_sockname"
Convert server to use "connectory"
Convert wserv to use "connectory"
Nuke connect_by_number()
Reorder functions in network.c

Revision 1.46 / (view) - annotate - [select for diffs] , Mon May 6 23:21:13 2002 UTC (6 years, 3 months ago) by jnelson
Branch: MAIN
Changes since 1.45: +1 -1 lines
Diff to previous 1.45
Fixes inspired by first wave of testers
1) Fix casts to inet_anytop()
2) Fix configure to check for socklen_t, default to 'int'.

Revision 1.45 / (view) - annotate - [select for diffs] , Mon May 6 23:05:45 2002 UTC (6 years, 3 months ago) by jnelson
Branch: MAIN
Changes since 1.44: +5 -5 lines
Diff to previous 1.44
This is a huge monster commit -- I put the particulars of the commit in
KNOWNBUGS.  I will only say here that this fixes a lot of issues with
DCC and introduces a lot of protocol independance into the networking API
that epic works with.  Good things will continue to come in the future!

Revision 1.44 / (view) - annotate - [select for diffs] , Mon Apr 29 01:18:21 2002 UTC (6 years, 3 months ago) by jnelson
Branch: MAIN
Changes since 1.43: +4 -4 lines
Diff to previous 1.43
The last round of changes for tonight.  More of the same...
I promise!  I'll document the user visible parts of this soon!
Really! =)  I mean it!

Revision 1.43 / (view) - annotate - [select for diffs] , Mon Apr 29 00:57:41 2002 UTC (6 years, 3 months ago) by jnelson
Branch: MAIN
Changes since 1.42: +1 -1 lines
Diff to previous 1.42
Milestone #2!
EPIC now does non-blocking connects (sort of).  But you are not given
the opportunity to "do what you want" during the non-blocking connect.
EPIC sits in a select() call until the connect() succeeds or fails.  But
you can hit ^C and reliably cancel the connection-in-progress.  This is
an improvement because we don't have to hack up connect timeouts using
alarm() any more.

Also...
-- Output an error/warning message if you try to create a unix domain
   socket and your system doesn't have UDS's.
-- Change /set max_reconnects the way everybody has been insisting I do.
   Basically, the new semantics are:
	/set auto_reconnect 0
		-- No reconnects EVER for ANY reason
	/set auto_reconnect 1
		-- One reconnect, before failure
	/set auto_reconnect N
		-- N reconnects, before failure.
    No more "freebies", which everybody seemed to hate.  Oh well.

Revision 1.42 / (view) - annotate - [select for diffs] , Sun Apr 28 04:22:16 2002 UTC (6 years, 3 months ago) by jnelson
Branch: MAIN
Changes since 1.41: +7 -7 lines
Diff to previous 1.41
Yet another swath of changes in The Great IPv4 Cleanup.  This time I
took a broad hatchet to the resolver-assistant functions in network.c.
Using modern techniques really increases readability and makes it look
less like a hack.  Making good progress!

Revision 1.41 / (view) - annotate - [select for diffs] , Sat Apr 20 13:39:32 2002 UTC (6 years, 3 months ago) by crazyed
Branch: MAIN
Changes since 1.40: +23 -41 lines
Diff to previous 1.40
* Applied Ay-Ars SSL patch:
  * Copyright notices added to ssl code files.
  * --ssl-ver switch removed (configure script hasn't been rebuilt).
  * Code changes/cleanups which I haven't checked, but which seem to work
    well.
  * Documentation changes.
* Fix for a memory leak in foreach when continue or break are used.
* Moved the server_established hook into register_server so that it is not
  triggered when an unsuccessful attempt to connect is made.
* Feeble stab at fixing an intermittent server related coredump.
* Cleaned commandqueues script up a bit.

Revision 1.40 / (view) - annotate - [select for diffs] , Tue Apr 2 21:02:13 2002 UTC (6 years, 4 months ago) by crazyed
Branch: MAIN
Changes since 1.39: +3 -0 lines
Diff to previous 1.39
* Rolled the $getsets() and $getcommands() code into macros and added
  $getfunctions().
* Added a server_established hook.  This is called before anything is sent
  to the server, and it is intended that for ssl connections, stuff can be
  quoted and hooked in plain text until the hook returns, although, it is
  difficult to verify that this will actually work.
* Made it so that when all variables are erased, the low level array that
  contains the variables is erased.  This is intended to make it easier to
  profile the memory use.
* Copyright notice added to perl.c.
* Minor stuff for tabkey.ce.

Revision 1.39 / (view) - annotate - [select for diffs] , Fri Mar 22 18:23:50 2002 UTC (6 years, 4 months ago) by crazyed
Branch: MAIN
Changes since 1.38: +9 -2 lines
Diff to previous 1.38
* Applied patch from Stephanie M Rogerson to fix compile errors with
  --without-ssl flag.
* Updated tabkey.ce script (work in progress).

Revision 1.38 / (view) - annotate - [select for diffs] , Mon Mar 11 18:23:13 2002 UTC (6 years, 4 months ago) by jnelson
Branch: MAIN
CVS Tags: epic4-1_1_3
Changes since 1.37: +215 -9 lines
Diff to previous 1.37
First run at a $serverctl() function.  This is entirely untested.
Please expect bugs.  Feel free to report (and fix) bugs.  I'll document
this once we get it fleshed out.  Suggestions/improvements  are welcome.

Revision 1.37 / (view) - annotate - [select for diffs] , Wed Feb 27 02:57:19 2002 UTC (6 years, 5 months ago) by crazyed
Branch: MAIN
Changes since 1.36: +76 -54 lines
Diff to previous 1.36
* Applied Ay-Ars patch (with a few modifications) which fully melds ssl
  into the server spec, which is now server:port:pass:nick:group:proto
  where proto currently is "irc" or "irc-ssl".
* Removed -ssl flags from "/window server" and /server.
* Ay-Ars patch also includes a new function, $servertype() which returns
  the proto field by way of extrapolation, (it is not the exact text
  entered into that field).

* Entering a server spec in a /server or "/window server" that currently
  exists, but which has different additional field values normally
  alters the current spec to conform to the new spec.  This doesn't work
  with the proto field.  This is probably a bug.

I am somewhat uncomfortable with all of this.  I would like to alter
add_to_server_list to be the one true reference for decoding the server
spec and simplify the other functions to only breaking it into server,
port and "additional".  This may be too big a change currently.

Revision 1.36 / (view) - annotate - [select for diffs] , Thu Feb 14 16:36:07 2002 UTC (6 years, 5 months ago) by jnelson
Branch: MAIN
Changes since 1.35: +5 -15 lines
Diff to previous 1.35
Don't use 'findchr' in the server-info-parser, as \'s are legal nickname
characters.  Take out the debugging code.

Revision 1.35 / (view) - annotate - [select for diffs] , Thu Feb 14 16:33:25 2002 UTC (6 years, 5 months ago) by jnelson
Branch: MAIN
Changes since 1.34: +41 -10 lines
Diff to previous 1.34
This is my first go at supporting embedded colons in server specs.
You can use double-quoted words now in your server spec.  Man, I Hope
this doesn't break anything (famous last words).  Here's an example:
	/server /tmp/.ircd/6667::"tmp:pass":hop:groovy

Would add "/tmp/.ircd/6667" as a server, with the group "groovy" using
the nickname "hop" and the password "tmp:pass", all without the double
quotes, of course.  Using double-quotes to surround arguments like this
will protect colons inside from being mistaken.  I would like to support
backslashed colons at some point, but since backslshes are perfectly legal
nickname characters, I can't see a way to do this without hackery. :/

I added a "findchar" function in ircaux.c to find the next instance of
a character that isn't backslashed.

Revision 1.34 / (view) - annotate - [select for diffs] , Fri Feb 1 23:04:28 2002 UTC (6 years, 6 months ago) by jnelson
Branch: MAIN
Changes since 1.33: +1 -5 lines
Diff to previous 1.33
Bulk commit:
1) Fix typos in KNOWNBUGS
2) Flesh out the things in UPDATES that need documenting
3) Add target_file_write() to files.[ch] for send_text()'s use.
4) Create "reg.h", to hold protos for reg.c
5) Add some missing protos.
6) If /redirect'ing to 0 or to @<fd>, don't output to the screen.
7) Messages sent to target 0 are dropped (/redirect 0 now actually sends
   to target 0, and epic drops it.)  You can /query 0 now if you want.
8) Messages sent to @NUMBER get sent to the NUMBER file, where NUMBER is
   returned by $open().  For example, to paste stuff to log but not to screen:
        @fd = open(FILE w)
        query @$fd
        <paste some stuff>
        query
        @close($fd)
   or
        @fd = open(FILE w)
        redirect @$fd lastlog foo
        @close($fd)
9) Add a function to reg.c to compile a pattern into a regex -- experimental.
10) Fix some compile warnings regarding ssl.

Revision 1.33 / (view) - annotate - [select for diffs] , Fri Jan 25 22:33:22 2002 UTC (6 years, 6 months ago) by crazyed
Branch: MAIN
Changes since 1.32: +6 -0 lines
Diff to previous 1.32
Moved some server attribute altering stuff to server.c.

Revision 1.32 / (view) - annotate - [select for diffs] , Fri Jan 25 21:57:10 2002 UTC (6 years, 6 months ago) by crazyed
Branch: MAIN
Changes since 1.31: +191 -5 lines
Diff to previous 1.31
Applied the SSL patch from ay-ar.

Details are in README.SSL.  This works well at this point, but there may
be teething problems.

Revision 1.31 / (view) - annotate - [select for diffs] , Thu Jan 10 02:26:30 2002 UTC (6 years, 6 months ago) by crazyed
Branch: MAIN
Changes since 1.30: +24 -10 lines
Diff to previous 1.30
* Added a url encoded message switch to /xquote, designed with socks proxy
  scripts in mind.  eg: "xquote -u $urlencode(ISON xxx)%0a" works.  One
  problem with this is that the last command works, and can be used to get
  around the built in barriers for such things.  Is this good or bad?
* -- and any other invalid option will end /xquote switch processing now.
* Added $servergroup() and $serverourname().  These were copied from
  $servername() and behave in much the same way, differing in their return
  values.

Revision 1.30 / (view) - annotate - [select for diffs] , Mon Jan 7 01:27:59 2002 UTC (6 years, 7 months ago) by crazyed
Branch: MAIN
Changes since 1.29: +2 -0 lines
Diff to previous 1.29
Fixed another bug with "server -d".  One thing I left off the list for the
last patch was that $unsplit() had a leak too.

Revision 1.29 / (view) - annotate - [select for diffs] , Sun Jan 6 19:42:30 2002 UTC (6 years, 7 months ago) by crazyed
Branch: MAIN
Changes since 1.28: +2 -0 lines
Diff to previous 1.28
Fixed a bunch of memory leaks:

* In /alias with no args, one leak for each line printed.
* If an /on would clober another /on, there would be a leak.
* In "/timer -ref xxx", if xxx existed and therefore blocked the timer,
  there would be a leak.
* "/server -d" wouldn't erase the notify list and one or two other things
  for the server
* And the last one I am _not_ sure about.  prepare_display() had a leak,
  however, this does appear to be a work in progress, and the pointer
  in question points to a strange combination of static, dynamic and
  alloca() variables.  I made the smallest possible patch which seems
  to work, however, its quality may be questionable.

Revision 1.28 / (view) - annotate - [select for diffs] , Tue Dec 4 22:22:39 2001 UTC (6 years, 8 months ago) by cag
Branch: MAIN
Changes since 1.27: +4 -2 lines
Diff to previous 1.27
added server's group to /SAVE -SERVER

Revision 1.27 / (view) - annotate - [select for diffs] , Tue Nov 13 19:37:19 2001 UTC (6 years, 8 months ago) by jnelson
Branch: MAIN
Changes since 1.26: +24 -64 lines
Diff to previous 1.26
Implement the "redirect sink", which instead of sending all output to another
irc server, drops the output entirely.  This is used by /flush (which is now
safe to use again) and can be used by the user via /redirect 0 to execute
a server query but suppress it's output.

Revision 1.26 / (view) - annotate - [select for diffs] , Mon Oct 22 00:30:49 2001 UTC (6 years, 9 months ago) by jnelson
Branch: MAIN
CVS Tags: epic4-1_1_1
Changes since 1.25: +6 -0 lines
Diff to previous 1.25
Actually implement the code to use the translation stuff.  This means the
translation stuff is now functional.  THIS IS NOT DONE THE SAME WAY AS
IRCII DOES IT.

ircII implements translation on the output side of the equation, from which
our code has deviated significantly.  Upon reflection, the most common request
for translation was not for OUTPUT translation, but for SERVER translation.
Therefore, I have implemented translation's operations on the server side
of the equation instead of the server side.  If this ends up being the wrong
thing, I reserve the right to go back and "fix" this later.

Anyhow, the translation(s) in force will occur when data is recieved or
transmitted to the server, and not otherwise.  Feedback is appreciated.

Revision 1.25 / (view) - annotate - [select for diffs] , Tue Oct 2 16:53:35 2001 UTC (6 years, 10 months ago) by crazyed
Branch: MAIN
Changes since 1.24: +2 -1 lines
Diff to previous 1.24
* Miscelaneous 3cat updates.
* History expansion copies the history buffer verbatim now.
  * Bugfix:  /!0 would not retrieve the first command entered.
  * Bugfix:  Negative numbers not found would be display the
    incorrect number in the error message.  eg:  /!-4444
* Alterations to remove_trailing_spaces interface.
* $igetrmatches() was defined, but inaccessible.

Revision 1.24 / (view) - annotate - [select for diffs] , Tue Sep 25 18:08:34 2001 UTC (6 years, 10 months ago) by jnelson
Branch: MAIN
Changes since 1.23: +1 -0 lines
Diff to previous 1.23
Make sure 'group' is always something, even if it's null.

Revision 1.23 / (view) - annotate - [select for diffs] , Tue Sep 25 17:57:26 2001 UTC (6 years, 10 months ago) by jnelson
Branch: MAIN
Changes since 1.22: +95 -37 lines
Diff to previous 1.22
Oh you didn't know?  Server groups, try one!

Revision 1.22 / (view) - annotate - [select for diffs] , Fri Apr 13 07:02:28 2001 UTC (7 years, 3 months ago) by robohak
Branch: MAIN
CVS Tags: epic4-1_0_1
Changes since 1.21: +9 -3 lines
Diff to previous 1.21
Removed a check in close_server() that stopped clean-up code from being run on a disconnected server.  Also call destroy_waiting_channels() when a servers channels are being thrown away.

Revision 1.21 / (view) - annotate - [select for diffs] , Thu Mar 22 22:24:53 2001 UTC (7 years, 4 months ago) by jnelson
Branch: MAIN
CVS Tags: epic4-1_0, epic4-0_10_0, epic-test-tag2, epic-test-tag
Changes since 1.20: +6 -0 lines
Diff to previous 1.20
* Fix reconnect() to call window_check_servers() before it returns.
  This should fix a number of places where windows are not properly
  informed that their server has gone away, meaning that they may be
  left holding the bag with a current channel that no longer exists.
* Not sure what to do about window_change_servers() which really should
  support changing to new_server == -1.  *sigh*  I can't wait for output
  rules to moot all this.
* Fix /window discon and /window noserv, which just blithely set the
  window's server to -1 without bothering to tell anyone, like say, the
  channels, or calling the servers via window_check_servers() or any of
  that, you know, important stuff.  /window noserv is now a strict alias
  for /window discon.

Revision 1.20 / (view) - annotate - [select for diffs] , Thu Mar 22 19:14:11 2001 UTC (7 years, 4 months ago) by jnelson
Branch: MAIN
Changes since 1.19: +4 -1 lines
Diff to previous 1.19
Fix a bug with /disconnect sending QUIT to the server rather than
	calling close_server(), which causes all sorts of mayhem.
	This was reported by Robohak, by way of felony (i believe)
Fix a bug with fudge_nickname() not calling nick_command_is_pending(0)
	when a 433 numeric (Nick is in use) happens, which causes any
	further 433 numerics to fail to fudge the nickname!  D'oh!
	This was reported by Q.

Revision 1.19 / (view) - annotate - [select for diffs] , Wed Mar 21 21:12:36 2001 UTC (7 years, 4 months ago) by jnelson
Branch: MAIN
Changes since 1.18: +2 -0 lines
Diff to previous 1.18
Use FD_CLR to prevent multiple hits on a file descriptor between select
calls.  Discovered by Q when he was testing the 010 redirect handler.

Revision 1.18 / (view) - annotate - [select for diffs] , Wed Mar 21 19:56:06 2001 UTC (7 years, 4 months ago) by jnelson
Branch: MAIN
Changes since 1.17: +1 -1 lines
Diff to previous 1.17
Aha!  This time for sure!  Passworded-server connectinos prompt correctly.

Revision 1.17 / (view) - annotate - [select for diffs] , Wed Mar 21 19:51:34 2001 UTC (7 years, 4 months ago) by jnelson
Branch: MAIN
Changes since 1.16: +2 -0 lines
Diff to previous 1.16
Try to handle passworded servers a little better.

Revision 1.16 / (view) - annotate - [select for diffs] , Wed Mar 21 16:57:36 2001 UTC (7 years, 4 months ago) by jnelson
Branch: MAIN
Changes since 1.15: +29 -14 lines
Diff to previous 1.15
Fix a typo in the 477 numeric handler (spotted by robohak)
Fix reconnect stuff so it's done right.  Hopefully Q will accept this. ;-)
I'm hoping that channels are now saved properly, or at least that we can
arrange for them to be.  Watch out for the new panic i put in there!

Revision 1.15 / (view) - annotate - [select for diffs] , Tue Mar 20 20:35:20 2001 UTC (7 years, 4 months ago) by jnelson
Branch: MAIN
Changes since 1.14: +1 -0 lines
Diff to previous 1.14
Commit #51 -- save channels when server drops our connection.
I guess this got overlooked.  Q is responsible for pestering me
into fixing this. ;-)

Revision 1.14 / (view) - annotate - [select for diffs] , Wed Mar 14 20:01:46 2001 UTC (7 years, 4 months ago) by jnelson
Branch: MAIN
CVS Tags: epic4-0_9_17
Changes since 1.13: +2 -2 lines
Diff to previous 1.13
Commit #47
* /window server resets the "reconnect attempt" counter ala /server
* /for i in <pattern> {...} now reserved, and emits an error.
* "make depend" done again.
* "my_next_expr" revamped, extra argument added
* "next_expr_with_type" like "next_expr" but first char is "type".
* The /for i in (list) and /for i from x to y commands now use the
  above cruft.
* This is epic4-0.9.16-10
* "break_args" now uses "next_expr_with_type"
* "do_log" should use localtime(3) and not gmtime(3), duh.
* "clear_reconnect_counts" is now an extern function from server.c

Revision 1.13 / (view) - annotate - [select for diffs] , Tue Feb 20 19:23:16 2001 UTC (7 years, 5 months ago) by jnelson
Branch: MAIN
Changes since 1.12: +1 -1 lines
Diff to previous 1.12
Commit #44 -- oops!

Revision 1.12 / (view) - annotate - [select for diffs] , Tue Feb 20 19:00:38 2001 UTC (7 years, 5 months ago) by jnelson
Branch: MAIN
Changes since 1.11: +3 -2 lines
Diff to previous 1.11
Commit #43 -- reword the error message in create_server_list so that it
explains to the user what went wrong -- 'itsname' being NULL is not bad,
it just means registration is still pending.  Warn the user that we cannot
give them the server's canonical name.

Revision 1.11 / (view) - annotate - [select for diffs] , Fri Feb 9 18:46:11 2001 UTC (7 years, 5 months ago) by jnelson
Branch: MAIN
Changes since 1.10: +10 -4 lines
Diff to previous 1.10
Commit #38 -- From Robohak (thanks!)
Fix /server <N> where you are already connected to <N> to output the
	customary "Connected to port %d of server %s" message rather
	than reconnecting to the server (oops!)
Fix /reconnect to honor arguments as a reason for reconnecting, or use
	"Reconnecting" as the default message if none is given.

Revision 1.10 / (view) - annotate - [select for diffs] , Wed Jan 17 02:38:05 2001 UTC (7 years, 6 months ago) by jnelson
Branch: MAIN
CVS Tags: epic4-0_9_16
Changes since 1.9: +1 -0 lines
Diff to previous 1.9
close_server() needs to be called before reconnect() in the EOF handler
for servers -- this is commit #26.

Revision 1.9 / (view) - annotate - [select for diffs] , Tue Jan 16 22:50:43 2001 UTC (7 years, 6 months ago) by jnelson
Branch: MAIN
Changes since 1.8: +1 -0 lines
Diff to previous 1.8
It would be appropriate to initialize 'save_server_channels' rather than
just hoping it gets a value of 0.

Revision 1.8 / (view) - annotate - [select for diffs] , Mon Jan 15 22:23:54 2001 UTC (7 years, 6 months ago) by jnelson
Branch: MAIN
Changes since 1.7: +82 -63 lines
Diff to previous 1.7
Roll get_connected() into reconnect() and abolish all uses of get_connected().
Things are starting to look good here!

Revision 1.7 / (view) - annotate - [select for diffs] , Mon Jan 15 18:17:18 2001 UTC (7 years, 6 months ago) by jnelson
Branch: MAIN
Changes since 1.6: +34 -3 lines
Diff to previous 1.6
Add "set|get_server_quit_message" and start using it.  This permits us
to actually send meaningful quit messages for /quit and /reconnect and
/disconnect and the like.

Revision 1.6 / (view) - annotate - [select for diffs] , Mon Jan 15 15:24:26 2001 UTC (7 years, 6 months ago) by jnelson
Branch: MAIN
Changes since 1.5: +1 -1 lines
Diff to previous 1.5
Fix dumb bug with /reconnect.

Revision 1.5 / (view) - annotate - [select for diffs] , Fri Jan 12 21:10:50 2001 UTC (7 years, 6 months ago) by jnelson
Branch: MAIN
Changes since 1.4: +2 -1 lines
Diff to previous 1.4
Fix some bugs with the last round of commits.

Revision 1.4 / (view) - annotate - [select for diffs] , Fri Jan 12 20:22:20 2001 UTC (7 years, 6 months ago) by jnelson
Branch: MAIN
Changes since 1.3: +3 -3 lines
Diff to previous 1.3
Fix some "issues" with compilation.

Revision 1.3 / (view) - annotate - [select for diffs] , Fri Jan 12 20:11:36 2001 UTC (7 years, 6 months ago) by jnelson
Branch: MAIN
Changes since 1.2: +41 -41 lines
Diff to previous 1.2
Stage 2 -- what am i getting into?  This is the second stage of the server
connection closed coping mechanism.  This will be tested, bugs may ensue!

Revision 1.2 / (view) - annotate - [select for diffs] , Fri Jan 12 17:43:11 2001 UTC (7 years, 6 months ago) by jnelson
Branch: MAIN
Changes since 1.1: +36 -0 lines
Diff to previous 1.1
Add a "reconnect_to" feature to the servers.  The idea is that instead of
closing the server when we recieve a 465 or 010 numeric, instead we should
stash the refnum of the server we want to connect to in the server's data,
and then when we recieve the EOF from the server, at that point do the
reconnect.  This saves users pain and suffering when there is important data
after those numerics.  Thus, we only ever drop our connection to the server
when the user does /server + or /server -.

Revision 1.1.1.1 / (view) -