ThiefMaster [Sun, 20 May 2007 10:16:17 +0000 (12:16 +0200)]
Reject invalid durations in addnote.
Michael Poole [Sun, 20 May 2007 15:59:43 +0000 (11:59 -0400)]
Avoid crashing when BURST has missing modes.
src/proto-p10.c (cmd_burst): If the expected number of modes is larger
than the actual number, only unsplit and advance by the actual number.
ThiefMaster [Fri, 4 May 2007 20:24:09 +0000 (22:24 +0200)]
Check if there are opers on the target ip in trace gag/gline and block.
ThiefMaster [Wed, 2 May 2007 15:52:28 +0000 (17:52 +0200)]
Added idletime to remote whois.
ThiefMaster [Mon, 30 Apr 2007 11:19:36 +0000 (13:19 +0200)]
Made ounregister command safer by requiring FORCE to unregister active/flagged accounts.
ThiefMaster [Sat, 14 Apr 2007 18:54:02 +0000 (20:54 +0200)]
* Disallow BLOCK on trusted ips
* Add ABUSE TRUSTED criterion for alerts/trace
ThiefMaster [Sat, 14 Apr 2007 17:06:53 +0000 (19:06 +0200)]
Only allow opers with access to GLINE to use a custom duration in BLOCK.
ThiefMaster [Sat, 7 Apr 2007 18:06:24 +0000 (20:06 +0200)]
Check account-based alerts when someone authenticates.
ThiefMaster [Fri, 6 Apr 2007 22:06:24 +0000 (00:06 +0200)]
* Reject durations containing invalid characters (like "1day" instead of "1d").
* Add duration to opserv.block.
ThiefMaster [Fri, 6 Apr 2007 13:05:05 +0000 (15:05 +0200)]
Do not display account notes to non-staff.
Michael Poole [Wed, 23 May 2007 02:39:39 +0000 (22:39 -0400)]
Fix unreg_{notice,privmsg}_func().
proto.h: Remove the useless second parameter.
proto-bahamut.c: Implement the functions.
proto-p10.c: Make them non-buggy.
Michael Poole [Sun, 1 Apr 2007 00:27:50 +0000 (20:27 -0400)]
Use appropriate upper bounds for account searches.
src/nickserv.c (nickserv_discrim_create): Set max_level and lastseen to
more appropriate values.
Michael Poole [Sat, 31 Mar 2007 17:52:13 +0000 (13:52 -0400)]
Fix DNR searching for globs.
src/chanserv.c (dnr_search_matches): Fix the order of arguments to
match_ircglob().
Michael Poole [Sat, 31 Mar 2007 17:26:31 +0000 (13:26 -0400)]
Use correct free functions for blacklist dicts.
src/mod-blacklist.c (blacklist_conf_read): Use dnsbl_zone_free() to free
zone structures, and free() to free blacklist reasons, rather than
vice versa.
Michael Poole [Sat, 31 Mar 2007 17:24:56 +0000 (13:24 -0400)]
Add "dnrsearch count" action.
src/chanserv.c (dnr_count_func): New function.
(cmd_dnrsearch): Recognize it.
(init_chanserv): Register it.
src/chanserv.help (DNRSEARCH ACTION): Document it.
Michael Poole [Sat, 31 Mar 2007 17:20:19 +0000 (13:20 -0400)]
For giveownership to new members, give old owner access 499 instead of 400.
src/chanserv.c (cmd_giveownership): When the new user did not exist, give
them UL_OWNER-1 (499) access rather than UL_COOWNER, so that when the
access levels are swapped later, the previous owner ends up with 499.
Michael Poole [Sat, 31 Mar 2007 17:15:52 +0000 (13:15 -0400)]
NickServ "notes" command, "oset <command>" restriction, fakehost searching.
src/nickserv.c (msgtab): New entries for the "notes" command.
(cmd_notes): New function to show notes for an account.
(cmd_oset): Check access for subcommands.
(struct nickserv_discrim): New "fakehostmask" field.
(nickserv_discrim_create): Set it.
(nickserv_discrim_match): Check against it.
(init_nickserv): Register NOTES and OSET KARMA commands.
src/nickserv.help (SEARCH CRITERIA): Mention FAKEHOST and KARMA options.
Michael Poole [Sat, 31 Mar 2007 16:11:28 +0000 (12:11 -0400)]
Add typecast to avoid a warning from some buggy Gentoo version of gcc.
src/mod-blacklist.c (do_expandos): Typecast an expression that is
supposed to have type size_t (which is unsigned) to unsigned.
Michael Poole [Sat, 31 Mar 2007 16:09:25 +0000 (12:09 -0400)]
Avoid crashing in chanserv_is_dnr() when handle == NULL.
Michael Poole [Sat, 31 Mar 2007 16:09:03 +0000 (12:09 -0400)]
Add missing newline to "Forking into the background" display.
Michael Poole [Fri, 30 Mar 2007 01:48:22 +0000 (21:48 -0400)]
Replace ChangeLog appropriately.
Make "version git" work in addition to "version arch".
Michael Poole [Mon, 19 Mar 2007 03:05:55 +0000 (23:05 -0400)]
Add an asynchronous resolver library.
src/Makefile.am: Add sar.* to the build.
src/main.c: Call sar_init().
src/sar.*: The srvx asynchronous resolver.
src/mod-blacklist.c: Use it to add DNSBL support.
srvx.conf.eaxmple: Document the DNSBL support and sar options.
Michael Poole [Sun, 18 Mar 2007 17:36:31 +0000 (13:36 -0400)]
Add file-based IP blacklist module.
src/mod-blacklist.c: New module.
srvx.conf.example: Document its configuration options.
Michael Poole [Sun, 18 Mar 2007 17:33:43 +0000 (13:33 -0400)]
Remove unnecessary #include from proto.h
src/proto.h: We no longer need to #include <netinet/in.h>, so don't.
Michael Poole [Sun, 18 Mar 2007 14:42:49 +0000 (10:42 -0400)]
Get rid of srvx-broadcast announcements. (They do not scale.)
src/global.h (MESSAGE_RECIPIENT_ANNOUNCE): Remove.
src/global.c (KEY_ANNOUNCEMENTS_DEFAULT): Remove.
(global_conf): Remove announcements_default field.
(message_create): Do not recognize "announce[ment]" target.
(messageType): Remove MESSAGE_RECIPIENT_ANNOUNCE condition.
(message_send): Remove MESSAGE_RECIPIENT_ANNOUNCE condition.
(cmd_notice): Do not recognize "announce[ment]" target.
(global_conf_read): Do not look up announcements_default key.
src/global.help (TARGET): Remove ANNOUNCEMENT target.
src/nickserv.h (struct handle_info): Remove announcements field.
src/nickserv.c (KEY_ANNOUNCEMENTS): Remove.
("NSMSG_INVALID_ANNOUNCE"): Remove.
("NSMSG_SET_ANNOUNCEMENTS"): Remove.
(register_handle): Do not assign to hi->announcements.
(set_list): Remove ANNOUNCEMENTS from the default list.
(opt_announcements): Remove.
(nickserv_saxdb_write): Remove announcements code.
(nickserv_db_read_handle): Remove announcements code.
(init_nickserv): Do not register opt_announcements function.
nickserv.help (SET): Remove ANNOUNCEMENTS option.
Michael Poole [Sun, 18 Mar 2007 14:37:58 +0000 (10:37 -0400)]
Tweak default access restrictions for "set unreviewed *".
src/chanserv.c (init_chanserv): Default "set unreviewed on" to +helping
and "set unreviewed off" to +oper.
Michael Poole [Wed, 14 Mar 2007 02:57:20 +0000 (22:57 -0400)]
Add "unreviewed" flag for channels.
src/chanserv.c (CHANNEL_DEFAULT_FLAGS): Include "unreviewed" flag.
(CHANNEL_PRESERVED_FLAGS): New macro for flags not reset by !set defaults
(msgtab): New entry for "CSMSG_SET_UNREVIEWED".
(chanserv_search_create): Recognize "unreviewed" flag.
(chan_opt_unreviewed): New function.
(chan_opt_defaults): Preserve CHANNEL_PRESERVED_FLAGS.
(cmd_set): Act like cmd_joiner with respect to updating argv.
(init_chanserv): Register unreviewed option and its subcommands.
src/chanserv.h (CHANNEL_UNREVIEWED): New flag.
src/chanserv.help: Update documentation for SEARCH and SET.
Michael Poole [Wed, 14 Mar 2007 02:03:49 +0000 (22:03 -0400)]
Add trace-style DNR searching capabilities.
src/chanserv.c (msgtab): Separate DNR info strings for easier translation.
Add DNR bad-action and search results strings.
(dnr_print_func): New function to reduce code duplication.
(chanserv_show_dnrs): Use dnr_print_func() instead of doing the display
in this function.
(send_dnrs): Likewise.
(cmd_allowregister): Simplify checks for DNR existence and removal.
(struct dnr_search): New type.
(dnr_search_matches): New function.
(dnr_search_create): New function.
(dnr_search_func): New typedef.
(dnr_search): New function.
(dnr_remove_func): New function.
(cmd_dnrsearch): New function.
(init_chanserv): Register dnrsearch and its subcommands.
src/chanserv.help: Document DNRSEARCH command.
Michael Poole [Mon, 12 Mar 2007 03:48:29 +0000 (23:48 -0400)]
Fix a few parsing bugs in search bounds.
src/log.c (log_discrim_create): Do not skip parts of the time period if
the interval is given with no prefix.
src/opserv.c (opserv_discrim_create): Likewise.
(opserv_cdiscrim_create): Likewise.
Michael Poole [Tue, 27 Feb 2007 02:26:35 +0000 (21:26 -0500)]
Tweak DNR expiration code for aesthetics.
src/chanserv.c (CSMSG_DNR_INFO_SET): Add missing "ago".
(chanserv_find_dnrs): Add "max" argument. Revise to remove expired
DNRs as they are found.
(chanserv_show_dnrs): Exploit the above.
(chanserv_is_dnr): Use chanserv_find_dnrs(), removing lots of nearly
duplicated code.
(send_dnrs): New function to send unexpired DNRs from one dict.
(cmd_noregister): Use send_dnrs() to merge duplicated code.
(write_dnrs_helper): Remove expired DNRs here.
ThiefMaster [Mon, 26 Feb 2007 19:43:23 +0000 (20:43 +0100)]
Added expire time for DNRs.
Michael Poole [Mon, 12 Mar 2007 02:30:30 +0000 (22:30 -0400)]
Add account karma support.
src/nickserv.*: Add new karma account option.
Michael Poole [Mon, 12 Mar 2007 02:29:54 +0000 (22:29 -0400)]
Add saxdb_write_sint() to handle signed values.
src/saxdb.* (saxdb_write_sint): New function.
Michael Poole [Sun, 11 Mar 2007 23:23:20 +0000 (19:23 -0400)]
Add account notes.
src/nickserv.h (struct handle_note): New structure.
(struct handle_info): Add field to point to account's notes.
src/nickserv.c (KEY_NOTE*): New configuration key macros.
(WALK_NOTES): New macro to make a single pass through notes while
deleting ones that have expired.
(msgtab): Add entries to support commands related to account notes.
(free_handle_info): Release notes on an account.
(cmd_handleinfo): Show notes, or say there are none.
(cmd_addnote): New command-handler function.
(cmd_delnote): New command-handler function.
(nickserv_saxdb_write): Write notes to the database.
(nickserv_db_read_handle): Read notes from the database.
(init_nickserv): Register new functions.
src/nickserv.help (ADDNOTE): Document new command.
(DELNOTE): Likewise.
Michael Poole [Sun, 11 Mar 2007 22:22:17 +0000 (18:22 -0400)]
Close qserver listener when exiting.
src/mod-qserver.c (qserver_conf_read): Close qserver_listener.
Michael Poole [Sun, 11 Mar 2007 22:14:29 +0000 (18:14 -0400)]
Release his_servername and his_servercomment on termination.
src/proto-p10.c (parse_cleanup): Free two strings allocated in this file.
Michael Poole [Sun, 11 Mar 2007 22:13:54 +0000 (18:13 -0400)]
Rearrange early init printouts to not try to use log_module().
src/main.c (main): Before log_init() is called and we register MAIN_LOG,
we cannot log using it -- so do not try to.
Michael Poole [Sun, 11 Mar 2007 19:53:56 +0000 (15:53 -0400)]
Restore checks for WITH_PROTOCOL_BAHAMUT.
Michael Poole [Sun, 11 Mar 2007 19:42:57 +0000 (15:42 -0400)]
Fix typo for "accepted" in PCMSG_STATUS_ACCEPTED.
src/mod-sockcheck.c (msgtab): Spell "accepted" correctly.
Michael Poole [Sun, 11 Mar 2007 15:59:07 +0000 (11:59 -0400)]
Avoid possible one-byte overrun in ioset_line_read().
src/ioset.c (ioset_line_read): We can safely overwrite dest[max-1] to
terminate the buffer. Also return the available line length, rather
than the number of bytes written to the buffer.
Michael Poole [Sun, 11 Mar 2007 15:36:31 +0000 (11:36 -0400)]
Make prettier git versions.
src/Makefile.am (checkversion): Use "git describe" to get the git version.
Michael Poole [Sun, 11 Mar 2007 15:18:25 +0000 (11:18 -0400)]
src/mail-sendmail.c: Move #include "mail-common.c" up a few lines.
Michael Poole [Sun, 11 Mar 2007 15:17:57 +0000 (11:17 -0400)]
Clean up protocol and mail backend selection.
configure.in: Allow easier selection of protocol and mail backends.
Michael Poole [Thu, 8 Mar 2007 00:52:57 +0000 (19:52 -0500)]
Split sendmail into common and sendmail-specific portions.
This is in preparation for an SMTP alternative to the current code.
Michael Poole [Wed, 7 Mar 2007 05:19:27 +0000 (00:19 -0500)]
Set quit_services based on WM_QUIT wParam under Windows.
Michael Poole [Wed, 7 Mar 2007 05:19:10 +0000 (00:19 -0500)]
Check for additional functions during configure.
If the operating system does not provide gai_strerror(), we must.
If the OS does not have a Unix-ish times(), we can use GetProcessTimes().
Update config.h.win32 based on the new configure script.
Michael Poole [Wed, 7 Mar 2007 05:16:10 +0000 (00:16 -0500)]
Rearrange main*.c and linking for Win32 target.
Split main.c into two files (main-common.c and the old main.c).
Add main-win32.c to handle the Win32-specific parts.
Michael Poole [Tue, 6 Mar 2007 04:43:42 +0000 (23:43 -0500)]
Finish ioset-win32 (not yet tested).
compat.h: Define BSD socket errors in terms of Windows socket errors.
config.h.win32: Fix typo in PACKAGE_STRING.
ioset-win32.c: Implement most of this file.
ioset.c: Ifdef out the fcntl() calls to make Windows happier.
Michael Poole [Sun, 25 Feb 2007 22:57:06 +0000 (17:57 -0500)]
Stop tracking files from autotools.
autogen.sh: Add libtoolize; update arguments for aclocal and automake.
.gitignore: Ignore the files added by libtoolize and automake.
Delete those files from the repository.
Michael Poole [Wed, 24 Jan 2007 20:27:30 +0000 (15:27 -0500)]
Add new ChangeLog, reflecting git commit history
Michael Poole [Wed, 24 Jan 2007 20:19:58 +0000 (15:19 -0500)]
Delete ChangeLog file
Michael Poole [Wed, 24 Jan 2007 16:05:34 +0000 (11:05 -0500)]
Remove .cvsignore files; replace with .gitignore as needed.
Remove rx/Makefile.in, since there is a Makefile.am there.
Update src/Makefile.am and src/modcmd.c to work with git.
Michael Poole [Wed, 24 Jan 2007 02:57:48 +0000 (21:57 -0500)]
Delete binary files that were committed (by git archimport?) and more
Arch droppings.
Michael Poole [Wed, 24 Jan 2007 02:37:09 +0000 (21:37 -0500)]
Delete {arch} directory since git does not use it.
Michael Poole [Wed, 24 Jan 2007 02:36:42 +0000 (21:36 -0500)]
Delete {arch} directory since git does not use it.
Michael Poole [Mon, 8 Jan 2007 04:27:45 +0000 (04:27 +0000)]
Avoid epoll_ctl(..., EPOLL_CTL_DEL, ...) for closed fds.
src/ioset-impl.h (struct io_engine): Add "os_closed" parameter to
remove() method.
src/ioset.c (ioset_close): Add this to the call.
src/ioset-epoll.c (ioset_epoll_remove): Use it to avoid removing the fd
from epoll_fd, since that epoll_ctl() call will always fail.
src/ioset-select.c (ioset_select_remove): Ignore the new parameter.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-81
Michael Poole [Mon, 8 Jan 2007 04:22:20 +0000 (04:22 +0000)]
Skip reporting mondo db sections in ?stats databases.
src/saxdb.c (cmd_stats_databases): Only show entries for databases that
have their own file; skip sections of "mondo".
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-80
Michael Poole [Mon, 8 Jan 2007 04:11:56 +0000 (04:11 +0000)]
Fix SourceForge bug #
1629748
src/chanserv.c (cmd_adduser): Include suspended users in check for
pre-existing channel access for the user being added.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-79
Michael Poole [Sat, 23 Dec 2006 05:50:25 +0000 (05:50 +0000)]
Allow last account mask to be deleted with odelmask.
src/nickserv.c (nickserv_delmask): Add parameter to distinguish between
normal and override use.
(cmd_delmask): Pass the new argument.
(cmd_odelmask): Likewise.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-78
Michael Poole [Sat, 23 Dec 2006 05:40:12 +0000 (05:40 +0000)]
Properly handle overrides in !wipeinfo.
src/chanserv.c (cmd_wipeinfo): Allow real_actor to be null.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-77
Michael Poole [Sat, 23 Dec 2006 05:38:37 +0000 (05:38 +0000)]
Revert miscommitted file from patch-73.
src/proto-common.c: Revert accidentally committed patch.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-76
Michael Poole [Sat, 23 Dec 2006 05:37:07 +0000 (05:37 +0000)]
Allow extra arguments to privmsg and notice.
src/proto-p10.c (cmd_privmsg): Allow extra arguments between target and
text.
(cmd_notice): Likewise.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-75
Michael Poole [Sat, 23 Dec 2006 05:35:29 +0000 (05:35 +0000)]
Fix typo in "gtrace criteria" help entry.
src/opserv.help (gtrace criteria): Fix capitalization of $b tag.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-74
Michael Poole [Sat, 23 Dec 2006 05:33:28 +0000 (05:33 +0000)]
Fix typo in "gtrace criteria" help entry.
src/opserv.help (gtrace criteria): Fix capitalization of $b tag.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-73
Michael Poole [Sat, 23 Dec 2006 05:31:56 +0000 (05:31 +0000)]
Allow NickServ to learn hostmasks automatically.
src/nickserv.c (nickserv_addmask): Declare early.
(cmd_oregister): Allow oper to omit fourth parameter, to set no
hostmask.
(cmd_auth): On success, add user's hostmask if the account's hostmask
list is empty.
(cmd_cookie): Append hostmask to account on successful allowauth.
(init_nickserv): Update merge command access.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-72
Michael Poole [Sat, 23 Dec 2006 05:27:23 +0000 (05:27 +0000)]
Update PostgreSQL patch schema.
patches/log-pgsql.txt: Update to include HelpServ tables.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-71
Michael Poole [Sat, 23 Dec 2006 05:11:47 +0000 (05:11 +0000)]
Fix typo in MODE_APASS generation.
src/proto-p10.c (mod_chanmode_announce): Fix typo.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-70
Michael Poole [Fri, 27 Oct 2006 01:59:57 +0000 (01:59 +0000)]
Don't re-allocated a language that already exists.
src/helpfile.c (language_read_list): If the language already exists, do
not allocate it anew.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-69
Michael Poole [Fri, 27 Oct 2006 01:25:18 +0000 (01:25 +0000)]
Remove ioset engine update call that could read after free().
src/ioset.c (ioset_connect): If the connect fails immediately, do not try
to update the fd after closing it.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-68
Michael Poole [Fri, 27 Oct 2006 01:06:02 +0000 (01:06 +0000)]
Allow languages/strings.db to override builtin strings.
src/helpfile.c (language_read): Add space before "parent".
(language_read_list): Explicitly skip the file named "strings.db".
(helpfile_read_languages): New function.
(helpfile_finalize): Register it as a conf-reload function.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-67
Michael Poole [Fri, 27 Oct 2006 00:47:30 +0000 (00:47 +0000)]
Support +I while we're adding modes (part 2) - the missing files.
src/opserv.c (cmd_whois): Test no-idle mode.
src/proto-p10.c (irc_user): Check for no-idle mode.
(mod_usermode): Check for +I flag.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-66
Michael Poole [Fri, 27 Oct 2006 00:44:35 +0000 (00:44 +0000)]
Support +I while we're adding modes..
src/hash.c (FLAGS_NOIDLE): New macro for +I (hide idle time) mode.
(IsNoIdle): New macro to test it.
src/opserv.c (cmd_whois): Test no-idle mode.
src/proto-p10.c (irc_user): Check for no-idle mode.
(mod_usermode): Check for +I flag.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-65
Michael Poole [Fri, 27 Oct 2006 00:35:00 +0000 (00:35 +0000)]
Make maintainer-mode use C89 mode.
configure.in (CFLAGS): Use -ansi in maintainer mode.
(AC_C_INLINE): Test after setting -Werror.
src/chanserv.c (cmd_adduser): Fix comment formatting.
(cmd_clvl): Likewise.
(cmd_deluser): Likewise.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-64
Michael Poole [Fri, 27 Oct 2006 00:21:32 +0000 (00:21 +0000)]
Pull ThiefMaster's patch-3..5.
Patches applied:
* thiefmaster@gamesurge.net--2006/srvx--devo--1.3--base-0
tag of srvx@srvx.net--2006/srvx--devo--1.3--patch-58
* thiefmaster@gamesurge.net--2006/srvx--devo--1.3--patch-3
Implement complete remote whois.
* thiefmaster@gamesurge.net--2006/srvx--devo--1.3--patch-4
Improve override logging and ignore godmode in !trim.
* thiefmaster@gamesurge.net--2006/srvx--devo--1.3--patch-5
Announce ounregisters to staff via Global.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-63
Michael Poole [Thu, 26 Oct 2006 23:44:10 +0000 (23:44 +0000)]
Allow 900+ users to get full accountinfo.
src/nickserv.c (cmd_handleinfo): Check for opserv access before checking
for an outranked oper.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-62
Michael Poole [Thu, 26 Oct 2006 23:41:14 +0000 (23:41 +0000)]
Fix irc_pton() sense for hostscan command.
src/mod-sockcheck.c (cmd_hostscan): Fix test for irc_pton() return value.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-61
Michael Poole [Sat, 21 Oct 2006 16:06:47 +0000 (16:06 +0000)]
Various I/O cleanups and fixes.
src/ioset.c (ioset_add): Set FD_CLOEXEC flag on all managed sockets.
(ioset_try_write): Tidy formatting.
(ioset_close): Add another bit to "os_close".
src/proto-common.c (close_socket): Pass the new bit to ioset_close().
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-60
Michael Poole [Sat, 21 Oct 2006 16:04:19 +0000 (16:04 +0000)]
Add 'tell' command; update copyright message.
src/modcmd.c (cmd_version): Update copyright years. Move the multi-line
credits to a separate message and make it actually send properly.
(cmd_tell): New command.
(modcmd_init): Register cmd_tell.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-59
Michael Poole [Sat, 7 Oct 2006 00:03:52 +0000 (00:03 +0000)]
Fix a (tiny) memory leak in mod-sockcheck.c.
src/mod-sockcheck.c (sockcheck_begin_test): Make io_fd assignment
clearer.
(sockcheck_read_conf): Free the addrinfo we get.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-58
Michael Poole [Fri, 6 Oct 2006 23:18:58 +0000 (23:18 +0000)]
Fix sending P10 bursts with many bans.
src/proto-p10.c (irc_burst): Only send modes and user list once.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-57
Michael Poole [Fri, 6 Oct 2006 23:16:58 +0000 (23:16 +0000)]
Remove "wants_reads" field from struct io_fd.
Everybody wants read information, so give it to them!
src/ioset-epoll.c (ioset_epoll_events): Make EPOLLIN unconditional.
src/ioset-impl.h (fd_wants_reads): Delete.
src/ioset-select.c (ioset_select_loop): Unconditionally set read bit for fd.
src/ioset.c (ioset_add): Add fd to engine after marking it non-blocking.
(ioset_buffered_reads): Remove check for fd->wants_reads.
src/ioset.h (struct io_fd): Delete "wants_reads" field.
src/mod-qserver.c (qserver_readable): Add missing newline.
(qserver_accept): Delete assignment to fd->wants_reads.
src/mod-sockcheck.c (sockcheck_connected): Delete assignment to
fd->wants_reads.
src/proto-common.c (create_socket_client): Delete assignment to
fd->wants_reads.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-56
Michael Poole [Fri, 6 Oct 2006 23:12:20 +0000 (23:12 +0000)]
Fix detection of gettimeofday().
configure.in: Since we have a fallback for gettimeofday, move it in with
the functions for which we do.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-55
Michael Poole [Wed, 4 Oct 2006 01:41:05 +0000 (01:41 +0000)]
Make timeq_init() automatic.
src/main.c (main): Remove call to timeq_init().
src/timeq.h (timeq_init): Remove declaration.
src/timeq.c (timeq_cleanup): Assign NULL to timeq to handle late timeq_del() calls.
(timeq_init): Make static.
(timeq_next): If timeq is NULL, return a large positive number.
(timeq_add): If timeq is NULL, initialize it.
(timeq_del): If timeq is NULL, do nothing.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-54
Michael Poole [Wed, 4 Oct 2006 01:37:40 +0000 (01:37 +0000)]
Allow log_module() to NULL log types.
src/log.c (log_module): To make cleanup easier, allow NULL log types.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-53
Michael Poole [Wed, 4 Oct 2006 01:32:57 +0000 (01:32 +0000)]
Fix some startup-related glitches.
src/ioset.h (ioset_update): Declare new function.
src/ioset.c (ioset_init): If we have an engine, return early.
(ioset_add): If no engine, try to initialize.
(ioset_update): New function.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-52
Michael Poole [Wed, 4 Oct 2006 01:23:10 +0000 (01:23 +0000)]
Update time for ioset backend.
src/ioset-epoll.c (ioset_epoll_loop): Set now after epoll_wait() returns.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-51
Michael Poole [Tue, 3 Oct 2006 23:18:25 +0000 (23:18 +0000)]
I18n'ize the staff descriptors in !access.
src/chanserv.c (msgtab): Add new entries for staff descriptors.
(cmd_access): Use them.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-50
Michael Poole [Sat, 23 Sep 2006 01:14:35 +0000 (01:14 +0000)]
ioset event handling fixups
src/ioset.c (ioset_connect): Properly handle the situation if the connect
handler closes the fd.
(ioset_accept): Rename "old_active_fd" to "old_active" for consistency.
(ioset_buffered_read): Make sure we bail if the fd is closed.
(ioset_events): Handle 'readable' on a connecting fd as an error.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-49
Michael Poole [Sat, 23 Sep 2006 01:03:08 +0000 (01:03 +0000)]
Dummy handling fixes.
src/proto-p10.c (irc_notice): Fix the conditions for sending message to
IRC.
(irc_privmsg): Likewise.
(parse_cleanup): Zero num_*_funcs when freeing the corresponding
arrays, so that DelUser() doesn't read after free.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-48
Michael Poole [Sat, 23 Sep 2006 00:58:27 +0000 (00:58 +0000)]
Fix hostmask generation for hostnames without dots.
src/proto-common.c (generate_hostmask): Keep no-dot hostnames as the
mask -- mod-qserver can generate hostnames like "localhost".
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-47
Michael Poole [Sat, 23 Sep 2006 00:55:02 +0000 (00:55 +0000)]
Default qserver clients to being opers.
src/mod-qserver.c (qserver_accept): Default dummy client to having
usermode +o, so they can use privileged services.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-46
Michael Poole [Sat, 23 Sep 2006 00:52:48 +0000 (00:52 +0000)]
Further giveownership confirmation fixes.
src/chanserv.c (CSMSG_CONFIRM_GIVEOWNERSHIP): Prepend * to account name.
(cmd_giveownership): Check invoker access to determine need for confirmation.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-45
Michael Poole [Fri, 22 Sep 2006 03:33:25 +0000 (03:33 +0000)]
Fix comment about +O vs +o.
src/hash.h (FLAGS_OPER): The user mode is actually +o, not +O.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-44
Michael Poole [Fri, 22 Sep 2006 03:28:08 +0000 (03:28 +0000)]
Fix license notice for mod-qserver.c
src/mod-qserver.c: Since this was for public distribution, use the
standard GPL header notice.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-43
Michael Poole [Fri, 22 Sep 2006 03:05:54 +0000 (03:05 +0000)]
Add win32 specific files to tarballs.
Makefile.am (EXTRA_DIST): Include Makefile.win32.
src/Makefile.am (EXTRA_srvx_SOURCES): Include config.h.win32 and ioset-win32.c.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-42
Michael Poole [Fri, 22 Sep 2006 03:02:07 +0000 (03:02 +0000)]
First pass at native Win32 support (does not compile).
src/compat.h: Handle Windows Sockets 2 headers.
src/mod-memoserv.c (KEY_READ): #undef'ine to avoid its registry access
meaning on Windows.
Makefile.win32: New Makefile for native or cross builds targeting Win32.
src/config.h.win32: Pregenerated config.h for Win32.
src/ioset-win32.c: First attempt at a Win32 ioset backend.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-41
Michael Poole [Fri, 22 Sep 2006 02:51:50 +0000 (02:51 +0000)]
Add direct query server module.
srvx.conf.example: Document qserver configuration.
src/Makefile.am (EXTRA_srvx_SOURCES): Add mod-qserver.c.
src/mod-qserver.c: New file.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-40
Michael Poole [Fri, 22 Sep 2006 02:45:20 +0000 (02:45 +0000)]
Add epoll_* ioset backend.
configure.in: Check for epoll_create(); demote select() from being required.
src/Makefile.am (EXTRA_srvx_SOURCES): Add ioset-epoll.c.
src/ioset-epoll.c: New file.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-39
Michael Poole [Fri, 22 Sep 2006 02:38:21 +0000 (02:38 +0000)]
Allow multiple ioset backends.
configure.in: Add framework to check for ioset backends.
src/Makefile.am (noinst_DATA): Reorganize for easier patching.
(checkversion): Avoid spurious error message if $(GNU_ARCH) is missing.
(EXTRA_srvx_SOURCES): Reorganize for easier patching; add ioset-select.c.
(srvx_SOURCES): Add ioset-impl.h.
src/ioset.c (ioset.h): #include "ioset-impl.h" instead.
(clock_skew): Make non-static for backends.
(engine): New variable.
(active_fd): New variable (kind of kludgy).
(io_engine_*): New variables, only one exists so far.
(ioset_init): New function.
(ioset_cleanup): Call engine's cleanup function.
(ioset_add): Call engine's add function.
(ioset_listen): New function.
(ioset_connect): Call engine's update functions at appropriate points.
(ioset_try_write): Call engine's update function on success.
(ioset_close): Change signature; check against active_fd; call engine's
remove function.
(ioset_accept): New function.
(ioset_buffered_read): Update fd->state instead of fd->eof and call
engine's update function as appropriate. Use active_fd.
(ioset_line_read): Check fd->state instead of fd->eof.
(debug_fdsets): Move to ioset-select.c.
(ioset_events): New function.
(ioset_run): Move most of the logic into ioset-select loop function;
call it. Rename "select_timeout" to "timeout" to match.
(ioset_write): Call engine->update function.
(ioset_printf): New function.
src/ioset.h (common.h): #include this header to get PRINTF_LIKE macro.
(struct io_fd): Replace 'connected' and 'eof' fields with 'state' field.
(ioset_init): Declare new function.
(ioset_listen): Declare new function.
(ioset_printf): Declare new function.
(ioset_close): Update signature.
src/main.c (main): Call ioset_init().
src/mod-sockcheck.c (sockcheck_free_client): Can unconditionally call
ioset_close() now.
(expand_var): Always use C99 type names.
(sockcheck_begin_test): Can unconditionally call ioset_close() now.
(sockcheck_read_conf): Only warn about unknown host if the user set
one; it is silly to arn about unknown host `(null)'.
src/proto-common.c (socket_destroyed): Check fd->state rather than
fd->eof.
(close_socket): Update signature for ioset_close().
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-38
Michael Poole [Fri, 22 Sep 2006 02:15:55 +0000 (02:15 +0000)]
Add "dummy client" support.
src/hash.h (FLAGS_DUMMY): New flag for non-propagated clients.
(IsDummy): Check it.
src/helpfile.c (send_message): Allow sending to dummy clients.
(send_message_type): Likewise.
src/proto-bahamut.c (irc_user): Bail if user is NULL or has a dummy nickname.
(deliver_to_dummy): New function.
(irc_privmsg): Try to deliver via dummy method before sending to IRC.
(irc_notice): Likewise.
(irc_notice_user): Likewise.
(AddUser): If the first user mode character is '*', mark as a dummy.
(DelUser): Unregister callback functions when destroying local clients.
src/proto-p10.c (irc_user): Bail if user is NULL or has a dummy nickname.
(deliver_to_dummy): New function.
(irc_notice): Try to deliver via dummy method before sending to IRC.
(irc_notice_user): Likewise.
(irc_privmsg): Likewise.
(AddUser): If the first user mode character is '*', mark as a dummy.
(DelUser): Unregister callback functions when destroying local clients.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-37