diff -uNr ircservices-5.0.54/Changes ircservices-5.0.55/Changes --- ircservices-5.0.54/Changes 2005-08-16 11:19:37 +0900 +++ ircservices-5.0.55/Changes 2005-09-26 12:50:33 +0900 @@ -1,5 +1,10 @@ Version 5.0 ----------- +2005/09/26 .55 Added documentation on CSSetChannelTime configuration option. +2005/08/25 Fixed rare bug allowing users to gain voice status + improperly. Reported by Anton Wolkov +2005/08/23 Added "authed" callback for newly-authorized nicknames. + Suggested by Robin Burchell 2005/08/16 .54 The ChanServ check_kick callback now passes the channel name as a string instead of the Channel structure, so the channel name can be known even if the channel is diff -uNr ircservices-5.0.54/actions.c ircservices-5.0.55/actions.c --- ircservices-5.0.54/actions.c 2005-08-16 12:42:19 +0900 +++ ircservices-5.0.55/actions.c 2005-09-26 12:55:52 +0900 @@ -287,7 +287,7 @@ * sent out in a single command, decreasing network traffic (and scroll). * This function should be called as either: * set_cmode(sender, channel, modes, param1, param2...) - * to send a channel mode, or + * to send one or more channel modes, or * set_cmode(NULL, channel) * to flush buffered modes for a channel (if `channel' is NULL, flushes * buffered modes for all channels). diff -uNr ircservices-5.0.54/docs/3.html ircservices-5.0.55/docs/3.html --- ircservices-5.0.54/docs/3.html 2005-03-31 18:19:08 +0900 +++ ircservices-5.0.55/docs/3.html 2005-09-26 12:49:40 +0900 @@ -711,9 +711,31 @@ administrators (see section 3-4-1). Channels which have already been registered can be used with Services as usual. + +

Most modern IRC servers keep track of the time a channel was created, +and use that time to keep track of which channel is the "original" channel +during netsplits. For example, if server A splits from the network and +no users on server A are in channel #B, then channel #B +will disappear from server A; if a user on server A then enters channel +#B while the server is still split, he will gain channel operator +privileges, which he would (in the absence of these timestamps) keep even +after the server rejoined the network. Services can take advantage of this +feature to set the timestamp of registered channels to the time of channel +registration, ensuring that the channel's proper modes will always be +retained through netsplits. This functionality is enabled with the +CSSetChannelTime +configuration option in modules.conf (note that the option is +located in the protocol module section, rather than the ChanServ module +section; it is planned to be moved to the ChanServ section in version 5.1 +of Services). However, the use of this option has the unfortunate side +effect of generating spurious mode changes and warning messages on many IRC +servers; these can be safely ignored, but if they prove to be a bother, you +may want to consider disabling the option. (See FAQ +E.11 for details.) +

Finally, note that the channel "#" (a single "#" character with no name following) is treated specially by Services. While -this channel is legal according to the IRC protocol (RFC 1459) and in fact +this channel is legal according to the IRC protocol (RFC 1459) and supported by most, if not all, IRC servers, it requires special treatment for use with a number of Services functions, and in fact bugs in previous versions of Services as well as other Services-like programs have allowed diff -uNr ircservices-5.0.54/docs/5.html ircservices-5.0.55/docs/5.html --- ircservices-5.0.54/docs/5.html 2005-01-25 17:54:38 +0900 +++ ircservices-5.0.55/docs/5.html 2005-09-22 01:20:36 +0900 @@ -38,11 +38,21 @@ ircservices.conf file to enable this option. The option has the format "-export" or "-export=filename", where filename is the name of the file to write the XML data to; -if it does not begin with a slash, it is taken relative to the Services -data directory (the directory containing the database and log files). If -filename is not given or is a single hyphen ("-"), -the data will be printed on standard output. When the export completes, -Services will terminate, and will not connect to the IRC network. +if it does not begin with a slash, it is taken to be relative to the +Services data directory (the directory containing the database and log +files). If filename is not given or is a single hyphen +("-"), the data will be printed on standard output. When the +export completes, Services will terminate, and will not connect to the IRC +network. This action can be performed while another copy of Services is +running, but the output will not include changes made online since the +last time the databases were saved to disk. (It is also possible for the +running copy of Services to report a "data directory locked" error if it +tries to save the databases while the export operation is in progress. +This is harmless; you can force the databases to be written after the +export completes by using the OperServ +UPDATE command, but do not use +the FORCE option while the export is still running as this may +result in corrupted database files.)

Additionally, if the misc/xml-export module is loaded into Services, the HTTP database access module (httpd/dbaccess) will @@ -54,7 +64,7 @@ Internet Explorer, right-click on the link and select "Save target as..." from the pop-up menu. -

The format of the exported XML data is discussed in +

The format of the exported XML data is described in Appendix B. No DTD is currently available.

Notes: Services will not respond to any network activity while you @@ -63,8 +73,8 @@ even get disconnected from the network in extreme cases. Additionally, be aware that the data may change after you have downloaded it; if you want to avoid this, for example when exporting data to move it to another machine -or network, use the command-line option -export rather than the -HTTP server interface. +or network, use the command-line option -export (after shutting +Services down) rather than the HTTP server interface.

Note to Internet Explorer users: Some versions of Internet Explorer have a bug which can prevent the XML data from being displayed or @@ -104,11 +114,11 @@

To import a set of data stored in XML format into Services, start Services with the command-line option "-import=filename", where filename is the name of the file containing the data; -if it does not begin with a slash, it is taken relative to the Services -data directory. Services will parse the data file, and if no errors are -found, the data will be merged into Services' databases and the program -will terminate. If problems are found, they will be printed on standard -output. +if it does not begin with a slash, it is taken to be relative to the +Services data directory. Services will parse the data file, and if no +errors are found, the data will be merged into Services' databases and the +program will terminate. If problems are found, they will be printed on +standard output and the databases will not be modified.

Normally, if nickname or channel "collisions" occur—that is, if a nickname or channel in the input data is already registered in Services' @@ -324,11 +334,11 @@ have no privileges on the channel.

  • Services does not support "root" and "master" privilege levels as in Auspice. There can only be one root nickname, which is set in - ircservices.conf; all root/master settings in the data - files will be discarded. (Admin/oper settings will be retained.) - Note that Services admins can perform any function (except - modifying the admin list), including modifying Services settings - and shutting down Services. + modules.conf; all root/master settings in the data files + will be discarded. (Admin/oper settings will be retained.) Note + that Services admins can perform any function (except modifying the + admin list), including modifying Services settings and shutting + down Services.
  • NickServ AUTH, COMMENT, NOTE, LOCK, MARK, SET KILL HIGH, SETFLAG AUTOJOIN, and SETMLOCK, as well as ChanServ BADWORDS, @@ -379,7 +389,7 @@
  • Nicknames designated as CSOPs will be converted to Services operators. Note that the privileges granted by IRC Services to Services - operators are different than those granted by Cygnus to CSOPs. + operators are different from those granted by Cygnus to CSOPs.
  • Nicknames will retain their memo limit settings in the converted data; however, they will not be affected by changes to the MSMaxMemos diff -uNr ircservices-5.0.54/docs/6.html ircservices-5.0.55/docs/6.html --- ircservices-5.0.54/docs/6.html 2005-08-16 11:16:13 +0900 +++ ircservices-5.0.55/docs/6.html 2005-08-23 14:11:06 +0900 @@ -1169,7 +1169,18 @@

    6-2-3. NickServ callbacks

    -
    +
    +authed (module nickserv/mail-auth) +
    Parameters: User *u, NickInfo *ni, + NickGroupInfo *ngi, int authreason +
    Called when a user successfully authenticates their nickname with + the AUTH command, after all normal processing has been + performed. authreason is the value that the + ngi->authreason field had before being cleared (one of + the NICKAUTH_* constants). The callback routine should + always return 0. + +

    cancel_user
    Parameters: User *u, int old_status, int old_authstat diff -uNr ircservices-5.0.54/docs/faq.html ircservices-5.0.55/docs/faq.html --- ircservices-5.0.54/docs/faq.html 2005-02-23 03:26:50 +0900 +++ ircservices-5.0.55/docs/faq.html 2005-09-26 12:44:52 +0900 @@ -124,6 +124,9 @@
    E.10. Why are the STATUS error messages so strange? Why doesn't STATUS obey the language setting in NickServ? +
    E.11. Whenever a user enters an empty channel, I see + messages about "channel TS", and the user loses and then gets + channel ops again.

    F. OperServ features

    F.1. Using the OperServ JUPE command results in server @@ -834,6 +837,30 @@
    + +

    E.11. Whenever a user enters an empty channel, I see + messages about "channel TS", and the user loses and then gets + channel ops again. +

    + These messages and mode changes are harmless, and are caused by the +CSSetChannelTime + configuration option (see also + section 3-2-1). This + functionality is implemented by sending a message to the network + that Services has the "proper" timestamp (TS) and modes for the + channel. Unfortunately, many IRC servers blindly cancel their own + modes, including the channel ops of the user who initially joined + the channel, before noticing that Services is not actually changing + any modes; this resultes in the server sending out a "-o" + mode change immediately followed by a "+o". Some servers + also seem to think that the timestamp change is a bug (or hack + attempt) and send out a warning to IRC operators about it. +

    + All of these messages are harmless and can be safely ignored, but + if they bother you, you may want to consider disabling the + CSSetChannelTime option. +

    +


    diff -uNr ircservices-5.0.54/docs/upgrade.html ircservices-5.0.55/docs/upgrade.html --- ircservices-5.0.54/docs/upgrade.html 2003-05-28 15:31:04 +0900 +++ ircservices-5.0.55/docs/upgrade.html 2005-09-22 01:02:34 +0900 @@ -63,7 +63,10 @@ "listnicks" and "listchans", to show nickname and channel data from the command line. These programs have been removed in version 5.0 in favor of the new HTTP interface; the httpd/dbaccess -module provides the same functionality and much, much more. +module provides the same functionality and much, much more. (It is still +possible to retrieve data from the command line as well, using the +-export option; see section 5-1 for +details.)


    @@ -127,6 +130,19 @@ linked must be unregistered nicknames, which is also a change from version 4.x; make sure your users are aware of these changes. +

    Related to these changes, it is also important to note that the +behavior of the NickServ UNLINK and DROP commands has +changed with respect to de-registration of nicknames; in particular, the +DROP command will now drop all linked nicknames! The +syntax for the DROP command has changed as well, requiring a +password to confirm the action, and the help message includes a warning, +but be aware that users may simply append their password to the command +without checking the help message, resulting in the unintended +de-registration of all of the user's nicks. The UNLINK command +should be used to cancel single nicknames out of a group of links (a +nickname which is unlinked is deregistered as well, similar to +UNLINK followed by DROP in version 4.x). +


    diff -uNr ircservices-5.0.54/modules/chanserv/check.c ircservices-5.0.55/modules/chanserv/check.c --- ircservices-5.0.54/modules/chanserv/check.c 2005-08-16 12:42:20 +0900 +++ ircservices-5.0.55/modules/chanserv/check.c 2005-09-26 12:55:53 +0900 @@ -26,7 +26,7 @@ static int cb_check_kick = -1; static void local_set_cumodes(Channel *c, char plusminus, int32 modes, - const char *nick); + struct c_userlist *cu); /*************************************************************************/ /*************************************************************************/ @@ -173,7 +173,7 @@ if (!((oldmodes & cumode_h) && !((oldmodes^modes) & ~(CUMODE_v|cumode_h))) ) { - local_set_cumodes(c, '-', (modes & ~oldmodes), user->nick); + local_set_cumodes(c, '-', (modes & ~oldmodes), u); } } return; @@ -218,7 +218,7 @@ if ((res & ~modes) && (oldmodes < 0 || is_servermode || (ci->flags & CI_ENFORCE)) ) { - local_set_cumodes(c, '+', res & ~modes, user->nick); + local_set_cumodes(c, '+', res & ~modes, u); if ((res & ~modes) & CUMODE_o) { ci->last_used = time(NULL); put_channelinfo(ci); @@ -231,7 +231,7 @@ /* Check for mode subtractions */ if (res & modes) - local_set_cumodes(c, '-', res & modes, user->nick); + local_set_cumodes(c, '-', res & modes, u); } /*************************************************************************/ @@ -446,11 +446,11 @@ /*************************************************************************/ /* Helper routine for check_chan_user_modes(): sets all of the given modes - * on client `nick' in channel `c'. + * on client `cu' in channel `c'. */ static void local_set_cumodes(Channel *c, char plusminus, int32 modes, - const char *nick) + struct c_userlist *cu) { char buf[3], modestr[BUFSIZE], *s; @@ -461,8 +461,14 @@ s = modestr; while (*s) { buf[1] = *s++; - set_cmode(s_ChanServ, c, buf, nick); + set_cmode(s_ChanServ, c, buf, cu->user->nick); } + /* Set user's modes now, so check_chan_user_modes() can properly + * determine whether subsequent modes should be set or not */ + if (plusminus == '+') + cu->mode |= modes; + else if (plusminus == '-') + cu->mode &= ~modes; } /*************************************************************************/ diff -uNr ircservices-5.0.54/modules/nickserv/mail-auth.c ircservices-5.0.55/modules/nickserv/mail-auth.c --- ircservices-5.0.54/modules/nickserv/mail-auth.c 2005-08-16 12:42:21 +0900 +++ ircservices-5.0.55/modules/nickserv/mail-auth.c 2005-09-26 12:55:54 +0900 @@ -44,6 +44,8 @@ static time_t NSNoAuthExpire = 0; static time_t NSSendauthDelay = 0; +static int cb_authed = -1; + static void do_auth(User *u); static void do_sendauth(User *u); @@ -197,6 +199,7 @@ } module_log("%s@%s authenticated %s for %s", u->username, u->host, what, ni->nick); + call_callback_4(module, cb_authed, u, ni, ngi, authreason); } } @@ -497,6 +500,13 @@ return 0; } + cb_authed = register_callback(module, "authed"); + if (cb_authed < 0) { + module_log("Unable to register callback"); + exit_module(0); + return 0; + } + if (!add_callback(module_nickserv, "registered", do_registered) || !add_callback(module_nickserv, "SET EMAIL", do_set_email) || !add_callback(module_nickserv, "IDENTIFY check", do_identify_check) @@ -558,6 +568,8 @@ module_nickserv = NULL; } + unregister_callback(module, cb_authed); + return 1; } diff -uNr ircservices-5.0.54/version.sh ircservices-5.0.55/version.sh --- ircservices-5.0.54/version.sh 2005-08-16 11:19:58 +0900 +++ ircservices-5.0.55/version.sh 2005-08-25 15:00:53 +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.54 +VERSION=5.0.55 # Increment Services build number if [ -f version.c ] ; then