CVS log for epic4/source/numbers.c |
![]() |
Request diff between arbitrary revisions
Introduce an intentional error after receiving 001, to avoid a problem I'm seeing on epicsol. Grrr.
Fix crash revealed by ircfuzz. Thanks go to the anonymous person who pointed this out. Only one bug found by ircfuzz! ;-)
* Fix 353 numeric so channels w/o users on ratbox aren't "odd"
Fix end-of-invite/except list for braino.
Last material change to epic4! (hopefully -- cross fingers) * Fix wording of default messages for 347 and 349 numerics. * Fix column alignment for /timer list. * Fix add_to_window() to stop runaway recursion through /set output_rewrite. * Fix bug in expand_alias() -- all output must be privileged_yell()! * Change /on send_to_server so it can't be hooked recursively.
* Add %{2}W and %{3}W from epic5 (for blackjac)
* Fix $stripcrap(ALL,-<type> ...) from epic5.
* Add support for +e and +I numeric replies for efnet.
* Avoid NULL deref on brok^H^H^H^Hempty numeric replies
* 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)
The nick list in 353 is not mandatory. IE: :server.name 353 mynick = #chan\r\n is perfectly acceptable.
* Document the material changes we made to the release candidate. * Fix a few compiler warnings since we've already made changes. * This is the second release candidate. * The vote will not be restarted.
Fixes and new features as per KNOWNBUGS and UPDATES.
* Fix bug with nicks ending with \ in the 353 numeric which has trailing space * Auto-close DCC's that can't send handshakes due to family mismatch.
Miscelaneous fixes and features as per UPDATES and KNOWNBUGS.
* Fix the larneproofing in numeric_handler(), it was defective all over. -- Reported by jb.
Commit 610: * Use the server's message in our default 330 output. * Make $numwords() use count_words() as a test. Looks ok so far... * Make $indextoword() use count_words(). * Implement regression tests for $indextoword() * Any further problems with $indextoword() should add regress tests! * Make epic behave like ircII when doing /window create with screen and X. * Make move_to_next_word() stop when it hits a trailing nul, duh!
Bugger all.
Ok. Maybe my previous fix was wrong.
Really fix 004 for ratbox this time.
* Work around "(brown paper bag release)" version in 004 in ratbox-1.2-3
* 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!
Don't do WHOWAS on channels in 401 numeric handler. (rb larne)
* 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.
Document the stuff ce just commited. Fix a userhost caching bug.
Another merge.
* Fix bug that caused cursor to go wacky on screen < 32 columns. * Fix 464 handler to only prompt for password if we're not registered yet. * Fix bug that made ^C,,, slurp up all ,'s after it.
* 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.
Yikes. Merged to become consistent with HEAD. Sorry for all the commits, I'll be quiet again soon. :) -wd
* CTCP-over-DCC fix. There are some things that confuse me about the inner
workings here, so I'm not sure if this fix was done properly, but I did
a few tests including a DCC send over a SED encrypted DCC and everything
seems to tick over well.
* Unix socket configure tests as per KNOWNBUGS.
* /set flood_ignore defaulted to off.
* Tuned commandqueues.
* The 324 hook is now called for joins as well.
* %{1}D status setting as per UPDATES.
* DCC hold mode as per UPDATES.
* Docs say that $info(o) includes 'g' if $glob() is available. Add it.
* Revamp $win(serv|size|chan|bound|level)() to use get_window_by_desc.
* Revamp $win(screen)() to use get_window_by_desc.
* Use get_window_by_refnum(0) and not 'current_window'
* Allow a \ to escape a space where spaces would be stripped.
* Above bug fixes things like switch ($foo) {(foo\ ) {...}} to work.
* Add handler for /on 330, "user is logged in" numeric in ircu.
* Don't honor/ignore "#" in a window name/refnum. This was lame anways.
* Fix is_window_visible/get_window to use get_window_by_desc().
Fix numeric handlers for 313, 317.
Don't hook /on names twice in the normal case. Found by void.
* Fix default /on 321 output so it doesn't call display_msg. BAH!
Commit 447 -- fix /on 311 as well. Plus i fixed /on 312 in previous commit. I forgot about that.
Fix /on 353, /on names to prior behavior (i think) Fix /on 317. This was just a brain-o.
* Fix for NAMES processing. Discovered by Paladin.
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!
Fix really obvious typo that caused /on 368 to not be thrown when /set show_end_of_msgs ON and to be thrown when OFF.
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.
* 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.
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.
Cleaned the /userip thing up a bit more. Withdrew the sending of unqueued USERIPs and handled 307 responses "better".
* Cleaned up 307 processing a bit for now.
* /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().
Update copyright notices and copyright dates.
* 010 numeric fix to add the new server to the old servers group, hence allowing it to connect.
* 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.
Unbreak the larneproofing which was too strict for ircnet. doh! Found/reported by desaster.
Add more larneproofing.
Add some larneproofing.
* 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.
Stop doing special support for two numerics, 316 and 340, as a personal favor to Kevin Mitchell (kev).
Fix a null deref when writing to a window's logfile that doesn't exist. Add some comments to numbers.c in anticipation of future work.
* Minor optimisation to find_array_item(). * Fix to the "rolling nick" bug occasionally seen for lagged users.
Oh you didn't know? Server groups, try one!
Rework some comments to avoid offending server coders who do not like to see breaking of backwards compatability refered to as "broken".
Add vampirmel to epic_thanks at the request of whitefang Fix 477 numeric handling for ircnet, as they use it for something different than dalnet uses it for. Oh well.
The "Can't join channels" numerics were not having their /on's thrown because i moved them from zone 3 to zone 1 but forgot to add the call to do_hook for them.
* Move the "can't join channel" numerics into section #1, suppress them if you are actually on the channel already! Add "cant_join_channel" function in names.c to wipe out window->waiting_channel(), and use it in the "cant join channel" numerics.
Fix more bogons in numbers.c from using ArgList after calling display_msg. I must remember not to touch ArgList after calling display_msg(). [repeat 1000 times]
Try to handle the 464 numeric properly for server passwords.
Must not touch ArgList after calling display_msg() in numeric handlers. I am *such* a doofus some times. This fixes the 010 numeric, natch.
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!
EPIC4-0.9.16-11 -- support 477 numeric on dalnet.
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!
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 -.
Commit #15 -- fix format log for 010 numeric handler.
Commit #11 -- support efnext's 010 numeric (Please use another server) Support dalnet's +O (elite bastard only) channel mode.
Don't forget; must use 'get_server_itsname' and never 'get_server_name' when determining if the response is from the local server.
Initial import into CVS
Initial revision
| CVS Admin |
Powered by ViewCVS 0.9.2 |