diff -rc epic4-0.9.12/doc/SILLINESS epic4-0.9.13/doc/SILLINESS *** epic4-0.9.12/doc/SILLINESS Wed Nov 29 10:17:42 2000 --- epic4-0.9.13/doc/SILLINESS Thu Nov 30 14:09:00 2000 *************** *** 35,37 **** --- 35,38 ---- epic4-0.9.10 Obstreperous epic4-0.9.11 Objurgation epic4-0.9.12 Cachinnate + epic4-0.9.13 Mollify diff -rc epic4-0.9.12/include/who.h epic4-0.9.13/include/who.h *** epic4-0.9.12/include/who.h Tue Nov 28 15:00:45 2000 --- epic4-0.9.13/include/who.h Thu Nov 30 13:18:27 2000 *************** *** 39,45 **** void whoreply (char *, char **); void xwhoreply (char *, char **); void who_end (char *, char **); ! int fake_who_end (char *, char **); --- 39,45 ---- void whoreply (char *, char **); void xwhoreply (char *, char **); void who_end (char *, char **); ! int fake_who_end (char *, char *); diff -rc epic4-0.9.12/source/irc.c epic4-0.9.13/source/irc.c *** epic4-0.9.12/source/irc.c Wed Nov 29 10:17:30 2000 --- epic4-0.9.13/source/irc.c Thu Nov 30 14:08:56 2000 *************** *** 13,26 **** /* * irc_version is what $J returns, its the common-name for the version. */ ! const char irc_version[] = "EPIC4-0.9.12"; ! const char useful_info[] = "epic4 0 9 12"; /* * internal_version is what $V returns, its the integer-id for the * version, and corresponds to the date of release, YYYYMMDD. */ ! const char internal_version[] = "20001129"; /* * As a way to poke fun at the current rage of naming releases after --- 13,26 ---- /* * irc_version is what $J returns, its the common-name for the version. */ ! const char irc_version[] = "EPIC4-0.9.13"; ! const char useful_info[] = "epic4 0 9 13"; /* * internal_version is what $V returns, its the integer-id for the * version, and corresponds to the date of release, YYYYMMDD. */ ! const char internal_version[] = "20001130"; /* * As a way to poke fun at the current rage of naming releases after *************** *** 28,34 **** * reality, I have decided to start doing that with EPIC. These names * are intentionally and maliciously silly. Complaints will be ignored. */ ! const char ridiculous_version_name[] = "Cachinnate"; #define __need_putchar_x__ #include "status.h" --- 28,34 ---- * reality, I have decided to start doing that with EPIC. These names * are intentionally and maliciously silly. Complaints will be ignored. */ ! const char ridiculous_version_name[] = "Mollify"; #define __need_putchar_x__ #include "status.h" diff -rc epic4-0.9.12/source/numbers.c epic4-0.9.13/source/numbers.c *** epic4-0.9.12/source/numbers.c Tue Nov 28 13:52:59 2000 --- epic4-0.9.13/source/numbers.c Thu Nov 30 14:12:35 2000 *************** *** 118,123 **** --- 118,151 ---- * numbered_command: does (hopefully) the right thing with the numbered * responses from the server. I wasn't real careful to be sure I got them * all, but the default case should handle any I missed (sorry) + * + * The format of a numeric looks like so: + * + * :server-name XXX our-nick Arg1 Arg2 Arg3 ... :ArgN + * + * The last argument traditionally has a colon before it, but this is not + * compulsary. The BreakArgs function has already broken this up into + * words for us, so that what we get, looks like this: + * + * server-name -> from parameter + * XXX -> comm parameter + * our-nick -> ArgList[0] + * Arg1 -> ArgList[1] + * Arg2 -> ArgList[2] + * ... ... + * + * BUT! There's a wrinkle in the ointment. The first thing we do is slurp + * up ArgList[0] (our-nick) and put it in 'user'. Then we increment the + * ArgList array, so what we actually end up with is: + * + * server-name -> from parameter + * XXX -> comm parameter + * our-nick -> user + * Arg1 -> ArgList[0] + * Arg2 -> ArgList[1] + * ... ... + * ArgN -> ArgList[N-1] + * NULL -> ArgList[N] */ void numbered_command (char *from, int comm, char **ArgList) { *************** *** 476,481 **** --- 504,510 ---- display_msg(from, ArgList); break; + /* ":%s 401 %s %s :No such nick/channel" */ case 401: /* #define ERR_NOSUCHNICK 401 */ { PasteArgs(ArgList, 1); *************** *** 497,505 **** break; } ! /* Dalnet broken extended who replies. */ case 402: - case 522: { PasteArgs(ArgList, 1); if (do_hook(current_numeric, "%s %s %s", from, --- 526,534 ---- break; } ! /* Broken dalnet extended who replies. */ ! /* ":%s 402 %s %s :No such server" */ case 402: { PasteArgs(ArgList, 1); if (do_hook(current_numeric, "%s %s %s", from, *************** *** 510,516 **** * Some broken servers send this instead of a 315 numeric * when a who request has been completed. */ ! fake_who_end(from, ArgList); break; } --- 539,564 ---- * Some broken servers send this instead of a 315 numeric * when a who request has been completed. */ ! fake_who_end(from, ArgList[0]); ! break; ! } ! ! /* Yet more broken dalnet extended who replies. */ ! /* ":%s 522 %s :/WHO Syntax incorrect, use /who ? for help" */ ! /* ":%s 523 %s :Error, /who limit of %d exceed." */ ! case 522: ! case 523: ! { ! PasteArgs(ArgList, 0); ! if (do_hook(current_numeric, "%s %s", from, ArgList[0])) ! display_msg(from, ArgList); ! ! /* ! * This dalnet error message doesn't even give us the ! * courtesy of telling us which who request was in error, ! * so we have to guess. Whee. ! */ ! fake_who_end(from, NULL); break; } *************** *** 542,548 **** * Some broken servers send this instead of a 315 numeric * when a who request has been completed. */ ! if (fake_who_end(from, ArgList)) break; /* --- 590,596 ---- * Some broken servers send this instead of a 315 numeric * when a who request has been completed. */ ! if (fake_who_end(from, ArgList[0])) break; /* diff -rc epic4-0.9.12/source/screen.c epic4-0.9.13/source/screen.c *** epic4-0.9.12/source/screen.c Wed Nov 8 10:10:47 2000 --- epic4-0.9.13/source/screen.c Wed Nov 29 11:27:38 2000 *************** *** 2710,2716 **** case ('F') : case ('H') : case ('M') : case ('N') : case ('O') : case ('Z') : case ('l') : case ('m') : case ('n') : ! /* { */ case ('o') : case ('|') : case ('}') : case ('~') : case ('c') : { break; /* Dont do anything */ --- 2710,2716 ---- case ('F') : case ('H') : case ('M') : case ('N') : case ('O') : case ('Z') : case ('l') : case ('m') : case ('n') : ! case ('o') : case ('|') : case ('}') : case ('~') : case ('c') : { break; /* Dont do anything */ diff -rc epic4-0.9.12/source/who.c epic4-0.9.13/source/who.c *** epic4-0.9.12/source/who.c Tue Nov 28 15:05:32 2000 --- epic4-0.9.13/source/who.c Thu Nov 30 13:57:24 2000 *************** *** 618,625 **** * do not exist. So as to avoid corrupting the WHO queue, this function is * called to give us the opportunity to clean up after any who requests that * may be canceled because of the above lamage. */ ! int fake_who_end (char *from, char **ArgList) { WhoEntry *new_w = who_queue_top(); char buffer[1025]; --- 618,630 ---- * do not exist. So as to avoid corrupting the WHO queue, this function is * called to give us the opportunity to clean up after any who requests that * may be canceled because of the above lamage. + * + * Thanks be to the Dalnet coding team for returning error codes that do not + * tell you what the original request was, making it neigh unto impossible + * to correctly match up error codes to requests. Gee whiz, you wouldn't + * think it would be that hard to get this right. */ ! int fake_who_end (char *from, char *who_target) { WhoEntry *new_w = who_queue_top(); char buffer[1025]; *************** *** 629,655 **** if (!new_w) return 0; ! /* ! * If this numeric matches the top of our who queue, ! * then assume that this is a dalnet-type error, and ! * commense the end-of-who processing. ! */ ! if (strcmp(new_w->who_target, ArgList[2])) return 0; ! do { ! /* Fabricate a fake argument list */ ! char *fake_ArgList[2]; ! fake_ArgList[0] = ArgList[2]; ! fake_ArgList[1] = NULL; /* Defer to another function, if neccesary. */ if (new_w->end) new_w->end(from, fake_ArgList); else { ! snprintf(buffer, 1024, "%s %s", from, ArgList[0]); if (new_w->who_end) parse_line(NULL, new_w->who_end, buffer, 0, 0); } --- 634,670 ---- if (!new_w) return 0; ! /* Only honor these for dalnet extended requests. */ ! if (new_w->dalnet_extended == 0) return 0; ! if (who_target != NULL) { ! /* ! * So 'who_target' isn't NULL here. Make sure it's a ! * legitimate match to our current top of who request. ! */ ! if (strcmp(new_w->who_target, who_target)) ! return 0; ! } + do + { /* Defer to another function, if neccesary. */ if (new_w->end) + { + char *fake_ArgList[3]; + + /* Fabricate a fake argument list */ + fake_ArgList[0] = new_w->who_target; + fake_ArgList[1] = "fake_who_end"; + fake_ArgList[2] = NULL; new_w->end(from, fake_ArgList); + } else { ! snprintf(buffer, 1024, "%s %s", ! from, new_w->who_target); if (new_w->who_end) parse_line(NULL, new_w->who_end, buffer, 0, 0); } .