srvx.git
15 years agoUpdate version tag for 1.4.0-rc2. v1.4.0-rc2
Michael Poole [Mon, 7 Jul 2008 12:11:46 +0000 (08:11 -0400)]
Update version tag for 1.4.0-rc2.

15 years agoFix SourceForge bug #1529487.
Michael Poole [Sat, 5 Jul 2008 12:14:04 +0000 (08:14 -0400)]
Fix SourceForge bug #1529487.

src/chanserv.c (CSMSG_LOW_CHANNEL_ACCESS): Be more specific.
  (user_opt_autoinvite): Tell the user if his access is too low for the
    option to have an effect.

15 years agoFix SourceForge bug #864524: Say if too few arguments passed to alias.
Michael Poole [Sat, 5 Jul 2008 11:51:06 +0000 (07:51 -0400)]
Fix SourceForge bug #864524: Say if too few arguments passed to alias.

src/modcmd.c (svccmd_expand_alias): If the lower bound is past the end of
     the argument list, return -1.
  (svccmd_invoke_argv): Detect that and report it as needing more params.

15 years agosrc/modcmd.c: Allow certain commands to run if chanserv does not exist.
Michael Poole [Sat, 5 Jul 2008 11:29:58 +0000 (07:29 -0400)]
src/modcmd.c: Allow certain commands to run if chanserv does not exist.

15 years agoAvoid crashing in opserv_join_check() without an OpServ.
Michael Poole [Sun, 15 Jun 2008 13:24:02 +0000 (09:24 -0400)]
Avoid crashing in opserv_join_check() without an OpServ.

src/opserv.c (opserv_join_check): Only act on bad channels if we have an
  OpServ bot.

15 years agoUse correct error string for getaddrinfo() and getnameinfo() failures.
Michael Poole [Sun, 15 Jun 2008 13:23:22 +0000 (09:23 -0400)]
Use correct error string for getaddrinfo() and getnameinfo() failures.

src/ioset.c (ioset_connect): Include the error string when getaddrinfo()
  fails.
src/mail-smtp.c (smtp_fill_name): Use gai_strerror() rather than strerror().

15 years agoDelete declaration of undefined timeval_comparator() function.
Michael Poole [Sun, 15 Jun 2008 13:22:11 +0000 (09:22 -0400)]
Delete declaration of undefined timeval_comparator() function.

15 years agoAdd ircstrlower() function.
Michael Poole [Sun, 15 Jun 2008 13:21:53 +0000 (09:21 -0400)]
Add ircstrlower() function.

15 years agosrc/Makefile.am: Fix typo in name of ioset-kevent.c.
Michael Poole [Wed, 30 Apr 2008 02:31:36 +0000 (22:31 -0400)]
src/Makefile.am: Fix typo in name of ioset-kevent.c.

15 years agoFully fix build on Cygwin.
Michael Poole [Wed, 30 Apr 2008 02:13:08 +0000 (22:13 -0400)]
Fully fix build on Cygwin.

src/common.h (localtime_r): Do not declare in this file.
src/compat.h (localtime_r): Fix conditional definition of localtime_r().
  (EAI_*): Define getaddrinfo()/getnameinfo() error codes if needed.
src/compat.c (getaddrinfo): Return errors by macro.
  (getnameinfo): Implement a simple version of this function.

15 years agoMakefile.win32: Include git-version.o and ioset-select.o in build.
Michael Poole [Wed, 30 Apr 2008 02:05:38 +0000 (22:05 -0400)]
Makefile.win32: Include git-version.o and ioset-select.o in build.
src/config.h.win32: #define HAVE_LOCALTIME 1 to get localtime_r().

15 years agosrc/proto-p10.c: Allow his_server{name,comment} to be updated on rehash.
Michael Poole [Thu, 24 Apr 2008 11:33:35 +0000 (07:33 -0400)]
src/proto-p10.c: Allow his_server{name,comment} to be updated on rehash.

15 years agoUpdate Win32 builds to mostly work under Cygwin.
Michael Poole [Thu, 24 Apr 2008 11:29:24 +0000 (07:29 -0400)]
Update Win32 builds to mostly work under Cygwin.

Makefile.win32: Add -mno-cygwin to LDFLAGS so native Cygwin builds work.
configure.in: Look for stdint.h, localtime() and --with-win32.
src/compat.c: Remove "extern" modifiers on function definitions. Only
  implement localtime_r() if we have localtime() too.
