srvx.git
17 years agoFix a few parsing bugs in search bounds.
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.

17 years agoTweak DNR expiration code for aesthetics.
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.

17 years agoAdded expire time for DNRs.
ThiefMaster [Mon, 26 Feb 2007 19:43:23 +0000 (20:43 +0100)]
Added expire time for DNRs.

17 years agoAdd account karma support.
Michael Poole [Mon, 12 Mar 2007 02:30:30 +0000 (22:30 -0400)]
Add account karma support.

src/nickserv.*: Add new karma account option.

17 years agoAdd saxdb_write_sint() to handle signed values.
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.

17 years agoAdd account notes.
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.

17 years agoClose qserver listener when exiting.
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.

17 years agoRelease his_servername and his_servercomment on termination.
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.

17 years agoRearrange early init printouts to not try to use log_module().
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.

17 years agoRestore checks for WITH_PROTOCOL_BAHAMUT.
Michael Poole [Sun, 11 Mar 2007 19:53:56 +0000 (15:53 -0400)]
Restore checks for WITH_PROTOCOL_BAHAMUT.

17 years agoFix typo for "accepted" in PCMSG_STATUS_ACCEPTED.
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.

17 years agoAvoid possible one-byte overrun in ioset_line_read().
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.

17 years agoMake prettier git versions.
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.

17 years agosrc/mail-sendmail.c: Move #include "mail-common.c" up a few lines.
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.

17 years agoClean up protocol and mail backend selection.
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.

17 years agoSplit sendmail into common and sendmail-specific portions.
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.

17 years agoSet quit_services based on WM_QUIT wParam under Windows.
Michael Poole [Wed, 7 Mar 2007 05:19:27 +0000 (00:19 -0500)]
Set quit_services based on WM_QUIT wParam under Windows.

17 years agoCheck for additional functions during configure.
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.

17 years agoRearrange main*.c and linking for Win32 target.
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.

17 years agoFinish ioset-win32 (not yet tested).
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.

17 years agoStop tracking files from autotools.
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.

17 years agoAdd new ChangeLog, reflecting git commit history
Michael Poole [Wed, 24 Jan 2007 20:27:30 +0000 (15:27 -0500)]
Add new ChangeLog, reflecting git commit history

17 years agoDelete ChangeLog file
Michael Poole [Wed, 24 Jan 2007 20:19:58 +0000 (15:19 -0500)]
Delete ChangeLog file

17 years agoRemove .cvsignore files; replace with .gitignore as needed.
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.

17 years agoDelete binary files that were committed (by git archimport?) and more
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.

17 years agoDelete {arch} directory since git does not use it.
Michael Poole [Wed, 24 Jan 2007 02:37:09 +0000 (21:37 -0500)]
Delete {arch} directory since git does not use it.

