CVS log for epic5/source/notify.c |
![]() |
Request diff between arbitrary revisions
* Fixed an apparent typo in getnrolitems in data_array. * Fixed a bug in autoget where it wasn't actually starting a download. * Fixed yet another bug in commandqueues involving double quote dequoting. * This covers for an apparent bug in $shift() which should automatically dequote quotes (unfixed). * Added USER1 - USER10, OPERWALL and SYSERR levels to the ignore system. * Added ":" hack to /notify as per UPDATES.
* $write(w-1 ....) is documented to write to the global logfile and now does. * Fixed a long standing notify bug where only one ISON would be sent.
* Fixed q1cmd in command queues to address space mangling issues first noticed by Kraca. * Fixed data_struct to work with dword. * Fixed tabkey.ce to work better with args with spaces in them. * Fixed tabkey.ce to not put / prefix on recursed commands (again). * Fixed tabkey.ce to work with 005 CHANTYPES. * Fixed $xdebug() to work with multiple arguments as it once did. * Fixed what appears to be a typo in elf.c and I don't really know what it does. I hope it doesn't break anything for anybody. XXX * Minor optimisation for notify.c. * Added handling of the 340 numeric in numbers.c * Handle extraneous spaces in server MODE messages. Austhex adds these. * Trigger waiting ISON's when we connect again. I don't recall why I took this out in the first place. * Added "/userhost -flush", which will flush the queue of messages waiting to be sent, NOT the queue awaiting replies. * Extended "/ison -f" to also flush the queue of ISON's waiting to be sent.
Add /userhost -extra for nullie
Addendum to the previous commit. The /ison changes were difficult to separate and aren't documented: These are the -e, -end and -max flags, and the fact that -max and -len are per-server variables now.
* 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.
* After connect()ing to a server, save the remote peername * This fixes $serverctl(GET <num> PORT) * This also fixes $servports(), which should work as (not) documented. * Fix for notify_signon default handler, from larne. thanks! * Add $serverctl(GET <num> ADDRFAMILY), returns "ipv4", "ipv6" or "unix" * Allow /hostname <ipv4>/<ipv6>, separately set v4/v6 vhosts! (see UPDATES)
* 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.
* Userhost updating for NICK messages as per UPDATES. * Delayed ISON requests as per UPDATES.
GC a bunch of useless cruft and stuff.
Fix typo that broke /notify on servers other than server refnum 0. Broken in commit 403 (Dec 19, 2002).
* 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)
Teach all the /set callbacks to take a (const void *). This fixes a bad-c problem with /set!
* Add "ON/OFF" toggle set variable to the system timer data. * Create 'update_system_timer' which uses the "toggle" var to run or stop timer * Merge '(start|stop)_system_timer' into 'update_system_timer' * Nix #define MINIMUM_(NOTIFY|CLOCK|MAIL)_INTERVAL since we can't stop that. * Do not enforce minimums for /SET *_INTERVAL since user could get around it. * Track "last event" time, maybe I'll use that in the future * Reset "now" global variable before calling timer callback. * Fix null deref bug with $($$) * Add default binding to ^G to "self_insert" for beeps. * Do not enforce MINIMUM_NOTIFY_INTERVAL in do_notify() * Don't include exec.h from screen.c * Add 'number' (floating point) field to /set's * Add FLOAT_TYPE_VAR type for /set's, using 'number' field * Update all the /set entries to include a default 'number' field. * Add get_float_var() to get the 'number' field in a set. * Add set_float_var() to set the 'number' field in a set. * Teach set_variable() about FLOAT_TYPE_VAR sets. * Teach save_variables() about FLOAT_TYPE_VAR sets. * Teach get_string_variable() about FLOAT_TYPE_VAR sets.
* Protect against panic if /set mail 0 is off by default
Commit 556 * Change #define DEFAULT_CPU_SAVER_EVERY to 60, it needs not be 0. * Create 'clock.c', to hold clock generation, system timers, cpu saver watchdog * Create notion of "sys(tem)timers", callbacks for mail, notify, clock gen. * Add 'system_timer', generalized callback for all of the system timers. * Fix add_timer() so the 'command' argument does what the docs say it does. * Extern 'timer_exists' so we don't try to remove_timer() and invalid timer * Redo dependancies because clock.h exists. * Add code to bootstrap mail systimer with /set mail * Add code to bootstrap clock generation with /set clock * Add code to bootstrap notify handling with /set notify_interval. * Start enforcing "NOTIFY_INTERVAL" again in do_notify() to avoid excess flood.
Commit #555: * Add #define MINIMUM_CLOCK_INTERVAL and MINIMUM_MAIL_INTERVAL in config.h * Add #define DEFAULT_CLOCK_INTERVAL and DEFAULT_MAIL_INTERVAL in config.h * Add reset_system_timers(), do_update_clock(), and set_cpu_saver_after() * Add time_to_next_interval(), general form of time_to_next_minute(). * Add get_clock() and reset_clock() to replace update_clock(). * Make remove_timer() an extern function so i can delete timers. ;-) * Add /SET CLOCK_INTERVAL and /SET MAIL_INTERVAL * Make $T use the static clock. * Reorganize system timers 1 and 2 into four timers: * - CPU SAVER timer, checks for idleness, to turn on cpu saver * - CLOCK timer, updates the status bar clock periodically * - MAIL timer, checks for new mail periodically * - NOTIFY timer, checks for others on irc periodically * The above three honor "cpu saver" mode. * Nix the old "do_every_minute" timer. * Reorganize the clock generation stuff into "reset_*_clock" functions * Generate the clock statically; only update it from the CLOCK timer * Add reset_system_timers() which regenerates all four system timers. * Don't set system timers in main, call reset_system_timers() instead. * Don't enforce "notify interval" in do_notify(), handle that in NOTIFY timer. * Comment stuff in words.c
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
Convert m_strdup() to malloc_strdup().
* 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!
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.
Another merge.
Yikes. Merged to become consistent with HEAD. Sorry for all the commits, I'll be quiet again soon. :) -wd
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.
Fix all the rest of the compile issues. bleh.
* 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...
Update copyright notices and copyright dates.
* 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.
* Fixed a bug where the ison system wasn't correctly updated for non-current servers when adding a nick to the notify list. * /setting notify_interval to 0 now turns ison requests for the notify system off completely. Since the default is 60 seconds, and 0 is a somewhat insane value, this seems like a reasonable choice.
"stylize" up clear_notify_list up a bit -- no functional changes.
Fixed another bug with "server -d". One thing I left off the list for the last patch was that $unsplit() had a leak too.
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.
* 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.
This one alters the behaviour of do_notify wrt the notify_interval setting. It recalculates the interval every time now so that it won't get knotted when a large value is specified briefly.
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.
Two things: * Remove /set notify_handler which didn't do anything. * Rewrite /lastlog so i understand how it works. Big new feature, -regex, to support regex searching on lastlog! * Commit #75.
Initial import into CVS
Initial revision
| CVS Admin |
Powered by ViewCVS 0.9.2 |