src/compat.h: Include stdint.h if we have it; define LINE_MAX if needed.
  Also define NI_NUMERICHOST for the benefits of getnameinfo().
src/config.h.win32: Resynchronize with config.h.in; set WITH_IOSET_SELECT
  and WITH_PROTOCOL_P10.

16 years agoImplement our own output buffering inside saxdb.
Michael Poole [Sun, 30 Mar 2008 04:00:48 +0000 (00:00 -0400)]
Implement our own output buffering inside saxdb.

src/saxdb.c (SAXDB_BUFFER_SIZE): Default to 32 KB if not already defined.
  (struct saxdb_context): Add "obuf" member.
  (saxdb_flush): Define new helper function.
  (saxdb_put_char): Convert to function.
  (saxdb_put_nchars): Update to use "obuf" and saxdb_flush().
  (saxdb_put_string): Update to use saxdb_put_nchars().
  (saxdb_put_qstring): Likewise.
  (saxdb_open_context): Allocate space for ctx->obuf.
  (saxdb_close_context): Flush the buffer and free ctx->obuf.

16 years agoAdd close_file arg to saxdb_close_context(); allocate all saxdb contexts from heap.
Michael Poole [Sun, 30 Mar 2008 02:43:42 +0000 (22:43 -0400)]
Add close_file arg to saxdb_close_context(); allocate all saxdb contexts from heap.

src/saxdb.h (saxdb_close_context): Add "close_file" argument.
src/saxdb.c (saxdb_write_db): Use saxdb_{open,close}_context() rather than
    putting it on the stack.
  (write_database): Likewise.
  (saxdb_close_context): Implement the close_file argument.
src/modcmd.c (cmd_dump_messages): Use the close_file argument.
src/mod-helpserv.c (helpserv_log_request): Likewise.

16 years agoMake saxdb_context definition private.
Michael Poole [Sun, 30 Mar 2008 02:24:45 +0000 (22:24 -0400)]
Make saxdb_context definition private.

src/saxdb.h (struct saxdb_context): Declare, do not define.
  (saxdb_jmp_buf): Declare new function.
src/saxdb.c (struct saxdb_context): Define.
  (saxdb_write_db): Use saxdb_jmp_buf() instead of ctx.jbuf.
  (write_database): Likewise.
  (saxdb_jmp_buf): Define.
src/modcmd.c (cmd_dump_messages): Use saxdb_jmp_buf().
src/mod-helpserv.c (helpserv_log_request): Likewise.

16 years agosrc/log.c: Avoid recursive logging.
Michael Poole [Sun, 30 Mar 2008 02:10:28 +0000 (22:10 -0400)]
src/log.c: Avoid recursive logging.
(Allocator failures can lead to some nasty recursive logging attempts.)

16 years agosrc/proto-p10.c (AddUser): Avoid sending a duplicate irc_user() during bursts.
Michael Poole [Tue, 25 Mar 2008 03:22:05 +0000 (23:22 -0400)]
src/proto-p10.c (AddUser): Avoid sending a duplicate irc_user() during bursts.

16 years agoImplement kqueue()/kevent() ioset backend.
Michael Poole [Tue, 25 Mar 2008 02:56:18 +0000 (22:56 -0400)]
Implement kqueue()/kevent() ioset backend.

configure.in: Check for <sys/event.h>, kqueue() and kevent().  If kevent()
    is present, default to enabling ioset-kevent.
src/Makefile.am: Include ioset-kevent.c as extra source.
src/ioset-kevent.c: New file.
src/ioset.c: Update name for this event backend.

16 years agosrc/mail-sendmail.c: Apparently SIGCHLD needs to be SIG_DFL, not SIG_IGN.
Michael Poole [Mon, 24 Mar 2008 02:34:11 +0000 (22:34 -0400)]
src/mail-sendmail.c: Apparently SIGCHLD needs to be SIG_DFL, not SIG_IGN.

16 years agoUpdate gitignore files with in-tree build droppings.
Michael Poole [Mon, 24 Mar 2008 02:33:53 +0000 (22:33 -0400)]
Update gitignore files with in-tree build droppings.

.gitignore: Add additional generated files.
src/.gitignore: Add slab-read binary.