17 years agoDelete {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.

17 years agoAvoid epoll_ctl(..., EPOLL_CTL_DEL, ...) for closed fds.
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

17 years agoSkip reporting mondo db sections in ?stats databases.
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

17 years agoFix SourceForge bug #1629748
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

17 years agoAllow last account mask to be deleted with odelmask.
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

17 years agoProperly handle overrides in !wipeinfo.
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

17 years agoRevert miscommitted file from patch-73.
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

17 years agoAllow extra arguments to privmsg and notice.
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

17 years agoFix typo in "gtrace criteria" help entry.
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

17 years agoFix typo in "gtrace criteria" help entry.
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

17 years agoAllow NickServ to learn hostmasks automatically.
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

17 years agoUpdate PostgreSQL patch schema.
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

17 years agoFix typo in MODE_APASS generation.
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

17 years agoDon't re-allocated a language that already exists.
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

17 years agoRemove ioset engine update call that could read after free().
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

17 years agoAllow languages/strings.db to override builtin strings.
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

17 years agoSupport +I while we're adding modes (part 2) - the missing files.
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

17 years agoSupport +I while we're adding modes..
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

17 years agoMake maintainer-mode use C89 mode.
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

17 years agoPull ThiefMaster's patch-3..5.
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

17 years agoAllow 900+ users to get full accountinfo.
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

17 years agoFix irc_pton() sense for hostscan command.
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

17 years agoVarious I/O cleanups and fixes.
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

17 years agoAdd 'tell' command; update copyright message.
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

17 years agoFix a (tiny) memory leak in mod-sockcheck.c.
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

17 years agoFix sending P10 bursts with many bans.
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

17 years agoRemove "wants_reads" field from struct io_fd.
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

17 years agoFix detection of gettimeofday().
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

17 years agoMake timeq_init() automatic.
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

17 years agoAllow log_module() to NULL log types.
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

17 years agoFix some startup-related glitches.
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

17 years agoUpdate time for ioset backend.
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

17 years agoI18n'ize the staff descriptors in !access.
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

17 years agoioset event handling fixups
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

17 years agoDummy handling fixes.
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

17 years agoFix hostmask generation for hostnames without dots.
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

17 years agoDefault qserver clients to being opers.
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

17 years agoFurther giveownership confirmation fixes.
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

17 years agoFix comment about +O vs +o.
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

17 years agoFix license notice for mod-qserver.c
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

17 years agoAdd win32 specific files to tarballs.
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

17 years agoFirst pass at native Win32 support (does not compile).
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

17 years agoAdd direct query server module.
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

17 years agoAdd epoll_* ioset backend.
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

17 years agoAllow multiple ioset backends.
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

17 years agoAdd "dummy client" support.
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

17 years agoDelete obsolete and non-propagated user modes.
Michael Poole [Fri, 22 Sep 2006 01:56:07 +0000 (01:56 +0000)]
Delete obsolete and non-propagated user modes.

src/hash.h (FLAGS_LOCOP): Delete.
  (FLAGS_SERVNOTICE): Delete.
  (FLAGS_HELPER): Delete.
  (IsServNotice): Delete.
  (IsHelperIrcu): Delete.

src/opserv.c (cmd_whois): Remove IsServNotice() or IsHelperIrcu().

src/proto-bahamut.c (mod_usermode): Do not handle +O/+s/+h, we never see them.

src/proto-p10.c (irc_user): Do not emit +s or +h, we never set them..
  (mod_usermode): Do not handle +O/+s/+h, we never see them.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-36

17 years agoMerge AddService(), AddClone() into AddLocalUser()
Michael Poole [Fri, 22 Sep 2006 01:48:00 +0000 (01:48 +0000)]
Merge AddService(), AddClone() into AddLocalUser()

src/chanserv.c (init_chanserv): Convert AddService() call to AddLocalUser().

src/global.c (init_global): Likewise.

src/mod-helpserv.c (register_helpserv): Likewise.

src/modcmd.c (cmd_service_add): Likewise.
  (modcmd_load_bots): Likewise.

src/nickserv.c (regex.h): Fall back to rxposix.h from local rx package.
  (init_nickserv): Convert AddService() call to AddLocalUser().

src/opserv.c (opserv_add_reserve): Convert AddClone() call to AddLocalUser().
  (cmd_clone): Likewise.
  (add_reserved): Likewise.
  (init_opserv): Convert AddService() call to AddLocalUser().

src/proto-bahamut.c (AddService): Convert into AddLocalUser().
  (AddClone): Delete.

src/proto-p10.c (AddService): Convert into AddLocalUser().
  (AddClone): Delete.

src/proto.h (AddService): Convert into AddLocalUser().
  (AddClone): Delete.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-35

17 years agoMake IRC message handler 'text' const.
Michael Poole [Fri, 22 Sep 2006 01:35:03 +0000 (01:35 +0000)]
Make IRC message handler 'text' const.

src/chanserv.c (chanserv_ctcp_check): Make 'text' parameter const.

src/mod-helpserv.c (helpserv_usermsg): Likewise.
  (helpserv_botmsg): Likewise.

src/modcmd.c (svccmd_invoke): Likewise.
  (modcmd_privmsg): Likewise.
  (modcmd_chanmsg): Likewise.

src/modcmd.h (SVCMSG_HOOK): Likewise.

src/proto.h (chanmsg_func_t): Likewise.
  (privmsg_func_t): Likewise.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-34

17 years agoAdd autogen.sh to distribution tarball.
Michael Poole [Fri, 22 Sep 2006 01:23:43 +0000 (01:23 +0000)]
Add autogen.sh to distribution tarball.

Makefile.am: Add autogen.sh to the "extra" distributed files.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-33

17 years agoSupport and use G-line lastmod timestamp.
Michael Poole [Mon, 11 Sep 2006 01:03:14 +0000 (01:03 +0000)]
Support and use G-line lastmod timestamp.

src/gline.c (KEY_LASTMOD): New key string.
  (gline_add): Use new parameter to set lastmod.
  (gline_add_record): Look for KEY_LASTMOD values.
  (gline_write_entry): Set KEY_LASTMOD if lastmod is set.
  (gline_discrim_create): Allow specification of lastmod criteria.
  (gline_discrim_match): Check lastmod if appropriate.

src/gline.h (struct gline): Add lastmod field.
  (struct gline_discrim): Add lastmod fields.
  (gline_add): New parameter.

src/mod-sockcheck.c (sockcheck_issue_gline): Set lastmod.

src/opserv.c (OSMSG_NO_GLINE): New format string.
  (opserv_block): Set lastmod.
  (cmd_gline): Set lastmod.
  (cmd_stats_glines): Allow searching for a particular G-line (just like
    gtrace).
  (opserv_new_user_check): Set lastmod.
  (gtrace_print_func): Use intervals rather than fixed dates and show
    lastmod.

src/opserv.help (GTRACE CRITERIA): Mention lastmod criteria.

src/proto-p10.c (irc_gline): Send lastmod if it is set.
  (cmd_num_gline): Parse out lastmod if it is set.
  (cmd_gline): Parse out lastmod if it is set.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-32

17 years agoNetwork event handler fixup when ChanServ is disabled.
Michael Poole [Sat, 9 Sep 2006 21:37:28 +0000 (21:37 +0000)]
Network event handler fixup when ChanServ is disabled.

src/chanserv.c (init_chanserv): Do not register network event handlers if
    ChanServ is disabled.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-31

17 years agoMake srvx compile on cygwin again.
Michael Poole [Sun, 3 Sep 2006 15:24:48 +0000 (15:24 +0000)]
Make srvx compile on cygwin again.

configure.in (AC_CHECK_HEADERS): Look for <arpa/inet.h>.
  (AC_CHECK_FUNCS): Look for inet_aton().

src/compat.c: Try to include <arpa/inet.h> so we get inet_addr().
  (getaddrinfo): If inet_aton() is not provided, use inet_addr() instead.

src/compat.h (AI_NUMERICHOST): Define this too.

src/tools.c (irc_pton): Use the pedantically correct type for ip4.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-30

17 years agoDelChannelUser call and semantic fixups
Michael Poole [Sun, 3 Sep 2006 15:21:10 +0000 (15:21 +0000)]
DelChannelUser call and semantic fixups

src/hash.c (DelChannel): Fix type of 'reason' arg to DelChannelUser().
  (DelChannelUser): Only send part message if user is local.

src/proto-bahamut.c (DelUser): Unswap arguments to DelChannelUser().
  (cmd_part): Move to proto-common.c.

src/proto-common.c (part_desc): New structure type.
  (part_helper): Use it to capture user and reason.
  (cmd_part): New common function.

src/proto-p10.c (cmd_part): Move to proto-common.c.
  (DelUser): Unswap arguments to DelChannelUser().
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-29

17 years agoDo not try to moderate join-flood channels with no OpServ.
Michael Poole [Sun, 3 Sep 2006 15:17:05 +0000 (15:17 +0000)]
Do not try to moderate join-flood channels with no OpServ.

src/opserv.c (opserv_join_check): As feigling points out, it is bad for a
    service that does not exist to join a channel and hack modes.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-28

17 years agoFix ounregnick access check.
Michael Poole [Sun, 3 Sep 2006 15:13:31 +0000 (15:13 +0000)]
Fix ounregnick access check.

src/nickserv.c (cmd_ounregnick): Use the standard rank-checking function.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-27

17 years agoFix giveownership to how it should be
Michael Poole [Sun, 3 Sep 2006 15:11:29 +0000 (15:11 +0000)]
Fix giveownership to how it should be

src/chanserv.c (cmd_giveownership): Only require confirmation code if the
  user has real (normal) access and is not forcing the giveownership.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-26

17 years agoFix giveownership to how it should be
Michael Poole [Sun, 3 Sep 2006 15:10:58 +0000 (15:10 +0000)]
Fix giveownership to how it should be

src/chanserv.c (cmd_giveownership): Only require confirmation code if the
  user has real (normal) access and is not forcing the giveownership.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-25

17 years agoMark channels as visited when high-level users leave.
Michael Poole [Sat, 19 Aug 2006 13:31:08 +0000 (13:31 +0000)]
Mark channels as visited when high-level users leave.

src/chanserv.c (handle_part): At ThiefMaster's suggestion, update a
  channel's visited time when a high-level user leaves (parts, gets
  kicked, or quits).
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-24

