CVS log for epic5/source/Attic/notice.c |
![]() |
Request diff between arbitrary revisions
* Assimilate notice.c into parse.c. *poof* * Fix some compiler issues and so forth * Nix the NOTE level. * Move load_ircrc() to irc.c, nix "startup_file" global var.
* Nix note support * Revamp notice.c for its eventual assimiliation into parse.c
* commit 1013: * Use a "status" variable in server, instead of a plurality of binary flags * Process usermodes as strings only. * Nix 'flags', 'flags2' and 'umodes', 's_takes_arg', and 'eof'. * Change update_user_mode() to take a server refnum. * Nix $serverctl(... UMODES) * Change server_is_registered() so it takes a server name and our nickname. * Add server_is_unregistered() which i'll use in the future. * Hook /on server_lost all the time in close_server() by popular request. * Make $version() always return "2.8" since all servers are 2.8 servers. * Check /set auto_rejoin_connect at disconnect-time, instead of connect-time. * Use a "is_server_active()" function instead of "did_server_rejoin_channels" * Move the guts of got_initial_version_28() into server_is_registered() * Call "server_is_registered()" from 001, which loads ircrc among other things. * Reduce 004 so it only sets the server's version string id. * Nix got_initial_version_28
Make 'empty_string' (const char []). Now we're cooking with gas!
EPIC5-0.0.1! Huzzah!
* Remove /set beep_on_msg, a half-broken feature which can be scripted. * Nix /set beep_when_away, a 1-line scriptable feature. * Add new noise level %, (/ON %TYPE); like ^ but doesn't turn off display and other stuff as well.
Make message_from() work off of a stack; use panics to guard against unmatched message_from()s, and other wackiness.
* Fix /window kill so it doesn't swap in a window too early. * Make NOTICEs from servers to channels (on ircnet) go to that channel's win. EPIC4-1.2.2!
Fix it so you can compile on systems without (intptr_t) again.
* Revert all uses of LOG_CURRENT to LOG_CRAP * Change all uses of message_to(0) to message_to(-1) * Fix show_help() to not change to_window, it doesn't need to care about that. * Fix help_put_it() to not change message_from, doesn't need to care about it. * Fix /lastlog to use message_to(0) to send all output to current window. * Don't make output of /log go to current window -- no point to that. * Teach add_to_screen() to honor from_server's current window for LOG_CURRENT * And for /set current_window_level as well * Fix message_from() not to save/restore lastlog level, doesn't need to care. * All of this pretty much nukes LOG_CURRENT except for /window, HUZZAH!
* Fixed the ENCRYPTED_PRIVMSG/NOTICE hooks to append the decrypted data as before. * Turned the umodes setting on again (set by the server in the 004(?) numeric and accessible in the client via $serverctl([gs]et umodes). I need to talk to people who have difficulties with this.
Make some compile warnings go away by using (intptr_t). I hope this doesn't bite me -- every system I checked has (intptr_t)..
* 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
* Fix for a flood checking bug which locks the client in the state of believing it's always receiving a notice.
This fix is a little bit less lame than commit 460 for the @#chan problem.
Commit 460 * Don't clobber 'target' in /on general_notice; pass the original target.
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!
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.
* 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...
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.
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.
* Reverted UMODES from the last patch.
* 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.
* 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.
* Bug fix: *shoot me* $encryptparm() wouldn't check if the program field was empty before sprinting it. * Failed received SED messages make their way through encrypted_privmsg and encrypted_notice now just like the successful ones, only without the "[encrypted message]" message. The reasoning is that first of all, it should be possible to block these messages and secondly it makes it a lot easier to script a secure key exchange. The failure hooks are called with only two arguments (no message). This may be a bad idea. On the one hand it makes it easier for a script to catch, on the other, the hook looses certain critical information.
Reset the "sed" global to 0 at the beginning of every PRIVMSG/NOTICE. This may be slightly inconsistant with design in that it seems to be only reset at the end, however, there are also a few exit points that break with consistancy, and this just seems to make more sense.
Do not hook /on general_notice if the user hooks /on kill or /on oper_notice to prevent multiple hookings of the same notice.
Ok. ESR asked us to change our manpage. Some of his changes worked, some of them did not. I took the ones that did work. Add /on general_notice and /on general_privmsg. These will be documented in UPDATES -- they are generalized versions of /on (msg*|public*) and /on (notice|server_notice). Break backwards compatability on /on ctcp_reply by changing $* $0 Sender $1 Target [new] $2 CTCP command [Was $1] $3- CTCP Arguments [Was $2-] Everyone i asked wanted this change, so i claim immunity.
~/.epicrc support! kb should like this.
Rework some comments to avoid offending server coders who do not like to see breaking of backwards compatability refered to as "broken".
Change one comment around to avoid offending one of the hybrid coders.
Initial import into CVS
Initial revision
| CVS Admin |
Powered by ViewCVS 0.9.2 |