16 years agosrc/ioset-select.c (debug_fdsets): Default to an empty operation.
Michael Poole [Sun, 23 Mar 2008 16:04:47 +0000 (12:04 -0400)]
src/ioset-select.c (debug_fdsets): Default to an empty operation.

16 years agosrc/ioset-select.c (ioset_select_remove): Null out fds[] entry on remove.
Michael Poole [Sun, 23 Mar 2008 15:51:21 +0000 (11:51 -0400)]
src/ioset-select.c (ioset_select_remove): Null out fds[] entry on remove.

16 years agoCheck for and use appropriate type of variadic macro arguments.
Michael Poole [Sun, 23 Mar 2008 15:50:47 +0000 (11:50 -0400)]
Check for and use appropriate type of variadic macro arguments.

src/common.h: Define GCC_VARMACROS and C99_VARMACROS where appropriate.
src/chanserv.c (DEFINE_COMMAND):
src/global.c (global_notice): Likewise.
src/helpfile.h (send_channel_message): Likewise.
  (send_channel_notice): Likewise.
  (send_channel_wallops): Likewise.
src/mod-blacklist.c (blacklist_debug): Likewise.
src/mod-helpserv.c (helpserv_msguser): Likewise.
  (helpserv_user_reply): Likewise.
  (helpserv_notice): Likewise.
  (helpserv_notify): Likewise.
  (helpserv_page): Likewise.
  (helpserv_get_page_type): New helper function to reduce size of the
    expanded code for helpserv_page().
src/mod-snoop.c (SNOOP): Expand appropriately for varmacros type.
src/modcmd.h (reply): Likewise.
src/opserv.c (opserv_debug): Likewise.
  (opserv_alert): Likewise.
  (opserv_custom_alert): Likewise.

16 years agosrc/mail-sendmail.c (mail_send): Ignore SIGCHLD in the fork()'ed processes.
Michael Poole [Sun, 23 Mar 2008 15:25:23 +0000 (11:25 -0400)]
src/mail-sendmail.c (mail_send): Ignore SIGCHLD in the fork()'ed processes.

16 years agosrc/ioset-select.c: Populate and use an fdset for FDs with exceptions.
Michael Poole [Sun, 23 Mar 2008 15:24:55 +0000 (11:24 -0400)]
src/ioset-select.c: Populate and use an fdset for FDs with exceptions.

16 years agoClean up some -pedantic warnings about passing non-void-pointers with %p.
Michael Poole [Sun, 23 Mar 2008 15:24:05 +0000 (11:24 -0400)]
Clean up some -pedantic warnings about passing non-void-pointers with %p.

src/dict-splay.c (dict_sanity_check_node): Cast struct pointers to void*
    when passing them to snprintf().
src/helpfile.c (vsend_message): Likewise for log_module().
src/mod-sockcheck.c (sockcheck_free_client): Likewise.
  (sockcheck_print_client): Likewise.
  (sockcheck_elaborate_state): Likewise.
  (sockcheck_advance): Likewise.
  (sockcheck_begin_test): Likewise.
  (sockcheck_start_client): Likewise.
src/proto-p10.c (AddUser): Likewise.
src/sar.c (sar_fd_readable): Likewise.
  (sar_getaddr_append): Likewise.

16 years agoMove SIGCHLD definition to compat.h so that other files can use it.
Michael Poole [Sun, 23 Mar 2008 15:16:01 +0000 (11:16 -0400)]
Move SIGCHLD definition to compat.h so that other files can use it.

src/compat.h: If SIGCHLD is not defined, define it here.
src/main.c: ... rather than here.

16 years agoRemove extraneous semicolons from end of macro uses.
Michael Poole [Thu, 20 Mar 2008 03:46:29 +0000 (23:46 -0400)]
Remove extraneous semicolons from end of macro uses.

src/chanserv.c: Do this for dnrList.
src/log.c: Do it for logList.
src/mail-smtp.c: Do it for mail_queue.
src/mod-helpserv.c: Do it for helpserv_botlist, helpserv_reqlist and
  helpserv_userlist, and their sized allocators.
src/mod-memoserv.c: Do it for memoList.
src/modcmd.c: Do it for svccmd_list and module_list.
src/modcmd.h: Remove the extra semicolon at the end of SVCMSG_HOOK()'s definition.
src/nickserv.c: Do it for handle_info_list.
src/saxdb.c: Do it for int_list.

