CVS log for epic5/source/alias.c |
![]() |
Request diff between arbitrary revisions
* Add arg to panic() controlling whether panic is sent via QUIT (rb black)
* Fix bugs with 'builtins' (zlonix) * Revamp the term_init() function, document, etc. * Unconditionally turn off IEXTEN, IXON, IXOFF, to reclaim all of the chars that kernels steal from us (like ^S, ^Q, ^O, ^V, etc) * Whack the -f/-F/-o/-O command line options; per above. * I can now bind and use ^S and ^Q and ^V. Yay! * Fix initialization of ruby, so it actually works for the first time! YAY! * Refactor how lastlog is trimmed, by removing a specific item * Start working on code to remove items from lastlog by grep. * Fix crashes with /stack push set that kitambi told me about * Put in a trivial sleep when checking screen size to avoid race with screen.
Fix /stack pop set ...
This is the start of a major project to normalize the behavior of word handling in built in functions. The project involves stipulating that every place that handles a "word list" define what a "word" is and use it consistenly, and to output the same type of "words" that it accepts as input. This leverages /xdebug dword to control optional support for dwords in many built in functions.
* Fixes for two memory leaks from nullie * New /on, /ON WINDOW_SERVER, from nullie who needs to write a blurb.
* Finish implementation of /stack push|pop set with symbol table, rb nullie. * Preliminary work making @#chan public show up in #chan's window.
* Eliminate the third argument to expand_alias(), the statement spanner. * Rename parse_line() to parse_block() to better reflect its duties. * Make parse_block() static. Everything needs to call runcmds() now. * Eliminate the local-stack-creating feature of parse_block(), callers do this. * Rename 'line' to 'stmt' in parse_statement(). * Sort of forget to re-implement /set cmdchars. The / is the cmdchar. * Try to optimize parse_statement() and next_statement() some.
* Constify get_*_alias(), so lookups can't modify the actual alias this way. * Rename parse_command() to parse_statement(). * Create a next_statement() to figure out how long the next stmt is. * Stop using expand_alias() to rip apart statements. yay! * Refactor parse_command and parse_statement to better define their roles. * Push responsibility for expansion to parse_statement, someday, to cmds! * Push responsibility for handling block statements to parse_statement. * "Forget" to re-implement /set input_aliases. I wonder if anyone will notice. * Change the name of "hist_flag" to "interactive" to reflect its purpose. * Change /load -std to use parse_statement() instead of parse_line()
* Add flush_all_symbols() which does a total cleanup of symbols at exit-time. * Fix a few bugs * Use flush_all_symbols() instead of /dump to catch memory leaks.
Stuff for fudd and blackjac.
* Check for arc4random() in configure, don't use compat.c version if possible. * GC "fill_it_out" code which has been deactive for a while. * Fix translation casting error for zlonix * Allow current_package() to return NULL, handle that as special case. * Refactor the startup loading stuff * Move a couple of loads out of basical and into global.
Comment out all of the history code. Will GC it later.
* Change "ERROR --" to "INFO --" to not alarm people as much. * Change a few other warnings to not be so alarming. * Change new_realloc() to not move ptr if it is big enough to hold new size. * Fix all the status_* sub-formats to not have any hardcoded size limits.
* Make /xecho -v output to current window if it's visible. * Permit status updates right away, instead of after first connection. * If /input is done in hidden window, switch to the main window. * Make arglists look a little less odd for fudd.
* Add --with-multiplex=[select|poll|kqueue|pthread] to configure
* Check thread-safety of SSL in configure when using pthreads.
* Don't unconditionally skip leading :'s in symbol names.
* When calling functions, handle skipping leading :'s specially.
* Add support for pthread locking for ssl to ssl.c
* Add %{2}+ and %{3}+ status expandos that only show the mode string.
* Use AI_ADDRCONFIG flag to tell getaddrinfo() we only want addrs we can use.
* Refactor $sar() and $msar() so they share as much code as possible. * Refactor newio, support select/kqueue/poll (#define's in newio.h) * ... Getting closer to not needing select! * Fix SSL. * Fix a bunch of misc compiler warnings * Remove restrictions on /QUOTE, so there! * Add pthread support to newio for larne. HUZZAH! * I'm sure a zillion things are broken, so it's time to test!
* Fix $symbolctl(pmatch <incorrect> *) crash
* Auto-create server's first altname, make %S and %{1}S use it.
* Don't add mode types 2, 3, or 4 (takes-args) to the channel mode string.
* This makes ircnet's +R not show up on the status bar.
* Fix /dmsg =<ircnet-numeric-nick>, for Q.
* Add $serverctl(GET <refnum> PROTOCOL), returns IRC or IRC-SSL
Fix bogon.
* Fix /dump * Add $symbolctl(), huzzah!
* Fix add_to_screen() so /query nick catches /dcc chat nick. (rb adm) * Fix /away -all which sends a bogus string to the server. (rb rain)
* Hide ArgListT in alias.h to only those who need it, to save numbers.c * Fix up a lot of compile warnings all over the place. * Some changes to $hookctl() might need feedback from howl... * Fix vhost support so we can do inbound sockets again.
* Refactor window_check_servers() to work with server's current window only. * Roll forward all the rest of changes from epic4 (i think) * Add /ON NEW_NICKNAME, when epic needs a new nickname from you. * Run 'make depend', fix compile errors, fix 'environment' script
* Add arglists to hooks (by howl, who I will pester to document this). Woot! * Finish $hookctl(), by howl.
Fixed $aliasctl(* match [mask]) to return only aliases and assigns.
Revert accidental changes to alias.c in 1.59.
* Fix dcc compile error with --without-ipv6 * Add $windowctl(GET ref TOPLINE num) and $windowctl(GET ref TOPLINES)
* Nix calls to dcc_connected(<fd>, 0) which were always bogus. * Create print_arglist() for printing alias arglists, natch. * Fix crash from /queue -del <name> <num> for <num> = <items> + 1 (rb black) * Show arglist when creating and listing aliases. * Fix memory leaks of buckets when user grabs /on set. * Add a "alternate names" bucket to server data. * Create a whole new api for querying and creating server refnums. * Fix crash with /dump on (/dump all) * Add $serverctl(GET|SET <refnum> ALIAS) get and set server alternate desigs * Add $serverctl(GET|SET <refnum> ALIASES) get and set entire list. * Fix memory leak with /on set
* Numerous new and changed features as per UPDATES. * Better handling of damaged /who x,y responses.
* Fix aliasctl(): values returned by pmatch_* are not to be freed. (rb ce)
Fix typo that caused crash.
* Nix /save and pray nobody notices. * Implement pmatch_* stuff in alias.c to use the unified symbol table. * Commands, functions, and expandos now 100% integrated. HUZZAH! * Reimplement $get(set|command|function)s() to use the pmatch_* stuff. * So they now pick up changes at runtime. HUZZAH! * Allow built in /set to be conditionally added to the "set bucket" * Don't put user-created /set's in the bucket * Allow user to replace one user-created /sets but not builtin sets. * Allow mangling of ALT_CHAR -- how did this ever get missed? * Fix $currchans() so it works the way the documentation says it does. * Fix some const correctness issues, introduce others. bleh.
* Add the rest of funcs to do builtin var support in unified symbol table.
* Change the unified data type for builtin funcs to (IrcVariable *).
* Implement "buckets", for O(N) scans of the unified symbol table.
* Change DEFAULT_USERINFO to DEFAULT_USER_INFORMATION to match the /set.
* Make the *_VAR stuff in vars.h 'int's.
* Change USER_INFO_VAR to USER_INFORMATION_VAR to match the /set.
* Change CLIENTINFO_VAR to CLIENT_INFORMATION_VAR to match the /set.
* Change STATUS_NICK_VAR to STATUS_NICKNAME_VAR to match the set.
* Put the defn of (struct IrcVariable) in vars.h, to expose to unified table.
* Convert all uses of now defunct (enum VAR_TYPES) to (int)
* Create "make_string_var_bydata", converts (IrcVariable *) to malloc string
* Change get_var_alias() to return (IrcVariable *)
* In that function that outputs set values, use make_string_var_bydata().
* Change hardcoded *_VAR uses into pointers to *_VAR, for deref at runtime.
* Major revamp of vars.c, to wholly create built in vars at runtime.
* Built in variables are stored in unified symbol table and vars.c xref array.
* *_VAR values now point through xref array to the actual variable data.
* Nix the now unnecessary get_variable_index().
* Add create_user_set(), backend for /SET -CREATE
* Add /SET -CREATE <name> <type> [{<code>}]
* Need to go back and implement the {<code>} thing.
* Revamp how /set works, using buckets, to implement auto-completion.
* $getsets() is not implemented yet, do that too.
* When looking up $<setname>, use the unified symbol table. HUZZAH!
* Make stripcrap(ALL) exclude "ALL_OFF", so I can... * Fix bug with $stripcrap(ALL,-BOLD ^B^B^Btest). (rb BlackJac) * Make the #define Char const char thing global to all of epic now. * Whack /set scroll. * Create a "/set data" type (VARIABLE) which is union of (int) and (char *). * Expose VARIABLE and variable types in vars.h for others to use. * Break init of /set's into two parts, one to malloc() the set data * The second part is to init the default values once command line is done. * Fix some warnings from --with-warns * Fix all /set callbacks to accept a (void *)(VARIABLE *) variable * /Set callbacks can now directly modify the /set via that variable! * So don't allow direct setting of /set's from outside vars.c. * Everybody must use set_var_value() which is the backend to /set. * Whack the /IRCNAME and /REALNAME variable -- use /SET REALNAME, eh! * Hack up /xecho -x to bide my time until i whack all those /sets it uses. * Don't call set_input_prompt() in main() any more, it's handled elsewhere. * Whack /set logfile callback, since nobody seems to have missed it. * Whack the "number" (float) data in /set since i wasn't gonna use it. * Whack the "GLOBAL/CHANGED" tracking in /set's. Tell me if you miss this. * Unify output of /set values as "[New|Current] value of <var> is <val>" * Don't limit the size of /set continued_line, this will be revisited soon. * Quick and dirty hack to work around adm's bug, will fix this later.
* Fixed a crash if certain args are passed to $xdebug(). * Fixed a lockup with /unload.
* Add a "saved" list item off of the Symbol type to store /stack'ed stuff. * Implement stack push|pop|list for all 6 symbol types. * Nix the "line/global" tracking for symbols * Rename "filename" tracking for symbols to "package" * Create clone_arglist() to clone an arglist, duh. * Change "user_variable_stub" symbol field to be an integer * Stash the stubbed filename in "user_variable" if stub is set.
Fix another bogon rb adm.
* Fix double-free of command alias arglists. rb adm.
* Begin massive refactorization of alias.c, redefining "Alias" as "Symbol" * Refactor parse_line() with a bunch of front end call_* functions. * And a general parse_line() front end, "runcmds()". * Roll builtin expandos in with the user variables * Roll variables and commands together into one name space. HUZZAH! * Nix the caches for the global name space, for now. * I definitely broke /stack alias|assign here. I'll fix it later. * Inline expandos are now officially strings instead of a single char. * Fix bug with $unshift() that popped up. * Move after_expando() to ircaux.c. I think it belongs there more.
Unify functions with commands/aliases. HUZZAH!
Optimize some stuff.
* Fix up parse_command() to get aliases and built in commands from aliases. * This unifies commands and alias name spaces. HUZZAH!
*** WARNING **** WARNING *** WARNING *** WARNING *** This project is half finished. I think this stuff works, but I can't be held responsible if something breaks. Please wait until I finish the rest of this project before getting unhappy with me for breaking stuff. *** WARNING **** WARNING *** WARNING *** WARNING *** * Split alias item to hold commands and variables separately * Nix COMMAND_COMPLETION keybinding. Script replacement forthcoming. * Nix "Use your nickname as alias for /me" feature. * Nix automatic command completion (ie, /whoi no longer expands to /whois) * Work towards not using 'command' var in builtin commands. * This will allow me to get rid of 'server_func' in builtin command data type * Nix the 'flags' var in builtin command data type. * Nix the 'serv_command' var in builtin command data type. * Create 'init_builtin_commands' to run at startup, add commands to alias * Shimmy find_cmd_alias to ignore built in commands for now. Not for long! * So built in commands should be hung off of aliases now. * Create 'builtins' script that aliases some previously builtin commands. * Load this script from global. Don't forget to alarm users.
* Move some defines from comands.h to where they belong * Add and remove func decls in header files as necessary. * Add /wait =<fd> which returns when a nonblocking dcc connection finishes * Make all keybinding funcs/decls use the BUILT_IN_KEYBINDING macro. * Make the BUILT_IN_KEYBINDING macro use unsigned chars. * Hide (struct Key) inside keys.c, and use (void *) to hold state. * Make the input line use (unsigned char), not (char), huzzah! * Make the "othername" ($3 in /on dcc_raw "E") the port number. * Avoid a NULL deref with "parse_command" keybinding.
GC a bunch of useless cruft and stuff.
Make 'empty_string' (const char []). Now we're cooking with gas!
* Nix auto-append-of-$* feature (args_flag to expand_alias/parse_inline) * Fix provided scripts to add $* when necessary. * Fix up Makefile, configure, et al, to use epic5/ directories.
* Do not increment arg_count when ignoring an empty argument in arglists.
* Fix a possible logic hole in ok_to_output() * Fix memory leaks found by valgrind.
Implement infinite recursion detector and thwarter. It requires a #define in config.h, the future of which I have not decided yet.
* Numerous updates/changes/fixes to DCC, functions, scripts, /EXEC, the new math parser, as per UPDATES and KNOWNBUGS. One potential incompatibility is in the change to $open(). (as per UPDATES)
* Add /set wserv_type, either "xterm" or "screen". * Add malloc_strcat_word_c, add a single word to word list, with "" support * Convert a bunch of stuff to use malloc_strcat_word_c to honor ""s right. * GC a bunch of unused code.
Fix it so you can compile on systems without (intptr_t) again.
Fix the {...} expression parser operator to not infinite loop when it
can't find the $FUNCTION_RETURN local variable. Umm, yea.
Commit 581 * Fix /dcc chat nick -p 4444 * Return empty string if you do $aliasctl(pmatch <bogus> <whatever>) * Update some copyright notices.
Fix bug 5 -- panic when you do $push(:foo ) [and $unshift() too]
Make some compile warnings go away by using (intptr_t). I hope this doesn't bite me -- every system I checked has (intptr_t)..
Commit 551 -- second to last commit for this project -- the big one! * Roll in the new universal_next_arg_count() and attendant macros. * Comment out some deprecated function decls in ircaux.h * Do another round of make depends. * Modify alias arglist code to use the new universal_next_arg_count() stuff * Convert dequote() to dequoter(). * Convert new_new_next_arg() into new_new_next_arg_count(). * Comment out deprecated functions in ircaux.c -- will be deleted later.
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
Commit 548 * Nix channel_window, duplicate of get_winref_by_channame() * Make arglist processor panic if it sees an argtype that doesn't exist. * Fix bug with * operator in exprs like (a ? b : *c) in new expression parser. * Fix theoretical crash with deleting hooks from /on window. Bleh. * General cleanups in if.c. * Fix /timer -list acting all wacky. * Fix compilation warnings, you know the deal...
* Convert parse_line_with_return() to call_lambda_function().
Convert m_strdup() to malloc_strdup().
Commit 541
* Move #define CTCP_* into ctcp.h
* Add /xdebug extractw_debug
* Move #define LOCAL_COPY and SAFE into irc_std.h
* Create compat.h, move all the compat.c decls into there (from ircaux.h)
* Create network.h, move all the network.c decls into there (from ircaux.h)
* Create words.h, move all the words.c decls into there (from ircaux.h)
* Include "compat.h" and "network.h" in ircaux.h
* Do another round of make depends
* Rename 'search' to 'search_for'.
* Fix the metric clock hooking /on timer too much.
* Revamp words.c, to support passing word quoter (' or ") as an argument.
* Fixed two language related leaks. * Added flags for dccctl as in, $dccctl(get [ref] FLAGS).
* 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!
Commit 509: * Move /DCC from commands.c to dcc.c * Nix the "dcc deadlist" crap. Handle deleted dcc's more sensibly now. * Add a "dequote" internal function that removes "s in extended words. * Add "QWORDS" as new arglist type, for quoted-words with "s left in. * Add "arglist" regression test. * Fix strlcpy() in compat.c so it doesn't walk off end of string. * Implement more sensible "locking" mechanism for dcc's * Nix the nominally unimplemented "encrypt" feature for dcc * Create "dcc_create" to create dcc entry * Remove "creation" functionality from "dcc_searchlist" * Nix global variables 'filesize' and 'global_family' now unneeded. * Change order around of arguments to "dcc_searchlist". * Rename "dcc_opened" to "dcc_connected" since that is what it does. * Add "dcc_garbage_collect" which looks for dcc's that need removal. * Add "get_dcc_by_filedesc" and "get_dcc_by_refnum" to look up dcc's * Add "lock_dcc" and "unlock_dcc" to prevent dcc's from being GC'd. * Double check that all output that occurs in dcc.c goes to LOG_DCC * Use dcc_open in dcc_raw_listen() instead of doing the network stuff directly. * Allow "booster ctcp" to be sent for dcc chat re-offerings. * Reorganize register_dcc_offer() so it doesn't create dcc until all is well. * Reorganize process_outgoing_file() into sub-functions. * Don't call "dcc_dead" or "dcc_check" in main io() looper. * Fix new_next_arg_count() to use real_move_to_abs_word() to emulate $1 usage
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.
Just some more work/cleanup/etc. Now $<namespacegunk>::function() works right. -wd
A lot more cleanup. Namespace scope changing within aliases now works. -wd
Okay. User input is now handled specially, and parse_command() will not accept incomplete command names anymore. -wd
Initial namespace work seems to be done. Huzzah. -wd
Found and fixed that ridiculous crashing bug! Sweet! -wd
Another merge.
* Explicitly set "mask" to 0 in cs_alist_hash(), so it is initialized * Change type() to typecmd() to avoid name conflicts. * Change 'dot' to 'dotlocl' to avoid name conflicts. * Change 'op' to 'reduce' to avoid name conflicts. * Fix a typo in the error message from /window kill. * Add a panic to detect larne's recent bug that I fixed, just in case. * Constify the "path" argument to uzfopen(). * Make sure return value of strlen() is assigned to a 'size_t' not an 'int'. * Split load() into load() and load1(), load1() reads a file opened by load(). * Now load() is "interpretation-free", and load1() can be replaced. * Fix various minor compile-time issues. * Change %P status line expando to give more useful information.
* $dccctl() changes as per UPDATES. * Misc bug fixes as per KNOWNBUGS.
Fix a little bug in /stack (alias|assign) pop. -wd
Urgh. Fix some stuff here and there. -wd
Yikes. Merged to become consistent with HEAD. Sorry for all the commits, I'll be quiet again soon. :) -wd
Getting ready for a branch merge (don't worry, I'm merging epic's HEAD on to my tree, not the other way around! :) -wd
Fix a few bugs. Notably, get_variable() (and co) should never return NULL. Hum. -wd
Fix local variable lookup breakage. -wd
Whee. Preliminary work is done. I've converted things to use hash tables instead of alists (if this doesn't work out, I'll go back to alists). Namespaces exist, but are not yet addable. That will come. I'm very sure things are still a bit unstable, but the absolute basics of adding variables/functions and executing/retrieving them works. That was my first milestone. -wd
* "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.
Commit #427 * Add -l<tcl> to the front of $LIBS so -lm can come after it * Look for SSL stuff in default location before hunting for it in /usr/local. * Reset $withval after check for perl so --without-perl doesn't --without-tcl * Make first arg of cvtchar() a (const char *) to silence warning. * Move 'this_sucks' label to a place where it is legal. * Make check_val() cope with NaNs and INFs more graciously... * Fix null deref with /lastlog -c * Update the input line in set_update(), not the caller * Do update the input line when redrawing status * Change make_status() to return a success/failure value. * Don't clear the "status line wants redraw" flag if redrawing status fails. * Nuke the now unecessary "in_window_command" global variable. * Fix bug where <scrollback> + <scrollforward> left you in scrollback mode. * Force init of Window->lines_held = 0 even though that shouldnt be needed.
* Altered the default FLOATING_POINT_PRECISION from 6 to 16 which fixes a math bug. * Melded a count argument into next_args and new_next args to cause a specific number of words to be returned. * Rewrote the /alias xxx (args) form of /alias to avoid using extractw and to use *next_args_count instead. * Tuned the call.xtrace alias in debug.irc. * Extended $is_on() in guh to allow and return multiple arguments. * Added $is_off() as a compliment to $is_on(). * Made a minor philosophical change to the way flood detection works: A message is not counted as a flood if it is the first message in a flood. The most important impact of this is that rate calculations are more accurate.
* 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.
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.
Fix /alias /s to use %lu for unsigned longs in say().
* /exec leak fix for -line, -part, etc.
* /for var from x to y step z will work for negative z now, but for bug
compatibility, you must use a negative step to actually make this work.
* Local variable tweaks.
* Fixed $word() to not discard words after a "".
* /userip now uses the internal queue, if the server supports it via the
USERIP 005. Otherwise, it will send the command directly to the server.
The problem with this is that to avoid the internal cache returning the
users address, you must use -direct. This needs to be fixed.
* Karll Array overhaul. Removed certain performance traps for very large
arrays, which have very large numbers of like items, and made it such
that arrays can be in an unsorted internaly until the time that they
need to be sorted, when a quicksort is called on them.
* Added two new functions to deal with this: $usetitem() and
$delitems(). These work like their similarly named counterparts, but
leave the array unsorted, and generally perform better.
* Any function which uses indexes or performs a binary search on an
array will cause the array to be sorted.
* For the most part, extended functions to allow for additional
item/index args. $getitem(array $getmatches(array *cat*)) will
return the contents of all items that have the character sequence
"cat" in them. $getitem(array2 $getmatches(array1 *cat*)) will
act much like $copattern().
* 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().
Update copyright notices and copyright dates.
I'm going to start sweeping the entire source, adding the official copyright notice to each file (like ircII does already), and making sure that the /* $EPIC$ */ thingee is at the top of the file. This is my first swath of files.
* Enhanced flood checking to keep records based on userhost rather than nick. Not designed to catch clones but to make it harder to avoid. * Flood checking keeps its time in microseconds now, which _may_ make it a little hyperactive on occasions. * Small re-arrangement to find_array_item() to make it slightly faster. * Terminology fix in /alias /s. * Added $regmatches() which works exactly like $regexec, but returns pairs of numbers which can be applied to $mid() to extract the matched strings and substrings from the original string. It also takes a new second argument indicating the maximum number of subexpressions to return. * New -file option to /lastlog. If given, all output will be written to the file rather than the screen. file_put_it() may be questionable. * $channel() will return "h" in the op field if the user is a half-op.
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.
* Optimised the search algorithms that apply to /foreach and aliasctls match function. * Altered $uh() in script/guh to use the cached variables from $userhost() where possible. Perhaps it's a better idea to add a new function? * Bugfix to deban.
Two patches applied, aka, the string and perl patches.
The perl patch adds perl support via three perl functions.
The string patch:
* Rewrites new_realloc to more closely resemble new_realloc in its
interface, and in that it calls realloc directly.
* Adds an argument to the 3cat functions that permits it to seek
directly to the end of the string. Designed to improve performance.
* Alters a few things to use the above.
* Tunes a few other string functions in ircaux.c.
* Rewrites $uniq() for performance reasons.
* Removes the part of $jot() that preallocates the string. I feel a
little guilty about this somehow though it seems to have absolutely
no effect on performance anymore.
Initial import into CVS
Initial revision
| CVS Admin |
Powered by ViewCVS 0.9.2 |