17 years agoRequire confirmation cookie for giveownership.
Michael Poole [Mon, 7 Aug 2006 03:11:10 +0000 (03:11 +0000)]
Require confirmation cookie for giveownership.

src/chanserv.c (CSMSG_CONFIRM_GIVEOWNERSHIP): New translation string.
  (cmd_giveownership): Fail for non-force unconfirmed giveownerships.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-23

17 years agoAdd CSMSG_INVALID_CFLAG string.
Michael Poole [Sat, 29 Jul 2006 01:36:39 +0000 (01:36 +0000)]
Add CSMSG_INVALID_CFLAG string.

src/chanserv.c (msgtab): Add entry for "CSMSG_INVALID_CFLAG".
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-22

17 years agoFix ?csearch max timestamp default value.
Michael Poole [Sat, 29 Jul 2006 01:34:17 +0000 (01:34 +0000)]
Fix ?csearch max timestamp default value.

src/opserv.c (opserv_cdiscrim_create): Fix default value for max_ts.
    (With an expression only a coder could love.  Improvements wanted.)
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-21

17 years agoUpdate arch-inventory files for in-tree builds.
Michael Poole [Tue, 18 Jul 2006 03:13:31 +0000 (03:13 +0000)]
Update arch-inventory files for in-tree builds.

