diff -uNr ircservices-5.0.27/Changes ircservices-5.0.28/Changes --- ircservices-5.0.27/Changes 2003-12-03 11:28:37 +0900 +++ ircservices-5.0.28/Changes 2004-02-05 20:54:46 +0900 @@ -1,5 +1,22 @@ Version 5.0 ----------- +2004/02/05 .28 The OperServ AKILL/EXCLUDE/EXCEPTION/SLINE LIST and VIEW + commands now only display the first 50 entries matching + the given mask. Note that no notice is given if the + list is cut off; this will be remedied, and the limit + (50) made configurable, in a future release. +2004/02/02 Fixed a cosmetic bug in ChanServ SET SECURE help. Reported + by Andrew Kempe. +2004/01/22 Fixed a bug causing the ChanServ XOP DEL commands to delete + the wrong access entries. Reported by +2004/01/05 + in channel names no longer confuses the httpd/dbaccess + module. Reported by +2004/01/05 Channel entry messages are now prefixed with the channel + name. Suggested by Medice +2004/01/05 Fixed a bug in calculating session memory usage for OperServ + STATS ALL. Reported by Ali Sor +2003/12/09 Added slightly more verbose logging when a fatal signal is + received. 2003/12/03 .27 Fixed a stupid bug in the AKILLCHAN command causing corrupted autokills. Reported by 2003/12/03 Various code cleanups and memory leak fixes. diff -uNr ircservices-5.0.27/Makefile ircservices-5.0.28/Makefile --- ircservices-5.0.27/Makefile 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/Makefile 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ # Makefile for Services. # -# IRC Services is copyright (c) 1996-2003 Andrew Church. +# IRC Services is copyright (c) 1996-2004 Andrew Church. # E-mail: # Parts written by Andrew Kempe and others. # This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/TODO ircservices-5.0.28/TODO --- ircservices-5.0.27/TODO 2003-11-24 21:46:25 +0900 +++ ircservices-5.0.28/TODO 2004-02-05 20:46:17 +0900 @@ -1,5 +1,7 @@ Things to probably do: +OS AKILL/etc. DEL ALL (or CLEAR?) +NS/MS Add a separate mail address field for memo forwarding CS Add a modules.conf option to set the default channel mlock [] NS Flags for LIST[EMAIL] to match against only nick or only usermask/email @@ -49,6 +51,8 @@ Things to think about: +CS Allow autokick exceptions + [Dionisios K. ] CS Specify (in conf file) modes that users are not allowed to change [Medice ] CS ChanServ LINK, like NickServ but for channels diff -uNr ircservices-5.0.27/actions.c ircservices-5.0.28/actions.c --- ircservices-5.0.27/actions.c 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/actions.c 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* Various routines to perform simple actions. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/channels.c ircservices-5.0.28/channels.c --- ircservices-5.0.27/channels.c 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/channels.c 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* Channel-handling routines. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/channels.h ircservices-5.0.28/channels.h --- ircservices-5.0.27/channels.h 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/channels.h 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* Online channel data structure. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/commands.c ircservices-5.0.28/commands.c --- ircservices-5.0.27/commands.c 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/commands.c 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* Routines for looking up commands in a *Serv command list. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/commands.h ircservices-5.0.28/commands.h --- ircservices-5.0.27/commands.h 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/commands.h 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* Declarations for command data. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/compat.c ircservices-5.0.28/compat.c --- ircservices-5.0.27/compat.c 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/compat.c 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* Compatibility routines. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/conffile.c ircservices-5.0.28/conffile.c --- ircservices-5.0.27/conffile.c 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/conffile.c 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* Configuration file handling. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/conffile.h ircservices-5.0.28/conffile.h --- ircservices-5.0.27/conffile.h 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/conffile.h 2004-02-05 21:00:49 +0900 @@ -1,7 +1,7 @@ /* Structures, constants, and external declarations for configuration file * handling. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/configure ircservices-5.0.28/configure --- ircservices-5.0.27/configure 2003-11-15 15:52:32 +0900 +++ ircservices-5.0.28/configure 2004-01-22 09:31:31 +0900 @@ -2,7 +2,7 @@ # # Configuration script for Services. # -# IRC Services is copyright (c) 1996-2003 Andrew Church. +# IRC Services is copyright (c) 1996-2004 Andrew Church. # E-mail: # Parts written by Andrew Kempe and others. # This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/data/Makefile ircservices-5.0.28/data/Makefile --- ircservices-5.0.27/data/Makefile 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/data/Makefile 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ # Makefile for data directory. # -# IRC Services is copyright (c) 1996-2003 Andrew Church. +# IRC Services is copyright (c) 1996-2004 Andrew Church. # E-mail: # Parts written by Andrew Kempe and others. # This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/defs.h ircservices-5.0.28/defs.h --- ircservices-5.0.27/defs.h 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/defs.h 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* Basic constants, macros and prototypes. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/docs/2.html ircservices-5.0.28/docs/2.html --- ircservices-5.0.27/docs/2.html 2003-11-05 15:24:02 +0900 +++ ircservices-5.0.28/docs/2.html 2003-12-03 18:49:03 +0900 @@ -265,7 +265,10 @@ ircservices.conf and modules.conf. ircservices.conf contains settings that affect Services as a whole, such as the remote server to connect to; modules.conf contains settings that apply to -individual modules, such as NickServ and ChanServ. +individual modules, such as NickServ and ChanServ. These files are stored +in the Services data directory (the directory you gave when running the +configure script; this is /usr/lib/ircservices for the +binary distributions).

When Services is installed, two sample files, example-ircservices.conf and example-modules.conf, are diff -uNr ircservices-5.0.27/docs/faq.html ircservices-5.0.28/docs/faq.html --- ircservices-5.0.27/docs/faq.html 2003-10-18 02:22:46 +0900 +++ ircservices-5.0.28/docs/faq.html 2004-02-05 20:56:22 +0900 @@ -115,6 +115,8 @@
E.7. How can I disable automatic channel-owner mode for the channel founder on Unreal and other IRC servers with such a mode? +
E.8. If a channel operator sets mode -o+v on + himself, ChanServ always sends -v.

F. OperServ features

F.1. Using the OperServ JUPE command results in server @@ -760,6 +762,16 @@ "disabled" will likewise re-enable the "channel owner" mode. + +

E.8. If a channel operator sets mode -o+v on + himself, ChanServ always sends -v. +

+ This is a side-effect of security measures which prevent non-autoop + users from getting a +v in before Services deops them. + Either do the +v before the -o or use the + ChanServ VOICE command. +

+