16 years agosrc/chanserv.c: Do not mix variable declarations and code.
Michael Poole [Thu, 20 Mar 2008 03:43:01 +0000 (23:43 -0400)]
src/chanserv.c: Do not mix variable declarations and code.

16 years agosrc/hash.c: Move irc_join() before callback handling for uniformity with other servers.
Michael Poole [Thu, 20 Mar 2008 03:42:20 +0000 (23:42 -0400)]
src/hash.c: Move irc_join() before callback handling for uniformity with other servers.

16 years agosrc/nickserv.help: Fix grammar in DELCOOKIE and ODELCOOKIE.
Michael Poole [Sun, 9 Mar 2008 00:52:08 +0000 (19:52 -0500)]
src/nickserv.help: Fix grammar in DELCOOKIE and ODELCOOKIE.

16 years agoPass is_notice status to chanmsg funcs.
ThiefMaster [Fri, 7 Mar 2008 01:53:47 +0000 (02:53 +0100)]
Pass is_notice status to chanmsg funcs.

16 years agoAllow *account to be used in !say and !emote.
ThiefMaster [Tue, 12 Feb 2008 14:26:06 +0000 (15:26 +0100)]
Allow *account to be used in !say and !emote.

16 years agoLog accountinfos on others' accounts as staff commands.
Michael Poole [Sun, 9 Mar 2008 00:36:58 +0000 (19:36 -0500)]
Log accountinfos on others' accounts as staff commands.

16 years agoAdd checkemail and odelcookie commands to nickserv.
ThiefMaster [Thu, 10 Jan 2008 12:36:51 +0000 (13:36 +0100)]
Add checkemail and odelcookie commands to nickserv.

16 years agoConvert time-related variables to consistently use "unsigned long".
Michael Poole [Sat, 5 Jan 2008 17:22:03 +0000 (12:22 -0500)]
Convert time-related variables to consistently use "unsigned long".