.arch-inventory: Add "libtool" as a preserved file.

src/.arch-inventory: Add ".libs" as a preserved directory.  Put a \
    before the . in .cvsignore to avoid capturing too much.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-20

17 years agoMake !bans searching more flexible
Michael Poole [Tue, 18 Jul 2006 02:48:32 +0000 (02:48 +0000)]
Make !bans searching more flexible

src/chanserv.c (cmd_bans): Allow specifying a complete hostmask or a
    nickname when searching bans.

src/chanserv.help (BANS): Document the searching functions.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-19

17 years agoSimplify cdiscrim_match() max tests.
Michael Poole [Tue, 18 Jul 2006 01:49:56 +0000 (01:49 +0000)]
Simplify cdiscrim_match() max tests.

src/opserv.c (opserv_cdiscrim_create): Explicitly initialize max_users
    and max_ts.
  (cdiscrim_match): Simplify the bounds tests for timestamp and users.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-18

17 years agoFix reclaim KILL behavior.
Michael Poole [Tue, 18 Jul 2006 01:46:10 +0000 (01:46 +0000)]
Fix reclaim KILL behavior.

src/nickserv.c (nickserv_reclaim): Use DelUser() instead of irc_kill(),
    so that srvx's databases are appropriately updated.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-17

17 years agoFix typo in English error message text.
Michael Poole [Tue, 18 Jul 2006 01:12:16 +0000 (01:12 +0000)]
Fix typo in English error message text.

src/chanserv.c (CSMSG_TOPICMASK_CONFLICT2): Add missing "is".  Reported
  by Harm, by way of Byte.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-16

17 years agoUpdate version tag for 1.3.1 release. v1.3.1
Michael Poole [Sun, 14 May 2006 02:54:24 +0000 (02:54 +0000)]
Update version tag for 1.3.1 release.

configure.in: Update version tag for 1.3.1 release.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-15

18 years agoMake some ChanServ ban checks see through hidden hosts.
Michael Poole [Tue, 2 May 2006 02:46:39 +0000 (02:46 +0000)]
Make some ChanServ ban checks see through hidden hosts.

src/chanserv.c (handle_join): Make this function see through hidden
    hosts when matching users against bans.  Add comment before the
    non-burst section; remove a redundant burst check there.
  (handle_auth): See through hidden hosts when checking against active
    bans.  Inactive ban check keeps MATCH_VISIBLE since bans on the true
    hostname should have already been applied.
  (handle_nick_change): Same as handle_auth.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-14

18 years agoFix visible matching for fake and +x-hidden hosts.
Michael Poole [Sat, 29 Apr 2006 03:11:35 +0000 (03:11 +0000)]
Fix visible matching for fake and +x-hidden hosts.

src/tools.c (user_matches_glob): Use correct test to determine whether
    the user's host is hidden.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-13

18 years agoFix a +o mode parsing error.
Michael Poole [Fri, 7 Apr 2006 00:56:38 +0000 (00:56 +0000)]
Fix a +o mode parsing error.

src/proto-p10.c (mod_chanmode_parse): Check that the input argument after
    +o is a valid one.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-12

18 years agoFix some IPv6 address compatibility issues.
Michael Poole [Thu, 6 Apr 2006 02:19:47 +0000 (02:19 +0000)]
Fix some IPv6 address compatibility issues.

src/proto-p10.c (irc_p10_pton): Mark valid IPv4 addresses as v4-mapped.
  (irc_p10_ntop): Emit invalid IPs as AAAAAA (but it could be _ for +6
    flagged hubs).
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-11

18 years agoFix a possible warning without debugging.
Michael Poole [Wed, 5 Apr 2006 02:07:30 +0000 (02:07 +0000)]
Fix a possible warning without debugging.

src/alloc-slab.c (slab_unalloc): If assert() is #define'd to be empty,
    then size is unused.  Include a (void)size to quash a warning.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-10

18 years agoFix hostmask error from last year's patch-28.
Michael Poole [Wed, 5 Apr 2006 02:02:21 +0000 (02:02 +0000)]
Fix hostmask error from last year's patch-28.

src/proto-common.c (generate_hostmask): When generating a strict hostmask
    not by IP, we should keep the original hostname.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-9