diff -uNr ircservices-5.0.27/encrypt.c ircservices-5.0.28/encrypt.c --- ircservices-5.0.27/encrypt.c 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/encrypt.c 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* Include file for high-level encryption routines. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/encrypt.h ircservices-5.0.28/encrypt.h --- ircservices-5.0.27/encrypt.h 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/encrypt.h 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* Include file for high-level encryption routines. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/extern.h ircservices-5.0.28/extern.h --- ircservices-5.0.27/extern.h 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/extern.h 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* Prototypes and external variable declarations. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/hash.h ircservices-5.0.28/hash.h --- ircservices-5.0.27/hash.h 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/hash.h 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* Declarations for hash tables. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/ignore.c ircservices-5.0.28/ignore.c --- ircservices-5.0.27/ignore.c 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/ignore.c 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* Ignore handling. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/ignore.h ircservices-5.0.28/ignore.h --- ircservices-5.0.27/ignore.h 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/ignore.h 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* Structures and declarations for ignore code. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/init.c ircservices-5.0.28/init.c --- ircservices-5.0.27/init.c 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/init.c 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* Initalization and related routines. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/lang/de.l ircservices-5.0.28/lang/de.l --- ircservices-5.0.27/lang/de.l 2003-11-25 19:02:40 +0900 +++ ircservices-5.0.28/lang/de.l 2004-01-22 09:31:32 +0900 @@ -1,6 +1,6 @@ # Emacs: -*- mode: fundamental; coding: binary; -*- -# IRC Services is copyright (c) 1996-2003 Andrew Church. +# IRC Services is copyright (c) 1996-2004 Andrew Church. # E-mail: # Parts written by Andrew Kempe and others. # This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/lang/en_us.l ircservices-5.0.28/lang/en_us.l --- ircservices-5.0.27/lang/en_us.l 2003-11-25 19:18:01 +0900 +++ ircservices-5.0.28/lang/en_us.l 2004-01-22 09:32:31 +0900 @@ -2,7 +2,7 @@ # United States English language file. # -# IRC Services is copyright (c) 1996-2003 Andrew Church. +# IRC Services is copyright (c) 1996-2004 Andrew Church. # E-mail: # Parts written by Andrew Kempe and others. # This program is free but copyrighted software; see the file COPYING for @@ -5076,4 +5076,4 @@ # version of the master (English) language file was used to create a # translated file. -# CVS: $Revision: 2.217 $ +# CVS: $Revision: 2.218 $ diff -uNr ircservices-5.0.27/lang/es.l ircservices-5.0.28/lang/es.l --- ircservices-5.0.27/lang/es.l 2003-11-26 11:20:42 +0900 +++ ircservices-5.0.28/lang/es.l 2004-01-22 09:31:32 +0900 @@ -2,7 +2,7 @@ # Spanish language file. # -# IRC Services is copyright (c) 1996-2003 Andrew Church. +# IRC Services is copyright (c) 1996-2004 Andrew Church. # E-mail: # Parts written by Andrew Kempe and others. # This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/lang/fr.l ircservices-5.0.28/lang/fr.l --- ircservices-5.0.27/lang/fr.l 2003-10-14 11:51:24 +0900 +++ ircservices-5.0.28/lang/fr.l 2004-01-22 09:31:32 +0900 @@ -2,7 +2,7 @@ # French language file. # -# IRC Services is copyright (c) 1996-2003 Andrew Church. +# IRC Services is copyright (c) 1996-2004 Andrew Church. # E-mail: # Parts written by Andrew Kempe and others. # This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/lang/hu.l ircservices-5.0.28/lang/hu.l --- ircservices-5.0.27/lang/hu.l 2003-11-26 15:06:46 +0900 +++ ircservices-5.0.28/lang/hu.l 2004-01-22 09:31:33 +0900 @@ -1,6 +1,6 @@ # Emacs: -*- mode: fundamental; coding: binary; -*- -# IRC Services is copyright (c) 1996-2003 Andrew Church. +# IRC Services is copyright (c) 1996-2004 Andrew Church. # E-mail: # Parts written by Andrew Kempe and others. # This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/lang/it.l ircservices-5.0.28/lang/it.l --- ircservices-5.0.27/lang/it.l 2003-10-14 11:51:36 +0900 +++ ircservices-5.0.28/lang/it.l 2004-01-22 09:31:33 +0900 @@ -2,7 +2,7 @@ # Italian language file. # -# IRC Services is copyright (c) 1996-2003 Andrew Church. +# IRC Services is copyright (c) 1996-2004 Andrew Church. # E-mail: # Parts written by Andrew Kempe and others. # This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/lang/ja_euc.l ircservices-5.0.28/lang/ja_euc.l --- ircservices-5.0.27/lang/ja_euc.l 2003-11-25 16:40:44 +0900 +++ ircservices-5.0.28/lang/ja_euc.l 2004-01-22 09:31:33 +0900 @@ -2,7 +2,7 @@ # Japanese language file (EUC encoding) / 日本語のメッセージファイル # -# IRC Services is copyright (c) 1996-2003 Andrew Church. +# IRC Services is copyright (c) 1996-2004 Andrew Church. # E-mail: # Parts written by Andrew Kempe and others. # This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/lang/ja_sjis.l ircservices-5.0.28/lang/ja_sjis.l --- ircservices-5.0.27/lang/ja_sjis.l 2003-11-25 16:40:49 +0900 +++ ircservices-5.0.28/lang/ja_sjis.l 2004-01-22 09:31:33 +0900 @@ -2,7 +2,7 @@ # Japanese language file (SJIS encoding) / {bZ[Wt@C # -# IRC Services is copyright (c) 1996-2003 Andrew Church. +# IRC Services is copyright (c) 1996-2004 Andrew Church. # E-mail: # Parts written by Andrew Kempe and others. # This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/lang/langcomp.c ircservices-5.0.28/lang/langcomp.c --- ircservices-5.0.27/lang/langcomp.c 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/lang/langcomp.c 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* Compiler for language definition files. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/lang/nl.l ircservices-5.0.28/lang/nl.l --- ircservices-5.0.27/lang/nl.l 2003-11-25 19:55:50 +0900 +++ ircservices-5.0.28/lang/nl.l 2004-01-22 09:31:33 +0900 @@ -2,7 +2,7 @@ # Dutch language file. # -# IRC Services is copyright (c) 1996-2003 Andrew Church. +# IRC Services is copyright (c) 1996-2004 Andrew Church. # E-mail: # Parts written by Andrew Kempe and others. # This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/lang/pt.l ircservices-5.0.28/lang/pt.l --- ircservices-5.0.27/lang/pt.l 2003-06-27 11:00:05 +0900 +++ ircservices-5.0.28/lang/pt.l 2004-01-22 09:31:33 +0900 @@ -2,7 +2,7 @@ # Arquivo do idioma Portugues (do Brasil). # -# IRC Services is copyright (c) 1996-2003 Andrew Church. +# IRC Services is copyright (c) 1996-2004 Andrew Church. # E-mail: # Parts written by Andrew Kempe and others. # This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/lang/tr.l ircservices-5.0.28/lang/tr.l --- ircservices-5.0.27/lang/tr.l 2003-11-29 14:19:17 +0900 +++ ircservices-5.0.28/lang/tr.l 2004-01-22 09:31:33 +0900 @@ -2,7 +2,7 @@ # Turkish language file. # -# IRC Services is copyright (c) 1996-2003 Andrew Church. +# IRC Services is copyright (c) 1996-2004 Andrew Church. # E-mail: # Parts written by Andrew Kempe and others. # This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/language.c ircservices-5.0.28/language.c --- ircservices-5.0.27/language.c 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/language.c 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* Multi-language support. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/language.h ircservices-5.0.28/language.h --- ircservices-5.0.27/language.h 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/language.h 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* Include file for multi-language support. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/list-array.h ircservices-5.0.28/list-array.h --- ircservices-5.0.27/list-array.h 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/list-array.h 2004-02-05 21:00:49 +0900 @@ -1,7 +1,7 @@ /* Macros to handle insertion, deletion, iteration, and searching for * linked lists and arrays. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/log.c ircservices-5.0.28/log.c --- ircservices-5.0.27/log.c 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/log.c 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* Logging routines. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/main.c ircservices-5.0.28/main.c --- ircservices-5.0.27/main.c 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/main.c 2004-02-05 21:00:49 +0900 @@ -176,6 +176,42 @@ /*************************************************************************/ /*************************************************************************/ +/* Subroutine to save databases. */ + +static void do_save_data(void) +{ + if (!lock_data()) { + if (errno == EEXIST) { + log("warning: databases are locked, not updating"); + wallops(NULL, + "\2Warning:\2 Databases are locked, and cannot be updated." + " Remove the `%s%s%s' file to allow database updates.", + *LockFilename=='/' ? "" : services_dir, + *LockFilename=='/' ? "" : "/", LockFilename); + } else { + log_perror("warning: unable to lock databases, not updating"); + wallops(NULL, "\2Warning:\2 Unable to lock databases; databases" + " will not be updated."); + } + call_callback_1(NULL, cb_save_complete, 0); + } else { + if (debug) + log("debug: Saving databases"); + call_callback(NULL, cb_save_data); + if (!unlock_data()) { + log_perror("warning: unable to unlock databases"); + wallops(NULL, + "\2Warning:\2 Unable to unlock databases; future database" + " updates may fail until the `%s%s%s' file is removed.", + *LockFilename=='/' ? "" : services_dir, + *LockFilename=='/' ? "" : "/", LockFilename); + } + call_callback_1(NULL, cb_save_complete, 1); + } +} + +/*************************************************************************/ + /* Main routine. (What does it look like? :-) ) */ int main(int ac, char **av, char **envp) @@ -211,38 +247,7 @@ log("debug: Top of main loop"); if (!readonly && (save_data || now-last_update >= UpdateTimeout)) { - if (!lock_data()) { - if (errno == EEXIST) { - log("warning: databases are locked, not updating"); - wallops(NULL, - "\2Warning:\2 Databases are locked, and cannot" - " be updated. Remove the `%s%s%s' file to allow" - " database updates.", - *LockFilename=='/' ? "" : services_dir, - *LockFilename=='/' ? "" : "/", LockFilename); - } else { - log_perror("warning: unable to lock databases, not" - " updating"); - wallops(NULL, - "\2Warning:\2 Unable to lock databases;" - " databases will not be updated."); - } - call_callback_1(NULL, cb_save_complete, 0); - } else { - if (debug) - log("debug: Saving databases"); - call_callback(NULL, cb_save_data); - if (!unlock_data()) { - log_perror("warning: unable to unlock databases"); - wallops(NULL, - "\2Warning:\2 Unable to unlock databases;" - " future database updates may fail until the" - " `%s%s%s' file is removed.", - *LockFilename=='/' ? "" : services_dir, - *LockFilename=='/' ? "" : "/", LockFilename); - } - call_callback_1(NULL, cb_save_complete, 1); - } + do_save_data(); save_data = 0; last_update = now; } diff -uNr ircservices-5.0.27/memory.c ircservices-5.0.28/memory.c --- ircservices-5.0.27/memory.c 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/memory.c 2004-02-05 21:00:49 +0900 @@ -1,7 +1,7 @@ /* Memory management routines. * Leak checking based on code by Kelmar (2001/1/13) * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/messages.c ircservices-5.0.28/messages.c --- ircservices-5.0.27/messages.c 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/messages.c 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* Definitions of IRC message functions and list of messages. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/messages.h ircservices-5.0.28/messages.h --- ircservices-5.0.27/messages.h 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/messages.h 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* Declarations of IRC message structures, variables, and functions. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/misc.c ircservices-5.0.28/misc.c --- ircservices-5.0.27/misc.c 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/misc.c 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* Miscellaneous routines. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modes.c ircservices-5.0.28/modes.c --- ircservices-5.0.27/modes.c 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/modes.c 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* Routines for handling mode flags and strings. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modes.h ircservices-5.0.28/modes.h --- ircservices-5.0.27/modes.h 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/modes.h 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* Mode flag definitions. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/Makefile ircservices-5.0.28/modules/Makefile --- ircservices-5.0.27/modules/Makefile 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/modules/Makefile 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ # Master makefile for modules. # -# IRC Services is copyright (c) 1996-2003 Andrew Church. +# IRC Services is copyright (c) 1996-2004 Andrew Church. # E-mail: # Parts written by Andrew Kempe and others. # This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/Makerules ircservices-5.0.28/modules/Makerules --- ircservices-5.0.27/modules/Makerules 2003-12-03 11:45:30 +0900 +++ ircservices-5.0.28/modules/Makerules 2004-01-22 09:31:31 +0900 @@ -1,6 +1,6 @@ # Makefile rules for modules. # -# IRC Services is copyright (c) 1996-2003 Andrew Church. +# IRC Services is copyright (c) 1996-2004 Andrew Church. # E-mail: # Parts written by Andrew Kempe and others. # This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/chanserv/Makefile ircservices-5.0.28/modules/chanserv/Makefile --- ircservices-5.0.27/modules/chanserv/Makefile 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/modules/chanserv/Makefile 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ # Makefile for ChanServ modules. # -# IRC Services is copyright (c) 1996-2003 Andrew Church. +# IRC Services is copyright (c) 1996-2004 Andrew Church. # E-mail: # Parts written by Andrew Kempe and others. # This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/chanserv/access-levels.c ircservices-5.0.28/modules/chanserv/access-levels.c --- ircservices-5.0.27/modules/chanserv/access-levels.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/chanserv/access-levels.c 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* Access list and level modification handling for ChanServ. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for @@ -265,7 +265,7 @@ ARRAY_FOREACH (i, ci->access) { if (nick && ci->access[i].nickgroup) { if (!(ngi = get_ngi_id(ci->access[i].nickgroup)) - || !match_wild_nocase(nick, ngi->nicks[ngi->mainnick]) + || !match_wild_nocase(nick, ngi_mainnick(ngi)) ) { continue; } @@ -341,7 +341,7 @@ *sent_header = 1; } notice_lang(s_ChanServ, u, CHAN_ACCESS_LIST_FORMAT, - index+1, access->level, ngi->nicks[ngi->mainnick]); + index+1, access->level, ngi_mainnick(ngi)); return RET_LISTED; } diff -uNr ircservices-5.0.27/modules/chanserv/access-xop.c ircservices-5.0.28/modules/chanserv/access-xop.c --- ircservices-5.0.27/modules/chanserv/access-xop.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/chanserv/access-xop.c 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* SOP/AOP/VOP handling for ChanServ. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for @@ -203,7 +203,7 @@ } ci->access[i].nickgroup = 0; notice_lang(s_ChanServ, u, CHAN_XOP_DELETED, - ngi->nicks[ngi->mainnick], ci->name, listname); + ngi_mainnick(ngi), ci->name, listname); } put_channelinfo(ci); @@ -225,7 +225,7 @@ relindex++; if (nick && ci->access[i].nickgroup) { if (!(ngi = get_ngi_id(ci->access[i].nickgroup)) - || !match_wild_nocase(nick, ngi->nicks[ngi->mainnick]) + || !match_wild_nocase(nick, ngi_mainnick(ngi)) ) { continue; } @@ -286,7 +286,7 @@ } if (num > 0) return -1; /* Out of range for given access level */ - ci->access[i-1].nickgroup = 0; + ci->access[i].nickgroup = 0; (*offset)++; return 1; } @@ -307,7 +307,7 @@ *sent_header = 1; } notice_lang(s_ChanServ, u, CHAN_XOP_LIST_FORMAT, relindex, - ngi->nicks[ngi->mainnick]); + ngi_mainnick(ngi)); return 1; } diff -uNr ircservices-5.0.27/modules/chanserv/access.c ircservices-5.0.28/modules/chanserv/access.c --- ircservices-5.0.27/modules/chanserv/access.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/chanserv/access.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Base routines for ChanServ access level handling. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/chanserv/access.h ircservices-5.0.28/modules/chanserv/access.h --- ircservices-5.0.27/modules/chanserv/access.h 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/chanserv/access.h 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Include file for ChanServ access level data. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/chanserv/autokick.c ircservices-5.0.28/modules/chanserv/autokick.c --- ircservices-5.0.27/modules/chanserv/autokick.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/chanserv/autokick.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Autokick list handling. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/chanserv/chanserv.h ircservices-5.0.28/modules/chanserv/chanserv.h --- ircservices-5.0.27/modules/chanserv/chanserv.h 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/chanserv/chanserv.h 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* ChanServ-related structures. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/chanserv/check.c ircservices-5.0.28/modules/chanserv/check.c --- ircservices-5.0.27/modules/chanserv/check.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/chanserv/check.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Routines to check validity of JOINs and mode changes. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/chanserv/cs-local.h ircservices-5.0.28/modules/chanserv/cs-local.h --- ircservices-5.0.27/modules/chanserv/cs-local.h 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/chanserv/cs-local.h 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Include file for data local to the ChanServ module. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/chanserv/main.c ircservices-5.0.28/modules/chanserv/main.c --- ircservices-5.0.27/modules/chanserv/main.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/chanserv/main.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Main ChanServ module. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for @@ -317,7 +317,7 @@ check_chan_user_modes(NULL, u, c, -1); if (ci && ci->entry_message) - notice(s_ChanServ, user->nick, "%s", ci->entry_message); + notice(s_ChanServ, user->nick, "(%s) %s", ci->name, ci->entry_message); return 0; } @@ -433,15 +433,15 @@ } else if (check_channel_limit(ngi2, NULL) < 0) { module_log("Transferring foundership of %s from deleted" " nick %s to successor %s", ci->name, - oldnick, ngi2->nicks[ngi2->mainnick]); + oldnick, ngi_mainnick(ngi2)); uncount_chan(ci); ci->founder = ci->successor; ci->successor = 0; count_chan(ci); } else { module_log("Successor (%s) of %s owns too many channels," - " deleting channel", - ngi2->nicks[ngi2->mainnick], ci->name); + " deleting channel", ngi_mainnick(ngi2), + ci->name); goto delete; } } else { @@ -803,7 +803,7 @@ if (ci->founder) { NickGroupInfo *ngi = get_ngi_id(ci->founder); if (ngi) { - founder = ngi->nicks[ngi->mainnick]; + founder = ngi_mainnick(ngi); } else { snprintf(tmpbuf, sizeof(tmpbuf), "", ci->founder); @@ -872,10 +872,10 @@ show_all = 1; notice_lang(s_ChanServ, u, CHAN_INFO_HEADER, chan); - notice_lang(s_ChanServ,u,CHAN_INFO_FOUNDER,ngi->nicks[ngi->mainnick]); + notice_lang(s_ChanServ, u, CHAN_INFO_FOUNDER, ngi_mainnick(ngi)); if (ngi2 != NULL && CHECK_SHOW_ALL) { notice_lang(s_ChanServ, u, CHAN_INFO_SUCCESSOR, - ngi2->nicks[ngi2->mainnick]); + ngi_mainnick(ngi2)); } notice_lang(s_ChanServ, u, CHAN_INFO_DESCRIPTION, ci->desc); strftime_lang(buf, sizeof(buf), u->ngi, STRFTIME_DATE_TIME_FORMAT, @@ -1729,8 +1729,10 @@ cmd_GETPASS->name = ""; /* Update command help parameters */ cmd_REGISTER->help_param1 = s_NickServ; - if ((cmd = lookup_cmd(module, "SET SECURE")) != NULL) + if ((cmd = lookup_cmd(module, "SET SECURE")) != NULL) { cmd->help_param1 = s_NickServ; + cmd->help_param2 = s_NickServ; + } } /* if (!after_configure) */ return 0; } diff -uNr ircservices-5.0.27/modules/chanserv/sendpass.c ircservices-5.0.28/modules/chanserv/sendpass.c --- ircservices-5.0.27/modules/chanserv/sendpass.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/chanserv/sendpass.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* ChanServ SENDPASS module. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/chanserv/set.c ircservices-5.0.28/modules/chanserv/set.c --- ircservices-5.0.27/modules/chanserv/set.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/chanserv/set.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* SET command handling. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for @@ -196,8 +196,8 @@ uncount_chan(ci); oldngi = get_ngi_id(ci->founder); module_log("Changing founder of %s from %s to %s by %s!%s@%s", ci->name, - oldngi ? oldngi->nicks[oldngi->mainnick] : "", - param, u->nick, u->username, u->host); + oldngi ? ngi_mainnick(oldngi) : "", param, u->nick, + u->username, u->host); ci->founder = ngi->id; count_chan(ci); if (ci->successor == ci->founder) { @@ -235,8 +235,8 @@ NickGroupInfo *oldngi = get_ngi_id(ci->successor); module_log("Changing successor of %s from %s to %s by %s!%s@%s", ci->name, - oldngi ? oldngi->nicks[oldngi->mainnick] : "", - param, u->nick, u->username, u->host); + oldngi ? ngi_mainnick(oldngi) : "", param, + u->nick, u->username, u->host); } else { module_log("Setting successor of %s to %s by %s!%s@%s", ci->name, param, u->nick, u->username, u->host); diff -uNr ircservices-5.0.27/modules/chanserv/util.c ircservices-5.0.28/modules/chanserv/util.c --- ircservices-5.0.27/modules/chanserv/util.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/chanserv/util.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* ChanServ internal utility routines. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for @@ -228,7 +228,7 @@ * for that elsewhere as well. */ if (ngi->channels_count >= MAX_CHANNELCOUNT) { module_log("count BUG: overflow in ngi->channels_count for %u (%s)" - " on %s", ngi->id, ngi->nicks[ngi->mainnick], ci->name); + " on %s", ngi->id, ngi_mainnick(ngi), ci->name); return; } ARRAY_EXTEND(ngi->channels); @@ -251,7 +251,7 @@ if (i >= ngi->channels_count) { module_log("uncount BUG: channel not found in channels[] for %u (%s)" " on %s", ngi->id, - ngi->nicks_count ? ngi->nicks[ngi->mainnick] : "", + ngi->nicks_count ? ngi_mainnick(ngi) : "", ci->name); return; } diff -uNr ircservices-5.0.27/modules/database/Makefile ircservices-5.0.28/modules/database/Makefile --- ircservices-5.0.27/modules/database/Makefile 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/modules/database/Makefile 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ # Makefile for database modules. # -# IRC Services is copyright (c) 1996-2003 Andrew Church. +# IRC Services is copyright (c) 1996-2004 Andrew Church. # E-mail: # Parts written by Andrew Kempe and others. # This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/database/extsyms.c ircservices-5.0.28/modules/database/extsyms.c --- ircservices-5.0.27/modules/database/extsyms.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/database/extsyms.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Interface to external module (*Serv) symbols for database modules. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/database/extsyms.h ircservices-5.0.28/modules/database/extsyms.h --- ircservices-5.0.27/modules/database/extsyms.h 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/database/extsyms.h 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Header for extsyms.c. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/database/fileutil.c ircservices-5.0.28/modules/database/fileutil.c --- ircservices-5.0.27/modules/database/fileutil.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/database/fileutil.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Database file handling routines. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/database/fileutil.h ircservices-5.0.28/modules/database/fileutil.h --- ircservices-5.0.27/modules/database/fileutil.h 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/database/fileutil.h 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Database file descriptor structure and file handling routine prototypes. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/database/standard.c ircservices-5.0.28/modules/database/standard.c --- ircservices-5.0.27/modules/database/standard.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/database/standard.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Routines to load/save Services databases in standard format. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/database/version4.c ircservices-5.0.28/modules/database/version4.c --- ircservices-5.0.27/modules/database/version4.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/database/version4.c 2004-02-05 21:00:50 +0900 @@ -1,7 +1,7 @@ /* Routines to load/save Services databases in the (hopefully one day * obsolete) format used by version 4.x. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for @@ -645,9 +645,9 @@ SAFE(write_int32(ni->time_registered, f)); SAFE(write_int32(ni->last_seen, f)); SAFE(write_int16(ni->status, f)); - if (ngi && irc_stricmp(ni->nick, ngi->nicks[ngi->mainnick]) != 0) { + if (ngi && irc_stricmp(ni->nick, ngi_mainnick(ngi)) != 0) { /* Not the main nick in the group; save it as a link */ - SAFE(write_string(ngi->nicks[ngi->mainnick], f)); + SAFE(write_string(ngi_mainnick(ngi), f)); SAFE(write_int16(0, f)); SAFE(write_int16(0, f)); } else { @@ -746,11 +746,11 @@ if (ngi->os_priv >= NP_SERVADMIN) { ARRAY_EXTEND(services_admins); strscpy(services_admins[services_admins_count-1], - ngi->nicks[ngi->mainnick], NICKMAX); + ngi_mainnick(ngi), NICKMAX); } else if (ngi->os_priv >= NP_SERVOPER) { ARRAY_EXTEND(services_opers); strscpy(services_opers[services_opers_count-1], - ngi->nicks[ngi->mainnick], NICKMAX); + ngi_mainnick(ngi), NICKMAX); } } SAFE(write_int8(0, f)); @@ -1244,11 +1244,11 @@ SAFE(write_int8(1, f)); SAFE(write_buffer(ci->name, f)); if (ci->founder && (ngi = get_ngi_id(ci->founder))) - SAFE(write_string(ngi->nicks[ngi->mainnick], f)); + SAFE(write_string(ngi_mainnick(ngi), f)); else SAFE(write_string(NULL, f)); if (ci->successor && (ngi = get_ngi_id(ci->successor))) - SAFE(write_string(ngi->nicks[ngi->mainnick], f)); + SAFE(write_string(ngi_mainnick(ngi), f)); else SAFE(write_string(NULL, f)); SAFE(write_buffer(ci->founderpass, f)); @@ -1292,7 +1292,7 @@ SAFE(write_int16(ngi != NULL, f)); if (ngi) { SAFE(write_int16(convert_new_level(ci->access[i].level), f)); - SAFE(write_string(ngi->nicks[ngi->mainnick], f)); + SAFE(write_string(ngi_mainnick(ngi), f)); } } diff -uNr ircservices-5.0.27/modules/encryption/Makefile ircservices-5.0.28/modules/encryption/Makefile --- ircservices-5.0.27/modules/encryption/Makefile 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/modules/encryption/Makefile 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ # Makefile for encryption modules. # -# IRC Services is copyright (c) 1996-2003 Andrew Church. +# IRC Services is copyright (c) 1996-2004 Andrew Church. # E-mail: # Parts written by Andrew Kempe and others. # This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/encryption/md5.c ircservices-5.0.28/modules/encryption/md5.c --- ircservices-5.0.27/modules/encryption/md5.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/encryption/md5.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Module for encryption using MD5. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/httpd/Makefile ircservices-5.0.28/modules/httpd/Makefile --- ircservices-5.0.27/modules/httpd/Makefile 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/modules/httpd/Makefile 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ # Makefile for httpd modules. # -# IRC Services is copyright (c) 1996-2003 Andrew Church. +# IRC Services is copyright (c) 1996-2004 Andrew Church. # E-mail: # Parts written by Andrew Kempe and others. # This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/httpd/auth-ip.c ircservices-5.0.28/modules/httpd/auth-ip.c --- ircservices-5.0.27/modules/httpd/auth-ip.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/httpd/auth-ip.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* IP address authorization module for HTTP server. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/httpd/auth-password.c ircservices-5.0.28/modules/httpd/auth-password.c --- ircservices-5.0.27/modules/httpd/auth-password.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/httpd/auth-password.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Password authorization module for HTTP server. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/httpd/dbaccess.c ircservices-5.0.28/modules/httpd/dbaccess.c --- ircservices-5.0.27/modules/httpd/dbaccess.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/httpd/dbaccess.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Database access module for HTTP server. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for @@ -999,9 +999,8 @@ sockprintf(c->socket, ""); ngi = get_ngi_id(ci->access[i].nickgroup); if (ngi) { - http_quote_html(ngi->nicks[ngi->mainnick], - buf, sizeof(buf)); - http_quote_url(ngi->nicks[ngi->mainnick], + http_quote_html(ngi_mainnick(ngi), buf, sizeof(buf)); + http_quote_url(ngi_mainnick(ngi), urlbuf, sizeof(urlbuf), 1); sockprintf(c->socket, "%s" "", urlbuf, buf); @@ -1079,9 +1078,8 @@ "Founder: "); ngi = get_ngi_id(ci->founder); if (ngi) { - http_quote_html(ngi->nicks[ngi->mainnick], buf, sizeof(buf)); - http_quote_url(ngi->nicks[ngi->mainnick], urlbuf, - sizeof(urlbuf), 1); + http_quote_html(ngi_mainnick(ngi), buf, sizeof(buf)); + http_quote_url(ngi_mainnick(ngi), urlbuf, sizeof(urlbuf), 1); sockprintf(c->socket, "%s", urlbuf, buf); } else { @@ -1092,9 +1090,8 @@ if (ci->successor) { ngi = get_ngi_id(ci->successor); if (ngi) { - http_quote_html(ngi->nicks[ngi->mainnick], buf, sizeof(buf)); - http_quote_url(ngi->nicks[ngi->mainnick], urlbuf, - sizeof(urlbuf), 1); + http_quote_html(ngi_mainnick(ngi), buf, sizeof(buf)); + http_quote_url(ngi_mainnick(ngi), urlbuf, sizeof(urlbuf), 1); sockprintf(c->socket, "%s", urlbuf, buf); } else { diff -uNr ircservices-5.0.27/modules/httpd/debug.c ircservices-5.0.28/modules/httpd/debug.c --- ircservices-5.0.27/modules/httpd/debug.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/httpd/debug.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Debug page module for HTTP server. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/httpd/http.h ircservices-5.0.28/modules/httpd/http.h --- ircservices-5.0.27/modules/httpd/http.h 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/httpd/http.h 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* HTTP-related definitions. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/httpd/main.c ircservices-5.0.28/modules/httpd/main.c --- ircservices-5.0.27/modules/httpd/main.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/httpd/main.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Main HTTP server module. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/httpd/redirect.c ircservices-5.0.28/modules/httpd/redirect.c --- ircservices-5.0.27/modules/httpd/redirect.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/httpd/redirect.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Nick/channel URL redirect module for HTTP server. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/httpd/top-page.c ircservices-5.0.28/modules/httpd/top-page.c --- ircservices-5.0.27/modules/httpd/top-page.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/httpd/top-page.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Top-page (http://services.example.net/) handler. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/httpd/util.c ircservices-5.0.28/modules/httpd/util.c --- ircservices-5.0.27/modules/httpd/util.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/httpd/util.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* HTTP server common utility routines. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for @@ -249,11 +249,11 @@ /*************************************************************************/ -/* URL-quote (%nn) any special characters (",',%,\, and if slash_question is - * non-zero, /,?) in `str', and place - * the result in `outbuf', truncating to `outsize' bytes (including trailing - * null). %nn tokens inserted by this routine will never be truncated. - * Returns `outbuf' on success, NULL on error (invalid parameter). +/* URL-quote (%nn) any special characters (space, non-ASCII, ",',%,\,+, and + * if slash_question is non-zero, /,?) in `str', and place the result in + * `outbuf', truncating to `outsize' bytes (including trailing null). %nn + * tokens inserted by this routine will never be truncated. Returns + * `outbuf' on success, NULL on error (invalid parameter). */ char *http_quote_url(const char *str, char *outbuf, int32 outsize, @@ -271,19 +271,15 @@ return NULL; } while (*str && outsize > 1) { - switch (*str) { - case '/': - case '?': - if (!slash_question) { - *outbuf++ = *str; - outsize--; - break; - } - /* fall through */ - case '%': - case '"': - case '\'': - case '\\': + if ((slash_question && (*str == '/' || *str == '?')) + || *str == '%' + || *str == '"' + || *str == '\'' + || *str == '\\' + || *str == '+' + || *str < 0x20 + || *str > 0x7E + ) { if (outsize < 4) { outsize = 0; break; @@ -291,13 +287,12 @@ sprintf(outbuf, "%%%.02X", (unsigned char)*str); outbuf += 3; outsize -= 3; - break; - case ' ': + } else if (*str == ' ') { *outbuf++ = '+'; - default: + outsize--; + } else { *outbuf++ = *str; outsize--; - break; } str++; } diff -uNr ircservices-5.0.27/modules/mail/Makefile ircservices-5.0.28/modules/mail/Makefile --- ircservices-5.0.27/modules/mail/Makefile 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/modules/mail/Makefile 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ # Makefile for protocol modules. # -# IRC Services is copyright (c) 1996-2003 Andrew Church. +# IRC Services is copyright (c) 1996-2004 Andrew Church. # E-mail: # Parts written by Andrew Kempe and others. # This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/mail/mail-local.h ircservices-5.0.28/modules/mail/mail-local.h --- ircservices-5.0.27/modules/mail/mail-local.h 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/mail/mail-local.h 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Internal mail system declarations. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/mail/mail.h ircservices-5.0.28/modules/mail/mail.h --- ircservices-5.0.27/modules/mail/mail.h 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/mail/mail.h 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Declarations for public mail routines. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/mail/main.c ircservices-5.0.28/modules/mail/main.c --- ircservices-5.0.27/modules/mail/main.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/mail/main.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Core mail-sending module. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/mail/sendmail.c ircservices-5.0.28/modules/mail/sendmail.c --- ircservices-5.0.27/modules/mail/sendmail.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/mail/sendmail.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Module to send mail using a "sendmail" program. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/mail/smtp.c ircservices-5.0.28/modules/mail/smtp.c --- ircservices-5.0.27/modules/mail/smtp.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/mail/smtp.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Module to send mail using the SMTP protocol. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/memoserv/Makefile ircservices-5.0.28/modules/memoserv/Makefile --- ircservices-5.0.27/modules/memoserv/Makefile 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/modules/memoserv/Makefile 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ # Makefile for MemoServ modules. # -# IRC Services is copyright (c) 1996-2003 Andrew Church. +# IRC Services is copyright (c) 1996-2004 Andrew Church. # E-mail: # Parts written by Andrew Kempe and others. # This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/memoserv/forward.c ircservices-5.0.28/modules/memoserv/forward.c --- ircservices-5.0.27/modules/memoserv/forward.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/memoserv/forward.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* MemoServ forwarding module. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for @@ -235,8 +235,7 @@ STRFTIME_DATE_TIME_FORMAT, now); timebuf[sizeof(timebuf)-1] = 0; snprintf(subject, sizeof(subject), - getstring(ngi,MEMO_FORWARD_MAIL_SUBJECT), - ngi->nicks[ngi->mainnick]); + getstring(ngi,MEMO_FORWARD_MAIL_SUBJECT), ngi_mainnick(ngi)); snprintf(body, sizeof(body), getstring(ngi,MEMO_FORWARD_MAIL_BODY), sender->nick, timebuf, text); if ((res = sendmail(ngi->email, subject, body)) != 0) { diff -uNr ircservices-5.0.27/modules/memoserv/ignore.c ircservices-5.0.28/modules/memoserv/ignore.c --- ircservices-5.0.27/modules/memoserv/ignore.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/memoserv/ignore.c 2004-02-05 21:00:50 +0900 @@ -1,7 +1,7 @@ /* MemoServ IGNORE module. * Written by Yusuf Iskenderoglu * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/memoserv/main.c ircservices-5.0.28/modules/memoserv/main.c --- ircservices-5.0.27/modules/memoserv/main.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/memoserv/main.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* MemoServ functions. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/memoserv/memoserv.h ircservices-5.0.28/modules/memoserv/memoserv.h --- ircservices-5.0.27/modules/memoserv/memoserv.h 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/memoserv/memoserv.h 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* MemoServ-related structures. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/misc/Makefile ircservices-5.0.28/modules/misc/Makefile --- ircservices-5.0.27/modules/misc/Makefile 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/modules/misc/Makefile 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ # Makefile for HelpServ modules. # -# IRC Services is copyright (c) 1996-2003 Andrew Church. +# IRC Services is copyright (c) 1996-2004 Andrew Church. # E-mail: # Parts written by Andrew Kempe and others. # This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/misc/devnull.c ircservices-5.0.28/modules/misc/devnull.c --- ircservices-5.0.27/modules/misc/devnull.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/misc/devnull.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* DevNull module. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/misc/helpserv.c ircservices-5.0.28/modules/misc/helpserv.c --- ircservices-5.0.27/modules/misc/helpserv.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/misc/helpserv.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* HelpServ functions. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/misc/xml-export.c ircservices-5.0.28/modules/misc/xml-export.c --- ircservices-5.0.27/modules/misc/xml-export.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/misc/xml-export.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Routines to export Services databases in XML format. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/misc/xml-import.c ircservices-5.0.28/modules/misc/xml-import.c --- ircservices-5.0.27/modules/misc/xml-import.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/misc/xml-import.c 2004-02-05 21:00:50 +0900 @@ -1,7 +1,7 @@ /* Routines to import Services databases from an XML file. Note that empty * tags (of the form "") are not supported. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for @@ -352,9 +352,8 @@ get_nickgroupinfo(ci->successor); if (ngi2) { error("Giving channel %s (owned by deleted" - " nick %s) to %s", - ci->name, ni->nick, - ngi2->nicks[ngi2->mainnick]); + " nick %s) to %s", ci->name, + ni->nick, ngi_mainnick(ngi2)); ci->founder = ci->successor; ci->successor = 0; } else { diff -uNr ircservices-5.0.27/modules/misc/xml.h ircservices-5.0.28/modules/misc/xml.h --- ircservices-5.0.27/modules/misc/xml.h 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/misc/xml.h 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Header for XML import/export modules. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/nickserv/Makefile ircservices-5.0.28/modules/nickserv/Makefile --- ircservices-5.0.27/modules/nickserv/Makefile 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/modules/nickserv/Makefile 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ # Makefile for NickServ modules. # -# IRC Services is copyright (c) 1996-2003 Andrew Church. +# IRC Services is copyright (c) 1996-2004 Andrew Church. # E-mail: # Parts written by Andrew Kempe and others. # This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/nickserv/access.c ircservices-5.0.28/modules/nickserv/access.c --- ircservices-5.0.27/modules/nickserv/access.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/nickserv/access.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Nickname access list module. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/nickserv/autojoin.c ircservices-5.0.28/modules/nickserv/autojoin.c --- ircservices-5.0.27/modules/nickserv/autojoin.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/nickserv/autojoin.c 2004-02-05 21:00:50 +0900 @@ -2,7 +2,7 @@ * Written by Yusuf Iskenderoglu * Idea taken from PTlink Services. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/nickserv/collide.c ircservices-5.0.28/modules/nickserv/collide.c --- ircservices-5.0.27/modules/nickserv/collide.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/nickserv/collide.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Routines related to nickname colliding. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/nickserv/link.c ircservices-5.0.28/modules/nickserv/link.c --- ircservices-5.0.27/modules/nickserv/link.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/nickserv/link.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Nickname linking module. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for @@ -167,11 +167,11 @@ if (ni2->nickgroup != ni->nickgroup) { delnick(ni2); msg = NICK_X_UNLINKED; - param1 = ngi2->nicks[ngi2->mainnick]; + param1 = ngi_mainnick(ngi2); } else { delnick(ni2); msg = NICK_UNLINKED; - param1 = ngi->nicks[ngi->mainnick]; + param1 = ngi_mainnick(ngi); } notice_lang(s_NickServ, u, msg, nick, param1); module_log("%s!%s@%s unlinked nick %s from %s", u->nick, @@ -235,7 +235,7 @@ notice_lang(s_NickServ, u, NICK_SET_MAINNICK_NOT_FOUND, param); } else { module_log("%s!%s@%s set main nick of %s (group %u) to %s", - u->nick, u->username, u->host, ngi->nicks[ngi->mainnick], + u->nick, u->username, u->host, ngi_mainnick(ngi), ngi->id, ngi->nicks[i]); ngi->mainnick = i; put_nickgroupinfo(ngi); diff -uNr ircservices-5.0.27/modules/nickserv/mail-auth.c ircservices-5.0.28/modules/nickserv/mail-auth.c --- ircservices-5.0.27/modules/nickserv/mail-auth.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/nickserv/mail-auth.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Nickname mail address authentication module. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for @@ -396,8 +396,9 @@ { int i; - /* FIXME: we assume here that if it's not a servadmin doing the change, - * it must be the user him/herself (and thus use u->nick and u->ni) */ + /* Note: we assume here that if it's not a servadmin doing the change, + * it must be the user him/herself (and thus use u->nick and u->ni). + * See also set.c:do_set_email(). */ if (ngi->email && !is_services_admin(u)) { make_auth(ngi, NICKAUTH_SET_EMAIL); if ((i = send_auth(u, ngi, u->nick, IS_EMAIL_CHANGE)) != 0) { diff -uNr ircservices-5.0.27/modules/nickserv/main.c ircservices-5.0.28/modules/nickserv/main.c --- ircservices-5.0.27/modules/nickserv/main.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/nickserv/main.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Main NickServ module. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/nickserv/nickserv.h ircservices-5.0.28/modules/nickserv/nickserv.h --- ircservices-5.0.27/modules/nickserv/nickserv.h 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/nickserv/nickserv.h 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* NickServ-related structures. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for @@ -205,6 +205,11 @@ #define valid_ngi(u) ((u) && ((u)->ngi) && ((u)->ngi != NICKGROUPINFO_INVALID)) + +/* Macro to retrieve the main nick for a given NickGroupInfo. */ + +#define ngi_mainnick(ngi) ((ngi)->nicks[(ngi)->mainnick]) + /*************************************************************************/ /*************************************************************************/ diff -uNr ircservices-5.0.27/modules/nickserv/ns-local.h ircservices-5.0.28/modules/nickserv/ns-local.h --- ircservices-5.0.27/modules/nickserv/ns-local.h 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/nickserv/ns-local.h 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Include file for data local to the NickServ module. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/nickserv/oldlink.c ircservices-5.0.28/modules/nickserv/oldlink.c --- ircservices-5.0.27/modules/nickserv/oldlink.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/nickserv/oldlink.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Nickname linking module (4.x compatibility version). * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for @@ -260,9 +260,9 @@ } if (msg >= 0) { if (msgparam[0]) - msgparam[1] = ngi->nicks[ngi->mainnick]; + msgparam[1] = ngi_mainnick(ngi); else - msgparam[0] = ngi->nicks[ngi->mainnick]; + msgparam[0] = ngi_mainnick(ngi); /* Set up new nick group */ new_ngi = new_nickgroupinfo(ni->nick); ARRAY_EXTEND(new_ngi->nicks); @@ -304,7 +304,7 @@ /* Tell people about it */ notice_lang(s_NickServ, u, msg, msgparam[0], msgparam[1]); module_log("%s!%s@%s unlinked nick %s from %s", u->nick, - u->username, u->host, u->nick, ngi->nicks[ngi->mainnick]); + u->username, u->host, u->nick, ngi_mainnick(ngi)); if (readonly) notice_lang(s_NickServ, u, READ_ONLY_MODE); } diff -uNr ircservices-5.0.27/modules/nickserv/sendpass.c ircservices-5.0.28/modules/nickserv/sendpass.c --- ircservices-5.0.27/modules/nickserv/sendpass.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/nickserv/sendpass.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* NickServ SENDPASS module. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/nickserv/set.c ircservices-5.0.28/modules/nickserv/set.c --- ircservices-5.0.27/modules/nickserv/set.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/nickserv/set.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Routines to handle the NickServ SET command. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for @@ -239,9 +239,7 @@ static void do_set_url(User *u, NickGroupInfo *ngi, char *param) { - /* FIXME: is this the best way to get the nick? (see also do_set_email, - * do_set_info, and etc in other files) */ - const char *nick = ngi->nicks[ngi->mainnick]; + const char *nick = ngi_mainnick(ngi); if (param && !valid_url(param)) { notice_lang(s_NickServ, u, BAD_URL); @@ -263,7 +261,7 @@ static void do_set_email(User *u, NickGroupInfo *ngi, char *param) { - const char *nick = ngi->nicks[ngi->mainnick]; + const char *nick = ngi_mainnick(ngi); char oldemail[BUFSIZE]; if (param && !valid_email(param)) { @@ -300,7 +298,11 @@ } notice_lang(s_NickServ, u, NICK_SET_EMAIL_CHANGED, nick, param); if (!is_services_admin(u)) { - /* FIXME (like mail-auth) this prolly wants a flag for self/other*/ + /* Note: this (like the SET EMAIL callback in mail-auth) + * assumes that only the user or a servadmin can change the + * E-mail address; if the user isn't a servadmin, therefore, + * they must be doing it to their own nick, and we use/modify + * the User structure. */ if (user_ident_nomail(u)) { u->ni->authstat &= ~NA_IDENT_NOMAIL; u->ni->authstat |= NA_IDENTIFIED; @@ -322,7 +324,7 @@ static void do_set_info(User *u, NickGroupInfo *ngi, char *param) { - const char *nick = ngi->nicks[ngi->mainnick]; + const char *nick = ngi_mainnick(ngi); free(ngi->info); if (param) { diff -uNr ircservices-5.0.27/modules/nickserv/util.c ircservices-5.0.28/modules/nickserv/util.c --- ircservices-5.0.27/modules/nickserv/util.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/nickserv/util.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* NickServ utility routines. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for @@ -651,7 +651,7 @@ call_callback_1(module, cb_delete, ni); del_nickinfo(ni); } - call_callback_2(module, cb_groupdelete, ngi, ngi->nicks[ngi->mainnick]); + call_callback_2(module, cb_groupdelete, ngi, ngi_mainnick(ngi)); del_nickgroupinfo(ngi); return 1; } @@ -726,7 +726,7 @@ if (ngi->authcode) { ngi->authset = now; module_log("unsuspend: altering authset time for %s (nickgroup" - " %u) to %ld", ngi->nicks[ngi->mainnick], ngi->id, + " %u) to %ld", ngi_mainnick(ngi), ngi->id, (long)ngi->authset); } ARRAY_FOREACH (i, ngi->nicks) { diff -uNr ircservices-5.0.27/modules/operserv/Makefile ircservices-5.0.28/modules/operserv/Makefile --- ircservices-5.0.27/modules/operserv/Makefile 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/modules/operserv/Makefile 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ # Makefile for OperServ modules. # -# IRC Services is copyright (c) 1996-2003 Andrew Church. +# IRC Services is copyright (c) 1996-2004 Andrew Church. # E-mail: # Parts written by Andrew Kempe and others. # This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/operserv/akill.c ircservices-5.0.28/modules/operserv/akill.c --- ircservices-5.0.27/modules/operserv/akill.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/operserv/akill.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Autokill list module. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/operserv/akill.h ircservices-5.0.28/modules/operserv/akill.h --- ircservices-5.0.27/modules/operserv/akill.h 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/operserv/akill.h 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Header for autokill stuff. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/operserv/main.c ircservices-5.0.28/modules/operserv/main.c --- ircservices-5.0.27/modules/operserv/main.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/operserv/main.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Main OperServ module. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for @@ -906,7 +906,7 @@ notice_lang(s_OperServ, u, OPER_ADMIN_LIST_HEADER); for (ngi = first_nickgroupinfo(); ngi; ngi = next_nickgroupinfo()) { if (ngi->os_priv >= NP_SERVADMIN) - notice(s_OperServ, u->nick, "%s", ngi->nicks[ngi->mainnick]); + notice(s_OperServ, u->nick, "%s", ngi_mainnick(ngi)); } } else { @@ -957,7 +957,7 @@ notice_lang(s_OperServ, u, OPER_OPER_LIST_HEADER); for (ngi = first_nickgroupinfo(); ngi; ngi = next_nickgroupinfo()) { if (ngi->os_priv >= NP_SERVOPER && ngi->os_priv < NP_SERVADMIN) - notice(s_OperServ, u->nick, "%s", ngi->nicks[ngi->mainnick]); + notice(s_OperServ, u->nick, "%s", ngi_mainnick(ngi)); } } else { diff -uNr ircservices-5.0.27/modules/operserv/maskdata.c ircservices-5.0.28/modules/operserv/maskdata.c --- ircservices-5.0.27/modules/operserv/maskdata.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/operserv/maskdata.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Miscellaneous MaskData-related functionality. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for @@ -128,6 +128,7 @@ } else if (stricmp(cmd, "LIST") == 0 || stricmp(cmd, "VIEW") == 0) { int is_view = stricmp(cmd,"VIEW")==0; + int count = 0; if (!mask) { mask = (char *)"*"; /* Not modified in this block */ @@ -146,8 +147,11 @@ for (md = first_maskdata(info->md_type); md; md = next_maskdata(info->md_type) ) { - if (!mask || (match_wild_nocase(mask, md->mask) && - (expires == -1 || md->expires == expires))) { + if (count < 50 && + (!mask || (match_wild_nocase(mask, md->mask) && + (expires == -1 || md->expires == expires))) + ) { + count++; if (is_view) { char timebuf[BUFSIZE], usedbuf[BUFSIZE]; char expirebuf[BUFSIZE]; diff -uNr ircservices-5.0.27/modules/operserv/maskdata.h ircservices-5.0.28/modules/operserv/maskdata.h --- ircservices-5.0.27/modules/operserv/maskdata.h 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/operserv/maskdata.h 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Header for common mask data structure. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/operserv/news.c ircservices-5.0.28/modules/operserv/news.c --- ircservices-5.0.27/modules/operserv/news.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/operserv/news.c 2004-02-05 21:00:50 +0900 @@ -1,7 +1,7 @@ /* News module. * Based on code by Andrew Kempe (TheShadow) * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/operserv/news.h ircservices-5.0.28/modules/operserv/news.h --- ircservices-5.0.27/modules/operserv/news.h 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/operserv/news.h 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* News data structures and constants. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/operserv/operserv.h ircservices-5.0.28/modules/operserv/operserv.h --- ircservices-5.0.27/modules/operserv/operserv.h 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/operserv/operserv.h 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Include file for OperServ. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/operserv/sessions.c ircservices-5.0.28/modules/operserv/sessions.c --- ircservices-5.0.27/modules/operserv/sessions.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/operserv/sessions.c 2004-02-05 21:00:50 +0900 @@ -2,7 +2,7 @@ * Based on code copyright (c) 1999-2000 Andrew Kempe (TheShadow) * E-mail: * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for @@ -259,8 +259,8 @@ session = get_session(host); if (!session) { wallops(s_OperServ, - "WARNING: Tried to delete non-existant session: \2%s", host); - module_log("Tried to delete non-existant session: %s", host); + "WARNING: Tried to delete non-existent session: \2%s", host); + module_log("Tried to delete non-existent session: %s", host); return; } @@ -642,15 +642,12 @@ static int do_stats_all(User *u) { int32 count, mem; - int i; Session *session; count = mem = 0; - for (i = 0; i < 1024; i++) { - for (session = first_session(); session; session = next_session()) { - count++; - mem += strlen(session->host)+1; - } + for (session = first_session(); session; session = next_session()) { + count++; + mem += sizeof(*session) + strlen(session->host)+1; } notice_lang(s_OperServ, u, OPER_STATS_ALL_SESSION_MEM, count, (mem+512) / 1024); @@ -732,8 +729,7 @@ /* Add user check callback at priority -10 so it runs after all the * autokill/S-line/whatever checks (otherwise we get users added to * sessions and then killed by S-lines, leaving the session count - * jacked up). FIXME: we really really need to document places where - * we use callback priorities. + * jacked up). */ if (!add_callback(NULL, "load module", do_load_module) || !add_callback(NULL, "unload module", do_unload_module) diff -uNr ircservices-5.0.27/modules/operserv/sessions.h ircservices-5.0.28/modules/operserv/sessions.h --- ircservices-5.0.27/modules/operserv/sessions.h 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/operserv/sessions.h 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Session exception interface. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/operserv/sline.c ircservices-5.0.28/modules/operserv/sline.c --- ircservices-5.0.27/modules/operserv/sline.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/operserv/sline.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* S-line module. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/operserv/sline.h ircservices-5.0.28/modules/operserv/sline.h --- ircservices-5.0.27/modules/operserv/sline.h 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/operserv/sline.h 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* S-line data structure and interface. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/protocol/Makefile ircservices-5.0.28/modules/protocol/Makefile --- ircservices-5.0.27/modules/protocol/Makefile 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/modules/protocol/Makefile 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ # Makefile for protocol modules. # -# IRC Services is copyright (c) 1996-2003 Andrew Church. +# IRC Services is copyright (c) 1996-2004 Andrew Church. # E-mail: # Parts written by Andrew Kempe and others. # This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/protocol/bahamut.c ircservices-5.0.28/modules/protocol/bahamut.c --- ircservices-5.0.27/modules/protocol/bahamut.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/protocol/bahamut.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Bahamut protocol module for IRC Services. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/protocol/banexcept.c ircservices-5.0.28/modules/protocol/banexcept.c --- ircservices-5.0.27/modules/protocol/banexcept.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/protocol/banexcept.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Ban exception related functions. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/protocol/banexcept.h ircservices-5.0.28/modules/protocol/banexcept.h --- ircservices-5.0.27/modules/protocol/banexcept.h 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/protocol/banexcept.h 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* banexcept.c header file. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/protocol/chanprot.c ircservices-5.0.28/modules/protocol/chanprot.c --- ircservices-5.0.27/modules/protocol/chanprot.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/protocol/chanprot.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Channel protect/founder (+a/+q) related functions. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/protocol/chanprot.h ircservices-5.0.28/modules/protocol/chanprot.h --- ircservices-5.0.27/modules/protocol/chanprot.h 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/protocol/chanprot.h 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* chanprot.c header file. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/protocol/dalnet.c ircservices-5.0.28/modules/protocol/dalnet.c --- ircservices-5.0.27/modules/protocol/dalnet.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/protocol/dalnet.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* DALnet (4.4.13-) protocol module for IRC Services. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/protocol/dreamforge.c ircservices-5.0.28/modules/protocol/dreamforge.c --- ircservices-5.0.27/modules/protocol/dreamforge.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/protocol/dreamforge.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Dreamforge protocol module for IRC Services. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/protocol/halfop.c ircservices-5.0.28/modules/protocol/halfop.c --- ircservices-5.0.27/modules/protocol/halfop.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/protocol/halfop.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Halfop (+h) related functions. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/protocol/halfop.h ircservices-5.0.28/modules/protocol/halfop.h --- ircservices-5.0.27/modules/protocol/halfop.h 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/protocol/halfop.h 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* halfop.c header file. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/protocol/monkey.c ircservices-5.0.28/modules/protocol/monkey.c --- ircservices-5.0.27/modules/protocol/monkey.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/protocol/monkey.c 2004-02-05 21:00:50 +0900 @@ -4,7 +4,7 @@ * It is maintained by Chris Plant * E-mail: * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/protocol/ptlink.c ircservices-5.0.28/modules/protocol/ptlink.c --- ircservices-5.0.27/modules/protocol/ptlink.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/protocol/ptlink.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* PTlink protocol module for IRC Services. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for @@ -215,6 +215,8 @@ { if (ac < 2) { module_log("received SVINFO with <2 parameters--broken ircd?"); + send_error("Invalid SVINFO received (at least 2 parameters needed)"); + quitting = 1; } else { if (atoi(av[1]) > 6 || atoi(av[0]) < 6) { send_error("Need protocol version 6 support"); diff -uNr ircservices-5.0.27/modules/protocol/rfc1459.c ircservices-5.0.28/modules/protocol/rfc1459.c --- ircservices-5.0.27/modules/protocol/rfc1459.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/protocol/rfc1459.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* RFC1459 protocol module for IRC Services. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/protocol/sjoin.c ircservices-5.0.28/modules/protocol/sjoin.c --- ircservices-5.0.27/modules/protocol/sjoin.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/protocol/sjoin.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* SJOIN-related functions. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/protocol/sjoin.h ircservices-5.0.28/modules/protocol/sjoin.h --- ircservices-5.0.27/modules/protocol/sjoin.h 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/protocol/sjoin.h 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* sjoin.c header file. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/protocol/svsnick.c ircservices-5.0.28/modules/protocol/svsnick.c --- ircservices-5.0.27/modules/protocol/svsnick.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/protocol/svsnick.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Code for servers supporting the ircd.dal SVSNICK command. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/protocol/svsnick.h ircservices-5.0.28/modules/protocol/svsnick.h --- ircservices-5.0.27/modules/protocol/svsnick.h 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/protocol/svsnick.h 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* SVSNICK support external declarations. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/protocol/token.c ircservices-5.0.28/modules/protocol/token.c --- ircservices-5.0.27/modules/protocol/token.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/protocol/token.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Routines for processing message tokens. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/protocol/token.h ircservices-5.0.28/modules/protocol/token.h --- ircservices-5.0.27/modules/protocol/token.h 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/protocol/token.h 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Declarations for token handling. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/protocol/trircd.c ircservices-5.0.28/modules/protocol/trircd.c --- ircservices-5.0.27/modules/protocol/trircd.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/protocol/trircd.c 2004-02-05 21:00:50 +0900 @@ -1,7 +1,7 @@ /* trircd protocol module for IRC Services. * Provided by Yusuf Iskenderoglu * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/protocol/ts8.c ircservices-5.0.28/modules/protocol/ts8.c --- ircservices-5.0.27/modules/protocol/ts8.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/protocol/ts8.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* RFC1459+TS8 protocol module for IRC Services. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/protocol/undernet-p9.c ircservices-5.0.28/modules/protocol/undernet-p9.c --- ircservices-5.0.27/modules/protocol/undernet-p9.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/protocol/undernet-p9.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Undernet 2.9.x (P9) protocol module for IRC Services. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/protocol/unreal.c ircservices-5.0.28/modules/protocol/unreal.c --- ircservices-5.0.27/modules/protocol/unreal.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/protocol/unreal.c 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Unreal protocol module for IRC Services. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/statserv/Makefile ircservices-5.0.28/modules/statserv/Makefile --- ircservices-5.0.27/modules/statserv/Makefile 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/modules/statserv/Makefile 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ # Makefile for StatServ modules. # -# IRC Services is copyright (c) 1996-2003 Andrew Church. +# IRC Services is copyright (c) 1996-2004 Andrew Church. # E-mail: # Parts written by Andrew Kempe and others. # This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/statserv/main.c ircservices-5.0.28/modules/statserv/main.c --- ircservices-5.0.27/modules/statserv/main.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/statserv/main.c 2004-02-05 21:00:50 +0900 @@ -2,7 +2,7 @@ * Based on code (c) Andrew Kempe (TheShadow) * E-mail: * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules/statserv/statserv.h ircservices-5.0.28/modules/statserv/statserv.h --- ircservices-5.0.27/modules/statserv/statserv.h 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/modules/statserv/statserv.h 2004-02-05 21:00:50 +0900 @@ -1,6 +1,6 @@ /* Statistical information. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules.c ircservices-5.0.28/modules.c --- ircservices-5.0.27/modules.c 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/modules.c 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* Module support. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/modules.h ircservices-5.0.28/modules.h --- ircservices-5.0.27/modules.h 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/modules.h 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* Module support include file (interface definition). * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/process.c ircservices-5.0.28/process.c --- ircservices-5.0.27/process.c 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/process.c 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* Main processing code for Services. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/send.c ircservices-5.0.28/send.c --- ircservices-5.0.27/send.c 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/send.c 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* Routines for sending stuff to the network. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/servers.c ircservices-5.0.28/servers.c --- ircservices-5.0.27/servers.c 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/servers.c 2004-02-05 21:00:49 +0900 @@ -2,7 +2,7 @@ * by Andrew Kempe (TheShadow) * E-mail: * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/servers.h ircservices-5.0.28/servers.h --- ircservices-5.0.27/servers.h 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/servers.h 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* Online server data. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/services.h ircservices-5.0.28/services.h --- ircservices-5.0.27/services.h 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/services.h 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* Main header for Services. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/signals.c ircservices-5.0.28/signals.c --- ircservices-5.0.27/signals.c 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/signals.c 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* Signal handling routines. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for @@ -97,15 +97,20 @@ signal(SIGTSTP, SIG_IGN); /* If we died processing a message, let people know about it */ - if (*inbuf && signum != SIGINT && signum != SIGQUIT) { - log("PANIC! buffer = %s", inbuf); - /* Cut off if this would make IRC command >510 characters. */ - if (strlen(inbuf) > 448) { - inbuf[446] = '>'; - inbuf[447] = '>'; - inbuf[448] = 0; + if (signum != SIGINT && signum != SIGQUIT) { + if (*inbuf) { + log("PANIC! signal %d, buffer = %s", signum, inbuf); + /* Cut off if this would make IRC command >510 characters. */ + if (strlen(inbuf) > 448) { + inbuf[446] = '>'; + inbuf[447] = '>'; + inbuf[448] = 0; + } + wallops(NULL, "PANIC! buffer = %s\r\n", inbuf); + } else { + log("PANIC! signal %d (no buffer)", signum); + wallops(NULL, "PANIC! signal %d (no buffer)", signum); } - wallops(NULL, "PANIC! buffer = %s\r\n", inbuf); } /* Pick an appropriate quit message */ diff -uNr ircservices-5.0.27/sockets.c ircservices-5.0.28/sockets.c --- ircservices-5.0.27/sockets.c 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/sockets.c 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* Socket routines. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/sockets.h ircservices-5.0.28/sockets.h --- ircservices-5.0.27/sockets.h 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/sockets.h 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* Definitions/declarations for socket utility routines. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/suspinfo.c ircservices-5.0.28/suspinfo.c --- ircservices-5.0.27/suspinfo.c 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/suspinfo.c 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* Routines to allocate and free SuspendInfo structures. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/timeout.c ircservices-5.0.28/timeout.c --- ircservices-5.0.27/timeout.c 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/timeout.c 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* Routines for time-delayed actions. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/timeout.h ircservices-5.0.28/timeout.h --- ircservices-5.0.27/timeout.h 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/timeout.h 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* Time-delay routine include stuff. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/tools/Makefile ircservices-5.0.28/tools/Makefile --- ircservices-5.0.27/tools/Makefile 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/tools/Makefile 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ # Makefile for Services tools directory. # -# IRC Services is copyright (c) 1996-2003 Andrew Church. +# IRC Services is copyright (c) 1996-2004 Andrew Church. # E-mail: # Parts written by Andrew Kempe and others. # This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/tools/convert-cygnus.c ircservices-5.0.28/tools/convert-cygnus.c --- ircservices-5.0.27/tools/convert-cygnus.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/tools/convert-cygnus.c 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* Conversion routines for Cygnus 0.2.0. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/tools/convert-db.c ircservices-5.0.28/tools/convert-db.c --- ircservices-5.0.27/tools/convert-db.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/tools/convert-db.c 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* Convert other programs' databases to XML. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/tools/convert-db.h ircservices-5.0.28/tools/convert-db.h --- ircservices-5.0.27/tools/convert-db.h 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/tools/convert-db.h 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* External declarations for convert-db. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/tools/convert-epona.c ircservices-5.0.28/tools/convert-epona.c --- ircservices-5.0.27/tools/convert-epona.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/tools/convert-epona.c 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* Conversion routines for Epona databases (version 1.3.0 and later). * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/tools/convert-magick.c ircservices-5.0.28/tools/convert-magick.c --- ircservices-5.0.27/tools/convert-magick.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/tools/convert-magick.c 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* Conversion routines for Magick 1.4b2 and Wrecked 1.2 databases. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/tools/convert-ptlink.c ircservices-5.0.28/tools/convert-ptlink.c --- ircservices-5.0.27/tools/convert-ptlink.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/tools/convert-ptlink.c 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* Conversion routines for PTlink >= 2.13.x databases. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/tools/convert-sirv.c ircservices-5.0.28/tools/convert-sirv.c --- ircservices-5.0.27/tools/convert-sirv.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/tools/convert-sirv.c 2004-02-05 21:00:49 +0900 @@ -1,7 +1,7 @@ /* Conversion routines for SirvNET databases (any version), Auspice * databases (versions 2.5-2.7), and Bolivia databases (version 1.2.0). * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/tools/convert-trircd.c ircservices-5.0.28/tools/convert-trircd.c --- ircservices-5.0.27/tools/convert-trircd.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/tools/convert-trircd.c 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* Conversion routines for trircd Services program (version 4.26). * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for @@ -211,7 +211,7 @@ SAFE(read_buffer(nickbuf, f)); ngi = get_nickgroupinfo_by_nick(nickbuf); - is_root = ngi && stricmp(nickbuf, ngi->nicks[ngi->mainnick]) == 0; + is_root = ngi && stricmp(nickbuf, ngi_mainnick(ngi)) == 0; SAFE(read_int16(&tmp16, f)); /* ajoincount */ if (is_root) { ngi->ajoin_count = tmp16; diff -uNr ircservices-5.0.27/tools/convert-ver8.c ircservices-5.0.28/tools/convert-ver8.c --- ircservices-5.0.27/tools/convert-ver8.c 2003-12-03 11:48:46 +0900 +++ ircservices-5.0.28/tools/convert-ver8.c 2004-02-05 21:00:49 +0900 @@ -1,7 +1,7 @@ /* Conversion routines for datafile version 8 based databases (Daylight and * IRCS 1.2). * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/tools/ircservices-chk.in ircservices-5.0.28/tools/ircservices-chk.in --- ircservices-5.0.27/tools/ircservices-chk.in 2003-01-22 23:45:17 +0900 +++ ircservices-5.0.28/tools/ircservices-chk.in 2004-01-22 09:31:35 +0900 @@ -6,7 +6,7 @@ # ircservices-options: options to pass to ircservices executable # If you change PIDFile in ircservices.conf, also change PIDFILE below. # -# IRC Services is copyright (c) 1996-2003 Andrew Church. +# IRC Services is copyright (c) 1996-2004 Andrew Church. # E-mail: # Parts written by Andrew Kempe and others. # This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/users.c ircservices-5.0.28/users.c --- ircservices-5.0.27/users.c 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/users.c 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* Routines to maintain a list of online users. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/users.h ircservices-5.0.28/users.h --- ircservices-5.0.27/users.h 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/users.h 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* Online user data structure. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/version.h ircservices-5.0.28/version.h --- ircservices-5.0.27/version.h 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/version.h 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* External declarations for version.c. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/version.sh ircservices-5.0.28/version.sh --- ircservices-5.0.27/version.sh 2003-12-03 11:28:48 +0900 +++ ircservices-5.0.28/version.sh 2004-02-05 20:54:51 +0900 @@ -6,7 +6,7 @@ # $PROGRAM is the string returned as the first part of a /VERSION reply, # and must not contain spaces. It is not used anywhere else. PROGRAM=ircservices -VERSION=5.0.27 +VERSION=5.0.28 # Increment Services build number if [ -f version.c ] ; then @@ -27,7 +27,7 @@ cat >version.c < * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for diff -uNr ircservices-5.0.27/vsnprintf.c ircservices-5.0.28/vsnprintf.c --- ircservices-5.0.27/vsnprintf.c 2003-12-03 11:48:45 +0900 +++ ircservices-5.0.28/vsnprintf.c 2004-02-05 21:00:49 +0900 @@ -1,6 +1,6 @@ /* An implementation of vsnprintf() for systems that don't have it. * - * IRC Services is copyright (c) 1996-2003 Andrew Church. + * IRC Services is copyright (c) 1996-2004 Andrew Church. * E-mail: * Parts written by Andrew Kempe and others. * This program is free but copyrighted software; see the file COPYING for