configure.in: Remove no-longer-used check for FMT_TIME_T.
src/*.c: Convert time_t and time adjustment values to unsigned long.
src/*.h: Likewise.
src/config.h.win32: Remove definition of FMT_TIME_T.

16 years agoPrefer "bind_address" for local addresses over "address".
Michael Poole [Tue, 18 Dec 2007 03:38:56 +0000 (22:38 -0500)]
Prefer "bind_address" for local addresses over "address".

src/mod-qserver.c (qserver_conf_read): Check for "bind_address" option
    before "address" option.
src/mod-sockcheck.c (sockcheck_read_conf): Likewise.
srvx.conf.example: Update config examples to match.

16 years agoMake triggers work properly again for privsmsgs to channels.
Michael Poole [Sat, 15 Dec 2007 18:19:51 +0000 (13:19 -0500)]
Make triggers work properly again for privsmsgs to channels.

16 years agoGreatly enhance the slab allocator.
Michael Poole [Fri, 14 Dec 2007 04:47:10 +0000 (23:47 -0500)]
Greatly enhance the slab allocator.

configure.in: Look for mprotect() function.
src/Makefile.am: Add slab-read program.
src/slab-read.c: New helper program.
src/alloc-slab.c (SLAB_DEBUG_HEADER): New bitmask macro.
  (SLAB_DEBUG_LOG): Likewise.  Implement its functions.
  (SLAB_DEBUG_PERMS): Likewise.  Implement its functions.
  (SLAB_DEBUG): Update default.
  (slab_alloc): Call slab_unprotect() when pulling free_slab_head.  Call
    slab_log_alloc() on any slab allocation.
  (slab_unalloc): Call slab_log_free() on slab unallocation.  Call
    slab_unprotect() and slab_protect() when manipulating free slabs.
  (slab_malloc): Call slab_log_alloc() on large object allocation.
  (slab_free): Call slab_log_unmap() on large object free.

16 years agoFix some memory leaks in the slab allocator (funny, isn't it?).
Michael Poole [Fri, 14 Dec 2007 03:56:03 +0000 (22:56 -0500)]
Fix some memory leaks in the slab allocator (funny, isn't it?).

alloc-slab.c (SLAB_DEBUG): Allow environment to override definition.
  (SLAB_RESERVE): Likewise.
  (MAX_SLAB_FREE): New preprocessor macro, used to cap free_slab_count.
  (slab_unalloc): Reindent SLAB_RESERVE logic.  Unconditionally link the
    free slab to the list of free slabs.  Add code to check MAX_SLAB_FREE.

16 years agoAvoid appending a user to curr_opers or curr_helpers more than once.
Michael Poole [Fri, 14 Dec 2007 03:32:13 +0000 (22:32 -0500)]
Avoid appending a user to curr_opers or curr_helpers more than once.

hash.h (userList_contains): Declare new function.
hash.c (userList_contains): Implement it.
nickserv.c (set_user_handle_info): Use it to check against curr_helpers.
proto-p10.c (mod_usermode): Use it for curr_opers.

16 years agoFix some memory leaks.
Michael Poole [Fri, 14 Dec 2007 03:01:04 +0000 (22:01 -0500)]
Fix some memory leaks.

recdb.c (parse_database): Close recdb.f on all exit paths.
sar.c (sar_cleanup): Free the string lists allocated inside config struct.
saxdb.c (saxdb_read_db): Free the previous mondo_db (if any) at first read.

16 years agoUpdate configure.in to show 1.4.0 rather than 1.4.
Michael Poole [Fri, 14 Dec 2007 02:43:20 +0000 (21:43 -0500)]
Update configure.in to show 1.4.0 rather than 1.4.

16 years agoUpdate config.h.win32 for more recent versions of mingw32.
Michael Poole [Fri, 14 Dec 2007 02:42:52 +0000 (21:42 -0500)]
Update config.h.win32 for more recent versions of mingw32.

16 years agoStore git version string to a C file, not a header.
Michael Poole [Fri, 14 Dec 2007 02:42:30 +0000 (21:42 -0500)]
Store git version string to a C file, not a header.

.gitignore: Update git-ignore.* file name.
Makefile.am: Update rebuild rules and srvx_SOURCES to match.
common.h: Declare git_version[].
main-common.c: Include git_version in version banner.  Update copyright years.
modcmd.c: Use git_version instead of GIT_VERSION.

16 years agoGet rid of trailing whitespace in coverage scripts.
Michael Poole [Thu, 13 Dec 2007 04:16:08 +0000 (23:16 -0500)]
Get rid of trailing whitespace in coverage scripts.

16 years agoDo not generate a flood of complaints on rehashing the asynchronous resolver.
Michael Poole [Thu, 13 Dec 2007 04:08:41 +0000 (23:08 -0500)]
Do not generate a flood of complaints on rehashing the asynchronous resolver.

src/sar.c (sar_services_init): Delete and re-allocate the services dicts here.
  (sar_init): .. rather than here.

16 years agoFix DNR expiration and expiration-based DNR searches.
Michael Poole [Thu, 13 Dec 2007 04:07:52 +0000 (23:07 -0500)]
Fix DNR expiration and expiration-based DNR searches.

src/chanserv.c (expire_dnrs): Use the usual trick for iterating over a dict
    while we might want to delete elements from it.
  (dnr_search_matches): Simplify the min_expires test.  If max_expires is
    set, fail if the DNR never expires or it expires later.
  (dnr_search_create): Initialize max_expires to 0, not INT_MAX.

16 years agoUpdate .gitignore files with entries normally generated by in-tree builds.
Michael Poole [Thu, 13 Dec 2007 03:51:12 +0000 (22:51 -0500)]
Update .gitignore files with entries normally generated by in-tree builds.

16 years agoDo not eat first word in ?part reason.
ThiefMaster [Mon, 10 Dec 2007 00:11:37 +0000 (01:11 +0100)]
Do not eat first word in ?part reason.

16 years agoFix sar.c build on FreeBSD 5.5.
Michael Poole [Wed, 12 Dec 2007 02:44:25 +0000 (21:44 -0500)]
Fix sar.c build on FreeBSD 5.5.

src/sar.c: #include <netinet/in.h> if it is available.

16 years agoClarify some log messages. v1.4.0-rc1
Michael Poole [Tue, 11 Dec 2007 01:04:44 +0000 (20:04 -0500)]
Clarify some log messages.

src/mod-sockcheck.c (sockcheck_read_conf): Add missing "from".

src/proto-common.c (cmd_error): Clarify the source of the error.

16 years agoAdd variable reference to quash gcc warning with -DNDEBUG.
Michael Poole [Tue, 31 Jul 2007 18:55:47 +0000 (14:55 -0400)]
Add variable reference to quash gcc warning with -DNDEBUG.

16 years agoAdded forcekick command to opserv to allow kicking of +k opers.
ThiefMaster [Fri, 22 Jun 2007 19:36:07 +0000 (21:36 +0200)]
Added forcekick command to opserv to allow kicking of +k opers.

16 years agoAvoid trying to mmap() or read a zero-byte database file.
Michael Poole [Fri, 27 Jul 2007 03:15:23 +0000 (23:15 -0400)]
Avoid trying to mmap() or read a zero-byte database file.

src/recdb.c (parse_database): If the file is empty, we can just return an
  empty database without trying to mmap() it (zero-sized mmap generates
  EINVAL) or trying to read it.

16 years agoDon't check users on bursting servers against blacklists.
ThiefMaster [Wed, 13 Jun 2007 16:24:54 +0000 (18:24 +0200)]
Don't check users on bursting servers against blacklists.

16 years agoReversed channel order in remote whois so it matches ircu's order.
ThiefMaster [Tue, 29 May 2007 22:32:32 +0000 (00:32 +0200)]
Reversed channel order in remote whois so it matches ircu's order.

16 years agoAdded debug notices for dnsbl matches in blacklist module.
ThiefMaster [Tue, 29 May 2007 20:03:04 +0000 (22:03 +0200)]
Added debug notices for dnsbl matches in blacklist module.

16 years agoFix an error in backtracking (apparently exacerbated by escapes).
Michael Poole [Fri, 27 Jul 2007 01:35:57 +0000 (21:35 -0400)]
Fix an error in backtracking (apparently exacerbated by escapes).

src/tools.c: When backtracking, make sure we have not hit the end of text.

16 years agoBump services version to 1.4.
Michael Poole [Fri, 27 Jul 2007 01:35:18 +0000 (21:35 -0400)]
Bump services version to 1.4.

configure.in: Bump version to 1.4.

16 years agoUpdate revision levels in config.h.win32.
Michael Poole [Fri, 27 Jul 2007 01:35:00 +0000 (21:35 -0400)]
Update revision levels in config.h.win32.

src/config.h.win32: Update VERSION and related data to use 1.4.  Also,
  socklen_t should be int on Windows.

16 years agoUplink exhaustion should be a non-fatal error, since we exit afterwards.
Michael Poole [Fri, 27 Jul 2007 01:34:04 +0000 (21:34 -0400)]
Uplink exhaustion should be a non-fatal error, since we exit afterwards.

src/main-common.c: Demote LOG_FATAL errors to LOG_ERROR so that we do not
  generate a core file by tripping the assert() in LOG_FATAL.

16 years agoFix typo in !help ban.
Michael Poole [Fri, 27 Jul 2007 01:32:55 +0000 (21:32 -0400)]
Fix typo in !help ban.

src/chanserv.help: In English, we generally say "please join #channel"
  rather than "please join to #channel".

16 years agoGet native Win32 mode working (at least in a basic state).
Michael Poole [Tue, 29 May 2007 02:14:21 +0000 (22:14 -0400)]
Get native Win32 mode working (at least in a basic state).

Makefile.win32: Use mail-smtp backend.  Fix main build rule.
src/ioset-win32.c (ioset_win32_init): Return values appropriately.
  (ioset_win32_loop): Update "now" before dispatching events.
src/ioset.c: Add errno kludges to work properly on Win32.  Use send() and
  recv() rather than write() and read().  Use simple comparisons rather
  than switch statements with only one case.
src/mail-smtp.c: Initial pass at SMTP backend for mail service.  Does not
  yet try to send the mail body, and has not been tested.
src/main-common.c: Move usage(), version(), license() to here ..
src/main.c: .. from here.
src/main-win32.c: Parse command-line options.

16 years agoFix misapplied patches from the GameSurge branch.
Michael Poole [Mon, 28 May 2007 19:02:30 +0000 (15:02 -0400)]
Fix misapplied patches from the GameSurge branch.

* src/nickserv.c (cmd_handleinfo): Use IsStaff() rather than IsSupport().
* src/opserv.c (cmd_block): Use C style comment, not C++ style.
  (is_oper_victim): Likewise.

16 years agoAdded TARGET criterion for notice alerts to specify the channel the notice is sent to.
ThiefMaster [Mon, 28 May 2007 15:14:34 +0000 (17:14 +0200)]
Added TARGET criterion for notice alerts to specify the channel the notice is sent to.

16 years agoAllow *account in ban/unban commands (to ban/unban *!*@account.*)
ThiefMaster [Sat, 26 May 2007 12:07:55 +0000 (14:07 +0200)]
Allow *account in ban/unban commands (to ban/unban *!*@account.*)

16 years agoWe have year 2007 in !version, too...
ThiefMaster [Sun, 20 May 2007 22:12:42 +0000 (00:12 +0200)]
We have year 2007 in !version, too...

16 years agoGet rid of remaining tabs and replace them with spaces.
ThiefMaster [Sun, 20 May 2007 15:48:44 +0000 (17:48 +0200)]
Get rid of remaining tabs and replace them with spaces.

16 years agoAdded feigling's patch to allow multiple 'channel' criteria in trace/addalert.
ThiefMaster [Sun, 20 May 2007 14:19:32 +0000 (16:19 +0200)]
Added feigling's patch to allow multiple 'channel' criteria in trace/addalert.

16 years agoMake opserv.part and opserv.join use the channel arg from the modcmd system.
ThiefMaster [Sun, 20 May 2007 12:31:29 +0000 (14:31 +0200)]
Make opserv.part and opserv.join use the channel arg from the modcmd system.

16 years agoReject invalid durations in addnote.
ThiefMaster [Sun, 20 May 2007 10:16:17 +0000 (12:16 +0200)]
Reject invalid durations in addnote.

16 years agoAvoid crashing when BURST has missing modes.
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.

16 years agoCheck if there are opers on the target ip in trace gag/gline and block.
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.

16 years agoAdded idletime to remote whois.
ThiefMaster [Wed, 2 May 2007 15:52:28 +0000 (17:52 +0200)]
Added idletime to remote whois.

16 years agoMade ounregister command safer by requiring FORCE to unregister active/flagged accounts.
ThiefMaster [Mon, 30 Apr 2007 11:19:36 +0000 (13:19 +0200)]
Made ounregister command safer by requiring FORCE to unregister active/flagged accounts.

16 years ago* Disallow BLOCK on trusted ips
ThiefMaster [Sat, 14 Apr 2007 18:54:02 +0000 (20:54 +0200)]
* Disallow BLOCK on trusted ips
* Add ABUSE TRUSTED criterion for alerts/trace

16 years agoOnly allow opers with access to GLINE to use a custom duration in BLOCK.
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.

16 years agoCheck account-based alerts when someone authenticates.
ThiefMaster [Sat, 7 Apr 2007 18:06:24 +0000 (20:06 +0200)]
Check account-based alerts when someone authenticates.

16 years ago* Reject durations containing invalid characters (like "1day" instead of "1d").
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.

16 years agoDo not display account notes to non-staff.
ThiefMaster [Fri, 6 Apr 2007 13:05:05 +0000 (15:05 +0200)]
Do not display account notes to non-staff.

16 years agoFix unreg_{notice,privmsg}_func().
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.

17 years agoUse appropriate upper bounds for account searches.
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.

17 years agoFix DNR searching for globs.
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().

17 years agoUse correct free functions for blacklist dicts.
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.

17 years agoAdd "dnrsearch count" action.
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.

17 years agoFor giveownership to new members, give old owner access 499 instead of 400.
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.

17 years agoNickServ "notes" command, "oset <command>" restriction, fakehost searching.
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.

17 years agoAdd typecast to avoid a warning from some buggy Gentoo version of gcc.
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.

17 years agoAvoid crashing in chanserv_is_dnr() when handle == NULL.
Michael Poole [Sat, 31 Mar 2007 16:09:25 +0000 (12:09 -0400)]
Avoid crashing in chanserv_is_dnr() when handle == NULL.

17 years agoAdd missing newline to "Forking into the background" display.
Michael Poole [Sat, 31 Mar 2007 16:09:03 +0000 (12:09 -0400)]
Add missing newline to "Forking into the background" display.

17 years agoReplace ChangeLog appropriately.
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".

17 years agoAdd an asynchronous resolver library.
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.

17 years agoAdd file-based IP blacklist module.
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.

17 years agoRemove unnecessary #include from proto.h
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.

17 years agoGet rid of srvx-broadcast announcements. (They do not scale.)
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.

17 years agoTweak default access restrictions for "set unreviewed *".
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.

17 years agoAdd "unreviewed" flag for channels.
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.

17 years agoAdd trace-style DNR searching capabilities.
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.