ircd-ircu-2.10.12.10.dfsg1/0000755000175000017500000000000010574371254014640 5ustar madkissmadkissircd-ircu-2.10.12.10.dfsg1/tools/0000755000175000017500000000000010561247166016000 5ustar madkissmadkissircd-ircu-2.10.12.10.dfsg1/tools/mkchroot0000755000175000017500000000530707314413500017546 0ustar madkissmadkiss#!/bin/sh # # IRC - Internet Relay Chat, tools/mkchroot # Copyright (C) 2001 Kevin L. Mitchell # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 1, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # # $Id: mkchroot,v 1.1 2001/06/21 15:48:16 kev Exp $ if test $# -lt 2; then echo "Usage: $0 [ [...]]" >&2 exit 2 fi destdir=$1 shift # Use ldd to formulate a newline-separated list of libraries liblist= for arg do # Interpret ldd output libs=`ldd $arg | sed -e 's/ / /g' -e 's/ */ /g' -e 's/^ //g' | \ awk 'BEGIN { RS = " "; } { print; }' | grep '^/'` # add it to the list so far if test x"$liblist" = x; then liblist=$libs else liblist="$liblist $libs" fi done # Sort the list and remove duplicates liblist=`echo "$liblist" | sort -u` # Now figure out all the subdirectories we're interested in # Must create the top level, if need be dirlist=/ # Break down the library list into directories and remove duplicates dirs=`echo "$liblist" | sed -e 's@/[^/]*$@@' | sort -u` # Go through each directory to break it down into its components for headdir in $dirs; do tIFS=$IFS IFS=/$IFS # Start at the top level dir= for subdir in $headdir; do # update dir so we know where we are if test x"$dir" = x; then dir=$subdir else dir=$dir/$subdir fi # add (absolute) entry to directory list dirlist="$dirlist /$dir" done IFS=$tIFS done # Sort for ordering and remove duplicates dirlist=`echo "$dirlist" | sort -u` # Create the directories echo "Creating directories:" for dir in $dirlist; do # add destination directory name, remove trailing /, if any, for test dir=`echo "$destdir$dir" | sed -e 's@//*$@@'` echo " $dir" # sanity-check directory... if test -f "$dir" -o -h "$dir"; then echo "ERROR: A non-directory \"$dir\" already exists; bailing out" >&2 exit 2 elif test ! -d "$dir"; then # Create the directory world-readable mkdir -m 755 $dir fi done # Now copy over the libraries echo "Copying libraries:" for lib in $liblist; do echo " $lib -> $destdir$lib" # Preserve permissions cp -p $lib $destdir$lib done ircd-ircu-2.10.12.10.dfsg1/tools/iauth-test0000755000175000017500000001676310414576026020027 0ustar madkissmadkiss#! /usr/bin/perl # iauth-test: test script for IRC authorization (iauth) protocol # Copyright 2006 Michael Poole # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. require 5.008; # We assume deferred signal handlers, new in 5.008. use strict; use warnings; use vars qw(%pending); use Config; # for $Config{sig_name} and $Config{sig_num} use FileHandle; # for autoflush method on file handles # This script is intended to help test an implementation of the iauth # protocol by exercising every command in the protocol and by # exercising most distinct combinations of commands. It assumes IPv4 # support in the server and POSIX real-time signal support in the OS # (recognized and supported by Perl). # Certain behavior is triggered by receipt of real-time signals. # SIGRTMIN + 0 -> Send server notice ('>'). # SIGRTMIN + 1 -> Toggle debug level ('G'). # SIGRTMIN + 2 -> Set policy options ('O'). # SIGRTMIN + 3 -> Simulate config change ('a', 'A'). # SIGRTMIN + 4 -> Simulate statistics change ('s', 'S'). # In the following discussion, sX means message X from the server, and # iX means message X from iauth. The hard part is the ordering of # various events during client registration. This includes sC, sP, # sU, su, sn, sN/d, sH and sT; and o/U/u, iN, iI, iC and iD/R/k/K. # sC is first, sD/sT/iD/R/k/K is last. If sH is sent, no more sU, su, # sn, sN, sd or sH messages may be sent. If iI is sent, iN should # also be sent (either before or after iI). Multiple sP, sU and iC # messages may be sent. Otherwse, the ordering of unrelated messages # from either source are not constrained, but only one message from # each set of alternatives may be sent. # This means the sets of commands with interesting orderings are: # sU, su, io/U/u # sN/d, iN, iI # sH, sT or iD/R/k/K # 127.x.y.z IP addresses are used to exercise these orderings; see the # %handlers variable below. sub dolog ($) { print LOG "$_[0]\n"; } sub reply ($;$$) { my ($msg, $client, $extra) = @_; if (not defined $msg) { # Accept this for easier handling of client reply messages. return; } elsif (ref $msg eq '') { $msg =~ s/^(.) ?/$1 $client->{id} $client->{ip} $client->{port} / if $client; dolog "< $msg"; print "$msg\n"; } elsif (ref $msg eq 'ARRAY') { grep { reply($_, $client, $extra); } @$msg; } elsif (ref $msg eq 'CODE') { &$msg($client, $extra); } else { die "Unknown reply message type."; } } # Find the names of signals with values SIGRTMIN+1, +2, etc. BEGIN { my @sig_name; my %sig_num; sub populate_signals () { die "No sigs?" unless $Config{sig_name} and $Config{sig_num}; my @names = split ' ', $Config{sig_name}; @sig_num{@names} = split ' ', $Config{sig_num}; foreach (@names) { $sig_name[$sig_num{$_}] ||= $_; } } sub assign_signal_handlers() { my $sigrtmin = $sig_num{RTMIN}; die "No realtime signals?" unless $sigrtmin; $SIG{$sig_name[$sigrtmin+0]} = \&send_server_notice; $SIG{$sig_name[$sigrtmin+1]} = \&toggle_debug_level; $SIG{$sig_name[$sigrtmin+2]} = \&set_policy_options; $SIG{$sig_name[$sigrtmin+3]} = \&sim_config_changed; $SIG{$sig_name[$sigrtmin+4]} = \&sim_stats_change; } } BEGIN { my $debug_level = 0; my $max_debug_level = 2; sub toggle_debug_level () { if (++$debug_level > $max_debug_level) { $debug_level = 0; } reply "G $debug_level"; } } BEGIN { my %rotation = ( '' => 'AU', 'AU' => 'AURTW', 'AURTW' => '', ); my $policy = ''; sub set_policy_options () { $policy = $rotation{$policy}; reply "O $policy"; } } BEGIN { my $generation = 0; sub sim_config_changed () { reply "a"; reply "A config $generation"; $generation++; } } BEGIN { my $generation = 0; sub sim_stats_change () { reply "s"; reply "S stats $generation"; $generation++; } } sub send_server_notice () { reply "> :Hello the server!"; } my %handlers = ( # Default handliner: immediately report done. 'default' => { C_reply => 'D' }, # 127.0.0.x: various timings for iD/iR/ik/iK. '127.0.0.1' => { C_reply => 'D' }, '127.0.0.2' => { C_reply => 'R account-1' }, '127.0.0.3' => { C_reply => 'k' }, '127.0.0.4' => { C_reply => 'K' }, '127.0.0.15' => { }, '127.0.0.16' => { H_reply => 'D' }, '127.0.0.17' => { H_reply => 'R account-2' }, '127.0.0.18' => { H_reply => 'k' }, '127.0.0.19' => { H_reply => 'K' }, '127.0.0.32' => { T_reply => 'D' }, '127.0.0.33' => { T_reply => 'R account-3' }, '127.0.0.34' => { T_reply => 'k' }, '127.0.0.35' => { T_reply => 'K' }, # 127.0.1.x: io/iU/iu functionality. '127.0.1.0' => { C_reply => 'o forced', H_reply => 'D' }, '127.0.1.1' => { C_reply => 'U trusted', H_reply => 'D' }, '127.0.1.2' => { C_reply => 'u untrusted', H_reply => 'D' }, # 127.0.2.x: iI/iN functionality. '127.0.2.0' => { C_reply => 'N iauth.assigned.host', H_reply => 'D' }, '127.0.2.1' => { C_reply => \&ip_change }, # 127.0.3.x: iC/sP functionality. '127.0.3.0' => { C_reply => 'C :Please enter the password.', P_reply => \&passwd_check }, ); sub handle_new_client ($$$$) { my ($id, $ip, $port, $extra) = @_; my $handler = $handlers{$ip} || $handlers{default}; my $client = { id => $id, ip => $ip, port => $port, handler => $handler }; # If we have any deferred reply handlers, we must save the client. $pending{$id} = $client if grep /^[^C]_reply$/, keys %$handler; reply $client->{handler}->{C_reply}, $client, $extra; } sub ip_change ($$) { my ($client, $extra) = @_; reply 'I 127.255.255.254', $client; $client->{ip} = '127.255.255.254'; reply 'N other.assigned.host', $client; reply 'D', $client; } sub passwd_check ($$) { my ($client, $extra) = @_; if ($extra eq 'secret') { reply 'D', $client; } else { reply 'C :Bad password', $client; } } open LOG, ">> iauth.log"; populate_signals(); assign_signal_handlers(); autoflush LOG 1; autoflush STDOUT 1; autoflush STDERR 1; dolog "IAuth starting " . scalar(localtime(time)); while (<>) { my ($id, $client); # Chomp newline and log incoming message. s/\r?\n?\r?$//; dolog "> $_"; # If there's an ID at the start of the line, parse it out. if (s/^(\d+) //) { $id = $1; $client = $pending{$id}; } # Figure out how to handle the command. if (/^C (\S+) (\S+) (.+)$/) { handle_new_client($id, $1, $2, $3); } elsif (/^([DT])/ and $client) { reply $client->{handler}->{"${1}_reply"}, $client; delete $pending{$id}; } elsif (/^([d])/ and $client) { reply $client->{handler}->{"${1}_reply"}, $client; } elsif (/^([HNPUu]) (.+)/ and $client) { reply $client->{handler}->{"${1}_reply"}, $client, $2; } } ircd-ircu-2.10.12.10.dfsg1/tools/Bounce/0000755000175000017500000000000010561247166017213 5ustar madkissmadkissircd-ircu-2.10.12.10.dfsg1/tools/Bounce/bounce.conf0000644000175000017500000000040607441767511021341 0ustar madkissmadkiss# Format: P:::: # IP's only for now :) # $Id: bounce.conf,v 1.2 2002/03/07 22:52:57 ghostwolf Exp $ P:192.168.10.5:2000:192.168.10.1:80 P:192.168.10.5:3000:4.33.94.3:80 P:192.168.10.5:4000:209.207.224.42:80 ircd-ircu-2.10.12.10.dfsg1/tools/Bounce/build0000755000175000017500000000010007075233326020226 0ustar madkissmadkissg++ -O3 -ggdb -Wall -Wmissing-declarations -o Bounce Bounce.cpp ircd-ircu-2.10.12.10.dfsg1/tools/Bounce/Bounce.cpp0000755000175000017500000002756007441767511021153 0ustar madkissmadkiss/* * IRC - Internet Relay Chat, tools/Bounce/Bounce.cpp * Copyright (C) 1990 Jarkko Oikarinen and * University of Oulu, Computing Center * * See file AUTHORS in IRC package for additional names of * the programmers. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 1, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * Port Bouncer. * * This tool is designed to set up a number of local listening ports, and * then forward any data recived on those ports, to another host/port combo. * Each listening port can bounce to a different host/port defined in the * config file. --Gte * * $Id: Bounce.cpp,v 1.3 2002/03/07 22:52:57 ghostwolf Exp $ * */ #include "Bounce.h" int main() { Bounce* application = new Bounce(); /* * Ignore SIGPIPE. */ struct sigaction act; act.sa_handler = SIG_IGN; act.sa_flags = 0; sigemptyset(&act.sa_mask); sigaction(SIGPIPE, &act, 0); #ifndef DEBUG /* * If we aren't debugging, we might as well * detach from the console. */ pid_t forkResult = fork() ; if(forkResult < 0) { printf("Unable to fork new process.\n"); return -1 ; } else if(forkResult != 0) { printf("Successfully Forked, New process ID is %i.\n", forkResult); return 0; } #endif /* * Create new application object, bind listeners and begin * polling them. */ application->bindListeners(); while (1) { application->checkSockets(); } } /* **************************************** * * * Bounce class implementation. * * * **************************************** */ void Bounce::bindListeners() { /* * bindListeners. * Inputs: Nothing. * Outputs: Nothing. * Process: 1. Reads the config file, and.. * 2. Creates a new listener for each 'P' line found. * */ FILE* configFd; char tempBuf[256]; int localPort = 0; int remotePort = 0; char* remoteServer; char* vHost; /* * Open config File. */ if(!(configFd = fopen("bounce.conf", "r"))) { printf("Error, unable to open config file!\n"); exit(0); } while (fgets(tempBuf, 256, configFd) != NULL) { if((tempBuf[0] != '#') && (tempBuf[0] != '\r')) { switch(tempBuf[0]) { case 'P': { /* Add new port listener */ strtok(tempBuf, ":"); vHost = strtok(NULL, ":"); localPort = atoi(strtok(NULL, ":")); remoteServer = strtok(NULL, ":"); remotePort = atoi(strtok(NULL, ":")); Listener* newListener = new Listener(); strcpy(newListener->myVhost, vHost); strcpy(newListener->remoteServer, remoteServer); newListener->remotePort = remotePort; newListener->localPort = localPort; #ifdef DEBUG printf("Adding new Listener: Local: %s:%i, Remote: %s:%i\n", vHost, localPort, remoteServer, remotePort); #endif newListener->beginListening(); listenerList.insert(listenerList.begin(), newListener); break; } } } } } void Bounce::checkSockets() { /* * checkSockets. * Inputs: Nothing. * Outputs: Nothing. * Process: 1. Builds up a FD_SET of all sockets we wish to check. * (Including all listeners & all open connections). * 2. SELECT(2) the set, and forward/accept as needed. * */ typedef std::list listenerContainer; typedef listenerContainer::iterator listIter; typedef std::list connectionContainer; typedef connectionContainer::iterator connIter; struct timeval tv; fd_set readfds; tv.tv_sec = 0; tv.tv_usec = 1000; int tempFd = 0; int tempFd2 = 0; int highestFd = 0; int delCheck = 0; char* tempBuf; FD_ZERO(&readfds); /* * Add all Listeners to the set. */ listIter a = listenerList.begin(); while(a != listenerList.end()) { tempFd = (*a)->fd; FD_SET(tempFd, &readfds); if (highestFd < tempFd) highestFd = tempFd; a++; } /* * Add Local & Remote connections from each * connection object to the set. */ connIter b = connectionsList.begin(); while(b != connectionsList.end()) { tempFd = (*b)->localSocket->fd; tempFd2 = (*b)->remoteSocket->fd; FD_SET(tempFd, &readfds); if (highestFd < tempFd) highestFd = tempFd; FD_SET(tempFd2, &readfds); if (highestFd < tempFd2) highestFd = tempFd2; b++; } select(highestFd+1, &readfds, NULL, NULL, &tv); /* * Check all connections for readability. * First check Local FD's. * If the connection is closed on either side, * shutdown both sockets, and clean up. * Otherwise, send the data from local->remote, or * remote->local. */ b = connectionsList.begin(); while(b != connectionsList.end()) { tempFd = (*b)->localSocket->fd; if (FD_ISSET(tempFd, &readfds)) { tempBuf = (*b)->localSocket->read(); if ((tempBuf[0] == 0)) // Connection closed. { close((*b)->localSocket->fd); close((*b)->remoteSocket->fd); #ifdef DEBUG printf("Closing FD: %i\n", (*b)->localSocket->fd); printf("Closing FD: %i\n", (*b)->remoteSocket->fd); #endif delete(*b); delCheck = 1; b = connectionsList.erase(b); } else { (*b)->remoteSocket->write(tempBuf, (*b)->localSocket->lastReadSize); } } if (!delCheck) b++; delCheck = 0; } /* * Now check Remote FD's.. */ b = connectionsList.begin(); while(b != connectionsList.end()) { tempFd = (*b)->remoteSocket->fd; if (FD_ISSET(tempFd, &readfds)) { tempBuf = (*b)->remoteSocket->read(); if ((tempBuf[0] == 0)) // Connection closed. { close((*b)->localSocket->fd); close((*b)->remoteSocket->fd); #ifdef DEBUG printf("Closing FD: %i\n", (*b)->localSocket->fd); printf("Closing FD: %i\n", (*b)->remoteSocket->fd); #endif delete(*b); delCheck = 1; b = connectionsList.erase(b); } else { (*b)->localSocket->write(tempBuf, (*b)->remoteSocket->lastReadSize); } } if (!delCheck) b++; delCheck = 0; } /* * Check all listeners for new connections. */ a = listenerList.begin(); while(a != listenerList.end()) { tempFd = (*a)->fd; if (FD_ISSET(tempFd, &readfds)) { recieveNewConnection(*a); } a++; } } void Bounce::recieveNewConnection(Listener* listener) { /* * recieveNewConnection. * Inputs: A Listener Object. * Outputs: Nothing. * Process: 1. Recieves a new connection on a local port, * and creates a connection object for it. * 2. Accepts the incomming connection. * 3. Creates a new Socket object for the remote * end of the connection. * 4. Connects up the remote Socket. * 5. Adds the new Connection object to the * connections list. * */ Connection* newConnection = new Connection(); newConnection->localSocket = listener->handleAccept(); Socket* remoteSocket = new Socket(); newConnection->remoteSocket = remoteSocket; if(remoteSocket->connectTo(listener->remoteServer, listener->remotePort)) { connectionsList.insert(connectionsList.begin(), newConnection); } else { #ifdef DEBUG newConnection->localSocket->write("Unable to connect to remote host.\n"); #endif close(newConnection->localSocket->fd); delete(newConnection); delete(remoteSocket); } } /* **************************************** * * * Listener class implementation. * * * **************************************** */ Socket* Listener::handleAccept() { /* * handleAccept. * Inputs: Nothing. * Outputs: A Socket Object. * Process: 1. Accept's an incomming connection, * and returns a new socket object. */ int new_fd = 0; int sin_size = sizeof(struct sockaddr_in); Socket* newSocket = new Socket(); new_fd = accept(fd, (struct sockaddr*)&newSocket->address, (socklen_t*)&sin_size); newSocket->fd = new_fd; return newSocket; } void Listener::beginListening() { /* * beginListening. * Inputs: Nothing. * Outputs: Nothing. * Process: 1. Binds the local ports for all the * Listener objects. * */ struct sockaddr_in my_addr; int bindRes; int optval; optval = 1; fd = socket(AF_INET, SOCK_STREAM, 0); /* Check for no FD's left?! */ my_addr.sin_family = AF_INET; my_addr.sin_port = htons(localPort); my_addr.sin_addr.s_addr = inet_addr(myVhost); bzero(&(my_addr.sin_zero), 8); setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof(optval)); bindRes = bind(fd, (struct sockaddr *)&my_addr, sizeof(struct sockaddr)); if(bindRes == 0) { listen(fd, 10); } else { /* * If we can't bind a listening port, we might aswell drop out. */ printf("Unable to bind to %s:%i!\n", myVhost, localPort); exit(0); } } /* **************************************** * * * Socket class implementation. * * * **************************************** */ Socket::Socket() { /* * Socket Constructor. * Inputs: Nothing. * Outputs: Nothing. * Process: Initialises member variables. * */ fd = -1; lastReadSize = 0; } int Socket::write(char *message, int len) { /* * write. * Inputs: Message string, and lenght. * Outputs: Amount written, or 0 on error. * Process: 1. Writes out 'len' amount of 'message'. * to this socket. * */ if (fd == -1) return 0; int amount = ::write(fd, message, len); #ifdef DEBUG printf("Wrote %i Bytes.\n", amount); #endif return amount; } int Socket::write(char *message) { /* * write(2). * Inputs: Message string. * Outputs: Amount writte, or 0 on error. * Process: Writes out the whole of 'message'. * */ if (fd == -1) return 0; int amount = ::write(fd, message, strlen(message)); #ifdef DEBUG printf("Wrote %i Bytes.\n", amount); #endif return amount; } int Socket::connectTo(char *hostname, unsigned short portnum) { /* * connectTo. * Inputs: Hostname and port. * Outputs: +ve on success, 0 on failure. * Process: 1. Connects this socket to remote 'hostname' on * port 'port'. * */ struct hostent *hp; if ((hp = gethostbyname(hostname)) == NULL) { return 0; } memset(&address,0,sizeof(address)); memcpy((char *)&address.sin_addr,hp->h_addr,hp->h_length); address.sin_family= hp->h_addrtype; address.sin_port= htons((u_short)portnum); if ((fd = socket(hp->h_addrtype,SOCK_STREAM,0)) < 0) return 0; if (connect(fd, (struct sockaddr*)&address, sizeof(address)) < 0) { close(fd); fd = -1; return 0; } return(1); } char* Socket::read() { /* * read. * Inputs: Nothing. * Outputs: char* to static buffer containing data. * Process: 1. Reads as much as possible from this socket, up to * 4k. * */ int amountRead = 0; static char buffer[4096]; amountRead = ::read(fd, &buffer, 4096); if ((amountRead == -1)) buffer[0] = '\0'; buffer[amountRead] = '\0'; #ifdef DEBUG printf("Read %i Bytes.\n", amountRead); #endif /* * Record this just incase we're dealing with binary data with 0's in it. */ lastReadSize = amountRead; return (char *)&buffer; } ircd-ircu-2.10.12.10.dfsg1/tools/Bounce/Bounce.h0000755000175000017500000000601707441767511020612 0ustar madkissmadkiss/* * IRC - Internet Relay Chat, tools/Bounce/Bounce.h * Copyright (C) 1990 Jarkko Oikarinen and * University of Oulu, Computing Center * * See file AUTHORS in IRC package for additional names of * the programmers. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 1, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: Bounce.h,v 1.3 2002/03/07 22:52:57 ghostwolf Exp $ * */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using std::list; #define DEBUG /* * "Bounce" Class. */ class Listener; class Connection; class Bounce { public: list listenerList; // List of 'Listeners'. list connectionsList; // List of 'Connections'. void bindListeners(); // Binds Listening Ports. void checkSockets(); // Polls all sockets. void recieveNewConnection(Listener*); // Accepts connections. }; /* * "Socket" Class. */ class Socket { public: int fd; // File descriptor. int lastReadSize; // Size of last read buffer. struct sockaddr_in address; // Socket addr_in struct. int connectTo(char*, unsigned short); // Connects the socket. int write(char*, int); // Writes 'int' bytes from message. int write(char*); // Writes strlen(message). char* read(); // Reads as much as possible into a 4k buffer. Socket(); // Constructor. }; /* * "Listener" Class. */ class Bounce; class Listener { public: int fd; // File descriptor. int remotePort; // Remote port from config. int localPort; // Local port for binding. char myVhost[15]; // Vhost to bind locally. char remoteServer[15]; // Remote server to connect to. void beginListening(); // Bind listening ports. Socket* handleAccept(); // Accept a new connection. }; /* * "Connection" Class. * Simply a container for a local/remote Socket pair. */ class Connection { public: Socket* localSocket; Socket* remoteSocket; }; ircd-ircu-2.10.12.10.dfsg1/tools/ringlog.c0000644000175000017500000003027110071002704017567 0ustar madkissmadkiss/* ** Copyright (C) 2002 by Kevin L. Mitchell ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 2 of the License, or ** (at your option) any later version. ** ** This program is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** GNU General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with this program; if not, write to the Free Software ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ** ** @(#)$Id: ringlog.c,v 1.4 2004/07/01 12:38:28 entrope Exp $ */ /* * This file contains two separate pieces, along with some common * gunk. If RINGLOG_INSTRUMENT is defined, the two special functions * __cyg_profile_func_enter() and __cyg_profile_func_exit() are * defined; otherwise a main function is defined. The common gunk is * init_log(), which opens and, if necessary, initializes a special * binary log file that is treated as a ring buffer (to prevent the * file from growing unboundedly). * * The object produced when compiled with RINGLOG_INSTRUMENT is * designed to work with the special gcc option * -finstrument-functions; this option causes the * __cyg_profile_func_*() functions mentioned above to be called when * a function is entered or exited. (Of course, ringlog.o should * *not* be compiled with this option.) These functions will in turn * call store_entry(), which will call init_log() as needed to open * the log file, ensure that a start record is output, and then will * store records for the function calls. The log file used is * "call.ringlog" in the directory from which the program was * started. * * When RINGLOG_INSTRUMENT is *not* defined while building, a main * function is defined, and the result is an executable for * interpretation of a ringlog. Usage is very simple: All arguments * not beginning with '-' are treated as files to open, and all * arguments beginning with '-' are treated as a specification for the * number of entries new files should be created with. If this * specification is 0 (which it is by default), files will not be * created if they do not already exist. * * For every filename argument, at least one line will be printed * out. If the file is not empty, the entries in the file will be * printed out, one to a line. Each entry is numbered with a logical * number. The entry numbers are followed by a two word description * of the entry type ("Log start," "Function entry," "Function exit," * and "Invalid entry"), followed by a colon (":"), followed by the * word "addr" and the address of the function, followed by the word * "call" and the address from which the function was called. The * ringlog program is not able to convert these addresses to symbols * or file and line numbers--that can be done with a program like * addr2line (part of the binutils package). The output has been * carefully contrived to be parsable by a script. * * The file format is documented below. Note that data is stored in * host byte order. * * 1 2 3 * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * | Magic number | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * | First entry | Last entry | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * | Records | * \ \ * \ \ * | Records | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * * Record format: * 1 2 3 * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * | Type code | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * | Function address | * / / * / / * | Function address | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * | Calling location | * / / * / / * | Calling location | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * * Some systems may have pointers larger than 32 bits, which is why these * fields are allowed to be variable width. */ #include #include #include #include #include #include #include #include #include #include /* /etc/magic rules: * * 0 belong 0x52e45fd4 RingLog call trace file, big endian * >4 beshort x (First entry %u, * >>6 beshort x last entry %u) * 0 lelong 0x52e45fd4 RingLog call trace file, little endian * >4 leshort x (First entry %u, * >>6 leshort x last entry %u) */ #define RINGLOG_MAGIC 0x52e45fd4 /* verify file format */ #define RINGLOG_INIT 0x00000000 /* mark when a session was initiated */ #define RINGLOG_ENTER 0x01010101 /* record function entry */ #define RINGLOG_EXIT 0x02020202 /* record function exit */ #define RINGLOG_FNAME "call.ringlog" /* default file name */ #define RINGLOG_ILEN 2000 /* default number of entries */ /* length of the header and of individual entries */ #define HEAD_LEN (sizeof(u_int32_t) + 2 * sizeof(u_int16_t)) #define ENTRY_LEN (sizeof(u_int32_t) + 2 * sizeof(void *)) /* return an lvalue to the specified type stored at the specified location */ #define rl_ref(log, loc, type) (*((type *)((log) + (loc)))) /* access particular header fields */ #define rl_magic(log) rl_ref((log), 0, u_int32_t) #define rl_first(log) rl_ref((log), 4, u_int16_t) #define rl_last(log) rl_ref((log), 6, u_int16_t) /* translate physical entry number to a file location */ #define rl_addr(loc) ((loc) * ENTRY_LEN + HEAD_LEN) /* extract the type, function, and call fields of an entry */ #define rl_type(log, loc) rl_ref((log), rl_addr(loc), u_int32_t) #define rl_func(log, loc) rl_ref((log), rl_addr(loc) + sizeof(u_int32_t), \ void *) #define rl_call(log, loc) rl_ref((log), rl_addr(loc) + sizeof(u_int32_t) + \ sizeof(void *), void *) static char *log = 0; /* the log has to be global data */ static size_t log_size = 0; /* remember the size of the log */ static int log_length = 0; /* remember how many entries it'll hold */ /* Open and initialize the log file */ static int init_log(char *fname, size_t init_len) { char c = 0; int fd, err = 0, size = -1; struct stat buf; /* open file */ if ((fd = open(fname, O_RDWR | (init_len > 0 ? O_CREAT : 0), S_IRUSR | S_IWUSR)) < 0) return errno; /* return error */ if (fstat(fd, &buf)) { /* get size */ err = errno; /* save errno... */ close(fd); /* close file descriptor */ return err; /* return error */ } if (buf.st_size <= 8) /* too small */ size = HEAD_LEN + ENTRY_LEN * init_len; else if ((buf.st_size - 8) % ENTRY_LEN) /* not a multiple of entry length */ size = ((buf.st_size - 8) / ENTRY_LEN + 1) * ENTRY_LEN + 8; /* round up */ if (size >= 0) { /* need to set the size */ if (lseek(fd, size - 1, SEEK_SET) < 0) { /* seek to the end of our file */ err = errno; /* save errno... */ close(fd); /* close file descriptor */ return err; /* return error */ } if (write(fd, &c, 1) < 0) { /* write a zero to set the new size */ err = errno; /* save errno... */ close(fd); /* close file descriptor */ return err; /* return error */ } log_size = size; /* record log size */ } else log_size = buf.st_size; /* record log size */ /* map the file to memory */ if ((log = (char *)mmap(0, log_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0)) == MAP_FAILED) err = errno; /* save errno... */ close(fd); /* don't need the file descriptor anymore */ if (err) /* an error occurred while mapping the file; return it */ return err; log_length = (log_size - HEAD_LEN) / ENTRY_LEN; /* store number of entries */ if (rl_magic(log) == 0) { /* initialize if necessary */ rl_magic(log) = RINGLOG_MAGIC; rl_first(log) = -1; rl_last(log) = -1; } if (rl_magic(log) != RINGLOG_MAGIC) { /* verify file format */ munmap(log, log_size); /* unmap file */ return -1; /* -1 indicates file format error */ } return 0; /* return success */ } #ifdef RINGLOG_INSTRUMENT /* store an entry in the log file */ static void store_entry(u_int32_t type, void *this_fn, void *call_site) { if (!log) { /* open the log file if necessary; die if unable */ assert(init_log(RINGLOG_FNAME, RINGLOG_ILEN) == 0); store_entry(RINGLOG_INIT, 0, 0); /* mark start of logging */ } if (++(rl_last(log)) >= log_length) /* select next entry to fill */ rl_last(log) = 0; /* wrap if needed */ if (rl_first(log) == rl_last(log)) { /* advance start pointer if collision */ if (++(rl_first(log)) >= log_length) /* wrap if necessary */ rl_first(log) = 0; } else if (rl_first(log) == (u_int16_t)-1) /* no entries yet; enter one */ rl_first(log) = 0; rl_type(log, rl_last(log)) = type; /* record the entry */ rl_func(log, rl_last(log)) = this_fn; rl_call(log, rl_last(log)) = call_site; } /* called upon function entry */ void __cyg_profile_func_enter(void *this_fn, void *call_site) { store_entry(RINGLOG_ENTER, this_fn, call_site); } /* called upon function exit */ void __cyg_profile_func_exit(void *this_fn, void *call_site) { store_entry(RINGLOG_EXIT, this_fn, call_site); } #else /* !defined(RINGLOG_INSTRUMENT) */ /* converts a type to a printable string */ static char * get_type(u_int32_t type) { switch (type) { case RINGLOG_INIT: return " Logging start"; break; case RINGLOG_ENTER: return "Function entry"; break; case RINGLOG_EXIT: return " Function exit"; break; } return " Invalid entry"; } /* Print out entries from a starting point to an end point */ static void extract(int *count, u_int16_t start, u_int16_t end) { for (; start <= end; start++) printf("% 4d %s: addr %p call %p\n", (*count)++, get_type(rl_type(log, start)), rl_func(log, start), rl_call(log, start)); } int main(int argc, char **argv) { char *arg; int i, err, size = 0; while ((arg = *++argv)) { if (arg[0] == '-') { /* - turns into log file size */ size = atoi(arg + 1); continue; } log = 0; /* initialize our data */ log_size = 0; log_length = 0; switch ((err = init_log(arg, size))) { /* initialize the log */ case -1: /* file is in an invalid format */ printf("File %s not a valid ringlog file\n", arg); continue; break; case 0: /* file has opened and is ready to be read */ break; default: /* some error occurred */ printf("Error %d opening file %s: %s\n", err, arg, strerror(err)); continue; break; } if (rl_first(log) == (u_int16_t)-1) /* it's an empty file */ printf("File %s is empty\n", arg); else { /* print out file contents */ printf("File %s contents:\n", arg); i = 0; /* initialize counter */ if (rl_last(log) <= rl_first(log)) { /* print out log file */ extract(&i, rl_first(log), log_length - 1); /* end of buffer... */ extract(&i, 0, rl_last(log)); /* then beginning of buffer */ } else extract(&i, rl_first(log), rl_last(log)); } munmap(log, log_size); /* unmap the file */ } return 0; } #endif /* !RINGLOG_INSTRUMENT */ ircd-ircu-2.10.12.10.dfsg1/tools/untabify0000644000175000017500000000026207441767511017550 0ustar madkissmadkiss#!/usr/bin/perl # # untabify - convert tabs to spaces # # $Id: untabify,v 1.2 2002/03/07 22:52:57 ghostwolf Exp $ use Text::Tabs; $tabstop = 8; while (<>) { print expand($_) } ircd-ircu-2.10.12.10.dfsg1/tools/hashtoy0000644000175000017500000000506407441767511017413 0ustar madkissmadkiss#!/usr/bin/perl # # hashtoy: a little script to read an ircu burst IP dump and try # different hash formulae # usage: hashtoy '' # use x for the key and n for the table size # example: hashtoy undernet-burst.txt 8192 '((x >> 14) + (x >> 7) + x) & 8191' # notes: the input file is expected to contain one encoded IP address per # line. see base64toint() and inttobase64() in ircd/s_user.c for # details of the encoding. # # --Liandrin # # $Id: hashtoy,v 1.2 2002/03/07 22:52:57 ghostwolf Exp $ @convert2n = ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 62, 0, 63, 0, 0, 0, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51 ); sub base64toint { my $i = 0; my $str = shift; my @strc = ($str =~ /(.)/g); $i = $convert2n[ord($strc[5])]; $i += $convert2n[ord($strc[4])] << 6; $i += $convert2n[ord($strc[3])] << 12; $i += $convert2n[ord($strc[2])] << 18; $i += $convert2n[ord($strc[1])] << 24; $i += $convert2n[ord($strc[0])] << 30; } sub ntohl { my $i = shift; my $j; return (($i & 0xFF000000) >> 24) | (($i & 0x00FF0000) >> 8) | (($i & 0x0000FF00) << 8) | (($i & 0x000000FF) << 24); } ($file, $tablesize, $expression) = @ARGV; while ($#ARGV > -1) { shift @ARGV; } if (!defined($file) || !defined($tablesize) || !defined($expression)) { print STDERR "usage: $0 filename tablesize expression\n"; print STDERR "sample expression: x % n\n"; exit 1; } $expression =~ s/\bx\b/\$ip/gi; $expression =~ s/\bn\b/\$tablesize/gi; $expression =~ s/^(.*)$/sub dohash { return ($1); }/; $minkey = 2**32; $maxkey = 0; eval $expression; open IPS, $file || die "Can't open $file at"; while () { chomp; $ip = base64toint($_); $key = dohash($ip); $minkey = $key if ($key < $minkey); $maxkey = $key if ($key > $maxkey); $testing{$key}++; } $max = 0; $min = $tablesize + 1; $nEntries = 0; $total = 0; for (values %testing) { $max = $_ if ($_ > $max); $min = $_ if ($_ < $min); $nEntries++; $total += $_; } print "Table size: $tablesize\n"; printf "Min/average/max chain length: $min/%.2f/$max\n", ($total / $nEntries); print "Minimum key: $minkey\n"; print "Maximum key: $maxkey\n"; ircd-ircu-2.10.12.10.dfsg1/tools/ringlog.pl0000755000175000017500000001176510071002704017772 0ustar madkissmadkiss#! /usr/bin/perl -w # # Copyright (C) 2002 by Kevin L. Mitchell # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # @(#)$Id: ringlog.pl,v 1.4 2004/07/01 12:38:28 entrope Exp $ # # This program is intended to be used in conjunction with ringlog and # the binutils program addr2line. The -r option specifies the path to # the ringlog program; the -a option specifies the path to addr2line. # (Both of these default to assuming that the programs are in your # PATH.) All other options are passed to addr2line, and any other # arguments are treated as filenames to pass to ringlog. If no # filenames are given, the program operates in filter mode, expecting # to get output from ringlog on its standard input. In this case, # ringlog will not be directly executed, but addr2line still will. use strict; use Socket; use IO::Handle; sub start_addr2line { my ($location, @args) = @_; unshift(@args, '-f'); # always get functions # Get a socket pair socketpair(CHILD, PARENT, AF_UNIX, SOCK_STREAM, PF_UNSPEC) or die "socketpair: $!"; CHILD->autoflush(1); # Make sure autoflush is turned on PARENT->autoflush(1); my $pid; # Fork... die "cannot fork: $!" unless (defined($pid = fork)); if (!$pid) { # in child close(CHILD); open(STDIN, "<&PARENT"); open(STDOUT, ">&PARENT"); exec($location, @args); # exec! } # in parent close(PARENT); return \*CHILD; # Return a filehandle for it } sub xlate_addr { my ($fh, $addr) = @_; # Feed address into addr2line print $fh "$addr\n"; # Get function name, file name, and line number my $function = <$fh> || die "Couldn't get function name"; my $fileline = <$fh> || die "Couldn't get file name or line number"; # Remove newlines... chomp($function, $fileline); # If addr2line couldn't translate the address, just return it return "[$addr]" if ($function eq "??"); # return function(file:line)[address] return "$function($fileline)[$addr]"; } sub start_ringlog { my ($location, @args) = @_; # Build a pipe and fork, through the magic of open() my $pid = open(RINGLOG, "-|"); # Make sure we forked! die "couldn't fork: $!" unless (defined($pid)); # Execute ringlog... exec($location, @args) unless ($pid); return \*RINGLOG; } sub parse_ringlog { my ($ringlog, $addr) = @_; my $state = "reading"; while (<$ringlog>) { chomp; # Beginning of parsable data if (/^File.*contents:$/) { $state = "parsing"; # Here's actual parsable data, so parse it } elsif ($state eq "parsing" && /^\s*\d+/) { s/(0x[a-fA-F0-9]+)/&xlate_addr($addr, $1)/eg; # Switch out of parsing mode } else { $state = "reading"; } # Print the final result print "$_\n"; } } # get an argument for an option that requires one sub getarg (\$) { my ($iref) = @_; $ARGV[$$iref] =~ /^(-.)(.*)/; die "Argument for $1 missing" unless ((defined($2) && $2 ne "") || @ARGV > $$iref + 1); return defined($2) && $2 ne "" ? $2 : $ARGV[++$$iref]; } my ($ringlog_exe, $addr2line_exe) = ("ringlog", "addr2line"); my (@addr2line_args, @files); # Deal with arguments; note that we have to deal with -b and -e for # addr2line. for (my $i = 0; $i < @ARGV; $i++) { if ($ARGV[$i] =~ /^-r/) { $ringlog_exe = getarg($i); } elsif ($ARGV[$i] =~ /^-a/) { $addr2line_exe = getarg($i); } elsif ($ARGV[$i] =~ /^-([be])/) { push(@addr2line_args, "-$1", getarg($i)); } elsif ($ARGV[$i] =~ /^-/) { push(@addr2line_args, $ARGV[$i]); } else { push(@files, [ $ARGV[$i], @addr2line_args ]); @addr2line_args = (); } } # Verify that that left us with executable names, at least die "No ringlog executable" unless (defined($ringlog_exe) && $ringlog_exe ne ""); die "No addr2line executable" unless (defined($addr2line_exe) && $addr2line_exe ne ""); # Ok, process each file we've been asked to process foreach my $file (@files) { my ($addr2line, $ringlog) = (start_addr2line($addr2line_exe, @{$file}[1..$#{$file}]), start_ringlog($ringlog_exe, $file->[0])); parse_ringlog($ringlog, $addr2line); close($addr2line); close($ringlog); } # Now if there are still more unprocessed arguments, expect ringlog # input on stdin... if (@addr2line_args) { my $addr2line = start_addr2line($addr2line_exe, @addr2line_args); parse_ringlog(\*STDIN, $addr2line); close($addr2line); } ircd-ircu-2.10.12.10.dfsg1/tools/autodoc.py0000644000175000017500000000440607064611036020007 0ustar madkissmadkiss# # Structure AutoDocumentator for ircu. # 26/02/2000 --Gte # # Creates a 'structs.html', containing HTML Table definitions # for all structures encountered in *.h in the current directory. # # $Id: autodoc.py,v 1.1 2000/03/18 05:20:30 bleep Exp $ import string, fnmatch, os def parse(filename): OutFile = open('structs.html', 'a') OutFile.write("

"+filename+"

") stage = 1 try: IncFile = open(filename, 'r') line = IncFile.readline() while line != "": line = string.replace(line,"\n","") # Stript out LF's. splitline = string.split(line, " ") try: if ((stage == 2) & (splitline[0] == "};")): OutFile.write("

"+"\n") stage = 1 if (stage == 2): # Begin reading member information. declr = string.split(string.strip(line), ";", 1) comment = string.replace(declr[1], "*", "") comment = string.replace(comment, "/", "") OutFile.write("\n") OutFile.write(""+string.strip(declr[0])+"\n") if (declr[1][-1] == "/"): OutFile.write(""+string.strip(comment)+"\n") else: # Loop until end of comment string. while (declr[-1] != "/"): line = IncFile.readline() line = string.replace(line,"\n","") # Stript out LF's. declr = string.strip(line) comment = comment + line comment = string.replace(comment, "*", "") comment = string.replace(comment, "/", "") OutFile.write(""+string.strip(comment)+"\n") OutFile.write("\n") if ((splitline[0] == "struct") & (splitline[2] == "{") & (stage == 1)): # We've found a "Standard" structure definition. OutFile.write("Structure table for: \""+splitline[1]+"\"

\n") OutFile.write("") # Now, carry on until we encounter a "};". stage = 2 except IndexError: pass line = IncFile.readline() IncFile.close OutFile.write("
") except IOError: print("** Error, File does not exist.") OutFile.close files = os.listdir(".") files.sort() for file in files: if (fnmatch.fnmatch(file, "*.h")): parse(file) ircd-ircu-2.10.12.10.dfsg1/tools/wrapper.c0000644000175000017500000001220110051427041017602 0ustar madkissmadkiss/* ** Copyright (C) 2000 by Kevin L. Mitchell ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 2 of the License, or ** (at your option) any later version. ** ** This program is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** GNU General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with this program; if not, write to the Free Software ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ** ** @(#)$Id: wrapper.c,v 1.3 2004/05/15 14:50:09 entrope Exp $ */ #include #include #include #include #include #include #include #include #include /* * Try and find the correct name to use with getrlimit() for setting the max. * number of files allowed to be open by this process. * * Shamelessly stolen from ircu... */ #ifdef RLIMIT_FDMAX #define RLIMIT_FD_MAX RLIMIT_FDMAX #else #ifdef RLIMIT_NOFILE #define RLIMIT_FD_MAX RLIMIT_NOFILE #else #ifdef RLIMIT_OPEN_MAX #define RLIMIT_FD_MAX RLIMIT_OPEN_MAX #else #error Unable to find a valid RLIMIT_FD_MAX #endif #endif #endif /*fix for change uid/gid with chroot #ubra 08/02/03*/ int uid, gid; /* * Set the hard and soft limits for maximum file descriptors. */ int set_fdlimit(unsigned int max_descriptors) { struct rlimit limit; limit.rlim_max = limit.rlim_cur = max_descriptors; return setrlimit(RLIMIT_FD_MAX, &limit); } /* * Change directories to the indicated root directory, then make it the * root directory. */ int change_root(char *root) { if (chdir(root)) return -1; if (chroot(root)) return -1; return 0; } /* * Change the user and group ids--including supplementary groups!--as * appropriate. * * fix for change uid/gid with chroot #ubra 08/02/03 * old change_user() got splited into get_user() and set_user() */ int get_user(char *user, char *group) { struct passwd *pwd; struct group *grp; char *tmp; /* Track down a struct passwd describing the desired user */ uid = strtol(user, &tmp, 10); /* was the user given as a number? */ if (*tmp) { /* strtol() failed to parse; look up as a user name */ if (!(pwd = getpwnam(user))) return -1; } else if (!(pwd = getpwuid(uid))) /* look up uid */ return -1; uid = pwd->pw_uid; /* uid to change to */ gid = pwd->pw_gid; /* default gid for user */ if (group) { /* a group was specified; track down struct group */ gid = strtol(group, &tmp, 10); /* was the group given as a number? */ if (*tmp) { /* strtol() failed to parse; look up as a group name */ if (!(grp = getgrnam(group))) return -1; } else if (!(grp = getgrgid(gid))) /* look up gid */ return -1; gid = grp->gr_gid; /* set the gid */ } if (initgroups(pwd->pw_name, gid)) /* initialize supplementary groups */ return -1; return 0; /* success! */ } int set_user(void) { if (setgid(gid)) /* change our current group */ return -1; if (setuid(uid)) /* change our current user */ return -1; return 0; /* success! */ } /* * Explain how to use this program. */ void usage(char *prog, int retval) { fprintf(stderr, "Usage: %s [-u ] [-g ] [-l ] [-c ]" " -- \\\n\t\t []\n", prog); fprintf(stderr, " %s -h\n", prog); exit(retval); } int main(int argc, char **argv) { int c, limit = -1; char *prog, *user = 0, *group = 0, *root = 0; /* determine program name for error reporting */ if ((prog = strrchr(argv[0], '/'))) prog++; else prog = argv[0]; /* process command line arguments */ while ((c = getopt(argc, argv, "hu:g:l:c:")) > 0) switch (c) { case 'h': /* requested help */ usage(prog, 0); break; case 'u': /* suggested a user */ user = optarg; break; case 'g': /* suggested a group */ group = optarg; break; case 'l': /* file descriptor limit */ limit = strtol(optarg, 0, 10); break; case 'c': /* select a root directory */ root = optarg; break; default: /* unknown command line argument */ usage(prog, 1); break; } /* Not enough arguments; we must have a command to execute! */ if (optind >= argc) usage(prog, 1); if (limit > 0) /* set the requested fd limit */ if (set_fdlimit(limit) < 0) { perror(prog); return 1; } if(user) /* get the selected user account uid/gid*/ if (get_user(user, group)) { perror(prog); return 1; } if (root) /* change root directories */ if (change_root(root)) { perror(prog); return 1; } if (user) /* change to selected user account */ if (set_user()) { perror(prog); return 1; } /* execute the requested command */ execvp(argv[optind], argv + optind); /* If we got here, execvp() failed; report the error */ perror(prog); return 1; } ircd-ircu-2.10.12.10.dfsg1/tools/linesync/0000755000175000017500000000000010561247166017624 5ustar madkissmadkissircd-ircu-2.10.12.10.dfsg1/tools/linesync/linesync.sh0000755000175000017500000002051210230513005021764 0ustar madkissmadkiss#!/bin/sh # linesync.sh, Copyright (c) 2002 Arjen Wolfs # 20020604, sengaia@undernet.org # 20050417, daniel@undernet.org - modified for u2.10.12 # $Id: linesync.sh,v 1.5 2005/04/17 16:59:49 entrope Exp $ # # The code contained is in this file is licenced under the terms # and conditions as specified in the GNU General Public License. # # linesync.sh - centralized ircd.conf updates. # The purpose of this little shell script is to allow a section of an ircd.conf to be # updated from a central location. Hence it is intended to facilitate the automated # distribution of Kill, Jupe, Quarantine and Uworld lines; or any other .conf lines you # may wish to keep synchronized accross all servers on a network. # # This script will download a file called linesync from a specified web server (see # below for configuration), and calculate an md5sum from it. It will then download # a file called linesync.sum from a configurable number of other web servers and # compare the contents of these files against the checksum calculated. If any of the # downloaded checksums mismatch, the program will abort. This provides security to # the centralized update mechanism - in order for it to be compromised, multiple # web servers would have to compromised. # # If all checksums match, the script inspects the .conf lines contained within the # downloaded file. If any .conf lines are found that are not specifically allowed, # the program will abort. This will prevent malicious/dangerous .conf lines (such as # Operator or Connect lines) from being inserted into ircd.conf. # # If all the checks mentioned above are passed, the script checks ircd.conf for a section # that begins with "# BEGIN LINESYNC", and ends with "# END LINESYNC". The section contained # between these two comments is the section maintained by this program. If these lines are not # found in the ircd.conf, they will be appended to it. # Next, the script will build a new ircd.conf by removing all lines present between the two # commented lines mentioned above, and replace them with the contents of the file downloaded. # # Once this has been completed, ircd.conf is backed up and replaced with the newly built version, # and ircd will be rehashed. # # Configuration: This script requires two parameters - the full path to your ircd.conf, and the # full path to your ircd.pid. It will look for a configuration file called linesync.conf in the # same directory as ircd.conf. See the included sample linesync.conf for information on how to # set it up. Obviously, you will need to have web server(s) to use for the distribution of your # .conf update and checksums. This script requires the presence of wget and md5sum, and various # other programs that should be present by default on any Unix system. # # This program should be run from crontab, i.e something like: # 0 0 * * * /home/irc/bin/linesync.sh /home/irc/lib/ircd.conf /home/irc/lib/ircd.pid # # This program has been tested on and works on FreeBSD, Solaris, and Linux. # md5sum is included in GNU textutils. # # Good Luck! # Arjen Wolfs (sengaia@undernet.org), June 9 2002. # # This checks for the presence of an executable file in $PATH locate_program() { if [ ! -x "`which $1 2>&1`" ]; then echo "You don't seem to have $1. Sorry." exit 1 fi } # This checks for the presence of any file check_file() { if [ ! -f "$1" ]; then echo "There doesn't appear to be a $1. Sorry." exit 1 fi } # Try to find programs we will need locate_program wget && locate_program egrep && locate_program diff # try to find GNU awk awk_cmd=`which gawk` if [ $? -ne 0 ]; then awk_cmd="" fi # try to find an appropriate md5 program # BSD md5 capability courtesy of spale md5_cmd=`which md5sum` if [ -z "$md5_cmd" ]; then md5_cmd=`which md5` if [ -z "$md5_cmd" ]; then echo "No MD5 capable programs found (I looked for md5sum and md5)." exit else md5_cmd="$md5_cmd -q" fi fi if [ -z "$awk_cmd" ]; then locate_program awk is_gawk=`echo | awk --version | head -1 | egrep '^GNU.+$'` if [ -z "$is_gawk" ]; then echo "Your version of awk is not GNU awk. Sorry." exit 1 fi awk_cmd="awk" fi # Check for required command line parameters if [ -z "$1" -o -z "$2" ]; then echo "Usage: $0 " echo " Full path to ircd.conf (/home/irc/lib/ircd.conf)" echo " Full path to ircd.pid (/home/irc/lib/ircd.pid)" exit 1 fi # check and set up stuff diff_cmd="diff" cpath=$1 ppath=$2 check_file $cpath dpath=`dirname $cpath` lpath="$dpath/linesync.conf" check_file $lpath save_dir=$PWD; cd $dpath tpath=$PWD; cd $save_dir tmp_path="$dpath/tmp" mkdir $tmp_path > /dev/null 2>&1 # load and check configuration . $lpath if [ -z "$LINE_SERVER" -o -z "$LINE_CHECK" -o -z "$ALLOWED_LINES" ]; then echo "Please setup $lpath correctly." exit 1 fi # Not all versions of date support %s, work around it TS=`date +%Y%m%d%H%M%S` TMPFILE="$tmp_path/linesync.$TS" LSFILE="$LINE_SERVER""linesync" # Attempt to download our .conf update wget --cache=off --quiet --output-document=$TMPFILE $LSFILE > /dev/null 2>&1 if [ ! -s "$TMPFILE" ]; then echo "Unable to retrieve $LSFILE. Sorry." rm $TMPFILE > /dev/null 2>&1 exit 1 fi # Check whether the file contains any disallowed .conf lines bad_lines=`egrep '^[^'$ALLOWED_LINES'|#]+' $TMPFILE` if [ ! -z "$bad_lines" ]; then echo "The file downloaded in $TMPFILE contains the following disallowed line(s):" echo $bad_lines exit 1 fi # Check whether somebody tried to sneak a second block onto some line bad_lines=`egrep -i '}[ ]*;[ ]*[a-z]+[ ]*{' $TMPFILE` if [ ! -z "$bad_lines" ] ; then echo "The file downloaded in $TMPFILE contains the following multi-block line(s):" echo $bad_lines exit 1 fi # check our ircd.conf ircd_setup=`egrep '^# (BEGIN|END) LINESYNC$' $cpath|wc -l` if [ $ircd_setup != 2 ]; then cp $cpath $cpath.orig echo "Performing initial merge on $cpath, original file saved as $cpath.orig." echo "# Do NOT remove the following line, linesync.sh depends on it!" >> $cpath echo "# BEGIN LINESYNC" >> $cpath echo "# END LINESYNC" >> $cpath echo "# Do not remove the previous line, linesync.sh depends on it!" >> $cpath # Do an initial merge to remove duplicates inpath="$tmp_path/linesync.tmp.$TS" $awk_cmd ' { if (!loaded_template) { command="cat " tempfile; tlines=0; while ((command | getline avar) > 0) { template[tlines]=avar; tlines++ } close(command) loaded_template++ } dup_line=0 for (i=0; i $inpath else inpath=$cpath fi # Get the checksum CKSUM=`$md5_cmd $TMPFILE|cut -d' ' -f1` check_file="$tmp_path/linesync.sum.$TS" for ck_server in $LINE_CHECK; do sumfile="$ck_server""linesync.sum" wget --cache=off --quiet --output-document=$check_file $sumfile > /dev/null 2>&1 if [ ! -s "$check_file" ]; then echo "Unable to retrieve checksum from $sumfile" exit 1 fi if [ "$CKSUM" != "`cat $check_file`" ]; then echo "Checksum retrieved from $sumfile does not match!" exit 1 fi rm -f $check_file done # It all checks out, proceed... # Replace the marked block in ircd.conf with the new version $awk_cmd ' $0=="# BEGIN LINESYNC" { chop++; print; next } $0=="# END LINESYNC" { command="cat " syncfile while ((command | getline avar) > 0) { print avar } close(command) chop-- } { if (!chop) print $0 } ' syncfile=$TMPFILE < $inpath > $tmp_path/linesync.new.$TS # run a diff between current and new confs to see if we updated anything # no point sending the ircd a -HUP if this is not needed, especially on a # busy network, such as Undernet. diff=`$diff_cmd $cpath $tmp_path/linesync.new.$TS` if [ ! -z "$diff" ]; then # Changes were detected # Back up the current ircd.conf and replace it with the new one cp $cpath $dpath/ircd.conf.bk cp $tmp_path/linesync.new.$TS $cpath # Rehash ircd (without caring wether or not it succeeds) kill -HUP `cat $ppath 2>/dev/null` > /dev/null 2>&1 fi # (Try to) clean up rm -rf $tmp_path > /dev/null 2>&1 # That's it... ircd-ircu-2.10.12.10.dfsg1/tools/linesync/linesync.conf0000644000175000017500000000121210230356007022277 0ustar madkissmadkiss # Configuration for linesync.sh # # - This file must be placed in the same directory as ircd.conf # - Note that all URL's *MUST* have a trailing / # - Since we are using wget, you could use ftp:// URL's as well if you want to # Where do we get our ircd.conf update? LINE_SERVER="http://some.domain/" # Check servers, as many as you like, seperated by spaces LINE_CHECK="http://host1.other.domain/lsync/ http://host-19.domain-x.net/ http://www.domain.what" # What .conf lines are allowed in the downloaded updates? # Pipe seperated - for Undernet use "Uworld|Jupe|Quarantine|Kill" (kKQU in .11 terms) ALLOWED_LINES="Uworld|Jupe|Quarantine|Kill" ircd-ircu-2.10.12.10.dfsg1/tests/0000755000175000017500000000000010573150616015776 5ustar madkissmadkissircd-ircu-2.10.12.10.dfsg1/tests/ircd-3.conf0000644000175000017500000000166010573146164017734 0ustar madkissmadkissGeneral { name = "irc-3.example.net"; vhost = "127.0.0.1"; description = "Test IRC server"; numeric = 3; }; Admin { Location = "Right Here, Right Now"; Location = "Testbench IRC server"; Contact = "root@localhost"; }; Class { name = "Server"; pingfreq = 90 seconds; connectfreq = 5 minutes; sendq = 9 megabytes; maxlinks = 10; }; Connect { name = "irc.example.net"; host = "127.0.0.1"; port = 7600; password = "password"; class = "Server"; hub; autoconnect = yes; }; Class { name = "Local"; pingfreq = 1 minutes 30 seconds; sendq = 160000; maxlinks = 100; }; Client { ip = "127.*"; class = "Local"; }; Operator { local = no; class = "Local"; host = "*@127.*"; password = "$PLAIN$oper"; name = "oper"; }; Port { server = yes; port = 7620; }; Port { port = 7621; }; Features { "PPATH" = "ircd-3.pid"; }; ircd-ircu-2.10.12.10.dfsg1/tests/ircd-2.conf0000644000175000017500000000166010573146027017731 0ustar madkissmadkissGeneral { name = "irc-2.example.net"; vhost = "127.0.0.1"; description = "Test IRC server"; numeric = 2; }; Admin { Location = "Right Here, Right Now"; Location = "Testbench IRC server"; Contact = "root@localhost"; }; Class { name = "Server"; pingfreq = 90 seconds; connectfreq = 5 minutes; sendq = 9 megabytes; maxlinks = 10; }; Connect { name = "irc.example.net"; host = "127.0.0.1"; port = 7600; password = "password"; class = "Server"; hub; autoconnect = yes; }; Class { name = "Local"; pingfreq = 1 minutes 30 seconds; sendq = 160000; maxlinks = 100; }; Client { ip = "127.*"; class = "Local"; }; Operator { local = no; class = "Local"; host = "*@127.*"; password = "$PLAIN$oper"; name = "oper"; }; Port { server = yes; port = 7610; }; Port { port = 7611; }; Features { "PPATH" = "ircd-2.pid"; }; ircd-ircu-2.10.12.10.dfsg1/tests/bug-1640796.cmd0000644000175000017500000000210210555270647020100 0ustar madkissmadkissdefine srv1 localhost:7601 define srv1-name irc.example.net define hidden-srv *.undernet.org define channel #random-channel define cl1-nick Ch4n0pm4n define cl2-nick D00dm4n # Connect two clients. Join one to the test channel. connect cl1 %cl1-nick% op3rm4n %srv1% :Some Chanop connect cl2 %cl2-nick% d00dm4n %srv1% :Someone Else :cl1 join %channel% :cl1 mode %channel% +D :cl1 expect %cl1-nick% mode %channel% \\+D # Now join the other client, and let the chanop remove -D. Both # should see the channel become +d. :cl2 wait cl1 :cl2 join %channel% :cl1 wait cl2 :cl1 mode %channel% -D :cl1 expect %cl1-nick% mode %channel% -D\\+d :cl2 expect %cl1-nick% mode %channel% -D\\+d # Bug 1640796 is that if the chanop sends +D-D, the channel is # improperly marked -d. (An empty mode change is also sent to other # servers.) :cl1 mode %channel% +D-D :cl1 mode %channel% :cl1 expect %srv1-name% 324 %cl1-nick% %channel% \\+.*d # Make sure that client 1 does see the -d when client 2 quits :cl2 wait cl1 :cl2 part %channel% leaving :cl1 expect %hidden-srv% mode %channel% -d :cl1 quit done ircd-ircu-2.10.12.10.dfsg1/tests/test-driver.pl0000755000175000017500000004671310573150616020621 0ustar madkissmadkiss#! /usr/bin/perl -wT # If you edit this file, please check carefully that the garbage # collection isn't broken. POE is sometimes too clever for our good # in finding references to sessions, and keeps running even after we # want to stop. require 5.006; use warnings; use strict; use vars; use constant DELAY => 2; use constant EXPECT_TIMEOUT => 15; use constant RECONNECT_TIMEOUT => 5; use constant THROTTLED_TIMEOUT => 90; use FileHandle; # sub POE::Kernel::ASSERT_DEFAULT () { 1 } # sub POE::Kernel::TRACE_DEFAULT () { 1 } use POE v0.35; use POE::Component::IRC v5.00; # this defines commands that take "zero time" to execute # (specifically, those which do not send commands from the issuing # client to the server) our $zero_time = { expect => 1, sleep => 1, wait => 1, }; # Create the main session and start POE. # All the empty anonymous subs are just to make POE:Session::ASSERT_STATES happy. POE::Session->create(inline_states => { # POE kernel interaction _start => \&drv_start, _child => sub {}, _stop => sub { my $heap = $_[HEAP]; print "\nThat's all, folks!"; print "(exiting at line $heap->{lineno}: $heap->{line})" if $heap->{line}; print "\n"; }, _default => \&drv_default, # generic utilities or miscellaneous functions heartbeat => \&drv_heartbeat, timeout_expect => \&drv_timeout_expect, reconnect => \&drv_reconnect, enable_client => sub { $_[ARG0]->{ready} = 1; }, disable_client => sub { $_[ARG0]->{ready} = 0; }, die => sub { $_[KERNEL]->signal($_[SESSION], 'TERM'); }, # client-based command issuers cmd_expect => \&cmd_expect, cmd_join => \&cmd_generic, cmd_mode => \&cmd_generic, cmd_nick => \&cmd_generic, cmd_notice => \&cmd_message, cmd_oper => \&cmd_generic, cmd_part => \&cmd_generic, cmd_privmsg => \&cmd_message, cmd_quit => \&cmd_generic, cmd_raw => \&cmd_raw, cmd_sleep => \&cmd_sleep, cmd_wait => \&cmd_wait, # handlers for messages from IRC irc_001 => \&irc_connected, # Welcome to ... irc_snotice => sub {}, # notice from a server (anonymous/our uplink) irc_notice => \&irc_notice, # NOTICE to self or channel irc_msg => \&irc_msg, # PRIVMSG to self irc_public => \&irc_public, # PRIVMSG to channel irc_connected => sub {}, irc_ctcp_action => sub {}, irc_ctcp_ping => sub {}, irc_ctcp_time => sub {}, irc_ctcpreply_ping => sub {}, irc_ctcpreply_time => sub {}, irc_invite => sub {}, irc_isupport => sub {}, irc_join => sub {}, irc_kick => sub {}, irc_kill => sub {}, irc_mode => \&irc_mode, # MODE change on client or channel irc_nick => sub {}, irc_part => sub {}, irc_ping => sub {}, irc_quit => sub {}, irc_registered => sub {}, irc_topic => sub {}, irc_plugin_add => sub {}, irc_error => \&irc_error, irc_disconnected => \&irc_disconnected, irc_socketerr => \&irc_socketerr, }, args => [@ARGV]); $| = 1; $poe_kernel->run(); exit; # Core/bookkeeping test driver functions sub drv_start { my ($kernel, $session, $heap) = @_[KERNEL, SESSION, HEAP]; # initialize heap $heap->{clients} = {}; # session details, indexed by (short) session name $heap->{sessions} = {}; # session details, indexed by session ref $heap->{servers} = {}; # server addresses, indexed by short names $heap->{macros} = {}; # macros # Parse arguments foreach my $arg (@_[ARG0..$#_]) { if ($arg =~ /^-D$/) { $heap->{irc_debug} = 1; } elsif ($arg =~ /^-V$/) { $heap->{verbose} = 1; } elsif ($arg =~ /^-H(.+)$/) { $heap->{local_address} = $1; } else { die "Extra command-line argument $arg\n" if $heap->{script}; $heap->{script} = new FileHandle($arg, 'r') or die "Unable to open $arg for reading: $!\n"; } } die "No test name specified\n" unless $heap->{script}; # hook in to POE $kernel->alias_set('control'); $kernel->yield('heartbeat'); } sub drv_heartbeat { my ($kernel, $sender, $heap) = @_[KERNEL, SENDER, HEAP]; my $script = $heap->{script}; my $used = {}; my $delay = DELAY; while (1) { my ($line, $lineno); if ($heap->{line}) { $line = delete $heap->{line}; } elsif (defined($line = <$script>)) { $heap->{lineno} = $.; print "." unless $heap->{irc_debug}; } else { # close all connections foreach my $client (values %{$heap->{clients}}) { $kernel->call($client->{irc}, 'quit', "I fell off the end of my script"); $client->{quitting} = 1; } # unalias the control session $kernel->alias_remove('control'); # die in a few seconds $kernel->delay_set('die', 5); return; } chomp $line; # ignore comments and blank lines next if $line =~ /^\#/ or $line !~ /\S/; # expand any macros in the line $line =~ s/(?<=[^\\])%(\S+?)%/$heap->{macros}->{$1} or die "Use of undefined macro $1 at $heap->{lineno}\n"/eg; # remove any \-escapes $line =~ s/\\(.)/$1/g; # figure out the type of line if ($line =~ /^define (\S+) (.+)$/i) { # define a new macro $heap->{macros}->{$1} = $2; } elsif ($line =~ /^undef (\S+)$/i) { # remove the macro delete $heap->{macros}->{$1}; } elsif ($line =~ /^connect (\S+) (\S+) (\S+) (\S+) :(.+)$/i) { # connect a new session (named $1) to server $4 my ($name, $nick, $ident, $server, $userinfo, $port) = ($1, $2, $3, $4, $5, 6667); $server = $heap->{servers}->{$server} || $server; if ($server =~ /(.+):(\d+)/) { $server = $1; $port = $2; } die "Client with nick $nick already exists (line $heap->{lineno})" if $heap->{clients}->{$nick}; my $alias = "client_$name"; my $client = { name => $name, nick => $nick, ready => 0, expect => [], expect_alarms => [], params => { Nick => $nick, Server => $server, Port => $port, Username => $ident, Ircname => $userinfo, Debug => $heap->{irc_debug}, } }; $client->{params}->{LocalAddr} = $heap->{local_address} if $heap->{local_address}; my $irc = POE::Component::IRC->spawn ( alias => $alias, nick => $nick, ) or die "Unable to create new user $nick (line $heap->{lineno}): $!"; $client->{irc} = $irc->session_id(); $heap->{clients}->{$client->{name}} = $client; $heap->{sessions}->{$irc} = $client; $kernel->call($client->{irc}, 'register', 'all'); $kernel->call($client->{irc}, 'connect', $client->{params}); $used->{$name} = 1; } elsif ($line =~ /^sync (.+)$/i) { # do multi-way synchronization between every session named in $1 my @synced = split(/,|\s/, $1); # first, check that they exist and are ready foreach my $clnt (@synced) { die "Unknown session name $clnt (line $heap->{lineno})" unless $heap->{clients}->{$clnt}; goto REDO unless $heap->{clients}->{$clnt}->{ready}; } # next we actually send the synchronization signals foreach my $clnt (@synced) { my $client = $heap->{clients}->{$clnt}; $client->{sync_wait} = [map { $_ eq $clnt ? () : $heap->{clients}->{$_}->{nick} } @synced]; $kernel->call($client->{irc}, 'notice', $client->{sync_wait}, 'SYNC'); $kernel->call($sender, 'disable_client', $client); } } elsif ($line =~ /^:(\S+) (\S+)(.*)$/i) { # generic command handler my ($names, $cmd, $args) = ($1, lc($2), $3); my (@avail, @unavail); # figure out whether each listed client is available or not foreach my $c (split ',', $names) { my $client = $heap->{clients}->{$c}; if (not $client) { print "ERROR: Unknown session name $c (line $heap->{lineno}; ignoring)\n"; } elsif (($used->{$c} and not $zero_time->{$cmd}) or not $client->{ready}) { push @unavail, $c; } else { push @avail, $c; } } # redo command with unavailable clients if (@unavail) { # This will break if the command can cause a redo for # available clients.. this should be fixed sometime $line = ':'.join(',', @unavail).' '.$cmd.$args; $heap->{redo} = 1; } # do command with available clients if (@avail) { # split up the argument part of the line $args =~ /^((?:(?: [^:])|[^ ])+)?(?: :(.+))?$/; $args = [($1 ? split(' ', $1) : ()), ($2 ? $2 : ())]; # find the client and figure out if we need to wait foreach my $c (@avail) { my $client = $heap->{clients}->{$c}; die "Client $c used twice as source (line $heap->{lineno})" if $used->{c} and not $zero_time->{$cmd}; $kernel->call($sender, 'cmd_' . $cmd, $client, $args); $used->{$c} = 1 unless $zero_time->{$cmd}; } } } else { die "Unrecognized input line $heap->{lineno}: $line"; } if ($heap->{redo}) { REDO: delete $heap->{redo}; $heap->{line} = $line; last; } } # issue new heartbeat with appropriate delay $kernel->delay_set('heartbeat', $delay); } sub drv_timeout_expect { my ($kernel, $session, $client) = @_[KERNEL, SESSION, ARG0]; print "ERROR: Dropping timed-out expectation by $client->{name}: ".join(',', @{$client->{expect}->[0]})."\n"; $client->{expect_alarms}->[0] = undef; unexpect($kernel, $session, $client); } sub drv_reconnect { my ($kernel, $session, $client) = @_[KERNEL, SESSION, ARG0]; $kernel->call($client->{irc}, 'connect', $client->{params}); } sub drv_default { my ($kernel, $heap, $sender, $session, $state, $args) = @_[KERNEL, HEAP, SENDER, SESSION, ARG0, ARG1]; if ($state =~ /^irc_(\d\d\d)$/) { my $client = $heap->{sessions}->{$sender->get_heap()}; if (@{$client->{expect}} and $args->[0] eq $client->{expect}->[0]->[0] and $client->{expect}->[0]->[1] eq "$1") { my $expect = $client->{expect}->[0]; my $mismatch; $args = $args->[2]; # ->[1] is the entire string, ->[2] is split for (my $x=2; ($x<=$#$expect) and ($x<=$#$args) and not $mismatch; $x++) { if ($args->[$x] !~ /$expect->[$x]/i) { $mismatch = 1; print "Mismatch in arg $x: $args->[$x] !~ $expect->[$x]\n"; } # $mismatch = 1 unless $args->[$x] =~ /$expect->[$x]/i; } unexpect($kernel, $session, $client) unless $mismatch; } return undef; } print "ERROR: Unexpected event $state to test driver (from ".$sender->ID.")\n"; return undef; } # client-based command issuers sub cmd_message { my ($kernel, $heap, $event, $client, $args) = @_[KERNEL, HEAP, STATE, ARG0, ARG1]; die "Missing arguments" unless $#$args >= 1; # translate each target as appropriate (e.g. *sessionname) my @targets = split(/,/, $args->[0]); foreach my $target (@targets) { if ($target =~ /^\*(.+)$/) { my $other = $heap->{clients}->{$1} or die "Unknown session name $1 (line $heap->{lineno})\n"; $target = $other->{nick}; } } $kernel->call($client->{irc}, substr($event, 4), \@targets, $args->[1]); } sub cmd_generic { my ($kernel, $event, $client, $args) = @_[KERNEL, STATE, ARG0, ARG1]; $kernel->call($client->{irc}, substr($event, 4), @$args); } sub cmd_raw { my ($kernel, $heap, $client, $args) = @_[KERNEL, HEAP, ARG0, ARG1]; die "Missing argument" unless $#$args >= 0; $kernel->call($client->{irc}, 'sl', $args->[0]); } sub cmd_sleep { my ($kernel, $session, $heap, $client, $args) = @_[KERNEL, SESSION, HEAP, ARG0, ARG1]; die "Missing argument" unless $#$args >= 0; $kernel->call($session, 'disable_client', $client); $kernel->delay_set('enable_client', $args->[0], $client); } sub cmd_wait { my ($kernel, $session, $heap, $client, $args) = @_[KERNEL, SESSION, HEAP, ARG0, ARG1]; die "Missing argument" unless $#$args >= 0; # if argument was comma-delimited, split it up (space-delimited is split by generic parser) $args = [split(/,/, $args->[0])] if $args->[0] =~ /,/; # make sure we only wait if all the other clients are ready foreach my $other (@$args) { if (not $heap->{clients}->{$other}->{ready}) { $heap->{redo} = 1; return; } } # disable this client, make the others send SYNC to it $kernel->call($session, 'disable_client', $client); $client->{sync_wait} = [map { $heap->{clients}->{$_}->{nick} } @$args]; foreach my $other (@$args) { die "Cannot wait on self" if $other eq $client->{name}; $kernel->call($heap->{clients}->{$other}->{irc}, 'notice', $client->{nick}, 'SYNC'); } } sub cmd_expect { my ($kernel, $session, $heap, $client, $args) = @_[KERNEL, SESSION, HEAP, ARG0, ARG1]; die "Missing argument" unless $#$args >= 0; push @{$client->{expect}}, $args; push @{$client->{expect_alarms}}, $kernel->delay_set('timeout_expect', EXPECT_TIMEOUT, $client); $kernel->call($session, 'disable_client', $client); } # handlers for messages from IRC sub unexpect { my ($kernel, $session, $client) = @_; shift @{$client->{expect}}; my $alarm_id = shift @{$client->{expect_alarms}}; $kernel->alarm_remove($alarm_id) if $alarm_id; $kernel->call($session, 'enable_client', $client) unless @{$client->{expect}}; } sub check_expect { my ($kernel, $session, $heap, $poe_sender, $sender, $text) = @_[KERNEL, SESSION, HEAP, SENDER, ARG0, ARG1]; my $client = $heap->{sessions}->{$poe_sender->get_heap()}; my $expected = $client->{expect}->[0]; # check sender if ($expected->[0] =~ /\*(.+)/) { # we expect *sessionname, so look up session's current nick my $exp = $1; $sender =~ /^(.+)!/; return 0 if lc($heap->{clients}->{$exp}->{nick}) ne lc($1); } elsif ($expected->[0] =~ /^:?(.+!.+)/) { # expect :nick!user@host, so compare whole thing return 0 if lc($1) ne lc($sender); } else { # we only expect :nick, so compare that part $sender =~ /^:?(.+)!/; return 0 if lc($expected->[0]) ne lc($1); } # compare text return 0 if lc($text) !~ /$expected->[2]/i; # drop expectation of event unexpect($kernel, $session, $client); } sub irc_connected { my ($kernel, $session, $heap, $sender) = @_[KERNEL, SESSION, HEAP, SENDER]; my $client = $heap->{sessions}->{$sender->get_heap()}; print "Client $client->{name} connected to server $_[ARG0]\n" if $heap->{verbose}; $kernel->call($session, 'enable_client', $client); } sub handle_irc_disconnect ($$$$$) { my ($kernel, $session, $heap, $sender, $client) = @_; if ($client->{quitting}) { $kernel->call($sender, 'unregister', 'all'); delete $heap->{sessions}->{$sender->get_heap()}; delete $heap->{clients}->{$client->{name}}; } else { if ($client->{disconnect_expected}) { delete $client->{disconnect_expected}; } else { print "Got unexpected disconnect for $client->{name} (nick $client->{nick})\n"; } $kernel->call($session, 'disable_client', $client); $kernel->delay_set('reconnect', $client->{throttled} ? THROTTLED_TIMEOUT : RECONNECT_TIMEOUT, $client); delete $client->{throttled}; } } sub irc_disconnected { my ($kernel, $session, $heap, $sender, $server) = @_[KERNEL, SESSION, HEAP, SENDER, ARG0]; my $client = $heap->{sessions}->{$sender->get_heap()}; print "Client $client->{name} disconnected from server $_[ARG0]\n" if $heap->{verbose}; handle_irc_disconnect($kernel, $session, $heap, $sender, $client); } sub irc_socketerr { my ($kernel, $session, $heap, $sender, $msg) = @_[KERNEL, SESSION, HEAP, SENDER, ARG0]; my $client = $heap->{sessions}->{$sender->get_heap()}; print "Client $client->{name} (re-)connect error: $_[ARG0]\n"; handle_irc_disconnect($kernel, $session, $heap, $sender, $client); } sub irc_notice { my ($kernel, $session, $heap, $sender, $from, $to, $text) = @_[KERNEL, SESSION, HEAP, SENDER, ARG0, ARG1, ARG2]; my $client = $heap->{sessions}->{$sender->get_heap()}; if ($client->{sync_wait} and $text eq 'SYNC') { $from =~ s/!.+$//; my $x; # find who sent it.. for ($x=0; $x<=$#{$client->{sync_wait}}; $x++) { last if $from eq $client->{sync_wait}->[$x]; } # exit if we don't expect them if ($x>$#{$client->{sync_wait}}) { print "Got unexpected SYNC from $from to $client->{name} ($client->{nick})\n"; return; } # remove from the list of people we're waiting for splice @{$client->{sync_wait}}, $x, 1; # re-enable client if we're done waiting if ($#{$client->{sync_wait}} == -1) { delete $client->{sync_wait}; $kernel->call($session, 'enable_client', $client); } } elsif (@{$client->{expect}} and $client->{expect}->[0]->[1] =~ /notice/i) { check_expect(@_[0..ARG0], $text); } } sub irc_msg { my ($kernel, $session, $heap, $sender, $from, $to, $text) = @_[KERNEL, SESSION, HEAP, SENDER, ARG0, ARG1, ARG2]; my $client = $heap->{sessions}->{$sender->get_heap()}; if (@{$client->{expect}} and $client->{expect}->[0]->[1] =~ /msg/i) { check_expect(@_[0..ARG0], $text); } } sub irc_public { my ($kernel, $session, $heap, $sender, $from, $to, $text) = @_[KERNEL, SESSION, HEAP, SENDER, ARG0, ARG1, ARG2]; my $client = $heap->{sessions}->{$sender->get_heap()}; if (@{$client->{expect}} and $client->{expect}->[0]->[1] =~ /public/i and grep($client->{expect}->[0]->[2], @$to)) { splice @{$client->{expect}->[0]}, 2, 1; check_expect(@_[0..ARG0], $text); } } sub irc_mode { my ($kernel, $session, $heap, $sender, $from, $to) = @_[KERNEL, SESSION, HEAP, SENDER, ARG0, ARG1]; my $client = $heap->{sessions}->{$sender->get_heap()}; if (@{$client->{expect}} and $client->{expect}->[0]->[1] =~ /mode/i and grep($client->{expect}->[0]->[2], $to)) { splice @{$client->{expect}->[0]}, 2, 1; splice(@_, ARG1, 1); check_expect(@_); } } sub irc_error { my ($kernel, $session, $heap, $sender, $what) = @_[KERNEL, SESSION, HEAP, SENDER, ARG0]; my $client = $heap->{sessions}->{$sender->get_heap()}; if (@{$client->{expect}} and $client->{expect}->[0]->[1] =~ /error/i) { splice @{$client->{expect}->[0]}, 2, 1; unexpect($kernel, $session, $client); $client->{disconnect_expected} = 1; } else { print "ERROR: From server to $client->{name}: $what\n"; } $client->{throttled} = 1 if $what =~ /throttled/i; } ircd-ircu-2.10.12.10.dfsg1/tests/bug-1674539.cmd0000644000175000017500000000175410573146677020123 0ustar madkissmadkissdefine srv1 127.0.0.1:7611 define srv1-name irc-2.example.net define srv2 127.0.0.2:7621 define srv2-name irc-3.example.net define cl1-nick oper1 define cl2-nick oper2 define cl3-nick oper3 # Connect two clients to server 1, one to server 2, and oper them all up. connect cl1 %cl1-nick% oper %srv1% :Oper 1 connect cl2 %cl2-nick% oper %srv1% :Oper 2 connect cl3 %cl3-nick% oper %srv2% :Oper 3 :cl1 oper oper oper :cl2 oper oper oper :cl3 oper oper oper # Check that we get local privileges properly. :cl1 wait cl2,cl3 :cl1 raw :privs %cl1-nick% :cl1 expect %srv1-name% 270 %cl1-nick% %cl1-nick% :CHAN_LIMIT :cl1 raw :privs %cl2-nick% :cl1 expect %srv1-name% 270 %cl1-nick% %cl2-nick% :CHAN_LIMIT # Bug 1674539 is that remote /privs do not get any response. # Testing shows that the problem only shows up with a hub between. :cl1 raw :privs %cl3-nick% :cl1 expect %srv2-name% 270 %cl1-nick% %cl3-nick% :CHAN_LIMIT # Synchronize everything sync cl1,cl2,cl3 :cl1 quit done :cl2 quit done :cl3 quit done ircd-ircu-2.10.12.10.dfsg1/tests/readme.txt0000644000175000017500000000151610555270300017770 0ustar madkissmadkissircu Test Framework =================== This directory contains a simple test driver for ircu, supporting files, and test scripts. test-driver.pl requires the POE and POE::Component::IRC modules for Perl; they are available from CPAN. The test scripts assume that an instance of ircu has been started using the ircd.conf file in this directory (e.g. by running "../ircd/ircd -f `pwd`/ircd.conf"), and that IPv4 support is enabled on the system. The test-driver.pl script accepts several command-line options: -D enables POE::Component::IRC debugging output -V enables test-driver.pl debugging output -Hipaddr sets the IPv4 address to use for connections to the server one or more script names to interpret and execute The normal output is one dot for each line that is executed. Using the -D and -V options generates much more output. ircd-ircu-2.10.12.10.dfsg1/tests/ircd.conf0000644000175000017500000000204710573146216017572 0ustar madkissmadkissGeneral { name = "irc.example.net"; vhost = "127.0.0.1"; description = "Test IRC server"; numeric = 1; }; Admin { Location = "Right Here, Right Now"; Location = "Testbench IRC server"; Contact = "root@localhost"; }; Class { name = "Server"; pingfreq = 90 seconds; connectfreq = 5 minutes; sendq = 9 megabytes; maxlinks = 10; }; Connect { name = "irc-2.example.net"; host = "127.0.0.1"; port = 7610; password = "password"; class = "Server"; autoconnect = no; }; Connect { name = "irc-3.example.net"; host = "127.0.0.1"; port = 7620; password = "password"; class = "Server"; autoconnect = no; }; Class { name = "Local"; pingfreq = 1 minutes 30 seconds; sendq = 160000; maxlinks = 100; }; Client { ip = "127.*"; class = "Local"; }; Operator { local = no; class = "Local"; host = "*@127.*"; password = "$PLAIN$oper"; name = "oper"; }; Port { server = yes; port = 7600; }; Port { port = 7601; }; Features { "HUB" = "TRUE"; }; ircd-ircu-2.10.12.10.dfsg1/doc/0000755000175000017500000000000010653115262015376 5ustar madkissmadkissircd-ircu-2.10.12.10.dfsg1/doc/readme.chroot0000644000175000017500000001173307317121744020065 0ustar madkissmadkissUsing Chroot With IRCD Introduction Many system administrators like to run certain daemons within a "jail," a secure area of the file system that the daemon supposedly cannot break out of. That way, if the daemon is compromised somehow, the attacker cannot get out and affect the rest of the system in any way. There are problems with this--the standard UNIX way of doing this is with the chroot() call, which has been deprecated by the UNIX98 standard. Moreover, if an attacker has root within the jail, it is trivial to get *out* of the jail in most circumstances. Nevertheless, it is still often a good idea, and some systems can use more secure jails than other systems. Older versions of ircd supported chroot() operation within the server itself, but these were fraught with problems--chroot() can only be called by a process running as root, so ircd had to be started as root, typically by making it setuid, and would then have to drop those privileges after calling chroot(). Moreover, the design of the server would require that the server binary be in DPATH, or the /RESTART command would not work. In fact, /RESTART still wouldn't work, because the server would then attempt to change directories to a DPATH relative to the current root directory--and of course, the root directory often would not contain the shared libraries necessary for the ircd to even start. Configuring the Server For Use With Chroot In the versions of ircd starting with u2.10.11, all the setuid and chroot() code has been removed from the server. It is still possible to cause the daemon to run in a chroot() jail, however, through the use of a wrapper script. This requires making all paths compiled in to the server be relative to the new root directory; fortunately, this can be done by giving the configure script the --with-chroot= option. The argument specifies to configure where the root directory will be, and the server restart path, data path, configuration file, and debug log files will all be modified to be relative to this root directory. If the data path or configuration files cannot be made relative to the specified root directory, configure will issue an error message and exit; if the server restart path is not relative to the specified root directory, configure will issue a warning. The various paths are made relative to the root directory through the use of simple edits to their string representation. As an example, assume that we will be using the root directory "/home/ircd"; if the data path is "/home/ircd/lib," the data path that will be compiled into the server will be simply "/lib"; if, on the other hand, the specified data path were "/usr/local/lib/ircd," configure would issue an error, since there is no way to make the data path relative to the specified root directory. Preparing the Root Directory Most modern operating systems use shared libraries. When using chroot(), these libraries are searched for relative to the new root directory, and they must be present in order for a program to execute. The root directory must be prepared, therefore, by coping these libraries into the correct place. A script for this purpose has been provided in tools/mkchroot. This script relies on the command "ldd," which is used to report which shared libraries are used by a particular program; it also relies on ldd printing out the full path to those libraries. If either of these conditions is not met, it will be necessary to track down the libraries by hand and place them into the appropriate locations. The tools/mkchroot script takes as its first argument the path to the directory to be prepared as a root directory; following this argument should be a list of programs that will be running with that directory as the root directory. Using the Wrapper Also provided in the tools subdirectory are the sources for a simple wrapper program that can be used to start ircd. The program can be compiled by executing "cc -o wrapper tools/wrapper.c"; it must be run as root, but do not install it as root, since that would be a major security risk. This tool can be used to set the hard limit on file descriptors, as well as a root directory, and so may be useful to the administrator even if chroot() operation is not desired. A summary of the command line options for the wrapper tool can be obtained with the "-h" option. To set the file descriptor limit, use the "-l" option followed by the desired number of file descriptors; to select an alternative root directory, use "-c" followed by the desired root directory. You must use the "-u" option to specify a user name (or user ID) that the command should be run as; otherwise, the command will be run as root, which is not what you want (and why you should never install this program setuid root). Follow the command line arguments with "--" and the full path to the command that you wish to run, along with arguments to that command. The "--" tells the wrapper program to stop interpreting options, and is very important if you must give the command any options. ircd-ircu-2.10.12.10.dfsg1/doc/readme.indent0000644000175000017500000000070107014163752020040 0ustar madkissmadkissIf you want to indent this source file, in order to convert the source tree to the used programming style, you should use `make indent' in the base directory. For this to work you need to have `indent' version 2.1.0 or higher in your PATH. GNU indent 2.1.0 is available from all GNU sites, its main ftp site is ftp://ftp.gnu.org/indent/. Or you can download it directly from the webpage of its maintainer at http://www.xs4all.nl/~carlo17/indent/ ircd-ircu-2.10.12.10.dfsg1/doc/history/0000755000175000017500000000000010561247164017104 5ustar madkissmadkissircd-ircu-2.10.12.10.dfsg1/doc/history/ChangeLog.070000644000175000017500000000335307606714076021116 0ustar madkissmadkiss# # ChangeLog for Undernet ircu Servers # # $Id: ChangeLog.07,v 1.2 2003/01/08 03:17:18 klmitch Exp $ # # Please insert new entries on the top of the list, a one or two line comment # is sufficient. Please include your name on the entries we know who to blame. # Please keep lines < 80 chars. #------------------------------------------------------------------------------- * Added hostname hiding compatible with ircu2.10.10 to allow host hiding for transitioning services, back out pline8 for now. --Bleep * Fixed default behavior for BADCHAN. supposed to DEFAULT yes, however should not change each time a make config is done. -- WT * doc/readme.www: add Runs link update patch for linux info. --Bleep * channel.c, channel.h: add David M's fixup for local channel oper overrides. --Bleep * s_misc.c (date): add Runs Y2K patch --Bleep * hash.c (hChangeClient): bug fix. If the client pointer matched the first pointer in the bucket, the change was ignored (returned 0), leaving stale values in the hash table, eventually causing the server to die for mysterious reasons. Bug discovered by Quant and Isomer --Bleep * config-sh.in, channel.h, numeric.h, channel.c, s_debug.c, s_err.c: add lchanmode patch by CaptJay, add symbols to incredibly long feature string. Bump patchlevel to .03 --Bleep * list.h list.c s_conf.h s_conf.c opercmds.c: badchan patch 2 seperate settings, allow global, and allow local. currently allow_local is 'unapproved' for use on undernet. --WildThang * ircd.h, s_serv.h, s_debug.h, ircd.c, s_user.c, s_bsd.c: removed STAT_MASTER/BOOT_OPER code, original patch by Isomer --Bleep * s_user.c (m_nick): removed redundant check for acptr --Bleep * ChangeLog (file): added ChangeLog, and BUGS files, import to ircu2.10 --Bleep ircd-ircu-2.10.12.10.dfsg1/doc/history/2.4.notes0000644000175000017500000004733507014163752020474 0ustar madkissmadkiss/************************************************************************ * IRC - Internet Relay Chat, 2.4.notes * Copyright (C) 1990 Markku Savela * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 1, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ IRC 2.4 release notes 6 May 1990/msa (Markku.Savela@vtt.fi) ============================================================ This document explains the changes I have done up to this point. Some additional changes and packaging has been made by Chelsea (chelsea@earth.cchem.berkeley.edu). This is personal view of the changes. CHANGES TO LAST THE OFFICIAL RELEASE (2.2PL1) This release of irc2.4 is based to 2.2PL1 release (see the HISTORY chapter later in this document). Aside from fixing the bugs, this version is in many ways different from the 2.2PL1. The purpose of the most changes is to make it easier to run an IRC server. Normal users benefit from these changes indirectly by getting a better maintained server. 1. Changes visible to normal users Even while mainly fixing bugs, some user visible changes have crept in too. 1.1 General note on wildcards Many commands accept now wildcard matching where applicable. All compares are case insensitive (e.g. "a" == "A"). The wild cards are ? matches any single character * matches any number of characters, also empty string. [PL1 had a bug, which caused "*du*" not match "....edu"]. 1.2 Server supported wildcards for "/who mask" command. Protocol message is "WHO mask", where mask can be empty 0 List all users [No change from PL1] * List all users on the same channel where the user is (or all, if user is on 0) [No change from PL1]. number List all users on the specified channel [No change from PL1]. Note, if the "mask" begings with a digit, this form is assumed, and the remainder of mask is ignored, e.g. "/who 12*.fi" gives all people from channel 12 and ignores the "*.fi" part. mask If the mask is any string, it will be compared *separately* to each information field of the user and if a match is found in any field, that user is included into the list. The fields searched are nickname loginname (account name) real name (text shown in parenthesis) hostname (users machine) servername (server he/she is using) Note: servername is not usually shown on WHO output, but is included in anyway. Example: finding all users somehow connected with Finnish sites, can be achieved with mask "*.fi". 1.3 Changes to /whois command As WHO, also /whois accepts wild cards as a parameters. WHOIS returns information for all users whose nickname matches the specified mask. WHOIS automaticly calls WHOWAS [see below], if the attempted nickname is not found. 1.4 Short term "WHOWAS" history The server has a short in memory cache of the recent nickname changes (the current default is set to 200 last changes). The design goal of this is that it remembers changes in last few minutes, there is no intention of this to be a long term history. That must be a separate project, although it could use the hooks provided by this service. "WHOWAS nickname" queries this cache and returns about the same information that WHOIS would do, if the nickname is found. Wildcards are not accepted here, this is a specifically designed feature. If the name is not found, WHOWAS doesn't reply anything. This is because the most useful use of WHOWAS is implicitly through "WHOIS". This history is also implicitly utilized by KILL command. 1.5 New SERVER-SERVER/SERVER-CLIENT protocol message WALLOPS The message ":source WALLOPS :Message" sends the message text to all operators that are currently online. Any user can use this command, it's not restricted. How this function is activated, depends on the client, but if nothing else works, "/quote wallops text" should. NOTE:This function will not be fully operational until *ALL* servers have upgraded to version 2.4. Also, operators must be using a client that recognizes this command. This is really a hasty addition. But, done this way it follows the general IRC message philosophy, where messages are sent only to links where they are needed (e.g. WALLOPS goes only to servers that have opers online--it's not broadcast to every server). 1.6 General use of wildcarding in server queries All commands that previously took a servername as a parameter, now accept also a wildcarded mask. The mask is replaced with the first matching servername. The following user level commands are affected /admin server -- administrative info /time server -- local time /version server -- the server version /motd server -- "the message of the day" /info server -- info (usually same on same server version) /stat f server -- statistics information /users server -- users logged on server machine Note: Remote capability is a new feature for "info" and "stat" commands. Until all servers have upgraded, these commands may not reach the intended target and may return the information from some intermediate server. 1.7 Marking user AWAY v2.2PL1 version and earlier showed the AWAY-state (G) only for the local users of the same server. AWAY status could be queried only by sending a message to a user. This release (or since msa.4) broadcasts the away status to every server and the commands /WHO and /WHOIS give this information reliably. A side effect of this change is: when a user marks himself/herself as AWAY, all pre-msa.4 servers that are reached will send back an acknowlegde message. Until all servers are upgraged, use of AWAY is somewhat inconvenient. If you get extra messages from AWAY, they also contain the server information. Use /admin command and send a *friendly* request for the admin to upgrage his/her server to a working version, namely 2.4 :) 1.8 Servers don't restrict characters within messages The parameter fields of the messages can now contain any characters in range 1-255, except '\r', '\n' and '\0'. The client programs should by default filter away the "dangerous" control characters, but intelligent clients can utilize this change and allow exchanges with foreign 8-bit (or wider) charactersets. (The actual command parts must still be represented with the ordinary 7-bit characters.) 2. Changes visible to the server administrator 2.1 Identifying servers Servers/clients have now always two names (it was this way in PL1, but I think this version makes the idea more clear): Announced Name: The official name of the server (the name you use in /time, /quote connect, etc) or users nickname. Servers name is usually the hostname, but can actually be almost any string of characters resembling hostname. This one is given in M-line of ircd.conf. Socket hostname: Socket hostname of the server or client. This is the hostname of the connecting server/client and this is resolved from the connection. If resolve cannot be done, ircd defaults to using numeric IP-address. *ALL* access checks are based on this name, especially noteworthy fact, if your resolver cannot find hostnames by IP-address, you must allow the access by IP-numbers in your ircd.conf. In many places, where servers name is shown, actually both are shown. The general format of the displayed name is AnnouncedName[SocketHostName] When a connection is yet unkown, there is no AnnouncedName, and if the AnnouncedName is the same as SocketHostName, the "[..]"-part is omitted. 2.2 Many notices to local operators If an oper is signed on the server, he/she will receive many notices about exceptional conditions and servers actions. When something goes wrong, it should be much easier to fix the problems. Few often occurring, inportant error messages are "Write error to SERVERNAME, closing link" write() to socket returned with an error. Server is closing the link. This means usually network problems which you can do nothing about. "Max buffering limit exceeded for SERVERNAME" This is the situation where old server would have been "frozen". The socket buffers in your OS have been filled and even servers own predefined internal buffering MAX for a link has been exceeded. Exceeding this limit most likely means that the link is really dead, so the server closes the link and scratches all queued output for it. If the limit is set high ( > 20000 bytes), you won't usually see this, but just "No responce from SERVERNAME, closing link" as the server does not reply to PING as it should. "Link SERVERNAME cancelled, server SERVERNAME already exits" Two different servers from your net fragment attempted to connect same other net fragment about the same time and this collision is detected at your server. IRC routing does not allow loops, the link causing the loop is closed. (Which of the two links gets closed is mostly determined by pure chance and timing--you may lose a better link this way. Collisions should be rare in normal operation, if the timers in "config.h" are not messed up too much...) Of course, you get this too, if you try to connect to a server that is already connected by some other route. In that case your attempted connection is just safely cancelled. The notices attempt to be self explaining. 2.3 Links statistics collecting IRCD now counts the bytes and messages transmitted to each open link. This information can be output with a command "/stats l" ("/stats" or "/stat m" will give the old message count statistics). Sample output Link SendQ SendM SendBytes RcveM RcveBytes Open since oddjob.uchicago 0 203 8067 772 34321 Sun May 6 02:15:45 1990 cs.hut.fi[sauna 0 1916 79798 94 3082 Sun May 6 01:51:25 1990 otax.tky.hut.fi 0 3722 151511 426 22690 Sun May 6 00:25:54 1990 nada.kth.se 0 8775 355811 5333 223853 Sat May 5 14:11:49 1990 vehka.cs.uta.fi 0 23816 882000 901 41156 Fri May 4 22:50:23 1990 lut.fi 0 25145 943765 1068 35020 Fri May 4 22:34:16 1990 kreeta.helsinki 0 24286 899191 957 47085 Fri May 4 22:33:28 1990 naakka.tut.fi 0 27754 1067302 8288 362960 Fri May 4 22:33:14 1990 joyx.joensuu.fi 0 30003 1172949 2300 80053 Fri May 4 22:33:05 1990 tel4.tel.vtt.fi 04083771 167473890 863475 35022755 Mon Apr 23 00:15:17 1990 | | | | | | | | | | | Link established | | | | The number of bytes received | | | The number protocol messages received | | The number of bytes transmitted | The number of protocol messages transmitted The amount of queued data in bytes (if socket is hung) The last row (with the local servername) contains the total cumulative counts for all connections since the server was started. One can query the statistics of a remote server by adding the servers name to the command "/stat l servername". Of course, this only works, if all intermediate servers have upgraged. The first "old" server will stop the propagation and return the message counts by default. 2.4 Connecting servers An oper can manually activate a connection phase to any server defined in ircd.conf C-lines (to successfully complete the connection, the N-line must be present too). The message achieving this is CONNECT servername portnumber where servername may be a mask string containing wildcards. This name is matched against entries in ircd.conf (notice: the testing is made in reverse order, e.g. the last C-line in ircd.conf is tested first). If portnumber is omitted, the ircd uses the one given in the found C-line. If the C-line does not have the portnumber, the compiled default will be used (PORTNUM from config.h). This release allows also for remote connecting. An oper can send a connect request to remote server with CONNECT servername portnumber remoteserver This command is passed to the 'remoteserver' and it then tries to execute it like it was given locally. (If there are opers online on that server, they will get a notice about this happening.) Note, that one can remotely connect only what is defined in ircd.conf. Usually one needs and should use this only for immediate your neighbours. Nobody should randomly go and give connect requests to distant servers, unless one knows it's absolutely necessary and is very familiar about the linking setup there. 2.4 Terminating connections The SQUIT command in PL1 was not intended to be used manually and was very dangerous to use (it also created so called "ghost servers"). Since msa.4, the SQUIT has been safer to use manually. "SQUIT z" s a \ / \ / ------- x ------- y --| |-- z ------- b / ^ \ / | \ p c "SQUIT z" will break the link between "y" and "z" if injected into system from "s". After that the net will be in two fragmets, broken between "y" and "z". Server "z" never sees the actual SQUIT, all it observers is that the link to "y" suddenly closes (opers on z would see it as "Server y closed the connection" notice. Opers on y would see it as "Received remote SQUIT from x", note that the actual source "s" is not identified in the current version--for reasons too complicated to be explained here). *WARNING* *WARNING* If the server "y" is still running pre-msa.4 (like PL1), don't *EVER* issue a SQUIT for its links (unless the link is to a leaf node or verifiably a "ghost server"). Note, that when the link between "y" and "z" breaks, y will spit out SQUIT's for "z", "a", "b" and "c" to "x". At same time "z" is sending SQUIT's for "x", "s", "p", etc to "a", "b" and "c". SQUIT is normally generated by servers automaticly, it's just a later modification (msa.4) that allows an OPER to use this same message to "simulate" a link break at certain point. *IMPORTANT* If server "z" has configuration "C:y::y:6667", it automaticly attempts to reconnect after a short delay (currently 10 seconds), but only *if* the connection has been up long enough reliably (currently set to 10 minutes). If the thus formed link is squit another time, it will not attempt to come back immeatedly. This gives an oper time to reconfigure the links if that first short delay is not enough. As in all commands, also SQUIT accepts wildcards, but be careful to give sufficient identification. SQUIT of wrong server is not nice... 2.5 KILL message KILL will implicitly use the history database. If a KILL is issued for a nick that has been changed to another, the server will automaticly re-issue the kill with the new nickname, if the change has happened recently (current value should be 90 seconds). If a "terrorist" is clearly distrupting channel by bombarding it with garbage from negative channels and changing nick all time, there is no need to consult the "WHOWAS" data base, just use the nickname that was used to send the garbage and ircd hunts the culprit down. When this change of target happens, the oper issuing the kill is notified. NOTE: With automatic, kill-proof-reconnecting clients, the value of KILL is becoming insignificant... 2.6 Changing the server defaults from the command line The servers activation command is now ircd[ -f configfile][ -h servername][ -p portnumber][ -x debuglevel] where parameters can be given in any order. If the "configfile" is defined, it will override the default specified in the file "config.h". If "servername" is defined, it will override the one defined in the M-line on the configuration line. "portnumber" will override the compiled default (from "config.h") or the one from the M-line of the configuration file. The "debuglevel" will determine the amout of logging the server does into a log file that has been define in "config.h". The "debuglevel" should never be defined for a server running normally, it can quickly generate megabytes of trace. Usually needed only when the server is incapable of starting properly at all, then one run with "-x9" usually is enough to reveal the problem. 3. General cleaning up and commenting the code This issue is controversial. My way of fixing bugs is not just fix them, I also want to program defensively, make it difficult to make new errors. Thus I have heavily reformatted and reorganized those files that I have had to touch. Some functions have been renamed intentionally to catch all uses of those functions [because the functions semantics or calling sequences have been changed]. This release (2.4) will be the last IRC version I'm contributing to. If you have any wishes or complains about the code or functioining of IRC, use the source or ask whomever it happens to be the current developer. HISTORY There have been many different versions of IRC and many of those versions are still in use. The following attempt to bring some clarification to the versions. This starts from 2.01.6, hopefully no servers are running older versions... ... ... 2.01.6 A version from WiZ in summer 1989 ... 2.01t6 A series of releases, which contained minor 2.01T6 adjustements and bug fixes to the base version. 2.01u6 Some of those fixes caused extra errors, of 2.01U6 this series versions 2.01U6 and 2.01v6 are at 2.01v6 least known to be rather stable. 2.1.0 Mike Bolotski created these versions from the sources 2.1.1 of 2.01U6, but unfortunale some devious bug crept in and caused a lots of linking problems (the nasty "ghost server problem" splintered the net constantly). These versions must be deleted on sight :) [Autumn 1989] 2.2 This version is the 2.01v6 sources repackaged into multiple directories by Mike again. Probably nobody is running this base version, because is was promptly followed by two patch releases [Autumn 1989] 2.2PL0 These two are the last major "official" releases 2.2PL1 and most of the servers upgraged to either of these. 2.2msa Unfortunately 2.2PL1 version had a tendency to die mysteriously very often. So, I started to look into the code from March 1990 and that resulted a series of patches to the 2.2PL1 server code, but finally decided to release full server code releases of which few have got wider distribution 2.2msa.4 Has most of the known PL1 bugs fixed and seems to be very reliable. But once servers started staying up, a new problem appeared: socket buffers started getting full and servers tended to freeze very often for long intervals. 2.3alpha 2.3 Is an attempt to make an official release from 2.2msa.4 code, but hassles with changed copyrights make this version unacceptable. Besides, 2.3alpha or 2.2msa.4 are now obsolete, old versions :) 2.2msa.x To solve the freezing problems, the server code is changed to use non-blocking sockets. 2.2msa.7 2.2msa.9 Are intermediate test versions, of which .9 seems to have most of the problems solved. 2.2msa.10 Never released. This is slightly improved version of msa.9, some new features. 2.4 Is a release which combines 2.2msa.10 and Chelsea's modifications to the server. Also, this release has once again reorganized the directories and makefiles. -- msa (Markku.Savela@vtt.fi) ircd-ircu-2.10.12.10.dfsg1/doc/history/Manual0000644000175000017500000003220607014163752020246 0ustar madkissmadkiss/************************************************************************ * IRC - Internet Relay Chat, doc/MANUAL * Copyright (C) 1990, Karl Kleinpaste * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 1, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ Date: 04 Apr 1989 Author: Karl Kleinpaste karl@cis.ohio-state.edu Last modification: 15 May 1992 by Mauri Haikola mjh@stekt.oulu.fi Modified for undernet: 7 Feb 1995 by Carlo Wood carlo@runaway.xs4all.nl INTERNET RELAY CHAT (IRC) a real-time conversational system * 1: IRC - replacement for talk(1) IRC is a functional replacement for and improvement to talk(1). Talk is an old, primitive, atrocious, minimalist sort of keyboard/screen conversation tool, using a grotesque, machine-dependent protocol. IRC does everything talk does, but with a better protocol, allowing more than 2 users to talk at once, with access across the aggregate Internet, and providing a whole raft of other useful features. Note (added Apr 7, 1998): The above statement has been left there for historical reasons. It should be noted however that IRC is not any longer a replacement for talk(1). At the time IRC was first developed, people connected to internet all were using accounts on UNIX Operating Systems, which almost all did run a non-restricted fingerd and a talkd. This allowed to see if someone was logged in (with finger) and then summon him to talk by connecting to his talk daemon. For IRC however it is necessary to already be connected to an IRC server and one needs to pay attention to the window of the IRC client in order to see if someone wants to talk to you. Therefore IRC has become more of a 'chat box': a Real Time Chat environment for chatting, making friends and exchanging information. It has little resemblance anyore with talk(1). * 2: Entering Internet Relay Chat To enter Internet Relay Chat you need to run a client, which will start connecting to its default server. More info on clients can be achieved from ftp://ftp.undernet.org/pub/irc/docs/faq/underfaq.1. A lot of clients for all kinds of Operating Systems and (programming) languages can be found in ftp://ftp.undernet.org/pub/irc/clients/index.html. * 3: How much can be seen from here The universe - seriously. This is most formally called Internet Relay Chat. Server hosts are connected via a tree structure. The various servers relay control and message data among themselves to advertise the existence of other servers, users, and the channels and other resources being occupied by those users. * 4: Structure There is quite a lot of structure to the operation of IRC, as compared to crufty old talk(1). Since so little could be done with talk(1), it needed little structure. But to keep track of people spread literally around the world, the structure is useful so that one can speak to exactly those people with whom one wishes to speak. The structure is outlined in more detail in the paragraphs below. ** 4.1: Nicknames All users of IRC are known to the system by a `nickname.' A nickname can be chosen at the moment the client connects, but can be changed at any time. Nickname clashes are not allowed; this is enforced by the servers. If one's intended nickname clashes with someone else as one enters chat, one will not be able to complete entry to IRC until one changes one's nickname to something else. ** 4.2: Presence on a channel Fundamental to the operation of IRC is the concept of a channel. All users are `on a channel' while inside IRC. One enters the `null channel' first. One cannot send any messages while not in any chatting channel unless one has set up a private conversation in some way. The number of channels is virtually unlimited - whatever will fit in a string of 200 characters and starts with a #, & or + sign. A channel which is prefixed with a '#' (pound sign) is a global channel; available to everyone on the network. A channel prefixed with a '&' (ampersand) is a local channel; only available to users on the server you are connected to. While a channel prefixed with a + (addition sign) are global and modeless; those channels do accept mode changes. ** 4.3: Main modes of #channels Public This is the default mode for a channel. When one is on a public channel, one can be seen by all other users (if one's own user mode permits this). Anyone can notice users on a public channel and join such a channel's conversation. Private This means that, although anyone can see that one is using chat, no one can tell what channel one is using unless one is already on that channel with oneself. Since the number of potential channels is in the billions, this is quite some security - all one gives away is the acknowledgement that one is using chat. Secret While one is on a secret channel, no one who is not on one's channel with oneself can even see that one is there. One's name does not show up in a wildcard search of active users. Of course, making a channel like '#test' secret gives a huge change to be discovered anyway. Changing the mode The mode of a channel (private, secret, invite-only, moderated, topic-limited, person-number-limited, no-messages-to-channel, ban someone from channel, etc.) is set by a channel operator, who is the first person to join a channel, or someone who has had channel operatorship bestowed on them by another channel operator. Local channels Channels which are prefixed with the ampersand (&) sign are local channels which mean they can only be accessed to users who are on the same server. For example, &help may exist on every server on the network, however each of them are different channels whereas global (#) channels are just one channel for the entire network. Modeless channels Channels that have a name that start with a plus sign (+) instead, are modeless. This means that nobody is channel operator and hence no mode changes can be done. The default mode of a +channel is "+nt". The intention of modeless channels is to avoid channel wars by making all users on that channel a-priori equal. The only possible abuse, channel flooding, should be solved with /ignore. *** 4.4: Conversations not using channels It is possible to conduct conversations with others without using the formalized channel structure. Doing so requires that two people set themselves up for private conversation using special commands; see User Commands below. ** 5: Getting help Type "/help." Follow the instructions. Since this is a client feature it might not work for you, in which case you'd have to consult your local IRC guru or someone on the net. ** 5.1: User commands In most clients, commands must start with a '/' (for example: /join #test). The most important commands supported by IRC are: help quit who whois list topic join part links msg invite silence names stats nick away info clear query ignore mode Also read the file ADD-TO-IRCRC for a description of Undernet specific commands and an example script for the ircII client. *** 5.1.1: /quit [comment] /quit exits chat. Optional comment may be included; see above. *** 5.1.2: /who [channelname_mask | user@host.mask] /who returns information on who is using chat. Users of public channels show up with one of their channels identified, if any. Users of private channels appear, but they are specified as being on a private, unspecified channel. Users of secret channels and users whose user mode is +i (invisible) do not appear at all. Giving a channel name as an argument to /who returns only those users of the specified channel. This still doesn't show users of secret channel or invisible users one is actually on the same channel with them. Users of private channels are shown, if an exact channel name is given. For a detailed explanation of the many options of /who, see doc/readme.who ! *** 5.1.3: /whois This returns information about individual users. Type "/whois nickname" to get information on the login name and host from which the nicknamed user comes. You can specify multiple nicknames to query by seperating each with a comma. *** 5.1.4: /topic Channels can be given off-the-cuff "topics." Saying "/topic some string of text" will associate that topic with the current channel. *** 5.1.5: /list [options] [channel.mask] /list will give lists of active channels, the number of users of each, and the topics therewith associated. Again, secret channels do not appear and private channels only appear as Prv. [options] is a comma seperated list of one or more of the following options: >nnn ccc Tttt This comma seperated list may not contain spaces. Here `nnn' is the minimum or maximum number of users on a channel, `ccc' is the minimum or maximum age or creation time of a channel, in respectively seconds or UTC. And `ttt' is the minimum or maximum age or creation time of the topic of the channel, in respectively seconds or UTC. On most servers, if no options are given, the server will use a default option (like "T<10") in order to strongly reduce the of number of listed channels. *** 5.1.6: /join [key] /join is the means to enter a channel. Give the channel name as an argument. If this is a secret or hidden channel, /who commands will show oneself and any other users of one's channel. One's arrival on a channel is announced to the rest of the users already on that channel. Silent, anonymous "lurking" is not supported. If the channel is locked with a key, you need to add the [key] parameter which acts as a password (cannot contain spaces). *** 5.1.7: /msg A single message can be sent privately to a certain user with /msg. Type /msg nickname and the text to be sent. It will be sent privately to the indicated nickname. *** 5.1.8: /invite <#channel> If there is a user online to whom one wishes to speak, one may invite that user to join oneself on a certain channel. One types "/invite nickname" with an optional channel name. The receiving user gets a one-line message indicating the sender and the invitation. The receiving user is free to ignore the invitation, of course. You cannot invite users to a modeless channel. *** 5.1.9: /ignore If one wants to ignore messages sent by some other user or users, it may be done with /ignore command. One can ignore someone by their nickname, or by their user@host data. Wildcards may be used. /ignore is only intended to ignore annoying public messages (messages sent to a channel), to stop flooding (a huge number of messages per second) you have to use banning for channel messages, and /silence for private messages. /mode +d stops all messages from ALL channels. *** 5.1.12: /silence [nick!user@host.mask] This command effectively stops private message flooding at the server of the flooder. You can use "/silence nick" to get a list of the silence masks of 'nick'. This command is undernet specific and therefor not supported by all clients unless you add specifically a line to your clients configuration file. *** 5.1.11: /nick One can change nicknames by issuing "/nick new-nickname." All users on one's channel will be informed about the change. NOTE: If one enters chat with a nickname clash (e.g., one's login name is the same as someone else's, and the other user got there first), the system will not let one enter until one issues a /nick command with a unique nickname. Nicknames are limited to nine characters in length on the Undernet. *** 5.1.12: /mode #channel [lots of parameters] This command can be used for altering the various modes of a channel (see the explanation of channel modes above). /mode command can only be issued by channel operators. Please use /help, or the manual of your client to find out about this command. If you would like a list of the current modes in the channel, type /mode (you do not need to be a channel operator to do this). For a list of channel bans, type /mode +b. * 6: Questions, problems, troubles? If you have problems, please get and read the FAQs from ftp.undernet.org:/pub/irc/docs/underfaq.1 and underfaq.2. You can also ask for help on some of the operator channels on IRC, for example #help. They will be able to assist you in whatever problems you are having with IRC. ircd-ircu-2.10.12.10.dfsg1/doc/history/history.pre240000644000175000017500000000463607014163752021473 0ustar madkissmadkiss/************************************************************************ * IRC - Internet Relay Chat, doc/HISTORY * Copyright (C) 1990 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 1, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ HISTORY of Recent IRC Versions. Previous version numbering schemes have caused some confusion, which this document attempts to resolve. The original test versions released by WiZ were numbered 2.01?6 where the ? refers to a letter. The last known stable version was U6. Version 2.1.0/1 was rewritten by Mike Bolotski from the U6 sources but several bugs were introduced during the rewrite. After several weeks, almost all servers backed up to U6. Version v6 contained comparatively minor modifications from U6. Version 2.2 consists of the v6 source repackaged into multiple directories, and with modified documentation. From now on, the version number will stay relatively constant. As minor changes and bug fixes are added, they will be distributed in the form of context diffs, to be applied with the 'patch' command. Each bugfix will bump the patchlevel (PL) of the release by 1. The PL is documented in the version.c file in the lib/misc directory. Version 2.3 was unfortunate mistake containing copyright violations so it was soon taken off distribution. Version 2.4 contains *very* many bug fixes, enhancements, and "hooks" for use in future releases. The source tree has been restructured, and the Makefiles rewritten to be recursive and follow the new source tree layout. Version 2.5 contains string channels and channel modes (as well as channel operators). Also Wizible's MAIL system was included as an option. Hopefully, whoever provides a fix will also update the respective ChangeLogs to summarize the changes, as well as adding a description of the bug to the BugList file. ircd-ircu-2.10.12.10.dfsg1/doc/history/README.patches0000644000175000017500000023560207014163752021421 0ustar madkissmadkiss The available patches for 2.8*mu servers are: Tp8 = TimeStampPre8 - A protocol which disallows netsplit ops and channel desynchs. Bquiet - does not allow a person who is banned to speak over the channel Silence - Cuts off flooding at local server Anc = Anti-Nick collide - *Intentional* nick collides are impossible with this wonderful patch. W = Wallops - lets you send messages to other IRC ops ban = BanInformation - Lets you see who did a ban and when, as well sw = /stats w - lets you gather statistics on average client connects To = TopicInformation - Lets you see who set the topic for a channel and when S = Signon Time - Tells you when a local user signed onto IRC Cl = Client connect - Notifies opers on your server of client connects/ disconnects (with disconnect reason) TT = Trace Times - displays the time (in secs) since your server last heard anything from a client/server, when you do /trace. KL = K-line comments - Allows you to modify the lame "no ghosts allowed" default comment to whatever you wish, or alternately, display a file to a rejected client. OF = Oper fail patch - displays a warning to current ops when someone fails in entering the right oper password. MC = Mixed case patch - useful for those pesky clone bots and hacked logins; disallows userids which have mixed case or control chars N = Note - allows you keep a "note" for other users, amongst other things ----------------------------------------------------------------------------- Explanations for these patches follow..... Help on patches written by Mandar Mirashi (mmmirash@mailhost.ecn.uoknor.edu) Mmmm on IRC. ============================================================================= TIMESTAMP ============================================================================= Author: Carlo, carlo@sg.tn.tudelft.nl, Run on IRC. Info on TS protocol: TSpre7 ------ Effects of the TS protocol: > No mode wars possible. When you take someones op there are three possibilities: - You were too late (You was already de-opped on your server). - You take it (On the *whole* net). - You start taking it (on your server, but it is 'bounced' (ie your mode change is cancelled); This occurs when you try to do mode change direct after a net re-connection in a situation were you hacked op by net-break riding. > No desynchronisation possible. > No unnecessary MODE msg send. You can't send 'double' mode's that don't make sense. Servers don't send unnecessary MODE's either. > Hacking op is from now on *only* possible by admins that hacked their servercode, and therefor easier to prosecute. Also you can 'hack' op still exactly like now (by riding net break) on an *opless* channel. > The protocol is fully compatible with older servers: It is invisible and it works with old servers like this: Every 'block' of direct connected 2.8.x.TS servers will stay synchronized, Hacking op is impossible by means of riding a net break between two TS-servers on channels that were created within that block. In all other cases the same happens as without TS. Here follow technical details implemented in TSpre7: ------ Reference: 2.8.14/15.TSpre7 Full list of TS-MODE-Change protocol: -Mode changes (originating by clients) are refused only: 1) from a client that is directly connected and has no chan ops on the channel on its server. 2) when not being a change of the internal state of a server (Well, refused is to strong, propagation of the mode is just unnecessary and thus not done). 3) from someone flagged as de-opped-by-server. (flag is reset when this person is opped again by anyone) (The server detecting this mode change cancels the mode change, by bouncing it upstream, thus keeping the net synchronized). -An extra parameter is added behind MODE changes *done* by servers, sended *to* other servers. It is a Universal Time in ascii seconds. This extra parameter is NOT sended when it is 0 (can happen with old servers on the net), 0 means rather then Jan 1st 1970 :). This parameter is the creationtime of the channel being: the universal time at which the channel was created by a *local* client; or the non-zero received creation time from an other server (as parameter with a mode change) that was earlier then its own; or equal 0 when the channel was created by a non-local client and no MODE with TS was received (yet). -Of the channel_flags is 1 bit more used: CHFL_DEOPPED, set when de-opped by a server (compare CHFL_CHANOP, set when channel operator). It's reset when opped. (And starts reset on joining (creation?) of a channel, this will be changed to 'set' on join, when all servers have TS; making detection of op hacking by admins a bit easier). -Timestamps (sended by TS-servers) are handled as follows: Received TS Own TS Bounced/Propagated equal equal propagated later >0,earlier if ops: bounced with own TS if no ops: propagated with own TS (own TS is sended upstream too, to make sure TS stays synchronized). earlier later TS copied, propagated none any propagated, own TS sended. >0 none if ops: propagated, no TS sended, own TS stays 0. if no ops: TS copied, propagated. -A mode change +/-o nick (+/- v) from a person that is deopped by a server results in a -/+o nick back up stream (and is not propagated) if it was an attempt to change the internal state of the receiving server. -kick is handled as mode -o, internal state 'not on channel' being 'already de-opped'. Bounce includes JOIN and restoring o and v flags. (Effect: You don't even *see* the kick on one side, on the other side the person joins again and gets his flags back from the bouncing server). -A received TimeStamp that claims a creation time *earlier* then that this server dissapeared from the net results in a HACK: notice (with time difference in seconds). Bye OPER.. (This meaning, to hack op on an existing channel that was created 15 minutes before you disconnected your server, you will have generated a HACK notice: Clock set back at least 900 seconds by .) (Not yet implemented, prob. in pre8). TSpre8 From: Carlo Kid - Runaway Subject: *** IMPORTANT; RFC To: wastelanders@rush.cc.edu (New Wastelanders MailingList) Date: Thu, 14 Apr 94 18:03:38 METDST Mailer: Elm [revision: 66.33] Status: RO Hi, please read this carefully and respond if you think it will result in INCORRECT behaviour under any circumstances: Here follow technical details implemented in TSpre8: ------ Reference: 2.8.17.TSpre8 Full list of TS-MODE-Change protocol: -Mode changes (originating by clients) are refused only: 1) from a client that is directly connected and has no chan ops on the channel on its server. 2) when not being a change of the internal state of a server (Well, refused is to strong, propagation of the mode is just unnecessary and thus not done). 3) from someone flagged as de-opped-by-server. (flag is reset when this person is opped again by anyone) (The server detecting this mode change cancels the mode change, by bouncing it upstream, thus keeping the net synchronized). 4) When a '0' as timestamp is received, originating from a server (see below). Then the whole mode is ignored, a HACK notice is sent to all ops and the string is propagated as received. -An extra parameter is added behind MODE changes *done* by servers, sent *to* other servers *containing* a +o, -o, +v or -v. It is a Universal Time in ascii seconds. Whenever a HACK is detected, a HACK: notice is sent to all local opers, and the full MODE is propagated with a '0' as timestamp, generating a HACK notice on all other servers. Otherwise this parameter is the creationtime of the channel being: the universal time at which the channel was created by a *local* client; or the non-zero received creation time from an other server (as parameter with a mode change) that was earlier then its own; or equal 0 when the channel was created by a non-local client and no MODE with TS was received (yet). -Of the channel_flags is 1 bit more used: CHFL_DEOPPED, set when de-opped by a server (compare CHFL_CHANOP, set when channel operator). It's reset when opped. It starts *set* on joining (creation?) of a channel, making detection of op hacking by admins a bit easier. -Timestamps (sent by TS-servers) are handled as follows: Received TS Own TS Bounced/Propagated equal equal propagated later >0,earlier if ops: bounced with own TS if no ops: TS copied, propagated earlier later TS copied, propagated 0 or none any HACK generated, 0 propagated, own TS is kept >0 none TS copied, propagated. -A mode change +/-o nick (+/- v) from a person that is deopped by a server results in a -/+o nick back up stream (and is not propagated) if it was an attempt to change the internal state of the receiving server. -kick is handled as mode -o, internal state 'not on channel' being 'already de-opped'. Bounce includes JOIN and restoring o and v flags. (Effect: You don't even *see* the kick on one side, on the other side the person joins again and gets his flags back from the bouncing server). -A received TimeStamp that claims a creation time *earlier* then that this server dissapeared from the net results in a HACK: notice (with time difference in seconds). Bye OPER.. (This meaning, to hack op on an existing channel that was created 15 minutes before you disconnected your server, you will have generated a HACK notice: Clock set back at least 900 seconds by .) From: Carlo Kid - Runaway Subject: TSpre8 can work! :) To: wastelanders@rush.cc.edu (New Wastelanders MailingList) Date: Wed, 20 Apr 94 11:44:39 METDST Mailer: Elm [revision: 66.33] Status: RO Well... it took me a few days (a night and some dreams actually), but I think I found a solution for the problem I mentioned during the meeting :) Let me first repeat the problem: - I stated that TSpre8 would prevent op hacking by admins, but... later I realized that that was impossible the way wanted it :( My idea was at first: Simply generate a HACK notice when a server comes on the net with a creation time earlier then when it did split off (and earlier then my own creation time). This sounds nice, but in even this simple case it doesn't work: Server A and B, users a and b: A -- B | @a TS=100 Split at t=200 A B | @a b joins at t=300 A(TS=100) B(TS=300) | | @a @b Net joins: A -- B | | a b Both are de-opped: b because he sends a TS of 300 with is greater (later) then 100 (correctly: he used the netbreak). And a is deopped with a HACK notice by B, because he introduces 1) a TS earlier then the existing TS (100<300) and 2) the 100 is earlier then the time the split occured. The reason why this goes wrong is simply because B *forgets* the channel AND the TS of 100, after the split... If B would *keep* in memory that the channel existed on A and with what TS, it would be possible, but only at cost of a lot of extra memory usage... Now my new idea :) It allows hacking, but only in not so very interesting cases... And at least it makes it extremely difficult for a newbee, so we might at least catch 99% before they understand how it works :) (This explanation should not be on a public ftp site anymore after a while :) New rules: - Servers that are OFF the net for more then one day are forgotten. - New servers (or forgotten servers), are always bounced except on channels that have no ops (when they create a channel of their own thus :) unless the receiving server is younger then one day and the introduced TS is earlier then the start up time (minus 10 minutes :/) of the receiving server. 'Birthdays' of those servers are also kept. - A server that splitted off while a channel already existed, and thus has a creation time earlier then the "received squit time" of that server, is not allowed to introduce an earlier timestamp then the creationtime of the channel (HACK), and also not an equal TS when younger then one day. - A server introducing a server with an earlier "time of received squit" inherrits that time as its own "time of received squit". This allows to hack op on a channel that didn't exist when you splitted (not interesting). You also can't keep a server off the net till you need it (a telnet connection), because those can't do anything for one day long, unless they send the TS *equal* to the existing TS (The only exception :(), having to connect between two and one days before the hack, break between zero and one day before the hack but before the channel existed, connect and hack with equal TS. What do you think? Just for fun? :) Apart from that it would be suspicious when someone connects/breaks every 24 hours a "test" server, channels that exist longer then one day are unhackable. The "disadvantages" are: servers that break off the net for *longer* then one day, but keep a channel up with an op, on *both sides of the net, will be completely de-opped after reconnection. *** IMPORTANT: I am absolutely not sure ;) if there aren't any other disadvantages or unwanted effects :) Please, think this over and mail me if you find some objection... Run From: Carlo Kid - Runaway Subject: 2.8.19.U3 RELEASED To: wastelanders@rush.cc.edu (New Wastelanders MailingList) Date: Sun, 22 May 94 14:15:41 METDST Cc: carlo@sg.tn.tudelft.nl Mailer: Elm [revision: 66.33] Status: RO Hi all :) Proud to present: 2.8.19.U3 :) I have spend *enormous* amounts of time in TESTING this version, and I really hope it is completely bug free, but the changes are very big, so maybe persons who only want to upgrade/compile ONCE should wait a little longer then the compile cracks we have here ;) For real testing we need the HUBs though! So please, don't hesitate, Delft (a HUB) is running it already for a long time, also linked to other 2.8.19.U3 test servers. Before I'll tell about whats new in U3, I want to especially thank President for the tremendous help in testing TSpre8 -- I would never have been able bring up the stength to go through the difficult periods without him being there to listen to my technical complaints ;) ======================================================================= NEW in .U3 ---------- First all, TSpre8. It did not become what I hoped/expected to be possible :( Hacking will still be possible, but at least it will be a LOT more difficult when you don't know what you are doing, and I think we WILL catch (new) admins that think they can abuse their powers to be GOD on "their" channel. Especially, nobody will be able to hack *anything* with a normal nick. And because server modes are more obvious a hack, this alone is a step forward against admin hacking prevention imho. The .patch file is -rw------- 1 carlo users 65142 May 22 01:29 irc2.8.19-TSpre8.patch big. I'll now brows through it and mentions changes in the order they appear in the .patch file, arbitrary order thus ;) Zombies ------- As mentioned before on 'wastelanders', I changed the internal way a KICK is handled, to be able to stop illegal -hacked- kicks from *outside* the channel. This has no effect on server-server protocol nor on server-client protocol. But because this way it is possible to keep (a little) memory for channels you're not on (being kicked from) I thought it would be no more then logical to stop people from joining the usual 10 ten channels at the same time, *including* the ones you are kicked from (because they occupy memory). This memory is released when you 1) Try to rejoin (so with all people having a auto-rejoin-on kick NOTHING changed at all), or 2) when you do a part - this is new and only intended to use when you do NOT have auto-rejoin, when you do not even WANT to rejoin, or try, assuming you might not be banned, when you have been kicked like this of a lot of channels and all together are "on" 10 channels so you NEED to leave one before you can join another... For this rare case, you must know on *which* channels you "are", therefor this is visible when you do a /names, or /who or /whois to yourself. It is never visible for others. Example: 12:07 * Run (Daryl@sg.tn.tudelft.nl) has joined channel #wasteland *** Mode change "+o Run" on channel #wasteland by Wasted *** #wasteland : created Fri May 13 17:08:34 1994 Hi Run ! *** You have been kicked off channel #wasteland by Run (Test) *** Run is Daryl@sg.tn.tudelft.nl (/msg Run profile) *** on channels: !#wasteland *** on irc via server Delft.NL.EU.undernet.org (Runaway Server +[130.161.188.188]) *** Run is away: Writting E-mail *** Run is an IRC Operator *** Run has been idle for 642 seconds. As you can see, the channel is marked with a '!' to show you are NOT not that channel... Both, a part #wasteland as well as a join (being not able to actually join because of ban, invite-only, key or limit), will remove you from this channel. The part will be sent back to (only) you, and everything has turned out to be 100% compatible with ircii protocol. Finally, of course the channel is removed when everyone is kicked and/or left the channel (a channel with only zombies is removed immedeately). #define RPL_CREATIONTIME 329 -------------------------------- A new numeric is sent when you ask for a MODE of a channel, by doing /MODE #channel without parameters. The reply is the same as before, but followed by a new numeric 329: /MODE #wasteland Delft.NL.EU.undernet.org 324 Run #wasteland +t Delft.NL.EU.undernet.org 329 Run #wasteland 768845314 To supress this, you'll have to add something like: ON ^329 * to your .ircrc file. If you want to see this new numeric, you would add On ^329 "*" echo *** $1 : created $stime($2) It turns out that ircii clients ask for this mode when you join a channel, therefor you will see the creationtime when you join a channel, I'll leave it as an exercise to suppress this, but still being able to see it when you specifically ask for it :) New ircd.conf line ------------------ This is IMPORTANT : In order for Uworld to work you MUST add those lines to your ircd.conf file: U:Uworld.undernet.org::* U:Underworld.nl::* The later to allow the backup Underworld.nl to still function. If you forget this, or do it wrong, your server might refuse to accept certain mode changes from Uworld.undernet.org and start *bouncing* modes done by lusers that got op from it. The name of servers allowed to hack have to be agreed upon totally, by all admins. If one admin removes his U: line, the service will not work always correctly. When a server does a mode change that is detected to be a hack, you will see -as an oper, or +s luser- this notice: -> *uworld* opcom MODE #wasteland +o Mmmm !Uworld.undernet.org! Run is using Uworld to : MODE #wasteland +o Mmmm *** Notice -- HACK: Uworld.undernet.org MODE #wasteland +o Mmmm *** Mode change "+o Mmmm" on channel #wasteland by Uworld.undernet.org Normally, this HACK notice would NOT take effect! You still *see* the HACK notice for the U: line server(s) but then they DO take effect. Every other message (some including the word HACK) do also take effect, and are only a warning that someone is MAYBE hacking... I didn't see it occur yet. Removed bugs ------------ I did find some bugs in TSpre7, never thought that was possible :) I forgot what it exactly was, but under (very rare) circumstances it could be pretty serious :/ One rather important thing is that now the TimeStamp is sent during a net re.join when there are no ops. Before it was possible to create a partly TimeStamp less net on an opless channel. TSpre8 garantees that the TS is synchronized on the whole net at any time. Other messages -------------- Apart from the (true) HACK notice, you can get a: BOUNCE or HACK: notice, which does take effect and is most probably just a bounce of a mode done by an attacker: someone immedeately after a net re.join with his net.ride ops trying to de-op the others. I don't think this will happen often because it will be clear to all lusers that it is useless to try. NET.RIDE on opless #channel notice, you'll see this if someone does really abuses a net break to get ops on some opless channel. The mode does take effect however. FULL bounce of modes -------------------- When before someone would ride a net break, and try something, ONLY his +/- o/v modes. Other modes like +mlk 1 \\|/\|/ would still take effect. With TSpre8 this changed... All modes (except bans) are bounced when someone rides a net break. Also the bouncing is more compact, while with TSpre7 every o and v mode took one line, now all modes are kept into one line. More allowed ------------ Before you was (how lame) not allowed to mix things like k, o and v... Now you are allowed, why not? Also you can use up to six parameters, really gives you a power kick ;) *** Mode change "+vvvvvv flux epa Skip Run Mmmm gyn" on channel #wasteland by +Run User friendly mask fixing ------------------------- The lame way Avalon fixes a mask (for a ban) is like this: /mode * +bb *.tudelft.nl Daryl@sg*.tn.tudelft.nl becomes: *** Mode change "+bb *.tudelft!*@* Daryl!*@sg*.tn.tudelft.nl" on channel +#wasteland by Run The same on a TSpre8 server gives: *** Mode change "+b *!*@*.tudelft.nl" on channel #wasteland by Run While just Daryl@sg*.tn.tudelft.nl results in: *** Mode change "+b *!Daryl@sg*.tn.tudelft.nl" on channel #wasteland by Run which what one would expect! ---------------------------------------------------------------- Goodluck with compiling, Run PS If you encounter any problems, realize it is VERY unlikely that it is .U3, but if you really think so, then first try to compile plain 2.8.19. If you succeed, save the Makefile the include/config.h and the include/setup.h. Unpack .U3, replace those files and recompile. With this I assume you don't put your ircd.conf inside the source directories of course, that would still have the paths set wrong then. A smart move is to make patch file once for your Makefile/config.h : First ONLY edit the Makefile and config.h (or copy the them from a working source tree to a empty directory), and then make a diff with: diff -rc irc2.8.19.clean irc2.8.19.my.makefile > Makefile.config.h.patch That really speeds up upgrading with later versions. (irc2.8.19.my.makefile only needs to contain irc2.8.19.my.makefile/Makefile irc2.8.19.my.makefile/include/config.h ) Of course, keep the include/setup.h seperately. ### KILL for Mmm. Mmmm (stop it lamer (unnecessary flooding of alexbot)) ============================================================================= BQUIET ============================================================================= Author: Carlo, carlo@sg.tn.tudelft.nl, Run on IRC. Helpful ideas by: Aaron, agifford@sci.dixie.edu, Karll on IRC In order to fight flooding, and as discussed on wastelanders, banning someone on a channel will now also stop him from doing anything visible on the channel. This allows to let someone see what you think of him without even kicking him, he will leave by himself. He will still be able to appologise by private msgs of course and then he can be de-banned. A ban is this way a short cut for +m+vvvv everyone excpet the flooder. Note that even NICK floods are stopped: When you are on a channel where you are banned, you are not allowed to change your nick. ============================================================================= SILENCE ============================================================================= Author: Carlo, carlo@sg.tn.tudelft.nl, Run on IRC. Helpful ideas by: Aaron, agifford@sci.dixie.edu, Karll on IRC My solution to flooders with clone bots etc :) Let the user that GETS flooded decide he doesn't want that and stop the flooder right at his own server (the server of the flooder). This is a new command, and the clients will need unfortunately a few lines in their .ircrc before it can work. Moreover, before this works, ALL servers must have .U3. The lines I use at the moment are: ALIAS SILENCE QUOTE SILENCE ALIAS SILE QUOTE SILENCE ON ^RAW_IRC "% SILENCE %" echo *** $* It turns out that some auto-rejoin on kick lines, like Davemans toolbox, disables the use of ON RAW_IRC, or at least makes it work incorrectly. You should disable this auto-rejoin line and you could add the one I use instead: ON ^RAW_IRC "% KICK % % *" { IF ([$3]==[$N]) { //QUOTE JOIN $2 ECHO $MID(11 5 $STIME($TIME())) * You have been kicked off channel $2 by $LEFT($INDEX(! $0) $0) \($MID(1 256 $4-)\) } { ECHO $MID(11 5 $STIME($TIME())) * $3 has been kicked off channel $2 by $LEFT($INDEX(! $0) $0) \($MID(1 256 $4-)\) } } which are 6 lines, not 8. The way the silence patch works is as follows: When you add a silence mask (using the same user friendly mask fixing) like: /SILENCE Tsunami*@ It will echo back to you how it is added: *** Run!Daryl@sg.tn.tudelft.nl SILENCE +*!Tsunami*@* Note that there is a '+' infront of the mask now. You can also type: /SILENCE +bot* *** Run!Daryl@sg.tn.tudelft.nl SILENCE +bot*!*@* If you want to silence one particular nick, you must add the '+', because when you do: /SILENCE nick and 'nick' exists, you will get the silence list of nick. Just using /SILENCE gives your own silence list: *** Run bot*!*@* *** Run *!Tsunami*@* *** End of Silence List However, check the silence list of someone ELSE make only really sense when you already did sent a message to this person. Because a silence mask only propagates to the server of the flooder when it is actually necessary. For instance: You can add up to 5 silence masks and delete them again and it will only be local to your own server. Only when someone would message you, matching a mask, the mask propagates to the server of the flooder. And stays there till you signoff, or till you delete it. If you delete a mask, it follows the same path as the +masks... As a result of this, +s lusers and opers will see the message: *** SILENCE : Unknown command (from Lausanne.CH.EU.UnderNet.org) When someone from *behind* a non .U3 server sends you a message (Lausanne is this case). So, you will STILL be flooded ;) UNTIL ALL servers are upgraded... (Or must do -s, but at least the net is flooded). To: wastelanders@rush.cc.edu From: agifford@sci.dixie.edu (Aaron Gifford) Subject: HELP with HELP for SILENCE Status: RO Hey, here's a VERY VERY VERY rough draft of a HELP entry for SILENCE, assuming it becomes a new command for ircII and not a replacement for IGNORE either via new code, or aliases like: ALIAS SILENCE { QUOTE SILENCE $* } Anyway, PLEASE PLEASE PLEASE alter, modify, correct, add, hack-up, etc this rough draft and send me your alterations. I just typed this up VERY quickly because StGeorge is now running irc2.8.19.U3.1. The bug I mention in the file will hopefully disappear very soon, so that text will have to do likewise and vanish. :) Here it is, draft #1 HELP for SILENCE: Usage: SILENCE [] SILENCE [+|-] SILENCE allows you to TOTALLY ignore all private messages (PRIVMSG's) and notices (NOTICE's) from any user whose nick!user@host matches the parameter. The characters * and ? can be used as wildcards in the pattern. If you wanted to ignore all users from "somewhere.com" you would use: SILENCE +*!*@somewhere.com To ignore some with the nickname "Jerk" you would use: SILENCE +Jerk NOTE: The server will complete the pattern, storing it as "Jerk!*@*" The only drawback of just SILENCE'ing someone by nickname only is that the user could quickly change nicknames to avoid your pattern. To remove a pattern, use a - before the pattern you want to remove. When the command is used without any parameters, the server will list all stored patterns you are currently ignoring with the SILENCE command. When used in the first form listed, you will see the SILENCE list for the specified user. This list is not necessarily complete nor accurate because of how servers share SILENCE information internally. You can check to see if someone is ignoring you with SILENCE by first sending that user a private message, then using the command to see the user's SILENCE list. Currently there is a bug in the servers (hopefully to be fixed soon) that will add the nickname you specify to your SILENCE list when you attempt to see that user's SILENCE list if that user is not currently online. Because SILENCE is a part of the IRC server protocol (on the Undernet) it works much more efficiently than IGNORE, but is limited to a very brief list of patterns. Also, you don't have as may options as you do with IGNORE. If a user is flooding you, SILENCE is many times more efficient than IGNORE because the offending user's PRIMSG's or NOTICE's (including CTCP) are stopped at the server and never even sent to your client. See Also: IGNORE From: Carlo Kid - Runaway Subject: Re: HELP with HELP for SILENCE To: agifford@sci.dixie.edu (Aaron Gifford) (Aaron Gifford) Date: Wed, 25 May 94 12:29:37 METDST Cc: wastelanders@rush.cc.edu (New Wastelanders MailingList) In-Reply-To: <9405250313.AA18446@sci.dixie.edu>; from "Aaron Gifford" at May 24, 94 9:20 pm Mailer: Elm [revision: 66.33] Status: RO > Here it is, draft #1 HELP for SILENCE: > > Usage: SILENCE [] > SILENCE [+|-] > As it is now (I do not consider what you mentioned as a bug, I was aware of this effect and didn't choose to alter it), it really is: Usage: SILENCE [+|-] Or : SILENCE When you leave the '+|-' away A '+' is assumed. The second possibility allows you to check your own silence lists, or allows to check if you are silenced by someone after you did message him but didn't get a respond (did ping him for instance). Indeed, this could be interpreted as a pattern, when doesn't exists. > If you wanted to ignore all users from "somewhere.com" you would use: > SILENCE +*!*@somewhere.com SILENCE somewhere.com would do. > When used in the first form listed, you will see the SILENCE list for > the specified user. This list is not necessarily complete nor accurate > because of how servers share SILENCE information internally. You can > check to see if someone is ignoring you with SILENCE by first sending > that user a private message, then using the command to see the user's > SILENCE list. Mention that a EVAL CTCP PING $TIME() is better... It would not be necessary to do the silence if the ping returns... To determine between huge lag and silence, you have to do the silence check after that. If you add something like this in the manual, people will automatically wait a while after the 'message' (ping), so that the servers have time to send the silence mask back. Otherwise they might think they can do a quick msg+silence at the same time. Nah... Not too important, unless with huge lag + silence combination. > > Currently there is a bug in the servers (hopefully to be fixed soon) > that will add the nickname you specify to your SILENCE list when you > attempt to see that user's SILENCE list if that user is not currently > online. I didn't consider this as too bad... But if people want it, I can change it so that you MUST add a '+' to add a mask that doesn't contain a '.', '!' or '@'. That would lead to 2.8.19.U3.2 and a very tiny patch for the people who already compiled .U3 Run ============================================================================= U3 - required additions to .ircrc ============================================================================= From: Carlo Kid - Runaway Subject: Re: .ircrc codes for the new patches :) To: lamberdc@dad.cs.tuns.ca Date: Mon, 23 May 94 11:41:31 METDST Cc: wastelanders@rush.cc.edu (New Wastelanders MailingList) In-Reply-To: <9405222118.AA02415@dad.cs.tuns.ca>; from "Donald "WHIZZARD" Lambert" at May 22, 94 6:18 pm Mailer: Elm [revision: 66.33] Status: RO > hiya All > I was wondering if some one could send me a copy of the script/ > for the new patches including the ban , topic and client connecting patches. > > And whatever is now out with the new .19 code :) > > thanks > > -- Donnie > > aka WHIZZARD The ftp.undernet.org:/pub/undernet/servers/Patches/README file: These are lines you need to add to your .ircrc file in order to use all posibilities .U3 profides you: To see when a channel was created: On ^329 * echo *** $1 : created $stime($2) When your server has the .ban patch use this to see who did a ban and when: On ^367 * if ([$4] != []) {echo *** $1 \($3 - $stime($4)) $2} {echo *** $1-} --------------------------- When ALL servers upgraded to .U3, you can use this command: ALIAS SILENCE QUOTE SILENCE On ^RAW_IRC "% SILENCE %" echo *** $* Use this as: /SILENCE +mask To add 'mask' to your silence list (will completely stop all private messages from people matching 'mask' with their nick!user@host). You can VIEW your silence list by typing: /SILENCE If you message someone and he doesn't react (like with ping), then you can check if you match a silence mask he added by viewing his silence list with: /SILENCE nick A mask can be deleted by using the command: /SILENCE -mask When the some messages you from behind a NON-.U3 server you will not receive his message but the line: *** Unknown command (SILENCE) (From server.name.undernet.org) instead, so you will still be flooded. We hope all servers will be upgraded within a few months. ------ And my ircd.motd from Delft* : *%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*% N E W : - This server now runs the official released beta version 2.8.19.U3.1.ban For you as users this means that: -More security : .U3 contains the .TSpre8 patch with disallows even ADMINs of servers to hack op on your channel with a nick, most server modes are detected. -The possibility to see the *creationtime* of a channel (used with the TimeStamp (TS) protocol - unique on undernet (disables the possibility of 'net.riding')) -The possibility to stop EVERY kind of channel flooding by *banning* someone : Now a ban stops not only part/join floods, but also message floods and even nick floods! -The possibility to see who did when a certain ban. -The possibility to stop anyone flooding you with any kind of private messages at his *own* server! (This will only work when ALL servers have upgraded) To be able to use all of this, ftp to sg.tn.tudelft.nl login: ftp ; password : anything ; file: /pub/README Put those lines in your .ircrc initialisation file ! Have fun, Run. ---- Run ============================================================================= U3.1 -> U3.2 ============================================================================= From: Carlo Kid - Runaway Subject: *BUG* .U3.1 found !! To: wastelanders@rush.cc.edu (New Wastelanders MailingList) Date: Wed, 25 May 94 16:45:39 METDST In-Reply-To: <457.9405250732@ccws-09.brunel.ac.uk>; from "James T Lowe" at May 25, 94 8:32 am Mailer: Elm [revision: 66.33] Status: RO > :-> > :-> Hiya.. > :-> > :-> Here's what I observed tonight: > :-> > :-> *** Mmmm (mandar@roosevelt.ecn.uoknor.edu) has joined channel #friendly > :-> *** Users on #friendly: @Mmmm > :-> *** Mode change "-o Mmmm" on channel #friendly by Uxbridge.* > > Not surprising : > > #friendly RedRum H* cs93jtl@ccws-09.brunel.ac.uk > #friendly Emmy H lamphear@cheshire.oxy.edu > #friendly ChemBot H@ cmrobert@hellcat.ecn.uoknor.edu > > > > >From Norman : > > *** ChemBot is cmrobert@hellcat.ecn.uoknor.edu (Charles Michael Roberts) > *** on channels: @#ChatZone > *** on irc via server Norman.OK.US.undernet.org > *** ChemBot has been idle 10 minutes > > > and from Uxbridge : > > ** ChemBot is cmrobert@hellcat.ecn.uoknor.edu (Charles Michael Roberts) > *** on channels: @#chatZone @#friendly > *** on irc via server Norman.OK.US.undernet.org > > :-> But, > :-> > :-> *** Mmmm has left channel #friendly > :-> *** Mmmm (mandar@roosevelt.ecn.uoknor.edu) has joined channel #test > :-> *** Users on #test: @Mmmm > :-> > :-> works fine.. > :-> > :-> Is this due to the U lines? Uworld was in no way involved though :-( > :-> > :-> I personally feel that uxbridge's retaining timestamps of old channels - > :-> Run, can ya take a look asap. It can prove most distressing for our users :( > :-> > :-> Thanks!! > :-> > :-> Mmmm > > Weeehhhw, yeah a real bug :/ RedRum and I looked for it for almost 4 hours before it was found... I will release .U3.2 and a patch for .U3.1-U3.2 asap... Description of bug: When someone gets kicked (and doesn't (try to) rejoin), it is flagged as a zombie. After a net-break, users are mutual re-joined on both sides of the net. It turned out that a zombie is also rejoined after a net rejoin. What happened with ChemBot: ChemBot was on #friendly via Norman (non TSpre8). It was banned and then kicked. It tried to rejoin, but Norman didn't allow that (ban). Delft never saw this try, and ChemBot stayed as a zombie on #friendly. Then Delft-UxBridge broke and reconnected... Delft did send a JOIN for ChemBot to UxBridge, ending up in a nick-desynced state. When Mmmm joined #friendly, he was the first on #friendly on all of the net except UxBridge... He was opped by Norman, but that is considered as a HACK by UxBridge and was bounced (ChemBot was still there *with* ops (those flags aren't reset when someone is marked zombie)). The second time Mmmm joined, he again got ops from Norman which now was accepted by UxBridge because this +o could be a BOUNCE of the de-op by UxBridge (Generating a BOUNCE or HACK: notice on UxBridge). Run From: Carlo Kid - Runaway Subject: Release 2.8.19.U3.2 To: wastelanders@rush.cc.edu (New Wastelanders MailingList) Date: Wed, 25 May 94 23:30:57 METDST Mailer: Elm [revision: 66.33] Status: RO Hi all, I released 2.8.19.U3.2 Fixed: - Rejoining of zombies after net break :/ (ChemBot case) - Silence command now give: No such nick, when doing /silence nick - I fixed the way a kick is handle, because in a last minute thought I realized MURC would get trouble otherwise, see below. As usual you can get it from ftp.undernet.org:/pub/undernet/servers Patches/irc2.8.19.U3.1-2.patch : If you already had .U3.1 irc2.8.19.U3.2.tar.gz : If start from scratch (DO SO!!!) For those who use the irc2.8.19.U3.1-2.patch ... ------------------------------------------ *** EDIT include/patchlevel.h !!!!!!!! *** ------------------------------------------ This patch will change your version to irc2.8.19.U3.2 so if you run .ban EDIT it !!! ========================================================================= The change in KICK handling is as follows: - A kick received from a local client, or for a local client or from a direction in which the kicked client is located, is simply handled as before: completely removed from channel, no zombie. This means also that there is no client-server protocol change anymore: /who, /whois and /names won't change. - A kick received for a local client originating from a remote client lets the server sent a PART upstream. Since this results for non TSpre8 servers in a remote "You're not on that channel" message, this message is suppressed (would never occur anyway now we are completely synced). The reason why this was needed is mainly because MURC constantly kicks people who have auto-rejoin disabled from different channels. With U3.1 they would get into problems after ten channels (needed to send extra PART's). Run -- ------------------------------------------------------------------------------- | carlo@sg.tn.tudelft.nl | Run @ IRC | | | Admin of Delft.NL.EU.undernet.org | | * Don't expect anything of live, | and Ircserver.et.tudelft.nl | | or you'll miss all the rest of it.| | ------------------------------------------------------------------------------- ============================================================================= U3->U4, ANTI NICK COLLIDE ============================================================================= Author: Carlo, carlo@sg.tn.tudelft.nl, Run on IRC. Hi all... After we dealt with channel msg-, join/part- and nick-floods (.bquiet), and with private message flooding (.silence), now in a sort of follow up to the anti net.break.ride (.TSpre7) and anti admin.hacks (TSpre8) we are about to deal with one of the last vulnerabilities of our net: nick-collision bots. Called .anc (anti nick collision). - - - Socially spoken it does the following (I hope): - Only kills the RIGHT person, when a nick collision occurs. This would mean: A) If someone tries to harash by connecting to servers that just broke off and then take the nick of a person on the other side, both would be killed on reconnection. But with the .anc patch on both connecting servers, only the net.break rider will be killed. B) Secondly, when your server (or side) breaks off and you connect to some other server on the other side, it happens sometimes that due to lag you get killed by a nick collision after reconnection of the net. A and B differ strongly in the sense that in case A the *new* -the youngest- nick must be killed, while in case B the *old* (lagged) nick must be killed. Technically this means that we have to look at the user@host.name too. This gives rise to some incompatible changes, and therefor, this patch must be done in two steps: First we deal with the nick-collision bots and make the server compatible with both - the old and new protocol. And then once all server upgraded, we deal with the last step: the nick collision with yourself. In the future there will be a third possible condition in which we can have a nick collision: (long example follows, can be skipped) C) The net breaks, and reconnects else where, and somehow a race condition occurs between the 'SERVER' messages of the servers of one side. For example: Servers: Part A Part B1 PartB2 Nicks a(A),b(B) a(A),b(B) a(A),b(B) Part A breaks off Part B: <-- :b QUIT --> :a QUIT <-- SQUIT serversB --> SQUIT serversA Result: a(A) b(B) b(B) A reconnects to Part B1, but immedeately breaks off again: -->SERVERs A -->NICK a -->:a USER ... Break: -->SERVERs A -->NICK a -->:a USER ... --> :a QUIT --> SQUIT serversA A connects to part B2, note that 'part B1 --> part B2' is lagged and the "SERVERs A ... etc" didn't arrive yet on partB2. Servers: Part B1 Part B2 Part A Nicks: b(B) b(B) a(A) -->SERVERs A -->NICK a -->:a USER ... --> :a QUIT --> SQUIT serversA --> SERVERs B --> NICK b --> :b USER ... <-- SERVERs A <-- NICK a <-- :a USER ... Result *before* the lagged messages arive on Part B2: Nicks: b(B) b(B),a(A) b(B),a(A) -->SERVERs A -->NICK a -->:a USER ... -->:a QUIT -->SQUIT serversA And when the lagged messages arrive on Part B2, the 'SERVERs A' get all ignored: "server exists", even more, Part B2 disconnects Part B1... :/. Now we are going to deal with the "server exists" problem *once* (attaching a timestamp to SERVER I think), in which case 'SERVERs A' would only be ignored by Part B2. Then the 'NICK a' would cause a nick collision with 1) Same user@host.name, 2) same server A, and 3) same nick-TS ! This means: We need to ignore 'NICK nick' when is has the same TimeStamp and the same user@host. But when the user@host differ, two people signed on at exactly the same time with the same nick and we must kill *both* to avoid a desync. ---- How to handle a nick collision, general --------------------------------------- Up till now when a nick collision occurs, both nicks (when a nick change from 'old' to 'new' is involved) are KILLed in ALL directions.. wiped off the net thus. But even with wiping off the net in mind, it doesn't make sense to kill in old direction, it is sufficient to deal with "our side" of the net, because every nick collision occurs on two servers, both can deal with their side. As an example: Servers: A B Nicks: a(A) a(B) Reconnection: <-- NICK a NICK a --> As you see, if A receives the 'NICK a' from B, it only has to deal with its own side, because it is certain that B will receive the 'NICK a' from A and handle it too as a nick collision (and therefore this 'NICK a' *is* already a 'KILL' message). Thus, when we receive a 'NICK' that gives rise to the need of purging a nick on *our* side, we deal with it by doing: sendto_serv_butone(cptr,":%s KILL ... which sends the KILL to all server connections except the link 'cptr' that generated the nick collision. Also then we have to destroy the memory usage of the killed client on our own server, and disconnect him if it is ours, so we call exit_client(). Summary so far -------------- Ok, we discussed when to kill who. Resulting rules are: We receive a "NICK new" or ":old NICK new" from a server direction, and we already have a registered 'new'. Then we have a nick collison and deal with it as follows: 1) If the user@host differ, and our 'new' is younger or equal, KILL our 'new'. and our 'new' is older, ignore the 'NICK new', but kill 'old' on our side if it was a nick change. 2) If user@host is the same: and our 'new' is older, KILL our 'new'. and our 'new' is younger, ignore the 'NICK new', but kill 'old' on our side if it was a nick change. and our 'new' is equal, KILL our 'new', and kill 'old' on our side too if it was a nick change. Remarks: The last case, where have a ':old NICK new' collission with the same user@host and TimeStamp, can't be case C), but it is possible that *we* did send a 'NICK new', and the server at the other side kills 'old' off... So we have to do it too. With this protocol we *ignore* 'NICK new' message, but of course in most cases they will be followed by at least a ':new USER ...' and probably more like ':new JOIN #...'. This would cause 'Fake direction' errors and the current protocol KILLs such a nick in *ALL* direction (???). Now, we DON'T want to KILL the nick in the right direction do we? And killing the fake direction nick makes no sense: it will be killed automatically due to the fact we did send a 'NICK new' in that direction. Thus: we can/have to remove the Fake Direction kills. Of course, when we receive a 'NICK new hopcount :TimeStamp', we *can't* compare with the user@host, because it takes some time before we will receive the 'USER'... We also can't store the nick, because it must be unique. To solve this, we need to change the protocol so that 'NICK new' contains all information and the USER message will be redundant and removed in a later patch. This also reduces net.bursts. Attaching a TimeStamp (TS) to nicks ----------------------------------- Whenever someone takes a new nick, which is available of course, either by changing nick or by signing on, the local server attaches a TimeStamp (TS) to the nick. Now there will be sent: NICK new hopcount TS user host.name server.name :Real name or :old NICK new :TS This is 100% compatible with the existing protocol. When a server receives such a nick from a neighbouring server it copies the TS, keeping track of the local change time. (When not all servers have upgraded, and no TS is received, the .anc server will fill in the time itself - being a slight advantage over keeping it 0. It also will assume that the host.names are equal or not equal resulting a as many kills as needed in the worst case). Examples -------- Servers: A B Nicks: a(A),b(B) b(B),a(A) Both change simultaneously to nick 'c', but 'a' slightly faster (at time=1, and b at time=2): c(A),b(B) c(B),a(A) -> :a NICK c :1 :b NICK c :2 <- Then A receives a ':b NICK c :2' where 2 > 1, and KILLs b on its own side. B however receives ':a NICK c :1' where 1 < 2, and KILLs c on its own side. Result: c(A) c(A) Due to 'lag', more :c PRIVMSG .. from B to A can follow, resulting in a fake direction. 'A' will simply ignore them and not kill c (kills for fake direction are nonsense anyway). In the case that someone signs on, taking the same nick as a nick change we have almost the same: Servers: A B Nicks: a(A) a(A) 'a' changes simultaneously to nick 'c', but slightly faster (at time=1), as a new 'c' signs on at B (time=2). c(A) a(A),c(B) -> :a NICK c :1 NICK c 1 :2 <- Then A receives a 'NICK c 1 :2' where 2 > 1, and ignores it simply. B however receives ':a NICK c :1' where 1 < 2, and KILLs c on its own side. Result: c(A) c(A) If the new 'c' was a little bit earlier, we get: Servers: A B Nicks: a(A) a(A) 'a' changes simultaneously to nick 'c', and slightly slower (at time=2), as a new 'c' signs on at B (time=1). c(A) a(A),c(B) -> :a NICK c :2 NICK c 1 :1 <- Then A receives a 'NICK c 1 :1' where 1 < 2, and KILLs c on its own side. B however receives ':a NICK c :2' where 2 > 1, and KILLs a on its own side. Result: c(B) c(B) Last case, two people sign on (or during a net reconnection): Server: A B Sign on: c(A) c(B) -> NICK c 1 :1 NICK c 1 :2 <- Then A receives 'NICK c 1 :2' where 2 > 1, and ignores it. and B receives a 'NICK c 1 :1' where 1 < 2, and KILLs c on its own side. Result: c(A) c(A) Note: the above didn't take equal TS's into account, and I assumed user@hosts to be different: the nick collision bot cases. A last possibility when someone starts hacking... a 'NICK new' twice from the same direction, should not be accepted: we kill the earlier one always. Compatibility problems ---------------------- In the future, we want to also take 'user@host' into account... Therefor, we need to start to ignore 'NICK new' and only act upon ':new USER ...'. We can only do that if also 'USER contains the hopcount and TimeStamp'... If we change the protocol immedeately to say: :nick USER user host.name server.name hopcount TimeStamp :Real name the 'hopcount' would be treated as realname, and we the rest would be lost :( We can also transfer the info to 'NICK', with: :server.name NICK nick hopcount user host.name TimeStamp :Real name and later forget the USER message. Although someone lamer uses the C source line " if (sptr == cptr) ..." in m_nick() to determine if it was a 'NICK new' or a ':old NICK new' :/ Geesh (unlogical). He should have used " if (IsServer(sptr)) ...". You would need three upgrade steps or we will have to do with: NICK nick hopcount user host.name server.name TimeStamp :Real name The nice thing about this is, that we can check how many parameters we receive and then immedeately use the user@host if it is there... That way the .acn will immedeately work once everyone upgraded once, and the second step would only get rid of the 'USER' line between servers. Run ============================================================================= WALLOPS ============================================================================= Usage: /WALLOPS Sends a message to IRC ops on-line. Remember that users who are /umode +w can see wallops as well. ============================================================================= STATS W ============================================================================= Author: Michael Vanloon (michaelv@iastate.edu) - mlv on IRC Help on /stats w : I've been working on something I think would be quite a useful addition to the ircd. It keeps track of the average number of local clients, total clients, and total connections (including servers) over various periods of time, currently over the last minute, hour, day and week. It is invoked by "/stats w server.name". You may try it yourself by "/stats w *.iastate.edu". A sample from ircserver.iastate.edu looks like this: *** Minute Hour Day Week Userload for: *** 44.91 39.4 33 33 iastate.edu clients *** 114.40 103.2 69 65 total clients *** 120.40 109.0 73 70 total connections *** * End of /STATS report I'm debating changing it to show average connections over the last minute, hour, day, prev. day, and prev. day, as I think the data doesn't change enough after that to really be useful to justify keeping it over an entire week. On smaller, less used servers, it should add a negligible amount to the resident memory consumed by the ircd. On a large hub such as the *.bu.edu servers, penfold, or ircserver.iastate.edu, it might add as much as 300k to the amount of memory the ircd attempts to keep resident. The amount is determined solely by the number of connects/disconnects the server processes over the span of time measured. The code is bulletproof and has undergone *extensive* debugging and testing before I announced it here. The reason I'm posting this is because I would like to know how many people think this would be a useful addition to the server. In addition, I'd like feedback on whether you think this should be a standard part of the distributed server code. I think it should, but Avalon wants me to post here first and see how others feel about it. I'd appreciate your input. I will be making a patched 2.7.2 server available with this included, for those who would like to have this and stability too. I'll also be hooking it into 2.8.x soon, and giving it back to Av to include in the standard 2.8 distribution as it matures, if he sees fit to do so. Thanks for your time... --Michael (mlv) IRC log started Wed Aug 18 21:52 *** Value of LOG set to ON *mlv* it's the usage of your server *mlv* average number of users on your server over the last minute, hour, day, yesterday, and the day before *mlv* local clients, total clients, and total connections (clients + servers) -ircserver.iastate.edu- Minute Hour Day Yest. YYest. Userload for: -ircserver.iastate.edu- 23.00 23.0 16 17 11 iastate.edu clients -ircserver.iastate.edu- 52.00 52.8 37 35 23 total clients -ircserver.iastate.edu- 61.00 61.7 45 42 21 total connections -> *mlv* hmm...so iastate had 23 local clients in the last minute? *mlv* right... in the last minute the average number of local users on our server was 23 *mlv* 23.45 actually -> *mlv* okie...gotcha... thanks :) one other thing *mlv* there were an average of 23.1 local users on here over the last hour *mlv* shoot -> *mlv* is it possible to specify multiple domains? -> *mlv* for e.g. uoknor.edu and okstate.edu cos those will be local to midway *mlv* it could be coded in, but 1) my code doesn't support it out of the box, and 2) that would add more state info which would increase the memory usage a bit -> *mlv* hmm... *mlv* it's purely informational... i wouldn't worry about it, really that much -> *mlv* okay...also, the Makefile on the ftp site seems hosed.....there's junk at the end...I tried both the .Z and the .gz *mlv* i'm thinking about making it log by connection class... but i'll have to use a more efficient statistical algorithm (less precise) if i do that *mlv* that way you could put all the local domains into certain classes *mlv* oh yeah... it's harmless, just weird -> *mlv* that'll work :) -> *mlv* well...thanks for your help....will have a look at the stats w patch when you're finished with it :) IRC Log ended *** Wed Aug 18 22:22 ============================================================================= BAN/TOPIC/SIGNON INFO ============================================================================= Author: Paul Foley (pfoley@kauri.vuw.ac.nz) SIO on IRC Help on Ban/Topic/Signon : Since these patches allow the server to maintain additional information, the server replies have been changes for the /mode #channel +b (#367), /whois (#317) and an additional reply #333 has been added for topic info. The time is returned as a long integer in UTC format in all cases. Since the existing clients will ignore this additional information, you will need to either patch the client, or in case you're using ircII, use the foll. /on statements to take benefit of these patches : on ^367 * if ([$4] != []) {echo *** $1 \($3 - $stime($4)) $2} {echo *** $1-} on ^333 * echo *** Topic for $1 set by $2 on $stime($3) on ^317 * if (index(012345679 $3) != -1) {echo *** $1 has been idle for $2 seconds. Signon at $stime($3)} {echo *** $1 has been idle for $2 seconds.} Once you have done this, you can see info as follows: /mode #wasteland +b *** #wasteland (Mmmm - Thu Aug 19 04:44:24 1993) test!*@* /topic #wasteland *** Topic for #wasteland: We all love Axl Rose! *** Topic for #wasteland set by rbarnes on Thu Aug 19 04:26:56 1993 /whois Mmmm *** Mmmm is mandar@essex.ecn.uoknor.edu (Mmmm,I get high with a little help +from my friends) *** on channels: @#wasteland *** on irc via server essex.ecn.uoknor.edu (MIDWEST HUB..HELPS YOU GET THERE +SOONER) *** Mmmm is an IRC Operator *** Mmmm has been idle for 454 seconds. Signon at Wed Aug 18 23:47:19 1993 ============================================================================= CLIENT NOTIFY ============================================================================= Authors: Patrick Ashmore (pda@engr.engr.uark.edu) - Twilight1 on IRC Mandar Mirashi (mmmirash@mailhost.ecn.uoknor.edu) - Mmmm on IRC Tony Vencill (vencill@iastate.edu) - Tony/Tonto on IRC Help on Client Notify: This patch allows all opers on your server to see clients connecting to your server and disconnecting from it (with the reason why they disconnected). This can help you identify troublesome clients, or redirect remote clients to closer servers, or troubleshoot the reason why a client disconnected. A sample output: *** Notice -- Client connecting : Karll (agifford@sci.dixie.edu). *** Notice -- Client exiting : Karll (agifford@sci.dixie.edu) [Bad link?]. PS: if you wish to selectively decide when you wish to see these connection notices, use the foll. script on ^server_notice "% % NOTICE -- CLIENT*" if (hideit != 1) {echo *** $2-} alias show @ hideit = 0;echo *** You can now see clients connecting/exiting alias hide @ hideit = 1;echo *** You will no longer see clients connecting/exiting If you then wish to not see client connects/exits when you are opered, simply type /hide. If you wish to see them again, type /show. ============================================================================= TRACE TIMES ============================================================================= Author: Tony Vencill (vencill@iastate.edu) - Tony/Tonto on IRC Help on Trace Time: This useful patch lets you identify the times since your server last heard from any connected servers or clients. This time is displayed in seconds, appended to each line of your /trace output. It can be very helpful in identifying which servers are going to drop off or which clients may ping timeout from your server. A sample output: /trace essex* *** Serv [30] ==> 10S 8C cancun.caltech.edu *!*@essex.ecn.uoknor.edu 73 *** Serv [30] ==> 9S 6C imageek.york.cuny.edu *!*@essex.ecn.uoknor.edu 27 *** Serv [0] ==> 1S 0C inga1.acc.stolaf.edu[130.71.192.16] +*!*@essex.ecn.uoknor.edu 58 *** Serv [0] ==> 1S 0C shadow.acc.iit.edu *!*@essex.ecn.uoknor.edu 97 *** Serv [0] ==> 1S 2C curie.ualr.edu Mmmm!mmmirash@essex.ecn.uoknor.edu 98 *** Serv [0] ==> 1S 1C piaget.phys.ksu.edu *!*@essex.ecn.uoknor.edu 117 *** Oper [0] ==> Mmmm[essex.ecn.uoknor.edu] 0 *** Serv [50] ==> 1S 0C pv1629.vincent.iastate.edu *!*@essex.ecn.uoknor.edu 7 *** Class 0 Entries linked: 6 *** Class 50 Entries linked: 1 *** Class 30 Entries linked: 2 ============================================================================= K- line comments ============================================================================= Author: Mandar Mirashi (mmmirash@mailhost.ecn.uoknor.edu) - Mmmm on IRC This extremely useful patch allows you to specify either a comment or an interval in the 2nd field of the K line (instead of the previous format of just a restricted interval). The "comment" can even be configured to be a *file* name which can then be displayed to the client rejected via the K line. All existing K lines will work as they are. This patch is an *enhancement* to the K-lines. e.g. (of a comment field) K:*.sdsu.edu:Flooding.is.not.cool.lamer:masc0482 As far as possible, do not use a white space in the comment field, because this breaks ircII's /stats k handling. You can use the period (.) or the underscore instead (_). e.g (of a file to be output to a rejected client - #define COMMENT_IS_FILE in config.h) K:*.netcom.com:/ecn/staff0/irc/servers/vinson/sorry.txt:* ============================================================================= OPER FAIL ============================================================================= Authors: Michael Vanloon (michaelv@iastate.edu) - mlv on IRC Jon C Green (jcgreen@iastate.edu) - Jon2 on IRC Bryan Collins (b@ctpm.org) - bwy on IRC This patch notifies you if someone tries to gain oper on your server and fails. The notice goes out only to the operators on the server. *** Notice -- Failed OPER attempt by M (mmmirash@lincoln.ecn.uoknor.edu) [crackit] ============================================================================= MIXED CASE ============================================================================= Authors: Michael Vanloon (michaelv@iastate.edu) - mlv on IRC Jon C Green (jcgreen@iastate.edu) - Jon2 on IRC "Here's a patch mlv and I wrote that prevents clients with mixed-case usernames from connecting. I don't know of many sites that allow mixed-case, so it is effective for stopping many clonebot attacks and also stops many would-be username hackers." - Jon2 This has been slightly modified by Mmmm to give an option of ignoring the case of the first character if desired (useful for those PC users who intuitevely enter their first name with the first letter capitalised). e.g. *** Notice -- Invalid username: buankBOT[saucer.cc.umr.edu] ============================================================================= NOTE ============================================================================= Usage: NOTE USER [&passwd] [+-flags] [+-maxtime] - or SEND|SPY|FIND|WAITFOR|NEWS * or SEND|SPY|FIND|WAITFOR|WALL|WALLOPS|DENY|NEWS|KEY NOTE LS|COUNT|RM|LOG [&pwd][+-flags][#ID] [date] NOTE FLAG [&passwd] [+-flags] [#ID] <+-flags> * NOTE SENT [NAME|COUNT|USERS] [RM] - NOTE STATS [MSM|MSW|MUM|MUW|MST|MSF|USED] - NOTE SENT [NAME|COUNT] * NOTE STATS [MSM|MSW|MUM|MUW|MST|MSF|USED|RESET] [value] * NOTE SAVE The Note system have two main functions: 1. Let you send one line messages to irc users which they will get when they next sign on to irc. Example: NOTE SEND Hi, this is a note to you. 2. Let you spy on people, to see when they sign on or off, change nick name or join channels. Example: NOTE SPY +100 (spy on nick for 100 days) You may fill in none or any of the arguments listed above, including * or ? at any place, as nick@*.edu, !username, ni?k!username etc... Other usefull features may be NOTE WAIT , making nick and you get a message when you both are on at the same time. Note was developed 1990 by jarle@stud.cs.uit.no (Wizible on IRC). *Usage: NOTE [] ANTIWALL * Switch off b flag for wall's which you have received on specified * server. The person who queued the wall would be notified about * the antiwall, and who requested this. Usage: NOTE COUNT [&] [+|-flags] [#] Displays the number of messages sent from your nick and username. See HELP LS for more info. See HELP FLAG for more info about flag setting. *Usage: NOTE DENY [&] [+|-] [+|-] * * DENY is an alias for USER +RZ (default max 1 day) * This command makes it impossible for any matching recipient to * queue any Note requests until timeout. Usage: NOTE FIND [&] [+|-] [+|-] FIND is an alias for USER +FLR (default max 1 day) This command makes the server search for any matching recipient, and send a note message back if this is found. If field is used, this should specify the realname of the person to be searched for. Examples: FIND -4 foo*!username@host FIND @host Internet* FIND nicky Annie* FIND +7 * Annie* Usage: NOTE FLAG [&] [+|-] [#] <+|-flags> You can add or delete as many flags as you wish with +/-. + switch the flag on, and - switch it off. Example: -S+RL Following flags with its default set specified first are available: -S > News flag for subscribing. -M > Request is removed after you sign off. -Q > Ignore request if recipient's first nick is equal to username. -I > Ignore request if recipient is not on same server as request. -W > Ignore request if recipient is not an operator. -Y > Ignore request if sender is not on IRC. -N > Let server send a note to you if message is delivered. -D > Same as N, except you only get a message (no queued note to you). -R > Repeat processing the request until timeout. -F > Let server send note info for matching recipient(s). Any message part specify what to match with the realname of the recipient. -L > Same as F, except you only get a message (no queued note to you). -C > Make sender's nicks be valid in all cases username@host is valid. -V > Make sender's "nick*" be valid in all cases username@host is valid. -X > Let server display if recipient signs on/off IRC or change nickname. Any message specified is returned to sender. -A > Show what server matching user is on using X flag. -J > Show what channel matching user is on using X flag. -U > Do not display nick-change using X flag. -E > Ignore request if nick, name and host matches the message text starting with any number of this format: 'nick!name@host nick!... ' * -B > Send a message to every account who match the nick!user@host * This creates a received list with flag H set. (see LS +h) * -T > Send a message not all nicks on same accounts too using B flag. * -K > Give keys to unlock privileged flags by setting that flags on. * The recipient does also get privileges to queue unlimited * numer of requests, list privileged flags and see all stats. * -Z > Make it impossible for recipient to queue anything at all. Other flags which are only displayed but can't be set by user: -O > Request is queued by an operator. -G > Notice message is generated by server. - -B > Broadcasting message. * -H > Flag list for who's received Broadcast message (B flag). - Notice: Message is not sent to recipient using F, L, R or X flag. - Using this flags, no message needs to be specified. * Notice: Message is not sent to recip. using F, L, R, X, K, Z or H * flag (except if B flag is set for R). For this flags, no msg. needed. Examples: FLAG * +cj : Switch on c and j flag for all requests. FLAG +x * +c : Switch on c flag for all req. which have x flag. FLAG nick -c+j : Switch off c flag and which on j flag for nick *Usage: NOTE KEY [&] [+|-] [+|-] * KEY is an alias for USER +KR (default max 1 day) * This command is for allowing no-opers to use oper-options by specifying * the flag to unlock. Be careful with this option! * Example: KEY +365 +s * would make it possible for everybody to use s flag. Usage: NOTE LOG [&] [+|-] [#] Displays how long time since matching person was on IRC. This works only after use of NOTE SPY. The log is protected to be seen for other users than the person who queued the SPY request. To get short output, do not specify any arguments. Example: LOG : Print short log of all LOG * : Print long log including real names of all LOG nick : Print long log for user nick. Usage: NOTE LS [&] [+|-] [#] [] Displays requests you have queued. No arguments would show you all requests without the message field. Use flags for matching all messages which have the specified flags set on or off. See HELP NOTE FLAG for more info about flag settings. Time can be specified on the form day.month.year or only day, or day/month, and separated with one of the three '.,/' characters. You can also specify -n for n days ago. Examples: 1.jan-90, 1/1.90, 3, 3/5, 3.may. If only '-' and no number is specified max time is set to all days. The time specified is always the local time on your system. Example: LS !user would show you all requests to username@* LS +x would show all your SPY requests. LS #300 would show you only request #300. Usage: NOTE NEWS [&] [+|-] [+|-] NEWS with no message is an alias for USER +RS (default max 60 days) This command is for subscribing on a specified newsgroup from any user(s) or host(s). Wildcards may be used anywhere. Example: NEWS irc.note : Subscribe on irc.note * NEWS irc.note@*.no : Send to group irc.note, but only for * users at host *.no * NEWS irc.note : Send to all for group irc.note * NEWS Users@*.edu Hi : Send Hi to all users using note in your * server located at host *.edu. (Advanced users may use User +rs <...> where filter is a string which must matches with field in received news message) - Only opers can send news as default. * To send news add message and use same format as subscribing, except * that username field must matches with subscribed group as alt.irc!*.irc - * everybody subscribing on a*.irc or *.irc or alt.irc... would get the news. * A speciall case is the group Users which everybody using note in the server * are member of. Usage: NOTE RM [&] [+|-] [#] Deletes any messages sent from your nick and username which matches with nick and username@host. Use flags for matching all messages which have the specified flags set on or off. See HELP FLAG for more info about flag settings, and HELP LS for info about time. *Usage: NOTE SAVE * SAVE saves all messages with the save flag set. Notice that the * messages are automatically saved (see HELP STATS). Each time server is * restarted, the save file is read and messages are restored. If no users * are connected to this server when saving, the ID number for each * message is renumbered. Usage: NOTE SEND [&] [+|-] [+|-] SEND is an alias for USER +D (default max 60 days) This command is for sending a message to recipient, and let the server send a note + a notice to sender if this is on IRC - if message is sent. SEND foobar Hello, this is a test. SEND +7 !username@*.edu Hello again! -Usage: NOTE SENT [NAME|COUNT] *Usage: NOTE SENT [NAME|COUNT|USERS] [RM] Displays host and time for messages which are queued without specifying any password. If no option is specified SENT displays host/time for messages sent from your nick and username. NAME displays host/time for messages sent from your username COUNT displays number of messages sent from your username * USERS Displays the number of messages in [], and names for all users * who have queued any message which matches with spec. nick/name/host. * RM means that the server removes the messages from the specified user. *Usage: NOTE SERVICE * Useful in robots. Note will take the requests as if from Usage: NOTE SPY [&] [+|-] [+|-] [msg] SPY is an alias for USER +RX (default 1 max day) SPY makes the server tell you if any matching recipient sign(s) on/off IRC or change nick name. No message needs to be specified. However, if a message is specified this is returned to sender including with the message about recipient. Message could for example be one or more Ctrl-G characters to activate the bell on senders machine. As an alternative for using C flag, field could start with any number of nicks on this format: %nick1 %nick2... %nickn, with no space between % and the nick name you use. Spy messages would be valid for any of the nicks specified. SPY with no argument would tell you what users you have spy on who are currently on IRC. The system logs last time the last matching person was on IRC for each SPY request is queued in the server. See NOTE LOG for this. You may use flag +A to see what server matching user is on, and/or +J flag to see what channel. (Read HELP NOTE USER for more). Example: SPY foobar!username@host SPY +10 foobar SPY +aj &secret * SPY +365 +e !user nick!*@* SPY % +7 foo!user SPY +5 nicky %mynick %meenick -Usage: NOTE STATS [MSM|MSW|MUM|MUW|MST|MSF|USED] *Usage: NOTE STATS [MSM|MSW|MUM|MUW|MST|MSF|USED|RESET] [value] STATS with no option displays the values of the following variables: MSM: Max number of server messages. MSW: Max number of server messages with username-wildcards. MUM: Max number of user messages. MUW: Max number of user messages with username-wildcards. MST: Max server time. MSF: Note save frequency (checks for save only when an user register) Notice that 'dynamic' mark after MSM means that if there are more messages in the server than MSM, the current number of messages are displayed instead of MSM. Only one of this variables are displayed if specified. * You can change any of the stats by specifying new value after it. * RESET sets the stats to the same values which is set when starting the * server daemon if no note file exist. Notice that this stats are saved * in same file as the other messages. Usage: NOTE USER [&] [+|-] [+|-] With USER you can queue a message in the server, and when the recipient signs on/off IRC, change nick or join any channel, note checks for valid messages. This works even if the sender is not on IRC. See HELP FLAGS for more info. Password can be up to ten characters long. You may specify password using the &, % or $ character. & is equal to to $, except working much better cause client use $ for other things... The % character works like &, except it makes the queuing silent. It makess also sense to use this without any following password. If any request queued is equal to any previous except time and maxtime, only maxtime is changed as specified. You then get "Joined" instead of "Queued". HELP FLAGS for info about flag settings. Username can be specified without @host. Do not use wildcards in username if you know what it is, even if it's possible. Max time before the server automatically remove the message from the queue, is specified with hours with a '-' character first, or days if a '+' character is specified, as -5 hours, or +10 days. Default maxtime is 7 days. Note: The received message is *directly* displayed on the screen, without the need for a read or remove request. NOTE USER &secret +WN +10 Wizible!jarlek@ifi.uio.no Howdy! is an example of a message sent only to the specified recipient if this person is an operator, and after receiving the message, the server sends a note message back to sender to inform about the delivery. NOTE USER +XR -5 Anybody is an example which makes the server to tell when Anybody signs on/off irc, change nick etc. This process repeats for 5 hours. NOTE USER +FL @*.edu *account* is an example which makes the server send a message back if any real- name of any user matches *account*. Message is sent back as note from server, or directly as a notice if sender is on IRC at this time. Usage: NOTE WAITFOR [&] [+|-] [+|-] [] WAITFOR is an alias for USER +YD (default max 1 day) Default message is [Waiting] This command is for telling the recipient if this appears on IRC that you are waiting for him/her and notice that this got that message. Example: WAITFOR foobar WAITFOR -2 foobar!username@* WAITFOR foobar Waiting for you until pm3:00.. *Usage: NOTE WALL [&] [+|-] [+|-] * * WALL is an alias for USER +BR (default max 1 day) * This command is for sending a message once to every matching user * on IRC. Be careful using this command. WALL creates a list of * persons received the message (and should not have it once more time) * with H flag set. This list can be displayed using ls +h from the * nick and username@host which the WALL request is queued from. * Removing the headers (H) before WALL request is removed would cause * the message to be sent once more to what users specified in list. * WALL +7 @*.edu Do not do this! - Makes it clear for all users using * IRC on host @*.edu the next 7 days how stupid it is to send such WALL's ;) *Usage: NOTE WALLOPS [&] [+|-] [+|-] * * WALLOPS is an alias for USER +BRW (default max 1 day) * This command is same as WALL, except only opers could receive it. ============================================================================= ircd-ircu-2.10.12.10.dfsg1/doc/history/2.7-New0000644000175000017500000001031207014163752020060 0ustar madkissmadkiss * WHOREPLY and NAMREPLY become numberics instead of strings. * msa's patches to kick/mode to attempt to follow nick name changes * spike's patches to get SUMMON to find last idle tty * melazy's various DNS improvements. * pjg's saber C check * prefix changed for all server->client messages in which the origin of the sender is a client to appear as follows: nick!user@host * TRACE output changed. * # channel topics broadcast * +-numeric channels removed from server * numerics for TRACE output 201-209 * new switches for STATS: i,k,q,y * numerics for stats output 211-219 * MODE changed to also operate on users * deoper added as both mode and direct command. deoper sends out ":user OPER -" to other servers. (from Kaizzu) * XTRA/VOICE/GRAPH removed. * MODE +a scrapped. * added custom ANSI-compatible ctype macros to ensure speed * user modes i,w,s,o implemented as follows: i - invisible. over rides any channel mode for those external to your channel. you are invisible. w - receive wallops s - receive local service notices (errors, etc) o - operator flag. (can not be set currently except using the OPER command). * MODE +b added to ban a user from a channel using "nick!user@host" as the mask to match to the user. If the user matches the ban mask they are not allowed in. MODE +b with no parameters returns the list of ban masks currently in place. MODE +b and MODE -b add/delete a ban mask respectively. Thanks to HulkHogan (andy@lingua.cltr.uq.oz.au) for defining what we needed here and the 'BlackBall' approach. * Operator passwords may now be stored in the ircd.conf file as the encrypted plaintext. Crypt(3) is used to generate the matching plaintext from the OPER command. Thanks to the following people for help with this: Sean Batt (sean@coombs.anu.edu.au), Andy. M. Jones (andy@lingua.cltr.uq.oz.au), Nelson Minar (minar@reed.edu). * Server now creates "ircd.pid" file when booted. Holds the current pid of the server. * Each O and I line in the ircd.conf file may be linked only a number of times equal to or the max. links value for the class they belong to. * Server stores results of any successful DNS lookups for servers so that future lookups are not needed. A rehash will wipe all previous lookup results and cause the server to start over. The server will attempt to lookup each hostname in a C/N line on booting. This may cause a delay during starting the server. * All functions should be of the form "function_name", macros of the form "MacroName" and constants as CONSTANT. * Services are now treated with some respect. A service is associated with an S-line in the ircd.conf. A service must send a NICK/SERVICE pair on connecting to achieve service status. * JOIN/PART now accept a list of channels in the first parameter with each separated by a ",". eg "JOIN #foo,#bar,#foobar" * A hopcount for the distance to nicknames and servers has been introduced (for better or worse). It is passed as the second parameter to both NICK and SERVER. WHO and LINKS both report the hopcount in the info field. * Default for WALL and WALLOPS set "off" * rearranged config.h * ISON now returns nicknames with the actual case, i.e. ISON wiz will answer WiZ New into 2.7.1 * STATS u, r, z u - uptime r - CPU useage stats z - counts and shows current memory useage r & z are only available if DEBUGMODE is defined in config.h * GETHOST which forces all reverse lookups of ip#'s to also match when doing a forward lookup of the hostname returned. * SENDQ_ALWAYS buffering policy for sending data over links. (Server tries to buffer as much data as possible before attempting a write). New into 2.7.2 * NOTE (once again appears and in much better state) * WHOWAS gives a list of known users of the nick in question rather than just the most recent. * Server can accept both server and client connections via a unix domain socket. This provides greater security and reliability for connections between the host and itself. (#define UNIXPORT) * STATS C reports L-lines: New Numeric 241 * #define for showing all users the invisible count from LUSERS ircd-ircu-2.10.12.10.dfsg1/doc/history/ChangeLog.100000644000175000017500000011233007606714076021104 0ustar madkissmadkiss# # ChangeLog for ircu2.10.10 # # $Id: ChangeLog.10,v 1.2 2003/01/08 03:17:18 klmitch Exp $ # # Insert new changes at beginning of the change list. # -------------------------- Released 2.10.10.pl15 * Fiddle with /KILL and various exits to make the user experience uniform, no matter who's doing the killing or where. Previously, differences in QUITs and in the messages sent to the killed client could help make a partial map of the network; now that these messages are all uniform, there is no way to tell. -Kev * Split ISUPPORT numeric into two numerics, so as not to exceed the 15 parameter limit imposed by the RFC -Kev * Turn on HEAD_IN_SAND_REMOTE...oops -Kev * Send prefixed error messages to other servers, so ERROR doesn't get interpreted as a prefix -Kev * Reverse sense of HEAD_IN_SAND_WHO_HOPCOUNT to do what was intended; use a hopcount of 0 if user is using /who on him/herself -Kev * Allow a user to see his/her own idle time without having to do /whois ; correct spelling of HEAD_IN_SAND_IDLETIME to HEAD_IN_SAND_WHOIS_IDLETIME -Kev * Fix a missing ')' in the idle time stuff -Kev * Include ircd_policy.h in whocmds.c -Kev * Fixed bug in idle time, thanks hektik -- Isomer * Update 005 to be compliant with other networks -- Isomer * Hide hop count -- Isomer * Hide idletime unless you explicitly ask for it -- Isomer * /wallops and /wallusers would dump core because of the previous change--my bad. Now only include user@host when sptr is a client. -Kev * /wallops and /wallusers would leave out the user@host--noticed because pl14 broke my script. Fixed. -Kev * Fix several compile warnings, including the one in table_gen.c -Kev * Fix a bug in m_silence.c that rendered it uncompilable -Kev * Hopefully make mode clears during bursts appear to originate from local server -Kev * Fix several things to send server<->server protocol messages with numeric origins -Kev * Rework directed notices and mass-messages to use numerics and tokens as appropriate; the latter required the modifications to sendto_match_butone() -Kev * Redefined how sendto_match_butone() works, since it's only used with PRIVMSG or NOTICE -Kev * Bumped patchlevel to pl15(development) -Kev * Corrected reverse-sense of HEAD_IN_SAND_REMOTE test in m_whois() -Kev * Clean up logic in m_whowas(), corrected numeric reply -Kev * Finally fixed /whois to tell you what your own server is -Kev * Clean up logic in add_banid() with some well-placed DupString()'s -Kev * Hide which server performed a nick collision kill -- Isomer * To allow for remote whois not giving away the remote server, all remote numerics to clients are remapped to come from the local server :/ -- Isomer * All remote queries are disabled for users, except /whois -- Isomer (/whois now uses the second parameter for which server to use, ie: /whois will query 's server.) * Fixed /who showing server name -- Isomer * Fixed burst showing linking server -- Isomer * Fixed burst bans showing linked server -- Isomer * Fixed /whowas showing server name -- Isomer -------------------------- Released 2.10.10.pl14 (You got any issues with that punk?) * Changed (then fixed) /LINKS to output an empty links list -- Isomer * Make netsplit server notice say the right thing * Final fix for HEAD_IN_SAND_WHOIS_SERVERNAME * Fix a bug with implementation of HEAD_IN_SAND_NETSPLIT * Permit users to find out what server they're on, since they already know -- Kev * Added HEAD_IN_SAND_WHO_SERVERNAME to cover final source of server names -- Kev * Fixed wallops, wallusers now sends wallops to local clients, wallusers to servers. * Added host to /kill messages -- Isomer * Fixed whois (opers can see server names) -- Isomer * Implement walluser -- Bleep * stats fixed -- Isomer * trace disabled from non opers -- Isomer * server name removed from whois (but not /who, shrug!) -- Isomer * netsplits are now represented with "*.net *.split" -- Isomer * Done /links -- Isomer * Modifications to map as suggested by nighty -- Isomer * Wallops is the only code that uses sendto_ops_butone now, this isolates wallops entirely. No server notices sent by wallops. * HEAD_IN_SAND_SNOTICES done -- Bleep * HEAD_IN_SAND_WALLOPS done -- Bleep * HEAD_IN_SAND_DESYNC done -- Bleep * HEAD_IN_SAND_MAP done -- Isomer * According to CFV-165, buring our head in the sand to try and * hide from DoS - First pass -- Isomer * As requested by hop: hidden keys are shown as "*" not "" -- Isomer * As requested by Buff: allow admins to *disable* below behavour -- Isomer * As requested by Adriel, compile time option to disable mo_wallops -- Isomer -------------------------- Released 2.10.10.pl13 * Don't allow two copies of the server to start -- Isomer/Kev -------------------------- Released 2.10.10.pl12 * Release 2.10.10.pl12 before Mr_RIP threatens physical violence -- Isomer * Don't 'hubhide' nick's in /trace (oops!) -- Isomer * Allow K:line by realname, updated client connection logging -- Gte- * ircd/m_join.c: use ERR_BANNEDFROMCHAN instead of ERR_BADCHANNAME -- Kev --------------------------- Released 2.10.10.pl11.(release) * Fixed G-lined (reason), thanks to dfx -- Isomer * Added reason to the "G-lined (reason)" quit messages. -- Isomer * Removed 'for nick[1.2.3.4]' from quit messages, they're redundant and make hub hiding more reliable --Isomer * ircd/s_user.c (hunt_server): add 'No such server' message back --Isomer * ircd/s_bsd.c: remove ALWAYSFLUSH - the problem wasn't ircu's fault -- Isomer * ircd/m_names.c (m_names): don't add a space if the user's a zombie; fixes an overrun where we generate a huge number of spaces in the names reply without length-checking them properly -- Kev * added 'ALWAYSFLUSH', if you thought the furgeson flusher was bad... --Isomer * Fixed /USERHOST again. Horribly embarrased. Thanks again Liandrin --Isomer * Added extra field to /stats Y showing how many people are in that class. Information was previously available via /trace, however tended to flood you off if you weren't on a good connection. Requested by Mr_RIP -- Isomer * Fixed 'BADCHAN' resetting itself to 'Y', reported by Gator --Isomer --------------------------- Released 2.10.10.pl10 * Released 2.10.10.pl10 * Backported /names optimisation from 2.10.11. '/names 0' now returns verbose listing, '/names' simply returns ENDOFNAMES. Disallow harmfull /names usage. --Gte * Fixed ERR_NOSUCHNICK bug in userhost, thanks to Liandrin --Isomer * Conceal more bugs in IPcheck --Isomer * Add 'POST' as a unregistered command to disconnect people abusing web proxies --Isomer. * Conceal bugs in IPcheck --Isomer * Fix for changing the wrong define --Isomer * Fix for the easter buggy. --Isomer * Fix for rpong --Run * Fix for other IPcheck bug, thanks BLMet. --Bleep * Fix for IPcheck bug, rewrite IPcheck from scratch (mostly), add changes for new code to s_user.c, ircd.c --Bleep * Shorten connection timeout for auth queries to 60 seconds If connection is from localhost use the server alias for the client host. --Bleep * Fix for ident bug --Isomer * Fix for rping/rpong --Gte * Add m_pong to parser handler --Bleep * Fix for EXTENDED_NUMERICS bug doh!!! --Bleep * Fix for Max Undernet Server bug --Bleep * Fix for PRIVMSG<->NOTICE translation from hubs --Bleep * Fix for Bogus protocol strings for P9 servers --Bleep * Hookup UPING code again, cleanups --Bleep * Convert numerics back to mask and shift extended numerics follow same mechanism --Bleep * Fixed bogus errno return on Solaris --Bleep * Fixed core on RPING bug, tokenized RPING --Bleep * Remove add_local_domain entirely, unused --Bleep * Merge u2_10_10_beta06 create branch u2_10_10_beta07 --Bleep * Remove size_t from socket calls, audit usage of size_t values. --Bleep * Fix for OSF1, RES_NOALIASES not defined there. --Bleep * Don't bother doing hostname lookup or setting me.sockhost since we never want to display it there is really no reason to have the info. --Bleep * Bugfix broken N:line check in chkconf --Maniac * Bugfix, fix clients occasionally getting stuck in IPcheck code. Add note to members in client struct that aren't used for any remote client code, didn't want to actually move them this close to release (paranoia) --Bleep * A few little cleanups in check_pings, removed yet another address display. --Bleep * Bugfix, autoconnects displaying server IP address to opers. --Bleep * Remove names from /stats p, since its always the server name from the M:line anyhow, (redundant information) --Bleep * Unborked throttling. --Bleep * Fix two stupid bugs, related to IP mismatch kills. --Bleep * Clean up configuration, make it a bit easier for admins to turn off asserts and heap checking code. Moved host name dns query for listener virtual host ports to dead code and use me.name for the listener name (no sense in looking up the name if we don't want to display it). Change direct bump of unknowns in s_bsd.c to Count_newunknowns(UserStats) for consistency. --Bleep * Added option to kill any connecting client with a forward and reverse DNS mismatch. Fixed bug in s_auth that that caused incorrect counts for unknown clients. Replaced missing server notice for SNO_IPMISMATCH. --Bleep * Added a few more little name tweaks, no sense in looking up the hostname in the conf if no one knows it. --Bleep * Moved to beta archive, bumped patchlevel, fixed message for lost C:line in s_conf.c (I don't think I've ever seen this happen) --Bleep * Finished host hiding changes, it should not be possible for any online user to discover the real hostname or IP address of any connected or unconnected server listed in the configuration. This applies to opers and regular users. The name in the M:line is the name used for connecting and all informational messages. --Bleep * Removed code in dbuf.c that flushes the dbufs if the server runs out it looks like a fully loaded server may not be able to handle a net break without shedding a few clients. --Bleep * Finish IP address cleanup, alpha should be clean for not displaying server hosts or IP addresses to users now. This needs to be verified. Changed version to u2.10.10 per Isomers suggestion. --Bleep * Remove server IP address from info line for connecting servers. This almost completes the IP address hiding changes for alpha, there are still a few stats commands available to users that will show the server addresses, but they can be easily disabled or only show '*'s to non-opers. --Bleep * Fix possible (but not likely) memory leak in debug allocator, couldn't find the "meg a minute" problem, using the debug allocator on the production network with more than 1000 clients on a server may cause problems if you don't have a lot of memory. (This does not seem to be a problem with non-debug builds) --Bleep * Captialisation fixes, just to keep certain ppl quiet. --Isomer * Removed +s channels from /list. They were shown sometimes, but not others, and the information that was shown about them was inconsistant. list is not an effective way to gain information anyway. Reformatted and touched up readme.who as well. --Isomer * Added MAP to ISUPPORT, added doc/features.txt --Isomer * Added suggestions made by scripters. more info for ISUPPORT, and added stuff to 'TODO' --Isomer * More TODO items 'done'. P:'s now ignore '*'s. ping shouldn't do funky stuff with mirc anymore, needs discussion --Isomer * Typo fixed. Now I'm annoyed. --Isomer * Right, Makefile's gonna work now or I'm going to get REALLY annoyed at it. --Isomer * TODO, m_ping, ircd/Makefile.in: Added note to TODO, added info to m_ping, and fixed Makefile bug using bsdmake. --Isomer * s_bsd.c, listener.c, s_user.c, s_serv.c, s_bsd.h: Set receive and send buffers in correct order to enable flow control for clients and support fat pipes better for servers. Finally got it right :) See Stevens "Unix Network Programming" v1 p 191-193 --Bleep * ircd.c (main): added idiot checking to make sure MAXCONNECTIONS is sane. --Bleep * send.c: Don't let negative fd's break stuff, audit sentalong usage for sillyness. --Bleep * send.c (sendto_common_channels): bug fix, code assumed client local, file descriptor is only in local client struct --Bleep * table_gen.c, channel.c: make FIXME changes, removed FIXME code from table_gen, readd FIXME code to channel.c, I hope I got this right. --Bleep * Makefile.in: Add purify def, fix so CFLAGS don't error off when using Solaris compiler --Bleep * fda.c (fda_free): fix compile error on Solaris --Bleep * configure.in: add SunOS case to detect Solaris --Bleep * os_solaris.c (os_send_nonb): fix solaris compile error --Bleep * exaconf.2: add file from conf design to docs directory to have it available for new conf parser development --Bleep * fda.c (fda_free): fix memory leak, doh!!! --Bleep * hash.c (addNickJupes): fix buffer overrun --Bleep * s_bsd.c (read_message(poll)): fix uninitialized memory read bogosity in poll macros. --Bleep * channel.c (send_user_modes): change to send XXX:ov instead of XXX:o:v doesn't send XXX: if no modes set. --Bleep * s_bsd.c (connect_server): bugfix for connect/rehash/connect multiple outstanding dns query core. --Bleep * channel.c (send_user_modes): bugfix for burst not sending modes when burst line is created. --Gte * m_gline.c: change NumServ(cptr) to NumServ(sptr) found by Gte --Bleep * config-sh.in: add WildThangs BADCHAN config fix --Bleep * config-sh.in: add Runs restart bugfix --Bleep * Makefile.in: make sure version.c gets regenerated when checksums change --Bleep * Makefile.in: remove hash.c/crypt/sums idiocy, all of the ridiculous anti-hack stuff is already done in version.c anyhow. "Shhh..., don't tell the admins ( .)( .) you're being watched" --Bleep * hash.c (m_hash): fix count bugs --Bleep * m_squit.c (mo_squit): fix off by one, /quote SQUIT bug --Bleep * ircd_relay.c: oops, changed the wrong one. Fixed previous fix. --Isomer * Makefile.in, ircd_relay.c: Fixed 'make depend', added dependancies, fixed bug where server would core on sending a server notice --Isomer * m_kick.c (ms_kick): fix core on kick message coming from server --Bleep * config.in: remove CRYPT_LINK_PASSWORD option --Bleep * doc/readme.www: Applied Runs' doc patch --Bleep * client.h: Add member to client struct to try to aggravate the bug found by Jesus --Bleep * client.h: Remove IsListening macros and flags, add FLAGS_UPUNG and IsUPing/GetUPing/SetUPing macros --Bleep * m_silence.c, m_create.c: check for IsServer(sptr) don't allow X SILENCE X +*@*.com or X C #blah 947477407 core the server. --Bleep * os_*.c, res.c: clean interface for os_recvfrom_nonb --Bleep * uping.c, uping.h: new files for UDP pings, these aren't hooked up yet, or finished or tested. --Bleep * channel.c: find_member_link(): Fail fast for Servers, prevents core when servers set a channel mode. --Isomer * channel.c, channel.h, various.c: Changed find_member_link() to take a chptr instead of the first member, and special case'd +k users (see comment in code for more details) --Isomer * ircd/Makefile.in: Changed gnu specific $^ for $< in table_gen rules --Bleep * INSTALL: Explained about CVS --Isomer * example.conf: Point to coder-com@ for help configuring the server. --Isomer * INSTALL: Make things a bit more plain. --Isomer * s_bsd.c (read_message (poll)): removed local_cptr array using this temp made possible a bug where if a client lower in the list managed to exit a client higher in the list, a dangling reference to the already exited client would be left in the local_cptr array. Found by Quantum by loading 100's of clones with the same nick. --Bleep * INSTALL: Added instructions for -lcrypt FAQ --Isomer * INSTALL: Added instructions for -lresolv FAQ --Isomer * INSTALL: Added instructions for making ./configure executable --Isomer * numeric.h: Merged in some more numerics that other ircds user --Isomer * IPcheck.c: Fix gramatical error to keep pedants happy. --Isomer * IPcheck.c: Allow -DNOTHROTTLE for debugging purposes. --Isomer * m_stats.c: make stats c available to opers only, TEMP_HACK --Bleep * IPcheck.c: Fixed outdated comment. Thanks Quantum --Isomer * ircd_reply.c: Fix the fix, silly typo. thanks Bleep --Isomer * ircd_reply.c: added check for people without nicks. --Isomer * doc/Authors, ircd/version.c.SH: updated /info and maintainer lists. --Isomer * channel.h, channel.c, m_join.c, m_mode.c: add David M's lchanmode patch update --Bleep * s_auth.c: fix ident bug, comment code for rule. --Bleep * m_invite.c (m_invite): Fix syntax error, missing ')'. -- Isomer. * m_invite.c (m_invite): tokenize invites, change from accidental broadcast to directed message (bug fix). --Bleep * m_time.c (m_time): send tokenized time messages --Bleep * s_user.c (set_user_mode): Send wallops to everyone by default allow compile option WALLOPS_OPER_ONLY for networks that want to disable wallops for users. --Bleep * s_misc.c (exit_one_client): tokenize client quit message to other servers. --Gte * m_kick.c: you would have thought I'd fix all of them the first time, but no... -- Isomer * m_kick.c: Fixed missing space after TOK_KICK -- Isomer * m_burst.c: Fixed netrider kick bugs -- Isomer * s_user.c: Bug fix --Bleep * s_user.c: only send wallops to opers --Bleep * s_user.c: enforced undernet policy. -- Isomer * s_user.c: replace user_modes with struct UserMode array change code to use new struct. --Bleep * s_user.c (set_user_mode): clean up switch statement --Bleep * channel.c (set_mode): fixed -k foo bug, extra == 0 typo in conditional. --Bleep * dbuf.c (dbuf_alloc): fixed count bug, we _have_ to count it in the branches. --Bleep * dbuf.c, send.c, s_bsd.c, send.h: bahh finally did it right, if a dbuf allocation fails, attempt to flush all send buffers except for the one we are trying to build (we're twiddling with the list etc..) if the allocation fails a second time, _then_ bail. --Bleep * s_bsd.c, send.c: if dbuf_put fails for send or receive buffers, call flush connections to free up some buffers (safe here). --Bleep * dbuf.c (dbuf_put): back out previous change, afaict it would fail spectacularly --Bleep * dbuf.c (dbuf_put): call flush_connections(0) if we can't allocate a dbuf the first time, this may prevent the server from dropping connections during netbursts. --Bleep * m_privmsg.c: fix IDLE_ON_MSG fix -- Isomer * m_privmsg.c, parse.c: fix IDLE_ON_MSG bug --Bleep * m_ison.c (m_ison): Temp hack to fix missing null terminator. --Bleep * m_nick.c (m_nick): fix null nick reply bug --Bleep * ircd_string.c, match.c: fix a couple possible issues with the character attribute changes --Bleep * s_auth.c, ircd.c: turn off connection status messages for connections to server ports. --Bleep * ircd.c, s_conf.c, m_server.c, ircd.h, s_conf.h: removed portnum and server_port global variables, server port in M:lines is ignored, server ports now need to be defined in the P:lines. Add SERVER_PORT config option to allow: '/connect server.net.dom' without specifying the port. --Bleep * config-sh.in: change PORTNUM to SERVER_PORT now used for default server port for outgoing connections in m_connect. --Bleep * example.conf: document changes to M:line for server port --Bleep * ircd_chattr.h, ircd_string.h, ircd_string.c, table_gen.c: put Nemesi's table generation code and macros back in, the tables are now automagically generated whenever the table_gen.c file is modified, use a slightly different mechanism to get the tables in the executable. Add reference data file to test dir for character attributes. --Bleep * s_auth.c (check_ident_reply): add function that implements auth reply undernet rules checking. --Bleep * s_misc.c (date): added Runs Y2K patch --Bleep * m_privmsg.c: work on server handlers, hookup new code to parser, test, fixed a couple bugs, fixed username bug in server NICK processing --Bleep * ircd_chattr.c, m_privmsg.c: Work on privmsg code a bit more, commit for review, still a bit more to do --Bleep * os_bsd.c, configure.in: add os dependency file for bsd --Bleep * m_privmsg.c, ircd_string.c: little cleanups for privmsg work on prototype handler for new parser. --Bleep * m_connect.c, s_conf.c: clean up /connect handling code --Bleep * m_away.c, m_admin.c, m_close.c, m_connect.c: start cleaning up handlers --Bleep * whocmds.c, whowas.c, *.c: split out handlers from whocmds.c and whowas.c --Bleep * s_serv.c, m_*.c: split out handlers from s_serv.c --Bleep * querycmds.c, m_*.c: split out handlers from querycmds.c --Bleep * opercmds.c, m_stats.c, m_connect.c, parse.c, handlers.h, *.c add new command handlers --Bleep * channel.c, m_names.c: new file for names handler --Bleep * channel.c, m_list.c: new file for list handler --Bleep * channel.c, m_topic.c: new file for topic handler --Bleep * channel.c, m_burst.c: new file for burst handler --Bleep * channel.c, m_create.c: new file for create handler --Bleep * channel.c, m_destroy.c: new file for destroy handler --Bleep * channel.c, send.c, m_join.c: new file for join handler, const fixups for send.c --Bleep * channel.c, m_mode.c: new file for mode command handler, clean up file scope buffer mess. --Bleep * m_silence.c: split out SILENCE handler to a new file, cleanup --Bleep * m_ison.c: split out ISON handler to a new file, cleanup --Bleep * m_userip.c: split out to new file, change userhost and userip to use same algorithm with different formatting functions --Bleep * m_userhost.c: split out to new file --Bleep * send.c: add new function send_buffer, cleanup godemode ick a bit --Bleep * m_wallchops.c: split out wallchops handler --Bleep * m_cprivmsg.c: split out m_cprivmsg and m_cnotice. * m_pass.c, s_user.c: split out m_pass, pass message handler --Bleep * m_oper.c: split out m_oper.c from s_user.c, setup to use new parser. --Bleep * m_pong.c, m_ping.c, parse.c, s_user.c, channel.c: Add new file for pong messages, convert ping and pong to use numerics. Test pings and pongs on testnet. Fix numeric nick bug in channel.c. --Bleep * m_ping.c, s_serv.c, parse.c: new file for pings, fixed a minor bug in ping handling. --Bleep * m_nick.c, m_kill.c: clean up nick code for servers, still needs work fix string formatting bug in m_kill --Bleep * m_nick.c, s_user.c, ircd_chattr.c: add new file for NICK command, clean up local client registration for nicks. --Bleep * m_away.c, s_user.c, parse.c: split out m_away handlers for client, add user_set_away function. --Bleep * m_kill.c, ircd_reply: Rework handling of kill from server, add new error message formatter. --Bleep * m_kill.c (mo_kill): Rework handling for kill from operator on server kill originated from --Bleep * m_kill.c: new message handler file for kill --Bleep * configure.in, ircd/Makefile.in: added automatic os checking to autoconf checked --Gte * m_quit.c: new message handler file for quit --Bleep * m_privmsg.c: new message handler file for privmsg --Bleep * ircd_string.c, support.c, support.h, *.c: moved strtoken to ircd_string and renamed ircd_strtok --Bleep * channel.c, s_user.c, s_debug.c, send.c, channel.h: finish membership code --Bleep * channel.c, more cleanups of membership code and macros --Bleep * channel.c, s_misc.c: more cleanup in channel link code, most likely still a bit broken yet, more to come. --Bleep * querycmds.h (Count_remoteclientquits): fix minor bug --Bleep * ircd.h, querycmds.h, struct.h, channel.c, list.c, map.c, opercmds.c, s_err.c, s_serv.c, s_user.c, s_misc.c: Add Isomers passivelag0-1.patch fixed minor bug in macros --Bleep * channel.h, channel.c, s_user.c, s_debug.c, s_user.c: added Membership struct for channel associations, change user/channel lookups to use new struct. --Bleep * channel.c, channel.h, s_user.c: cleanup channel and user code a bit, new function find_no_nickchange_channel --Bleep * parse.c, m_defaults.c: added default handlers and hooked up new message handlers --Bleep * *.c, struct.h: added Isomer's passivelag patch and, the second p10 patch --Bleep * ircd_reply.[ch]: new files for commonly used replies --Bleep * m_proto.[ch]: new file for protocol command support, needed for zip links --Bleep * client.h, parse.c, msg.h: add code to support multiple message handlers depending on client status. --Bleep * s_bsd.c, packet.c: code cleanup prep for zip links --Bleep * channel.c, opercmds.c, ircd.c, s_serv.c, s_user.c, querycmds.c, whocmds.c, whowas.c: Add Isomers p10ify patch, tokenize server to server commands --Bleep * s_user.c (m_nick): killed goto --Bleep * client.h, *.c: moved client stuff to client.h --Bleep * version.c.SH, patchlevel.h, .patches: change version string generation, patch level is now set in patchlevel.h by simply bumping the number in the PATCHLEVEL string. --Bleep * ircd_alloc.c, channel.c: fixup warnings in release build (NDEBUG) --Bleep * fda.h, ircd_alloc.h, fda.c, ircd_alloc.c, fda_t.c: new files, runmalloc was core dumping on squits and unable to handle or detect double frees, the memory debug code can be disabled by compiling with NDEBUG defined --Bleep * channel.c (remove_user_from_channel): refactor function --Bleep * channel.c (m_kick): refactor function a bit, put all checks at top move code out to new function (make_zombie) --Bleep * s_bsd.c (completed_connection): fixed stupid "Write error to blah: Socket not connected" bug --Bleep * struct.h, send.h, send.c, s_bsd.c, IPcheck.c, s_user.c, *: More socket code cleanup, move file descriptor to local part of client struct, use cptr->error to handle the errno of any socket error, fix bug in IPcheck that ends up only disallowing every 256th clone, Add more ipcheck forgiveness to s_user.c (needs work). Changed IPcheck_local_connect and IPcheck_connect_fail interfaces to use struct in_addrs instead of client structs to allow delaying the allocation of the client struct till after the check was done. Added can_send function to send.c (should be called before work is done but right now it's called just before trying to send (needs work)) * channel.c: Added Isomers netride2.patch, still needs a config option to turn it on (NO_INVITE_NETRIDE) --Bleep * parse.c, msg.h: Added silent ignores for notices so connect progress messages do not cause connecting server to spew ERR_REGISTER_FIRST messages at the server it's connecting to. --Bleep * s_serv.c, s_user.c, channel.c, send.c: Tokenised BURST, NICK, END_OF_BURST, EOB_ACK, PRIVMSG and NOTICE Server to Server. About 8-10% Bandwidth saving on BURSTS. --Gte * channel.c (m_join): servjoin patch --Isomer * ircd_osdep.h, os_*.c, s_bsd.c, send.c: more cleanups in socket code, use enumeration for IO results. --Bleep * s_bsd.c: clean up select and poll code a bit more, fixed message pacing bug in poll. --Bleep * supported.h, numeric.h, s_user.c, s_err.c: Added Isomers features patch. Use numeric 005 RPL_ISSUPPORT to convey server features to clients. --Bleep * s_user.c (m_nick): IP differ patch, use IP address instead of host name to determine different user@host for nick collides. --Isomer * hash.c (hChangeClient): Bug fix. Fixed bug that caused stale entries to be left in client hash table after a name change. Discovered by Quant and Isomer. --Bleep * hash.c (hSeekClient): fixed bug I introduced when reversing my hash table code changes, thanks Quant and Isomer --Bleep * opercmds.c (m_lusers): send limited luser info to remote clients --Isomer * numeric.h, channel.c, s_err.c: Changed invite list numerics from 283/284 to 346/347 to match IRCnet numerics --Bleep * config-sh.in, gline.h, numeric.h, gline.c, opercmds.c, s_debug.c, s_err.c: Add badchan patch by WildThang --Bleep * config-sh.in, channel.h, numeric.h, channel.c, s_debug.c, s_err.c: Add lchanmode patch by David M --Bleep * channel.c (cancel_mode): removed incorrect assert --Bleep * *.c: removed P9 support, not everything is completely gone but most of it is, the server builds and connects to other servers, but thats as far as it's been tested so far. --Bleep * ircd.h, ircd.c, s_bsd.c: removed BOOT_INETD/BOOT_CONSOLE code, unused non-functional --Bleep * struct.h, ircd.h, ircd.c, s_user.c, s_bsd.c: removed BOOT_OPER/STAT_MASTER code, original patch by Isomer --Bleep * s_user.c (m_nick): removed redundant check for acptr * hash.c (hSeekClient, hSeekChannel): roll back some of hash.c changes * hash.c (hSeekClient, hSeekChannel): removed unused variable from previous changes. * hash.c (hSeekClient, hSeekChannel): fix compile error from status changes, fix logic bug that caused the first client that matched the mask to be returned regardless of whether or not it's name matched, this can result in wierd problems where the wrong server/client could be returned from the hash table lookup. Removed code that moved client to head of hash table chain for it's bucket when it's looked up, if the hash table is working reasonably well this just wastes cpu. * hash.c, list.c: added code to zero out cptr->hnext when client removed from hash table, added assert for hnext == 0 in list.c to make sure that client was actually removed from the hash table before freeing it's memory. * various: misc cleanups * support.c: removed dead code * configure.in: remove unneeded checks for minix, aix, ansi/posix headers these things are handled by porting layer code. * res.c: remove calls to add_local_domain, these were causing incorrect behavior * opercmds.c: cleanups in gline code * s_bsd.c: increase socket buffers to 65535 for server connections * crypt/mkpasswd.c: mutter correct runes to get file to compile without warnings * gline.c, gline.h: add new files to attempt to encapsulate glines a bit, some code from opercmds.c needs to be moved here still * opercmds.c (m_gline): fix local gline bug * s_conf.c (initconf): add password change on rehash fix * s_conf.c (rehash): fix rehash freeing and reloading the motd/rmotd files for every client connected. * ircd_log.c: use 2K fixed buffer instead of vsnprintf, nothing we write to the log should ever exceed 512 bytes, but it doesn't hurt to be paranoid. * res.c: change resolver timeouts to 5 seconds, per RFC1123 * channel.c: more little cleanups, no code changes * channel.c: a) stops iterating over /invite list b) adds /invite to list the channels you're currently invited to. c) adds lotsa new numerics --Isomer * ircd_signal.c, ircd.c: fix bug in signals * channel.c (can_send) add Isomer's changes * channel.c: add send_ban_list, cleanup a few names, reformat some parts to make more readable, fix bug introduced by name changes * ircd_chattr.[ch]: add new macro for checking K:line time chars vs comments * listener.c (show_ports): add code to show client/server and hidden status * s_conf.c: bug fixes, cleanups, add code to set server port and hidden status for listeners (P:lines) * s_conf.c (initconf): add interface selection code to P:lines so ports can be set on a single interface or multiple interfaces (multi-homed hosts) * s_conf.c: rewrote C/N line code, removed N:lines entirely, clean up server conf line code. * s_conf.c (check_server): move ip checks out of resolved or not so they can be checked for worse case situations on server connects * res.c (resolver_read): add Isomer's debug info for failed resolver queries * opercmds.c (m_stats): remove call to time(0) for each local client in stats l command, use CurrentTime instead * s_conf.c (initconf): only do lookups on C:lines instead of both C/N lines * res.c: fix resolver hang bugs * s_conf.c (rehash): remove extra semicolin that was causing c/n lines to accumulate * s_conf.c (rehash): add portnum back to the listener list so we don't loose the server port on a rehash * s_auth.c, listener.c: remove warnings for normal errors * s_auth.c, listener.c: use osdep non-blocking calls instead of locals * s_auth.c, listener.c: add code for non-blocking recovery for listeners and auth queries * s_auth.c (auth_error): call IPcheck_connect_fail if the client socket dies during the auth check so the reference count doesn't get borked in the IPcheck code. * numnicks.c: yet another extended numerics bug fix... sheesh * s_bsd.c, s_conf.c: move conf line code from s_bsd.c to s_conf.c, cleanup cleanup check_server, check_client (still not completely tested, may be a bit buggy yet). * parse.h, parse.c, s_debug.c: remove privmsg logging code * numnicks.c (FindXNServer): fix off by one bug * common.h, common.c: removed unused files * s_bsd.c (net_connect_completed): new function, called after connection establishment for servers and clients, release reference count for the dns reply and set the socket buffer size to IRCD_READBUF_SIZE for servers and 2K for clients. * channel.c, crule.c: cleanup bogus casts * listener.h (add_listener): fix bug that caused server a server port listener to think it was a client port listener. * s_user.c, s_serv.c: release reference to dns_reply when connection is established. * s_bsd.c (completed_connection): removed call to start_auth for connects the auth module expects connections not to be linked anywhere and owns the client struct until it's done. * listener.c (release_listener): fix inverted assert client exit bug * ircd_chattr.c: fix signed/unsigned warnings with Sun Workshop (+w) * ircd_chattr.c, ircd_chattr.h: new files for character attributes and case translation, hopefully they will be a bit easier to maintain. * s_conf.c (rehash): fixed logic bug that caused and infinite loop, fix port update bug (needed to call mark_listeners_closing before initconf) * *.c, runmalloc.[ch]: change the way the server deals with out of memory conditions. On server startup a no-memory handler is installed which calls server_restart if an allocation fails. Allocations are now checked in the memory allocation functions. Added asserts after every allocation to verify for debug. * *.c *.h: move authentication and dns to authentication module rename a few globals, const correctness fixes, add ircd_string code, rework network code, use dns callbacks, removed a lot of redundant code * s_bsd.c: finish this stage of net code work * *.c, *.h: rewrite select and poll code, add listener.[ch] net.code overhaul in progress, prepare for adding auth module * s_bsd.h, struct.h: moved client struct macros back into struct.h for now, the last place they belonged was in the network code... feh * ircd.c (open_debugfile): removed client for debug file * ircd_string.h, ircd_string.c: new files for string processing, add ircd_strncpy function * *.c, *.h: rename ircstp to ServerStats * *.c, *.h: rename now to CurrentTime * listener.h, listener.c: new files for listener ports * include/ircd_defs.h: new file for global definitions (HOSTLEN, USERLEN) * struct.h: add local_flag to client struct, to make local/remote detection simpler * s_bsd.c (read_message): split out separate versions for select and poll * s_bsd.h, various source files: remove the rest of the unix domain socket support this removes a number of comparisons that were unneeded in code that should run reasonably fast. * os_*.c, res.c, ircd_osdep.h: add os_recvfrom_nonb for resolver * os_*.c, s_bsd.c, s_auth.c, ircd_osdep.h: add os_get_sockname, os_get_peername * bsd.h, bsd.c: merge into s_bsd * ircd_osdep.h, os_generic.c, os_linux.c, ircd_osdep.h: move os variable stuff to separate compilation units, os generic contains the original code (start here). * s_bsd.c, send.c, struct.h: remove pyr (pyramid) finally * res.h, res.c, s_misc.c: cleanup headers/dependencies in res.h * match.h: include sys/types.h before netinet/in.h, broken BSD system headers * ircd/Makefile.in: remove CFLAGS from link line, use LDFLAGS instead * ircd.c: add missing include for sys/socket.h * common.h (strChattr, strCasediff): remove pointless non-portable inline decls. The functions are complex enough that inlining just bloats the code * ircd_xopen.h, ircd_xopen.c, s_user.c, s_serv.c: porting layer for crypt and other xopen library calls, moved crypt to ircd_xopen. * s_uping.c, s_uping.h, s_bsd.c, s_misc.c, s_bsd.h, ircd.c, s_debug.c: Removed s_ping. There are much better tools available that actually work correctly. The s_ping code was a waste of resources, and has historically given incorrect results (it never worked correctly). * ircd/s_bsd.c, res.c, s_user.c, s_serv.c: little fixups to allow code to build on Solaris, still have some warnings there. TODO: wrap crypt and things that depend on _XOPEN_SOURCE in their own file so it doesn't bother the network code. * ircd/s_bsd.c: cast option arg to const char* for setsockopt (solaris) * ircd/Makefile.in: removed hard coded dependencies for hash.o chkconfig.o, let the automatic stuff take care of it, it does it better than humans. * *.c *.h: remove register keywords, attribute macro junk, cleanup dependencies, rename MIN and MAX to IRCD_MIN IRCD_MAX all headers in C files are sorted, removed as many duplicate includes as I could find (dozens) general cleanups. Mutter the correct runes to get the protoype for crypt included where it was needed. * *.c *.h: dependency cleanups up to querycmds.c * ircd.c, bsd.c, s_bsd.c: move signal handling code to ircd_signal.c * ircd_signal.c, ircd_signal.h: new files, use only POSIX signals remove support for unreliable signals. * *.h *.c: include guards, dependency cleanups * Configure.in, setup-sh.in: include guards, config.h includes setup.h add config dir to include path * sys.h: include guards, remove hard coded path to config.h * s_user.c (hunt_server): fix logic bug * numnicks.c (SetServerYXX): fix off by one error * multiple files (n2k patch): add code to handle extended numerics ircd-ircu-2.10.12.10.dfsg1/doc/history/README-2.60000644000175000017500000000601007014163752020263 0ustar madkissmadkiss/************************************************************************ * IRC - Internet Relay Chat, README * Copyright (C) 1990 * * For the list of authors and their e-mail addresses, see * file doc/AUTHORS * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 1, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ To install the new server, there is just a few changes to be made. * General Comments Tue Nov 13 12:43:46 1990 Armin Gruner (APOLLO: Be sure to have NEED_INET_NETOF, NEED_INET_ADDR and NEED_INET_NTOA undefined.) Mon Nov 26 20:10:37 1990 Armin Gruner Comment: I just found that compiling on our SUN SPARC with GCC produces code that dumps core.. (that might not happen on your machine, try it, we may have out-of-date libraries). See netnews gnu.gcc.bug for a dis- cussion about the matter. It seems that gcc passes struct's in a different manner. * Server configuration Edit the include/config.h to your hearts content, avoiding going beyond the warning line, unless you are *absolute* sure you know what you are doing. If you happen to not take to this warning, you may end up with a server that will not function properly and annoy not only you, but users all around the world. Old irc client can be found in this package and if you want to use it, check Makefile in directory irc before compiling. There are other, better irc clients in distribution and the client distributed with this version is simply something to begin with if you don't happen to have other clients available. This version was brought to you by jto@tolsun.oulu.fi and send any bug fixes and suggestions to me. NOTE: This server does *NOT* have MAIL system installed by default. The reason is that it doesn't work with many systems. This version introduces you string channels, starting with a plus (+) sign. The first person joining a string channel claims it's ownership and after that is entitiled to use /mode command. Ownerships can be given and taken away with /mode +o and /mode -o Other flags are: s - secret, p - private, l - limited, i - inviteonly. m - moderated, n - no private messages to channel, t - topic settable by operator only New command /KICK kicks a user off channel. --Jarkko (jto@oulu.fi) ircd-ircu-2.10.12.10.dfsg1/doc/history/overview.u2.90000644000175000017500000001746507014163752021405 0ustar madkissmadkissHi fellow undernetters, I forgot if it was requested on routing-com or here, but you won't see me cross posting, so I did choose 'wastelanders'. The request was to mail an overview of the changes 2.8 ==> u2.9, especially for the new Opers, but also as a reminder for others. The patch file from irc2.8.21.mu3.1 to ircu2.9.17.mu is 446652 bytes. So you will understand I can't cover every little change. New commands ------------ /UPING [] [] [] Sends (default 5, max 20) size 1024 bytes, from (remote) server (default local server) to . The default port is 7007 and the same on all servers. If a server is down, you can still use port 7 (echo). Also 2.8 echo's, on port PORTNUM (config.h). UPING uses udp, you need CN lines (masks as server names are allowed) but the connection doesn't have to exist already. /RPING [] [] Sends one 'RPING' message using the irc protocol over an existing link. It allows to measure the lag of remote links, respons is in ms accuracy. The can be used to measure to total pingtime to your client (like the CTCP PING) or to add a serial number for automation. /MAP [server.mask] Shows a map in the layout as Router. /SETTIME Only for debugging, isn't needed. (Oper only). Changed commands ---------------- /CONNECT No doubt the biggest impact of 2.9 is on connecting: When the link is physically possible, your /connect ALWAYS succeeds except when an H: or L: line somewhere on the net forbids it, or when *after* your connect another connect is done that cause a loop. The only restriction is that you are not allowed to make deliberately a loop: you must first squit. Loops only happen when to connects are done simultaneously and the SERVER messages had not yet time to propagate over the whole net. When a connect (manual or automatically) is done for a link that used to get "server exists", with 2.9 the Ghost is squitted off the net, making it possible to recover faster from breaks caused by bad links. If on the other hand a loop occurs because two parts connect at two points, the servers that detect the server nick collision will squit the most logical link to break the loop, and only one link. This results thus in a connected net one way or the other (for this all 2.8 servers need to be off the net! Till that time the net will connect and then break at two places, giving more messages then right now with only 2.8). 2.9 servers also notify the Opers (or users with +s) about net.junctions and net.breaks. It does this even better then Router: A lot faster, always correct (REAL junctions), and independent of Router: You will also see them when Router is 'on the other side'. /TIME Has changed. Now also shows the system clock / TimeStamp clock offset. /MODE +b You only have to be joined, not be chan op anymore. /MODE +d Makes the user 'Deaf'. Needed for the channel registration service. Channel messages are not routed to a Deaf person decreasing bandwidth use. /LINKS Output also shows used protocol for that link. New numerics ------------ RPL_MAP, RPL_MAPMORE, RPL_MAPEND and RPL_TRACEPING. Bug fixes --------- - A handshaking link doesn't pingtime out; That can interfere with slow nameserver lookups. - U: lines (and K: lines) now active directly after a /rehash - Don't bind() a socket before connect(), thats useless on machines with just one ip number (like we all have), and can confuse some OS's I found out. Significant Patches ------------------- The following patches have been the objective. To realize them I needed to rewrite and change huge other parts of the code also, because lot of the code in 2.8 is under great tension of re-re-re-patches. - Rewrote m_server. Objective: = Allow ghosted servers to reconnect (solution "server exists"). To allow for this: - Added a timestamp to SQUIT, this timestamp functions as a label which matches the corresponding SERVER (connect). - Added a prefix for every message, absolutely necessary to keep track of the correct order (direction actually). - The oci has been added (oper sees invisibles on own server). - A new NOTE is added, many bugs removed and extremely speeded up due to a better interface with the rest of the code. - The TimeStamp clocks are now automatically synchronized, so a wrong system clock isn't a problem anymore. - Added a Protocol-version and detection. This allows protocol changes with a *MUCH* higher backwards compatibility. - Server now keeps track of the server map. This allowed for /MAP and a lot of speed ups (don't have to scan through all clients to find a server) but much more important: The disconnect burst could be brought back to ONE message (instead of a QUIT for ever single client). Apart from decreasing bandwidth use, this was necessary for other important protocol changes, and even more to allow important future changes that will reduce the connect.burst as well. The most important current impact is that it allows SQUIT to travel down stream AND up stream. Because directionless messages can loose the order, the timestamp on SQUIT was needed to check the validity. - In the client structure a pointer to the server structure is used rather then the full servername, using less memory AND speeding up several places because you don't need to lookup the servername anymore. - USER removed from the connect burst (now all in NICK). Other patches ------------- - exit_client() is rewritten. Added are exit_client_msg() and exit_new_server(). This has especially impact on the possibilities within the protocol. The old exit_client() was clumsy and therefor already used in an incorrect way at several places. The kludges around this part of the code made it impossible to make any changes without breaking something else. Only after the rewrite it was possible to make changes described else where. This also allowed to improve the error message handling to the point that Opers see *always* the error messages involved with routing (also those from remote /connects, delayed errors and squit reasons 'from the other side'). - send.c is more or less rewritten. varargs are fixed now and send.c is highly optimized for speed (possible because of new internal server map). - All useable dog3 code speed ups have been added. These include: - Added a head pointer in the dyn buffer. - several code optimisations - continious kill line checking removed (I added the check at the place where it belongs: after a /rehash). - Useable patches from dl: - Stop as much as possible flooding from unregistered connections. - VERSION and ADMIN available for unregistered users. - syslog (if defined) KILLs of local clients. - Many compile warnings have been removed. Also a special fix for DYNIX to make UPING/RPING also work there (needed gettimeofday()). Package changes --------------- - The irc client is removed from the package as are several old files with incorrect old useless info (Like 'WHATSNEW', ChangeLog that stopped at 1992). - A Makefile.dist is added. - Slighty changed doc/Manual - New doc/NOTE manual - NO_DEFAULT_INVISIBLE removed; users are always visible by default. - Last but not least: patchlevel.h is rewritten so any additional patch can do the version update itself, without interfering: No need to edit this by hand anymore. Summary ======= - Less memory usage - Speeded up code - Less bandwidth use, especially disconnect burst - "Server exists" solved - Error messages concerning (remote) /connects now always visible. - New tools to do (remote) link testing - Intelligent and improved SQUIT handling, should stop unwanted breaks. - squits comments visible everywhere. - net.junction and net.break notices - Overall protocol streamlining allowing for future improvements of the protocol. Run ircd-ircu-2.10.12.10.dfsg1/doc/readme.gline0000644000175000017500000000715307316722150017663 0ustar madkissmadkissGLINE documentation, last updated on 18 Mar 2000 For an ordinary user, the syntax is: GLINE [] If is given, and if a G-line for that server exists, all the information about that G-line is displayed. If is not given, an error is returned. For an operator, the syntax is: GLINE [[!][+|-] [[] :]] If is not given, or if it is not prefixed by "+" or "-", the operation is exactly the same as if it were issued by an ordinary user, except that a list of all G-lines may be returned. If the "+" or "-" prefixes are used, the arguments , , and must be given, even if the G-line already exists. If is "*" and the currently existing G-line is a local G-line, the local G-line will be erased and recreated with the parameters given, as described below. Otherwise, if the G-line currently exists, a prefix of "+" will cause an inactive G-line to be activated, whereas a prefix of "-" will cause an active G-line to be deactivated. If an attempt is made to modify a G-line set by a U-lined service such as Uworld, the change will be forced to be local. If the mask would not be permitted due to it being too wide or affecting too many users (governed by the GLINEMAXUSERCOUNT feature), the "!" prefix may be used to force the G-line to be set anyway. If the G-line does not already exist, it is created. The parameter is used to select whether the G-line is only to apply to a single server (which need not be the local server) or to the whole network; if is not given, it is assumed to be the local server. This could be useful if a single particular link is having problems, for instance. The parameter is a number of seconds, not to exceed 7 days, for the G-line to exist. The argument is mandatory and should describe why this particular G-line was placed. The parameter must be a user@host mask; the host component must contain at least 2 non-wildcarded subdomains or, if it is an IP address, at least 16 bits. Normally, the host component may not contain *any* wildcards, but that can be overridden with the "!" prefix, as indicated above, if the operator has the WIDE_GLINE privilege. For a server, the syntax is: GL (+|-) : The may be a server numeric or the character "*", for a globally scoped G-line. The argument is a server name, and must be prefixed by one of "+" (to indicate an active G-line) or "-" (to indicate an inactive G-line). The parameter is a total number of seconds the G-line is to live for, and is used for versioning. Since GLINEs are propagated during netbursts, there must be some way of resolving conflicting states, which is the reason for this argument, and is also the reason G-lines cannot be deleted, only deactivated. The parameter indicates the reason the G-line was placed. If a GLINE is received with a of "*", any G-lines with local scope are deleted, in preference for the globally scoped version. If the G-line already exists, the values of are compared; if the received is less than the stored , the existing G-line is resent to the server from which the GLINE message was received; otherwise, the G-line is activated or deactivated, depending on the prefix. If the G-line does not currently exist, it is created with the parameters given. For a U-lined server, this syntax should be used: GL + : GL - The parameter will be assumed to be 0. ircd-ircu-2.10.12.10.dfsg1/doc/Makefile.in0000644000175000017500000000333510361343332017444 0ustar madkissmadkiss# doc/Makefile for the Undernet IRC Daemon. # Copyright (C) 1997, Carlo Wood # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. #### Start of system configuration section. #### prefix = @prefix@ top_srcdir = @top_srcdir@ srcdir = @srcdir@ VPATH = @srcdir@ INSTALL = @INSTALL@ SHELL = @SHPROG@ RM = @RMPROG@ @SET_MAKE@ MANDIR = @mandir@ #### End of system configuration section. #### all: build: clean: distclean: ${RM} -f Makefile stamp-m maintainer-clean: distclean depend: install: test -d ${MANDIR}/man8 || mkdir ${MANDIR}/man8 || mkdir -p ${MANDIR}/man8 ${INSTALL} -m 644 ${srcdir}/ircd.8 ${MANDIR}/man8 uninstall: ${RM} -f ${MANDIR}/man8/ircd.8 # You need GNU make for this to work. # Makefile: ../config/config.status Makefile.in ../config/gen.doc.Makefile \ # ../config/.config stamp-m # @echo "recreating doc/Makefile" # @cd ../config; \ # CONFIG_FILES=../doc/Makefile CONFIG_HEADERS= ./config.status > /dev/null; \ # RM=${RM} ${SHELL} ./gen.doc.Makefile # stamp-m: # echo timestamp > stamp-m # ../config/config.status: # @cd ../config; ${MAKE} config.status ircd-ircu-2.10.12.10.dfsg1/doc/readme.crules0000644000175000017500000001220507014163752020056 0ustar madkissmadkissSmartRoute Rule based connects Draft 4 - Aug 19, 1994 by Tony Vencill Rule based connects allow an admin to specify under what conditions a connect should not be allowed. If no rules are specified for a given C and/or N line it will be allowed under any condition. A rule may consist of any legal combination of the following functions and operators. Functions --------- connected(targetmask) - true if a server other than that processing the rule is connected that matches the target mask directcon(targetmask) - true if a server other than that processing the rule is directly connected that matches the target mask via(viamask, targetmask) - true if a server other than that processing the rule matches the target mask and is connected via a directly connected server that matches the via mask directop() - true if an oper is directly connected Unary operators --------------- ! eg: !argument - true if the argument is false Binary operartors ----------------- && eg: arg1&&arg2 - true if arg1 and arg2 are both true || eg: arg1||arg2 - true if arg1, arg2, or both are true Parenthesis () are allowed for grouping arguments, but if no parenthesis are included, && will take precedence over ||, ! will take precedence over both && and ||, and the function will be evaluated from left to right. White space in a rule is ignored. Invalid characters in a rule will lead to the rule being ignored. Examples -------- A simple example of a connect rule might be: connected(*eu.under*) This might be used in a US undernet server for a Europe CN pair to insure that a second Europe link is not allowed if one US-EU link already exists. Note that on the undernet, US server names are city.state.us.undernet.org and Europe server names are city.country.eu.undernet.org. A more interesting example might be: connected(*eu.under*) && ( !direct(*eu.under*) || via(manhat*, *eu.under*) ) Imagine the Boston undernet server uses this rule on its Europe CN pairs. This says that if a Europe server is already connected, a Boston-Europe connect will not be allowed. It also says that if a Europe server does already exist and Boston is not directly connected to one or more Europe servers or Manhattan is, the Boston-Europe connect will not be allowed. This has the effect of allowing multiple US-EU links but attempting to limit these links to one server (ie: Boston will not initiate its first Europe link if another server is already linking Europe). This rule will also prefer to let Manhattan handle the US-EU link by disallowing Boston-Europe links if a Europe server is already linked to Manhattan. A example of the remaining function, directop(), is: connected(*eu.under*) || directop() If this line is used on Boston for the Paderborn CN pair, it will allow connects to Paderborn only if another Europe server is not already connected and there is not an oper on Boston. If this rule is overrideable (ie: is applied only to autoconnects as described below), then it will disallow Boston autoconnects to Paderborn while a Boston oper is online, but allow oper-initiated connects to Paderborn under any circumstance. This directop() function could be used to invoke less prefered routes only when an oper is not present to handle routing, or conversly to allow use of less preferable routes only when an oper is present to monitor their performance. ircd.conf entries ----------------- A rule is listed in the ircd.conf file using a D or d line (which can be thought of as a "disallow" line). D lines will apply to all oper and server originated connects, while d lines will apply only to autoconnects (ie: they are overrideable by opers). The formats are: D:targetmask::rule d:targetmask::rule Remember that newlines are not allowed in conf lines. Two examples (from above) are: D:*eu.under*::connected(*eu.under*) d:*eu.under*::connected(*eu.under*) || directop() Connects originating from other servers will be checked against and matching D lines, while matching d lines will be ignored as it will not be clear whether or not the connection attempt is oper initiated. Checking and viewing rules -------------------------- The chkconf program that comes with the servers has been modified to also check your connect rules. If running in debug mode, parsing errors will show up at debug level 8. To view rules online, "/stats d" can be used to see all rules and "/stats D" can be used to view those rules which affect oper initiated connects and accepts. Processing and storage ---------------------- The rules are parsed when the conf file is read and transformed into a more efficiently computed form, then all applicable rules are evaluated each time a connect command is given or an autoconnect is due. If more than one applicable rule is given, only one need evaluate to true for the connect to be allowed (ie: the rules are ored together). Note that conditions that exist when the connect is initiated might differ from conditions when the link is established. ircd-ircu-2.10.12.10.dfsg1/doc/fda.txt0000644000175000017500000001454307064611034016700 0ustar madkissmadkissfdaman.txt - brief usage information for FDA (Free Debug Allocator) Copyright (C) 1998 Thomas Helvey 1. Base Functionality Basic use of the fda tools is as simple as including the header and source file with your source defining DEBUG and using capitalized versions of malloc(), calloc(), realloc(), and free(). The fda allocation functions verify all your arguments and will call assert() if something is wrong. FDA trashes all allocated memory in a predictable manner and applies prefix and postfix bounds checking signatures to every allocation. When a pointer is freed it's validated, and checked for overflows and underflows. The fda Realloc function does not allow malloc or free through realloc and forces reallocation if the required memory is larger than the current allocation. In both the DEBUG and non-debug versions of fda, if a memory allocation fails once, a low memory callback function is called to allow you to release some memory and allow malloc to succeed, the default version prints a warning message to stderr. If the low memory callback returns the allocation is attempted again, if the second allocation fails a no memory callback function is called to allow you to clean up before terminating the application, if you allow the no memory callback to return the results are undefined. (a NULL ptr will be returned from the allocation call) The default no memory handler prints an error message to stderr and calls abort(). The DEBUG version will assert if you allow the no memory function to return. Both the low memory and no memory callbacks have the signature of: void handler(void) The debug version of fda will not allow you to do the following: Allocate a zero length chunk of memory. Free a non-allocated pointer. Free a pointer twice. Free a pointer at the wrong offset. Use realloc to free memory. (realloc(p, 0)) Use realloc to malloc memory. (realloc(0, s)) Overwrite the bounds of the memory you allocated. (checked on free) The base functions for fda are: void* malloc(size_t) void* realloc(void*, size_t) void* calloc(size_t, size_t) void free(void*) char* strdup(const char*) void set_lowmem_handler(void (*fn)(void)) void set_nomem_handler(void (*fn)(void)) FDA uses a hash table to lookup pointers. The size of the hash table can be changed at compile time by using -DFDA_HASH_TABLE_SIZE where prime is a prime number somewhere around the number of allocations expected. The default hash table size is 16339 which should be large enough to hold most medium sized applications. FDA allocates memory for it's debugging records so if your application uses a lot of memory you may want to make sure you have enough memory available to use the debug version. FDA allocates 20 bytes to store each allocation and 20 bytes to store location information (file and line info). This overhead only applies if you have DEBUG or _DEBUG defined. 2. Extended functionality FDA provides a few handy functions for validating pointers and checking for overruns before they occur when debugging. The first function fda_sizeof(ptr) returns the size of the buffer pointed to by ptr, this allows you to verify that your pointer is what it says it is. fda_sizeof() will call assert() if the pointer you pass it is not at the start of an allocation. The second function valid_ptr(ptr, size) verifies that ptr lies within allocated memory and there are at least size bytes available in the buffer. You can pass valid_ptr() a pointer to any location in allocated memory. valid_ptr() calls assert if the pointer points outside of allocated memory or the remaining size is less than the size specified. valid_ptr() is more efficient if the pointer argument is the value returned from malloc because it's a simple hash table lookup, a more exhaustive algorithm is used if it's not found in the hash table. FDA extended functions: size_t fda_sizeof(const void*) int valid_ptr(const void*, size_t) Typical usage for the fda extended functions: Note: the assert macro compiles to nothing if NDEBUG is defined. Verify a foo_ptr: assert(sizeof(struct foo) == fda_sizeof(foo_ptr)); assert(valid_ptr(foo_ptr, sizeof(struct foo))); Check for room to write: assert(valid_ptr(buf, len)); 3. Leak checking and block validation FDA has several functions for leak checking, and reference marking. fda_clear_refs() iterates through all of the allocated blocks of memory and clears the referenced flag. fda_set_ref() marks a single allocation(block) as being referenced or in use by somebody. fda_assert_refs() iterates through all the allocated blocks of memory and calls assert() if it finds one that's not referenced. Typical usage of the block validation functions: fda_clear_refs(); /* clear all block references */ for each allocation do fda_set_ref(allocation); /* mark allocation in use */ done fda_assert_refs(); /* this will assert if a leak is found */ 4. Reporting functions: FDA has 4 functions for reporting various aspects of allocation status. fda_get_byte_count() tells you the current total number of bytes your application has allocated. (this does not include debugging records) This will give you an idea of how much memory your application is using at any given time. fda_get_block_count() returns the total count of current allocations. fda_enum_locations() calls a user supplied enumeration function with file, line, count information, this allows you to see your file by file allocation density. ;) fda_enum_locations() returns the total number of locations that have memory allocated. fda_enum_leaks() calls a user supplied enumeration function with file, line, size, and ptr for every block not marked as referenced. One use for fda_enum_leaks() is checking for leaks when your program exits: void enum_fn(const char* file, int line, size_t size, void* ptr) { printf("Memory leak: %s: %d - %d bytes at (%p)\n", file, line, size, ptr); } int main(void) { ... #if defined(DEBUG) /* check for memory leaks before exiting */ fda_clear_refs(); fda_enum_leaks(enum_fn); #endif return 0; /* return from main */ } The test file fdatest.c gives examples of usage for most of the functions available with FDA. Please let me know if you encounter any problems with FDA. So far FDA has been built and tested on linux and Windows NT. If you find that it works with or without change on other platforms please let me know so I can make the appropriate changes to the code and add it to the list of tested platforms. ircd-ircu-2.10.12.10.dfsg1/doc/features.txt0000644000175000017500000001565207064611034017766 0ustar madkissmadkissUndernet server features. ------------------------- This document is supposed to list the features that undernet supports and provides to clients, and which version of ircu this was added. Additional numeric replies should be added here too. Extended Who information: (WHOX) Version: unknown, but at least 2.10.07+ This is described in the file 'readme.who' USERIP: Version: unknown, but at least 2.10.07+ This works the same as userhost, but returns the IP instead, useful for setting a ban on someones IP address instead of their nick. usage: USERIP nick[,nick...] returns: RPL_USERIP (307) :server.name 307 target nick[*]=[+|-]user@host... RPL_ISUPPORT: version: 2.10.08+ This sends a numeric during client signon that lists various features that ircu supports. This allows client and script writers to know what features they can use, and various parameters about the irc server. The numeric used is '005' to try and maintain some semblance of compatibility with dalnet which has a similar feature. The 005 numeric may be split across multiple lines if the length exceeds 512 characters. The format is: :servername 005 target feature1 feature2... :are supported by this server. :servername 005 target feature200... :are supported by this server. features are either a word describing the feature eg: 'SILENCE', or a word describing the feature and an equals and a list of parameters. eg: SILENCE=15 (says that we support silence, and we support up to 15 of them per user), or FOO=12,3 (says we support FOO with parameters 12 and 3) for example 2.10.08 lists: :test.undernet.org 005 test SILENCE=15 WHOX WALLCHOPS USERIP CPRIVMSG CNOTICE MODES=6 MAXCHANNELS=10 MAXBANS=30 NICKLEN=9 TOPICLEN=160 KICKLEN=160 NOTE: Versions prior to 2.10.08+ use numeric 005 as part of 'MAP', so 005 should be /not/ be used after the server registration has occured. (ie: after END_OF_MOTD has arrived). MAP: Version: unknown, but since 2.9.30 at least, updated in 2.10.08 /map shows the servers as the server percieves them, who's connected to who in a pretty display. In version 2.10.08 it also lists the amount time time it takes a message to get /from/ a server to the local server - this measures the one way lag only, in 2.10.08 it also lists the number of clients that are currently on that server. The lag estimation is very approximate and depends on people changing nick and joining channels, so the less clients on a server the less reliable the lag estimation is. Map prior to 2.10.08 uses: RPL_MAP 005 RPL_MAPMORE 006 RPL_MAPEND 007 Map changed in 2.10.08 to allow for ISUPPORT on numeric 005, the new numerics are: RPL_MAP 015 RPL_MAPMORE 016 RPL_MAPEND 017 WALLCHOPS: Version: unknown, but since 2.10.07 WALLCHOPS sends a message to all channel operators (@)'s on a channel. It does /not/ require you to be op'd (@'d) to do so. This is a feature. syntax: WALLCHOPS #channel :message or: NOTICE @#channel :message this sends: :user NOTICE @#channel :message to clients that are @'d on the channel. CPRIVMSG/CNOTICE: Version: unknown, but since 2.10.07 CPRIVMSG/CNOTICE are a way around target limiting in recent undernet servers. Undernet servers prevent you from sending messages to too many people at once in an attempt to help cut down the amount of spam that occurs on the network. Because there are several situations where you want to send messages to lots of people that are on the same channel as you (autogreet's and gamebots for example) an 'escape' was made in the form of CPRIVMSG/CNOTICE. These allow you to send a privmsg/notice to a person on a common channel if you are op'd (@'d) without incuring a target penalty. If you see 'Target changed too fast' messages, you should probably be using these commands. Syntax: CPRIVMSG #channel nick :Message CNOTICE #channel nick :Message Results are the same as for 'PRIVMSG' and 'NOTICE' respectively. SILENCE: Version: unknown, 2.9.32 at least. Silence is a server side ignore. You can /silence +hostmask or /silence +nick, to add someone to your silence list, or use /silence -hostmask to remove it. /silence will list your 'silence list'. you can /silence nick, to see someone elses silence list (useful for helping someone). Silence is preferably used as a last resort as it tends to use server CPU time. Undernet typically only allows 15 silences per user. in 2.10.08+ this information is available in the RPL_ISUPPORT line. Syntax: SILENCE +hostmask SILENCE +nick SILENCE -hostmask SILENCE -nick SILENCE nick reply: RPL_SILELIST 217 RPL_ENDOFSILELIST 218 User modes: Version: various Undernet supports these additional user modes: +d: Deaf & Dumb. This user will not get any channel traffic. Used for bots. +k: This user cannot be kicked, deop'd or /kill'd. This usermode may only be set by a server, it may not be set by a user. This is used by undernet service bots (X/W/UWorld etc) +g: List channel HACK:'s +s: Server messages - takes a parameter of which masks to send, see 'snomask.html' for more details. (2.10.0+) LIST: Version: Unknown List now takes various parameters to allow you to quickly and efficiently find interesting channels. These are: >n or n or Cn or C G ! prefix = origin server numeric local-ts = local timestamp, as "seconds.miliseconds" target = target server numeric The local-ts is also sent instead of the origin field, so RTT information can be collected from non-AsLL servers, while preserving backward compatibility. Server-to-server pong format: Z prefix = origin server numeric origin = origin server numeric target = target server numeric remote-ts = remote timestamp as received from an AsLL PING diff = difference between local-ts and remote-ts in miliseconds (integer) local-ts = local timestamp, as "seconds.miliseconds" ircd-ircu-2.10.12.10.dfsg1/doc/debug_memleak_gc.patch0000644000175000017500000000303610257010501021641 0ustar madkissmadkissdiff -rbud gc6.5/include/gc.h gc6.5.patched/include/gc.h --- gc6.5/include/gc.h Sat May 21 05:50:58 2005 +++ gc6.5.patched/include/gc.h Sat Jun 25 00:11:18 2005 @@ -779,6 +779,11 @@ GC_API GC_PTR GC_call_with_alloc_lock GC_PROTO((GC_fn_type fn, GC_PTR client_data)); +GC_API GC_warn_proc GC_set_warn_proc GC_PROTO((GC_warn_proc p)); + +/* Sets the leak handler to be called when an object is leaked. */ +GC_API void GC_set_leak_handler(void (*lh)(void*, int)); + /* The following routines are primarily intended for use with a */ /* preprocessor which inserts calls to check C pointer arithmetic. */ /* They indicate failure by invoking the corresponding _print_proc. */ diff -rbud gc6.5/reclaim.c gc6.5.patched/reclaim.c --- gc6.5/reclaim.c Tue Nov 23 06:58:18 2004 +++ gc6.5.patched/reclaim.c Sat Jun 25 00:52:18 2005 @@ -36,6 +36,14 @@ GC_bool GC_have_errors = FALSE; +static void (*leak_handler)(void*, int); + +void +GC_set_leak_handler(void (*lh)(void*, int)) +{ + leak_handler = lh; +} + void GC_add_leaked(leaked) ptr_t leaked; { @@ -64,6 +72,12 @@ if (GC_debugging_started) GC_print_all_smashed(); for (i = 0; i < GC_n_leaked; ++i) { ptr_t p = GC_leaked[i]; + if (leak_handler) + { + leak_handler(GC_base(p), GC_size(GC_base(p))); + } + else + { if (HDR(p) -> hb_obj_kind == PTRFREE) { GC_err_printf0("Leaked atomic object at "); } else { @@ -71,6 +85,7 @@ } GC_print_heap_obj(p); GC_err_printf0("\n"); + } GC_free(p); GC_leaked[i] = 0; } ircd-ircu-2.10.12.10.dfsg1/doc/readme.log0000644000175000017500000002150110266320140017326 0ustar madkissmadkissOlder versions of ircd had no consistent way of logging various actions. Some things, such as G-lines, were written out to log files with names compiled into the server. Others could only be logged through syslog. Some required that their log files exist beforehand. Starting with u2.10.11, this situation has changed dramatically. All logging in the server is now unified through a single logging subsystem. Unfortunately, the server still does not generate all the logs that it could, and some more tuning is in store for the next major release of ircd. Nevertheless, the logs that are generated are far more consistent, and those log messages may be sent to a given file, to syslog, or even to online operators--or any combination of these three methods. This file is intended to describe configuration of the logging subsystem. All logs are classified by a "subsystem" and a "level." The subsystem is a major classification; each subsystem may be configured individually. The level classification is used to indicate how important the message is; subsystems may be configured to omit log messages with less than a certain importance--not unlike syslog. Levels Levels are used to classify the importance of various log messages. The most important level is the "CRIT" level; the least important is the "DEBUG" level. Each of the levels is also mapped to a corresponding syslog level, and some may even force generation of certain types of server notices. Each importance level is described below. * CRIT - Used for very critical notifications, such as server termination. This is mapped to the corresponding "CRIT" syslog priority. This will also generate server notices to the "OLDSNO" server notice mask. * ERROR - Used to report important error conditions. This is mapped to the corresponding "ERR" syslog priority. * WARNING - Used to warn about certain conditions. This is mapped to the corresponding "WARNING" syslog priority. * NOTICE - Used for reporting important information. This is mapped to the corresponding "NOTICE" syslog priority. * TRACE - Used to tracing operation of the server. This is mapped to the corresponding "INFO" syslog priority. * INFO - Used for reporting unimportant but potentially useful information. This is mapped to the corresponding "INFO" syslog priority. * DEBUG - Used for reporting debugging information. This is mapped to the corresponding "DEBUG" syslog priority. This will also generate server notices to the "DEBUG" server notice mask. Subsystems All of the subsystems are described below, along with their default logging configuration. There are no default log files to log to, and the default logging level is INFO (unless the server is compiled with debugging enabled)--this means that only notices of importance INFO or higher will be logged. * SYSTEM - Used to report information that affects the server as a whole. By default, log messages to this subsystem go nowhere. * CONFIG - Used to report information concerning the configuration file. By default, log messages to this subsystem go to the default syslog facility, which defaults to "USER," and to the "OLDSNO" server notice mask. * OPERMODE - Used to report usage of /OPMODE and /CLEARMODE. By default, log messages to this subsystem go to the "HACK4" server notice mask. * GLINE - Used to report usage of /GLINE, particularly BADCHANs. By default, log messages to this subsystem go to the "GLINE" server notice mask. * JUPE - Used to report usage of /JUPE. By default, log messages to this subsystem go to the "NETWORK" server notice mask. * WHO - Used to report usage of the extended features of /WHO (/WHOX). By default, log messages to this subsystem go nowhere. * NETWORK - Used to report net junctions and net breaks. By default, log messages to this subsystem go to the "NETWORK" server notice mask. * OPERKILL - Used to report usage of /KILL by IRC operators. By default, log messages to this subsystem go nowhere. * SERVKILL - Used to report usage of /KILL by other servers. By default, log messages to this subsystem go nowhere. * USER - Used to report user sign-ons and sign-offs. By default, log messages to this subsystem go nowhere. * OPER - Used to report usage of /OPER, either successfully or unsuccessfully. By default, log messages to this subsystem go to the "OLDREALOP" server notice mask. * RESOLVER - Used to report error messages or other conditions from the resolver and authentication system. By default, log messages to this subsystem go nowhere. * SOCKET - Used to report problems with sockets. By default, log messages to this subsystem go nowhere. * IAUTH - Used to report connects, disconnects and errors for the IAuth authorization mechanism. By default, log messages to this subsystem go to the "NETWORK" server notice mask. * DEBUG - Used only when debugging is enabled. All log messages to this subsystem go either to the console or to the debug log file compiled into the server, as well as to the "DEBUG" server notice mask. This is the only subsystem with a default log file. Configuration The true power of the logging subsystem comes from its extremely flexible configuration. The default server facility can be configured, as can the facility for each individual subsystem described above. Moreover, administrators can configure the server to log to specific files, send selected log messages to operators subscribed to any server notice mask, and even change the default log level for each subsystem. The logging subsystem has a set of tables mapping names to the numerical values used internally. Subsystems, levels, syslog facilities, and server notice masks are all configured using strings. These tables even include special strings, such as "DEFAULT" and "NONE." Each possible configuration piece is described below. Default Syslog Facility The IRC server has a default facility that it uses when sending log messages to syslog. The default facility may be overridden for each individual subsystem, but the default itself can be changed with an appropriate Feature entry in the configuration file. The facility normally defaults to "USER," but may be configured to be any of AUTH, CRON, DAEMON, LOCAL0, LOCAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7, LPR, MAIL, NEWS, USER, or UUCP. Some systems also have the AUTHPRIV facility. To configure this default, add a Feature line to the configuration file that looks like "LOG" = ""; should be replaced with the string for the desired default syslog facility. Log Files Each subsystem may be configured to send its log messages to any single log file with a Feature entry like "LOG" = "" "FILE" ""; should be replaced with one of the subsystem names described above, and should be a file name for the log file. The file name may be relative to the server's data directory ("DPATH"), or it may be an absolute path name. Note that if you're using chroot, these absolute path names will be relative to the server's root directory. Logging to Syslog By default, except for the CONFIG subsystem, no logs are sent to syslog. This can be overridden using an Feature entry like "LOG" = "" "FACILITY" ""; , as above, should be replaced with one of the subsystem names described above, and must be one of the facility strings mentioned under "Default Syslog Facility." The facility string may also be "NONE," to turn off syslog for that subsystem, and "DEFAULT," to use the server's default facility. Please don't confuse a DEFAULT facility with the default for a particular subsystem; only the CONFIG subsystem defaults to DEFAULT, whereas all the rest default to NONE. Logging via Server Notices Log messages can be sent to online IRC operators. Many subsystems actually default to this behavior, in fact. For security, log messages containing IP addresses or other extremely sensitive data will never be sent via server notices, but all others can be sent to a specific server notice mask. (For more information about server notice masks, please see doc/snomask.html.) The available mask names are OLDSNO, SERVKILL, OPERKILL, HACK2, HACK3, UNAUTH, TCPCOMMON, TOOMANY, HACK4, GLINE, NETWORK, IPMISMATCH, THROTTLE, OLDREALOP, CONNEXIT, and DEBUG. The special mask name "NONE" inhibits sending of server notices for a particular subsystem. The Feature entry for this configuration looks like "LOG" = "" "SNOMASK" ""; again, is one of the subsystems described above, and is one of the mask names. Setting Minimum Logging Level The minimum log level for a particular subsystem may be set with an Feature entry like "LOG" = "" "LEVEL" ""; here, is yet again one of the subsystems described above, and is one of the level names, also described above. ircd-ircu-2.10.12.10.dfsg1/doc/readme.jupe0000644000175000017500000000531507104337674017536 0ustar madkissmadkissJUPE documentation, last updated on 18 Mar 2000 For an ordinary user, the syntax is: JUPE [] If is given, and if a jupe for that server exists, all the information about that jupe is displayed. If is not given, all un-expired jupes are displayed. For an operator, the syntax is: JUPE [[+|-] [[] :]] If is not given, or if it is not prefixed by "+" or "-", the operation is exactly the same as if it were issued by an ordinary user. If the "+" or "-" prefixes are used, the arguments , , and must be given, even if the jupe already exists. If is "*" and the currently existing jupe is a local jupe, the local jupe will be erased and recreated with the parameters given, as described below. Otherwise, if the jupe currently exists, a prefix of "+" will cause an inactive jupe to be activated, whereas a prefix of "-" will cause an active jupe to be deactivated. If the jupe does not already exist, it is created. The parameter is used to select whether the jupe is only to apply to a single server (which need not be the local server) or to the whole network; if is not given, it is assumed to be the local server. This could be useful if a single particular link is having problems, for instance. The parameter is a number of seconds, not to exceed 7 days, for the jupe to exist. The argument is mandatory and should describe why this particular jupe was placed. For a server, the syntax is: JU (+|-) : The may be a server numeric or the character "*", for a globally scoped jupe. The argument is a server name, and must be prefixed by one of "+" (to indicate an active jupe) or "-" (to indicate an inactive jupe). The parameter is a total number of seconds the jupe is to live for, and is used for versioning. Since JUPEs are propagated during netbursts, there must be some way of resolving conflicting states, which is the reason for this argument, and is also the reason jupes cannot be deleted, only deactivated. The parameter indicates the reason the jupe was placed. If a JUPE is received with a of "*", any jupes with local scope are deleted, in preference for the globally scoped version. If the jupe already exists, the values of are compared; if the received is less than the stored , the existing jupe is resent to the server from which the JUPE message was received; otherwise, the jupe is activated or deactivated, depending on the prefix. If the jupe does not currently exist, it is created with the parameters given. ircd-ircu-2.10.12.10.dfsg1/doc/irc.10000644000175000017500000000606407014163752016247 0ustar madkissmadkiss.\" @(#)irc.1 2.6 7 Oct 90 .TH IRC 1 "7 October 1990" .SH NAME irc \- User Interface to Internet Relay Chat Protocol .SH SYNOPSIS \fBirc\fP [\fB-p\fP \fIportnum\fP] [\fB-c\fP \fIchannel\fP] [ \fInickname\fP [ \fIserver\fP ]] .SH DESCRIPTION .LP \fBIrc\fP is a user interface to the Internet Relay Chat, a CB-like interactive discussion environment. It is structured into \fIchannels\fP, which are public discussion forums, and also allows for private intercommunication. Each participant has a \fInickname\fP, which is the one specified in the command line or else his login name. .LP Once invoked, \fBirc\fP connects as a client to the specified server, \fIserver\fP or to the default one (see below). The screen splits into a dialogue window (the major part of the screen) and a command line, from which messages can be sent and commands given to control irc. .SH COMMAND SYNTAX The syntax of irc commands is of the form \fB/COMMAND\fP. The most notable ones are listed below. For an uptodate list, use the \fBHELP\fP command of \fBirc\fP. Case is ignored. .IP "\fB/ADMIN\fR [\fIserver\fP]" Prints administrative information about an IRC \fIserver\fP. .IP "\fB/AWAY\fP [\fImessage\fP]" Mark yourself as being away (with an automatic reply \fImessage\fP if specified) .IP "\fB/BYE\fR, \fB/EXIT\fR, \fB/QUIT\fR" Terminate the session .IP "\fB/CHANNEL\fR [\fIchannel\fP]" Join another \fIchannel\fP .IP "\fB/CLEAR\fR" Clear the screen .IP "\fB/HELP\fR [\fIcommand\fP]" Display a brief description of the \fIcommand\fP (or list all commands, if none specified). .IP "\fB/SUMMON\fR \fIuser\fP" Allows to summon a \fIuser\fP specified as a full Internet address, i.e., \fIlogin@host.domain\fP, to an IRC dialogue session (in much the same way as the talk(1) command). It is usable ONLY if the irc daemon runs on the target machine (host.domain). .IP "\fB/TOPIC\fR \fItopic\fP" Sets the \fItopic\fP for the current channel .IP "\fB/WHO\fR [\fIchannel\fP|*]" Lists all users of IRC if no argument, of the specified \fIchannel\fP or of the current channel (*). .SH ARGUMENTS .IP "\fB-p\fP \fIportnum\fP" TCP/IP "port number. Default is 6667 and this option should seldom if ever" be used. .IP "\fB-c\fP \fIchannel\fP" \fIChannel\fP number to join upon beginning of the session. Default is no channel. .IP "\fInickname\fP" \fINickname\fP used in the session (can be changed with the \fB/NICK\fP command). Default is user login name. .IP "\fIserver\fP" \fIServer\fP to connect to. Default is specified in the irc system configuration file, and can be superseded with the environment variable IRCSERVER. .SH EXAMPLE .RS .nf tolmoon% \fBirc -p6667 Wizard tolsun\fP .fi .RE .LP connects you to irc server in host tolsun (port 6667) with nickname Wizard .SH COPYRIGHT Copyright (c) 1988 University of Oulu, Computing Center, Finland. .nf Copyright (c) 1988,1989,1990 Jarkko Oikarinen .nf All rights reserved. For full COPYRIGHT see LICENSE file with IRC package. .SH "SEE ALSO" ircd(8) .SH BUGS What bugs ? .SH AUTHOR Jarkko Oikarinen .nf Manual page updated by Michel Fingerhut ircd-ircu-2.10.12.10.dfsg1/doc/readme.www0000644000175000017500000000126607074731365017421 0ustar madkissmadkissMore, and up to date, information can be retrieved from the following world wide web pages: * Undernet Documents Project: http://www.user-com.undernet.org/documents/ * Release Notes & Patch Repository: http://coder-com.undernet.org/ * ircII scripts to support the undernet extentions: http://coder-com.undernet.org/ircii/ * Undernet Use Policy: http://www.user-com.undernet.org/documents/aup.html * Operator Etiquette: http://www.user-com.undernet.org/documents/operman.html * New server links & Routing info: http://routing-com.undernet.org/ * Information about large number of file descriptors per process: linux: http://www.linux.org.za/oskar/patches/kernel/filehandle/ ircd-ircu-2.10.12.10.dfsg1/doc/readme.iauth0000644000175000017500000004057510553024240017674 0ustar madkissmadkissOVERVIEW ======== The iauth protocol used here is based on the one in irc2.11.1, with minor changes to support challenge-response protocols and login-on-connect. Reference to that version's iauth-internals.txt and source code may be useful. For clarity, this document uses "server" to refer to any IRC server implementing this protocol, "ircu" to refer to Undernet ircd, and "ircd" to refer to IRCnet ircd. Certain messages are relayed to interested operators. ircu implements this by using the 131072 (SNO_AUTH) server notice mask. ircd implements this by using the &AUTH local channel. STARTING IAUTH ============== The path to the iauth program is specified in the server configuration file. The server spawns that program when reading the configuration file or when the previous iauth instance terminates. To protect against a series of crashes, the server will refuse to restart an iauth instance that it spawned in the last five seconds. A rehash operation will clear this behavior. The server and iauth instance communicate over the iauth instance's stdin and stdout. Every message from the server to the iauth instance is a single line. The line starts with an integer client identifier. This may be -1 to indicate no particular client or a non-negative number to indicate a client connected to the server. When the server starts the iauth instance, it sends a line formatted like "-1 M irc.example.org 20000" to indicate its name and an exclusive upper bound on valid client identifiers. In that example, possible client identifiers would be from 0 through 19999 inclusive. This upper bound is called MAXCONNECTIONS in the server code. When the iauth instance starts, it sends a V message to indicate its version. The server should provide /stats subcommands that report the iauth instance's version, configuration and statistics. Line formats in both direction are IRC-like in format: space characters separate arguments and a colon at the start of an argument indicates that the remainder of the line is one argument. To avoid problems, IPv6 address arguments with a leading colon may have to be prefixed with a 0 -- for example, ::1 sent as 0::1. When the iauth instance sends messages that relate to a particular client, that client is identified by three parameters from the server's Client Introduction message (, and ). If any of these disagree with the server's current user tables, it is an error. CLIENT STATES ============= Each client is conceptually in one of four states: GONE, REGISTER, HURRY or NORMAL. Each client starts in the GONE state. Certain messages from the server signal a client's transition from one state to another, and certain messages from the iauth instance cause a state transition. To be pedantic, the REGISTER state is a collection of sub-states since certain commands must occur at most and/or at least one time during the REGISTER state. The distinctions between these sub-states are distracting and not important, so they are described as one state and the repetition limitations are described for each command. The rationale for the HURRY state is to give explicit input to the iauth instance as to when the server believes it has sent the complete set of data for the client. Rather than defining the complete set of information in this protocol document, that is left to the server. ircd does not indicate this state. POLICIES AND USE CASES ====================== The historical application of iauth has been to block users that appear to be drones early, before they have a chance to disrupt the network, and without affecting other users on the same host (which K-lines do). This protocol extends that application by adding the n server message and by allowing challenge-response exchanges with the client. Eventually it would be nice to move the DNS and ident lookups into iauth, and remove that code from the IRC server. ircd already does this; since ircu does not, it adds the u server message. For trusted proxies, this protocol gives the capability for clients connecting through those proxies to be displayed with their actual username, IP address and hostname. The same functions allow other clients to use iauth-assigned spoofs, for example to hide the IP addresses used by operators. This protocol allows login-on-connect, for example by clients that send their account name and password in PASS, through the R iauth message. This protocol allows iauth to assign a client to a particular class by specifying a class name in the D or R iauth message. SERVER MESSAGES =============== X - Example Message Description Syntax: X Example: 5 X arguments vary States: REGISTER(1), HURRY, NORMAL Next State: - Comments: This is an example message description. Each message is a single character. The States field indicates which states the message may occur in and any restrictions on how many times the message may be sent during those states (restrictions only make sense when Next State is -). The Next State field indicates which new state is implied by the message; a hyphen indicates no state change is implied. The X (Example) message is not a real message type. Compatibility: If we believe ircu behavior is different than ircd's, this describes ircd's behavior or expectations. C - Client Introduction Syntax: C Example: 5 C 192.168.1.10 23367 192.168.0.1 6667 States: GONE Next State: REGISTER Comments: Indicates that on accepted a client connection from on . D - Client Disconnect Syntax: D Example: 5 D States: REGISTER, HURRY, NORMAL Next State: GONE Comments: Indicates that a client is disconnecting from the server. N - Hostname Received Syntax: N Example: 5 N host-1-10.example.org States: REGISTER(1) Next State: - Comments: Indicates that the server received hostname information for a client. Only one of 'N' and 'd' is sent. d - Hostname Timeout Syntax: d Example: 5 d States: REGISTER(1) Next State: - Comments: Indicates that the server did not receive hostname information for a client in a timely fashion. Only one of 'N' and 'd' is sent. P - Client Password Syntax: P : Example: 5 P :buddha n1rvan4 States: REGISTER Next State: - Comments: Indicates the client's password information. This may be a traditional client password, an account and pass phrase pair, or the response to a challenge (see the iauth C message). This message is enabled by requesting the A policy. U - Client Username Syntax: U : Example: 5 U buddha bodhisattva.example.com irc.undernet.org :Gautama Siddhartha States: REGISTER(1+) Next State: - Comments: Indicates the client's claimed username and "GECOS" information, along with client hostname and server name. This information is not reliable. This message is enabled by requesting the A policy. Compatibility: ircd only sends the parameter. u - Client Username Syntax: u Example: 5 u notbuddha States: REGISTER(1) Next State: - Comments: Indicates a more reliable username for the client. Compatibility: This is an Undernet extension and ircd does not send it. It is enabled by the iauth instance requesting the U policy. n - Client Nickname Syntax: n Example: 5 n Buddha States: REGISTER(1+), HURRY Next State: - Comments: Indicates the client's requested nickname. Compatibility: This is an Undernet extension and ircd does not send it. It is enabled by the iauth instance requesting the U policy. H - Hurry Up Syntax: H Example: 5 H Others States: REGISTER Next State: HURRY Comments: Indicates that the server is ready to register the client except for needing a response from the iauth server. is a tentative connection class for the user, which will be used unless iauth overrides it in a D or R message. Compatibility: This is an Undernet extension and ircd does not send it. It is enabled by the iauth instance requesting the U policy. T - Client Registered Syntax: T Example: 5 T States: HURRY Next State: NORMAL Comments: Indicates the server got tired of waiting for iauth to finish and the client is being accepted. This message should never be sent when the R policy is in effect. Compatibility: ircd allows this message for clients in the REGISTER state. E - Error Syntax: E : Example: 5 E Gone States: N/A Next State: - Comments: Indicates that a message received from the iauth instance could not be rationally interpreted. This may be because the client could not be found, the client was in an inappropriate state for the message, or for other reasons. The argument specifies the general type of error and provides details. may be -1. M - Server Name and Capacity Syntax: M Example: -1 M irc.example.org 20000 States: GONE(1) Next State: - Comments: Indicates the server's name and upper bound on client identifiers. Compatibility: ircd does not include the information. The should be ignored: ircd sends 0 and ircu sends -1. IAUTH MESSAGES ============== X - Example Message Description Syntax: X Example: X something Notify: yes States: N/A Next State: N/A Comments: This is an example message description. Each message is a single character. If the Notify field is present and says yes, interested operators (with SNO_AUTH set) should be notified of the message. The States field, where present, indicate which states accept this message. Clients in other states should ignore the message or treat it as an error. The Next State field, where present, indicates what the next state should be for the client. Compatibility: If we believe ircu behavior is different than ircd's, this describes ircd's behavior or expectations. > - Operator Notification Syntax: > : Example: > :Hello Operators! Notify: yes Comments: Contains a message that the iauth instance wants to send to interested operators. G - Set Debug Level Syntax: G Example: G 1 Notify: yes Comments: Sets a debug level for the server's end of the iauth conversation. When enabled, debug messages should be sent to the same channel (group, mask, etc) as other iauth notifications. Debug level 0 suppresses iauth-related debug output, and positive integers enable iauth debugging messages. O - Set Policy Options Syntax: O Example: O RTAWU Notify: yes Comments: Sets policy options for the iauth conversation. Old policy options should be forgotten. Valid policy options are: A - Send username and password information. This causes the server to send the U and P messages. R - Require clients to be approved before registering them. When this policy is in effect, it affects the behavior of a registration timeout; for details, see the documentation for the T server message. T - When the R policy is in effect and the iauth service does not respond for a client, this causes the server to count the number of clients refused, to send a warning message to interested operators periodically, and to send the count of rejected users to interested operators when the iauth instance responds again. U - Send nickname, confirmed username and hurry information. This causes the server to send the n, u and H messages. W - Allow extra time for iauth to respond based on hostname. When this policy is in effect and a DNS message (N or d) is sent for a client, that client's registration timeout is extended or reset. Compatibility: The U policy is an Undernet extension and is not recognized by ircd. V - iauth Program Version Syntax: V : Example: V :Undernet-iauthu v1.0 Notify: yes Comments: Indicates the iauth program version. This should only be used in diagnostic messages, and must not change protocol behavior. a - Start of new configuration Syntax: a Example: a Notify: yes Comments: Indicates that a new configuration is being loaded by the iauth instance. Any cached configuration records should be cleared. A - Configuration Information Syntax: A : Example: A * rfc931 Notify: yes Comments: Indicates new configuration information. s - Start of new statistics Syntax: s Example: s Notify: yes Comments: Indicates a new set of statistics will be sent. Any cached statistics records should be cleared. S - Statistics Information Syntax: S : Example: S rfc931 connected 0 unix 0 other 0 bad 0 out of 0 Notify: yes Comments: Indicates new or additional statistics information. o - Forced Username Syntax: o Example: o 5 192.168.1.10 23367 bubba States: REGISTER, HURRY Next State: - Comments: Indicates that the username should be used for the specified client even if the normal sanity-checking would prohibit the username. U - Trusted Username Syntax: U Example: U 5 192.168.1.10 23367 buddha States: REGISTER, HURRY Next State: - Comments: Indicates that the iauth instance believes is accurate for the specified client. u - Untrusted Username Syntax: u Example: u 5 192.168.1.10 23367 enlightened_one States: REGISTER, HURRY Next State: - Comments: Indicates that the iauth instance does not strongly trust to be accurate, but has no more trusted username. N - Client Hostname Syntax: N Example: N 5 192.168.1.10 23367 buddha.example.org States: REGISTER, HURRY Next State: - Comments: Indicates that the iauth instance believes the specified client should use the hostname given. Compatibility: This is an Undernet extension and ircd does not support this message. I - Client IP Address Syntax: N Example: N 5 192.168.1.10 23367 127.128.129.130 States: REGISTER, HURRY Next State: - Comments: Indicates that the iauth instance wants the server to present and treat the client as using . This means that future iauth messages relating to the client must use as the parameter. Compatibility: This is an Undernet extension and ircd does not support this message. C - Challenge User Syntax: C : Example: C 5 192.168.1.10 23367 :In which year did Columbus sail the ocean blue? States: REGISTER, HURRY Next State: - Comments: Indicates that the challenge string should be sent to the specified user, for example via NOTICE AUTH :*** . The client responds by sending PASS :, which should be relayed via the P server message. This requires that the A policy be in effect. Compatibility: This is an Undernet extension and ircd does not support this message. k - Quietly Kill Client Syntax: k : Example: k 5 192.168.1.10 23367 :Open proxy found. States: REGISTER, HURRY, NORMAL Next State: GONE Comments: Indicates that the specified client should be disconnected for the reason given without notifying operators. Compatibility: ircu does not use the same notification mechanism as ircd, so operators are notified using SNO_CONNEXIT anyway. K - Kill Client Syntax: K : Example: K 5 192.168.1.10 23367 :We don't like you. States: REGISTER, HURRY, NORMAL Next State: GONE Comments: Indicates that the specified client should be disconnected for the reason given. Operators should be notified. D - Done Checking Syntax: D [class] Example: D 5 192.168.1.10 23367 States: REGISTER, HURRY Next State: NORMAL Comments: Indicates that the iauth instance believes the specified client should be allowed onto the network. If a class parameter is given, the client should be assigned to that class. Compatibility: Specifying the class is an Undernet extension and ircd does not support that parameter. R - Registered User Syntax: R [class] Example: R 5 192.168.1.10 23367 Buddha States: REGISTER, HURRY Next State: NORMAL Comments: Indicates that the iauth instance believes the specified client should be allowed onto the network, pre-authenticated to the account listed. If a class parameter is given, the client should be assigned to that class. Compatibility: This is an Undernet extension and ircd does not support this message. ircd-ircu-2.10.12.10.dfsg1/doc/iso-time.html0000644000175000017500000006074407071755673020045 0ustar madkissmadkiss International Standard Date and Time Notation

A Summary of the International Standard Date and Time Notation

by Markus Kuhn

International Standard ISO 8601 specifies numeric representations of date and time. This standard notation helps to avoid confusion in international communication caused by the many different national notations and increases the portability of computer user interfaces. In addition, these formats have several important advantages for computer usage compared to other traditional date and time notations. The time notation described here is already the de-facto standard in almost all countries and the date notation is becoming increasingly popular.

Especially authors of Web pages and software engineers who design user interfaces, file formats, and communication protocols should be familiar with ISO 8601.

Contents: Date, Time of Day, Time Zone.

Date

The international standard date notation is

YYYY-MM-DD

where YYYY is the year in the usual Gregorian calendar, MM is the month of the year between 01 (January) and 12 (December), and DD is the day of the month between 01 and 31.

For example, the fourth day of February in the year 1995 is written in the standard notation as

1995-02-04

Other commonly used notations are e.g. 2/4/95, 4/2/95, 95/2/4, 4.2.1995, 04-FEB-1995, 4-February-1995, and many more. Especially the first two examples are dangerous, because as both are used quite often in the U.S. and in Great Britain and both can not be distinguished, it is unclear whether 2/4/95 means 1995-04-02 or 1995-02-04. The date notation 2/4/5 has at least six reasonable interpretations (assuming that only the twentieth and twenty-first century are reasonable candidates in our life time).

Advantages of the ISO 8601 standard date notation compared to other commonly used variants:

  • easily readable and writeable by software (no 'JAN', 'FEB', ... table necessary)
  • easily comparable and sortable with a trivial string comparison
  • language independent
  • can not be confused with other popular date notations
  • consistency with the common 24h time notation system, where the larger units (hours) are also written in front of the smaller ones (minutes and seconds)
  • strings containing a date followed by a time are also easily comparable and sortable (e.g. write "1995-02-04 22:45:00")
  • the notation is short and has constant length, which makes both keyboard data entry and table layout easier
  • identical to the Chinese date notation, so the largest cultural group (>25%) on this planet is already familiar with it :-)
  • date notations with the order "year, month, day" are in addition already widely used e.g. in Japan, Korea, Hungary, Sweden, Finland, Denmark, and a few other countries and people in the U.S. are already used to at least the "month, day" order
  • a 4-digit year representation avoids overflow problems after 1999-12-31

As dates will look a little bit strange anyway starting with 2000-01-01 (e.g. like 1/1/0), it has been suggested that the year 2000 is an excellent opportunity to change to the standard date notation.

ISO 8601 is only specifying numeric notations and does not cover dates and times where words are used in the representation. It is not intended as a replacement for language-dependent worded date notations such as "24. Dezember 2001" (German) or "February 4, 1995" (US English). ISO 8601 should however be used to replace notations such as "2/4/95" and "9.30 p.m.".

Apart from the recommended primary standard notation YYYY-MM-DD, ISO 8601 also specifies a number of alternative formats for use in applications with special requirements. All of these alternatives can easily and automatically be distinguished from each other:

The hyphens can be omitted if compactness of the representation is more important than human readability, for example as in

19950204

For situations where information about the century is really not required, a 2-digit year representation is available:

95-02-04 or 950204

If only the month or even only the year is of interest:

1995-02 or 1995

In commercial and industrial applications (delivery times, production plans, etc.), especially in Europe, it is often required to refer to a week of a year. Week 01 of a year is per definition the first week that has the Thursday in this year, which is equivalent to the week that contains the fourth day of January. In other words, the first week of a new year is the week that has the majority of its days in the new year. Week 01 might also contain days from the previous year and the week before week 01 of a year is the last week (52 or 53) of the previous year even if it contains days from the new year. A week starts with Monday (day 1) and ends with Sunday (day 7). For example, the first week of the year 1997 lasts from 1996-12-30 to 1997-01-05 and can be written in standard notation as

1997-W01 or 1997W01

The week notation can also be extended by a number indicating the day of the week. For example, the day 1996-12-31, which is the Tuesday (day 2) of the first week of 1997, can also be written as

1997-W01-2 or 1997W012

for applications like industrial planning where many things like shift rotations are organized per week and knowing the week number and the day of the week is more handy than knowing the day of the month.

An abbreviated version of the year and week number like

95W05

is sometimes useful as a compact code printed on a product that indicates when it has been manufactured.

The ISO standard avoids explicitly stating the possible range of week numbers, but this can easily be deduced from the definition:

Theorem: Possible ISO week numbers are in the range 01 to 53. A year always has a week 52. (There is one historic exception: the year in which the Gregorian calendar was introduced had less than 365 days and less than 52 weeks.)

Proof: Per definition, the first week of a year is W01 and consequently days before week W01 belong to the previous year and so there is no week with lower numbers. Considering the highest possible week number, the worst case is a leap year like 1976 that starts with a Thursday, because this keeps the highest possible number of days of W01 in the previous year, i.e. 3 days. In this case, the Sunday of W52 of the worst case year is day number 4+51*7=361 and 361-366=5 days of W53 belong still to this year, which guarantees that in the worst case year day 4 (Thursday) of W53 is not yet in the next year, so a week number 53 is possible. For example, the 53 weeks of the worst case year 1976 started with 1975-12-29 = 1976-W01-1 and ended with 1977-01-02 = 1976-W53-7. On the other hand, considering the lowest number of the last week of a year, the worst case is a non-leap year like 1999 that starts with a Friday, which ensures that the first three days of the year belong to the last week of the previous year. In this case, the Sunday of week 52 would be day number 3+52*7=367, i.e. only the last 367-365=2 days of the W52 reach into the next year and consequently, even a worst case year like 1999 has a week W52 including the days 1999-12-27 to 2000-01-02. q.e.d.

[Unfortunately, the current version of the C programming language standard provides in the strftime() function no means to generate the ISO 8601 week notation. A required extension would be four new formatting codes: for the year of the week to which the specified day belongs (both 2-digit and 4-digit), for the number of the week between 01 and 53, and for the day of the week between 1 (Monday) and 7 (Sunday). Another trivial mistake in the description of strftime() in the C standard is that the range of seconds goes from 00 to 61, because at one time only one single leap second 60 can be inserted into UTC and consequently there will never be a leap second 61. Contribution N764 to the ISO C committee suggests to fix some of this in the next revision of the ISO C standard. The author of this text has also developed a proposal for a modernised clock and calendar API for C, which provides full proper treatment of leap seconds and timezones and fixes numerous other problems in the current C timing library functions. It also serves as an excellent model for those who want to design clock library functions for other programming languages.]

Both day and year are useful units of structuring time, because the position of the sun on the sky, which influences our lives, is described by them. However the 12 months of a year are of some obscure mystic origin and have no real purpose today except that people are used to having them (they do not even describe the current position of the moon). In some applications, a date notation is preferred that uses only the year and the day of the year between 001 and 365 (366 in leap years). The standard notation for this variant representing the day 1995-02-04 (that is day 035 of the year 1995) is

1995-035 or 1995035

Leap years are years with an additional day YYYY-02-29, where the year number is a multiple of four with the following exception: If a year is a multiple of 100, then it is only a leap year if it is also a multiple of 400. For example, 1900 was not a leap year, but 2000 is one.

Time of Day

The international standard notation for the time of day is

hh:mm:ss

where hh is the number of complete hours that have passed since midnight (00-24), mm is the number of complete minutes that have passed since the start of the hour (00-59), and ss is the number of complete seconds since the start of the minute (00-59). If the hour value is 24, then the minute and second values must be zero. [Although ISO 8601 does not mention this, the value 60 for ss might sometimes be needed during an inserted leap second in an atomic time scale like Coordinated Universal Time (UTC). A single leap second 23:59:60 is inserted into the UTC time scale every few years as announced by the International Earth Rotation Service in Paris to keep UTC from wandering away more than 0.9 s from the less constant astronomical time scale UT1 that is defined by the actual rotation of the earth.]

An example time is

23:59:59

which represents the time one second before midnight.

As with the date notation, the separating colons can also be omitted as in

235959

and the precision can be reduced by omitting the seconds or both the seconds and minutes as in

23:59, 2359, or 23

It is also possible to add fractions of a second after a decimal dot or comma, for instance the time 5.8 ms before midnight can be written as

23:59:59.9942 or 235959.9942

As every day both starts and ends with midnight, the two notations 00:00 and 24:00 are available to distinguish the two midnights that can be associated with one date. This means that the following two notations refer to exactly the same point in time:

1995-02-04 24:00 = 1995-02-05 00:00

In case an unambiguous representation of time is required, 00:00 is usually the preferred notation for midnight and not 24:00. Digital clocks display 00:00 and not 24:00.

ISO 8601 does not specify, whether its notations specify a point in time or a time period. This means for example that ISO 8601 does not define whether 09:00 refers to the exact end of the ninth hour of the day or the period from 09:00 to 09:01 or anything else. The users of the standard must somehow agree on the exact interpretation of the time notation if this should be of any concern.

If a date and a time are displayed on the same line, then always write the date in front of the time. If a date and a time value are stored together in a single data field, then ISO 8601 suggests that they should be separated by a latin capital letter T, as in 19951231T235959.

A remark for readers from the U.S.:

The 24h time notation specified here has already been the de-facto standard all over the world in written language for decades. The only exception are some English speaking countries, where still notations with hours between 1 and 12 and additions like "a.m." and "p.m." are in wide use. The common 24h international standard notation starts to get widely used now even in England. Most other languages don't even have abbreviations like "a.m." and "p.m." and the 12h notation is certainly hardly ever used on Continental Europe to write or display a time. Even in the U.S., the military and computer programmers have been using the 24h notation for a long time.

The old English 12h notation has many disadvantages like:

  • It is longer than the normal 24h notation.
  • It takes somewhat more time for humans to compare two times in 12h notation.
  • It is not clear, how 00:00, 12:00 and 24:00 are represented. Even encyclopedias and style manuals contain contradicting descriptions and a common quick fix seems to be to avoid "12:00 a.m./p.m." altogether and write "noon", "midnight", or "12:01 a.m./p.m." instead, although the word "midnight" still does not distinguish between 00:00 and 24:00.
  • It makes people often believe that the next day starts at the overflow from "12:59 a.m." to "1:00 a.m.", which is a common problem not only when people try to program the timer of VCRs shortly after midnight.
  • It is not easily comparable with a string compare operation.
  • It is not immediately clear for the unaware, whether the time between "12:00 a.m./p.m." and "1:00 a.m./p.m." starts at 00:00 or at 12:00, i.e. the English 12h notation is more difficult to understand.

Please consider the 12h time to be a relic from the dark ages when Roman numerals were used, the number zero had not yet been invented and analog clocks were the only known form of displaying a time. Please avoid using it today, especially in technical applications! Even in the U.S., the widely respected Chicago Manual of Style now recommends using the international standard time notation in publications.

A remark for readers from German speaking countries:

In May 1996, the German standard DIN 5008, which specifies typographical rules for German texts written on typewriters, has been updated. The old German numeric date notations DD.MM.YYYY and DD.MM.YY have been replaced by the ISO date notations YYYY-MM-DD and YY-MM-DD. Similarly, the old German time notations hh.mm and hh.mm.ss have been replaced by the ISO notations hh:mm and hh:mm:ss. Those new notations are now also mentioned in the latest edition of the Duden. The German alphanumeric date notation continues to be for example "3. August 1994" or "3. Aug. 1994". The corresponding Austrian standard has already used the ISO 8601 date and time notations before.

ISO 8601 has been adopted as European Standard EN 28601 and is therefore now a valid standard in all EU countries and all conflicting national standards have been changed accordingly.

Time Zone

Without any further additions, a date and time as written above is assumed to be in some local time zone. In order to indicate that a time is measured in Universal Time (UTC), you can append a capital letter Z to a time as in

23:59:59Z or 2359Z

[The Z stands for the "zero meridian", which goes through Greenwich in London, and it is also commonly used in radio communication where it is pronounced "Zulu" (the word for Z in the international radio alphabet). Universal Time (sometimes also called "Zulu Time") was called Greenwich Mean Time (GMT) before 1972, however this term should no longer be used. Since the introduction of an international atomic time scale, almost all existing civil time zones are now related to UTC, which is slightly different from the old and now unused GMT.]

The strings

+hh:mm, +hhmm, or +hh

can be added to the time to indicate that the used local time zone is hh hours and mm minutes ahead of UTC. For time zones west of the zero meridian, which are behind UTC, the notation

-hh:mm, -hhmm, or -hh

is used instead. For example, Central European Time (CET) is +0100 and U.S./Canadian Eastern Standard Time (EST) is -0500. The following strings all indicate the same point of time:

12:00Z = 13:00+01:00 = 0700-0500

There exists no international standard that specifies abbreviations for civil time zones like CET, EST, etc. and sometimes the same abbreviation is even used for two very different time zones. In addition, politicians enjoy modifying the rules for civil time zones, especially for daylight saving times, every few years, so the only really reliable way of describing a local time zone is to specify numerically the difference of local time to UTC. Better use directly UTC as your only time zone where this is possible and then you do not have to worry about time zones and daylight saving time changes at all.

More Information about Time Zones

Arthur David Olson and others maintain a database of all current and many historic time zone changes and daylight saving time algorithms. It is available via ftp from elsie.nci.nih.gov in the tzcode* and tzdata* files. Most Unix time zone handling implementations are based on this package. If you want to join the tz mailing list, which is dedicated to discussions about time zones and this software, please send a request for subscription to tz-request@elsie.nci.nih.gov. You can read previous discussion there in the tz archive.

Other Links about Date, Time, and Calendars

Some other interesting sources of information about date and time on the Internet are for example the Glossary of Frequency and Timing Terms and the FAQ provided by NIST, the Yahoo Science:Measurements and Units:Time link collection, the U.S. Naval Observatory Server, the International Earth Rotation Service (IERS) (for time gurus only!), the University of Delaware NTP Time Server, the time and calendar section of the USENET sci.astro FAQ, and the Calendar FAQ.


This was a brief overview of the ISO 8601 standard, which covers only the most useful notations and includes some additional related information. The full standard defines in addition a number of more exotic notations including some for periods of time. The ISO 8601:1988 document is fortunately now also available online, or you can order a paper copy from

International Organization for Standardization
Case postale 56
1, rue de Varembé
CH-1211 Genève 20
Switzerland

phone: +41 22 749 01 11
fax: +41 22 733 34 30
email: sales@isocs.iso.ch

A more detailed online summary of ISO 8601 than this one is the text ISO 8601:1988 Date/Time Representations available from ftp.informatik.uni-erlangen.de/pub/doc/ISO/ISO8601.ps.Z (PostScript, 16 kb, 5 pages) written by Gary Houston, now also available in HTML. Ian Galpin (G1SMD) proposes to use ISO 8601 as a Common Date-Time Standard for Amateur Radio. Steve Adams has written another web page about the ISO date format that is partially based on this text.

ISO TC 154 decided in 1996 to revise ISO 8601. Louis Visser is coordinating this project. If you want to contribute to this work, you should contact your national ISO member organization.


I wish to thank Edward M. Reingold for developing the fine GNU Emacs calendar functions, as well as Rich Wales, Mark Brader, Paul Eggert, and others in the comp.std.internat, comp.protocols.time.ntp, and sci.astro USENET discussion groups for valuable comments about this text. Further comments and hyperlinks to this page are very welcome.

Some journalists recently got interested in the international date and time format and reported about it. Examples include:

  • An article by Jon G. Auerbach in the 1999-06-01 issue of the Wall Street Journal, page A1.

If you are a journalist and need information on this or related topics, please feel free to contact me.

You might also be interested in the International Standard Paper Sizes Web page.

Markus Kuhn <Markus.Kuhn@cl.cam.ac.uk>
created 1995 -- last modified 2000-01-24 -- http://www.cl.cam.ac.uk/~mgk25/iso-time.html ircd-ircu-2.10.12.10.dfsg1/doc/strings.txt0000644000175000017500000000164707064611034017640 0ustar madkissmadkissStrings Information for ircu Client: name: (nickname for clients, server name for servers) set in s_conf.c when checking C/N lines for a server set in s_user.c during client registration username: (user name string) set in s_auth.c if the client RFC 931 authentication query successful. set in s_user.c if auth query unsuccessful. info: (string) set in s_serv.c during server registration set in s_user.c during client registration passwd: (password string) set in xxx.c when used in xxx.c cleared in xxx.c when sock_ip: (ip address) set in s_bsd.c when connection is established used in s_conf.c when looking for conf entries not cleared sockhost: (resolved host name or ip address) set in s_bsd.c when connection is established (copied from sock_ip) set in s_auth.c if dns query is successful set in s_conf.c if a C line is found that matches something in dns_reply.hp used in opercmds.c ircd-ircu-2.10.12.10.dfsg1/doc/snomask.html0000644000175000017500000001674110374773142017757 0ustar madkissmadkiss SNOMASK - Server Notice Masks

SNOMASK - Server Notice Masks

Written by Ghostwolf 18th June 1997
Modified with permission by loki 12th November 1997


This document (hopefully) gives a brief explanation of the use of server notice masks new to ircu2.10.00. This mask allows clients to specify which types of server notices they will receive when usermode +s. The mask may optionally be omitted, and reasonable defaults will be used by the server.

Note: the descriptions here will be best understood by those with knowledge of C syntax. We do not attempt to explain either this or hexadecimal values in this document, and familiarity with these is assumed of the reader.

Usage: /mode <nick> +s [+/-][mask]

VariableDescription
Mask   Hex value Description
1 SNO_OLDSNO 0x1 /* unsorted old messages */
2 SNO_SERVKILL 0x2 /* server kills (nick collisions) */
4 SNO_OPERKILL 0x4 /* oper kills */
8 SNO_HACK2 0x8 /* desyncs */
16 SNO_HACK3 0x10 /* temporary desyncs */
32 SNO_UNAUTH 0x20 /* unauthorized connections */
64 SNO_TCPCOMMON 0x40 /* common TCP or socket errors */
128 SNO_TOOMANY 0x80 /* too many connections */
256 SNO_HACK4 0x100 /* Uworld actions on channels */
512 SNO_GLINE 0x200 /* glines */
1024 SNO_NETWORK 0x400 /* net join/break, etc */
2048 SNO_IPMISMATCH 0x800 /* IP mismatches */
4096 SNO_THROTTLE 0x1000 /* host throttle add/remove notices */
8192 SNO_OLDREALOP 0x2000 /* old oper-only messages */
16384 SNO_CONNEXIT 0x4000 /* client connect/exit (ugh) */
32768 SNO_AUTO 0x8000 /* AUTO G-Lines */
65536 SNO_DEBUG 0x10000 /* debugging messages (DEBUGMODE only) */
131072 SNO_AUTH 0x20000 /* iauth status messages */

standard +s SNO_DEFAULT (SNO_NETWORK | SNO_OPERKILL | SNO_GLINE)
standard +s when +o/O SNO_DEFAULT | SNO_HACK2 | SNO_HACK4 | SNO_THROTTLE | SNO_OLDSNO)
only opers may set SNO_OPER (SNO_CONNEXIT | SNO_OLDREALOP | SNO_AUTH)


Examples of Usage

To receive only operkills, use /mode +s 4
To receive operkills and glines, add the values:
/mode <nick> +s 516

(512+4=516)

If you are already receiving some notices and you wish to add notices of netjoins/breaks use:

/mode Ghostwolf +s +1024

If you wish to stop receiving netjoin/break notices, but continue to receive other notices, use:

/mode Ghostwolf +s -1024
OR
/mode Ghostwolf -s +1024

A user typing /mode Ghostwolf +s will receive netsplits/joins, operkills, and g-lines.

Opers who are +s will additionally receive HACK notices and anything that was originally in sendto_ops() and wasn't changed. Only opers can choose to receive connect/exit notices and anything that originally was in sendtoreal_ops() and hasn't been changed (connect/exit notices also require a #define in config.h).


If you have further questions about server notices (implementation, etc.),
please consult the ircu source code and/or e-mail coder-com@undernet.org.

Return to main Documents Project page
ircd-ircu-2.10.12.10.dfsg1/doc/readme.features0000644000175000017500000006535010570315557020413 0ustar madkissmadkissMany of the old compile-time options are now configured through the server configuration file, ircd.conf. This file is intended to document each of these features. Logging, although also configured through the use of Feature entries, is documented in doc/readme.log. NOTE THAT THESE NAMES ARE CASE SENSITIVE! Values are not case sensitive unless stated otherwise in the documentation for that feature. DOMAINNAME * Type: string * Default: picked by ./configure from /etc/resolv.conf This option allows you to specify what you consider to be "local." It is only used for statistics. When you issue the IRC command /STATS w, the server will respond with statistics of how many clients have been connecting to your server in the last minute, hour and day. It will give these statistics for all connections (including the servers), all clients (from anywhere) and also for clients whose hostname ends on the domain you specify here. So if you are an ISP and you want to know what the client load from your own domain is, specify that domain here. If you are unsure what to do, then it isn't really important what you give here, just don't give an empty string. A good guess is the last two parts of your own hostname (i.e., if your hostname is foo.bar.nowhere.org, specify "nowhere.org"). Note that the string you give should NOT start with a "." and you should not use quotes. RELIABLE_CLOCK * Type: boolean * Default: FALSE You should really ONLY specify "TRUE" here when your system clock is stable and accurate at all times (within a few seconds). If you are running ntpdate on a regular basis, or an equivalent like xntpd, to keep your system clock synchronized over the network, then you might have an accurate clock. However, this is not guaranteed; for example, it is known that xntpd gives unstable results on Linux in some cases. Note that an unstable clock is worse then an clock that has a constant offset, because the servers attempt to correct for a constant offset, but do not correct jumps of your system clock! In general you SHOULD be running ntpdate or equivalent AND make sure it works when you run a production server on Undernet. Otherwise leave your clock alone and specify "FALSE" here. If unsure specify "FALSE"! BUFFERPOOL * Type: integer * Default: 27000000 This specifies the maximum amount of RAM that your server will allocate for buffering sendQs. Small leafs can use a value as little as 1000000, while large HUBs need to specify a value as high as 20000000. If you run out of memory, clients and/or servers are dropped with the error "Buffer allocation error"; then you will have to increase this number (and install more RAM if appropriate). If you want a more educated guess for this value then realize that any value is good if you _really_ would rather drop servers and clients than allocate more memory; this will be the case when there is the danger you may run out of memory for other allocations. Even if you run the daemon on a dedicated machine, specifying all of the RAM you have is a bad thing, because running out of memory is a lot worse than dropping clients in a controlled way; if possible you should have memory left for all the internal structures (channels, clients, ban lists, receive buffers) at all times. On average, clients seem to use 150 bytes of sendQ, but at peak moments this can easily increase to 2032 bytes per client (sendQs are allocated in chunks of 2032 bytes). The maximum possible amount that can be allocated for sendQs is the number of connected clients times whatever you specified as the maximum sendQ in your Class blocks in the ircd.conf file. That value will likely be larger then the amount of RAM you have. The educated guess I talked about earlier would be "number of clients" times * 2048 bytes + "size of net.burst" * n, where "n" is 1 for leafs and up to 5 for HUBs. The "size of net.burst" is about 125 bytes per online client (on the whole network). For large HUBs with 4000 clients on a network with 30,000 users, this results in 27 Mb. Leafs could use 12 Mb. Of course you can use less when you have less than 4000 local clients. This value is in bytes. HAS_FERGUSON_FLUSHER * Type: boolean * Default: FALSE If you have a server with a lot of resources available, this option will cause the server to attempt to flush its internal buffers before dropping clients during a net break. Don't define this if you don't know for certain; if you're not careful this can end up rebooting FreeBSD boxes. For more information, refer to freebsd.txt, also in this directory. CLIENT_FLOOD * Type: integer * Default: 1024 Currently, everything that a client sends to a server is read by the server and stored in a buffer (the clients receive queue). The server will process messages from this queue one by one (running over all clients each time). When a client sends new messages faster they get processed, and the size of its receive buffer reaches this value, the client is dropped with the error "Excess flood." A reasonable value is 1024 bytes. The maximum size is 8000 bytes. SERVER_PORT * Type: integer * Default: 4400 When an IRC operator attempts a connect to another server, he or she may not know which port the connect should go to. In this server version, that operator may use the special port 0, in which case the server will take the port from the Connect block. If no port is specified in the Connect block, however, the port specified by this option will be used instead. NODEFAULTMOTD * Type: boolean * Default: TRUE Every time a client connects to your server, the full Message of the Day (as specified by the Motd blocks or by the file specified by the MPATH option) is sent to the client. The server sends the Message of the Day even though many clients permit the user to ignore it. Many users never read the message of the day anyway, making it a huge waste of bandwidth. If you specify "TRUE" here, then the server won't send the MOTD to the client by default; instead, it will only tell the client when the MOTD was last changed, and give instructions on how to obtain it by typing /MOTD. MOTD_BANNER * Type: string * Default: NULL If you enable NODEFAULTMOTD, this specifies a one-line banner to be sent to the client in addition to the instructions mentioned above. PROVIDER * Type: string * Default: NULL This string as added to the 001 numeric prefixed with "via" before the nick. It's used for providing promotional space to providers as per CFV-202 KILL_IPMISMATCH * Type: boolean * Default: FALSE When a client connects to your server, the IP address of the client is reverse-resolved to obtain a hostname. Then that hostname is resolved to an IP address and compared with the IP address of the client. If they don't match, the client will appear with the IP address instead of the hostname, unless KILL_IPMISMATCH is "TRUE," in which case the client is simply disconnected. IDLE_FROM_MSG * Type: boolean * Default: TRUE The IRC command WHOIS gives an idle time for clients. If you want this idle time to be set to zero only when the client sends a PRIVMSG, then you should specify "TRUE" here. If you specify "FALSE," then the idle time will be nullified on all messages except the server PING/PONG. HUB * Type: boolean * Default: FALSE All servers of an IRC "network" are connected in a "tree" (no loops). Servers that are only connected to one other server (called the "uplink") are called "leafs"; servers that are connected to more than one other server are called HUBs. If you specify "FALSE" here then your server will prevent itself from accidentally connecting to two servers at once, thus keeping servers in poor network locations from routing traffic. Note that on Undernet, all newly linked servers are linked as leafs during their test phase, and should specify "FALSE" here. WALLOPS_OPER_ONLY * Type: boolean * Default: FALSE Setting this option removes the ability for clients that are not IRC operators to see wallops messages. NODNS * Type: boolean * Default: FALSE If you are playing with the server off-line, and no DNS is available, then long delays occur before the server starts up because it tries to resolve the name given in the General block (which usually isn't given in /etc/hosts) and for each connecting client. If you specify "TRUE" here, then a DNS lookup will be done only for the real hostname, and the server will not try to resolve clients that connect to "localhost." Note that other DNS lookups are still done for outbound connections. RANDOM_SEED * Type: string * Default: none When a client connects, the server sends the client a "cookie," consisting of a random number. The client must return the cookie to the server verbatim. This is done to prevent IP spoofing. The cookie is generated by a pseudorandom number generator included in ircd. This generator must be seeded with a phrase that is kept secret, to ensure that the numbers it generates are not easily guessed. The value given to RANDOM_SEED may be a string of any length. It should not contain any characters that are considered special by the configuration file system, such as ":" or "#"; the string should be at least 8 characters long, but longer strings are better. The RANDOM_SEED may not be retrieved online. DEFAULT_LIST_PARAM * Type: string * Default: none The LIST command takes a single optional argument. If given, that argument is either a channel or a filter. If that argument is not given, then by default, /LIST will list all channels on the network. Needless to say, this can generate a large amount of data on large networks with many channels, as well as chewing up a lot of CPU time. Server administrators can therefore set a default filter to be applied to the channel list if the optional argument to LIST is omitted. NICKNAMEHISTORYLENGTH * Type: integer * Default: 800 This value specifies the length of the nick name history list, which is used for /WHOWAS and some nickname chasing in /KILL and /KICK. It uses about 300 to 400 bytes per entry. Note that at a net break, so many client disappear that the whole "whowas" list is refreshed a few times (unless you make it rather large). A reasonable value is "total number of clients" / 25. HOST_HIDING * Type: boolean * Default: TRUE This selects whether local users can set umode +x, thus allowing them to hide their hostname if they have also registered with a channel service (i.e. they have the ACCOUNT flag set). HIDDEN_HOST * Type: string * Default: users.undernet.org This selects the suffix for the hidden hostmask (see HOST_HIDING). HIDDEN_IP * Type: string * Default: 127.0.0.1 This selects a fake IP to be shown on /USERIP and /WHO %i when the target has a hidden host (see HOST_HIDING). CONNEXIT_NOTICES * Type: boolean * Default: FALSE This feature controls the generation of server notices when a user connects to or disconnects from the server. Enabling this feature may have a performance impact. KILLCHASETIMELIMIT * Type: integer * Default: 30 If a user changes his or her nickname just before an operator issues a /KILL, the /KILL will be changed to follow the user the operator intended to get. This option specifies the time limit, in seconds, for this nickname change; if the user changed his or her nickname more than this many seconds ago, the /KILL will not be changed. Don't change this unless you really need to. MAXCHANNELSPERUSER * Type: integer * Default: 10 This is the maximum number of channels a user can be in at a time. The "mandatory" value on Undernet is currently 10. Since it only influences the local server when you decrease it, its up to you to decide if you want to use a smaller value. Do not use a larger value however, because it DOES cost more memory and bandwidth on all other servers when you allow users to join more channels simultaneously. One of the most important reasons to choose a smaller value is the fact that the "GUI" clients tend to stay on every channel they join (they aren't bothered by flooding in other channels). It DOES take your bandwidth however to send all those messages for 10 different channels to all your users. AVBANLEN * Type: integer * Default: 40 This is the expected average ban mask length. Leave it at 40. MAXBANS * Type: integer * Default: 45 This is the maximum number of bans a user may set on a given channel. MAXSILES * Type: integer * Default: 15 This is the maximum number of masks a user can silence at a time. The silence command allows users to filter messages directed at them from certain users or domains, at the source server. Increasing this number allows users to use up more memory with inefficient use of the command. If you're not sure, don't change this. HANGONGOODLINK * Type: integer * Default: 300 Often the net breaks for a short time and it is useful to try to reestablish the same connection faster than CONNECTFREQUENCY would allow, but to keep from trying again on a bad connection, we require that the connection be open for a certain minimum time. The recommended value is 300 seconds. HANGONRETRYDELAY * Type: integer * Default: 10 When attempting to quickly reestablish a connection to a good link, we give the net a few seconds to calm down. This time must be long enough for the other end to also notice that the connection is broken. The recommended value is 10 seconds. CONNECTTIMEOUT * Type: integer * Default: 90 Number of seconds to wait for a connect(2) call to complete. NOTE: this must be at *LEAST* 10. When a client connects, it has CONNECTTIMEOUT - 10 seconds for its host to respond to an ident lookup query and for a DNS lookup to complete. It is recommended that you not change this value, but if you do, consider the fact that users whose clients do not support NOSPOOF will have to type /QUOTE PING before registration. MAXIMUM_LINKS * Type: integer * Default: 1 This is the maximum number of links for the built-in client class 0. Leave this value at 1. PINGFREQUENCY * Type: integer * Default: 120 If the daemon doesn't receive anything from any of its links within PINGFREQUENCY seconds, then the it will attempt to check for an active link with a PING message. If no reply is received within (PINGFREQUENCY * 2) seconds, then the connection will be closed. This value may be overridden by a Class block in "ircd.conf" if the connection's Client or Connect block in "ircd.conf" assigns a specific class to the connection (recommended). CONNECTFREQUENCY * Type: integer * Default: 600 This is the default frequency that the server attempts to reconnect with its uplink server if it is set to auto connect to it. Note that this value is overridden by a Class block in ircd.conf if the Connect entries in ircd.conf assign a specific class to the connection. DEFAULTMAXSENDQLENGTH * Type: integer * Default: 40000 This is the default value of the maximum sendQ length of connection classes (see doc/example.conf for details on Class blocks). You will generally override this value in your "ircd.conf" with a Class block. GLINEMAXUSERCOUNT * Type: integer * Default: 20 G-lines that affect too many users have to be set with a special command, to prevent accidental G-lines of large blocks of users. This feature sets that particular threshold. MPATH * Type: string * Default: "ircd.motd" MPATH is the filename (relative to DPATH) or the full path of the "Message of the Day" file. The contents of this file will be sent to every client that connects to the server, after registration. RPATH * Type: string * Default: "remote.motd" RPATH is the filename (relative to DPATH) or the full path of the "Remote Message of the Day" file. The contents of this file will be sent to every remote client that issues a /MOTD . Only the first three lines are sent, so you might want to keep that in mind while writing the file. PPATH * Type: string * Default: "ircd.pid" PPATH is the filename (relative to DPATH) or the full path of the "PID" file. It is used for storing the server's process ID so that a ps(1) isn't necessary. TOS_SERVER * Type: integer * Default: 0x08 This option is used to specify the type of service that will be requested for connections to other servers. The value may be given as a hexadecimal integer. TOS_CLIENT * Type: integer * Default: 0x08 This option is used to specify the type of service that will be requested for connections to users. The value may be given as a hexadecimal integer. POLLS_PER_LOOP * Type: integer * Default: 200 Some of the engines used by the event interface get a number of events from the kernel at once. Since the number retrieved can impact performance, it can be tuned by modifying this value. The engines enforce a lower limit of 20. CONFIG_OPERCMDS * Type: boolean * Default: FALSE Since u2.10.11, several new oper-only features have been added that involve changes to the server<->server protocol. This configuration option provides a single switch to prevent the use of these features until the entire network has been upgraded. It is not required that all servers set this to "TRUE" in order for the features to be used, as long as all servers are running u2.10.11 or above. HIS_MAP * Type: boolean * Default: TRUE As per UnderNet CFV-165, this removes /MAP from users. HIS_SNOTICES * Type: boolean * Default: TRUE As per UnderNet CFV-165, this removes server notices from users. HIS_SNOTICES_OPER_ONLY * Type: boolean * Default: TRUE As per UnderNet CFV-165, this removes server notices from users. HIS_DEBUG_OPER_ONLY * Type: boolean * Default: TRUE As per UnderNet CFV-165, this removes server wallops from users. HIS_WALLOPS * Type: boolean * Default: TRUE As per UnderNet CFV-165, this removes operator wallops from users. HIS_LINKS * Type: boolean * Default: TRUE As per UnderNet CFV-165, this removes /LINKS from users. HIS_TRACE * Type: boolean * Default: TRUE As per UnderNet CFV-165, this removes /TRACE from users. HIS_STATS_a * Type: boolean * Default: TRUE As per UnderNet CFV-165, this removes /STATS a from users. HIS_STATS_c * Type: boolean * Default: TRUE As per UnderNet CFV-165, this removes /STATS c from users. HIS_STATS_d * Type: boolean * Default: TRUE As per UnderNet CFV-165, this removes /STATS d from users. HIS_STATS_e * Type: boolean * Default: TRUE As per UnderNet CFV-165, this removes /STATS e from users. HIS_STATS_f * Type: boolean * Default: TRUE As per UnderNet CFV-165, this removes /STATS f from users. HIS_STATS_g * Type: boolean * Default: TRUE As per UnderNet CFV-165, this removes /STATS g from users. HIS_STATS_i * Type: boolean * Default: TRUE As per UnderNet CFV-165, this removes /STATS i from users. HIS_STATS_j * Type: boolean * Default: TRUE As per UnderNet CFV-165, this removes /STATS j from users. HIS_STATS_J * Type: boolean * Default: TRUE As per UnderNet CFV-165, this removes /STATS J from users. HIS_STATS_k * Type: boolean * Default: TRUE As per UnderNet CFV-165, this removes /STATS k from users. HIS_STATS_l * Type: boolean * Default: TRUE As per UnderNet CFV-165, this removes /STATS l from users. HIS_STATS_L * Type: boolean * Default: TRUE As per UnderNet CFV-165, this removes /STATS L from users. HIS_STATS_M * Type: boolean * Default: TRUE As per UnderNet CFV-165, this removes /STATS M from users. HIS_STATS_m * Type: boolean * Default: TRUE As per UnderNet CFV-165, this removes /STATS m from users. HIS_STATS_o * Type: boolean * Default: TRUE As per UnderNet CFV-165, this removes /STATS o from users. HIS_STATS_p * Type: boolean * Default: TRUE As per UnderNet CFV-165, this removes /STATS p from users. HIS_STATS_q * Type: boolean * Default: TRUE As per UnderNet CFV-165, this removes /STATS q from users. HIS_STATS_r * Type: boolean * Default: TRUE As per UnderNet CFV-165, this removes /STATS r from users. HIS_STATS_R * Type: boolean * Default: TRUE As per UnderNet CFV-165, this removes /STATS R from users. HIS_STATS_t * Type: boolean * Default: TRUE As per UnderNet CFV-165, this removes /STATS t from users. HIS_STATS_T * Type: boolean * Default: TRUE As per UnderNet CFV-165, this removes /STATS T from users. HIS_STATS_u * Type: boolean * Default: FALSE As per UnderNet CFV-165, this allows users to perform /STATS u. HIS_STATS_U * Type: boolean * Default: TRUE As per UnderNet CFV-165, this removes /STATS U from users. HIS_STATS_v * Type: boolean * Default: TRUE As per UnderNet CFV-165, this removes /STATS v from users. HIS_STATS_w * Type: boolean * Default: FALSE As per UnderNet CFV-165, this allows users to perform /STATS w. HIS_STATS_x * Type: boolean * Default: TRUE As per UnderNet CFV-165, this removes /STATS x from users. HIS_STATS_y * Type: boolean * Default: TRUE As per UnderNet CFV-165, this removes /STATS y from users. HIS_STATS_z * Type: boolean * Default: TRUE As per UnderNet CFV-165, this removes /STATS z from users. HIS_STATS_IAUTH * Type: boolean * Default: TRUE As per UnderNet CFV-165, this disables /STATS IAUTH and /STATS IAUTHCONF from users. HIS_WHOIS_SERVERNAME * Type: boolean * Default: TRUE As per UnderNet CFV-165, this removes server names in replies to /WHOIS. HIS_WHOIS_IDLETIME * Type: boolean * Default: TRUE As per UnderNet CFV-165, this removes idle time in replies to /WHOIS. HIS_WHO_SERVERNAME * Type: boolean * Default: TRUE As per UnderNet CFV-165, this removes server names in replies to /WHO. HIS_WHO_HOPCOUNT * Type: boolean * Default: TRUE As per UnderNet CFV-165, this replaces hopcount to a static 3 in replies to /WHO. HIS_MODEWHO * Type: boolean * Default: TRUE As per UnderNet CFV-165, this doesn't show which server performed a channel mode change. HIS_BANWHO * Type: boolean * Default: TRUE As per UnderNet CFV-165, this doesn't show which server set a ban. HIS_KILLWHO * Type: boolean * Default: TRUE As per UnderNet CFV-165, this doesn't show which server or oper performed a kill. HIS_REWRITE * Type: boolean * Default: TRUE As per UnderNet CFV-165, this remaps remote numerics to come from the local server. HIS_REMOTE * Type: integer * Default: 1 As per UnderNet CFV-165, this disallows remote queries. (*sob!*) HIS_NETSPLIT * Type: boolean * Default: TRUE As per UnderNet CFV-165, this removes server names in net break sign-offs. HIS_WHOIS_LOCALCHAN * Type: boolean * Default: TRUE As per UnderNet CFV-165, this removes local channels in replies to /WHOIS. HIS_SERVERNAME * Type: string * Default: "*.undernet.org" As per UnderNet CFV-165, this is the "name" of the server shown to users on a /WHOIS of another user. HIS_SERVERINFO * Type: string * Default: "The Undernet Underworld" As per UnderNet CFV-165, this is the "info" of the server shown to users on a /WHOIS of another user. HIS_URLSERVERS * Type: string * Default: "http://www.undernet.org/servers.php" As per UnderNet CFV-165, this is the URL shown to users when they do a /MAP or /LINKS. NETWORK * Type: string * Default: "UnderNet" This defines the network name as reported in the 005 "supported features" numeric, and as used by the "Failed to deliver" message. URL_CLIENTS * Type: string * Default: "ftp://ftp.undernet.org/pub/irc/clients" This defines a URL that users may visit to find compatible IRC clients. URLREG * Type: string * Default: "http://cservice.undernet.org/live/" This defines a URL that is used in server response 477 (ERR_NEEDREGGEDNICK) to let users know which website they must visit to obtain a proper account for authentication. NICKLEN * Type: integer * Default: 12 This is the allowed length of the nickname length. It may not be larger than the NICKLEN #define, and should usually be the same length. The real purpose of this feature is to permit easy increases in nickname length for a network. IRCD_RES_RETRIES * Type: integer * Default: 2 This is the number of attempts the irc daemon's resolver will have at trying to solicit a response from the DNS server. IRCD_RES_TIMEOUT * Type: integer * Default: 4 When a DNS query is sent, the irc daemon's resolver will wait this many seconds for a reply. After this timeout has expired, it will retry again, for as many retries as IRCD_RES_RETRIES allows. This can be cut short by AUTH_TIMEOUT expiring. NOTE: Has no effect when using the adns resolver. AUTH_TIMEOUT * Type: integer * Default: 9 This is the maximum number of seconds to wait for the ident lookup and the DNS query to succeed. On older (pre 2.10.11.06) servers this was hard coded to 60 seconds. IPCHECK_CLONE_LIMIT * Type: integer * Default: 4 The number of times you are allowed to connect within IPCHECK_CLONE_PERIOD seconds before you are considered abusing the server and throttled. IPCHECK_CLONE_PERIOD * Type: integer * Default: 40 The number of seconds you are allowed to connect IPCHECK_CLONE_LIMIT times within before you are considered abusing the server and throttled. For instance if you set IPCHECK_CLONE_LIMIT to 1, and IPCHECK_CLONE_PERIOD to 10, then a user is only allowed to connect once in 10s, if they connect again within 10s, then they are considered to be connecting too fast and they are throttled. IPCHECK_CLONE_DELAY * Type: integer * Default: 600 The number of seconds grace after restarting the server before the throttle code kicks in. Even if a user connects repetitively during this period, they will never get throttled. This is so after a restart users on a multiuser box can all connect to a server simultaniously without being considered an attack. SOCKSENDBUF * Type: integer * Default: 61440 The send window size used for connections to other servers. SOCKRECVBUF * Type: integer * Default: 61440 The receive window size used for connections to other servers. ANNOUNCE_INVITES * Type: boolean * Default: FALSE If set, send RPL_ISSUEDINVITE (345) to a channel's operators to announce when someone is invited to the channel. LOCAL_CHANNELS * Type: boolean * Default: TRUE If set, allow users to create local channels. TOPIC_BURST * Type: boolean * Default: FALSE If set, send the current topic value and timestamp for channels during burst. This generally only makes sense for hubs to use, and it causes a large increase in net.burst size. CHANNELLEN * Type: integer * Default: 200 This is the allowed length of locally created channels. It may not be larger than the CHANNELLEN #define. Like the NICKLEN feature, this is intended to ease changes in channel name length across a network. OPLEVELS * Type: boolean * Default: TRUE This allows local users to set the +A and +U modes (admin and user passwords, respectively) on channels where they are marked as channel managers. This feature must be disabled until all servers on the network are able to interpret and handle these modes correctly. ZANNELS * Type: boolean * Default: TRUE This preserves empty channels with no admin password so that it is impractical to become the channel manager by clearing out the channel. It must be set to FALSE if there are both 2.10.11.x servers and 2.10.12.y servers on the network where y < 4. It should be set to TRUE whenever the OPLEVELS features is TRUE. ircd-ircu-2.10.12.10.dfsg1/doc/Authors0000644000175000017500000002010610066430740016744 0ustar madkissmadkiss/************************************************************************ * IRC - Internet Relay Chat, doc/AUTHORS * Copyright (C) 1990 * * AUTHORS FILE: * This file attempts to remember all contributors to the IRC * developement. Names can be only added this file, no name * should never be removed. This file must be included into all * distributions of IRC and derived works. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 1, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ IRC was conceived of and written by Jarkko Oikarinen . IRC was originally written in University of Oulu, Computing Center. Jan 1991 - IRC 2.6 jto@tolsun.oulu.fi - Multiple Channels and protocol changes Contributions were made by a cast of dozens, including the following: Markku Jarvinen : Emacs-like editing facility for the client Kimmo Suominen : HP-UX port Jeff Trim : enhancements and advice Vijay Subramaniam : advice and ruthless publicity Karl Kleinpaste : user's manual Greg Lindahl : AUTOMATON code, the Wumpus GM automaton, myriad bug fixes Bill Wisner : numerous bug fixes and code enhancements Tom Davis and Tim Russell : VMS modifications Markku Savela : advice, support, and being the incentive to do some of our *own* coding. :) Tom Hopkins : bug fixes, quarantine lines, consolidation of various patches. Christopher Davis : EFnet/Anet gateway coding, many automata ;), documentation fixing. Helen Rose : documentation updating, and fixing. Tom Hinds : emacs client updating. Tim Miller : various server and client-breaking features. Darren Reed : various bug fixes and enhancements. Introduced nickname and channelname hash tables into the server. The version 2.2 release was coordinated by Mike Bolotski . The version 2.4 release was coordinated by Markku Savela and Chelsea Ashley Dyerman The version 2.5.2 release was coordinated by Christopher Davis, Helen Rose, and Tom Hopkins. The versions 2.6.2, 2.7 and 2.8 releases were coordinated by Darren Reed. Contributions for the 2.8 release from the following people: Matthew Green Chuck Kane Matt Lyle Vesa Ruokonen Markku Savela / April 1990 Fixed various bugs in 2.2PL1 release server (2.2msa.4) and changed sockets to use non-blocking mode (2.2msa.9). [I have absolutely nothing to do with clients :-] Chelsea Ashley Dyerman / April 1990 Rewrote the Makefiles, restructuring of source tree. Added libIrcd.a to the Makefile macros, numerous reformatting of server text messages, and added mkversion.sh to keep track of compilation statistics. Numerous bug fixes and enhancements, and co-coordinator of the 2.4 release. Jarle Lyngaas (nmijl@alf.uib.no) added Note functions to ircd. Armin Gruner / May, June 1990: * Patched KILL-line feature for ircd.conf, works now. Enhancement: Time intervals can be specified in passwd-field. Result: KILL-Line is only active during these intervals * Patched PRIVMSG handling, now OPER can specify masks for sending private messages, advantage: msg to all at a specified server or host. * Little tests on irc 2.5 alpha, fixed some little typos in client code. Change: common/debug.c has been moved to ircd/s_debug.c, and a irc/c_debug.c has been created, for the benefit that wrong server msg are displayed if client does not recognize them. (strange, if a server sends an 'unknown command', isn't it?) Tom Hopkins / September, October 1990: * Patched msa's K lines for servers (Q lines). * Consolidated several patches, including Stealth's logging patch. * Fixed several minor bugs. * Has done lots of other stuff that I can't seem to remember, but he always works on code, so he has to have done alot more than three lines worth. :) Thanks go to those persons not mentioned here who have added their advice, opinions, and code to IRC. Various modifications, bugreports, cleanups and testing by: Hugo Calendar Bo Adler Michael Sandrof Jon Solomon Jan Peterson Nathan Glasser Helen Rose Mike Pelletier Basalat Ali Raja Eric P. Scott Dan Goodwin Noah Friedman UNDERNET (1991 - 1999) -------- The Undernet versions (TSpre8, u2.9 and u2.10) are based on ircd-2.8.10 and contain thousands of hours of work by Carlo Wood (Run on IRC). The number of protocol enhancements, changes and additions that have been added are too many to summarize. All patches are kept in the cvs repository at http://coder-com.undernet.org/. Discussions on this server code are currently on the mailing list coder-com@undernet.org, or in #coder-com on undernet. The current maintainer is Bleep. Various additions and bugfixes have been contributed by: Aaron Bleep CaptJay CapVideo Chaos Cym Derrick Ensor flux Ghostwolf Gte- Isomer Jamey Jarle Kev Nemesi Niels Run record smg SeKs Simon- Starfox Trio WildThang Xorath UNDERNET (2000 - 2004) -------- The Undernet versions (P9, P10, u2.10.11 and u2.10.12) are based on ircu2.10.07 and contain many hours of work by Coder Commitee. The number of protocol enhancements, changes and additions that have been added are too many to summarize. All patches are kept in the cvs repository at http://coder-com.undernet.org/. Discussions on this server code are currently on the mailing list coder-com@undernet.org, or in #coder-com on undernet. The current maintainer is Isomer. Various additions, testings and bugfixes have been contributed by: A1kmm Bleep Gte- Isomer Kev Delete Ghostwolf Braden net Steven OmniDynmc Dianora Sengaia Cyberdude Maniac- Vampire- mbuna beware n3tguy reed Math hikari Bleep froo splidge Zarjazz Spike Jeekay Entrope ircd-ircu-2.10.12.10.dfsg1/doc/readme.who0000644000175000017500000003220210552223663017354 0ustar madkissmadkissWHO documentation, updated on 02 Jan 1999. Since ircu2.10.02 the WHO command had been changed from what described in RFC1459, while still keeping backward compatibility, actually it has been changed again in u2.10.05 so that since this release the format of the who query is now: [:source] WHO [ []] is optional, if mask2 is present it's used for matching and mask1 is ignored, otherwise mask1 is used for matching, since mask2 is the last parameter it *can* contain a space and this can help when trying to match a "realname". When matching IP numbers the can be in 3 forms: - The old and well known IRC masks using * and ? as wanted - The IPmask form a.b.c.d/e.f.g.h as used in most firewalls and system configurations, where what is before the / are the bits we expect in the IP number and what is after the / is the "filter mask" telling wich bits whould be considered and wich should be ignored. - The IPmask form a.b.c.d/bitcount where bitcount is an integer between 0 and 31 (inclusive), the matching will be for the IPs whose first "bitcount" bits are equal to those in a.b.c.d Note that: . The bitcount must be between 0 and 31, 32 is NOT good (and makes no sense to use it... just match against the static IP a.b.c.d) . The missing pieces of both the bitmask and the ipnumber in the forms ipnumber/bitmask and ipnumber/bitcount default to zero from right to left, this is NOT what inet_aton and most tools do but makes more sense here IMO, in example /who 194.243/16 is taken as /who 194.243.0.0/255.255.0.0 (inet_aton whould take 194.243 as 194.0.0.243). . For the above reason and specified validity limits 1.2.3.4/31 becomes 1.2.3.4/255.255.255.254 while 1.2.3.4/32 becomes 1.2.3.4/32.0.0.0 :) For all the other fields th match happens as has always been, i.e. it's only considered the IRC mask with * and ? (that is: don't expect to catch an user with "realname" = "1.2.3.4" when doing "/who 1.2/16 h" :) For both the masks and the options (and thus for all flags) case is NOT significative (so "/who o" is exactly the same as "/who O". The "options" part can be as follows: [][%[[,]]] in which: : can be a sequence of field matching flags, use mode matching flags and special purpose flags Field matching flags, when one of these is specified the field in question is matched against the mask, otherwise it's not matched. n Nick (in nick!user@host) u Username (in nick!user@host) h Hostname (in nick!user@host) i Numeric IP (the unresolved host) s Servername (the canonic name of the server the guy is on) r Info text (formerly "Realname") a Account name If no field-matching flags are specified they default to what old servers used to do: nuhsr (= everything except the numeric IP) User mode matching flags (specifying one of these means that only clients with that umode are considered, what is not specified is always matched): d Join-delayed channel members o Irc operator [In the future more flags will be supported, basically all usermodes plus the +/- specificators to revert the filtering] Special purpose flags: x If this is specified the extended visibility of information for opers is applied, what this means depends on the fact that you are local or global operator and on how the admin configured the server (global and eventually local irc opers might be allowed with this flag to see +i local users, to see all +i users, to see users into +p and/or +s channels, and so on). Using the 'x' flag while not being an irc operator is meaningless (it will be ignored), using it while oper'd means that the query is almost certainly logged and the admin might (rightfully) ask you an explanation on why you did. The rest, what follows the %, that is [%[fields[,]]], is as it has always been since the first who.patch, the part specifies wich fields to include in the output as: c : Include (first) channel name d : Include "distance" in hops (hopcount) f : Include flags (all of them) h : Include hostname i : Include IP l : Include idle time (0 for remote users) [2.10.11+] n : Include nick r : Include real name s : Include server name t : Include the querytype in the reply u : Include userID with eventual ~ a : Include account name o : Include oplevel (shows 999 to users without ops in the channel) And the , final option can be used to specify what you want the server to say in the querytype field of the output, useful to filter the output in scripts that do a kind of "on 354 ..." If no %fields are specified the reply is _exactly_ the same as has always been, numeric 352, same fields, same order. If one or more %fields are specified the reply uses a new numeric, since an out-of-standard 352 crashes EPIC and confuses several other clients. I used 354. :"source" 354 "target" ["querytype"] ["channel"] ["user"] ["IP"] ["host"] ["server"] ["nick"] ["flags"] ["hops"] ["idle"] ["account"] [:"realname"] Where only the fields specified in the %fields options are present. "querytype" is the same value passed in the /who command, it is provided to simplify scripting, in example one could pass a certain value in the query and have that value "signal" back what is to be done with those replies. The number of lines in the reply is still limited to avoid self-flooding and sooner or later another limitation will be added: you will be forced to do no more than one /who query every 'n' seconds where 'n' depends on the number of fields you actually match (the field-match flags specified before % in the option, defaulting to 6 if you don't specify an option at all), infact matching against many fields as the default query does severely affects the CPU usage of the server and is *much* better to specify with the field-matching flags what you are looking for, in example when you are looking for all french users a "/who *.fr h" is A LOT better than just "/who *.fr" (and actually you want users that have the _hostname_ matching *.fr, you wouldn't want to match a japanese user that has the realname "ku fung-kay aj.fr" in example...) Note that: - An user doing a "/who whatever" or a "/who whatever o" will not see any change (except for the anti-flood limit and sooner or later the CPU usage limit) - An user doing a "/who #wasteland %n" will get just a list of nicks (lame, very lame way of doing it :-) - An user doing a "/who 0 o%nuhs" will get a list of the opers with Nick, userID, server and hostname like: :Amst* 354 Nemesi #wasteland nbakker pc73.a.sn.no Oslo*.org Niels - An user doing a "/who 0 o%tnuhs,166" will get a list of the opers with Nick, userID, server and hostname like the above but with a request type field of 166 like: :Amst* 354 Nemesi 166 #wasteland nbakker pc73.a.sn.no Oslo-R.NO.EU.Undernet.org Niels So that he can have in example a script that does on ^354 "% 166" display "There is an oper ..." - The client will have to sort/format the fields by itself, the _order_ in which flags are passed is not significant, the fields in the reply will always have the same order. - The maximum number of _lines_ reported as reply for a query is 2048/(n+4) where 'n' is the number of flags "enabled" that is the number of fields included in each reply. Actually: 1 field returned = maximum 409 replies 2 fields returned = maximum 341 replies 3 fields returned = maximum 292 replies 4 fields returned = maximum 256 replies 5 fields returned = maximum 227 replies 6 fields returned = maximum 204 replies 7 fields returned = maximum 186 replies (default query) 8 fields returned = maximum 170 replies 9 fields returned = maximum 157 replies 10 fields returned = maximum 146 replies If the limit is reached before completing the query the reply is truncated and a new numeric error is issued after the "End of WHO", anyway the "end of" numeric is _always_ sent (otherwise some scripts and clients go crazy). The actual "mask" to match can have one of the two following forms: - A comma-separated list of elements: in this case each element is treated as a flat channel or nick name and is not matched to the other elements. Nicks do count in the limit of output lines (they should not be that many anyway), channels count if who asks the query is not on the channel. (That is: a /who #channel gives unlimited output if you are in there). - A _single_ mask: in this case (no commas, only one element) the mask is first checked to be a full channel or nickname, then it is matched against all relevant fiels as already known. These happens in different steps with replicates-removal so that if one has (?) something like "#wasteland" as "real name" or is on a channel named "#***MyChan***" it all works nicely. Miscellaneous bug fixes / "undocumented feature" changes: - /who NickName did not show the user with nick = NickName when it was invisible, even if the nick was given completely (without wildchars) now it does, since one could always see him as /whois NickName. It does not report him twice if he also has in example the userID == NickName and is -i. - ":source WHO :The Black Hacker" did not report an user having "The Black Hacker" as real name, now it does. Since this can only be done without the flags/format specificator because that would become the "last parameter" an escape has been provided: if you pass to m_who _3_ parameters the first one will be ignored and the last one used for matching, like in example ":source WHO foo %nuh :*Black Hacker*" where "foo" will not be used and the match will happen on "*Black Hacker*". (It was passed through clean_channelname() that prevented the mask from containing spaces and such...) - When one user was umode -i he was shown or not depending on the fact he was on a +p or +s channel... since we are doing a lookup on the _user_ this makes no sense to me, example: Neme1 : umode -i, on no channels, was SEEN with a /who 0 Neme2 : umode -i, on channel #p with chmode +p, was NOT SEEN by /who 0 Neme3 : umode -i, on channel #s with chmode +s, was NOT SEEN by /who 0 Now all users "-i" are matched with a "/who mask", the +i users instead must be on a _common_ channel to be seen. Basically being on "one" +s|p channel "forced" a +i status while one might want to be on #secret (mode +s) and have nobody know that he is in there but on the other side stay -i so others can find him. Of course a +s|p channel is never shown in the reply unless who asks the query is in there, if no "visible" channels are available for a -i user he is shown on "channel *". - When one user is +i is shown _only_ if there is a common channel, the first common channel found is shown in the reply. - As requested by many persons an escape has been provided for opers, when #defined SHOW_ALL_CHANNELS opers can /who #channel from outside and see users in there even if the channel is +s|+p Each admin decides locally if this feature is enabled to his opers. - As requested by many admins an escape from the query-size limit has been provided for opers, by #defining UNLIMIT_OPER_QUERY opers can do unlimited sized /who-s (until they get disconnected by max SendQ exceeded ;) Again admins will decide if enable or not this feature. - A /who a,c,b,d,e,f used to return as many ** END OF WHO as there were elements in the list, since now the command is supposed to be _efficient_ for /who nick1,nick2,nick3 .. I return a _single_ end of query message. - /who did not work for a channel named in example #**StarWars** now it does handle it properly (the mask was passed through collapse() and then.. did not find that channel, fixed). - "/who #John" did not report an user having '#John' as "Real name", now it does (and does NOT report him twice if he is ALSO on a channel named #John, strange but true: this can happen). - "/who a,b,c,d" where a b c and d are channelnames/nicks now uses an hash lookup and therefore is extremely efficient, if _only_ one field is specified it is looked in all the fields; who really wants _only_ users on a specific channel or a single nick (without looking for a match in the other fields) can force the server to consider the parameter as a list adding a comma somewhere, like: "/who #Italia," or "/who ,Nemesi" Or even better to avoid misbehaviour with other servers: "/who #Italia %... #Italia," or "/who Nemesi %... Nemesi," This will make old servers act properly and new ones and should be the recomended way for GUI based clients to get a channel's userlist and all the infos they want about users on the channel. - If you use the new numeric, flags will contain all the information about a user on a channel. @ for op'd, + for voiced, and ! for zombie. eg: Isomer #coder-com H@+, where the old behavor of just displaying one of them has been preserved for the old numeric. [2.10.11+] Regards, Andrea aka Nemesi ircd-ircu-2.10.12.10.dfsg1/doc/api/0000755000175000017500000000000010561247164016154 5ustar madkissmadkissircd-ircu-2.10.12.10.dfsg1/doc/api/gline.txt0000644000175000017500000002121307312472724020014 0ustar madkissmadkissSome users can be very annoying, as any IRC operator can attest. Some can in fact be downright abusive. Sometimes the best way of dealing with these users is to ban them from the entire network. The G-line system permits this. G-lines are fairly complicated. A G-line can be active or inactive, either locally or globally. It can be a purely local G-line, or global. It could be based on IP address or on host name. In short, there are many variations on the basic G-line. Worse, there is also the concept of a "bad channel," or BADCHAN, that has been tacked onto the G-line subsystem, when it should have been a separate command in the first place. Different types of G-lines are differentiated from each other through the use of various flags. Some of these flags are maintained solely by the G-line subsystem, where as others are passed to various functions in the API. #define GLINE_MAX_EXPIRE 604800 /* max expire: 7 days */ This macro lists the maximum expire time a G-line is permitted to have. This value is limited to 7 days to prevent abuse of the system. #define GLINE_ACTIVE 0x0001 This flag is used to indicate that a given G-line is globally active. #define GLINE_IPMASK 0x0002 This flag is used to indicate that a given G-line is an IP mask. This flag is maintained internally by the G-line subsystem. #define GLINE_BADCHAN 0x0004 This flag is used to indicate that a given G-line specifies a BADCHAN, a channel that users are not permitted to join. This flag is maintained internally, but is also used in gline_find() to search for a BADCHAN for a particular channel. #define GLINE_LOCAL 0x0008 This flag is used to indicate that a given G-line is a local G-line. Local G-lines do not affect users on other servers. #define GLINE_ANY 0x0010 This flag is passed to gline_find() to signal that function to return any G-line or BADCHAN that matches the passed mask string. It is never set on a real G-line. #define GLINE_FORCE 0x0020 This flag is passed to gline_add() to force the server to accept an expire time that might be out of bounds. It is never set on a real G-line. #define GLINE_EXACT 0x0040 This flag is passed to gline_find() to signal that function to return only G-lines that exactly match the passed mask string. That is, the ircd_strcmp() function is called to compare the G-line to the mask, rather than the match() function. This flag is never set on a real G-line. #define GLINE_LDEACT 0x0080 /* locally deactivated */ This flag is set on global G-lines that have been locally deactivated. This flag is maintained internally by the G-line subsystem. #define GLINE_GLOBAL 0x0100 /* find only global glines */ This flag is passed to gline_find() or gline_lookup() to specify that the caller is only interested in global G-lines. This flag is never set on a real G-line. #define GLINE_LASTMOD 0x0200 /* find only glines with non-zero lastmod */ This flag is passed to gline_find() or gline_lookup() to specify that the caller is only interested in G-lines with a non-zero lastmod time, that is, G-lines that were not set by a U-lined service. This flag is never set on a real G-line. struct Gline; The struct Gline describes everything about a given G-line. None of its fields may be directly accessed by the application; use the functions and macros described below instead. int GlineIsActive(struct Gline* g); This macro returns a non-zero value if the G-line is active, or 0 otherwise. If a G-line is locally deactivated, this macro will always return 0. int GlineIsRemActive(struct Gline* g); This macro returns a non-zero value if the G-line is active, ignoring whether or not it is locally deactivated. int GlineIsIpMask(struct Gline* g); This macro returns a non-zero value if the G-line is an IP mask. int GlineIsBadChan(struct Gline* g); This macro returns a non-zero value if a G-line actually represents a BADCHAN. int GlineIsLocal(struct Gline* g); This macro returns a non-zero value if a G-line is local only. char* GlineUser(struct Gline* g); This macro returns the user name associated with the G-line. If the G-line represents a BADCHAN, this will contain the channel name. char* GlineHost(struct Gline* g); This macro returns the host name associated with the G-line. If the G-line represents a BADCHAN, this will be a NULL pointer. char* GlineReason(struct Gline* g); This macro returns the reason that was given when the G-line was set. time_t GlineLastMod(struct Gline* g); G-lines that were not set by a U-lined service have a modification time that must be monotonically increasing. This macro simply returns that modification time. int gline_propagate(struct Client *cptr, struct Client *sptr, struct Gline *gline); When a global G-line is set or modified, all other servers must be notified of the new G-line. This function takes care of propagating the G-line specified by _gline_, originated by the client _sptr_, to all servers except _cptr_ (which may be a NULL pointer). int gline_add(struct Client *cptr, struct Client *sptr, char *userhost, char *reason, time_t expire, time_t lastmod, unsigned int flags); This function simply adds a G-line, set by _sptr_ and with a _userhost_, _reason_, _expire_, and _lastmod_ as specified. The _flags_ parameter is a bit mask consisting of the binary OR of GLINE_FORCE, GLINE_LOCAL, or GLINE_ACTIVE, as appropriate. The gline_add() function also calls gline_propagate() to propagate the G-line, and kills off any local users matching the G-line if it is active. int gline_activate(struct Client *cptr, struct Client *sptr, struct Gline *gline, time_t lastmod, unsigned int flags); This function activates the G-line specified by _gline_, setting its _lastmod_ time as specified. If _flags_ is GLINE_LOCAL and if the G-line is locally deactivated, this function will turn off the local deactivation flag, but will not modify _lastmod_. If the G-line is globally deactivated, passing this function the GLINE_LOCAL flag will have no effect. int gline_deactivate(struct Client *cptr, struct Client *sptr, struct Gline *gline, time_t lastmod, unsigned int flags); This function is similar to gline_activate() except that it deactivates the G-line. If the given G-line is local, or if it was set by a U-lined service (and GLINE_LOCAL was not passed via _flags_), then the G-line is deleted from memory. In all other cases, the G-line is simply deactivated, either locally (if GLINE_LOCAL was passed via _flags_) or globally. Global deactivation will update the _lastmod_ time. struct Gline *gline_find(char *userhost, unsigned int flags); This function looks up a G-line matching the given _userhost_ value, under control of the _flags_ parameter. Valid _flags_ that may be passed are: GLINE_BADCHAN, GLINE_ANY, GLINE_GLOBAL, GLINE_LASTMOD, or GLINE_EXACT, each described above. struct Gline *gline_lookup(struct Client *cptr, unsigned int flags); This function looks up a G-line matching the given client, specified by _cptr_, under the control of the _flags_. Valid values for _flags_ are GLINE_GLOBAL and GLINE_LASTMOD, as described above. void gline_free(struct Gline *gline); This function releases all storage associated with a given G-line. void gline_burst(struct Client *cptr); This function generates a burst of all existing global G-lines and BADCHANs and sends them to the server specified by _cptr_. int gline_resend(struct Client *cptr, struct Gline *gline); This function resends the _gline_ to a server specified by _cptr_. This may be used if, for instance, it is discovered that a server is not synchronized with respect to a particular G-line. int gline_list(struct Client *sptr, char *userhost); This function sends the information about a G-line matching _userhost_ to the client specified by _sptr_. If _userhost_ is a NULL pointer, a list of all G-lines is sent. void gline_stats(struct Client *sptr); This function generates a list of all G-lines, sending them to the user _sptr_ by a /STATS G response. Kev [2001-6-15 Kev] Initial documentation for the G-line API. ircd-ircu-2.10.12.10.dfsg1/doc/api/privileges.txt0000644000175000017500000000560207312472724021073 0ustar madkissmadkissAccess control becomes more of a problem as you have more and more users that need to access certain features. As it stands, ircu has only 3 access levels: ordinary user, local operator, and global operator. This is hardly enough control, especially over some of the more advanced and powerful features, such as G-lines. Since u2.10.11, ircu includes the concept of privileges. Privileges are basically an arbitrarily long bit string. Access to particular features is governed by the value of a particular bit of that bit string--in other words, privileges are a form of Access Control List. This document covers the basic structures and macros used by the privileges system. struct Privs; The Privs structure stores a privileges bit string and represents a user's entire privilege set. This is implemented as a structure, rather than as an array of integers, in order to leverage C's structure copy. void PrivSet(struct Privs pset, int priv); This macro sets the privilege specified by _priv_ in the privileges structure. This macro evaluates the _priv_ argument twice. void PrivClr(struct Privs pset, int priv); This macro clears the privilege specified by _priv_ in the privileges structure. This macro evaluates the _priv_ argument twice. int PrivHas(struct Privs pset, int priv); This macro tests whether the privilege specified by _priv_ is set in the privileges structure, returning non-zero if it is. This macro evaluates the _priv_ argument twice. void GrantPriv(struct Client* cli, int priv); This macro grants a particular client, specified by _cli_, the privilege specified by _priv_. This macro evaluates the _priv_ argument twice. void RevokePriv(struct Client* cli, int priv); This macro revokes the privilege specified by _priv_ from the client. This macro evaluates the _priv_ argument twice. int HasPriv(struct Client* cli, int priv); This macro tests whether the client specified by _cli_ has the privilege specified by _priv_, returning non-zero if so. This macro evaluates the _priv_ argument twice. void client_set_privs(struct Client* client); The ircu configuration file does not yet support privileges. This function thus sets the appropriate privileges for an operator, based upon various feature settings. It should be called whenever there is a change in a user's IRC operator status. int client_report_privs(struct Client *to, struct Client *client); This function sends the client specified by _to_ a list of the privileges that another client has. It returns a value of 0 for the convenience of other functions that must return an integer value. Kev [2001-6-15 Kev] Initial documentation of the privileges system. ircd-ircu-2.10.12.10.dfsg1/doc/api/joinbuf.txt0000644000175000017500000000625607312517002020351 0ustar madkissmadkissIRC wouldn't be of much interest without the ability for users to join channels. Of course, they must also be able to leave those channels when they get bored of the conversation there. Users can join or leave multiple channels at once. Sometimes these JOIN and PART messages can be ganged together into a single message. This is facilitated by the JoinBuf system. struct JoinBuf; This structure is used to accumulate and describe several channel joins or parts. None of its fields are directly or indirectly accessible to the application; a struct JoinBuf is only suitable for passing to the joinbuf_*() suite of functions. JoinBuf structures must be allocated by the caller. #define JOINBUF_TYPE_JOIN 0 /* send JOINs */ This macro tells joinbuf_init() that the JoinBuf is being used to generate several channel joins. #define JOINBUF_TYPE_CREATE 1 /* send CREATEs */ This macro tells joinbuf_init() that the JoinBuf is being used to generate several channel creations. #define JOINBUF_TYPE_PART 2 /* send PARTs */ This macro tells joinbuf_init() that the JoinBuf is being used to generate several channel parts. #define JOINBUF_TYPE_PARTALL 3 /* send local PARTs, but not remote */ This macro tells joinbuf_init() that the JoinBuf is being used to record PARTs for all the user's channels. That fact is communicated to servers through a more efficient means than sending several PARTs, but local clients can only be made aware of it with standard PART messages. void joinbuf_init(struct JoinBuf *jbuf, struct Client *source, struct Client *connect, unsigned int type, char *comment, time_t create); This function is used to initialize a caller allocated JoinBuf, specified by _jbuf_. The originating user is specified by _source_; the connection on which the message was received is specified by _connect_; the type (one of the JOINBUF_TYPE_* macros described above) is specified by _type_. PART messages may have an optional comment, which is passed through the _comment_ parameter. JOIN and CREATE messages require a timestamp, passed through the _create_ parameter. void joinbuf_join(struct JoinBuf *jbuf, struct Channel *chan, unsigned int flags); This function adds a channel to the JoinBuf. The _chan_ parameter specifies the channel, and may only be NULL if the JoinBuf type is JOINBUF_TYPE_JOIN--this will cause a "JOIN 0" message to be sent to all servers. The _flags_ parameter is used to specify the user's current channel flags. For JOINBUF_TYPE_PART and JOINBUF_TYPE_PARTALL JoinBufs, passing CHFL_ZOMBIE will inhibit sending the PART to all channel users, and CHFL_BANNED will inhibit sending the user's specified PART comment. For JOINBUF_TYPE_JOIN or JOINBUF_TYPE_CREATE JoinBufs, the _flags_ parameter is used to set the initial channel modes for the user. int joinbuf_flush(struct JoinBuf *jbuf); This function simply flushes the contents of the struct JoinBuf to the appropriate destinations. Kev [2001-6-15 Kev] Initial documentation of the JoinBuf subsystem. ircd-ircu-2.10.12.10.dfsg1/doc/api/features.txt0000644000175000017500000002160110266320140020517 0ustar madkissmadkissAs of u2.10.11, most of the compile-time configuration options present in previous versions of ircu have been provided via the configuration file as "features." This document is intended not only to give an explanation of how to use the features subsystem in new code, but also how to define new features. In the ircd_features.h header file is an enum Feature that lists all the features known to the features subsystem. The order of entries in this list must match precisely the order of features as listed in the features[] table in ircd_features.c. There are four kinds of features, seven different flags that can be set for features, and seven different call-backs for more complex features. Types of Features There are at present four different types of features: NONE, INT, BOOL, and STR. Features of type "NONE" are complex features, such as the logging subsystem, that have complicated behavior that's managed through the use of call-backs. The call-backs available are set, which is called to set the value of the feature; reset, which is called to reset the value of the feature back to its default; get, which is called to send the user a RPL_FEATURE to describe the feature setting; unmark, which is called prior to reading the configuration file; mark, which is called after reading the configuration file; and report, which is used to send a user a list of RPL_STATSFLINE replies. In comparison to type "NONE," the other types are very simple. Type "INT" is used for features that take an integer value; "BOOL" is for those features that are boolean types; and "STR" is for those features that take simple string values. The values for these feature types are handled directly by the features subsystem, and can be examined from code with the feature_int(), feature_bool(), and feature_str() functions, described below. These features have a notify callback, which is used to warn subsystems that use the values of particular features that the value has changed. Feature Flags There are seven feature flags, one of which is used internally by the feature subsystem. Three of these flags, FEAT_OPER, FEAT_MYOPER, and FEAT_NODISP, are used to select who can see the settings of those features; FEAT_OPER permits any operator anywhere on the network to examine the settings of a particular feature, whereas FEAT_MYOPER only permits operators local to a server to examine feature values, and FEAT_NODISP prohibits display of the feature value altogether. If none of these three flags are specified, then any user may examine that feature's value. Two other flags only have any meaning for string values; they are FEAT_NULL, which is used to specify that a feature of type "STR" may have a NULL value, and FEAT_CASE, which specifies that the feature is case sensitive--this may be used on file names, for example. Note that if you give "0" as the default value for a feature, you must also set the FEAT_NULL flag. The remaining non-internal flag is FEAT_READ, which simply sets the feature to be read-only; a feature so marked may only be changed through the configuration file. Marking Features When the configuration file is read, there must be some way to determine if a particular Feature entry has been removed since the last time the configuration file was read. The way this is done in the features subsystem is to have a "mark" for each feature. Prior to reading the configuration file, all marks are cleared for all features (and all "unmark" call-backs are called). As each Feature entry is encountered and processed, that feature's mark is set. Finally, when the configuration file has been fully read, all remaining unmarked features are reset to their default values (and all "mark" call-backs are called). Adding New Features To add a new feature, first determine the feature's name (which must begin with the string "FEAT_") and its type ("NONE," "INT," "BOOL," or "STR"). Then add the feature to the enum Feature in an appropriate place (i.e., it's good to group all features affecting operators separate from those features affecting networking code), and a corresponding entry in the features[] table in ircd_features.c. It will be best to use one of the F_?() macros, which are documented below. Then, whenever you need to refer to the value of a specific feature, call the appropriate feature_() function, as documented below. enum Feature; The "Feature" enum lists all of the features known to the feature subsystem. Each feature name *must* begin with "FEAT_"; the portion of the name following "FEAT_" will be what you use to set the feature from the configuration file or with the "set" or "reset" commands. int feature_set(struct Client* from, const char* const* fields, int count); The feature_set() function takes an array of strings and a count of the number of strings in the array. The first string is a feature name, and, for most features, the second string will be that feature's value. The _from_ parameter is the struct Client describing the user that issued the "set" command. This parameter may be NULL if feature_set() is being called from the configuration file subsystem. int feature_reset(struct Client* from, const char* const* fields, int count); The feature_reset() function is very similar in arguments to the feature_set() function, except that it may not be called from the configuration file subsystem. It resets the named feature to its default value. int feature_get(struct Client* from, const char* const* fields, int count); Again, feature_get() is very similar in arguments to the feature_set() function, except that again it may not be called from the configuration file subsystem. It reports the value of the named feature to the user that issued the "get" command. void feature_unmark(void); This function is used to unmark all feature values, as described in the subsection "Marking Features." It takes no arguments and returns nothing. void feature_mark(void); The complement to feature_unmark(), feature_mark() resets all unchanged feature settings to their defaults. See the subsection on "Marking Features." void feature_init(void); This function initializes the feature interface by setting the default values for all features correctly. void feature_report(struct Client* to); Reports all Feature entries to a user using RPL_STATSFLINE, except those which the user is not permitted to see due to flag settings. int feature_int(enum Feature feat); To retrieve the values of integer features, call this function. Calling this function on a different type of feature, such as a "BOOL" feature, will result in an assertion failure. int feature_bool(enum Feature feat); This function is the complement of feature_int() for features of type "BOOL." const char *feature_str(enum Feature feat); Use this function to retrieve strings values for features of type "STR"; you may not modify nor free the string value. #define F_N(type, flags, set, reset, get, notify, unmark, mark, report) This macro is used in the features[] table to simplify defining a feature of type "NONE." The _type_ parameter is the name of the feature excluding the "FEAT_" prefix, and MUST NOT be in double-quotes. The _flags_ parameter may be 0, FEAT_OPER, or FEAT_MYOPER--the bitwise OR of these two flags is permissible but would not make sense. The rest of the arguments are pointers to functions implementing the named call-back. #define F_I(type, flags, v_int, notify) To define integer features, use the F_I() macro. The _type_ and _flags_ parameters are as for F_N(), and the _v_int_ parameter specifies the default value of the feature. The _notify_ parameter, if non-zero, will be called whenever the value of the feature changes. #define F_B(type, flags, v_int, notify) This macro is used for defining features of type "BOOL"; it is very similar to F_I(), but _v_int_ should either 0 (for a "FALSE" value) or 1 (for a "TRUE" value). The _notify_ parameter, if non-zero, will be called whenever the value of the feature changes. #define F_S(type, flags, v_str, notify) Also similar to F_I(), F_S() defines features of type "STR." The _flags_ argument may be the bitwise OR of one of FEAT_OPER or FEAT_MYOPER with the special string flags FEAT_NULL and FEAT_CASE, which are described above in the section "Feature Flags." The _notify_ parameter, if non-zero, will be called whenever the value of the feature changes. Note that FEAT_NULL *must* be set if the default string _v_str_ is set to NULL. Kev [2001-06-13 Kev] Mention notify with the other callbacks [2001-01-02 Kev] Add documentation for new flags and for the notify mechanism [2000-12-18 Kev] Document the features API ircd-ircu-2.10.12.10.dfsg1/doc/api/msgq.txt0000644000175000017500000001551207312472724017672 0ustar madkissmadkissMany messages generated by an IRC server are sent to multiple recipients. Previous versions of ircd used DBuf to store these messages until they could actually be sent. The problem with using a DBuf for this, though, is that there are multiple copies of the same message hanging around. Another problem is that there is at least one strcpy() or equivalent call for each destination the message is sent to. A simple solution to this problem is to use messages queues. This file documents the MsgQ interface for ircd. The MsgQ interface is loosely based on the API for DBuf. Although the structures are vastly different, most calls, including several of the macros, are similar to certain pieces of the DBuf API. This made retrofitting ircd with MsgQ support much simpler. struct MsgCounts { int alloc; int used; }; The MsgCounts structure may be used for determining how much memory is in use by the MsgQ system. The _alloc_ element is a count of the total number of structures (of whatever type) that have been allocated; the _used_ element is a count of how many are actually in use. MsgQ never releases any of its allocated memory; instead, it places unused structures onto a free list. struct MsgBuf; The MsgBuf structure contains the actual message, along with a reference count and the message's length. None of its fields are directly accessible by the application. struct MsgQ; The MsgQ structure is a structure allocated by the application that is used by the MsgQ system to describe an entire message queue, including both normal and priority queues. None of its fields are directly accessible by the application. struct MsgCounts msgBufCounts; /* resource count for struct MsgBuf */ This global variable counts the number of MsgBuf structures that have been allocated. This may be used to determine how much memory is in use by the MsgQ system. struct MsgCounts msgCounts; /* resource count for struct Msg */ This global variable counts the number of Msg structures that have been allocated. The Msg structure describes the link between a queue and a message. It is not accessible to the application, and so not further documented here. unsigned int MsgQLength(struct MsgQ* mq); This macro returns the number of bytes in a particular user's message queue. unsigned int MsgQCount(struct MsgQ* mq); This macro returns the number of messages in a particular user's message queue. void MsgQClear(struct MsgQ* mq); This macro simply clears the content of a particular message queue. NOTE: This macro evaluates its argument twice. void msgq_init(struct MsgQ *mq); This function initializes a caller-allocated message queue to be empty. Calling this function on a message queue with messages in it WILL RESULT IN A MEMORY LEAK. void msgq_delete(struct MsgQ *mq, unsigned int length); This function removes the given number of bytes from the message queue. If entire messages have been sent, they will be unlinked from the queue. The _length_ parameter does not need to correspond to a given message's length; the MsgQ system is able to deal with messages that have only partially been sent. int msgq_mapiov(const struct MsgQ *mq, struct iovec *iov, int count, unsigned int *len); The msgq_mapiov() function takes a struct MsgQ (specified by the _mq_ parameter) and a caller allocated struct iovec array (specified by the _iov_ parameter) and maps the contents of the message into the struct iovec array. The _count_ parameter must indicate the total number of elements available for msgq_mapiov() to use. The _len_ parameter must be a pointer to an unsigned int, and upon return from the function will contain the total number of bytes that have been mapped into the struct iovec array. This function returns the number of struct iovec elements that have been filled. For more information about the purpose of struct iovec, see your system's man page for the writev() function. struct MsgBuf *msgq_make(struct Client *dest, const char *format, ...); This function allocates a struct MsgBuf and calls ircd_vsnprintf() with the _dest_ and _format_ parameters to fill it in. Most callers should use the send_buffer() function (declared in send.h) to attach the struct MsgBuf to a client's message queue. struct MsgBuf *msgq_vmake(struct Client *dest, const char *format, va_list vl); This function is identical to msgq_make() except that it takes a va_list (given by the _vl_ parameter) and calls ircd_vsnprintf() to format the message. void msgq_append(struct Client *dest, struct MsgBuf *mb, const char *format, ...); Occasionally a caller is not able to completely compute a message before calling msgq_make(). When this happens, the msgq_append() function may be called to append more text onto the struct MsgBuf specified by the _mb_ parameter. As with msgq_make(), the _dest_ and _format_ parameters are passed to ircd_vsnprintf(), along with the additional arguments. void msgq_clean(struct MsgBuf *mb); As mentioned above, struct MsgBuf includes a reference count. When that reference count reaches zero, the structure is released. The reference count is set to 1 by msgq_make() and msgq_vmake(). Once a given message has been attached to all the queues it needs to be, the caller should call the msgq_clean() function to decrement this reference count. This function will place the struct MsgBuf back onto the free list if it did not get attached to any message queues. The msgq_delete() function calls msgq_clean() internally, so the application need not call msgq_clean() explicitly afterwards. void msgq_add(struct MsgQ *mq, struct MsgBuf *mb, int prio); This function is used to attach a given struct MsgBuf, as specified by the _mb_ parameter, to a given message queue. The _prio_ parameter, if non-zero, specifies that the message should be placed on the priority queue. This function is called by send_buffer(), defined in send.h; most applications should call that function, rather than this one. void msgq_count_memory(size_t *msg_alloc, size_t *msg_used, size_t *msgbuf_alloc, size_t *msgbuf_used); This function simply takes the counts kept in msgBufCounts and msgCounts and multiplies them by the appropriate structure sizes, storing the resulting sizes into its parameters. unsigned int msgq_bufleft(struct MsgBuf *mb); This function is for use in conjunction with msgq_append(). It returns the total number of bytes of free storage in the given _mb_. Kev [2001-6-15 Kev] Initial documentation for the MsgQ functions. ircd-ircu-2.10.12.10.dfsg1/doc/api/log.txt0000644000175000017500000001757007311737000017500 0ustar madkissmadkissOld versions of ircu did not have very good means of dealing with logging. In u2.10.11, an entirely new logging subsystem was written, allowing a server administrator much more power in determining what actions are to be logged where. The new logging subsystem permits log messages to go to syslog, to a file, and to server operators via server notices, simultaneously (though having output to multiple log files is not presently supported). All log messages have two values that are passed in with them: the logging level, which must be one of the values in enum LogLevel, and a logging subsystem, which must be one of the values in enum LogSys; these values are used as indexes into arrays within ircd_log.c, so be careful should you change them. In addition to the LogLevel and LogSys, there is also a set of three flags that may be passed to the log_write() logging function; these flags may be used to suppress certain types of logging that may be undesirable. For instance, when a server links, a log may be written containing the server's IP address; to prevent this IP address from ever showing up in a server notice, that invocation of log_write() is passed the LOG_NOSNOTICE flag. enum LogLevel { L_CRIT, L_ERROR, L_WARNING, L_NOTICE, L_TRACE, L_INFO, L_DEBUG, L_LAST_LEVEL }; This enum describes the severity levels of a log message. The severity decreases as you proceed downwards in the list, so L_DEBUG is less severe than L_INFO, and L_CRIT in the most severe of all. The special value L_LAST_LEVEL should never be used; it merely marks the end of the list. enum LogSys { LS_SYSTEM, LS_CONFIG, LS_OPERMODE, LS_GLINE, LS_JUPE, LS_WHO, LS_NETWORK, LS_OPERKILL, LS_SERVKILL, LS_USER, LS_OPER, LS_RESOLVER, LS_SOCKET, LS_DEBUG, LS_OLDLOG, LS_LAST_SYSTEM }; These are the various logging subsystems recognized by the logging subsystem. Again, order is important, and again, LS_LAST_SYSTEM should never be used. void log_debug_init(int usetty); This initializes the special-purpose debug logging code in the server. If the _usetty_ parameter is non-zero, then all debugging output will go to the terminal regardless of file settings for the LS_DEBUG subsystem. This function is not defined unless the server is compiled with -DDEBUGMODE. void log_init(const char *process_name); This initializes the entire logging subsystem, including special things such as storing the process name and opening syslog with the open_log() function. It may only be called once. void log_reopen(void); All log files are persistently open, in order to avoid the overhead of re-opening the log file each time. This function is used to close all the log files and to close and reopen syslog. (Log files are opened again only when there is something to write to them.) void log_close(void); This closes all log files and the syslog prior to the server terminating. Should logs need to be reopened after calling this function, call log_reopen() instead of log_init(). void log_write(enum LogSys subsys, enum LogLevel severity, unsigned int flags, const char *fmt, ...); This is the actual logging function. The _flags_ parameter is 0 or the bitwise OR of LOG_NOSYSLOG (suppresses syslogging), LOG_NOFILELOG (suppresses logging to a file) and LOG_NOSNOTICE (suppresses logging via server notices). The _fmt_ parameter is a format string acceptable to ircd_snprintf(), which is the function called to actually format the log message. void log_vwrite(enum LogSys subsys, enum LogLevel severity, unsigned int flags, const char *fmt, va_list vl); This is similar to log_write() except that it takes a va_list parameter. char *log_cannon(const char *subsys); This returns the canonical name for logging subsystem. This probably should not be exposed here, but it is needed in ircd_features.c at present. int log_set_file(const char *subsys, const char *filename); This sets the file name for the specified logging subsystem to _filename_; returns 2 if the subsystem was undefined, 1 if the value of _filename_ was not understood, or 0 if there was no error. char *log_get_file(const char *subsys); This returns the current log file name for the given subsystem. int log_set_facility(const char *subsys, const char *facility); This sets the syslog facility for the specified logging subsystem to _facility_; returns 2 if the subsystem was undefined, 1 if the value of _facility_ was not understood, or 0 if there was no error. Two special facility names may be given; "NONE" specifies that no syslogging should be performed, and "DEFAULT" specifies that ircd's default syslog facility should be used. char *log_get_facility(const char *subsys); This returns the current syslog facility for the given subsystem. See the documentation for log_set_facility() for a description of the special facility names "NONE" and "DEFAULT." int log_set_snomask(const char *subsys, const char *snomask); This sets the server notice type for the specified logging subsystem to _snomask_; returns 2 if the subsystem was undefined, 1 if the value of _snomask_ was not understood, or 0 if there was no error. The special server notice type "NONE" indicates that no server notices should be generated. The other valid values for _snomask_ are: "OLDSNO," "SERVKILL," "OPERKILL," "HACK2," "HACK3," "UNAUTH," "TCPCOMMON," "TOOMANY," "HACK4," "GLINE," "NETWORK," "IPMISMATCH," "THROTTLE," "OLDREALOP," "CONNEXIT," and "DEBUG." char *log_get_snomask(const char *subsys); This returns the current server notice type for the given subsystem. See the documentation for log_set_snomask() for a description of the return values. int log_set_level(const char *subsys, const char *level); This function is used to set the minimum log level for a particular subsystem; returns 2 if the subsystem was undefined, 1 if the value of _level_ was not understood, or 0 if there was no error. Any log notices generated with lower severity than that set with this function will not be logged. Valid values are "CRIT," "ERROR," "WARNING," "NOTICE," "TRACE," "INFO," and "DEBUG." char *log_get_level(const char *subsys); This returns the current minimum log level for the given subsystem. See the documentation for log_set_level() for a description of the return values. int log_set_default(const char *facility); This function sets the default syslog facility for all of ircd. Valid values for _facility_ are as described for log_set_facility() with the exclusion of the "NONE" and "DEFAULT" facilities; returns 1 if the facility name was unrecognized (or proscribed) or 0 if there was no error. char *log_get_default(void); This simply returns ircd's default syslog facility. void log_feature_unmark(void); This function is called by the ircd_features.c subsystem and should not be called by any other part of ircd. See the features API documentation for notes on what this function does. void log_feature_mark(int flag); This function is called by the ircd_features.c subsystem and should not be called by any other part of ircd. See the features API documentation for notes on what this function does. void log_feature_report(struct Client *to, int flag); This function is called by the ircd_features.c subsystem and should not be called by any other part of ircd. See the features API documentation for notes on what this function does. Kev [2001-06-13 Kev] Fix a minor typo. [2000-12-18 Kev] Wrote some documentation on how to use the logging subsystem. ircd-ircu-2.10.12.10.dfsg1/doc/api/modebuf.txt0000644000175000017500000002437310266320140020333 0ustar madkissmadkissGenerating and parsing channel mode strings is often a very complicated process. The ModeBuf interface, along with the associated mode parsing functions, attempt to make this much more programmatic. The interface to the functions in this suite is itself very complicated, unfortunately, though most of the complication is in the effects of various flags on the operation of the functions. struct ModeBuf; This structure is used to accumulate and describe several mode changes. None of its fields are directly or indirectly accessible to the application; a struct ModeBuf is only suitable for passing to the modebuf_*() suite of functions. ModeBuf structures must be allocated by the caller. void modebuf_init(struct ModeBuf *mbuf, struct Client *source, struct Client *connect, struct Channel *chan, unsigned int dest); This function initializes a caller-allocated ModeBuf, _mbuf_, with the given parameters. If the mode should not be sent to a particular server, perhaps because it was received from that server, that server should be specified by the _connect_ parameter. The channel the mode change will take place on is given by the _chan_ parameter, and the disposition of the mode is given by the _dest_ parameter, which is the binary OR of the MODEBUF_DEST_* flags described below. #define MODEBUF_DEST_CHANNEL 0x0001 /* Mode is flushed to channel */ This flag, when set in a call to modebuf_init(), causes the accumulated mode change to be sent to the channel (in client<->server protocol, of course). #define MODEBUF_DEST_SERVER 0x0002 /* Mode is flushed to server */ If other servers should be made aware of the mode change, this flag should be passed to modebuf_init(). One time when the mode change may not be passed is when processing the mode in a BURST message. #define MODEBUF_DEST_OPMODE 0x0100 /* Send server mode as OPMODE */ This flag is used to tell the modebuf_*() suite to send an OPMODE message to other servers, rather than an ordinary MODE message. #define MODEBUF_DEST_DEOP 0x0200 /* Deop the offender */ When bouncing a mode change, giving this flag to modebuf_init() causes the originating user to be deopped on the channel as part of the mode bounce. #define MODEBUF_DEST_BOUNCE 0x0400 /* Bounce the modes */ When a mode change is illegitimate, that is, when it originates from a user that is not (as far as this server knows) a channel operator, the mode change should be bounced. This involves reversing the sense of the mode and sending it back to the originating server. This flag is used to tell the modebuf_*() suite to do just that. #define MODEBUF_DEST_LOG 0x0800 /* Log the mode changes to OPATH */ The OPMODE command is reserved for IRC operators. When it is used, the server should log the command for accountability purposes. This flag, given to modebuf_init(), will cause the ModeBuf system to log the exact mode change to a log file. #define MODEBUF_DEST_HACK2 0x2000 /* Send a HACK(2) notice, reverse */ When a remote user that this server does not think is a channel operator proceeds to change a channel mode, that mode must be bounced. In addition, in order to provide some debugging capability, a server notice may be sent, called a "HACK(2)" notice. Passing modebuf_init() this flag causes that notice to be sent. #define MODEBUF_DEST_HACK3 0x4000 /* Send a HACK(3) notice, TS == 0 */ When the origin of a mode change is a server, we should always accept the mode change. To provide accountability, however, a server notice should be sent. This flag will cause the server to generate a "HACK(3)" notice. #define MODEBUF_DEST_HACK4 0x8000 /* Send a HACK(4) notice, TS == 0 */ Some servers are special. When a server that has a Uworld entry issues a mode change, we send a "HACK(4)" message to differentiate it from an ordinary server changing a channel mode. This is the flag that must be passed to modebuf_init() to cause that behavior. void modebuf_mode(struct ModeBuf *mbuf, unsigned int mode); Certain channel modes take no arguments. Those mode changes can be fed to the ModeBuf system using modebuf_mode(). The _mode_ parameter is a bit mask of the mode changes, and must have one of MODE_ADD or MODE_DEL set. void modebuf_mode_uint(struct ModeBuf *mbuf, unsigned int mode, unsigned int uint); One channel mode, the "limit" mode ("+l"), takes a single integer argument. This limit can be fed to the ModeBuf system with the modebuf_mode_uint() function. The _mode_ parameter must be the binary OR of one of MODE_ADD or MODE_DEL with the MODE_LIMIT flag. The _uint_ parameter specifies the limit. void modebuf_mode_string(struct ModeBuf *mbuf, unsigned int mode, char *string, int free); Some channel modes take a string parameter. These can be fed to ModeBuf with modebuf_mode_string(). The _mode_ parameter should be the binary OR of one of MODE_ADD or MODE_DEL with the flag for the mode. The _string_ parameter specifies the string, and the _free_ parameter indicates whether the ModeBuf system should call MyFree() on the string once it is done with it. void modebuf_mode_client(struct ModeBuf *mbuf, unsigned int mode, struct Client *client); The remaining channel modes take a parameter specifying a client. These can be fed to ModeBuf with modebuf_mode_client(). The _mode_ parameter should be the binary OR of one of MODE_ADD or MODE_DEL with the flag for the mode. The _client_ parameter should be a pointer to a struct Client specifying which client the mode is supposed to act upon. int modebuf_flush(struct ModeBuf *mbuf); This function simply flushes the contents of the struct ModeBuf specified by _mbuf_ to the appropriate destinations, as was specified by the _dest_ parameter in the call to modebuf_init(). This function returns 0 for the convenience of callers that must return an integer. void modebuf_extract(struct ModeBuf *mbuf, char *buf); One use of the ModeBuf within ircd requires the ability to pull a simple mode string out of the struct ModeBuf for use elsewhere. This can be accomplished with this function. The _buf_ parameter should be large enough to accommodate the simple mode string. void mode_ban_invalidate(struct Channel *chan); Looking up bans affecting a particular user can be a fairly expensive operation, so the server caches the result of the lookup. Should the ban list for a channel change, all the cached results must be invalidated to force rechecking. This may be done with the mode_ban_invalidate() function, which acts upon the channel given by _chan_. void mode_invite_clear(struct Channel *chan); When a channel that was invite-only has the "+i" channel mode removed, the invite list that the server keeps is no longer necessary. The mode_invite_clear() function flushes that invite list for the channel given by _chan_, reclaiming the memory used by the invite list. int mode_parse(struct ModeBuf *mbuf, struct Client *cptr, struct Client *sptr, struct Channel *chptr, int parc, char *parv[], unsigned int flags); This function parses a mode change command, given by the contents of _parv[]_, and under the control of _flags_. The channel being modified is given by _chptr_, the source of the change is given by _sptr_, and the connection the change was received from is given by _cptr_. The _parc_ parameter gives the count of the number of elements in the _parv[]_ array. The ModeBuf must have already been initialized by a call to modebuf_init(), described above. For more information on _flags_, see the MODE_PARSE_* macros described below. This function returns an integer indicating the number of elements of _parv[]_ it used. The modebuf_flush() function must be called upon return from mode_parse() to flush the mode changes to the channel. #define MODE_PARSE_SET 0x01 /* actually set channel modes */ When this flag is passed to mode_parse(), the channel mode being parsed will actually be effected on the channel. #define MODE_PARSE_STRICT 0x02 /* +m +n +t style not supported */ Users are permitted to send complicated mode commands like "MODE #foo +m +n +t +k foo +i"; servers are not. Passing this flag to mode_parse() causes it to strictly enforce this restriction. #define MODE_PARSE_FORCE 0x04 /* force the mode to be applied */ Some mode changes are not permitted under normal circumstances. When this flag is passed to mode_parse(), these mode changes will be accepted. #define MODE_PARSE_BOUNCE 0x08 /* we will be bouncing the modes */ This flag warns mode_parse() that the mode is to be bounced. This will cause it to systematically feed each mode into ModeBuf in order for that interface to generate the proper bounce messages. #define MODE_PARSE_NOTOPER 0x10 /* send "not chanop" to user */ This flag is used to warn mode_parse() that the user generating the mode change is not a channel operator. If the user attempts to change a mode, an appropriate error message will be sent to the user (once). #define MODE_PARSE_NOTMEMBER 0x20 /* send "not member" to user */ This flag is used to warn mode_parse() that the user generating the mode change is not even on the channel. If the user attempts to change a mode, an appropriate error message will be sent to the user (once). #define MODE_PARSE_WIPEOUT 0x40 /* wipe out +k and +l during burst */ When this flag is passed to mode_parse(), the channel key and limit will be reversed if the mode string doesn't update them. This is used for processing BURST messages. #define MODE_PARSE_BURST 0x80 /* be even more strict w/extra args */ The BURST message is even more strict than a standard MODE message. Processing *must* stop after reading the mode string itself, or mode_parse() could gobble up arguments not intended for it. This flag tells mode_parse() about this restriction. Kev [2001-6-15 Kev] Initial documentation of the ModeBuf and mode parsing subsystems. ircd-ircu-2.10.12.10.dfsg1/doc/api/events.txt0000644000175000017500000007506507312472724020240 0ustar madkissmadkissThe IRC server is built around an event loop. Until the u2.10.11 release, this event loop has been rather ad-hoc; timed events are hard-coded in, signals are handled inside the signal handler, etc. All of this has changed with u2.10.11. A new subsystem, the events subsystem, has been introduced; the new subsystem contains a generalization of the concept of an event. An event is a signal, the expiration of a timer, or some form of activity on a network socket. This new subsystem has the potential to vastly simplify the code that is arguably the core of any network program, and makes it much simpler to support more exotic forms of network activity monitoring than the conventional select() and poll() calls. The primary concepts that the events subsystem works with are the "event," represented by a struct Event, and the "generator." There are three types of generators: sockets, represented by struct Socket; signals, represented by struct Signal; and timers, represented by struct Timer. Each of these generators will be described in turn. Signals The signal is perhaps the simplest generator in the entire events subsystem. Basically, instead of setting a signal handler, the function signal_add() is called, specifying a function to be called when a given signal is detected. Most importantly, that call-back function is called _outside_ the context of a signal handler, permitting the call-back to use more exotic functions that are anathema within a signal handler, such as MyMalloc(). Once a call-back for a signal has been established, it cannot be deleted; this design decision was driven by the fact that ircd never changes its signal handlers. Whenever a signal is received, an event of type ET_SIGNAL is generated, and that event is passed to the event call-back function specified in the signal_add() call. Timers Execution of the call-back functions for a timer occur when that timer _expires_; when a timer expires depends on the type of timer and the expiration time that was used for that timer. A TT_ABSOLUTE timer, for instance, expires at exactly the time given as the expiration time. This time is a standard UNIX time_t value, measuring seconds since the UNIX epoch. The TT_ABSOLUTE timer type is complemented by the TT_RELATIVE timer; the time passed as its expiration time is relative to the current time. If a TT_RELATIVE timer is given an expiration time of 5, for instance, it will expire 5 seconds after the present time. Internally, TT_RELATIVE timers are converted into TT_ABSOLUTE timers, with the expiration time adjusted by addition of the current time. Those two types of timers, TT_ABSOLUTE and TT_RELATIVE, are single-shot timers. Once they expire, they are removed from the timer list unless re-added by the event call-back or through some other mechanism. There is another type of timer, however, the TT_PERIODIC timer, that is not removed from the timer list. TT_PERIODIC timers are similar to TT_RELATIVE timers, in that one passes in the expire time as a relative number of seconds, but when they expire, they are re-added to the timer list with the same relative expire time. This means that a TT_PERIODIC timer with an expire time of 5 seconds that is set at 11:50:00 will have its call-back called at 11:50:05, 11:50:10, 11:50:15, and so on. Timers have to be run by the event engines explicitly by calling timer_run() on the generator list passed to the engine event loop. In addition, engines may determine the next (absolute) time that a timer needs to be run by calling the timer_next() macro; this may be used to set a timeout on the engine's network activity monitoring function. Engines are described in detail below. When a timer expires, an event of ET_EXPIRE is generated, and the call-back function is called. When a timer is destroyed, either as the result of an expiration or as a result of an explicit timer_del() call, an event of ET_DESTROY is generated, notifying the call-back that the struct Timer can be deallocated. Sockets Perhaps the most complicated event generator in all of the event system is the socket, as described by struct Socket. This single classification covers datagram sockets and stream sockets. To differentiate the different kinds of sockets, there is a socket state associated with each socket. The available states are SS_CONNECTING, which indicates that a particular socket is in the process of completing a non-blocking connect(); SS_LISTENING, which indicates that a particular socket is a listening socket; SS_CONNECTED, which is the state of every other stream socket; SS_DATAGRAM, which is an ordinary datagram socket, and SS_CONNECTDG, which describes a connected datagram socket. (The SS_NOTSOCK state is for the internal use of the events system and will not be described here.) In addition to the socket states, there's also an event mask for each socket; this set of flags is used to tell the events subsystem what events the application is interested in for the socket. For SS_CONNECTING and SS_LISTENING sockets, this events mask has no meaning, but on the other socket states, the event mask is used to determine if the application is interested in readable (SOCK_EVENT_READABLE) or writable (SOCK_EVENT_WRITABLE) indications. Most of the defined event types have to do with socket generators. When a socket turns up readable, for instance, an event of type ET_READ is generated. Similarly, ET_WRITE is generated when a socket can be written to. The ET_ACCEPT event is generated when a listening socket indicates that there is a connection to be accepted; ET_CONNECT is generated when a non-blocking connect is completed. Finally, if an end-of-file indication is detected, ET_EOF is generated, whereas if an error has occurred on the socket, ET_ERROR is generated. Of course, when a socket has been deleted by the socket_del() function, an event of ET_DESTROY is generated when it is safe for the memory used by the struct Socket to be reclaimed. Events An event, represented by a struct Event, describes in detail all of the particulars of an event. Each event has a type, and an optional integer piece of data may be passed with some events--in particular, ET_SIGNAL events pass the signal number, and ET_ERROR events pass the errno value. The struct Event also contains a pointer to the structure describing the generated event--although it should be noted that the only way to disambiguate which type of generator is contained within the struct Event is by which call-back function has been called. All generators have a void pointer which can be used to pass important information to the call-back, such as a pointer to a struct Client. Additionally, generators have a reference count, and a union of a void pointer and an integer that should only be utilized by the event engine. Finally, there is also a field for flags, although the only flag of concern to the application (or the engine) is the active flag, which may be tested using the test macros described below. Whatever the generator, the call-back function is a function returning nothing (void) and taking as its sole argument a pointer to struct Event. This call-back function may be implemented as a single switch statement that calls out to appropriate external functions as needed. Engines Engines implement the actual socket event loop, and may also have some means of receiving signal events. Each engine has a name, which should describe what its core function is; for instance, the engine based on the standard select() function is named, simply, "select()." Each engine must implement several call-backs which are used to initialize the engine, notify the engine of sockets the application is interested in, etc. All of this data is described by a single struct Engine, which should be the only non-static variable or function in the engine's source file. The engine's event loop, pointed to by the eng_loop field of the struct Engine, must consist of a single while loop predicated on the global variable _running_. Additionally, this loop's final statement must be a call to timer_run(), to execute all timers that have become due. Ideally, this construction should be pulled out of each engine's eng_loop and put in the event_loop() function of the events subsystem. Reference Counts As mentioned previously, all generators keep a reference count. Should timer_del() or socket_del() be called on a generator with a non-zero reference count, for whatever reason, the actual destruction of the generator will be delayed until the reference count again reaches zero. This is used by the event loop to keep sockets that it is currently referencing from being deallocated before it is done checking all pending events on them. To increment the reference count by one, call gen_ref_inc() on the generator; the corresponding macro gen_ref_dec() decrements the reference counts, and will automatically destroy the generator if the appropriate conditions are met. Debugging Functions It can be difficult to debug an engines if, say, a socket state can only be expressed as a meaningless number. Therefore, when DEBUGMODE is #define'd, five number-to-name functions are also defined to make the debugging data more meaningful. These functions must only be called when DEBUGMODE is #define'd. Calling them from within Debug() macro calls is safe; calling them from log_write() calls is not. typedef void (*EventCallBack)(struct Event*); The _EventCallBack_ type is used to simplify declaration of event call-back functions. It is used in timer_add(), signal_add(), and socket_add(). The event call-back should process the event, taking whatever actions are necessary. The function should be declared as returning void. typedef int (*EngineInit)(int); The _EngineInit_ function takes an integer specifying the maximum number of sockets the event system is expecting to handle. This number may be used by the engine initialization function for memory allocation computations. If initialization succeeds, this function must return 1. If initialization fails, the function should clean up after itself and return 0. The events subsystem has the ability to fall back upon another engine, should an engine initialization fail. Needless to say, the engines based upon poll() and select() should never fail in this way. typedef void (*EngineSignal)(struct Signal*); If an engine has the capability to directly detect signals, it should set the eng_signal field of struct Engine non-zero. When the application indicates interest in a particular signal, the _EngineSignal_ function will be called with the filled-in struct Signal, in order to register interest in that signal with the engine. typedef int (*EngineAdd)(struct Socket*); All engines must define an _EngineAdd_ function, which is used to inform the engine of the application's interest in the socket. If the new socket cannot be accommodated by the engine for whatever reason, this function must return 0. Otherwise, the function must return 1, informing the events subsystem that the interest has been noted. typedef void (*EngineState)(struct Socket*, enum SocketState new_state); Sockets can change state. SS_CONNECTING sockets, for instance, can become SS_CONNECTED. Whenever a socket state changes, the engine is informed, since some states require different notification procedures than others. This is accomplished by calling the _EngineState_ function with the new state. The struct Socket passed to the engine will still have the old state, if the engine must reference that. typedef void (*EngineEvents)(struct Socket*, unsigned int new_events); Applications may only be interested in given events on a socket for a limited time. When the application's interest shifts, a new events mask is set for the socket. The engine is informed of this change by a call to its _EngineEvents_ function. typedef void (*EngineDelete)(struct Socket*); Eventually, an application will close all the sockets it has opened. When a socket is closed, and the corresponding struct Socket deleted with a call to socket_del(), the _EngineDelete_ function will be called to notify the engine of the change. typedef void (*EngineLoop)(struct Generators*); The workhorse of the entire events subsystem is the event loop, implemented by each engine as the _EngineLoop_ function. This function is called with a single argument that may be passed to timer_next() to calculate the next time a timer will expire. enum SocketState { SS_CONNECTING, /* Connection in progress on socket */ SS_LISTENING, /* Socket is a listening socket */ SS_CONNECTED, /* Socket is a connected socket */ SS_DATAGRAM, /* Socket is a datagram socket */ SS_CONNECTDG, /* Socket is a connected datagram socket */ SS_NOTSOCK /* Socket isn't a socket at all */ }; This enumeration contains a list of all possible states a socket can be in. Applications should not use SS_NOTSOCK; engines should treat it as a special socket state for non-sockets. The only event that should be watched for on a struct Socket in the SS_NOTSOCK state is readability. This socket state is used to implement the fall-back signal event generation. enum TimerType { TT_ABSOLUTE, /* timer that runs at a specific time */ TT_RELATIVE, /* timer that runs so many seconds in the future */ TT_PERIODIC /* timer that runs periodically */ }; The three possible timer types are defined by the TimerType enumeration. More details can be found in the "Timers" sub-section. enum EventType { ET_READ, /* Readable event detected */ ET_WRITE, /* Writable event detected */ ET_ACCEPT, /* Connection can be accepted */ ET_CONNECT, /* Connection completed */ ET_EOF, /* End-of-file on connection */ ET_ERROR, /* Error condition detected */ ET_SIGNAL, /* A signal was received */ ET_EXPIRE, /* A timer expired */ ET_DESTROY /* The generator is being destroyed */ }; This enumeration contains all the types of events that can be generated by the events subsystem. The first 6 are generated by socket generators, the next by signal generators, and the next by timer generators. ET_DESTROY is generated by both socket and timer generators when the events subsystem is finished with the memory allocated by both. struct Socket; This structure describes everything the events subsystem knows about a given socket. All of its fields may be accessed through the s_* macros described below. struct Timer; The struct Timer structure describes everything the events subsystem knows about a given timer. Again, all of its fields may be accessed through the t_* macros described below. struct Signal; Signal generators are described by a struct Signal. All of the fields of a struct Signal may be accessed by the sig_* macros described below. struct Event; Each event is described by a struct Event. Its fields may be examined using the ev_* macros described below. struct Generators; Each engine is passed a list of all generators when the engine's _EngineLoop_ function is called. The only valid way to access this structure is via the timer_next() function described below. struct Engine { const char* eng_name; /* a name for the engine */ EngineInit eng_init; /* initialize engine */ EngineSignal eng_signal; /* express interest in a signal */ EngineAdd eng_add; /* express interest in a socket */ EngineState eng_state; /* mention a change in state to engine */ EngineEvents eng_events; /* express interest in socket events */ EngineDelete eng_closing; /* socket is being closed */ EngineLoop eng_loop; /* actual event loop */ }; Each engine is described by the struct Engine structure. Each engine must define all of the functions described above except for the _EngineSignal_ function, which is optional. #define SOCK_EVENT_READABLE 0x0001 /* interested in readable */ The SOCK_EVENT_READABLE flag indicates to the engine that the application is interested in readability on this particular socket. #define SOCK_EVENT_WRITABLE 0x0002 /* interested in writable */ The SOCK_EVENT_WRITABLE flag indicates to the engine that the application is interested in this socket being writable. #define SOCK_EVENT_MASK (SOCK_EVENT_READABLE | SOCK_EVENT_WRITABLE) SOCK_EVENT_MASK may be used to extract only the event interest flags from an event interest set. #define SOCK_ACTION_SET 0x0000 /* set interest set as follows */ When socket_events() is called with a set of event interest flags and SOCK_ACTION_SET, the socket's event interest flags are set to those passed into socket_events(). #define SOCK_ACTION_ADD 0x1000 /* add to interest set */ When SOCK_ACTION_ADD is used in a call to socket_events(), the event interest flags passed in are added to the existing event interest flags for the socket. #define SOCK_ACTION_DEL 0x2000 /* remove from interest set */ When SOCK_ACTION_DEL is used in a call to socket_events(), the event interest flags passed in are removed from the existing event interest flags for the socket. #define SOCK_ACTION_MASK 0x3000 /* mask out the actions */ SOCK_ACTION_MASK is used to isolate the socket action desired. enum SocketState s_state(struct Socket* sock); This macro returns the state of the given socket. unsigned int s_events(struct Socket* sock); This macro returns the current event interest mask for a given socket. Note that if the socket is in the SS_CONNECTING or SS_LISTENING states, this mask has no meaning. int s_fd(struct Socket* sock); This macro simply returns the file descriptor for the given socket. void* s_data(struct Socket* sock); When a struct Socket is initialized, data that the call-back function may find useful, such as a pointer to a struct Connection, is stored in the struct Socket. This macro returns that pointer. int s_ed_int(struct Socket* sock); Engines may find it convenient to associate an integer with a struct Socket. This macro may be used to retrieve that integer or, when used as an lvalue, to assign a value to it. Engine data must be either an int or a void*; use of both is prohibited. void* s_ed_ptr(struct Socket* sock); Engines may find it convenient to associate a void* pointer with a struct Socket. This macro may be used to retrieve that pointer or, when used as an lvalue, to assign a value to it. Engine data must be either an int or a void*; use of both is prohibited. int s_active(struct Socket* sock); A socket's active flag is set when initialized by socket_add(), and is cleared immediately prior to generating an event of type ET_DESTROY. This may be used by the application to determine whether or not the socket is still in use by the events subsystem. If it is, s_active() returns a non-zero value; otherwise, its value is 0. int socket_add(struct Socket* sock, EventCallBack call, void* data, enum SocketState state, unsigned int events, int fd); This function is called to add a socket to the list of sockets to be monitored. The _sock_ parameter is a pointer to a struct Socket that is allocated by the application. The _call_ parameter is a pointer to a function to process any events on the socket. The _data_ parameter is for use of the socket call-back and may be zero. The _state_ parameter must be one of the valid socket states. The _events_ parameter must be a valid events interest mask--0, or the binary OR of SOCK_EVENT_READABLE or SOCK_EVENT_WRITABLE. Finally, the _fd_ parameter specifies the socket's file descriptor. This function returns 1 if successful or 0 otherwise. void socket_del(struct Socket* sock); When the application is no longer interested in a particular socket, it should call the socket_del() function. This function must be called no later than when the socket has been closed, to avoid attempting to call select() or similar functions on closed sockets. void socket_state(struct Socket* sock, enum SocketState state); Occasionally, a socket's state will change. This function is used to inform the events subsystem of that change. Only certain state transitions are valid--a socket in the SS_LISTENING or SS_CONNECTED states cannot change states, nor can an SS_CONNECTING socket change to some state other than SS_CONNECTED. Of course, SS_DATAGRAM sockets may change state only to SS_CONNECTDG, and SS_CONNECTDG sockets may only change states to SS_DATAGRAM. void socket_events(struct Socket* sock, unsigned int events); When the application changes the events it is interested in, it uses socket_events() to notify the events subsystem of that change. The _events_ parameter is the binary OR of one of SOCK_ACTION_SET, SOCK_ACTION_ADD, or SOCK_ACTION_DEL with an events mask. See the documentation for the SOCK_* macros for more information. const char* state_to_name(enum SocketState state); This function is defined only when DEBUGMODE is #define'd. It takes the given _state_ and returns a string giving that state's name. This function may safely be called from Debug() macros. const char* sock_flags(unsigned int flags); This function is defined only when DEBUGMODE is #define'd. It takes the given event interest flags and returns a string naming each of those flags. This function may safely be called from Debug() macros, but may only be called once, since it uses function static storage to store the flag strings. int sig_signal(struct Signal* sig); This macro returns the signal number for the given struct Signal. void* sig_data(struct Signal* sig); When a struct Signal is initialized, data that the call-back function may find useful is stored in the struct Signal. This macro returns that pointer. int sig_ed_int(struct Signal* sig); Engines may find it convenient to associate an integer with a struct Signal. This macro may be used to retrieve that integer or, when used as an lvalue, to assign a value to it. Engine data must be either an int or a void*; use of both is prohibited. void* sig_ed_ptr(struct Signal* sig); Engines may find it convenient to associate a void* pointer with a struct Signal. This macro may be used to retrieve that pointer or, when used as an lvalue, to assign a value to it. Engine data must be either an int or a void*; use of both is prohibited. int sig_active(struct Signal* sig); A signal's active flag is set when initialized by signal_add(). This may be used by the application to determine whether or not the signal has been initialized yet. If it is, sig_active() returns a non-zero value; otherwise, its value is 0. void signal_add(struct Signal* signal, EventCallBack call, void* data, int sig); This function is called to add a signal to the list of signals to be monitored. The _signal_ parameter is a pointer is a pointer to a struct Signal that is allocated by the application. The _call_ parameter is a pointer to a function to process any signal events. The _data_ parameter is for use of the signal call-back and may be zero. The _sig_ parameter is the integer value of the signal to be monitored. enum TimerType t_type(struct Timer* tim); This macro returns the type of the given timer. time_t t_value(struct Timer* tim); This macro returns the value that was used when the given timer was initialized by the events subsystem. It will contain an absolute time if the timer type is TT_ABSOLUTE, and a relative time otherwise. time_t t_expire(struct Timer* tim); This macro returns the absolute time at which the timer will next expire. void* t_data(struct Timer* tim); When a struct Timer is initialized, data that the call-back function may find useful is stored in the struct Socket. This macro returns that pointer. int t_ed_int(struct Timer *tim); Engines may find it convenient to associate an integer with a struct Timer. This macro may be used to retrieve that integer or, when used as an lvalue, to assign a value to it. Engine data must be either an int or a void*; use of both is prohibited. void* t_ed_ptr(struct Timer *tim); Engines may find it convenient to associate a void* pointer with a struct Timer. This macro may be used to retrieve that pointer or, when used as an lvalue, to assign a value to it. Engine data must be either an int or a void*; use of both is prohibited. int t_active(struct Timer *tim); A timer's active flag is set when initialized by timer_add(), and is cleared immediately prior to generating an event of type ET_DESTROY. This may be used by the application to determine whether or not the timer is still in use by the events subsystem. If it is, s_active() returns a non-zero value; otherwise, its value is 0. void timer_add(struct Timer* timer, EventCallBack call, void* data, enum TimerType type, time_t value); This function is called to initialize and queue a timer. The _timer_ parameter is a pointer to a struct Timer that is allocated by the application. The _call_ parameter is a pointer to a function to process the timer's expiration. The _data_ parameter is for use of the timer call-back and may be zero. The _type_ parameter must be one of the valid timer types--TT_ABSOLUTE, TT_RELATIVE, or TT_PERIODIC. Finally, _value_ is the value for the timer's expiration. void timer_del(struct Timer* timer); When the application no longer needs a TT_PERIODIC timer, or when it wishes to stop a TT_ABSOLUTE or TT_RELATIVE timer before its expiration, it should call the timer_del() function. void timer_chg(struct Timer* timer, enum TimerType type, time_t value); Occasionally, an application may wish to delay an existing TT_ABSOLUTE or TT_RELATIVE timer; this may be done with the timer_chg() function. The _type_ parameter must be one of TT_ABSOLUTE or TT_RELATIVE--changing the values of TT_PERIODIC timers is not supported. The _value_ parameter is the same as would be given to timer_add() for that particular type of timer. void timer_run(void); When an engine has finished processing the results of its socket and signal checks--just before it loops around to test for more events--it should call the timer_run() function to expire any waiting timers. time_t timer_next(struct Generators* gen); Most engines will use a blocking call with a timeout to check for socket activity. To determine when the next timer needs to be run, and thus to calculate how long the call should block, the engine should call timer_next() with the _gen_ parameter passed to the _EngineLoop_ function. The timer_next() function returns an absolute time, which may have to be massaged into a relative time before the engine may use it. const char* timer_to_name(enum TimerType type); This function is defined only when DEBUGMODE is #define'd. It takes the given _type_ and returns a string giving that type's name. This function may safely be called from Debug() macros. enum EventType ev_type(struct Event* ev); This macro simply returns the type of the event _ev_. int ev_data(struct Event* ev); When an event is generated, a single integer can be passed along as a piece of extra information. This can be used, for instance, to carry an errno value when an ET_ERROR is generated. This macro simply returns that integer. struct Socket* ev_socket(struct Event* ev); If the event was generated by a socket, this macro returns a pointer to the struct Socket that generated the event. The results are undefined if the event was not generated by a socket. struct Signal* ev_signal(struct Event* ev); If the event was generated by a signal, this macro returns a pointer to the struct Signal that generated the event. The results are undefined if the event was not generated by a signal. struct Timer* ev_timer(struct Event* ev); If the event was generated by a timer, this macro returns a pointer to the struct Timer that generated the event. The results are undefined if the event was not generated by a timer. void event_init(int max_sockets); Before any of the functions or macros described here can be called, the events subsystem must be initialized by calling event_init(). The _max_sockets_ parameter specifies to the events subsystem how many sockets it must be able to support; this figure may be used for memory allocation by the engines. void event_loop(void); Once the initial sockets are open, signals added, and timers queued, the application must call the event_loop() function in order to actually begin monitoring those sockets, signals, and timers. void event_generate(enum EventType type, void* arg, int data); This is the function called by the events subsystem to generate particular events. The _type_ parameter specifies the type of event to generate, and the _arg_ parameter must be a pointer to the event's generator. The _data_ parameter may be used for passing such things as signal numbers or errno values. const char* event_to_name(enum EventType type); This function is defined only when DEBUGMODE is #define'd. It takes the given _type_ and returns a string giving that event type's name. This function may safely be called from Debug() macros. const char* engine_name(void); This function is used to retrieve the name of the engine presently being used by the events subsystem. void gen_ref_inc(void* gen); This macro increments the reference count of the generator _gen_, preventing it from simply disappearing without warning. void gen_ref_dec(void* gen); This macro decrements the reference count of the generator _gen_, and releases the memory associated with it by generating at ET_DESTROY event if the reference count falls to zero and the generator is marked for destruction. No references should be made to the generator after calling this macro. Kev [2001-6-14 Kev] Finished initial description of the events subsystem. [2001-6-13 Kev] Initial description of the events subsystem. ircd-ircu-2.10.12.10.dfsg1/doc/api/send.txt0000644000175000017500000002204107312472724017647 0ustar madkissmadkissThe send functions are perhaps the most important API in all of ircd; without them, communications would not be possible. Most of these functions are pretty much stand-alone, although one or two are intended for use in conjunction with the MsgQ interface. The send functions use the MsgQ interface internally, but for the most part, this fact is hidden from the caller. Command tokenization provides the greatest complication. The functions do use ircd_snprintf() internally, so the use of numerics doesn't increase that complication. The tokenization issue is dealt with by making each function accept two char* pointers, _cmd_ and _tok_, in that order, and then defining a CMD_* macro in msg.h that contains the message string and the token string in that order. When one of these functions is called, it determines whether the destination will be a server or a user, then selects the correct one, either _cmd_ or _tok_, for that message. The MsgQ interface provides the concept of a priority queue; messages which must be sent as soon as possible, regardless of what other messages may already be in the queue. The sendcmdto_prio_one() and sendcmdto_flag_butone() functions make use of this priority queue. The function send_buffer() also takes a _prio_ argument that should be non-zero if the message passed to it should be placed in the priority queue. #define SKIP_DEAF 0x01 /* skip users that are +d */ This flag may be passed to sendcmdto_channel_butone() to cause a message passed by that function to skip users that are +d. See the documentation for sendcmdto_channel_butone() for more information. #define SKIP_BURST 0x02 /* skip users that are bursting */ This is another flag that may be passed to sendcmdto_channel_butone(). Its purpose is to cause the server to not send the message across a link that is still in the "burst" stage of network junction. See the documentation for sendcmdto_channel_butone() for more information. #define SKIP_NONOPS 0x04 /* skip users that aren't chanops */ Some messages may need to be passed only to channel operators. This flag is passed to sendcmdto_channel_butone() when that is the case. See the documentation for sendcmdto_channel_butone() for more information. void send_buffer(struct Client* to, struct MsgBuf* buf, int prio); Some applications may need to build a message piece by piece, directly utilizing the MsgQ interface. The function send_buffer() is used when that message has been completed to place the message on a client's queue. See the documentation for the MsgQ interface for more information about struct MsgBuf and the _buf_ parameter. void flush_connections(struct Client* cptr); This function attempts to send all queued data to a client specified by _cptr_. If _cptr_ is 0, all clients with non-empty send queues will have their queues flushed. void send_queued(struct Client *to); This function attempts to send all queued data to a client specified by _to_. The _to_ parameter is not permitted to be 0. This is the function called by flush_connections(). void sendrawto_one(struct Client *to, const char *pattern, ...); Most of the actual send functions in this API send their data with a prefix--the numeric of the origin. This function is used when a message should be sent _without_ that prefix. The caller must specify the complete message, including the exact command, with the _pattern_ argument and the variable argument list following it. void sendcmdto_one(struct Client *from, const char *cmd, const char *tok, struct Client *to, const char *pattern, ...); This function is used for sending messages to specific clients. The origin of the message is specified using the _from_ parameter; this will be used to formulate the origin. As mentioned above, _cmd_ and _tok_ are used to determine the command and token to be used. The _to_ parameter specifies which client the message should be sent to. The origin and command will be formatted and followed by a space; the given _pattern_ and the following arguments are passed to ircd_snprintf() for formatting. void sendcmdto_prio_one(struct Client *from, const char *cmd, const char *tok, struct Client *to, const char *pattern, ...); This function is identical to sendcmdto_one() except that messages formatted using it will be placed onto the priority queue. void sendcmdto_serv_butone(struct Client *from, const char *cmd, const char *tok, struct Client *one, const char *pattern, ...); This function treats its arguments similar to sendcmdto_one() does. Messages passed created with this function are sent to all directly linked servers except for the _one_ passed. If _one_ is 0, the message is sent to all linked servers. void sendcmdto_common_channels(struct Client *from, const char *cmd, const char *tok, const char *pattern, ...); When a user quits IRC, all of the other users on the channels that the user is on must receive a single QUIT message. This function formats the message, under control of _from_ (for the origin prefix), _cmd_ and _tok_, and _pattern_ and the variable argument list, and sends that message to all local users on the same channels as the user specified by _from_. This function does not send any messages across server<->server links. void sendcmdto_channel_butserv(struct Client *from, const char *cmd, const char *tok, struct Channel *to, const char *pattern, ...); This function is used to send a command to every local user on a particular channel, specified by _to_. No messages are sent across the server<->server links. void sendcmdto_channel_butone(struct Client *from, const char *cmd, const char *tok, struct Channel *to, struct Client *one, unsigned int skip, const char *pattern, ...); This function is used mostly for sending PRIVMSG commands to particular channels. The users that receive the message are under the control of the _skip_ parameter, which is a binary OR of the SKIP_DEAF, SKIP_BURST, and SKIP_NONOPS flags, depending on what channel users should see the message. This function sends messages across both client<->server and server<->server links, as needed. The client specified by _one_ will not receive a copy of the message. void sendcmdto_flag_butone(struct Client *from, const char *cmd, const char *tok, struct Client *one, unsigned int flag, const char *pattern, ...); This function is used for sending messages to clients with specific user modes set (specified by the _flag_ parameter). Three flags make sense for this function: FLAGS_WALLOP (user mode +w), FLAGS_DEBUG (user mode +g), and FLAGS_OPER. FLAGS_OPER has a special meaning that further restricts distribution of the message only to IRC operators. For the purposes of this function, no distinction is made between global operators and local operators. void sendcmdto_match_butone(struct Client *from, const char *cmd, const char *tok, const char *to, struct Client *one, unsigned int who, const char *pattern, ...); Certain kinds of global messages may be sent by IRC operators. This function implements those global messages. The _to_ parameter is used to specify a pattern by which to filter users, while _who_ specifies whether that pattern is to be applied to the user's server name or to the user's host name. The _who_ parameter may be one of MATCH_SERVER or MATCH_HOST; these two macros are defined in s_user.h. The _one_ parameter will not receive a copy of the message. void sendto_opmask_butone(struct Client *one, unsigned int mask, const char *pattern, ...); The sendto_opmask_butone() function sends a server notice to all subscribing users except for _one_. The _mask_ parameter is one of the SNO_* values defined in client.h and is used for selection of subscribing users. void vsendto_opmask_butone(struct Client *one, unsigned int mask, const char *pattern, va_list vl); The vsendto_opmask_butone() function is identical to the sendto_opmask_butone() function except that instead of a variable argument list, it takes a va_list, specified by _vl_. #define SND_EXPLICIT 0x40000000 /* first arg is a pattern to use */ When this flag, defined in ircd_reply.h, is combined with the _reply_ argument to the send_reply() function, the format string send_reply() uses is obtained from the first argument in the variable argument list passed to that function, rather than from the table of replies. int send_reply(struct Client* to, int reply, ...); The send_reply() function, declared in ircd_reply.h, is used to send clients numeric replies. Unless SND_EXPLICIT is used, the pattern will be extracted from a table of replies. Kev [2001-6-15 Kev] Initial documentation for the send functions. ircd-ircu-2.10.12.10.dfsg1/doc/api/jupe.txt0000644000175000017500000001136007312517002017650 0ustar madkissmadkissOccasionally, a server will become incorrectly configured or will start behaving incorrectly. Even more rarely, a server will be compromised, and a modified version of the server put in place to cause problems. These cases are the reason for the _jupe_, a temporary server ban. This is similar to the G-line, which is a temporary user ban, and indeed, the jupe API is very similar to the G-line API. #define JUPE_MAX_EXPIRE 604800 /* max expire: 7 days */ This macro lists the maximum expire time a jupe is permitted to have. This value is limited to 7 days to prevent abuse of the system. #define JUPE_ACTIVE 0x0001 This flag is used to indicate that a given jupe is globally active. #define JUPE_LOCAL 0x0002 This flag is used to indicate that a given jupe is a local one. Local jupes do not affect users on other servers. #define JUPE_LDEACT 0x0004 /* locally deactivated */ This flag is set on global jupes that have been locally deactivated. This flag is maintained internally by the jupe subsystem. struct Jupe; The struct Jupe describes everything about a given jupe. None of its fields may be directly accessed by the application; use the functions and macros described below instead. int JupeIsActive(struct Jupe* j); This macro returns a non-zero value if the jupe is active, or 0 otherwise. If a jupe is locally deactivated, this macro will always return 0. int JupeIsRemActive(struct Jupe* j); This macro returns a non-zero value if the jupe is active, ignoring whether or not it is locally deactivated. int JupeIsLocal(struct Jupe* j); This macro returns a non-zero value if the jupe is local only. char* JupeServer(struct Jupe* j); This macro returns the server name associated with the jupe. char* JupeReason(struct Jupe* j); This macro returns the reason that was given when the jupe was set. time_t JupeLastMod(struct Jupe* j); Jupes have a modification time that must be monotonically increasing. This macro simply returns that modification time. int jupe_add(struct Client *cptr, struct Client *sptr, char *server, char *reason, time_t expire, time_t lastmod, unsigned int flags); This function simply adds a jupe, set by _sptr_ and with a _server_, _reason_, _expire_, and _lastmod_ as specified. The _flags_ parameter is a bit mask consisting of the binary OR of JUPE_LOCAL and JUPE_ACTIVE, as appropriate. The jupe_add() function will propagate the jupe to all servers (assuming JUPE_LOCAL was not passed), and will break its link to the server specified by _server_ (assuming that the JUPE_ACTIVE flag _was_ passed). int jupe_activate(struct Client *cptr, struct Client *sptr, struct Jupe *jupe, time_t lastmod, unsigned int flags); This function activates the jupe specified by _jupe_, setting its _lastmod_ time as specified. If _flags_ is JUPE_LOCAL and if the jupe is locally deactivated, this function will turn off the local deactivation flag, but will not modify _lastmod_. If the jupe is globally deactivated, passing this function the JUPE_LOCAL flag will have no effect. int jupe_deactivate(struct Client *cptr, struct Client *sptr, struct Jupe *jupe, time_t lastmod, unsigned int flags); This function is similar to jupe_activate() except that it deactivates the jupe. If the given jupe is local, then the jupe is deleted from memory. In all other cases, the jupe is simply deactivated, either locally (if JUPE_LOCAL was passed via _flags_) or globally. Global deactivation will update the _lastmod_ time. struct Jupe* jupe_find(char *server); This function searches for a jupe matching the given _server_. void jupe_free(struct Jupe *jupe); This function releases all storage associated with a given jupe. void jupe_burst(struct Client *cptr); This function generates a burst of all existing global jupes and sends them to the server specified by _cptr_. int jupe_resend(struct Client *cptr, struct Jupe *jupe); This function resends the _jupe_ to a server specified by _cptr_. This may be used if, for instance, it is discovered that a server is not synchronized with respect to a particular jupe. int jupe_list(struct Client *sptr, char *server); This function sends the information about a jupe matching _server_ to the client specified by _sptr_. If _server_ is a NULL pointer, a list of all jupes is sent. Kev [2001-6-15 Kev] Initial documentation of the jupe API. ircd-ircu-2.10.12.10.dfsg1/doc/api/api.txt0000644000175000017500000000766107217500157017476 0ustar madkissmadkissThis directory is intended for documents describing programming interfaces within ircu, including such things as modebuf's and the features interface. Please write these documents as plain text; if we want HTML, we can write a script to convert the text versions into HTML versions. Toward that end, I respectfully suggest everyone conform to a common format, which I will describe here: Every .txt file should begin with a couple of paragraphs giving an overview of the API, its purpose, and how to use it. Paragraphs should be separated by blank lines, as shown here. Paragraphs that do not end in some form of punctuation, such as a period, will be treated as section headings. The introduction ends when the first API element appears. API element documentation is introduced with "<" followed by the element type--"struct", "typedef", "function", "macro", or (heaven forbid) "global", followed by ">", all on a line by itself. The next line should contain a declaration of the element as it would appear in a header file; this may spread across multiple lines and contain comments and blank lines. The declaration ends for most elements when a ";" is encountered; for macros, the declaration ends on the last line not ending in "\". The documentation for the API element should immediately follow the declaration of that element, and should be separated from it by a single blank line. This documentation should explain the purpose of the element and describe what each of its fields mean. The documentation ends when the corresponding " struct FooBar; /* a sample structure with no definition */ The comment, since it's on the same line as the ";", is associated with the declaration for struct FooBar. struct FooBar { long fb_magic; /* a magic number */ char *fb_string; /* a string of some sort */ }; The sequence "};" ends the struct declaration. typedef FooBar_t; /* a simple typedef */ This element shows how to hide the inner workings of typedefs. typedef struct FooBar FooBar_t; /* a more complex typedef */ Here we show the full typedef declaration. extern int fooBarFreeList; /* global variables should be avoided */ You should avoid global variables, but if you must have one for alloc counts or whatever, here's how to specify documentation for them. #define HAVE_FOOBAR /* We have FOOBAR, whatever it may be */ This could be used for boolean macros (macros used in #ifdef's, for instance) or for simple value macros where you're hiding the values. Since there are so many variations on macros, I'll only show one other variation below: #define FooBarVerify(foobar) ((foobar) && \ (foobar)->fb_magic == FOOBAR_STRUCT_MAGIC) This macro takes arguments. Again, we could leave out the actual definition, or even treat the macro as a function rather than a macro. This also shows how to do multi-line macros. void *foobar(struct FooBar *blah, int flag); Since function definitions never appear in header files anyway, we don't have to worry about hiding information. You should leave off "extern" in the function declaration, and please include names for the variables, so you can refer to them in the function documentation. The API document may then end in some summary information, if you wish, or a ChangeLog of some form, such as follows. Kev [2000-12-18 Kev] Initial definition of how API documents should look. Further entries in the changelog should *precede* this one and should be separated from it by a blank line. Also specify your name, as listed in the "" section, so we know who to blame ;) ircd-ircu-2.10.12.10.dfsg1/doc/api/motd.txt0000644000175000017500000000454410266320140017653 0ustar madkissmadkissThe server has a Message of the Day (MOTD) which is often used for describing the Acceptable Usage Policy, where to get help if you have problems, and so on. Older versions of ircd had a lot of duplicated code, as well as some inefficiencies, all related to sending the MOTD. As of u2.10.11, there is an API specifically for MOTDs. This API caches the MOTDs in memory for efficiency. Sending a MOTD to a client is as simple as calling a single function. void motd_init(void); This function initializes the MOTD subsystem. It will also read in the default MOTD (usually ircd.motd) and the remote MOTD (usually remote.motd) files. int motd_send(struct Client* cptr); This function sends an appropriate MOTD to the client specified by _cptr_. If _cptr_ is not a local client, the remote MOTD will be sent; otherwise, an attempt will be made to find a Motd entry in the configuration file that matches the client. If no Motd entry can be found, the default MOTD will be sent to the client. This function returns 0 for the convenience of other functions that must have an integer return value. void motd_signon(struct Client* cptr); This function is similar to motd_send(), described above, except that it will only send a message to the client indicating when the MOTD was last modified if the FEAT_NODEFAULTMOTD feature is set to TRUE. void motd_recache(void); The MOTD system will not automatically detect when MOTD files have been modified. This function causes the MOTD system to clear the MOTD cache and re-read the files. void motd_add(const char *hostmask, const char *path); This function is used to add a MOTD to be sent to clients possessing a given _hostmask_. If _hostmask_ is a numerical string, it is interpreted as a connection class. void motd_clear(void); This function clears the list of special MOTDs. Only the default MOTD and remote MOTD are not affected by this function. void motd_report(struct Client *to); The motd_report() function sends a list of the Motd entries stored in memory to the client specified by _to_. Access control should be handled by the caller. Kev [2001-6-15 Kev] Initial documentation of the MOTD interface. ircd-ircu-2.10.12.10.dfsg1/doc/api/ircd_snprintf.txt0000644000175000017500000002727107312472724021574 0ustar madkissmadkissThese functions are intended to be a complete replacement for sprintf and sprintf_irc. They are a (nearly) complete reimplementation, and of course they're snprintf clones, making it more difficult for accidental buffer overflows to crop up. First off, what's missing? These functions support all ANSI C conversion specifiers and selected ones from ISO 9x, with the exception of all floating-point conversions. The floating-point conversions are tricky, and will likely be dependent on the representation of a floating-point number on a particular architecture. While that representation is likely to conform to some standard, it is not currently used in ircu, so seemed like a good thing to omit, given the difficulty of implementing it. There are two more things missing from this implementation that would be required by ANSI; the first is support for multibyte character strings, and the second is support for locales, neither of which have any relevance for ircu, so again omission seemed to be a good policy. Additionally, %#x always causes '0x' (or '0X') to be printed, even if the number is zero. These functions also have some extensions not seen in a standards-compliant implementation; technically, the ISO 9x extensions fall into this category, for instance. The ISO 9x extensions supported are type extensions--%ju, %tu, and %zu, for instance; %qu and %hhu are also supported. The extensions added for use in ircu are %Tu, which takes a time_t, and the new %C conversion, which inserts either a numeric or a nick, dependent on the parameter. The GNU %m extension, which inserts the strerror() string corresponding to the current value of errno, is also supported, as is a special %v extension, which essentially does a recursive call to ircd_snprintf. The following description is descended from the Linux man page for the printf family of functions. The format string is composed of zero or more directives: ordinary characters (not %), which are copied unchanged to the output stream; and conversion specifications, each of which results in fetching zero or more subsequent arguments. Each conversion specification is introduced by the character %. The arguments must correspond properly (after type promotion) with the conversion specifier. After the %, the following appear in sequence: * Zero or more of the following flags: # specifying that the value should be converted to an "alternate form." For c, d, i, n, p, s, and u conversions, this option has no effect. For o conversions, the precision of the number is increased to force the first character of the output string to a zero (except if a zero value is printed with an explicit precision of zero). For x and X conversions, the string '0x' (or '0X' for X conversions) is prepended to it. For e, E, f, g, and G conversions, the result will always contain a decimal point, even if no digits follow it (normally, a decimal point appears in the results of those conversions only if a digit follows). For g and G conversions, trailing zeros are not removed from the result as they would otherwise be. For C conversions, if the destination is local and the origin is a user, the nick!user@host form is used. 0 specifying zero padding. For all conversions except n, the converted value is padded on the left with zeros rather than blanks. If a precision is given with a numeric conversion (d, i, o, u, i, x, and X), the 0 flag is ignored. - (a negative field width flag) indicates the converted value is to be left adjusted on the field boundary. Except for n conversions, the converted value is padded on the right with blanks, rather than on the left with blanks or zeros. A - overrides a 0 if both are given. ' ' (a space) specifying that a blank should be left before a positive number produced by a signed conversion (d, e, E, f, g, G, or i). + specifying that a sign always be placed before a number produced by a signed conversion. A + overrides a space if both are used. : specifying that a struct Client name should be preceded by a ':' character if the destination is a user * An optional decimal digit string specifying a minimum field width. If the converted value has fewer characters than the field width, it will be padded with spaces on the left (or right, if the left-adjustment flag has been given) to fill out the field width. * An optional precision, in the form of a period (`.') followed by an optional digit string. If the digit string is omitted, the precision is taken as zero. This gives the minimum number of digits to appear for d, i, o, u, x, and X conversions, the number of digits to appear after the decimal-point for e, E, and f conversions, the maximum number of significant digits for g and G conversions, or the maximum number of characters to be printed from a string for s conversions. * The optional character h, specifying that a following d, i, o, u, x, or X conversion corresponds to a short int or unsigned short int argument, or that a following n conversion corresponds to a pointer to a short int argument. If the h character is given again, char is used instead of short int. * The optional character l (ell) specifying that a following d, i, o, u, x, or X conversion applies to a pointer to a long int or unsigned long int argument, or that a following n conversion corresponds to a pointer to a long int argument. * The character L specifying that a following e, E, f, g, or G conversion corresponds to a long double argument, or a following d, i, o, u, x, or X conversion corresponds to a long long argument. Note that long long is not specified in ANSI C and therefore not portable to all architectures. * The optional character q. This is equivalent to L. * A j character specifying that the following integer (d, i, o, u, x, or X) conversion corresponds to an intmax_t argument. * A t character specifying that the following integer (d, i, o, u, x, or X) conversion corresponds to a ptrdiff_t argument. * A z character specifying that the following integer (d, i, o, u, x, or X) conversion corresponds to a size_t argument. * A T character specifying that the following integer (d, i, o, u, x, or X) conversion corresponds to a time_t argument. * A character that specifies the type of conversion to be applied. A field width or precision, or both, may be indicated by an asterisk `*' instead of a digit string. In this case, an int argument supplies the field width or precision. A negative field width is treated as a left adjustment flag followed by a positive field width; a negative precision is treated as though it were missing. The conversion specifiers and their meanings are: diouxX The int (or appropriate variant) argument is converted to signed decimal (d and i), unsigned octal (o), unsigned decimal (u), or unsigned hexadecimal (x and X) notation. The letters abcdef are used for x conversions; the letters ABCDEF are used for X conversions. The precision, if any, gives the minimum number of digits that must appear; if the converted value requires fewer digits, it is padded on the left with zeros. eE [NOT IMPLEMENTED] The double argument is rounded and converted in the style [-]d.dddedd where there is one digit before the decimal-point character and the number of digits after it is equal to the precision; if the precision is missing, it is taken as 6; if the precision is zero, no decimal-point character appears. An E conversion uses the letter E (rather than e) to introduce the exponent. The exponent always contains at least two digits; if the value is zero, the exponent is 00. f [NOT IMPLEMENTED] The double argument is rounded and converted to decimal notation in the style [-]ddd.ddd, where the number of digits after the decimal-point character is equal to the precision specification. If the precision is missing, it is taken as 6; if the precision is explicitly zero, no decimal-point character appears. If a decimal point appears, at least one digit appears before it. g [NOT IMPLEMENTED] The double argument is converted in style f or e (or E for G conversions). The precision specifies the number of significant digits. If the precision is missing, 6 digits are given; if the precision is zero, it is treated as 1. Style e is used if the exponent from its conversion is less than -4 or greater than or equal to the precision. Trailing zeros are removed from the fractional part of the result; a decimal point appears only if it is followed by at least one digit. c The int argument is converted to an unsigned char, and the resulting character is written. s The "char *" argument is expected to be a pointer to an array of character type (pointer to a string). Characters from the array are written up to (but not including) a terminating NUL character; if a precision is specified, no more than the number specified are written. If a precision is given, no null character need be present; if the precision is not specified, or is greater than the size of the array, the array must contain a terminating NUL character. p The "void *" pointer argument is printed in hexadecimal (as if by %#x or %#lx). n The number of characters written so far is stored into the integer indicated by the ``int *'' (or variant) pointer argument. No argument is converted. m The error message associated with the current value of errno is printed as if by %s. C The client argument identifier is printed under the control of the argument; if is NULL or is a user, the client's name (nickname or server name) is printed; otherwise, the client's network numeric is printed. H The channel argument identifier (channel name) is printed. v The argument given must be a pointer to a struct VarData with vd_format and vd_args must be initialized appropriately. On return, vd_chars will contain the number of characters added to the buffer, and vd_overflow will contain the number of characters that could not be added due to buffer overflow or due to a precision. % A `%' is written. No argument is converted. The complete conversion specification is `%%'. In no case does a non-existent or small field width cause truncation of a field; if the result of a conversion is wider than the field width, the field is expanded to contain the conversion result. struct VarData { size_t vd_chars; /* number of characters inserted */ size_t vd_overflow; /* number of characters that couldn't be */ const char *vd_format; /* format string */ va_list vd_args; /* arguments for %v */ }; This structure is used by the %v conversion specification. The _vd_format_ element must contain a format string, and the _vd_args_ element must be a variable argument list. Upon return from ircd_snprintf() or ircd_vsnprintf(), the _vd_chars_ element will contain the number of characters that were able to be inserted, and the _vd_overflow_ element will contain the number of characters that could not be inserted. int ircd_snprintf(struct Client *dest, char *buf, size_t buf_len, const char *format, ...); This formats the argument list, under control of the _format_, into the buffer specified by _buf_, the size of which is specified by _buf_len_. The _dest_ parameter is used to determine whether to use a numeric or a nickname for %C conversions. int ircd_vsnprintf(struct Client *dest, char *buf, size_t buf_len, const char *format, va_list args); This function is identical to the ircd_snprintf() function except for the variable argument list given by _args_. Kev [2001-6-15 Kev] Initial documentation of the ircd_snprintf family of functions. ircd-ircu-2.10.12.10.dfsg1/doc/p10.html0000644000175000017500000007637507432601330016703 0ustar madkissmadkiss Undernet P10 Protocol and Interface Specification

Undernet P10 Protocol and Interface Specification

(As of ircu 2.10.11)

Undernet Coder-com, coder-com@undernet.org

$Id: p10.html,v 1.6 2002/02/14 00:20:40 ghostwolf Exp $


This document aims to be a practical guide for implementing and maintaining the protocol, not just a reference manual.

This document is "work in progress" and being continually updated :)



1. Introduction

2. General concepts and background

2.1 Concepts.
2.2 Token Table.

3. Registration and syncronisation

4. Continous operation

4. Programmers reference: Function headers

  • 4.1 ms_nick
  • 4.2 m_burst
  • 4.3 ..etc

5. Programmers reference: Client/Server Structures

6. FAQ

7. Acknowledgements and disclaimer

8. Update History

  • TODO List

  • 1. Introduction

    [Back]


    2. General concepts and background

    2.1 Concepts

    The undernet P10 protocol uses a scheme of "Numerics" to uniquenly identify a client or server within the network. Each server has its own unique numeric (0 -> 4095) and each client has its own numeric within that server (0->262,143).

    The numerics are encoded into a Base64 stream to maintain human readable data flow and reduce the size of the messages. The Base64 character set used in ircu is included below, this defines all valid characters allowed in a Base64 numeric with "A" representing 0 and "]" representing 63.

    ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789[]
    Server numerics consist of 2 characters, with the minimum, 0, being represented by "AA", and the maximum, 4095, being represented by "]]". Client numerics are 3 characters long, with the minimum, 0, being represented by "AAA", and the maximum, 262,143, being represented by "]]]". The unique identifier of a client on the network consists of a combination of both the server and client numeric in the format SSCCC.

    As an example, consider a server "irc.undernet.org" which has a numeric of 2, translating to "AC" in Base64. On this server exists a client, whom has been allocated the numeric 63 (which translates to "AA]" in Base64). Therefore, the unique identifier of this client on the network is "ACAA]". From this, we can determine which server the message came from, aswell as the client who sent it.

    These numerics are used to prefix every message issued on the stream except for the initial "PASS" or "SERVER" message, which are not prefixed. Therefore, every message that can be recieved from a server will consist of the format:

    [NUMERIC PREFIX] [TOKEN] [DATA]
    For Example:
    A[A5j P ABAAA :Foo.
    2.2 Token Table

    The following table lists all the acceptable messages, along with their relevant "Token", which is used in the server<>server protocol. The aim of tokenisation is to reduce the bandwidth used during network communication by reducing the length of common message identifiers.
     

    Message Token
    PRIVMSG P
    WHO H
    WHOIS W
    WHOWAS X
    USER USER
    NICK N
    SERVER S
    LIST LIST
    TOPIC T
    INVITE I
    VERSION V
    QUIT Q
    SQUIT SQ
    KILL D
    INFO F
    LINKS LI
    STATS R
    HELP HELP
    ERROR Y
    AWAY A
    CONNECT CO
    MAP MAP
    PING G
    PONG Z
    OPER OPER
    PASS PA
    WALLOPS WA
    DESYNCH DS
    TIME TI
    SETTIME SE
    RPING RI
    RPONG RO
    NAMES E
    ADMIN AD
    TRACE TR
    NOTICE O
    WALLCHOPS WC
    CPRIVMSG CP
    CNOTICE CN
    JOIN J
    PART L
    LUSERS LU
    MOTD MO
    MODE M
    KICK K
    USERHOST USERHOST
    USERIP USERIP
    ISON ISON
    SQUERY SQUERY
    SERVLIST SERVLIST
    SERVSET SERVSET
    REHASH REHASH
    RESTART RESTART
    CLOSE CLOSE
    DIE DIE
    HASH HASH
    DNS DNS
    SILENCE U
    GLINE GL
    BURST B
    CREATE C
    DESTRUCT DE
    END_OF_BURST EB
    END_OF_BURST_ACK EA
    PROTO PROTO
    JUPE JU
    OPMODE OM
    CLEARMODE CM
    ACCOUNT AC
    [Back]

    3. Registration and syncronisation

    3.1 Server registration and authentication

    After a TCP connection has been established, the server initally introduces itself via a "PASS" message as follows:

    PASS :[PASSWORD]
    "PASSWORD" is simply compared with the password present in the destination servers config file, and is used to confirm credentials after the "SERVER" message has been recieved, as follows:
    SERVER [SERVERNAME] [HOPCOUNT] [START TIME] [LINK TIME] [PROTOCOL] [NUMERIC/MAXCONN] :[DESCRIPTION]
    For Example:
    1      2                3 4         5         6   7     8 
    SERVER irc.undernet.org 1 933022556 947908144 J10 AA]]] :[127.0.0.1] A Undernet Server.
    Notes:
    1. The SERVER message, indicating this connection wishes to introduce a new server to the network.
    2.  The name of the server you are introducing, a valid server name consists of [..defn..].
    3.  The hop count of the server you are introducing, this is always 1 when you are introducing yourself.
    4.  The epoch timestamp specifying when the ircd was started.
    5.  The epoch timestamp specifying the time the server initiated the link to the network.
    6.  The Protocol identifier of this server.
      1. This token informs the network which protocol it is compliant with, eg: If it is a P10 compliant server, then the token will be "P10".
      2.  If the server being introduced has not yet successfully synced its database with the network (Completed its net.burst - see 3.2), then the Protocol token should be prefixed with a J, instead of a P (Eg: J10) to indicate it is currently still joining the network.
      3.  The protocol token should always be JXX when the server is introducing itself.
    7. The numeric, and maximum connections identifier for this server.
      1. This token is formatted exactly the same as a client numeric is formatted. The first 2 characters identify the server's numeric, whilst in this situation, the final 3 characters define the maximum number of clients that this server can hold (and more importantly, the maximum number of numerics it will generate). This is always one less than a power of two, because the server uses this as a bitmask. A server can give out a higher numeric than this, however it will be "anded" with this number to find it's entry slot. The reason for this is so a server which is near the maximum number of clients can give out more numerics than it's using to prevent a new client getting a numeric that was used only seconds ago and maybe get messages destined to the old user.
      2.  The example "AA]]]" shows that this is a server with numeric 0, which will generate client numerics up to 262,143.
    8. This final parameter simply consists of a textual description of the server prefixed by a colon. This is displayed in a clients WHOIS line, aswell as in the LINKS reply. By convention, if this is a leaf server it contains the servers IP in square brackets at the beginning of the string,
    3.2 Network Database resyncronisation

    After the connection has been established and verified, the next step is to syncronise the database of client/server/channel information between the two servers.

    3.2.1 - SERVER Messages
    Server details are transmitted via "SERVER" messages similar to the initial introduction message, with the following format:
    [OWNING SERVER PREFIX] S [SERVERNAME] [HOPCOUNT] [START TIME] [LINK TIME] [PROTOCOL] [NUMERIC/MAXCONN] 0 :[DESCRIPTION]
    The syntax of this message is almost identical to the originally recieved server message, with the only exception being that the message is numeric prefixed, to indicate which server sent this message (and also therefore, which hub this new server is linked too). There is also a fixed "0" present before the Description field, this is a placeholder for future use and currently unused. [Isomer: Question, what IS this reserved for?]

    3.2.2 - NICK Messages

    Client information is transmitted via "NICK" messages, of the following format:
    [NUMERIC PREFIX] N [NICK] [HOPCOUNT] [TIMESTAMP] [USERNAME] [HOST] <+modes> [BASE64 IP] [NUMERIC] :[USERINFO]
    For Example:
    1  2 3       4 5         6     7            8     9      10    11
    AF N Client1 1 947957573 User userhost.net +oiwg DAqAoB AFAAA :Generic Client.
    Notes:
    1. The numeric of the server sending this message. (And hence, owning this client).
    2. The "NICK" token.
    3. The nickname of this client, currently max 9 chars.
    4. The "Hopcount" of this client, Ie: how many servers away it is on.
    5. The epoch timestamp indicating when the user was created.
    6. The "User" part of the user@host mask.
    7. the "Host" part of the user@host mask.
    8. [Optional]: User modes. If present, this is always +<user modes for this client>. Note that the special +r usermode is followed by the client's account name; see the documentation for ACCOUNT.
    9. The real IP address of this client, a Base64 encoded 32bit int.
    10. This client's numeric, in SSCCC format.
    11. Free format user info line.

    12.  
    3.2.3 - BURST Messages
    Channel details and membership information is synchronised in one (or more) BURST messages for each channel that exists, formatted as follows:
    [NUMERIC PREFIX] B [CHANNEL] [CREATION TIMESTAMP] <+MODES> <ARG1> <ARG2> [MEMBER LIST] <:%BANS>
    For Example:
    1  2 3          4         5      6   7  8                                         9
    AZ B #coder-com 949217470 +tinkl key 56 AAAAA,AAAAB,AAAAC,ABAAA,ABAAB,ABAAC,ACAAA :%*!*@*.net
    Notes:
    1. The numeric of the server sending this message.
    2. The "BURST" token.
    3. The name of the channel to which this data belongs. Currently #Channel and +Channel names can be sent in a BURST message, &Channels are not because by definition they are local to the server.
    4. The epoch timestamp indicating when the channel was created.
    5. [Optional]: Channel Modes.
      1. The channel may have a number of modes set, aswell as relevant mode arguments in the following 2 parameters.
    6. [Optional]: Channel Key, this parameter is present if the channel modes contain a "k" mode.
    7. [Optional]: Channel Limit, this parameter is present if the channel modes contain a "l" mode.
    8.  A comma seperated list of client numerics, with the following specific formatting rules to indicate +o, +v and +ov channel members.
      1. Numerics can have the following symbols appended on them; ":ov", ":v" or ":o". These indicate that this numeric is either Opped (:o), Voiced (:v) or both (:ov). This state applies to the numeric it is attached too, and all subsequent numerics until another state is encountered. For Example:
      2. AAABA:ov, AAABB:o,AAABC,AAABD,AAABE:v,AAABZ

      3. Here, AAABA is both opped, and voiced, AAABB, AAABC and AAABD are opped leaving AAABE and AAABZ voiced.
      4.  The first numeric of the member list will always contain a state symbol.
    9. A space seperated list of bans present in the channel. The start of the ban stream is indicated by a ":%", everything following the ":%" is the ban list.

    10. For Example:
      :%*!*@*.foobar.net another!ban@*.com *!*fred@a.host.co.uk
      Would add the following bans to the channel:

      *!*@*.foobar.net
      another!ban@*.com
      *!*fred@a.host.co.uk

    If the length of a BURST message exceeds the maximum lenght of a line (512 characters) then the remaining channel members/bans are sent in subsequent BURST lines. The subsequent burst lines are only used to add additional members to the channel, and if neccessary, channel bans. There will be no "Mode" parameters present. A sample additional burst line would be:
    AZ BURST #coder-com 949217470 ACAAB:o,ACAAD :%*!*another@*.ban.com
    Which adds two more opped members and a ban to the channel.
    3.2.4 - JUPE Messages
    Any currently unexpired JUPEs are transmitted via "JUPE" messages with the following format:
    [NUMERIC PREFIX] JU * (+|-)[SERVER NAME] [LIFETIME] [LAST MOD] :[REASON]
    For example:
    1  2  3 4                5         6         7
    AZ JU * +juped.undernet.org 000003593 955419707 :Juped Server
    Notes:
    1. The numeric of the server sending this message.
    2. The "JUPE" token.
    3. The target that should apply this JUPE (always "*" during bursts).
    4. The name of the server to JUPE, prefixed with a "+" if the JUPE is active, or with a "-" if it is not.
    5. The remaining absolute lifetime of the JUPE, expressed in seconds.
    6. The last time the JUPE was modified.
    7. The reason the JUPE was applied.
    3.3 Summary

    The following table summarises the sequence of events that occur when a server connects to another server. S1 is our server, and S2 is a HUB on the target network.

    S1: Sends Password.
    S1: Sends initial SERVER message.

    S2 Confirms S1 has the correct credentials, and if so, proceeds. If not, S1 is squit with a relevant reason.

    S2: Sends Password.
    S2: Sends initial SERVER message.

    S1 Confirms S2 has the correct credentials, and if so, proceeds. If not, S2 is squit with a relevant reason.

    The follow occur asynchronously, however they have been shown seperately below for simplicity.

    S1: Sends all the servers it is aware of as a stream of SERVER messages.
    S1: Sends all the clients it is aware of as a stream of NICK messages.
    S1: Sends the database of channel states on the network, as a stream of BURST messages.
    S1: Sends all the jupes it is aware of as a stream of JUPE messages.
    S1: Sends a END_OF_BURST token (EB) to indicate it has finished sending.

    S2: Sends all the servers it is aware of as a stream of SERVER messages.
    S2: Sends all the clients it is aware of as a stream of NICK messages.
    S2: Sends the database of channel states on the network, as a stream of BURST messages.
    S2: Sends all the jupes it is aware of as a stream of JUPE messages.
    S2: Sends a END_OF_BURST token (EB) to indicate it has finished sending.

    S2: Sends an EOB_ACK token (EA) to indicate it has succesfully recieved the END_OF_BURST from S1
    S1: Sends an EOB_ACK token (EA) to indicate it has succesfully recieved the END_OF_BURST from S2

    Example Session:

    [WRITE]: PASS :54321
    [WRITE]: SERVER irc.undernet.org 1 947957852 947957852 J10 AB]]] :Undernet Client Server.
    [WRITE]: AB N MrFoo 1 947957852 ~me myhost.foobar.net +diksw DAqAoB ABAAA :Mr Foo (foo@bar.com).
    [WRITE]: AB B #mychannel 946101324 ABAAA:o
    [WRITE]: AB EB
    [ READ]: PASS :54321
    [ READ]: SERVER server1.undernet.org 1 947901540 947958150 J10 AFAD] :A Generic Server.
    [ READ]: AF S server2.undernet.org 2 0 947957585 P10 AZAD] 0 :[192.168.10.3] A Generic Server.
    [ READ]: AZ S server3.undernet.org 3 0 947957607 P10 AIAD] 0 :[192.168.10.5] A Generic Server.
    [ READ]: AF N Client1 1 947957573 Ident userhost.net +oiwg DAqAoB AFAAA :Generic Client.
    [ READ]: AZ N Client2 2 947957719 Ident userhost.net +iwg DAqAoB AZAAA :Generic Client.
    [ READ]: AI N Client3 3 947957742 Ident userhost.net +iwg DAqAoB AIAAA :Generic Client.
    [ READ]: AI N Client4 3 947958121 Ident userhost.net +iwg DAqAoB AIAAB :Generic Client.
    [ READ]: AF B #foobar 947957734 +tink akey AIAAB,AIAAA:v,AZAAA:o :%*!*another@*.ban.com *!*foo@bar.net
    [ READ]: AF B #coder-com 947957727 AIAAB,AZAAA:o
    [ READ]: AF B #another 946101321 AFAAA
    [ READ]: AF JU * +juped.undernet.org 3600 947958100 :Broken, please fix
    [ READ]: AF EB
    [WRITE]: AB EA
    [ READ]: AF EA
    [Back]


    4. Continuous Operation

    This chapter provides details of the messages that can be sent after successfully linking to a network, and synchronising the channel/user database.

    4.1 Channel state operations

    There are a number of messages that can modify the state of a channel, these are:

      4.1.1 - MODE

      The MODE message can modify channel modes and bans, and also give or take operator/voice status from channel members.

         
        [NUMERIC PREFIX] M [CHANNEL] (+|-)[MODESTRING] <MODESTRING PARAMETERS>


      For Example:

         
        1     2 3          4        5
        AZAAA M #coder-com +stinlko 500 TestKey BAC


      Notes:
       

      1. The numeric of the user issuing this MODE command. It can be assumed this user is opped on the target channel.
      2. The "MODE" token.
      3. The target channel.
      4. The "Mode string".
        1. This consists of up to 6 '+' or '-' (add or remove) prefixed channel modes. (If no '+' or '-' are specified, a '+' is assumed unless a '-' has been encountered previously in the mode string). For example, '+s+t+n-l-io' is a valid mode string, as is '+stnmov'.

        2.  
        3. Valid Mode modes are:
           
          Token Function Parameters
          p Sets/Unsets 'Private' Flag. None.
          s Sets/Unsets 'Secret' Flag. None.
          m Sets/Unsets 'Moderated' Flag. None.
          n Sets/Unsets 'External Messages' Flag. None.
          t Sets/Unsets 'Topic Limit' Flag. None.
          i Sets/Unsets 'Invite only' Flag. None.
          l Sets/Unsets 'Channel Limit' Flag. The channel limit.
          k Sets/Unsets 'Channel Key' Flag. The channel keyword (Password).
          o Ops and Deops users. Numeric of user to be opped.
          v Voice Numeric of user to be voiced.
          b Ban Ban string.
      1. The "Mode string Parameters".
        1. This is a matching list of parameters to the modes supplied in the "Modestring".

        2. For Example:
          If the Modestring is "+stnlo", a typical parameter string would be "500 AZAA". The first 3 modes, 's', 't' and 'n' do not require parameters, so non are present. The following two, 'l' and 'o' both require parameters, so they are 500 and AZAAA respectively (This sets the channel limit to 500 users, and ops the numeric AZAAA).


      N.B: The "MODE" message is also used to modify a client's user modes, not just channel modes. See section 4.2 for details.

      4.1.2 - OPMODE

      The OPMODE message is identical in syntax to the MODE message, however it will only ever have an operator as the source. It is likely that the source of this mode will not have ops in the target channel, but it should succeed never the less.

      4.1.3 - JOIN

      4.1.4 - PART

      4.1.5 - KICK

      4.1.6 - TOPIC

      4.1.7 - CLEARMODE
       

        AZAAA CM #coder-com ovpsmikbl
    4.2 Client state operations
    4.2.1 - NICK
    AZAAA N Nick2 955423230
    4.2.2 - MODE
    AZAAA M Nick2 :+odi
    4.2.3 - ACCOUNT
    AX AC AZAAA oper

    The ACCOUNT message provides a way for servers, such as the channel service server, to set the account name information that is associated with a client. Once set, it cannot be unset or changed, and will be propagated in NICK during net bursts using the special user mode +r followed by the account name.

    4.3 Channel/Client Messaging.
    4.3.1 - PRIVMSG

    4.3.2 - NOTICE

    4.3.3 - CNOTICE

    4.3.4 - CPRIVMSG
     

    [Back]

    5. Programmers reference: Client/Server Structures

    This section provides information on the standard Client/Server structures, for easy reference during development.

    [..Link to autogenerated struct.html..]

    [Back]



    7. FAQ

    Frequently asked questions.

    • Q. How..
    • A. ...
    [Back]

    8. Update History

    [2000-01-20]: Initial draft, structure, background info.
    [2000-02-13]: Added initial BURST documentation.
    [2000-02-14]: Continued BURST documentation / Begin NICK and SERVER documentation.
    [2000-02-26]: Continued chapter 5, few example fixes, added token table from msg.h. -Gte.
    [2000-03-02]: Added NICK spec. -Gte.
    [2000-03-18]: Added JUPE spec. -Kev
    [2000-04-10]: Added information about OPMODE and CLEARMODE tokens. -Kev
    [2000-04-11]: Started work on chapter 4. -Gte
    [2000-06-01]: Changed some info about the max number of clients -Isomer
    [2002-01-11]: Wrote a specification for ACCOUNT and noted that a usermode in a NICK message may have an argument. -Kev

    8.1 TODO

    • Finish Chapter 5.
    • Go through examples, and ensure they are all correct.
    • Add common function headers, with argv listings.
    • Add description of further server to server messages, with special cases and outcomes.
    • Add FAQ Section.
    [Back] ircd-ircu-2.10.12.10.dfsg1/doc/example.conf0000644000175000017500000007412210570326746017717 0ustar madkissmadkiss# ircd.conf - configuration file for ircd version ircu2.10 # # Last Updated: 20, March 2002. # # Written by Niels , based on the original example.conf, # server code and some real-life (ahem) experience. # # Updated and heavily modified by Braden . # # Rewritten by A1kmm(Andrew Miller) to support # the new flex/bison configuration parser. # # Thanks and credits to: Run, Trillian, Cym, Morrissey, Chaos, Flynn, # Xorath, WildThang, Mmmm, SeKs, Ghostwolf and # all other Undernet IRC Admins and Operators, # and programmers working on the Undernet ircd. # # This is an example of the configuration file used by the Undernet ircd. # # This document is based on a (fictious) server in Europe with a # connection to the Undernet IRC network. It is primarily a leaf server, # but if all the other hubs in Europe aren't in service, it can connect # to one in the US by itself. # # The configuration format consists of a number of blocks in the format # BlockName { setting = number; setting2 = "string"; setting3 = yes; }; # Note that comments start from a #(hash) and go to the end of the line. # Whitespace(space, tab, or carriage return/linefeed) are ignored and may # be used to make the configuration file more readable. # # Please note that when ircd puts the configuration lines into practice, # it parses them exactly the other way round than they are listed here. # It uses the blocks in reverse order. # # This means that you should start your Client blocks with the # "fall through", most vanilla one, and end with the most detailed. # # There is a difference between the "hostname" and the "server name" # of the machine that the server is run on. For example, the host can # have "veer.cs.vu.nl" as FQDN, and "Amsterdam.NL.EU.undernet.org" as # server name. # A "server mask" is something like "*.EU.UnderNet.org", which is # matched by "Amsterdam.NL.EU.undernet.org" but not by # "Manhattan.KS.US.undernet.org". # # Please do NOT just rename the example.conf to ircd.conf and expect # it to work. # [General] # # First some information about the server. # General { # name = "servername"; # vhost = "ipv4vhost"; # vhost = "ipv6vhost"; # description = "description"; # numeric = numericnumber; # dns vhost = "ipv4vhost"; # dns vhost = "ipv6vhost"; # dns server = "ipaddress"; # dns server = "ipaddress2"; # }; # # If present, must contain a valid address in dotted # quad or IPv6 numeric notation (127.0.0.1 or ::1). The address MUST # be the address of a physical interface on the host. This address is # used for outgoing connections if the Connect{} block does not # override it. See Port{} for listener virtual hosting. If in doubt, # leave it out -- or use "*", which has the same meaning as no vhost. # # You may specify both an IPv4 virtual host and an IPv6 virtual host, # to indicate which address should be used for outbound connections # of the respective type. # # Note that has to be unique on the network your server # is running on, must be between 0 and 4095, and is not updated on a rehash. # # The two DNS lines allow you to specify the local IP address to use # for DNS lookups ("dns vhost") and one or more DNS server addresses # to use. If the vhost is ambiguous for some reason, you may list # IPV4 and/or IPV6 between the equals sign and the address string. # The default DNS vhost is to let the operating system assign the # address, and the default DNS servers are read from /etc/resolv.conf. # In most cases, you do not need to specify either the dns vhost or # the dns server. General { name = "London.UK.Eu.UnderNet.org"; description = "University of London, England"; numeric = 1; }; # [Admin] # # This sets information that can be retrieved with the /ADMIN command. # It should contain at least an admin Email contact address. Admin { # At most two location lines are allowed... Location = "The University of London"; Location = "Undernet IRC server"; Contact = "IRC Admins "; }; # [Classes] # # All connections to the server are associated with a certain "connection # class", be they incoming or outgoing (initiated by the server), be they # clients or servers. # Recommended client classes: # Take the following class blocks only as a guide. # Class { # name = ""; # pingfreq = time; # connectfreq = time; # maxlinks = number; # sendq = size; # usermode = "+i"; # }; # # maxlinks should be set at either 0 or 1. # # applies only to servers, and specifies the frequency # that the server tries to autoconnect. setting this to 0 will cause # the server to attempt to connect repeatedly with no delay until the # condition is satisfied. This is a Bad Thing(tm). # Note that times can be specified as a number, or by giving something # like: 1 minutes 20 seconds, or 1*60+20. # # Recommended server classes: # All your server uplinks you are not a hub for. Class { name = "Server"; pingfreq = 1 minutes 30 seconds; connectfreq = 5 minutes; maxlinks = 1; sendq = 9000000; }; # All the leaf servers you hub for. Class { name = "LeafServer"; pingfreq = 1 minutes 30 seconds; connectfreq = 5 minutes; maxlinks = 0; sendq = 9000000; }; # Client { # username = "ident"; # host = "host"; # ip = "127.0.0.0/8"; # password = "password"; # class = "classname"; # maxlinks = 3; # }; # # Everything in a Client block is optional. If a username mask is # given, it must match the client's username from the IDENT protocol. # If a host mask is given, the client's hostname must resolve and # match the host mask. If a CIDR-style IP mask is given, the client # must have an IP matching that range. If maxlinks is given, it is # limits the number of matching clients allowed from a particular IP # address. # # Recommended client classes: # Client classes. 10 = locals; 2 = for all .net and .com that are not # in Europe; 1 = for everybody. Class { name = "Local"; pingfreq = 1 minutes 30 seconds; sendq = 160000; maxlinks = 100; usermode = "+iw"; }; Class { name = "America"; pingfreq = 1 minutes 30 seconds; sendq = 80000; maxlinks = 5; }; Class { name = "Other"; pingfreq = 1 minutes 30 seconds; sendq = 160000; maxlinks = 400; }; Class { name = "Opers"; pingfreq = 1 minutes 30 seconds; sendq = 160000; maxlinks = 10; # For connection classes intended for operator use, you can specify # privileges used when the Operator block (see below) names this # class. The local (aka globally_opered) privilege MUST be defined # by either the Class or Operator block. The following privileges # exist: # # local (or propagate, with the opposite sense) # whox (log oper's use of x flag with /WHO) # display (oper status visible to lusers) # chan_limit (can join local channels when in # MAXCHANNELSPERUSER channels) # mode_lchan (can /MODE &channel without chanops) # deop_lchan (cannot be deopped or kicked on local channels) # walk_lchan (can forcibly /JOIN &channel OVERRIDE) # show_invis (see +i users in /WHO x) # show_all_invis (see +i users in /WHO x) # unlimit_query (show more results from /WHO) # local_kill (can kill clients on this server) # rehash (can use /REHASH) # restart (can use /RESTART) # die (can use /DIE) # local_jupe (not used) # set (can use /SET) # local_gline (can set a G-line for this server only) # local_badchan (can set a Gchan for this server only) # see_chan (can see users in +s channels in /WHO) # list_chan (can see +s channels with /LIST S) # wide_gline (can use ! to force a wide G-line) # see_opers (can see opers without DISPLAY privilege) # local_opmode (can use OPMODE/CLEARMODE on local channels) # force_local_opmode (can use OPMODE/CLEARMODE on quarantined local channels) # kill (can kill clients on other servers) # gline (can issue G-lines to other servers) # jupe_server (not used) # opmode (can use /OPMODE) # badchan (can issue Gchans to other servers) # force_opmode (can use OPMODE/CLEARMODE on quarantined global channels) # apass_opmode (can use OPMODE/CLEARMODE on +A and +U keys) # # For global opers (with propagate = yes or local = no), the default # is to grant all of the above privileges EXCEPT walk_lchan, # unlimit_query, set, badchan, local_badchan and apass_opmode. # For local opers, the default is to grant ONLY the following # privileges: # chan_limit, mode_lchan, show_invis, show_all_invis, local_kill, # rehash, local_gline, local_jupe, local_opmode, whox, display, # force_local_opmode # Any privileges listed in a Class block override the defaults. local = no; }; # [Client] # # To allow clients to connect, they need authorization. This can be # done based on hostmask, address mask, and/or with a password. # With intelligent use of classes and the maxconnections field in the # Client blocks, you can let in a specific domain, but get rid of all other # domains in the same toplevel, thus setting up some sort of "reverse # Kill block". # Client { # host = "user@host"; # ip = "user@ip"; # password = "password"; # class = "classname"; # }; # # Technical description (for examples, see below): # For every connecting client, the IP address is known. A reverse lookup # on this IP-number is done to get the (/all) hostname(s). # Each hostname that belongs to this IP-number is matched to , # and the Client {} is used when any matches; the client will then show # with this particular hostname. If none of the hostnames match, then # the IP-number is matched against the field, if this matches # then the Client{} is used nevertheless and the client will show with the # first (main) hostname if any; if the IP-number did not resolve then the # client will show with the dot notation of the IP-number. # There is a special case for the UNIX domain sockets and localhost connections # though; in this case the field is compared with the # name of the server (thus not with any IP-number representation). The name # of the server is the one returned in the numeric 002 reply, for example: # 002 Your host is 2.undernet.org[jolan.ppro], running version ... # Then the "jolan.ppro" is the name used for matching. # Therefore, unix domain sockets, and connections to localhost would # match this block: # host = "*@jolan.ppro"; # # This is the "fallback" entry. All .uk, .nl, and all unresolved are # in these two lines. # By using two different lines, multiple connections from a single IP # are only allowed from hostnames which have both valid forward and # reverse DNS mappings. Client { class = "Other"; ip = "*@*"; }; Client { class = "Other"; host = "*@*"; }; # If you don't want unresolved dudes to be able to connect to your # server, do not specify any "ip = " settings. # # Here, take care of all American ISPs. Client { host = "*@*.com"; class = "America"; }; Client { host = "*@*.net"; class = "America"; }; # Now list all the .com / .net domains that you wish to have access... # actually it's less work to do it this way than to do it the other # way around - K-lining every single ISP in the US. # I wish people in Holland just got a .nl domain, and not try to be # cool and use .com... Client { host = "*@*.wirehub.net"; class = "Other";}; Client { host = "*@*.planete.net"; class = "Other";}; Client { host = "*@*.ivg.com"; class = "Other";}; Client { host = "*@*.ib.com"; class = "Other";}; Client { host = "*@*.ibm.net"; class = "Other";}; Client { host = "*@*.hydro.com"; class = "Other";}; Client { host = "*@*.nl.net"; class = "Local";}; # You can request a more complete listing, including the "list of standard # Kill blocks" from the Routing Committee; it will also be sent to you if # you apply for a server and get accepted. # # Ourselves - this makes sure that we can get in, no matter how full # the server is (hopefully). Client { host = "*@*.london.ac.uk"; ip = "*@193.37.*"; class = "Local"; }; # You can put an expression in the maxlinks value, which will make ircd # only accept a client when the total number of connections to the network # from the same IP number doesn't exceed this number. # The following example would accept at most one connection per IP number # from "*.swipnet.se" and at most two connections from dial up accounts # that have "dial??.*" as host mask: # Client { # host = "*@*.swipnet.se"; # maxlinks = 1; # class = "Other"; # }; # Client { # host = "*@dial??.*"; # maxlinks = 2; # class = "Other"; # }; # # If you are not worried about who connects, this line will allow everyone # to connect. Client { host = "*@*"; ip = "*@*"; class = "Other"; }; # [motd] # # It is possible to show a different Message of the Day to a connecting # client depending on its origin. # motd { # # Note: host can also be a classname. # host = "Other"; # file = "path/to/motd/file"; # }; # # DPATH/net_com.motd contains a special MOTD where users are encouraged # to register their domains and get their own client{} lines if they're in # Europe, or move to US.UnderNet.org if they're in the USA. motd { host = "*.net"; file = "net_com.motd"; }; motd { host = "*.com"; file = "net_com.motd"; }; motd { host = "America"; file = "net_com.motd"; }; # A different MOTD for ourselves, where we point out that the helpdesk # better not be bothered with questions regarding irc... motd { host = "*.london.ac.uk"; file = "london.motd"; }; # [UWorld] # # One of the many nice features of Undernet is "Uworld", a program # connected to the net as a server. This allows it to broadcast any mode # change, thus allowing opers to, for example, "unlock" a channel that # has been taken over. # There is only one slight problem: the TimeStamp protocol prevents this. # So there is a configuration option to allow them anyway from a certain # server. # UWorld { # # The servername or wildcard mask for it that this applies to. # name = "relservername"; # }; # # You may have have more than one name listed in each block. # # Note: (1) These lines are agreed on by every server admin on Undernet; # (2) These lines must be the same on every single server, or results # will be disasterous; (3) This is a useful feature, not something that # is a liability and abused regularly (well... :-) # If you're on Undernet, you MUST have these lines. I cannnot stress # this enough. If all of the servers don't have the same lines, the # servers will try to undo the mode hacks that Uworld does. Make SURE that # all of the servers have the EXACT same UWorld blocks. # # If your server starts on a bit larger network, you'll probably get # assigned one or two uplinks to which your server can connect. # If your uplink(s) also connect to other servers than yours (which is # probable), you need to define your uplink as being allowed to "hub". # See the Connect block documentation for details on how to do that. UWorld { name = "uworld.eu.undernet.org"; name = "uworld2.undernet.org"; name = "uworld.undernet.org"; name = "channels.undernet.org"; name = "channels2.undernet.org"; name = "channels3.undernet.org"; name = "channels4.undernet.org"; name = "channels5.undernet.org"; name = "channels6.undernet.org"; }; # As of ircu2.10.05 is it possible to Jupe nicks. As per CFV-0095 and # CFV-0255, the following nicks must be juped, it is not allowed to # jupe others as well. Jupe { nick = "A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,{,|,},~,-,_,`"; nick = "EuWorld,UWorld,UWorld2"; nick = "login,undernet,protocol,pass,newpass,org"; nick = "StatServ,NoteServ"; nick = "ChanSvr,ChanSaver,ChanServ"; nick = "NickSvr,NickSaver,NickServ"; nick = "LPT1,LPT2,COM1,COM2,COM3,COM4,AUX"; }; # [Kill] # # While running your server, you will most probably encounter individuals # or groups of persons that you do not wish to have access to your server. # # For this purpose, the ircd understands "kill blocks". These are also # known as K-lines, by virtue of the former config file format. # Kill # { # host = "user@host"; # reason = "The reason the user will see"; # }; # It is possible to ban on the basis of the real name. # It is also possible to use a file as comment for the ban, using # file = "file": # Kill # { # realname = "realnametoban"; # file = "path/to/file/with/reason/to/show"; # }; # # # The default reason is: "You are banned from this server" # Note that Kill blocks are local to the server; if you ban a person or a # whole domain from your server, they can get on IRC via any other server # that doesn't have them Killed (yet). # # With a simple comment, using quotes: Kill { host = "*.au"; reason = "Please use a nearer server"; }; Kill { host = "*.edu"; reason = "Please use a nearer server"; }; # You can also kill based on username. Kill { username = "sub7"; realname = "s*7*"; reason = "You are infected with a Trojan"; }; # The file can contain for example, a reason, a link to the # server rules and a contact address. Note the combination # of username and host in the host field. Kill { host = "*luser@unixbox.flooder.co.uk"; file = "kline/youflooded.txt"; }; # IP-based kill lines apply to all hosts, even if an IP address has a # properly resolving host name. Kill { host = "192.168.*"; file = "klines/martians"; }; # The realname field lets you ban by realname... Kill { realname = "*sub7*"; reason = "You are infected with a Trojan"; }; # [Connect] # # You probably want your server connected to other servers, so your users # have other users to chat with. # IRC servers connect to other servers forming a network with a star or # tree topology. Loops are not allowed. # In this network, two servers can be distinguished: "hub" and "leaf" # servers. Leaf servers connect to hubs; hubs connect to each other. # Of course, many servers can't be directly classified in one of these # categories. Both a fixed and a rule-based decision making system for # server links is provided for ircd to decide what links to allow, what # to let humans do themselves, and what links to (forcefully) disallow. # # The Connect blocks # define what servers the server connect to, and which servers are # allowed to connect. # Connect { # name = "servername"; # host = "hostnameORip"; # vhost = "localIP"; # password = "passwd"; # port = portno; # class = "classname"; # maxhops = 2; # hub = "*.eu.undernet.org"; # autoconnect = no; # }; # # The "port" field defines the default port the server tries to connect # to if an operator uses /connect without specifying a port. This is also # the port used when the server attempts to auto-connect to the remote # server. (See Class blocks for more informationa about auto-connects). # You may tell ircu to not automatically connect to a server by adding # "autoconnect = no;"; the default is to autoconnect. # # If the vhost field is present, the server will use that IP as the # local end of connections that it initiates to this server. This # overrides the vhost value from the General block. # # The maxhops field causes an SQUIT if a hub tries to introduce # servers farther away than that; the element 'leaf;' is an alias for # 'maxhops = 0;'. The hub field limits the names of servers that may # be introduced by a hub; the element 'hub;' is an alias for # 'hub = "*";'. # # Our primary uplink. Connect { name = "Amsterdam.NL.Eu.UnderNet.org"; host = "1.2.3.4"; password = "passwd"; port = 4400; class = "Server"; hub; }; # [crule] # # For an advanced, real-time rule-based routing decision making system # you can use crule blocks. For more information, see doc/readme.crules. # CRULE # { # server = "servermask"; # rule = "connectrule"; # # Setting all to yes makes the rule always apply. Otherwise it only # # applies to autoconnects. # all = yes; # }; CRULE { server = "*.US.UnderNet.org"; rule = "connected(*.US.UnderNet.org)"; }; CRULE { server = "*.EU.UnderNet.org"; rule = "connected(Amsterdam.NL.EU.*)"; }; # The following block is recommended for leaf servers: CRULE { server = "*"; rule = "directcon(*)"; }; # [Operator] # # Inevitably, you have reached the part about "IRC Operators". Oper status # grants some special privileges to a user, like the power to make the # server break or (try to) establish a connection with another server, # and to "kill" users off IRC. # I can write many pages about this; I will restrict myself to saying that # if you want to appoint somebody as IRC Operator on your server, that # person should be aware of his/her responsibilities, and that you, being # the admin, will be held accountable for their actions. # # There are two sorts of IRC Operators: "local" and "global". Local opers # can squit, connect and kill - but only locally: their +o user mode # is not not passed along to other servers. On Undernet, this prevents # them from using Uworld as well. # # Operator { # host = "host/IP mask"; # name = "opername"; # password = "encryptedpass"; # class = "classname"; # # You can also set any operator privilege; see the Class block # # documentation for details. A privilege defined for a single # # Operator will override the privilege settings for the Class # # and the default setting. # }; # # By default, the password is hashed using the system's native crypt() # function. Other password mechanisms are available; the umkpasswd # utility from the ircd directory can hash passwords using those # mechanisms. # # All privileges are shown with their default values; if you wish to # override defaults, you should set only those privileges for the # operator. Listing defaulted privileges just makes things harder to # find. Operator { local = no; host = "*@*.cs.vu.nl"; password = "VRKLKuGKn0jLt"; name = "Niels"; class = "Local"; }; Operator { host = "*@*.uu.net"; password = "$PLAIN$notencryptedpass"; name = "Niels"; class = "Opers"; }; # Note that the is optional, but leaving it away # puts the opers in class "default", which usually only accepts one # connection at a time. If you want users to Oper up more then once per # block, then use a connection class that allows more then one connection, # for example (using class Local as in the example above): # # Once you OPER your connection class changes no matter where you are or # your previous connection classes. If the defined connection class is # Local for the operator block, then your new connection class is Local. # [Port] # When your server gets more full, you will notice delays when trying to # connect to your server's primary listening port. It is possible via the # Port lines to specify additional ports for the ircd to listen to. # De facto ports are: 6667 - standard; 6660-6669 - additional client # ports; # Undernet uses 4400 for server listener ports. # These are just hints, they are in no way official IANA or IETF policies. # IANA says we should use port 194, but that requires us to run as root, # so we don't do that. # # Port { # port = [ipv4] [ipv6] number; # mask = "ipmask"; # # Use this to control the interface you bind to. # vhost = [ipv4] [ipv6] "virtualhostip"; # # Setting to yes makes this server only. # server = yes; # # Setting to yes makes the port "hidden" from stats. # hidden = yes; # }; # # The port and vhost lines allow you to specify one or both of "ipv4" # and "ipv6" as address families to use for the port. The default is # to listen on both IPv4 and IPv6. # # The mask setting allows you to specify a range of IP addresses that # you will allow connections from. This should only contain IP addresses # and '*' if used. This field only uses IP addresses. This does not use # DNS in any way so you can't use it to allow *.nl or *.uk. Attempting # to specify anything other than numbers, dots and stars [0-9.*] will result # in the port allowing connections from anyone. # # The interface setting allows multiply homed hosts to specify which # interface to use on a port by port basis, if an interface is not specified # the default interface will be used. The interface MUST be the complete # IP address for a real hardware interface on the machine running ircd. # If you want to use virtual hosting *YOU* *MUST* *USE* *THIS* otherwise it # WILL bind to all interfaces - not what most people seem to expect. # Port { server = yes; port = 4400; }; # This is an IPv4-only Server port that is Hidden Port { server = yes; hidden = yes; port = ipv4 4401; }; # The following are normal client ports Port { port = 6667; }; Port { port = 6668; }; Port { # This only accepts clients with IPs like 192.168.*. mask = "192.168.*"; port = 6666; }; # This is a hidden client port, listening on 168.8.21.107. Port { vhost = "168.8.21.107"; hidden = yes; port = 7000; }; # Quarantine blocks disallow operators from using OPMODE and CLEARMODE # on certain channels. Opers with the force_opmode (for local # channels, force_local_opmode) privilege may override the quarantine # by prefixing the channel name with an exclamation point ('!'). # Wildcards are NOT supported; the channel name must match exactly. Quarantine { "#shells" = "Thou shalt not support the h4><0rz"; "&kiddies" = "They can take care of themselves"; }; # This is a server-implemented alias to send a message to a service. # The string after Pseudo is the command name; the name entry inside # is the service name, used for error messages. More than one nick # entry can be provided; the last one listed has highest priority. Pseudo "CHANSERV" { name = "X"; nick = "X@channels.undernet.org"; }; # You can also prepend text before the user's message. Pseudo "LOGIN" { name = "X"; prepend = "LOGIN "; nick = "X@channels.undernet.org"; }; # You can ask a separate server whether to allow users to connect. # Uncomment this ONLY if you have an iauth helper program. # IAuth { # program = "../path/to/iauth" "-n" "options go here"; # }; # [features] # IRC servers have a large number of options and features. Most of these # are set at compile time through the use of #define's--see "make config" # for more details--but we are working to move many of these into the # configuration file. Features let you configure these at runtime. # You only need one feature block in which you use # "featurename" = "value1" , "value2", ..., "valuen-1", "valuen"; # # The entire purpose of F:lines are so that you do not have to recompile # the IRCD everytime you want to change a feature. All of the features # are listed below, and at the bottom is how to set logging. # # A Special Thanks to Kev for writing the documentation of F:lines. It can # be found at doc/readme.features and the logging documentation can be # found at doc/readme.log. The defaults used by the Undernet network are # below. # features { # These log features are the only way to get certain error messages # (such as when the server dies from being out of memory). For more # explanation of how they work, see doc/readme.log. "LOG" = "SYSTEM" "FILE" "ircd.log"; "LOG" = "SYSTEM" "LEVEL" "CRIT"; # "DOMAINNAME"=""; # "RELIABLE_CLOCK"="FALSE"; # "BUFFERPOOL"="27000000"; # "HAS_FERGUSON_FLUSHER"="FALSE"; # "CLIENT_FLOOD"="1024"; # "SERVER_PORT"="4400"; # "NODEFAULTMOTD"="TRUE"; # "MOTD_BANNER"="TRUE"; # "KILL_IPMISMATCH"="FALSE"; # "IDLE_FROM_MSG"="TRUE"; # "HUB"="FALSE"; # "WALLOPS_OPER_ONLY"="FALSE"; # "NODNS"="FALSE"; # "RANDOM_SEED"=""; # "DEFAULT_LIST_PARAM"="TRUE"; # "NICKNAMEHISTORYLENGTH"="800"; # "NETWORK"="UnderNet"; # "HOST_HIDING"="FALSE"; # "HIDDEN_HOST"="users.undernet.org"; # "HIDDEN_IP"="127.0.0.1"; # "KILLCHASETIMELIMIT"="30"; # "MAXCHANNELSPERUSER"="10"; # "NICKLEN" = "12"; # "AVBANLEN"="40"; # "MAXBANS"="30"; # "MAXSILES"="15"; # "HANGONGOODLINK"="300"; # "HANGONRETRYDELAY" = "10"; # "CONNECTTIMEOUT" = "90"; # "MAXIMUM_LINKS" = "1"; # "PINGFREQUENCY" = "120"; # "CONNECTFREQUENCY" = "600"; # "DEFAULTMAXSENDQLENGTH" = "40000"; # "GLINEMAXUSERCOUNT" = "20"; # "MPATH" = "ircd.motd"; # "RPATH" = "remote.motd"; # "PPATH" = "ircd.pid"; # "TOS_SERVER" = "0x08"; # "TOS_CLIENT" = "0x08"; # "POLLS_PER_LOOP" = "200"; # "IRCD_RES_TIMEOUT" = "4"; # "IRCD_RES_RETRIES" = "2"; # "AUTH_TIMEOUT" = "9"; # "IPCHECK_CLONE_LIMIT" = "4"; # "IPCHECK_CLONE_PERIOD" = "40"; # "IPCHECK_CLONE_DELAY" = "600"; # "CHANNELLEN" = "200"; # "CONFIG_OPERCMDS" = "FALSE"; # "OPLEVELS" = "TRUE"; # "ZANNELS" = "TRUE"; # "LOCAL_CHANNELS" = "TRUE"; # "ANNOUNCE_INVITES" = "FALSE"; # These were introduced by Undernet CFV-165 to add "Head-In-Sand" (HIS) # behavior to hide most network topology from users. # "HIS_SNOTICES" = "TRUE"; # "HIS_SNOTICES_OPER_ONLY" = "TRUE"; # "HIS_DEBUG_OPER_ONLY" = "TRUE"; # "HIS_WALLOPS" = "TRUE"; # "HIS_MAP" = "TRUE"; # "HIS_LINKS" = "TRUE"; # "HIS_TRACE" = "TRUE"; # "HIS_STATS_a" = "TRUE"; # "HIS_STATS_c" = "TRUE"; # "HIS_STATS_d" = "TRUE"; # "HIS_STATS_e" = "TRUE"; # "HIS_STATS_f" = "TRUE"; # "HIS_STATS_g" = "TRUE"; # "HIS_STATS_i" = "TRUE"; # "HIS_STATS_j" = "TRUE"; # "HIS_STATS_J" = "TRUE"; # "HIS_STATS_k" = "TRUE"; # "HIS_STATS_l" = "TRUE"; # "HIS_STATS_L" = "TRUE"; # "HIS_STATS_m" = "TRUE"; # "HIS_STATS_M" = "TRUE"; # "HIS_STATS_o" = "TRUE"; # "HIS_STATS_p" = "TRUE"; # "HIS_STATS_q" = "TRUE"; # "HIS_STATS_r" = "TRUE"; # "HIS_STATS_R" = "TRUE"; # "HIS_STATS_t" = "TRUE"; # "HIS_STATS_T" = "TRUE"; # "HIS_STATS_u" = "FALSE"; # "HIS_STATS_U" = "TRUE"; # "HIS_STATS_v" = "TRUE"; # "HIS_STATS_w" = "TRUE"; # "HIS_STATS_x" = "TRUE"; # "HIS_STATS_y" = "TRUE"; # "HIS_STATS_z" = "TRUE"; # "HIS_STATS_IAUTH" = "TRUE"; # "HIS_WHOIS_SERVERNAME" = "TRUE"; # "HIS_WHOIS_IDLETIME" = "TRUE"; # "HIS_WHOIS_LOCALCHAN" = "TRUE"; # "HIS_WHO_SERVERNAME" = "TRUE"; # "HIS_WHO_HOPCOUNT" = "TRUE"; # "HIS_MODEWHO" = "TRUE"; # "HIS_BANWHO" = "TRUE"; # "HIS_KILLWHO" = "TRUE"; # "HIS_REWRITE" = "TRUE"; # "HIS_REMOTE" = "TRUE"; # "HIS_NETSPLIT" = "TRUE"; # "HIS_SERVERNAME" = "*.undernet.org"; # "HIS_SERVERINFO" = "The Undernet Underworld"; # "HIS_URLSERVERS" = "http://www.undernet.org/servers.php"; # "URLREG" = "http://cservice.undernet.org/live/"; }; # Well, you have now reached the end of this sample configuration # file. If you have any questions, feel free to mail # . If you are interested in linking your # server to the Undernet IRC network visit # http://www.routing-com.undernet.org/, and if there are any # problems then contact asking for # information. Upgrades of the Undernet ircd can be found on # http://coder-com.undernet.org/. # # For the rest: Good Luck! # # -- Niels. ircd-ircu-2.10.12.10.dfsg1/doc/ircd.80000644000175000017500000001032707133737354016426 0ustar madkissmadkiss.\" @(#)ircd.8 2.0 (beta version) 29 Mar 1989 .TH IRCD 8 "10 July 2000" .SH NAME ircd \- The Undernet Internet Relay Chat Daemon .SH SYNOPSIS .hy 0 .IP \fBircd\fP [-t] [-d directory] [-f configfile] [-x debuglevel] [-h hostname] .SH DESCRIPTION .LP \fIircd\fP is the Undernet Internet Relay Chat daemon. \fIircd\fP is a server in that its function is to "serve" the client program \fIirc(1)\fP with messages and commands. All commands and user messages are passed directly to \fIircd\fP for processing and relaying to other servers. \fIirc(1)\fP depends upon there being an \fIircd\fP server running somewhere for it to connect to and thus allow the user to begin talking to other users. .LP There are many common clients including ircII, EPIC, and BitchX for UNIX, mIRC and pIRCh for Windows, and IRCle and Homer for the Macintosh. .SH OPTIONS .TP .B \-d directory This option tells the server to change to that directory and use that as a reference point when opening \fIircd.conf\fP and other startup files. .TP .B \-t Instructs the server run in the foreground and to direct debugging output to standard output. .TP .B \-x# Defines the debug level for \fIircd\fP. The higher the debug level, the more messages get directed to debugging file (or standard output if the -t option is used). .TP .B \-w interface This option is deprecated. Outgoing connections are bound to the interface specified in the M: line, and incoming connections are accepted only on interfaces specified in the P: lines. .TP .B \-f filename Specifies the \fIircd.conf\fP file to be used for this server. The option is used to override the default \fIircd.conf\fP given at compile time. .TP .B \-c This flag must be given if you are running \fIircd\fP from \fI/dev/console\fP or any other situation where fd 0 isn't a TTY and you want the server to fork off and run in the background. This needs to be given if you are starting \fIircd\fP from an \fIrc\fP (such as \fI/etc/rc.local\fP) file. .TP .B \-h hostname Allows the user to manually set the server name at startup. The default name is hostname.domainname. .TP .B \-p portname This is deprecated in favor of specifying server ports in P: lines. .SH CONFIGURATION If you plan to connect your \fIircd\fP server to an existing IRC network, you will need to alter your local \fIircd\fP configuration file (typically named \fIircd.conf\fP) so that it will accept and make connections to other IRC servers. This file contains the hostnames, network addresses, and passwords for connections to other IRC servers around the world. Because the description of the \fIircd.conf\fP file is beyond the scope of this document, please refer to the INSTALL file in the \fIircd\fP documentation directory. .LP BOOTING THE SERVER: The \fIircd\fP server can be started as part of the UNIX boot procedure or just by placing the server into Unix Background. Keep in mind that if it is *not* part of your UNIXES Boot-up procedure then you will have to manually start the \fIircd\fP server each time your UNIX is rebooted. This means if your UNIX is prone to crashing or going for for repairs a lot it would make sense to start the \fIircd\fP server as part of your UNIX bootup procedure. In some cases the \fIirc(1)\fP will automatically attempt to boot the \fIircd\fP server if the user is on the SAME UNIX that the \fIircd\fP is supposed to be running on. If the \fIirc(1)\fP cannot connect to the \fIircd\fP server it will try to start the server on it's own and will then try to reconnect to the newly booted \fIircd\fP server. .SH EXAMPLE .RS .nf tolsun% \fBircd\fP .fi .RE .LP Places \fIircd\fP into UNIX Background and starts up the server for use. Note: You do not have to add the "&" to this command, the program will automatically detach itself from tty. .SH COPYRIGHT (c) 1988,1989 University of Oulu, Computing Center, Finland, .LP (c) 1988,1989 Department of Information Processing Science, University of Oulu, Finland .LP (c) 1988,1989,1990,1991 Jarkko Oikarinen .LP For full COPYRIGHT see LICENSE file with IRC package. .LP .RE .SH FILES /etc/utmp "ircd.conf" .SH "SEE ALSO" irc(1) .SH BUGS See the file 'BUGS' included in the distribution. .SH AUTHOR The current authors of the undernet IRC daemon are coder-com@undernet.org, the original author was Jarkko Oikarinen.ircd-ircu-2.10.12.10.dfsg1/doc/readme.cvs0000644000175000017500000000430210324030123017332 0ustar madkissmadkissNotes on checking out from the Undernet CVS archive. The main trunk of the tree (HEAD) will be used for development only. When the maintainers believe the code is stable enough to prepare for a release, they will make a branch for that release series. Each branch will have a base name, which is the name of the release series where dots are replaced with underscores. The branch name will be the base name with the suffix "_branch". Once an official release is made, each release branch will have one or more fixed tags and one moving tag. The fixed tags will indicate specific patchlevels, and have the base name with a suffix giving the zero-based patchlevel. The moving tag's name will be the base name, and will always point to the same state as some fixed tag on the branch. This allows developers to easily track the most recent version of any branch (by checking out using the branch's name), and allows server admins to easily track the most recent release on the branch (by checking out using the branch's base name). For example, for the ircu2.10.12 release series, the branch's base name is u2_10_12. The branch's name is u2_10_12_branch. The first release (ircu2.10.12) would be permanently tagged as u2_10_12_0, and until an update is released, it would also have the tag u2_10_12. When the first update is released, it would be permanently tagged as u2_10_12_01, and the tag u2_10_12 would be changed to point to it. If the current stable series is 2.10.12, server admins should check out the code using the command: cvs -d :pserver:anonymous@cvs.undernet.org:/cvsroot/undernet-ircu co -r u2_10_12 -P ircu2.10 Admins may only run unreleased code on Undernet with coder-com approval. The command above will retrieve the most recent release. Developers should check out the release branch using the command: cvs -d :pserver:anonymous@cvs.undernet.org:/cvsroot/undernet-ircu co -r u2_10_12_branch -P ircu2.10 http://sourceforge.net/cvs/?group_id=63470 gives more information on using CVS to access the ircu code; http://www.nongnu.org/cvs/ gives more information on using CVS in general. NOTE: Release before ircu2.10.12 used a different branching scheme. Older revisions of this readme.cvs explain that system. ircd-ircu-2.10.12.10.dfsg1/doc/freebsd.txt0000644000175000017500000000175607076757155017604 0ustar madkissmadkissThis document pertains to kernel panics with FreeBSD involving mbufs. This is a well documented problem with programs such as ircu, and inn that involve a lot of clients, the solution is generally to set the option 'NMBCLUSTERS' to a reasonably higher number the default is 1024, you should first try increasing this *10 (10240) and continue checking mbuf usage with netstat -m. It has been recommended that this be increased as far as *50 (51200) (although more won't hurt, it uses more memory, so don't go too far overboard) it's been stated over and over that the default is very low, but then, you're supposed to know how to configure your OS for what you're doing right? =) There is a note in the configuration for this: # Note that you will probably want to bump up NMBCLUSTERS a lot to use options NMBCLUSTERS=1024 Merely change the 1024 to the number that best suites your system. -poptix poptix@poptix.net April 17, 2000 Matthew S. Hallacy ircd-ircu-2.10.12.10.dfsg1/doc/linux-poll.patch0000644000175000017500000000172107273520072020526 0ustar madkissmadkiss*** ./select.c.bak Sun Apr 30 13:00:38 2000 --- /usr/src/linux/fs/select.c Mon May 1 18:00:15 2000 *************** *** 11,16 **** --- 11,17 ---- */ #include + #include #include #include #include *************** *** 416,422 **** } size = nfds * sizeof(struct pollfd); ! fds = (struct pollfd *) kmalloc(size, GFP_KERNEL); if (!fds) goto out; --- 417,426 ---- } size = nfds * sizeof(struct pollfd); ! if (size > PAGE_SIZE) ! fds = (struct pollfd *) vmalloc(size); ! else ! fds = (struct pollfd *) kmalloc(size, GFP_KERNEL); if (!fds) goto out; *************** *** 437,443 **** err = -EINTR; out_fds: ! kfree(fds); out: if (wait) free_wait(wait_table); --- 441,450 ---- err = -EINTR; out_fds: ! if (size > PAGE_SIZE) ! vfree(fds); ! else ! kfree(fds); out: if (wait) free_wait(wait_table); ircd-ircu-2.10.12.10.dfsg1/config.h.in0000644000175000017500000001333710347705555016675 0ustar madkissmadkiss/* config.h.in. Generated from configure.in by autoheader. */ /* Define if you have (reliable) BSD signals. */ #undef BSD_RELIABLE_SIGNALS /* Configuration file name */ #undef CPATH /* Enable debugging code */ #undef DEBUGMODE /* Domain name to be used for some statistics gathering */ #undef DOMAINNAME /* Path to data directory */ #undef DPATH /* Define to implement epoll system calls */ #undef EPOLL_NEED_BODY /* Force inlining for a few critical functions */ #undef FORCEINLINE /* Define to 1 if you have the header file. */ #undef HAVE_CRYPT_H /* Define to 1 if you have the `getrusage' function. */ #undef HAVE_GETRUSAGE /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `kqueue' function. */ #undef HAVE_KQUEUE /* Define to 1 if you have the `nsl' library (-lnsl). */ #undef HAVE_LIBNSL /* Define to 1 if you have the `resolv' library (-lresolv). */ #undef HAVE_LIBRESOLV /* Define to 1 if you have the `socket' library (-lsocket). */ #undef HAVE_LIBSOCKET /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file. */ #undef HAVE_POLL_H /* Define to 1 if system calls automatically restart after interruption by a signal. */ #undef HAVE_RESTARTABLE_SYSCALLS /* Define to 1 if you have the `setrlimit' function. */ #undef HAVE_SETRLIMIT /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_DEVPOLL_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_EPOLL_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_EVENT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_RESOURCE_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKET_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H /* Define to 1 if you have the `times' function. */ #undef HAVE_TIMES /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define if we have va_copy */ #undef HAVE_VA_COPY /* Define if we have __va_copy */ #undef HAVE___VA_COPY /* Enable IPv6 support */ #undef IPV6 /* Define if building on Solaris */ #undef IRCU_SOLARIS /* Path to debugging log file */ #undef LPATH /* Maximum number of network connections */ #undef MAXCONNECTIONS /* Define if you have BSD non-blocking sockets. */ #undef NBLOCK_BSD /* Define if you have POSIX non-blocking sockets. */ #undef NBLOCK_POSIX /* Define if you have SysV non-blocking sockets. */ #undef NBLOCK_SYSV /* Disable assertions */ #undef NDEBUG /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define if you have POSIX signals. */ #undef POSIX_SIGNALS /* The size of a `int', as computed by sizeof. */ #undef SIZEOF_INT /* The size of a `int64_t', as computed by sizeof. */ #undef SIZEOF_INT64_T /* The size of a `long', as computed by sizeof. */ #undef SIZEOF_LONG /* The size of a `long long', as computed by sizeof. */ #undef SIZEOF_LONG_LONG /* The size of a `short', as computed by sizeof. */ #undef SIZEOF_SHORT /* The size of a `void *', as computed by sizeof. */ #undef SIZEOF_VOID_P /* Path to executable for restarts */ #undef SPATH /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define if you have (unreliable) SysV signals. */ #undef SYSV_UNRELIABLE_SIGNALS /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Define to 1 if your declares `struct tm'. */ #undef TM_IN_SYS_TIME /* Define to enable the /dev/poll engine */ #undef USE_DEVPOLL /* Define to enable the epoll engine */ #undef USE_EPOLL /* Define to enable the kqueue engine */ #undef USE_KQUEUE /* Specify whether or not to use poll() */ #undef USE_POLL /* Define to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel and VAX). */ #undef WORDS_BIGENDIAN /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #undef YYTEXT_POINTER /* Define to `int' if doesn't define. */ #undef gid_t /* Define to `short' if does not define. */ #undef int16_t /* Define to `long' if does not define. */ #undef int32_t /* Define to `long long' if does not define. */ #undef int64_t /* Define to `unsigned' if does not define. */ #undef size_t /* type to use in place of socklen_t if not defined */ #undef socklen_t /* Define to `int' if doesn't define. */ #undef uid_t /* Define to `unsigned short' if does not define. */ #undef uint16_t /* Define to `unsigned long' if does not define. */ #undef uint32_t /* Define to `unsigned long long' if does not define. */ #undef uint64_t ircd-ircu-2.10.12.10.dfsg1/configure0000755000175000017500000123074210347705555016563 0ustar madkissmadkiss#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59. # # Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` exec 6>&1 # # Initializations. # ac_default_prefix=/usr/local ac_config_libobj_dir=. cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. # This variable seems obsolete. It should probably be removed, and # only ac_max_sed_lines should be used. : ${ac_max_here_lines=38} # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= ac_unique_file="ircd/ircd.c" ac_default_prefix=$HOME # Factoring default headers for most tests. ac_includes_default="\ #include #if HAVE_SYS_TYPES_H # include #endif #if HAVE_SYS_STAT_H # include #endif #if STDC_HEADERS # include # include #else # if HAVE_STDLIB_H # include # endif #endif #if HAVE_STRING_H # if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif #if HAVE_STRINGS_H # include #endif #if HAVE_INTTYPES_H # include #else # if HAVE_STDINT_H # include # endif #endif #if HAVE_UNISTD_H # include #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP AWK SET_MAKE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S RMPROG SHPROG LEX LEXLIB LEX_OUTPUT_ROOT YACC ENGINE_C INSTALL_RULE SYMLINK IRCDMODE IRCDOWN IRCDGRP DPATH LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" ac_prev= continue fi ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/-/_/g'` eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute paths. for ac_var in exec_prefix prefix do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* | NONE | '' ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } else { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi fi (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ac_env_build_alias_set=${build_alias+set} ac_env_build_alias_value=$build_alias ac_cv_env_build_alias_set=${build_alias+set} ac_cv_env_build_alias_value=$build_alias ac_env_host_alias_set=${host_alias+set} ac_env_host_alias_value=$host_alias ac_cv_env_host_alias_set=${host_alias+set} ac_cv_env_host_alias_value=$host_alias ac_env_target_alias_set=${target_alias+set} ac_env_target_alias_value=$target_alias ac_cv_env_target_alias_set=${target_alias+set} ac_cv_env_target_alias_value=$target_alias ac_env_CC_set=${CC+set} ac_env_CC_value=$CC ac_cv_env_CC_set=${CC+set} ac_cv_env_CC_value=$CC ac_env_CFLAGS_set=${CFLAGS+set} ac_env_CFLAGS_value=$CFLAGS ac_cv_env_CFLAGS_set=${CFLAGS+set} ac_cv_env_CFLAGS_value=$CFLAGS ac_env_LDFLAGS_set=${LDFLAGS+set} ac_env_LDFLAGS_value=$LDFLAGS ac_cv_env_LDFLAGS_set=${LDFLAGS+set} ac_cv_env_LDFLAGS_value=$LDFLAGS ac_env_CPPFLAGS_set=${CPPFLAGS+set} ac_env_CPPFLAGS_value=$CPPFLAGS ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} ac_cv_env_CPPFLAGS_value=$CPPFLAGS ac_env_CPP_set=${CPP+set} ac_env_CPP_value=$CPP ac_cv_env_CPP_set=${CPP+set} ac_cv_env_CPP_value=$CPP # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] _ACEOF cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --infodir=DIR info documentation [PREFIX/info] --mandir=DIR man documentation [PREFIX/man] _ACEOF cat <<\_ACEOF System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-poll Force poll to be used regardless of whether or not it is a system call --enable-debug Turn on debugging mode --disable-asserts Disable assertion checking --enable-profile Enable profiling support (add -pg to CFLAGS and LDFLAGS) --enable-pedantic Enable pedantic warnings (add -pedantic to CFLAGS) --enable-warnings Enable warnings (add -Wall to CFLAGS) --disable-inlines Disable inlining for a few critical functions --disable-devpoll Disable the /dev/poll-based engine --disable-kqueue Disable the kqueue-based engine --disable-epoll Disable the epoll-based engine Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-leak-detect Turn on the leak detector(requires patched boehm) --without-ipv6 disable IPv6 support (default is autodetect) --with-symlink=name Name to give the symlink; if name is "no," no symlink will be created. --with-mode=mode Permissions (in octal) to give the binary --with-owner=owner Specify owner of the installed binary --with-group=group Specify group owner of the installed binary --with-domain=domain Domain name to use in local statistics gathering --with-chroot=dir Specify that the server will be operated under a different root directory given by dir. See doc/readme.chroot for more information. --with-dpath=dir Directory for all server data files --with-cpath=file Set server configuration file --with-lpath=file Set the debugging log file --with-maxcon=maxcon Maximum number of connections server will accept Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d $ac_dir || continue ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac cd $ac_dir # Check for guested configure; otherwise get Cygnus style configure. if test -f $ac_srcdir/configure.gnu; then echo $SHELL $ac_srcdir/configure.gnu --help=recursive elif test -f $ac_srcdir/configure; then echo $SHELL $ac_srcdir/configure --help=recursive elif test -f $ac_srcdir/configure.ac || test -f $ac_srcdir/configure.in; then echo $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi cd "$ac_popdir" done fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit 0 fi exec 5>config.log cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ _ACEOF { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" # Get rid of the leading space. ac_sep=" " ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Be sure not to use single quotes in there, as some shells, # such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, { (set) 2>&1 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in *ac_space=\ *) sed -n \ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ;; *) sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------- ## ## Output files. ## ## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core && rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo >confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; *) . ./$cache_file;; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in `(set) 2>&1 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val="\$ac_cv_env_${ac_var}_value" eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking for installation prefix" >&5 echo $ECHO_N "checking for installation prefix... $ECHO_C" >&6 if test "${unet_cv_prefix+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else unet_cv_prefix=$HOME fi if test x"$prefix" != xNONE; then unet_cv_prefix=$prefix fi echo "$as_me:$LINENO: result: $unet_cv_prefix" >&5 echo "${ECHO_T}$unet_cv_prefix" >&6 ac_default_prefix=$unet_cv_prefix ac_config_headers="$ac_config_headers config.h" ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f $ac_dir/shtool; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} { (exit 1); exit 1; }; } fi ac_config_guess="$SHELL $ac_aux_dir/config.guess" ac_config_sub="$SHELL $ac_aux_dir/config.sub" ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 echo "$as_me: error: cannot run $ac_config_sub" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6 if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_build_alias=$build_alias test -z "$ac_cv_build_alias" && ac_cv_build_alias=`$ac_config_guess` test -z "$ac_cv_build_alias" && { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6 build=$ac_cv_build build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$as_me:$LINENO: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6 if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_host_alias=$host_alias test -z "$ac_cv_host_alias" && ac_cv_host_alias=$ac_cv_build_alias ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6 host=$ac_cv_host host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CC" && break done CC=$ac_ct_CC fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last # resort. # Be careful to initialize this variable, since it used to be cached. # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. ac_cv_exeext= # b.out is created by i960 compilers. for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; conftest.$ac_ext ) # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` # FIXME: I believe we export ac_cv_exeext for Libtool, # but it would be cool to find out if it's true. Does anybody # maintain Libtool? --akim. export ac_cv_exeext break;; * ) break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` export ac_cv_exeext break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cc_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std1 is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std1. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 # HP-UX 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_stdc=$ac_arg break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext done rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi case "x$ac_cv_prog_cc_stdc" in x|xno) echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler # for both compiling C and C++ we need to have the C++ compiler decide # the declaration of exit, since it's the most demanding environment. cat >conftest.$ac_ext <<_ACEOF #ifndef __cplusplus choke me #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration #include int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CC" && break done CC=$ac_ct_CC fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cc_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std1 is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std1. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 # HP-UX 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_stdc=$ac_arg break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext done rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi case "x$ac_cv_prog_cc_stdc" in x|xno) echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler # for both compiling C and C++ we need to have the C++ compiler decide # the declaration of exit, since it's the most demanding environment. cat >conftest.$ac_ext <<_ACEOF #ifndef __cplusplus choke me #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration #include int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc echo "$as_me:$LINENO: checking for library containing crypt" >&5 echo $ECHO_N "checking for library containing crypt... $ECHO_C" >&6 if test "${ac_cv_search_crypt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS ac_cv_search_crypt=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char crypt (); int main () { crypt (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_crypt="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_crypt" = no; then for ac_lib in descrypt crypt; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char crypt (); int main () { crypt (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_crypt="-l$ac_lib" break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_search_crypt" >&5 echo "${ECHO_T}$ac_cv_search_crypt" >&6 if test "$ac_cv_search_crypt" != no; then test "$ac_cv_search_crypt" = "none required" || LIBS="$ac_cv_search_crypt $LIBS" else { { echo "$as_me:$LINENO: error: Unable to find library containing crypt()" >&5 echo "$as_me: error: Unable to find library containing crypt()" >&2;} { (exit 1); exit 1; }; } fi # Most operating systems have gethostbyname() in the default searched # libraries (i.e. libc): echo "$as_me:$LINENO: checking for gethostbyname" >&5 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6 if test "${ac_cv_func_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define gethostbyname to an innocuous variant, in case declares gethostbyname. For example, HP-UX 11i declares gettimeofday. */ #define gethostbyname innocuous_gethostbyname /* System header to define __stub macros and hopefully few prototypes, which can conflict with char gethostbyname (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef gethostbyname /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gethostbyname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) choke me #else char (*f) () = gethostbyname; #endif #ifdef __cplusplus } #endif int main () { return f != gethostbyname; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_gethostbyname=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6 if test $ac_cv_func_gethostbyname = yes; then : else # Some OSes (eg. Solaris) place it in libnsl: echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gethostbyname (); int main () { gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_nsl_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_nsl_gethostbyname=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 if test $ac_cv_lib_nsl_gethostbyname = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBNSL 1 _ACEOF LIBS="-lnsl $LIBS" else # Some strange OSes (SINIX) have it in libsocket: echo "$as_me:$LINENO: checking for gethostbyname in -lsocket" >&5 echo $ECHO_N "checking for gethostbyname in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gethostbyname (); int main () { gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_socket_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_socket_gethostbyname=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_socket_gethostbyname" >&5 echo "${ECHO_T}$ac_cv_lib_socket_gethostbyname" >&6 if test $ac_cv_lib_socket_gethostbyname = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBSOCKET 1 _ACEOF LIBS="-lsocket $LIBS" else # Unfortunately libsocket sometimes depends on libnsl. # AC_CHECK_LIB's API is essentially broken so the following # ugliness is necessary: echo "$as_me:$LINENO: checking for gethostbyname in -lsocket" >&5 echo $ECHO_N "checking for gethostbyname in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket -lnsl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gethostbyname (); int main () { gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_socket_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_socket_gethostbyname=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_socket_gethostbyname" >&5 echo "${ECHO_T}$ac_cv_lib_socket_gethostbyname" >&6 if test $ac_cv_lib_socket_gethostbyname = yes; then LIBS="-lsocket -lnsl $LIBS" else echo "$as_me:$LINENO: checking for gethostbyname in -lresolv" >&5 echo $ECHO_N "checking for gethostbyname in -lresolv... $ECHO_C" >&6 if test "${ac_cv_lib_resolv_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lresolv $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gethostbyname (); int main () { gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_resolv_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_resolv_gethostbyname=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_gethostbyname" >&5 echo "${ECHO_T}$ac_cv_lib_resolv_gethostbyname" >&6 if test $ac_cv_lib_resolv_gethostbyname = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBRESOLV 1 _ACEOF LIBS="-lresolv $LIBS" fi fi fi fi fi echo "$as_me:$LINENO: checking for socket" >&5 echo $ECHO_N "checking for socket... $ECHO_C" >&6 if test "${ac_cv_func_socket+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define socket to an innocuous variant, in case declares socket. For example, HP-UX 11i declares gettimeofday. */ #define socket innocuous_socket /* System header to define __stub macros and hopefully few prototypes, which can conflict with char socket (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef socket /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char socket (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_socket) || defined (__stub___socket) choke me #else char (*f) () = socket; #endif #ifdef __cplusplus } #endif int main () { return f != socket; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_socket=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_socket=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5 echo "${ECHO_T}$ac_cv_func_socket" >&6 if test $ac_cv_func_socket = yes; then : else echo "$as_me:$LINENO: checking for socket in -lsocket" >&5 echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_socket+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char socket (); int main () { socket (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_socket_socket=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_socket_socket=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5 echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6 if test $ac_cv_lib_socket_socket = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBSOCKET 1 _ACEOF LIBS="-lsocket $LIBS" else echo "$as_me:$LINENO: checking for socket in -lsocket" >&5 echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_socket+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket -lnsl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char socket (); int main () { socket (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_socket_socket=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_socket_socket=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5 echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6 if test $ac_cv_lib_socket_socket = yes; then LIBS="-lsocket -lnsl $LIBS" fi fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6 if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi fi echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 echo "${ECHO_T}$ac_cv_prog_egrep" >&6 EGREP=$ac_cv_prog_egrep echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in crypt.h poll.h inttypes.h stdint.h sys/devpoll.h sys/epoll.h sys/event.h sys/param.h sys/resource.h sys/socket.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------ ## ## Report this to the AC_PACKAGE_NAME lists. ## ## ------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 if test "${ac_cv_c_bigendian+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # See if sys/param.h defines the BYTE_ORDER macro. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN bogus endian macros #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then # It does; now see whether it defined to BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_bigendian=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_bigendian=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # It does not; compile a test program. if test "$cross_compiling" = yes; then # try to guess the endianness by grepping values into an object file ac_cv_c_bigendian=unknown cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } int main () { _ascii (); _ebcdic (); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { /* Are we little or big endian? From Harbison&Steele. */ union { long l; char c[sizeof (long)]; } u; u.l = 1; exit (u.c[sizeof (long) - 1] == 1); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_bigendian=no else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_bigendian=yes fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 echo "${ECHO_T}$ac_cv_c_bigendian" >&6 case $ac_cv_c_bigendian in yes) cat >>confdefs.h <<\_ACEOF #define WORDS_BIGENDIAN 1 _ACEOF ;; no) ;; *) { { echo "$as_me:$LINENO: error: unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" >&5 echo "$as_me: error: unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} { (exit 1); exit 1; }; } ;; esac echo "$as_me:$LINENO: checking for size_t" >&5 echo $ECHO_N "checking for size_t... $ECHO_C" >&6 if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((size_t *) 0) return 0; if (sizeof (size_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_size_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 echo "${ECHO_T}$ac_cv_type_size_t" >&6 if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned _ACEOF fi echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_time=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 echo "${ECHO_T}$ac_cv_header_time" >&6 if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF #define TIME_WITH_SYS_TIME 1 _ACEOF fi echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6 if test "${ac_cv_struct_tm+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { struct tm *tp; tp->tm_sec; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_struct_tm=time.h else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_struct_tm=sys/time.h fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 echo "${ECHO_T}$ac_cv_struct_tm" >&6 if test $ac_cv_struct_tm = sys/time.h; then cat >>confdefs.h <<\_ACEOF #define TM_IN_SYS_TIME 1 _ACEOF fi echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 if test "${ac_cv_type_uid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "uid_t" >/dev/null 2>&1; then ac_cv_type_uid_t=yes else ac_cv_type_uid_t=no fi rm -f conftest* fi echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 echo "${ECHO_T}$ac_cv_type_uid_t" >&6 if test $ac_cv_type_uid_t = no; then cat >>confdefs.h <<\_ACEOF #define uid_t int _ACEOF cat >>confdefs.h <<\_ACEOF #define gid_t int _ACEOF fi echo "$as_me:$LINENO: checking for short" >&5 echo $ECHO_N "checking for short... $ECHO_C" >&6 if test "${ac_cv_type_short+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((short *) 0) return 0; if (sizeof (short)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_short=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_short=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5 echo "${ECHO_T}$ac_cv_type_short" >&6 echo "$as_me:$LINENO: checking size of short" >&5 echo $ECHO_N "checking size of short... $ECHO_C" >&6 if test "${ac_cv_sizeof_short+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$ac_cv_type_short" = yes; then # The cast to unsigned long works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_short=$ac_lo;; '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (short), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } ;; esac else if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 echo "$as_me: error: internal error: not reached in cross-compile" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default long longval () { return (long) (sizeof (short)); } unsigned long ulongval () { return (long) (sizeof (short)); } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) exit (1); if (((long) (sizeof (short))) < 0) { long i = longval (); if (i != ((long) (sizeof (short)))) exit (1); fprintf (f, "%ld\n", i); } else { unsigned long i = ulongval (); if (i != ((long) (sizeof (short)))) exit (1); fprintf (f, "%lu\n", i); } exit (ferror (f) || fclose (f) != 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_short=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (short), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f conftest.val else ac_cv_sizeof_short=0 fi fi echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 echo "${ECHO_T}$ac_cv_sizeof_short" >&6 cat >>confdefs.h <<_ACEOF #define SIZEOF_SHORT $ac_cv_sizeof_short _ACEOF echo "$as_me:$LINENO: checking for int" >&5 echo $ECHO_N "checking for int... $ECHO_C" >&6 if test "${ac_cv_type_int+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((int *) 0) return 0; if (sizeof (int)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_int=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_int=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 echo "${ECHO_T}$ac_cv_type_int" >&6 echo "$as_me:$LINENO: checking size of int" >&5 echo $ECHO_N "checking size of int... $ECHO_C" >&6 if test "${ac_cv_sizeof_int+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$ac_cv_type_int" = yes; then # The cast to unsigned long works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_int=$ac_lo;; '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (int), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } ;; esac else if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 echo "$as_me: error: internal error: not reached in cross-compile" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default long longval () { return (long) (sizeof (int)); } unsigned long ulongval () { return (long) (sizeof (int)); } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) exit (1); if (((long) (sizeof (int))) < 0) { long i = longval (); if (i != ((long) (sizeof (int)))) exit (1); fprintf (f, "%ld\n", i); } else { unsigned long i = ulongval (); if (i != ((long) (sizeof (int)))) exit (1); fprintf (f, "%lu\n", i); } exit (ferror (f) || fclose (f) != 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_int=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (int), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f conftest.val else ac_cv_sizeof_int=0 fi fi echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 echo "${ECHO_T}$ac_cv_sizeof_int" >&6 cat >>confdefs.h <<_ACEOF #define SIZEOF_INT $ac_cv_sizeof_int _ACEOF echo "$as_me:$LINENO: checking for long" >&5 echo $ECHO_N "checking for long... $ECHO_C" >&6 if test "${ac_cv_type_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((long *) 0) return 0; if (sizeof (long)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_long=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 echo "${ECHO_T}$ac_cv_type_long" >&6 echo "$as_me:$LINENO: checking size of long" >&5 echo $ECHO_N "checking size of long... $ECHO_C" >&6 if test "${ac_cv_sizeof_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$ac_cv_type_long" = yes; then # The cast to unsigned long works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_long=$ac_lo;; '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (long), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } ;; esac else if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 echo "$as_me: error: internal error: not reached in cross-compile" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default long longval () { return (long) (sizeof (long)); } unsigned long ulongval () { return (long) (sizeof (long)); } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) exit (1); if (((long) (sizeof (long))) < 0) { long i = longval (); if (i != ((long) (sizeof (long)))) exit (1); fprintf (f, "%ld\n", i); } else { unsigned long i = ulongval (); if (i != ((long) (sizeof (long)))) exit (1); fprintf (f, "%lu\n", i); } exit (ferror (f) || fclose (f) != 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_long=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (long), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f conftest.val else ac_cv_sizeof_long=0 fi fi echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 echo "${ECHO_T}$ac_cv_sizeof_long" >&6 cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG $ac_cv_sizeof_long _ACEOF echo "$as_me:$LINENO: checking for void *" >&5 echo $ECHO_N "checking for void *... $ECHO_C" >&6 if test "${ac_cv_type_void_p+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((void * *) 0) return 0; if (sizeof (void *)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_void_p=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_void_p=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5 echo "${ECHO_T}$ac_cv_type_void_p" >&6 echo "$as_me:$LINENO: checking size of void *" >&5 echo $ECHO_N "checking size of void *... $ECHO_C" >&6 if test "${ac_cv_sizeof_void_p+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$ac_cv_type_void_p" = yes; then # The cast to unsigned long works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_void_p=$ac_lo;; '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (void *), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } ;; esac else if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 echo "$as_me: error: internal error: not reached in cross-compile" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default long longval () { return (long) (sizeof (void *)); } unsigned long ulongval () { return (long) (sizeof (void *)); } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) exit (1); if (((long) (sizeof (void *))) < 0) { long i = longval (); if (i != ((long) (sizeof (void *)))) exit (1); fprintf (f, "%ld\n", i); } else { unsigned long i = ulongval (); if (i != ((long) (sizeof (void *)))) exit (1); fprintf (f, "%lu\n", i); } exit (ferror (f) || fclose (f) != 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_void_p=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (void *), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f conftest.val else ac_cv_sizeof_void_p=0 fi fi echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5 echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6 cat >>confdefs.h <<_ACEOF #define SIZEOF_VOID_P $ac_cv_sizeof_void_p _ACEOF echo "$as_me:$LINENO: checking for int64_t" >&5 echo $ECHO_N "checking for int64_t... $ECHO_C" >&6 if test "${ac_cv_type_int64_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((int64_t *) 0) return 0; if (sizeof (int64_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_int64_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_int64_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_int64_t" >&5 echo "${ECHO_T}$ac_cv_type_int64_t" >&6 echo "$as_me:$LINENO: checking size of int64_t" >&5 echo $ECHO_N "checking size of int64_t... $ECHO_C" >&6 if test "${ac_cv_sizeof_int64_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$ac_cv_type_int64_t" = yes; then # The cast to unsigned long works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (int64_t))) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (int64_t))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (int64_t))) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (int64_t))) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (int64_t))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_int64_t=$ac_lo;; '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int64_t), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (int64_t), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } ;; esac else if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 echo "$as_me: error: internal error: not reached in cross-compile" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default long longval () { return (long) (sizeof (int64_t)); } unsigned long ulongval () { return (long) (sizeof (int64_t)); } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) exit (1); if (((long) (sizeof (int64_t))) < 0) { long i = longval (); if (i != ((long) (sizeof (int64_t)))) exit (1); fprintf (f, "%ld\n", i); } else { unsigned long i = ulongval (); if (i != ((long) (sizeof (int64_t)))) exit (1); fprintf (f, "%lu\n", i); } exit (ferror (f) || fclose (f) != 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_int64_t=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) { { echo "$as_me:$LINENO: error: cannot compute sizeof (int64_t), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (int64_t), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f conftest.val else ac_cv_sizeof_int64_t=0 fi fi echo "$as_me:$LINENO: result: $ac_cv_sizeof_int64_t" >&5 echo "${ECHO_T}$ac_cv_sizeof_int64_t" >&6 cat >>confdefs.h <<_ACEOF #define SIZEOF_INT64_T $ac_cv_sizeof_int64_t _ACEOF echo "$as_me:$LINENO: checking for long long" >&5 echo $ECHO_N "checking for long long... $ECHO_C" >&6 if test "${ac_cv_type_long_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((long long *) 0) return 0; if (sizeof (long long)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_long_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_long_long=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 echo "${ECHO_T}$ac_cv_type_long_long" >&6 echo "$as_me:$LINENO: checking size of long long" >&5 echo $ECHO_N "checking size of long long... $ECHO_C" >&6 if test "${ac_cv_sizeof_long_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$ac_cv_type_long_long" = yes; then # The cast to unsigned long works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_long_long=$ac_lo;; '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (long long), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } ;; esac else if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: internal error: not reached in cross-compile" >&5 echo "$as_me: error: internal error: not reached in cross-compile" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default long longval () { return (long) (sizeof (long long)); } unsigned long ulongval () { return (long) (sizeof (long long)); } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) exit (1); if (((long) (sizeof (long long))) < 0) { long i = longval (); if (i != ((long) (sizeof (long long)))) exit (1); fprintf (f, "%ld\n", i); } else { unsigned long i = ulongval (); if (i != ((long) (sizeof (long long)))) exit (1); fprintf (f, "%lu\n", i); } exit (ferror (f) || fclose (f) != 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_long_long=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (long long), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f conftest.val else ac_cv_sizeof_long_long=0 fi fi echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6 cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long _ACEOF if test "$ac_cv_sizeof_int" = 2 ; then echo "$as_me:$LINENO: checking for int16_t" >&5 echo $ECHO_N "checking for int16_t... $ECHO_C" >&6 if test "${ac_cv_type_int16_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((int16_t *) 0) return 0; if (sizeof (int16_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_int16_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_int16_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_int16_t" >&5 echo "${ECHO_T}$ac_cv_type_int16_t" >&6 if test $ac_cv_type_int16_t = yes; then : else cat >>confdefs.h <<_ACEOF #define int16_t int _ACEOF fi echo "$as_me:$LINENO: checking for uint16_t" >&5 echo $ECHO_N "checking for uint16_t... $ECHO_C" >&6 if test "${ac_cv_type_uint16_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((uint16_t *) 0) return 0; if (sizeof (uint16_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_uint16_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_uint16_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_uint16_t" >&5 echo "${ECHO_T}$ac_cv_type_uint16_t" >&6 if test $ac_cv_type_uint16_t = yes; then : else cat >>confdefs.h <<_ACEOF #define uint16_t unsigned int _ACEOF fi elif test "$ac_cv_sizeof_short" = 2 ; then echo "$as_me:$LINENO: checking for int16_t" >&5 echo $ECHO_N "checking for int16_t... $ECHO_C" >&6 if test "${ac_cv_type_int16_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((int16_t *) 0) return 0; if (sizeof (int16_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_int16_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_int16_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_int16_t" >&5 echo "${ECHO_T}$ac_cv_type_int16_t" >&6 if test $ac_cv_type_int16_t = yes; then : else cat >>confdefs.h <<_ACEOF #define int16_t short _ACEOF fi echo "$as_me:$LINENO: checking for uint16_t" >&5 echo $ECHO_N "checking for uint16_t... $ECHO_C" >&6 if test "${ac_cv_type_uint16_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((uint16_t *) 0) return 0; if (sizeof (uint16_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_uint16_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_uint16_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_uint16_t" >&5 echo "${ECHO_T}$ac_cv_type_uint16_t" >&6 if test $ac_cv_type_uint16_t = yes; then : else cat >>confdefs.h <<_ACEOF #define uint16_t unsigned short _ACEOF fi else { { echo "$as_me:$LINENO: error: Cannot find a type with size of 16 bits" >&5 echo "$as_me: error: Cannot find a type with size of 16 bits" >&2;} { (exit 1); exit 1; }; } fi if test "$ac_cv_sizeof_int" = 4 ; then echo "$as_me:$LINENO: checking for int32_t" >&5 echo $ECHO_N "checking for int32_t... $ECHO_C" >&6 if test "${ac_cv_type_int32_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((int32_t *) 0) return 0; if (sizeof (int32_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_int32_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_int32_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_int32_t" >&5 echo "${ECHO_T}$ac_cv_type_int32_t" >&6 if test $ac_cv_type_int32_t = yes; then : else cat >>confdefs.h <<_ACEOF #define int32_t int _ACEOF fi echo "$as_me:$LINENO: checking for uint32_t" >&5 echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6 if test "${ac_cv_type_uint32_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((uint32_t *) 0) return 0; if (sizeof (uint32_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_uint32_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_uint32_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_uint32_t" >&5 echo "${ECHO_T}$ac_cv_type_uint32_t" >&6 if test $ac_cv_type_uint32_t = yes; then : else cat >>confdefs.h <<_ACEOF #define uint32_t unsigned int _ACEOF fi elif test "$ac_cv_sizeof_short" = 4 ; then echo "$as_me:$LINENO: checking for int32_t" >&5 echo $ECHO_N "checking for int32_t... $ECHO_C" >&6 if test "${ac_cv_type_int32_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((int32_t *) 0) return 0; if (sizeof (int32_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_int32_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_int32_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_int32_t" >&5 echo "${ECHO_T}$ac_cv_type_int32_t" >&6 if test $ac_cv_type_int32_t = yes; then : else cat >>confdefs.h <<_ACEOF #define int32_t short _ACEOF fi echo "$as_me:$LINENO: checking for uint32_t" >&5 echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6 if test "${ac_cv_type_uint32_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((uint32_t *) 0) return 0; if (sizeof (uint32_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_uint32_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_uint32_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_uint32_t" >&5 echo "${ECHO_T}$ac_cv_type_uint32_t" >&6 if test $ac_cv_type_uint32_t = yes; then : else cat >>confdefs.h <<_ACEOF #define uint32_t unsigned short _ACEOF fi elif test "$ac_cv_sizeof_long" = 4 ; then echo "$as_me:$LINENO: checking for int32_t" >&5 echo $ECHO_N "checking for int32_t... $ECHO_C" >&6 if test "${ac_cv_type_int32_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((int32_t *) 0) return 0; if (sizeof (int32_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_int32_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_int32_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_int32_t" >&5 echo "${ECHO_T}$ac_cv_type_int32_t" >&6 if test $ac_cv_type_int32_t = yes; then : else cat >>confdefs.h <<_ACEOF #define int32_t long _ACEOF fi echo "$as_me:$LINENO: checking for uint32_t" >&5 echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6 if test "${ac_cv_type_uint32_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((uint32_t *) 0) return 0; if (sizeof (uint32_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_uint32_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_uint32_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_uint32_t" >&5 echo "${ECHO_T}$ac_cv_type_uint32_t" >&6 if test $ac_cv_type_uint32_t = yes; then : else cat >>confdefs.h <<_ACEOF #define uint32_t unsigned long _ACEOF fi else { { echo "$as_me:$LINENO: error: Cannot find a type with size of 32 bits" >&5 echo "$as_me: error: Cannot find a type with size of 32 bits" >&2;} { (exit 1); exit 1; }; } fi if test "$ac_cv_sizeof_int64_t" = 8 ; then echo "$as_me:$LINENO: checking for int64_t" >&5 echo $ECHO_N "checking for int64_t... $ECHO_C" >&6 if test "${ac_cv_type_int64_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((int64_t *) 0) return 0; if (sizeof (int64_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_int64_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_int64_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_int64_t" >&5 echo "${ECHO_T}$ac_cv_type_int64_t" >&6 echo "$as_me:$LINENO: checking for uint64_t" >&5 echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6 if test "${ac_cv_type_uint64_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((uint64_t *) 0) return 0; if (sizeof (uint64_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_uint64_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_uint64_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_uint64_t" >&5 echo "${ECHO_T}$ac_cv_type_uint64_t" >&6 elif test "$ac_cv_sizeof_long_long" = 8 ; then echo "$as_me:$LINENO: checking for int64_t" >&5 echo $ECHO_N "checking for int64_t... $ECHO_C" >&6 if test "${ac_cv_type_int64_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((int64_t *) 0) return 0; if (sizeof (int64_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_int64_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_int64_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_int64_t" >&5 echo "${ECHO_T}$ac_cv_type_int64_t" >&6 if test $ac_cv_type_int64_t = yes; then : else cat >>confdefs.h <<_ACEOF #define int64_t long long _ACEOF fi echo "$as_me:$LINENO: checking for uint64_t" >&5 echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6 if test "${ac_cv_type_uint64_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((uint64_t *) 0) return 0; if (sizeof (uint64_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_uint64_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_uint64_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_uint64_t" >&5 echo "${ECHO_T}$ac_cv_type_uint64_t" >&6 if test $ac_cv_type_uint64_t = yes; then : else cat >>confdefs.h <<_ACEOF #define uint64_t unsigned long long _ACEOF fi else { { echo "$as_me:$LINENO: error: Cannot find a type with size of 64 bits" >&5 echo "$as_me: error: Cannot find a type with size of 64 bits" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5 echo $ECHO_N "checking for struct sockaddr_in6... $ECHO_C" >&6 if test "${ac_cv_type_struct_sockaddr_in6+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { if ((struct sockaddr_in6 *) 0) return 0; if (sizeof (struct sockaddr_in6)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_struct_sockaddr_in6=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_struct_sockaddr_in6=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_in6" >&5 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_in6" >&6 if test $ac_cv_type_struct_sockaddr_in6 = yes; then unet_have_sockaddr_in6="yes" else unet_have_sockaddr_in6="no" fi echo "$as_me:$LINENO: checking for socklen_t" >&5 echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6 if test "${ac_cv_type_socklen_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { if ((socklen_t *) 0) return 0; if (sizeof (socklen_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_socklen_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_socklen_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5 echo "${ECHO_T}$ac_cv_type_socklen_t" >&6 if test $ac_cv_type_socklen_t = yes; then : else echo "$as_me:$LINENO: checking for socklen_t equivalent" >&5 echo $ECHO_N "checking for socklen_t equivalent... $ECHO_C" >&6 if test "${curl_cv_socklen_t_equiv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else curl_cv_socklen_t_equiv= for arg2 in "struct sockaddr" void ; do for t in int size_t unsigned long "unsigned long" ; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int getpeername (int $arg2 *, $t *); int main () { $t len; getpeername(0, 0, &len); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then curl_cv_socklen_t_equiv="$t" break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done done fi echo "$as_me:$LINENO: result: $curl_cv_socklen_t_equiv" >&5 echo "${ECHO_T}$curl_cv_socklen_t_equiv" >&6 cat >>confdefs.h <<_ACEOF #define socklen_t $curl_cv_socklen_t_equiv _ACEOF fi for ac_func in kqueue setrlimit getrusage times do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6 if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) #endif #ifndef WIFEXITED # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif int main () { int s; wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_sys_wait_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_sys_wait_h=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 if test $ac_cv_header_sys_wait_h = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_SYS_WAIT_H 1 _ACEOF fi for ac_header in unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------ ## ## Report this to the AC_PACKAGE_NAME lists. ## ## ------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking for restartable system calls" >&5 echo $ECHO_N "checking for restartable system calls... $ECHO_C" >&6 if test "${ac_cv_sys_restartable_syscalls+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Exit 0 (true) if wait returns something other than -1, i.e. the pid of the child, which means that wait was restarted after getting the signal. */ #include #include #if HAVE_UNISTD_H # include #endif #if HAVE_SYS_WAIT_H # include #endif /* Some platforms explicitly require an extern "C" signal handler when using C++. */ #ifdef __cplusplus extern "C" void ucatch (int dummy) { } #else void ucatch (dummy) int dummy; { } #endif int main () { int i = fork (), status; if (i == 0) { sleep (3); kill (getppid (), SIGINT); sleep (3); exit (0); } signal (SIGINT, ucatch); status = wait (&i); if (status == -1) wait (&i); exit (status == -1); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sys_restartable_syscalls=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_sys_restartable_syscalls=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_sys_restartable_syscalls" >&5 echo "${ECHO_T}$ac_cv_sys_restartable_syscalls" >&6 if test $ac_cv_sys_restartable_syscalls = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_RESTARTABLE_SYSCALLS 1 _ACEOF fi echo "$as_me:$LINENO: checking for donuts" >&5 echo $ECHO_N "checking for donuts... $ECHO_C" >&6 echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$AWK" && break done echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF all: @echo 'ac_maketemp="$(MAKE)"' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo "$as_me:$LINENO: checking whether ln -s works" >&5 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no, using $LN_S" >&5 echo "${ECHO_T}no, using $LN_S" >&6 fi for ac_prog in rm do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_RMPROG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $RMPROG in [\\/]* | ?:[\\/]*) ac_cv_path_RMPROG="$RMPROG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_RMPROG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi RMPROG=$ac_cv_path_RMPROG if test -n "$RMPROG"; then echo "$as_me:$LINENO: result: $RMPROG" >&5 echo "${ECHO_T}$RMPROG" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$RMPROG" && break done test -n "$RMPROG" || RMPROG="/bin/rm" for ac_prog in sh do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_SHPROG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $SHPROG in [\\/]* | ?:[\\/]*) ac_cv_path_SHPROG="$SHPROG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_SHPROG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi SHPROG=$ac_cv_path_SHPROG if test -n "$SHPROG"; then echo "$as_me:$LINENO: result: $SHPROG" >&5 echo "${ECHO_T}$SHPROG" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$SHPROG" && break done test -n "$SHPROG" || SHPROG="/bin/sh" for ac_prog in flex lex do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_LEX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$LEX"; then ac_cv_prog_LEX="$LEX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LEX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi LEX=$ac_cv_prog_LEX if test -n "$LEX"; then echo "$as_me:$LINENO: result: $LEX" >&5 echo "${ECHO_T}$LEX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$LEX" && break done test -n "$LEX" || LEX=":" if test -z "$LEXLIB" then echo "$as_me:$LINENO: checking for yywrap in -lfl" >&5 echo $ECHO_N "checking for yywrap in -lfl... $ECHO_C" >&6 if test "${ac_cv_lib_fl_yywrap+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char yywrap (); int main () { yywrap (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_fl_yywrap=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_fl_yywrap=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_fl_yywrap" >&5 echo "${ECHO_T}$ac_cv_lib_fl_yywrap" >&6 if test $ac_cv_lib_fl_yywrap = yes; then LEXLIB="-lfl" else echo "$as_me:$LINENO: checking for yywrap in -ll" >&5 echo $ECHO_N "checking for yywrap in -ll... $ECHO_C" >&6 if test "${ac_cv_lib_l_yywrap+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ll $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char yywrap (); int main () { yywrap (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_l_yywrap=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_l_yywrap=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_l_yywrap" >&5 echo "${ECHO_T}$ac_cv_lib_l_yywrap" >&6 if test $ac_cv_lib_l_yywrap = yes; then LEXLIB="-ll" fi fi fi if test "x$LEX" != "x:"; then echo "$as_me:$LINENO: checking lex output file root" >&5 echo $ECHO_N "checking lex output file root... $ECHO_C" >&6 if test "${ac_cv_prog_lex_root+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # The minimal lex program is just a single line: %%. But some broken lexes # (Solaris, I think it was) want two %% lines, so accommodate them. cat >conftest.l <<_ACEOF %% %% _ACEOF { (eval echo "$as_me:$LINENO: \"$LEX conftest.l\"") >&5 (eval $LEX conftest.l) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } if test -f lex.yy.c; then ac_cv_prog_lex_root=lex.yy elif test -f lexyy.c; then ac_cv_prog_lex_root=lexyy else { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5 echo "$as_me: error: cannot find output from $LEX; giving up" >&2;} { (exit 1); exit 1; }; } fi fi echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5 echo "${ECHO_T}$ac_cv_prog_lex_root" >&6 rm -f conftest.l LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5 echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6 if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # POSIX says lex can declare yytext either as a pointer or an array; the # default is implementation-dependent. Figure out which it is, since # not all implementations provide the %pointer and %array declarations. ac_cv_prog_lex_yytext_pointer=no echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c ac_save_LIBS=$LIBS LIBS="$LIBS $LEXLIB" cat >conftest.$ac_ext <<_ACEOF `cat $LEX_OUTPUT_ROOT.c` _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_lex_yytext_pointer=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_save_LIBS rm -f "${LEX_OUTPUT_ROOT}.c" fi echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5 echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6 if test $ac_cv_prog_lex_yytext_pointer = yes; then cat >>confdefs.h <<\_ACEOF #define YYTEXT_POINTER 1 _ACEOF fi fi if test "$LEX" = ":" ; then { { echo "$as_me:$LINENO: error: Cannot find flex." >&5 echo "$as_me: error: Cannot find flex." >&2;} { (exit 1); exit 1; }; } elif echo "" | $LEX -V -v --version > /dev/null 2>&1 ; then : else { { echo "$as_me:$LINENO: error: Cannot use $LEX as flex." >&5 echo "$as_me: error: Cannot use $LEX as flex." >&2;} { (exit 1); exit 1; }; } fi if test -z "$LEXLIB" ; then { { echo "$as_me:$LINENO: error: Cannot find a library with yywrap() in, but flex was found. It's possible the compiler you're using ($CC) is incompatible with the installed library. See \`config.log' for more details." >&5 echo "$as_me: error: Cannot find a library with yywrap() in, but flex was found. It's possible the compiler you're using ($CC) is incompatible with the installed library. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi LIBS="$LEXLIB $LIBS" for ac_prog in 'bison -y' byacc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_YACC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_YACC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi YACC=$ac_cv_prog_YACC if test -n "$YACC"; then echo "$as_me:$LINENO: result: $YACC" >&5 echo "${ECHO_T}$YACC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$YACC" && break done test -n "$YACC" || YACC="yacc" if test "$YACC" = ":" ; then { { echo "$as_me:$LINENO: error: Cannot find yacc." >&5 echo "$as_me: error: Cannot find yacc." >&2;} { (exit 1); exit 1; }; } elif echo "" | $YACC -V -v --version > /dev/null 2>&1 ; then : else { echo "$as_me:$LINENO: WARNING: $YACC may not work as yacc." >&5 echo "$as_me: WARNING: $YACC may not work as yacc." >&2;} fi echo "$as_me:$LINENO: checking for posix non-blocking" >&5 echo $ECHO_N "checking for posix non-blocking... $ECHO_C" >&6 if test "${unet_cv_sys_nonblocking_posix+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include #include #include $ac_cv_type_signal alarmed() { exit(1); } int main(void) { char b[12]; struct sockaddr x; size_t l = sizeof(x); int f = socket(AF_INET, SOCK_DGRAM, 0); if (f >= 0 && !(fcntl(f, F_SETFL, O_NONBLOCK))) { signal(SIGALRM, alarmed); alarm(2); recvfrom(f, b, 12, 0, &x, &l); alarm(0); exit(0); } exit(1); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then unet_cv_sys_nonblocking_posix=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) unet_cv_sys_nonblocking_posix=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $unet_cv_sys_nonblocking_posix" >&5 echo "${ECHO_T}$unet_cv_sys_nonblocking_posix" >&6 if test $unet_cv_sys_nonblocking_posix = yes; then cat >>confdefs.h <<\_ACEOF #define NBLOCK_POSIX _ACEOF else echo "$as_me:$LINENO: checking for bsd non-blocking" >&5 echo $ECHO_N "checking for bsd non-blocking... $ECHO_C" >&6 if test "${unet_cv_sys_nonblocking_bsd+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include #include #include $ac_cv_type_signal alarmed() { exit(1); } int main(void) { char b[12]; struct sockaddr x; size_t l = sizeof(x); int f = socket(AF_INET, SOCK_DGRAM, 0); if (f >= 0 && !(fcntl(f, F_SETFL, O_NDELAY))) { signal(SIGALRM, alarmed); alarm(2); recvfrom(f, b, 12, 0, &x, &l); alarm(0); exit(0); } exit(1); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then unet_cv_sys_nonblocking_bsd=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) unet_cv_sys_nonblocking_bsd=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $unet_cv_sys_nonblocking_bsd" >&5 echo "${ECHO_T}$unet_cv_sys_nonblocking_bsd" >&6 if test $unet_cv_sys_nonblocking_bsd = yes; then cat >>confdefs.h <<\_ACEOF #define NBLOCK_BSD _ACEOF else cat >>confdefs.h <<\_ACEOF #define NBLOCK_SYSV _ACEOF fi fi echo "$as_me:$LINENO: checking for posix signals" >&5 echo $ECHO_N "checking for posix signals... $ECHO_C" >&6 if test "${unet_cv_sys_signal_posix+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { sigaction(SIGTERM, (struct sigaction *)0L, (struct sigaction *)0L) ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then unet_cv_sys_signal_posix=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 unet_cv_sys_signal_posix=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $unet_cv_sys_signal_posix" >&5 echo "${ECHO_T}$unet_cv_sys_signal_posix" >&6 if test $unet_cv_sys_signal_posix = yes; then cat >>confdefs.h <<\_ACEOF #define POSIX_SIGNALS _ACEOF else echo "$as_me:$LINENO: checking for bsd reliable signals" >&5 echo $ECHO_N "checking for bsd reliable signals... $ECHO_C" >&6 if test "${unet_cv_sys_signal_bsd+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int calls = 0; $ac_cv_type_signal handler() { if (calls) return; calls++; kill(getpid(), SIGTERM); sleep(1); } int main(void) { signal(SIGTERM, handler); kill(getpid(), SIGTERM); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then unet_cv_sys_signal_bsd=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) unet_cv_sys_signal_bsd=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $unet_cv_sys_signal_bsd" >&5 echo "${ECHO_T}$unet_cv_sys_signal_bsd" >&6 if test $unet_cv_sys_signal_bsd = yes; then cat >>confdefs.h <<\_ACEOF #define BSD_RELIABLE_SIGNALS _ACEOF else cat >>confdefs.h <<\_ACEOF #define SYSV_UNRELIABLE_SIGNALS _ACEOF fi fi echo "$as_me:$LINENO: checking for OS-dependent information" >&5 echo $ECHO_N "checking for OS-dependent information... $ECHO_C" >&6 case "$host" in *-linux*) echo "$as_me:$LINENO: result: Linux ($host) found." >&5 echo "${ECHO_T}Linux ($host) found." >&6 unet_poll_syscall=yes ;; *-solaris*) echo "$as_me:$LINENO: result: Solaris ($host) found." >&5 echo "${ECHO_T}Solaris ($host) found." >&6 if test x"$ac_cv_header_poll_h" = xyes; then unet_poll_syscall=yes else unet_poll_syscall=no fi cat >>confdefs.h <<\_ACEOF #define IRCU_SOLARIS 1 _ACEOF ;; *-sunos*) echo "$as_me:$LINENO: result: Solaris ($host) found." >&5 echo "${ECHO_T}Solaris ($host) found." >&6 unet_poll_syscall=no ;; *-openbsd*) echo "$as_me:$LINENO: result: OpenBSD ($host) found." >&5 echo "${ECHO_T}OpenBSD ($host) found." >&6 if test x"$ac_cv_header_poll_h" = xyes; then unet_poll_syscall=yes else unet_poll_syscall=no fi ;; *-*bsd*) echo "$as_me:$LINENO: result: Generic BSD ($host) found." >&5 echo "${ECHO_T}Generic BSD ($host) found." >&6 if test x"$ac_cv_header_poll_h" = xyes; then unet_poll_syscall=yes else unet_poll_syscall=no fi ;; *-darwin*) echo "$as_me:$LINENO: result: Darwin (Mac OS X) ($host) found." >&5 echo "${ECHO_T}Darwin (Mac OS X) ($host) found." >&6 unet_poll_syscall=no ;; *) echo "$as_me:$LINENO: result: Unknown system type $host found." >&5 echo "${ECHO_T}Unknown system type $host found." >&6 { echo "$as_me:$LINENO: WARNING: Unknown OS type; using generic routines." >&5 echo "$as_me: WARNING: Unknown OS type; using generic routines." >&2;} unet_poll_syscall=no ;; esac echo "$as_me:$LINENO: checking whether to enable use of poll()" >&5 echo $ECHO_N "checking whether to enable use of poll()... $ECHO_C" >&6 # Check whether --enable-poll or --disable-poll was given. if test "${enable_poll+set}" = set; then enableval="$enable_poll" unet_cv_enable_poll=$enable_poll else if test "${unet_cv_enable_poll+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else unet_cv_enable_poll=$unet_poll_syscall fi fi; # Force poll to be disabled if there is no poll.h if test x"$ac_cv_header_poll_h" != xyes; then unet_cv_enable_poll=no fi echo "$as_me:$LINENO: result: $unet_cv_enable_poll" >&5 echo "${ECHO_T}$unet_cv_enable_poll" >&6 if test x"$unet_cv_enable_poll" = xyes; then cat >>confdefs.h <<\_ACEOF #define USE_POLL 1 _ACEOF ENGINE_C=engine_poll.c else ENGINE_C=engine_select.c fi echo "$as_me:$LINENO: checking whether to enable debug mode" >&5 echo $ECHO_N "checking whether to enable debug mode... $ECHO_C" >&6 # Check whether --enable-debug or --disable-debug was given. if test "${enable_debug+set}" = set; then enableval="$enable_debug" unet_cv_enable_debug=$enable_debug else if test "${unet_cv_enable_debug+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else unet_cv_enable_debug=no fi fi; echo "$as_me:$LINENO: result: $unet_cv_enable_debug" >&5 echo "${ECHO_T}$unet_cv_enable_debug" >&6 if test x"$unet_cv_enable_debug" = xyes; then cat >>confdefs.h <<\_ACEOF #define DEBUGMODE 1 _ACEOF fi echo "$as_me:$LINENO: checking whether to enable leak detection" >&5 echo $ECHO_N "checking whether to enable leak detection... $ECHO_C" >&6 # Check whether --with-leak-detect or --without-leak-detect was given. if test "${with_leak_detect+set}" = set; then withval="$with_leak_detect" unet_cv_with_leak_detect=$with_leak_detect else if test "${unet_cv_with_leak_detect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else unet_cv_with_leak_detect=no fi fi; echo "$as_me:$LINENO: result: $unet_cv_enable_leak_detect" >&5 echo "${ECHO_T}$unet_cv_enable_leak_detect" >&6 if test x"$unet_cv_with_leak_detect" != xno; then LIBS="-lgc $LIBS" CFLAGS="-DMDEBUG $CFLAGS" if test x"$unet_cv_with_leak_detect" != xyes; then LIBS="-L$unet_cv_with_leak_detect $LIBS" fi fi # Check whether --with-ipv6 or --without-ipv6 was given. if test "${with_ipv6+set}" = set; then withval="$with_ipv6" ac_cv_use_ipv6=$withval else ac_cv_use_ipv6=$unet_have_sockaddr_in6 fi; echo "$as_me:$LINENO: checking whether to use IPv6" >&5 echo $ECHO_N "checking whether to use IPv6... $ECHO_C" >&6 if test "${ac_cv_use_ipv6+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_use_ipv6=no fi echo "$as_me:$LINENO: result: $ac_cv_use_ipv6" >&5 echo "${ECHO_T}$ac_cv_use_ipv6" >&6 if test x"$ac_cv_use_ipv6" != "xno" ; then cat >>confdefs.h <<\_ACEOF #define IPV6 1 _ACEOF fi echo "$as_me:$LINENO: checking whether to enable asserts" >&5 echo $ECHO_N "checking whether to enable asserts... $ECHO_C" >&6 # Check whether --enable-asserts or --disable-asserts was given. if test "${enable_asserts+set}" = set; then enableval="$enable_asserts" unet_cv_enable_asserts=$enable_asserts else if test "${unet_cv_enable_asserts+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else unet_cv_enable_asserts=yes fi fi; echo "$as_me:$LINENO: result: $unet_cv_enable_asserts" >&5 echo "${ECHO_T}$unet_cv_enable_asserts" >&6 if test x"$unet_cv_enable_asserts" = xno; then cat >>confdefs.h <<\_ACEOF #define NDEBUG 1 _ACEOF fi echo "$as_me:$LINENO: checking whether to enable profiling support (gprof)" >&5 echo $ECHO_N "checking whether to enable profiling support (gprof)... $ECHO_C" >&6 # Check whether --enable-profile or --disable-profile was given. if test "${enable_profile+set}" = set; then enableval="$enable_profile" unet_cv_enable_profile=$enable_profile else if test "${unet_cv_enable_profile+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else unet_cv_enable_profile=no fi fi; echo "$as_me:$LINENO: result: $unet_cv_enable_profile" >&5 echo "${ECHO_T}$unet_cv_enable_profile" >&6 if test x"$unet_cv_enable_profile" = xyes; then CFLAGS="-pg $CFLAGS" LDFLAGS="-pg $LDFLAGS" fi echo "$as_me:$LINENO: checking whether to enable pedantic compiler warnings" >&5 echo $ECHO_N "checking whether to enable pedantic compiler warnings... $ECHO_C" >&6 # Check whether --enable-pedantic or --disable-pedantic was given. if test "${enable_pedantic+set}" = set; then enableval="$enable_pedantic" unet_cv_enable_pedantic=$enable_pedantic else if test "${unet_cv_enable_pedantic+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else unet_cv_enable_pedantic=no fi fi; echo "$as_me:$LINENO: result: $unet_cv_enable_pedantic" >&5 echo "${ECHO_T}$unet_cv_enable_pedantic" >&6 if test x"$unet_cv_enable_pedantic" = xyes; then CFLAGS="-pedantic $CFLAGS" fi echo "$as_me:$LINENO: checking whether to enable compiler warnings" >&5 echo $ECHO_N "checking whether to enable compiler warnings... $ECHO_C" >&6 # Check whether --enable-warnings or --disable-warnings was given. if test "${enable_warnings+set}" = set; then enableval="$enable_warnings" unet_cv_enable_warnings=$enable_warnings else if test "${unet_cv_enable_warnings+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else unet_cv_enable_warnings=no fi fi; echo "$as_me:$LINENO: result: $unet_cv_enable_warnings" >&5 echo "${ECHO_T}$unet_cv_enable_warnings" >&6 if test x"$unet_cv_enable_warnings" = xyes; then CFLAGS="-Wall $CFLAGS" fi echo "$as_me:$LINENO: checking whether to enable inlining for a few critical functions" >&5 echo $ECHO_N "checking whether to enable inlining for a few critical functions... $ECHO_C" >&6 # Check whether --enable-inlines or --disable-inlines was given. if test "${enable_inlines+set}" = set; then enableval="$enable_inlines" unet_cv_enable_inlines=$enable_inlines else if test "${unet_cv_enable_inlines+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else unet_cv_enable_inlines=yes fi fi; echo "$as_me:$LINENO: result: $unet_cv_enable_inlines" >&5 echo "${ECHO_T}$unet_cv_enable_inlines" >&6 if test x"$unet_cv_enable_inlines" = xyes; then cat >>confdefs.h <<\_ACEOF #define FORCEINLINE 1 _ACEOF fi echo "$as_me:$LINENO: checking whether to enable the /dev/poll event engine" >&5 echo $ECHO_N "checking whether to enable the /dev/poll event engine... $ECHO_C" >&6 # Check whether --enable-devpoll or --disable-devpoll was given. if test "${enable_devpoll+set}" = set; then enableval="$enable_devpoll" unet_cv_enable_devpoll=$enable_devpoll else if test "${unet_cv_enable_devpoll+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else unet_cv_enable_devpoll=yes fi fi; if test x"$ac_cv_header_sys_devpoll_h" = xno; then unet_cv_enable_devpoll=no fi echo "$as_me:$LINENO: result: $unet_cv_enable_devpoll" >&5 echo "${ECHO_T}$unet_cv_enable_devpoll" >&6 if test x"$unet_cv_enable_devpoll" != xno; then cat >>confdefs.h <<\_ACEOF #define USE_DEVPOLL 1 _ACEOF ENGINE_C="engine_devpoll.c $ENGINE_C" fi echo "$as_me:$LINENO: checking whether to enable the kqueue event engine" >&5 echo $ECHO_N "checking whether to enable the kqueue event engine... $ECHO_C" >&6 # Check whether --enable-kqueue or --disable-kqueue was given. if test "${enable_kqueue+set}" = set; then enableval="$enable_kqueue" unet_cv_enable_kqueue=$enable_kqueue else if test "${unet_cv_enable_kqueue+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else unet_cv_enable_kqueue=yes fi fi; if test x"$ac_cv_header_sys_event_h" = xno -o x"$ac_cv_func_kqueue" = xno; then unet_cv_enable_kqueue=no fi echo "$as_me:$LINENO: result: $unet_cv_enable_kqueue" >&5 echo "${ECHO_T}$unet_cv_enable_kqueue" >&6 if test x"$unet_cv_enable_kqueue" != xno; then cat >>confdefs.h <<\_ACEOF #define USE_KQUEUE 1 _ACEOF ENGINE_C="engine_kqueue.c $ENGINE_C" fi echo "$as_me:$LINENO: checking whether to enable the epoll event engine" >&5 echo $ECHO_N "checking whether to enable the epoll event engine... $ECHO_C" >&6 # Check whether --enable-epoll or --disable-epoll was given. if test "${enable_epoll+set}" = set; then enableval="$enable_epoll" unet_cv_enable_epoll=$enable_epoll else if test "${unet_cv_enable_epoll+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else unet_cv_enable_epoll=yes fi fi; if test x"$ac_cv_header_sys_epoll_h" = xno -o x"$ac_cv_func_epoll" = xno; then unet_cv_enable_epoll=no fi echo "$as_me:$LINENO: result: $unet_cv_enable_epoll" >&5 echo "${ECHO_T}$unet_cv_enable_epoll" >&6 if test x"$unet_cv_enable_epoll" != xno; then echo "$as_me:$LINENO: checking whether epoll functions are properly defined" >&5 echo $ECHO_N "checking whether epoll functions are properly defined... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { epoll_create(10); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 cat >>confdefs.h <<\_ACEOF #define EPOLL_NEED_BODY 1 _ACEOF fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext cat >>confdefs.h <<\_ACEOF #define USE_EPOLL 1 _ACEOF ENGINE_C="engine_epoll.c $ENGINE_C" fi echo "$as_me:$LINENO: checking for va_copy" >&5 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6 if test "${unet_cv_c_va_copy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { va_list ap1, ap2; va_copy(ap1, ap2); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then unet_cv_c_va_copy="yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 unet_cv_c_va_copy="no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $unet_cv_c_va_copy" >&5 echo "${ECHO_T}$unet_cv_c_va_copy" >&6 if test "$unet_cv_c_va_copy" = "yes" ; then cat >>confdefs.h <<\_ACEOF #define HAVE_VA_COPY 1 _ACEOF fi echo "$as_me:$LINENO: checking for __va_copy" >&5 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6 if test "${unet_cv_c___va_copy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { va_list ap1, ap2; __va_copy(ap1, ap2); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then unet_cv_c___va_copy="yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 unet_cv_c___va_copy="no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $unet_cv_c___va_copy" >&5 echo "${ECHO_T}$unet_cv_c___va_copy" >&6 if test "$unet_cv_c___va_copy" = "yes" ; then cat >>confdefs.h <<\_ACEOF #define HAVE___VA_COPY 1 _ACEOF fi echo "$as_me:$LINENO: checking what name to give the symlink" >&5 echo $ECHO_N "checking what name to give the symlink... $ECHO_C" >&6 # Check whether --with-symlink or --without-symlink was given. if test "${with_symlink+set}" = set; then withval="$with_symlink" unet_cv_with_symlink=$with_symlink else if test "${unet_cv_with_symlink+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else unet_cv_with_symlink="ircd" fi fi; if test x"$unet_cv_with_symlink" = xyes; then unet_cv_with_symlink="ircd" fi echo "$as_me:$LINENO: result: $unet_cv_with_symlink" >&5 echo "${ECHO_T}$unet_cv_with_symlink" >&6 if test x"$unet_cv_with_symlink" = xno; then INSTALL_RULE=install-no-symlink SYMLINK= else INSTALL_RULE=install-with-symlink SYMLINK=$unet_cv_with_symlink fi echo "$as_me:$LINENO: checking what permissions to set on the installed binary" >&5 echo $ECHO_N "checking what permissions to set on the installed binary... $ECHO_C" >&6 # Check whether --with-mode or --without-mode was given. if test "${with_mode+set}" = set; then withval="$with_mode" unet_cv_with_mode=$with_mode else if test "${unet_cv_with_mode+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else unet_cv_with_mode=711 fi fi; if test x"$unet_cv_with_mode" = xyes -o x"$unet_cv_with_mode" = xno; then unet_cv_with_mode=711 fi echo "$as_me:$LINENO: result: $unet_cv_with_mode" >&5 echo "${ECHO_T}$unet_cv_with_mode" >&6 IRCDMODE=$unet_cv_with_mode unet_uid=`id | sed -e 's/.*uid=[0-9]*(//' -e 's/).*//' 2> /dev/null` echo "$as_me:$LINENO: checking which user should own the installed binary" >&5 echo $ECHO_N "checking which user should own the installed binary... $ECHO_C" >&6 # Check whether --with-owner or --without-owner was given. if test "${with_owner+set}" = set; then withval="$with_owner" unet_cv_with_owner=$with_owner else if test "${unet_cv_with_owner+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else unet_cv_with_owner=$unet_uid fi fi; if test x"$unet_cv_with_owner" = xyes -o x"$unet_cv_with_owner" = xno; then unet_cv_with_owner=$unet_uid fi echo "$as_me:$LINENO: result: $unet_cv_with_owner" >&5 echo "${ECHO_T}$unet_cv_with_owner" >&6 IRCDOWN=$unet_cv_with_owner unet_gid=`id | sed -e 's/.*gid=[0-9]*(//' -e 's/).*//' 2> /dev/null` echo "$as_me:$LINENO: checking which group should own the installed binary" >&5 echo $ECHO_N "checking which group should own the installed binary... $ECHO_C" >&6 # Check whether --with-group or --without-group was given. if test "${with_group+set}" = set; then withval="$with_group" unet_cv_with_group=$with_group else if test "${unet_cv_with_group+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else unet_cv_with_group=$unet_gid fi fi; if test x"$unet_cv_with_group" = xyes -o x"$unet_cv_with_group" = xno; then unet_cv_with_group=$unet_gid fi echo "$as_me:$LINENO: result: $unet_cv_with_group" >&5 echo "${ECHO_T}$unet_cv_with_group" >&6 IRCDGRP=$unet_cv_with_group unet_domain= if test -f /etc/resolv.conf; then unet_domain=`awk '/^domain/ { print $2; exit }' /etc/resolv.conf` if test x"$unet_domain" = x; then unet_domain=`awk '/^search/ { print $2; exit }' /etc/resolv.conf` fi fi echo "$as_me:$LINENO: checking for site domain name" >&5 echo $ECHO_N "checking for site domain name... $ECHO_C" >&6 # Check whether --with-domain or --without-domain was given. if test "${with_domain+set}" = set; then withval="$with_domain" unet_cv_with_domain=$with_domain else if test "${unet_cv_with_domain+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else unet_cv_with_domain=$unet_domain fi fi; if test x"$unet_cv_with_domain" = xyes -o x"$unet_cv_with_domain" = xno; then unet_cv_with_domain=$unet_domain fi if test x"$unet_cv_with_domain" = xno; then { { echo "$as_me:$LINENO: error: Unable to determine server DNS domain; use --with-domain to set it" >&5 echo "$as_me: error: Unable to determine server DNS domain; use --with-domain to set it" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $unet_cv_with_domain" >&5 echo "${ECHO_T}$unet_cv_with_domain" >&6 cat >>confdefs.h <<_ACEOF #define DOMAINNAME "*$unet_cv_with_domain" _ACEOF echo "$as_me:$LINENO: checking if chroot operation is desired" >&5 echo $ECHO_N "checking if chroot operation is desired... $ECHO_C" >&6 # Check whether --with-chroot or --without-chroot was given. if test "${with_chroot+set}" = set; then withval="$with_chroot" unet_cv_with_chroot=$with_chroot else if test "${unet_cv_with_chroot+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else unet_cv_with_chroot=no fi fi; if test x"$unet_cv_with_chroot" = xyes; then { { echo "$as_me:$LINENO: error: --with-chroot given with no directory. See doc/readme.chroot." >&5 echo "$as_me: error: --with-chroot given with no directory. See doc/readme.chroot." >&2;} { (exit 1); exit 1; }; } fi # Ensure there are no trailing /'s to mess us up unet_cv_with_chroot=`echo "$unet_cv_with_chroot" | sed 's%/*$%%'` echo "$as_me:$LINENO: result: $unet_cv_with_chroot" >&5 echo "${ECHO_T}$unet_cv_with_chroot" >&6 # Deal with the annoying value "NONE" here unet_save_prefix=$prefix if test x"$prefix" = xNONE; then prefix=$ac_default_prefix else prefix=$prefix fi unet_save_exec_prefix=$exec_prefix if test x"$exec_prefix" = xNONE; then exec_prefix=$prefix else exec_prefix=$exec_prefix fi # Obtain the actual interesting directories unet_bindir=`eval echo "$bindir"` unet_libdir=`eval echo "$libdir"` # Restore the original settings of $prefix and $exec_prefix prefix=$unet_save_prefix exec_prefix=$unet_save_exec_prefix echo "$as_me:$LINENO: checking where the binary will be for /restart" >&5 echo $ECHO_N "checking where the binary will be for /restart... $ECHO_C" >&6 if test x"$unet_cv_with_symlink" = xno; then unet_spath="$unet_bindir/ircd" else unet_spath="$unet_bindir/$unet_cv_with_symlink" fi echo "$as_me:$LINENO: result: $unet_spath" >&5 echo "${ECHO_T}$unet_spath" >&6 if test x"$unet_cv_with_chroot" != xno; then if echo "$unet_spath" | grep "^$unet_cv_with_chroot" > /dev/null 2>&1; then unet_spath=`echo "$unet_spath" | sed "s%^$unet_cv_with_chroot%%"` else { echo "$as_me:$LINENO: WARNING: Binary $unet_spath not relative to root directory $unet_cv_with_chroot; restarts will probably fail" >&5 echo "$as_me: WARNING: Binary $unet_spath not relative to root directory $unet_cv_with_chroot; restarts will probably fail" >&2;} fi fi cat >>confdefs.h <<_ACEOF #define SPATH "$unet_spath" _ACEOF echo "$as_me:$LINENO: checking what the data directory should be" >&5 echo $ECHO_N "checking what the data directory should be... $ECHO_C" >&6 # Check whether --with-dpath or --without-dpath was given. if test "${with_dpath+set}" = set; then withval="$with_dpath" unet_cv_with_dpath=$with_dpath else if test "${unet_cv_with_dpath+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else unet_cv_with_dpath=$unet_libdir fi fi; if test x"$unet_cv_with_dpath" = xyes -o x"$unet_cv_with_dpath" = xno; then unet_cv_with_dpath=$unet_libdir fi # Ensure there are no trailing /'s to mess us up unet_cv_with_dpath=`echo "$unet_cv_with_dpath" | sed 's%/*$%%'` echo "$as_me:$LINENO: result: $unet_cv_with_dpath" >&5 echo "${ECHO_T}$unet_cv_with_dpath" >&6 if test x"$unet_cv_with_chroot" != xno; then if echo "$unet_cv_with_dpath" | grep "^$unet_cv_with_chroot" > /dev/null 2>&1; then unet_dpath=`echo "$unet_cv_with_dpath" | sed "s%^$unet_cv_with_chroot%%"` else { { echo "$as_me:$LINENO: error: Data directory $unet_cv_with_dpath not relative to root directory $unet_cv_with_chroot" >&5 echo "$as_me: error: Data directory $unet_cv_with_dpath not relative to root directory $unet_cv_with_chroot" >&2;} { (exit 1); exit 1; }; } fi else unet_dpath=$unet_cv_with_dpath fi cat >>confdefs.h <<_ACEOF #define DPATH "$unet_dpath" _ACEOF DPATH=$unet_cv_with_dpath echo "$as_me:$LINENO: checking where the default configuration file resides" >&5 echo $ECHO_N "checking where the default configuration file resides... $ECHO_C" >&6 # Check whether --with-cpath or --without-cpath was given. if test "${with_cpath+set}" = set; then withval="$with_cpath" unet_cv_with_cpath=$with_cpath else if test "${unet_cv_with_cpath+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else unet_cv_with_cpath="ircd.conf" fi fi; if test x"$unet_cv_with_cpath" = xyes -o x"$unet_cv_with_cpath" = xno; then unet_cv_with_cpath="ircd.conf" fi echo "$as_me:$LINENO: result: $unet_cv_with_cpath" >&5 echo "${ECHO_T}$unet_cv_with_cpath" >&6 if echo "$unet_cv_with_cpath" | grep '^/' > /dev/null 2>&1; then # Absolute path; check against chroot stuff if test x"$unet_cv_with_chroot" != xno; then if echo "$unet_cv_with_cpath" | grep "^$unet_cv_with_chroot" > /dev/null 2>&1; then unet_cpath=`echo "$unet_cv_with_cpath" | sed "s%^$unet_cv_with_chroot%%"` else { { echo "$as_me:$LINENO: error: Configuration file $unet_cv_with_cpath not relative to root directory $unet_cv_with_chroot" >&5 echo "$as_me: error: Configuration file $unet_cv_with_cpath not relative to root directory $unet_cv_with_chroot" >&2;} { (exit 1); exit 1; }; } fi else unet_cpath=$unet_cv_with_cpath fi else unet_cpath=$unet_cv_with_cpath fi cat >>confdefs.h <<_ACEOF #define CPATH "$unet_cpath" _ACEOF echo "$as_me:$LINENO: checking where to put the debugging log if debugging enabled" >&5 echo $ECHO_N "checking where to put the debugging log if debugging enabled... $ECHO_C" >&6 # Check whether --with-lpath or --without-lpath was given. if test "${with_lpath+set}" = set; then withval="$with_lpath" unet_cv_with_lpath=$with_lpath else if test "${unet_cv_with_lpath+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else unet_cv_with_lpath="ircd.log" fi fi; if test x"$unet_cv_with_lpath" = xyes -o x"$unet_cv_with_lpath" = xno; then unet_cv_with_lpath="ircd.log" fi echo "$as_me:$LINENO: result: $unet_cv_with_lpath" >&5 echo "${ECHO_T}$unet_cv_with_lpath" >&6 if echo "$unet_cv_with_lpath" | grep '^/' > /dev/null 2>&1; then # Absolute path; check against chroot stuff if test x"$unet_cv_with_chroot" != xno; then if echo "$unet_cv_with_lpath" | grep "^$unet_cv_with_chroot" > /dev/null 2>&1; then unet_lpath=`echo "$unet_cv_with_lpath" | sed "s%^$unet_cv_with_chroot%%"` else { echo "$as_me:$LINENO: WARNING: Log file $unet_cv_with_lpath not relative to root directory $unet_cv_with_chroot; using default ircd.log instead" >&5 echo "$as_me: WARNING: Log file $unet_cv_with_lpath not relative to root directory $unet_cv_with_chroot; using default ircd.log instead" >&2;} unet_cv_with_lpath="ircd.log" unet_lpath="ircd.log" fi else unet_lpath=$unet_cv_with_lpath fi else unet_lpath=$unet_cv_with_lpath fi cat >>confdefs.h <<_ACEOF #define LPATH "$unet_lpath" _ACEOF unet_maxcon=`ulimit -Hn` if test x"$unet_maxcon" = xunlimited; then unet_maxcon=`ulimit -Sn` fi unet_maxcon=`expr $unet_maxcon - 4` echo "$as_me:$LINENO: checking max connections" >&5 echo $ECHO_N "checking max connections... $ECHO_C" >&6 # Check whether --with-maxcon or --without-maxcon was given. if test "${with_maxcon+set}" = set; then withval="$with_maxcon" unet_cv_with_maxcon=$with_maxcon else if test "${unet_cv_with_maxcon+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else unet_cv_with_maxcon=$unet_maxcon fi fi; if test x"$unet_cv_with_maxcon" = xyes -o x"$unet_cv_with_maxcon" = xno; then unet_cv_with_maxcon=$unet_maxcon fi echo "$as_me:$LINENO: result: $unet_cv_with_maxcon" >&5 echo "${ECHO_T}$unet_cv_with_maxcon" >&6 cat >>confdefs.h <<_ACEOF #define MAXCONNECTIONS $unet_cv_with_maxcon _ACEOF ac_config_files="$ac_config_files Makefile ircd/Makefile ircd/test/Makefile doc/Makefile" ac_config_commands="$ac_config_commands default" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. { (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } | sed ' t clear : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ : end' >>confcache if diff $cache_file confcache >/dev/null 2>&1; then :; else if test -w $cache_file; then test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/; s/:*\${srcdir}:*/:/; s/:*@srcdir@:*/:/; s/^\([^=]*=[ ]*\):*/\1/; s/:*$//; s/^[^=]*=[ ]*$//; }' fi DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_i=`echo "$ac_i" | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` # 2. Add them. ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH exec 6>&1 # Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. Logging --version etc. is OK. exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX } >&5 cat >&5 <<_CSEOF This file was extended by $as_me, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ _CSEOF echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 echo >&5 _ACEOF # Files that config.status was made for. if test -n "$ac_config_files"; then echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS fi if test -n "$ac_config_headers"; then echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS fi if test -n "$ac_config_links"; then echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS fi if test -n "$ac_config_commands"; then echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS fi cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir INSTALL="$INSTALL" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "x$1" : 'x\([^=]*\)='` ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ac_shift=: ;; -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; *) # This is not an option, so the user has probably given explicit # arguments. ac_option=$1 ac_need_defaults=false;; esac case $ac_option in # Handling of the options. _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header { { echo "$as_me:$LINENO: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do case "$ac_config_target" in # Handling of arguments. "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "ircd/Makefile" ) CONFIG_FILES="$CONFIG_FILES ircd/Makefile" ;; "ircd/test/Makefile" ) CONFIG_FILES="$CONFIG_FILES ircd/test/Makefile" ;; "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Create a temporary directory, and hook for its removal unless debugging. $debug || { trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./confstat$$-$RANDOM (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "\$CONFIG_FILES"; then # Protect against being on the right side of a sed subst in config.status. sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF s,@SHELL@,$SHELL,;t t s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@exec_prefix@,$exec_prefix,;t t s,@prefix@,$prefix,;t t s,@program_transform_name@,$program_transform_name,;t t s,@bindir@,$bindir,;t t s,@sbindir@,$sbindir,;t t s,@libexecdir@,$libexecdir,;t t s,@datadir@,$datadir,;t t s,@sysconfdir@,$sysconfdir,;t t s,@sharedstatedir@,$sharedstatedir,;t t s,@localstatedir@,$localstatedir,;t t s,@libdir@,$libdir,;t t s,@includedir@,$includedir,;t t s,@oldincludedir@,$oldincludedir,;t t s,@infodir@,$infodir,;t t s,@mandir@,$mandir,;t t s,@build_alias@,$build_alias,;t t s,@host_alias@,$host_alias,;t t s,@target_alias@,$target_alias,;t t s,@DEFS@,$DEFS,;t t s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t s,@build@,$build,;t t s,@build_cpu@,$build_cpu,;t t s,@build_vendor@,$build_vendor,;t t s,@build_os@,$build_os,;t t s,@host@,$host,;t t s,@host_cpu@,$host_cpu,;t t s,@host_vendor@,$host_vendor,;t t s,@host_os@,$host_os,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t s,@LDFLAGS@,$LDFLAGS,;t t s,@CPPFLAGS@,$CPPFLAGS,;t t s,@ac_ct_CC@,$ac_ct_CC,;t t s,@EXEEXT@,$EXEEXT,;t t s,@OBJEXT@,$OBJEXT,;t t s,@CPP@,$CPP,;t t s,@EGREP@,$EGREP,;t t s,@AWK@,$AWK,;t t s,@SET_MAKE@,$SET_MAKE,;t t s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t s,@LN_S@,$LN_S,;t t s,@RMPROG@,$RMPROG,;t t s,@SHPROG@,$SHPROG,;t t s,@LEX@,$LEX,;t t s,@LEXLIB@,$LEXLIB,;t t s,@LEX_OUTPUT_ROOT@,$LEX_OUTPUT_ROOT,;t t s,@YACC@,$YACC,;t t s,@ENGINE_C@,$ENGINE_C,;t t s,@INSTALL_RULE@,$INSTALL_RULE,;t t s,@SYMLINK@,$SYMLINK,;t t s,@IRCDMODE@,$IRCDMODE,;t t s,@IRCDOWN@,$IRCDOWN,;t t s,@IRCDGRP@,$IRCDGRP,;t t s,@DPATH@,$DPATH,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_lines=48 ac_sed_frag=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_lines # Line after last line for current file. ac_more_lines=: ac_sed_cmds= while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag else sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag fi if test ! -s $tmp/subs.frag; then ac_more_lines=false else # The purpose of the label and of the branching condition is to # speed up the sed processing (if there are no `@' at all, there # is no need to browse any of the substitutions). # These are the two extra sed commands mentioned above. (echo ':t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" else ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" fi ac_sed_frag=`expr $ac_sed_frag + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_lines` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi fi # test -n "$CONFIG_FILES" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then configure_input= else configure_input="$ac_file. " fi configure_input=$configure_input"Generated from `echo $ac_file_in | sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } if test x"$ac_file" != x-; then { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s,@configure_input@,$configure_input,;t t s,@srcdir@,$ac_srcdir,;t t s,@abs_srcdir@,$ac_abs_srcdir,;t t s,@top_srcdir@,$ac_top_srcdir,;t t s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t s,@builddir@,$ac_builddir,;t t s,@abs_builddir@,$ac_abs_builddir,;t t s,@top_builddir@,$ac_top_builddir,;t t s,@abs_top_builddir@,$ac_abs_top_builddir,;t t s,@INSTALL@,$ac_INSTALL,;t t " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out rm -f $tmp/stdin if test x"$ac_file" != x-; then mv $tmp/out $ac_file else cat $tmp/out rm -f $tmp/out fi done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_HEADER section. # # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' ac_dB='[ ].*$,\1#\2' ac_dC=' ' ac_dD=',;t' # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='$,\1#\2define\3' ac_uC=' ' ac_uD=',;t' for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } # Do quote $f, to prevent DOS paths from being IFS'd. echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } # Remove the trailing spaces. sed 's/[ ]*$//' $ac_file_inputs >$tmp/in _ACEOF # Transform confdefs.h into two sed scripts, `conftest.defines' and # `conftest.undefs', that substitutes the proper values into # config.h.in to produce config.h. The first handles `#define' # templates, and the second `#undef' templates. # And first: Protect against being on the right side of a sed subst in # config.status. Protect against being in an unquoted here document # in config.status. rm -f conftest.defines conftest.undefs # Using a here document instead of a string reduces the quoting nightmare. # Putting comments in sed scripts is not portable. # # `end' is used to avoid that the second main sed command (meant for # 0-ary CPP macros) applies to n-ary macro definitions. # See the Autoconf documentation for `clear'. cat >confdef2sed.sed <<\_ACEOF s/[\\&,]/\\&/g s,[\\$`],\\&,g t clear : clear s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp t end s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp : end _ACEOF # If some macros were called several times there might be several times # the same #defines, which is useless. Nevertheless, we may not want to # sort them, since we want the *last* AC-DEFINE to be honored. uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs rm -f confdef2sed.sed # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. cat >>conftest.undefs <<\_ACEOF s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, _ACEOF # Break up conftest.defines because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS echo ' :' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.defines >/dev/null do # Write a limited-size here document to $tmp/defines.sed. echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#define' lines. echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/defines.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines echo ' fi # grep' >>$CONFIG_STATUS echo >>$CONFIG_STATUS # Break up conftest.undefs because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #undef templates' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.undefs >/dev/null do # Write a limited-size here document to $tmp/undefs.sed. echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#undef' echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/undefs.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail rm -f conftest.undefs mv conftest.tail conftest.undefs done rm -f conftest.undefs cat >>$CONFIG_STATUS <<\_ACEOF # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then echo "/* Generated by configure. */" >$tmp/config.h else echo "/* $ac_file. Generated by configure. */" >$tmp/config.h fi cat $tmp/in >>$tmp/config.h rm -f $tmp/in if test x"$ac_file" != x-; then if diff $ac_file $tmp/config.h >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } rm -f $ac_file mv $tmp/config.h $ac_file fi else cat $tmp/config.h rm -f $tmp/config.h fi done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_COMMANDS section. # for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue ac_dest=`echo "$ac_file" | sed 's,:.*,,'` ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_dir=`(dirname "$ac_dest") 2>/dev/null || $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_dest" : 'X\(//\)[^/]' \| \ X"$ac_dest" : 'X\(//\)$' \| \ X"$ac_dest" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_dest" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 echo "$as_me: executing $ac_dest commands" >&6;} case $ac_dest in default ) echo timestamp > stamp-h ;; esac done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi ac_config_commands="$ac_config_commands default-1" ircd-ircu-2.10.12.10.dfsg1/LICENSE0000644000175000017500000003031007014163752015637 0ustar madkissmadkiss GNU GENERAL PUBLIC LICENSE Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. The General Public License applies to the Free Software Foundation's software and to any other program whose authors commit to using it. You can use it for your programs, too. When we speak of free software, we are referring to freedom, not price. Specifically, the General Public License is designed to make sure that you have the freedom to give away or sell copies of free software, that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of a such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any work containing the Program or a portion of it, either verbatim or with modifications. Each licensee is addressed as "you". 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this General Public License and to the absence of any warranty; and give any other recipients of the Program a copy of this General Public License along with the Program. You may charge a fee for the physical act of transferring a copy. 2. You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following: a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and b) cause the whole of any work that you distribute or publish, that in whole or in part contains the Program or any part thereof, either with or without modifications, to be licensed at no charge to all third parties under the terms of this General Public License (except that you may choose to grant warranty protection to some or all third parties, at your option). c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the simplest and most usual way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this General Public License. d) You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. Mere aggregation of another independent work with the Program (or its derivative) on a volume of a storage or distribution medium does not bring the other work under the scope of these terms. 3. You may copy and distribute the Program (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: a) accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, b) accompany it with a written offer, valid for at least three years, to give any third party free (except for a nominal charge for the cost of distribution) a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Paragraphs 1 and 2 above; or, c) accompany it with the information you received as to where the corresponding source code may be obtained. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form alone.) Source code for a work means the preferred form of the work for making modifications to it. For an executable file, complete source code means all the source code for all modules it contains; but, as a special exception, it need not include source code for modules which are standard libraries that accompany the operating system on which the executable file runs, or for standard header files or definitions files that accompany that operating system. 4. You may not copy, modify, sublicense, distribute or transfer the Program except as expressly provided under this General Public License. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the Program is void, and will automatically terminate your rights to use the Program under this License. However, parties who have received copies, or rights to use copies, from you under this General Public License will not have their licenses terminated so long as such parties remain in full compliance. 5. By copying, distributing or modifying the Program (or any work based on the Program) you indicate your acceptance of this license to do so, and all its terms and conditions. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. 7. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of the license which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the license, you may choose any version ever published by the Free Software Foundation. 8. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to humanity, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice That's all there is to it! ircd-ircu-2.10.12.10.dfsg1/Makefile.in0000644000175000017500000001113010200251707016663 0ustar madkissmadkiss# Makefile for the Undernet IRC Daemon. # Copyright (C) 1997, Carlo Wood # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. #### Start of system configuration section. #### prefix = @prefix@ srcdir = @srcdir@ VPATH = @srcdir@ SHELL = @SHPROG@ RM = @RMPROG@ AWK = @AWK@ @SET_MAKE@ #### End of system configuration section. #### SUBDIRS = doc ircd ircd/test IRCD_MAKEFILES = Makefile doc/Makefile ircd/Makefile ircd/test/Makefile all: build .PHONY: server build depend install config update diff patch export update # Some versions of make give a warning when this is empty: .SUFFIXES: .dummy build: ${IRCD_MAKEFILES} @for i in ${SUBDIRS}; do \ echo "Building $$i..."; \ cd $$i; ${MAKE} build; cd ..; \ done config: @echo "*************************************************************" @echo "* The \"make config\" step is now DEPRECATED. Most *" @echo "* server options are now configurable via the configuration *" @echo "* file using F-lines; the rest are specified on the command *" @echo "* line to \"./configure\". To aid the transition, a shell *" @echo "* script has been provided to generate the necessary *" @echo "* configuration lines for you. You may run this script by *" @echo "* typing \"tools/transition\"; please pay attention to its *" @echo "* output. This message will be removed for the next major *" @echo "* release of ircu. *" @echo "*************************************************************" root-clean: @for i in '*.orig' '.*.orig' '\#*' '*~' '.*~' '*.bak' '.*.bak' core; do\ echo "Removing $$i"; \ REMOVE_FILES="`find . -name "$$i" -print`"; \ test -n "$$REMOVE_FILES" && ${RM} -f $$REMOVE_FILES; \ done || true sub-clean: ${IRCD_MAKEFILES} @for i in ${SUBDIRS}; do \ echo "Cleaning $$i..."; \ cd $$i; ${MAKE} clean; cd ..;\ done clean: root-clean sub-clean root-distclean: root-clean @for i in '*.rej'; do \ echo "Removing $$i"; \ REMOVE_FILES="`find . -name "$$i" -print`"; \ test -n "$$REMOVE_FILES" && ${RM} -f $$REMOVE_FILES; \ done || true sub-distclean: ${IRCD_MAKEFILES} @for i in ${SUBDIRS}; do \ echo "Dist-cleaning $$i..."; \ cd $$i; ${MAKE} distclean; cd ..;\ done distclean: root-distclean sub-distclean ${RM} -f Makefile config.h config.log config.cache config.status \ stamp-h maintainer-clean: root-distclean ${IRCD_MAKEFILES} @for i in ${SUBDIRS}; do \ echo "maintainer-cleaning $$i..."; \ cd $$i; ${MAKE} maintainer-clean; cd ..;\ done depend: ${IRCD_MAKEFILES} @for i in ${SUBDIRS}; do \ echo "Making dependencies in $$i..."; \ cd $$i; ${MAKE} depend; cd ..; \ done install: ${IRCD_MAKEFILES} test -d ${prefix} || mkdir ${prefix} @for i in ${SUBDIRS}; do \ echo "Installing $$i..."; \ cd $$i; ${MAKE} install; cd ..; \ done uninstall: ${IRCD_MAKEFILES} @for i in ${SUBDIRS}; do \ echo "Uninstalling $$i..."; \ cd $$i; ${MAKE} uninstall; cd ..; \ done ${srcdir}/aclocal.m4: acinclude.m4 cd ${srcdir} && aclocal ${srcdir}/configure: configure.in aclocal.m4 cd ${srcdir} && autoconf # autoheader might not change config.h.in, so touch a stamp file. ${srcdir}/config.h.in: stamp-h.in ${srcdir}/stamp-h.in: configure.in aclocal.m4 acconfig.h cd ${srcdir} && autoheader echo timestamp > ${srcdir}/stamp-h.in config.h: stamp-h stamp-h: config.h.in config.status ./config.status Makefile: Makefile.in config.status ./config.status doc/Makefile: doc/Makefile.in config.status ./config.status ircd/Makefile: ircd/Makefile.in config.status ./config.status ircd/test/Makefile: ircd/test/Makefile.in config.status ./config.status config.status: configure ./config.status --recheck # Some versions of 'make' do not support the .PHONY target : FORCE: # Indent all headers and source files: indent: @test "`indent --version`" = "GNU indent 2.1.0" || \ (echo "You need GNU indent 2.1.0; See doc/readme.indent" && exit -1); VERSION_CONTROL=none indent include/*.h ircd/*.c # do a cvs update update: cvs -z9 update ircd-ircu-2.10.12.10.dfsg1/INSTALL_FR0000644000175000017500000001262710066430741016261 0ustar madkissmadkissFichier d'installation en français par delete Mis à jour par delete L'UnderNet IRC daemon. L'installation de l'IRC daemon (ircd) existes dans les ordres que voici: 1) Déballer le module. 2) cd dans le répertoire. 3) `./configure' 4) `make config' 5) `make install' 1) Déballer le module. ==================== La voie recommendée pour avoir le module de l'ircu est d'utilisé CVS. CVS obtiend les marques améliore beaucoup moins douloureux et vous laisse obtenir le dernier module. 1.1) La première chose que vous avez besoin de faire est de vous identifiez envers le serveur. Avec la commande que voici: cvs -d :pserver:anonymous@cvs.undernet.org:/cvsroot/undernet-ircu login (Nous recommandons que vous coupez et collez la ligne ci-dessus pour l'utiliser :). Quand il insiste pour un mot de passe écriver 'anoncvs'. 1.2) Alors vous allez décider lesquels des versions vous voulez utiliser: stable - Ceci est la version recommandé. En cas de doute utiliser le! Pour avoir cette version, additioner "-r u2_10_11" à la ligne de commande du CVS. beta - Cette version subit le test avant d'être favorisée à ircu2.10. Il peut être buggé. L'utilisation sur le réseau de production d'undernet est interdite, excepté certains serveurs autorisés. La flag "-r" que vous avez besoin de regardez est documenté sur le site web du Coder Committee's, http://coder-com.undernet.org. alpha - C'est la version de développement. On ne le garantit pas de compiler, et devrait être considéré FORTEMENT instable. On ne le destine pas pour l'usage de production. Pour contrôler ce branchement, n'employez aucun flag "-r". Pour vérifier la version, tapez: cvs -d :pserver:anonymous@cvs.undernet.org:/cvsroot/undernet-ircu co -P ircu2.10 Les deux lignes ci-dessus ne devraient pas avoir une entrée entre eux. Si vous voulez utiliser un autre version, placez le flag "-r" approprié après le "co". Ceci créera un répertoire ircu2.10, et mettra tous les fichiers dedans. Pour avoir la dernière version, tapez "cvs update -dP". Pour plus d'information, regardez sur le site de coder-com à: http://coder-com.undernet.org/ La vieille (essayé et rectifiez) méthode qui fonctionne même lorsque le website n'est pas DoS'd (soupir) est inclue ci-dessous. En utilisant la méthode au-dessous vous n'avez qu'à taper "cvs update - dP" pour obtenir la dernière version. Le nom du module est quelque chose comme `ircu2.x.y.z.tgz ', où "x.y.z" est la version en cours (au moment de l'écriture nous avons ircu2.10.10.pl15.(development).tgz). Vous avez besoin de `gzip', du GNU, ouvrez la commande et uncompresser ce module. Vous pouvez télécharger ceci de chaque site ftp GNU pour presque n'importe quel système d'exploitation. Si vous avez un tar GNU, taper: tar -xzf ircu2.x.y.z.tgz où "ircu2.x.y.z.tgz" est le nom du package. Si sa ne marche pas, essayez: gzip -d ircu2.x.y.z.tgz | tar -xvf ircu2.x.y.z.tar Les deux méthodes ont comme conséquence un répertoire "ircu2.x.y.z" dans votre répertoire actuel. 2) cd dans la directory de base. ================================ Faites à ce répertoire votre répertoire actuel en tapant: cd ircu2.x.y.z ou ircu2.10 si vous utilisé cvs. Là où "ircu2.x.y.z" est le nom du répertoire dézippé. 3) "./configure" ================= Ceci produira le 'config/setup.h', votre configuration dépend du système d'exploitation. Si ceci produit un message une erreur tel que "Permission Denied", alors essai avec "chmod a+x ./configure" pour avoir la permission d'excuter le fichier. Pour plus d'information sur la commande configure, tapez "./configure --help". 4) "make" ========= Tapez: make dans le répertoire de base. Il devrait compiler sans erreurs ou avertissements. Veuillez expédier n'importe quel problème aux dévelopeurs, mais seulement après que vous vous êtes assurés ce n'est pas une erreur de vous-même. Si vous voulez que votre système d'exploitation soit supporté dans de futures versions, faite une connexion qui fixe réellement le problème. 5) "make install" ================= Type: make install Ceci devrait installer l'ircd et la dir man. Veuillez revérifier les permissions du binaire. Naturellement, vous avez besoin d'un ircd.conf syntactiquement correct dans DPATH. Voyez les Docs pour certaine information sur ceci. Créez également un ircd.motd avec le texte de votre MOTD. Et créez finalement un remote.motd avec trois lignes de texte comme MOTD à distance. Encore, tous ces fichiers devraient être lisibles par l'ircd, et les fichiers journaux devraient être écrivable. En cas de problème. ====================== Si vous avez des problèmes à configurer le serveur vous pourriez considérer d'installer GNU dans votre VOIE D'ACCÈS. Dans certains cas un cerveau-mort /bin/sh pose le problème, dans ce cas je suggère d'installer le "bash" et de l'utiliser comme (as sh - > bash). En conclusion, tout autre problèmes de compilent devrait être résolu quand vous installez le GCC. Si vous avez des problemes avec le startage du ircd, executer "./configure" encore et mettez la commande "--enable-debug". Recompiler l'ircd, et executer-le avec: ircd -t -x9 Cela va écrire un debug output a votre écrant, probablement avec la cause du pourquoi il ne veut pas starter. N'UTILISEZ PAS UN SERVEUR AVEC LA MISE AU POINT PERMISE SUR UN RÉSEAU DE PRODUCTION. Faire ainsi est un risque d'intimité grave. Si quelque chose ne marche pas, envoyer un e-mail à coder-com@undernet.org ircd-ircu-2.10.12.10.dfsg1/.indent.pro0000644000175000017500000000141707014163752016721 0ustar madkissmadkiss--leave-preprocessor-space --dont-break-procedure-type --no-space-after-function-call-names --brace-indent0 --indent-level2 --dont-line-up-parentheses --continuation-indentation4 --case-indentation2 --no-space-after-casts --blank-lines-after-procedures --no-blank-lines-after-declarations --braces-on-struct-decl-line --paren-indentation0 --case-brace-indentation0 --line-length80 --declaration-indentation4 -T size_t -T aClass -T aClient -T aServer -T anUser -T aChannel -T Mode -T aConfItem -T aMessage -T aMessageTree -T aGline -T aListingArgs -T snomask_t -T n_short -T n_long -T n_time -T u_char -T u_short -T u_long -T u_int -T dbuf -T dbufbuf -T aHashEntry -T Link -T Dlink -T VOIDSIG -T aHostent -T ResRQ -T aCache -T CacheTable -T cainfo -T reinfo -T RETSIGTYPE -T OPT_TYPE ircd-ircu-2.10.12.10.dfsg1/install-sh0000755000175000017500000001272107275610715016651 0ustar madkissmadkiss#! /bin/sh # # install - install a program, script, or datafile # This comes from X11R5 (mit/util/scripts/install.sh). # # Copyright 1991 by the Massachusetts Institute of Technology # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that # the above copyright notice appear in all copies and that both that # copyright notice and this permission notice appear in supporting # documentation, and that the name of M.I.T. not be used in advertising or # publicity pertaining to distribution of the software without specific, # written prior permission. M.I.T. makes no representations about the # suitability of this software for any purpose. It is provided "as is" # without express or implied warranty. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd="$cpprog" shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd="$stripprog" shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "install: no input file specified" exit 1 else true fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d $dst ]; then instcmd=: else instcmd=mkdir fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f $src -o -d $src ] then true else echo "install: $src does not exist" exit 1 fi if [ x"$dst" = x ] then echo "install: no destination specified" exit 1 else true fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d $dst ] then dst="$dst"/`basename $src` else true fi fi ## this sed command emulates the dirname command dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-${defaultIFS}}" oIFS="${IFS}" # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` IFS="${oIFS}" pathcomp='' while [ $# -ne 0 ] ; do pathcomp="${pathcomp}${1}" shift if [ ! -d "${pathcomp}" ] ; then $mkdirprog "${pathcomp}" else true fi pathcomp="${pathcomp}/" done fi if [ x"$dir_arg" != x ] then $doit $instcmd $dst && if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename $dst` else dstfile=`basename $dst $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename $dst` else true fi # Make a temp file name in the proper directory. dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name $doit $instcmd $src $dsttmp && trap "rm -f ${dsttmp}" 0 && # and set any options; do chmod last to preserve setuid bits # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && # Now rename the file to the real destination. $doit $rmcmd -f $dstdir/$dstfile && $doit $mvcmd $dsttmp $dstdir/$dstfile fi && exit 0 ircd-ircu-2.10.12.10.dfsg1/acinclude.m40000644000175000017500000001554310225074332017027 0ustar madkissmadkissdnl dnl Macro: unet_NONBLOCKING dnl dnl Check whether we have posix, bsd or sysv non-blocking sockets and dnl define respectively NBLOCK_POSIX, NBLOCK_BSD or NBLOCK_SYSV. dnl AC_DEFUN(unet_NONBLOCKING, [dnl Do we have posix, bsd or sysv non-blocking stuff ? AC_CACHE_CHECK([for posix non-blocking], unet_cv_sys_nonblocking_posix, [AC_TRY_RUN([#include #include #include #include #include #include $ac_cv_type_signal alarmed() { exit(1); } int main(void) { char b[12]; struct sockaddr x; size_t l = sizeof(x); int f = socket(AF_INET, SOCK_DGRAM, 0); if (f >= 0 && !(fcntl(f, F_SETFL, O_NONBLOCK))) { signal(SIGALRM, alarmed); alarm(2); recvfrom(f, b, 12, 0, &x, &l); alarm(0); exit(0); } exit(1); }], unet_cv_sys_nonblocking_posix=yes, unet_cv_sys_nonblocking_posix=no)]) if test $unet_cv_sys_nonblocking_posix = yes; then AC_DEFINE([NBLOCK_POSIX],,[Define if you have POSIX non-blocking sockets.]) else AC_CACHE_CHECK([for bsd non-blocking], unet_cv_sys_nonblocking_bsd, [AC_TRY_RUN([#include #include #include #include #include #include $ac_cv_type_signal alarmed() { exit(1); } int main(void) { char b[12]; struct sockaddr x; size_t l = sizeof(x); int f = socket(AF_INET, SOCK_DGRAM, 0); if (f >= 0 && !(fcntl(f, F_SETFL, O_NDELAY))) { signal(SIGALRM, alarmed); alarm(2); recvfrom(f, b, 12, 0, &x, &l); alarm(0); exit(0); } exit(1); }], unet_cv_sys_nonblocking_bsd=yes, unet_cv_sys_nonblocking_bsd=no)]) if test $unet_cv_sys_nonblocking_bsd = yes; then AC_DEFINE([NBLOCK_BSD],,[Define if you have BSD non-blocking sockets.]) else AC_DEFINE([NBLOCK_SYSV],,[Define if you have SysV non-blocking sockets.]) fi fi]) dnl dnl Macro: unet_SIGNALS dnl dnl Check if we have posix signals, reliable bsd signals or dnl unreliable sysv signals and define respectively POSIX_SIGNALS, dnl BSD_RELIABLE_SIGNALS or SYSV_UNRELIABLE_SIGNALS. dnl AC_DEFUN(unet_SIGNALS, [dnl Do we have posix signals, reliable bsd signals or unreliable sysv signals ? AC_CACHE_CHECK([for posix signals], unet_cv_sys_signal_posix, [AC_TRY_COMPILE([#include ], [sigaction(SIGTERM, (struct sigaction *)0L, (struct sigaction *)0L)], unet_cv_sys_signal_posix=yes, unet_cv_sys_signal_posix=no)]) if test $unet_cv_sys_signal_posix = yes; then AC_DEFINE([POSIX_SIGNALS],,[Define if you have POSIX signals.]) else AC_CACHE_CHECK([for bsd reliable signals], unet_cv_sys_signal_bsd, [AC_TRY_RUN([#include int calls = 0; $ac_cv_type_signal handler() { if (calls) return; calls++; kill(getpid(), SIGTERM); sleep(1); } int main(void) { signal(SIGTERM, handler); kill(getpid(), SIGTERM); exit (0); }], unet_cv_sys_signal_bsd=yes, unet_cv_sys_signal_bsd=no)]) if test $unet_cv_sys_signal_bsd = yes; then AC_DEFINE([BSD_RELIABLE_SIGNALS],,[Define if you have (reliable) BSD signals.]) else AC_DEFINE([SYSV_UNRELIABLE_SIGNALS],,[Define if you have (unreliable) SysV signals.]) fi fi]) dnl dnl Macro: unet_CHECK_TYPE_SIZES dnl dnl Check the size of several types and define a valid int16_t and int32_t. dnl AC_DEFUN(unet_CHECK_TYPE_SIZES, [dnl Check type sizes AC_CHECK_SIZEOF(short) AC_CHECK_SIZEOF(int) AC_CHECK_SIZEOF(long) AC_CHECK_SIZEOF(void *) AC_CHECK_SIZEOF(int64_t) AC_CHECK_SIZEOF(long long) if test "$ac_cv_sizeof_int" = 2 ; then AC_CHECK_TYPE(int16_t, int) AC_CHECK_TYPE(uint16_t, unsigned int) elif test "$ac_cv_sizeof_short" = 2 ; then AC_CHECK_TYPE(int16_t, short) AC_CHECK_TYPE(uint16_t, unsigned short) else AC_MSG_ERROR([Cannot find a type with size of 16 bits]) fi if test "$ac_cv_sizeof_int" = 4 ; then AC_CHECK_TYPE(int32_t, int) AC_CHECK_TYPE(uint32_t, unsigned int) elif test "$ac_cv_sizeof_short" = 4 ; then AC_CHECK_TYPE(int32_t, short) AC_CHECK_TYPE(uint32_t, unsigned short) elif test "$ac_cv_sizeof_long" = 4 ; then AC_CHECK_TYPE(int32_t, long) AC_CHECK_TYPE(uint32_t, unsigned long) else AC_MSG_ERROR([Cannot find a type with size of 32 bits]) fi if test "$ac_cv_sizeof_int64_t" = 8 ; then AC_CHECK_TYPE(int64_t) AC_CHECK_TYPE(uint64_t) elif test "$ac_cv_sizeof_long_long" = 8 ; then AC_CHECK_TYPE(int64_t, long long) AC_CHECK_TYPE(uint64_t, unsigned long long) else AC_MSG_ERROR([Cannot find a type with size of 64 bits]) fi]) dnl Written by John Hawkinson . This code is in the Public dnl Domain. dnl dnl This test is for network applications that need socket() and dnl gethostbyname() -ish functions. Under Solaris, those applications need to dnl link with "-lsocket -lnsl". Under IRIX, they should *not* link with dnl "-lsocket" because libsocket.a breaks a number of things (for instance: dnl gethostbyname() under IRIX 5.2, and snoop sockets under most versions of dnl IRIX). dnl dnl Unfortunately, many application developers are not aware of this, and dnl mistakenly write tests that cause -lsocket to be used under IRIX. It is dnl also easy to write tests that cause -lnsl to be used under operating dnl systems where neither are necessary (or useful), such as SunOS 4.1.4, which dnl uses -lnsl for TLI. dnl dnl This test exists so that every application developer does not test this in dnl a different, and subtly broken fashion. dnl dnl It has been argued that this test should be broken up into two seperate dnl tests, one for the resolver libraries, and one for the libraries necessary dnl for using Sockets API. Unfortunately, the two are carefully intertwined and dnl allowing the autoconf user to use them independantly potentially results in dnl unfortunate ordering dependancies -- as such, such component macros would dnl have to carefully use indirection and be aware if the other components were dnl executed. Since other autoconf macros do not go to this trouble, and almost dnl no applications use sockets without the resolver, this complexity has not dnl been implemented. dnl dnl The check for libresolv is in case you are attempting to link statically dnl and happen to have a libresolv.a lying around (and no libnsl.a). dnl AC_DEFUN(AC_LIBRARY_NET, [ # Most operating systems have gethostbyname() in the default searched # libraries (i.e. libc): AC_CHECK_FUNC(gethostbyname, , # Some OSes (eg. Solaris) place it in libnsl: AC_CHECK_LIB(nsl, gethostbyname, , # Some strange OSes (SINIX) have it in libsocket: AC_CHECK_LIB(socket, gethostbyname, , # Unfortunately libsocket sometimes depends on libnsl. # AC_CHECK_LIB's API is essentially broken so the following # ugliness is necessary: AC_CHECK_LIB(socket, gethostbyname, LIBS="-lsocket -lnsl $LIBS", AC_CHECK_LIB(resolv, gethostbyname), -lnsl) ) ) ) AC_CHECK_FUNC(socket, , AC_CHECK_LIB(socket, socket, , AC_CHECK_LIB(socket, socket, LIBS="-lsocket -lnsl $LIBS", , -lnsl))) ]) ircd-ircu-2.10.12.10.dfsg1/Doxyfile0000644000175000017500000012436310126675366016363 0ustar madkissmadkiss# Doxyfile 1.3.4 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project # # All text after a hash (#) is considered a comment and will be ignored # The format is: # TAG = value [value, ...] # For lists items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (" ") #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = "Undernet IRC Daemon" # The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or # if some version control system is used. PROJECT_NUMBER = "$Name: u2_10_12_09 $" # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. OUTPUT_DIRECTORY = doc/doxygen # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # The default language is English, other supported languages are: # Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, # Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en # (Japanese with English messages), Korean, Norwegian, Polish, Portuguese, # Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian. OUTPUT_LANGUAGE = English # This tag can be used to specify the encoding used in the generated output. # The encoding is not always determined by the language that is chosen, # but also whether or not the output is meant for Windows or non-Windows users. # In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES # forces the Windows encoding (this is the default for the Windows binary), # whereas setting the tag to NO uses a Unix-style encoding (the default for # all platforms other than Windows). USE_WINDOWS_ENCODING = NO # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will # include brief member descriptions after the members that are listed in # the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend # the brief description of a member or function before the detailed description. # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = YES # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited # members of a class in the documentation of that class as if those members were # ordinary class members. Constructors, destructors and assignment operators of # the base classes will not be shown. INLINE_INHERITED_MEMB = NO # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full # path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = NO # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag # can be used to strip a user-defined part of the path. Stripping is # only done if one of the specified strings matches the left-hand part of # the path. It is allowed to use relative paths in the argument list. STRIP_FROM_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter # (but less readable) file names. This can be useful is your file systems # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen # will interpret the first line (until the first dot) of a JavaDoc-style # comment as the brief description. If set to NO, the JavaDoc # comments will behave just like the Qt-style comments (thus requiring an # explict @brief command for a brief description. JAVADOC_AUTOBRIEF = YES # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen # treat a multi-line C++ special comment block (i.e. a block of //! or /// # comments) as a brief description. This used to be the default behaviour. # The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = NO # If the DETAILS_AT_TOP tag is set to YES then Doxygen # will output the detailed description near the top, like JavaDoc. # If set to NO, the detailed description appears after the member # documentation. DETAILS_AT_TOP = NO # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented # member inherits the documentation from any documented member that it # reimplements. INHERIT_DOCS = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES, then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 8 # This tag can be used to specify a number of aliases that acts # as commands in the documentation. An alias has the form "name=value". # For example adding "sideeffect=\par Side Effects:\n" will allow you to # put the command \sideeffect (or @sideeffect) in the documentation, which # will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. ALIASES = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources # only. Doxygen will then generate output that is more tailored for C. # For instance, some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = YES # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources # only. Doxygen will then generate output that is more tailored for Java. # For instance, namespaces will be presented as packages, qualified scopes # will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO # Set the SUBGROUPING tag to YES (the default) to allow class member groups of # the same type (for instance a group of public functions) to be put as a # subgroup of that type (e.g. under the Public Functions section). Set it to # NO to prevent subgrouping. Alternatively, this can be done per class using # the \nosubgrouping command. SUBGROUPING = YES #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in # documentation are documented, even if no documentation was available. # Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = YES # If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = NO # If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = YES # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) # defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = YES # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all # undocumented members of documented classes, files or namespaces. # If set to NO (the default) these members will be included in the # various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. # If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all # friend (class|struct|union) declarations. # If set to NO (the default) these declarations will be included in the # documentation. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any # documentation blocks found inside the body of a function. # If set to NO (the default) these blocks will be appended to the # function's detailed documentation block. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation # that is typed after a \internal command is included. If the tag is set # to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate # file names in lower-case letters. If set to YES upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # users are advised to set this option to NO. CASE_SENSE_NAMES = YES # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen # will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen # will put a list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen # will sort the (detailed) documentation of file and class members # alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = YES # The GENERATE_TODOLIST tag can be used to enable (YES) or # disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or # disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or # disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or # disable (NO) the deprecated list. This list is created by putting # \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines # the initial value of a variable or define consists of for it to appear in # the documentation. If the initializer consists of more lines than specified # here it will be hidden. Use a value of 0 to hide initializers completely. # The appearance of the initializer of individual variables and defines in the # documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated # at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = YES # The WARNINGS tag can be used to turn on/off the warning messages that are # generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings # for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = YES # If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as not documenting some # parameters in a documented function, or documenting parameters that # don't exist or using markup commands wrongly. WARN_IF_DOC_ERROR = YES # The WARN_FORMAT tag determines the format of the warning messages that # doxygen can produce. The string should contain the $file, $line, and $text # tags, which will be replaced by the file and line number from which the # warning originated and the warning text. WARN_FORMAT = "$file:$line: $text" # The WARN_LOGFILE tag can be used to specify a file to which warning # and error messages should be written. If left blank the output is written # to stderr. WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag can be used to specify the files and/or directories that contain # documented source files. You may enter file names like "myfile.cpp" or # directories like "/usr/src/myproject". Separate the files or directories # with spaces. INPUT = ircd include # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank the following patterns are tested: # *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp # *.h++ *.idl *.odl *.cs *.php *.php3 *.inc FILE_PATTERNS = # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = YES # The EXCLUDE tag can be used to specify files and/or directories that should # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories # that are symbolic links (a Unix filesystem feature) are excluded from the input. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. EXCLUDE_PATTERNS = # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see # the \include command). EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank all files are included. EXAMPLE_PATTERNS = # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude # commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or # directories that contain image that are included in the documentation (see # the \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command , where # is the value of the INPUT_FILTER tag, and is the name of an # input file. Doxygen will then use the output that the filter program writes # to standard output. INPUT_FILTER = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES). FILTER_SOURCE_FILES = NO #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will # be generated. Documented entities will be cross-referenced with these sources. SOURCE_BROWSER = YES # Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct # doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. STRIP_CODE_COMMENTS = NO # If the REFERENCED_BY_RELATION tag is set to YES (the default) # then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = YES # If the REFERENCES_RELATION tag is set to YES (the default) # then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = YES # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen # will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index # of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = YES # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 5 # In case all classes in a project start with a common prefix, all # classes will be put under the same header in the alphabetical index. # The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for # each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a personal HTML header for # each generated HTML page. If it is left blank doxygen will generate a # standard header. HTML_HEADER = # The HTML_FOOTER tag can be used to specify a personal HTML footer for # each generated HTML page. If it is left blank doxygen will generate a # standard footer. HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading # style sheet that is used by each HTML page. It can be used to # fine-tune the look of the HTML output. If the tag is left blank doxygen # will generate a default style sheet HTML_STYLESHEET = # If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, # files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used. HTML_ALIGN_MEMBERS = YES # If the GENERATE_HTMLHELP tag is set to YES, additional index files # will be generated that can be used as input for tools like the # Microsoft HTML help workshop to generate a compressed HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can # be used to specify the file name of the resulting .chm file. You # can add a path in front of the file if the result should not be # written to the html output dir. CHM_FILE = # If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can # be used to specify the location (absolute path including file name) of # the HTML help compiler (hhc.exe). If non-empty doxygen will try to run # the HTML help compiler on the generated index.hhp. HHC_LOCATION = # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag # controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = NO # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag # controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the HTML help documentation and to the tree view. TOC_EXPAND = NO # The DISABLE_INDEX tag can be used to turn on/off the condensed index at # top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. DISABLE_INDEX = NO # This tag can be used to set the number of enum values (range [1..20]) # that doxygen will group on one line in the generated HTML documentation. ENUM_VALUES_PER_LINE = 4 # If the GENERATE_TREEVIEW tag is set to YES, a side panel will be # generated containing a tree-like index structure (just like the one that # is generated for HTML Help). For this to work a browser that supports # JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, # Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are # probably better off using the HTML help feature. GENERATE_TREEVIEW = YES # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be # used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 250 #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = NO # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. If left blank `latex' will be used as the default command name. LATEX_CMD_NAME = latex # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to # generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = makeindex # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact # LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO # The PAPER_TYPE tag can be used to set the paper type that is used # by the printer. Possible values are: a4, a4wide, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = a4wide # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. EXTRA_PACKAGES = # The LATEX_HEADER tag can be used to specify a personal LaTeX header for # the generated latex document. The header should contain everything until # the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! LATEX_HEADER = # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated # is prepared for conversion to pdf (using ps2pdf). The pdf file will # contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = YES # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of # plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = YES # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. # command to the generated LaTeX files. This will instruct LaTeX to keep # running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = YES # If LATEX_HIDE_INDICES is set to YES then doxygen will not # include the index chapters (such as File Index, Compound Index, etc.) # in the output. LATEX_HIDE_INDICES = NO #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output # The RTF output is optimised for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf # If the COMPACT_RTF tag is set to YES Doxygen generates more compact # RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated # will contain hyperlink fields. The RTF file will # contain links (just like the HTML output) instead of page references. # This makes the output suitable for online browsing using WORD or other # programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO # Load stylesheet definitions from file. Syntax is similar to doxygen's # config file, i.e. a series of assigments. You only have to provide # replacements, missing definitions are set to their default value. RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- # If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = NO # The MAN_OUTPUT tag is used to specify where the man pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man # The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 # If the MAN_LINKS tag is set to YES and Doxygen generates man output, # then it will generate one additional man file for each entity # documented in the real man page(s). These additional files # only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = NO #--------------------------------------------------------------------------- # configuration options related to the XML output #--------------------------------------------------------------------------- # If the GENERATE_XML tag is set to YES Doxygen will # generate an XML file that captures the structure of # the code including all documentation. Note that this # feature is still experimental and incomplete at the # moment. GENERATE_XML = NO # The XML_OUTPUT tag is used to specify where the XML pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `xml' will be used as the default path. XML_OUTPUT = xml # The XML_SCHEMA tag can be used to specify an XML schema, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_SCHEMA = # The XML_DTD tag can be used to specify an XML DTD, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_DTD = #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- # If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will # generate an AutoGen Definitions (see autogen.sf.net) file # that captures the structure of the code including all # documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO #--------------------------------------------------------------------------- # configuration options related to the Perl module output #--------------------------------------------------------------------------- # If the GENERATE_PERLMOD tag is set to YES Doxygen will # generate a Perl module file that captures the structure of # the code including all documentation. Note that this # feature is still experimental and incomplete at the # moment. GENERATE_PERLMOD = NO # If the PERLMOD_LATEX tag is set to YES Doxygen will generate # the necessary Makefile rules, Perl scripts and LaTeX code to be able # to generate PDF and DVI output from the Perl module output. PERLMOD_LATEX = NO # If the PERLMOD_PRETTY tag is set to YES the Perl module output will be # nicely formatted so it can be parsed by a human reader. This is useful # if you want to understand what is going on. On the other hand, if this # tag is set to NO the size of the Perl module output will be much smaller # and Perl will parse it just the same. PERLMOD_PRETTY = YES # The names of the make variables in the generated doxyrules.make file # are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. # This is useful so different doxyrules.make files included by the same # Makefile don't overwrite each other's variables. PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will # evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro # names in the source code. If set to NO (the default) only conditional # compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = NO # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES # then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_PREDEFINED tags. EXPAND_ONLY_PREDEF = NO # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. SEARCH_INCLUDES = YES # The INCLUDE_PATH tag can be used to specify one or more directories that # contain include files that are not input files but should be processed by # the preprocessor. INCLUDE_PATH = # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the # directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. INCLUDE_FILE_PATTERNS = # The PREDEFINED tag can be used to specify one or more macro names that # are defined before the preprocessor is started (similar to the -D option of # gcc). The argument of the tag is a list of macros of the form: name # or name=definition (no spaces). If the definition and the = are # omitted =1 is assumed. PREDEFINED = DEBUGMODE FORCEINLINE IPV6 # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. # The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition. EXPAND_AS_DEFINED = # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then # doxygen's preprocessor will remove all function-like macros that are alone # on a line, have an all uppercase name, and do not end with a semicolon. Such # function macros are typically used for boiler-plate code, and will confuse the # parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- # Configuration::addtions related to external references #--------------------------------------------------------------------------- # The TAGFILES option can be used to specify one or more tagfiles. # Optionally an initial location of the external documentation # can be added for each tagfile. The format of a tag file without # this location is as follows: # TAGFILES = file1 file2 ... # Adding location for the tag files is done as follows: # TAGFILES = file1=loc1 "file2 = loc2" ... # where "loc1" and "loc2" can be relative or absolute paths or # URLs. If a location is present for each tag, the installdox tool # does not have to be run to correct the links. # Note that each tag file must have a unique name # (where the name does NOT include the path) # If a tag file is not located in the directory in which doxygen # is run, you must also specify the path to the tagfile here. TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. GENERATE_TAGFILE = ircu.tags # If the ALLEXTERNALS tag is set to YES all external classes will be listed # in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed # in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES # The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base or # super classes. Setting the tag to NO turns the diagrams off. Note that this # option is superceded by the HAVE_DOT option below. This is only a fallback. It is # recommended to install and use dot, since it yields more powerful graphs. CLASS_DIAGRAMS = NO # If set to YES, the inheritance and collaboration graphs will hide # inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = NO # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is # available from the path. This tool is part of Graphviz, a graph visualization # toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = NO # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect inheritance relations. Setting this tag to YES will force the # the CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = YES # If the UML_LOOK tag is set to YES doxygen will generate inheritance and # collaboration diagrams in a style similiar to the OMG's Unified Modeling # Language. UML_LOOK = YES # If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = NO # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT # tags are set to YES then doxygen will generate a graph for each documented # file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and # HAVE_DOT tags are set to YES then doxygen will generate a graph for each # documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES # If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will # generate a call dependency graph for every global function or class method. # Note that enabling this option will significantly increase the time of a run. # So in most cases it will be better to enable call graphs for selected # functions only using the \callgraph command. CALL_GRAPH = YES # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are png, jpg, or gif # If left blank png will be used. DOT_IMAGE_FORMAT = png # The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found on the path. DOT_PATH = # The DOTFILE_DIRS tag can be used to specify one or more directories that # contain dot files that are included in the documentation (see the # \dotfile command). DOTFILE_DIRS = # The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width # (in pixels) of the graphs generated by dot. If a graph becomes larger than # this value, doxygen will try to truncate the graph, so that it fits within # the specified constraint. Beware that most browsers cannot cope with very # large images. MAX_DOT_GRAPH_WIDTH = 1024 # The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height # (in pixels) of the graphs generated by dot. If a graph becomes larger than # this value, doxygen will try to truncate the graph, so that it fits within # the specified constraint. Beware that most browsers cannot cope with very # large images. MAX_DOT_GRAPH_HEIGHT = 1024 # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the # graphs generated by dot. A depth value of 3 means that only nodes reachable # from the root by following a path via at most 3 edges will be shown. Nodes that # lay further from the root node will be omitted. Note that setting this option to # 1 or 2 may greatly reduce the computation time needed for large code bases. Also # note that a graph may be further truncated if the graph's image dimensions are # not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH and MAX_DOT_GRAPH_HEIGHT). # If 0 is used for the depth value (the default), the graph is not depth-constrained. MAX_DOT_GRAPH_DEPTH = 0 # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will # remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES #--------------------------------------------------------------------------- # Configuration::addtions related to the search engine #--------------------------------------------------------------------------- # The SEARCHENGINE tag specifies whether or not a search engine should be # used. If set to NO the values of all tags below this one will be ignored. SEARCHENGINE = NO ircd-ircu-2.10.12.10.dfsg1/patches/0000755000175000017500000000000010573147657016276 5ustar madkissmadkissircd-ircu-2.10.12.10.dfsg1/patches/diffs/0000755000175000017500000000000010561247166017362 5ustar madkissmadkissircd-ircu-2.10.12.10.dfsg1/patches/diffs/lazy.diff0000644000175000017500000007661707455563043021217 0ustar madkissmadkissIndex: include/channel.h =================================================================== RCS file: /home/coder-com/cvs/ircu2.10/include/channel.h,v retrieving revision 1.32 diff -u -r1.32 channel.h --- include/channel.h 2002/04/03 21:16:01 1.32 +++ include/channel.h 2002/04/12 13:47:52 @@ -95,6 +95,8 @@ #define MODE_BURSTADDED 0x80000 /* channel was created by a BURST */ #define MODE_UPASS 0x100000 #define MODE_APASS 0x200000 +#define MODE_EMPTY 0x400000 /* LazyLeaf: no more locals, remove channel asap */ + /* * mode flags which take another parameter (With PARAmeterS) */ @@ -222,15 +224,20 @@ time_t creationtime; time_t topic_time; unsigned int users; + unsigned int locals; struct Membership* members; struct SLink* invites; struct SLink* banlist; struct Mode mode; char topic[TOPICLEN + 1]; char topic_nick[NICKLEN + 1]; - char chname[1]; + unsigned long ll_bits; /* LazyLeaf */ + char chname[1]; /* This *must* be last */ }; +#define LeafKnowsChannel(c,x) (cli_serv(c)->ll_mask & (x)->ll_bits) +#define LL_ALL (~0UL) + struct ListingArgs { time_t max_time; time_t min_time; @@ -350,6 +357,7 @@ extern int is_zombie(struct Client *cptr, struct Channel *chptr); extern int has_voice(struct Client *cptr, struct Channel *chptr); extern void send_channel_modes(struct Client *cptr, struct Channel *chptr); +extern void ll_send_channel(struct Client *cptr, struct Channel *chptr); extern char *pretty_mask(char *mask); extern void del_invite(struct Client *cptr, struct Channel *chptr); extern void list_next_channels(struct Client *cptr, int nr); Index: include/client.h =================================================================== RCS file: /home/coder-com/cvs/ircu2.10/include/client.h,v retrieving revision 1.26 diff -u -r1.26 client.h --- include/client.h 2002/04/05 11:36:58 1.26 +++ include/client.h 2002/04/12 13:47:52 @@ -369,6 +369,7 @@ #define FLAGS_DOID 0x00040000 /* I-lines say must use ident return */ #define FLAGS_NONL 0x00080000 /* No \n in buffer */ #define FLAGS_TS8 0x00100000 /* Why do you want to know? */ +#define FLAGS_LAZY 0x00200000 /* LazyLeaf */ #define FLAGS_MAP 0x00800000 /* Show server on the map */ #define FLAGS_JUNCTION 0x01000000 /* Junction causing the net.burst */ #define FLAGS_DEAF 0x02000000 /* Makes user deaf */ @@ -413,6 +414,7 @@ #define IsAccount(x) (cli_flags(x) & FLAGS_ACCOUNT) #define IsHiddenHost(x) (cli_flags(x) & FLAGS_HIDDENHOST) #define HasHiddenHost(x) (IsAccount(x) && IsHiddenHost(x)) +#define IsLazy(x) (cli_flags(x) & FLAGS_LAZY) #define IsPrivileged(x) (IsAnOper(x) || IsServer(x)) @@ -435,6 +437,7 @@ #define SetService(x) (cli_flags(x) |= FLAGS_SERVICE) #define SetAccount(x) (cli_flags(x) |= FLAGS_ACCOUNT) #define SetHiddenHost(x) (cli_flags(x) |= FLAGS_HIDDENHOST) +#define SetLazy(x) (cli_flags(x) |= FLAGS_LAZY) #define ClearAccess(x) (cli_flags(x) &= ~FLAGS_CHKACCESS) #define ClearBurst(x) (cli_flags(x) &= ~FLAGS_BURST) @@ -450,6 +453,7 @@ #define ClearWallops(x) (cli_flags(x) &= ~FLAGS_WALLOP) #define ClearServNotice(x) (cli_flags(x) &= ~FLAGS_SERVNOTICE) #define ClearHiddenHost(x) (cli_flags(x) &= ~FLAGS_HIDDENHOST) +#define ClearLazy(x) (cli_flags(x) &= ~FLAGS_LAZY) /* free flags */ #define FREEFLAG_SOCKET 0x0001 /* socket needs to be freed */ Index: include/handlers.h =================================================================== RCS file: /home/coder-com/cvs/ircu2.10/include/handlers.h,v retrieving revision 1.16 diff -u -r1.16 handlers.h --- include/handlers.h 2002/03/19 22:03:36 1.16 +++ include/handlers.h 2002/04/12 13:47:52 @@ -183,6 +183,7 @@ extern int ms_gline(struct Client*, struct Client*, int, char*[]); extern int ms_info(struct Client*, struct Client*, int, char*[]); extern int ms_invite(struct Client*, struct Client*, int, char*[]); +extern int ms_forget(struct Client*, struct Client*, int, char*[]); extern int ms_join(struct Client*, struct Client*, int, char*[]); extern int ms_jupe(struct Client*, struct Client*, int, char*[]); extern int ms_kick(struct Client*, struct Client*, int, char*[]); Index: include/ircd_features.h =================================================================== RCS file: /home/coder-com/cvs/ircu2.10/include/ircd_features.h,v retrieving revision 1.15 diff -u -r1.15 ircd_features.h --- include/ircd_features.h 2002/04/03 15:23:47 1.15 +++ include/ircd_features.h 2002/04/12 13:47:52 @@ -37,6 +37,7 @@ FEAT_KILL_IPMISMATCH, FEAT_IDLE_FROM_MSG, FEAT_HUB, + FEAT_LAZY_LEAF, FEAT_WALLOPS_OPER_ONLY, FEAT_NODNS, FEAT_RANDOM_SEED, Index: include/msg.h =================================================================== RCS file: /home/coder-com/cvs/ircu2.10/include/msg.h,v retrieving revision 1.12 diff -u -r1.12 msg.h --- include/msg.h 2002/02/14 00:20:40 1.12 +++ include/msg.h 2002/04/12 13:47:52 @@ -330,6 +330,10 @@ #define TOK_ACCOUNT "AC" #define CMD_ACCOUNT MSG_ACCOUNT, TOK_ACCOUNT +#define MSG_FORGET "FORGET" /* FORGET */ +#define TOK_FORGET "FO" +#define CMD_FORGET MSG_FORGET, TOK_FORGET + #define MSG_POST "POST" /* POST */ #define TOK_POST "POST" Index: include/s_serv.h =================================================================== RCS file: /home/coder-com/cvs/ircu2.10/include/s_serv.h,v retrieving revision 1.6 diff -u -r1.6 s_serv.h --- include/s_serv.h 2001/06/08 23:12:16 1.6 +++ include/s_serv.h 2002/04/12 13:47:52 @@ -12,9 +12,11 @@ struct ConfItem; struct Client; +struct Channel; extern unsigned int max_connection_count; extern unsigned int max_client_count; +extern unsigned long GlobalLeafBits; /* * Prototypes @@ -24,5 +26,8 @@ extern int a_kills_b_too(struct Client *a, struct Client *b); extern int server_estab(struct Client *cptr, struct ConfItem *aconf); +extern int ll_add(struct Client *cptr); +extern void ll_remove(struct Client *cptr); +extern void ll_check_channel(struct Client *cptr, struct Channel *chptr); #endif /* INCLUDED_s_serv_h */ Index: include/send.h =================================================================== RCS file: /home/coder-com/cvs/ircu2.10/include/send.h,v retrieving revision 1.17 diff -u -r1.17 send.h --- include/send.h 2002/02/14 00:20:41 1.17 +++ include/send.h 2002/04/12 13:47:52 @@ -47,6 +47,12 @@ const char *tok, struct Client *one, const char *pattern, ...); +/* Same as above, but only when the server's ll_mask matches */ +extern void sendcmdto_mask_butone(struct Client *from, const char *cmd, + const char *tok, unsigned long ll_mask, + struct Client *one, + const char *pattern, ...); + /* Send command to all channels user is on */ extern void sendcmdto_common_channels_butone(struct Client *from, const char *cmd, Index: include/struct.h =================================================================== RCS file: /home/coder-com/cvs/ircu2.10/include/struct.h,v retrieving revision 1.3 diff -u -r1.3 struct.h --- include/struct.h 2002/02/14 00:20:41 1.3 +++ include/struct.h 2002/04/12 13:47:52 @@ -52,6 +52,7 @@ unsigned short nn_last; /* Last numeric nick for p9 servers only */ unsigned int nn_mask; /* [Remote] FD_SETSIZE - 1 */ char nn_capacity[4]; /* numeric representation of server capacity */ + unsigned long ll_mask; /* LazyLeaf mask */ char *last_error_msg; /* Allocated memory with last message receive with an ERROR */ char by[NICKLEN + 1]; Index: ircd/Makefile.in =================================================================== RCS file: /home/coder-com/cvs/ircu2.10/ircd/Makefile.in,v retrieving revision 1.43 diff -u -r1.43 Makefile.in --- ircd/Makefile.in 2002/04/03 21:16:01 1.43 +++ ircd/Makefile.in 2002/04/12 13:47:52 @@ -120,6 +120,7 @@ m_die.c \ m_endburst.c \ m_error.c \ + m_forget.c \ m_get.c \ m_gline.c \ m_help.c \ Index: ircd/channel.c =================================================================== RCS file: /home/coder-com/cvs/ircu2.10/ircd/channel.c,v retrieving revision 1.81 diff -u -r1.81 channel.c --- ircd/channel.c 2002/04/03 21:16:01 1.81 +++ ircd/channel.c 2002/04/12 13:47:52 @@ -46,6 +46,7 @@ #include "s_conf.h" #include "s_debug.h" #include "s_misc.h" +#include "s_serv.h" #include "s_user.h" #include "send.h" #include "struct.h" @@ -533,6 +534,8 @@ remove_destruct_event(chptr); ++chptr->users; ++((cli_user(who))->joined); + if (MyUser(who)) + ++chptr->locals; } } @@ -562,6 +565,8 @@ (cli_user(member->user))->channel = member->next_channel; --(cli_user(member->user))->joined; + if (MyUser(member->user)) + --chptr->locals; member->next_member = membershipFreeList; membershipFreeList = member; @@ -587,6 +592,17 @@ struct Membership* member; assert(0 != chptr); + if (chptr->mode.mode & MODE_EMPTY) { + assert(feature_bool(FEAT_LAZY_LEAF)); + + /* Channel has no more locals, free it */ + do { + assert(!MyUser(chptr->members->user)); + } while (remove_member_from_channel(chptr->members)); + + return; + } + if ((member = find_member_link(chptr, cptr))) { if (remove_member_from_channel(member)) { if (channel_all_zombies(chptr)) { @@ -1417,6 +1433,7 @@ for (; acptr != &me; acptr = (cli_serv(acptr))->up) if (acptr == (cli_user(who))->server) /* Case d) (server 5) */ { + ll_check_channel(who, chptr); remove_user_from_channel(who, chptr); return; } @@ -1769,8 +1786,8 @@ if (mbuf->mb_dest & MODEBUF_DEST_OPMODE) { /* If OPMODE was set, we're propagating the mode as an OPMODE message */ - sendcmdto_serv_butone(mbuf->mb_source, CMD_OPMODE, mbuf->mb_connect, - "%H %s%s%s%s%s%s", mbuf->mb_channel, + sendcmdto_mask_butone(mbuf->mb_source, CMD_OPMODE, mbuf->mb_channel->ll_bits, + mbuf->mb_connect, "%H %s%s%s%s%s%s", mbuf->mb_channel, rembuf_i ? "-" : "", rembuf, addbuf_i ? "+" : "", addbuf, remstr, addstr); } else if (mbuf->mb_dest & MODEBUF_DEST_BOUNCE) { @@ -1789,14 +1806,16 @@ * we send the actual channel TS unless this is a HACK3 or a HACK4 */ if (IsServer(mbuf->mb_source)) - sendcmdto_serv_butone(mbuf->mb_source, CMD_MODE, mbuf->mb_connect, + sendcmdto_mask_butone(mbuf->mb_source, CMD_MODE, + mbuf->mb_channel->ll_bits, mbuf->mb_connect, "%H %s%s%s%s%s%s %Tu", mbuf->mb_channel, rembuf_i ? "-" : "", rembuf, addbuf_i ? "+" : "", addbuf, remstr, addstr, (mbuf->mb_dest & MODEBUF_DEST_HACK4) ? 0 : mbuf->mb_channel->creationtime); else - sendcmdto_serv_butone(mbuf->mb_source, CMD_MODE, mbuf->mb_connect, + sendcmdto_mask_butone(mbuf->mb_source, CMD_MODE, + mbuf->mb_channel->ll_bits, mbuf->mb_connect, "%H %s%s%s%s%s%s", mbuf->mb_channel, rembuf_i ? "-" : "", rembuf, addbuf_i ? "+" : "", addbuf, remstr, addstr); @@ -3143,7 +3162,7 @@ /* send notification to all servers */ if (jbuf->jb_type != JOINBUF_TYPE_CREATE && !IsLocalChannel(chan->chname)) - sendcmdto_serv_butone(jbuf->jb_source, CMD_JOIN, jbuf->jb_connect, + sendcmdto_mask_butone(jbuf->jb_source, CMD_JOIN, chan->ll_bits, jbuf->jb_connect, "%H %Tu", chan, chan->creationtime); /* Send the notification to the channel */ @@ -3192,9 +3211,37 @@ build_string(chanlist, &chanlist_i, jbuf->jb_channels[i] ? jbuf->jb_channels[i]->chname : "0", 0, i == 0 ? '\0' : ','); - if (JOINBUF_TYPE_PART == jbuf->jb_type) + + /* + * For lazy leafs, joins/parts have to be sent separately for + * each channel. + */ + switch (jbuf->jb_type) { + case JOINBUF_TYPE_CREATE: + sendcmdto_mask_butone(jbuf->jb_source, CMD_CREATE, + jbuf->jb_channels[i] ? jbuf->jb_channels[i]->ll_bits : LL_ALL, + jbuf->jb_connect, "%s %Tu", + jbuf->jb_channels[i] ? jbuf->jb_channels[i]->chname : "0", + jbuf->jb_create); + break; + + case JOINBUF_TYPE_PART: + sendcmdto_mask_butone(jbuf->jb_source, CMD_PART, + jbuf->jb_channels[i]->ll_bits, + jbuf->jb_connect, + jbuf->jb_comment ? "%s :%s" : "%s", + jbuf->jb_channels[i]->chname, + jbuf->jb_comment); + break; + } + + if (JOINBUF_TYPE_PART == jbuf->jb_type) { + /* Check now, as remove_user* may free the channel */ + ll_check_channel(jbuf->jb_source, jbuf->jb_channels[i]); + /* Remove user from channel */ remove_user_from_channel(jbuf->jb_source, jbuf->jb_channels[i]); + } jbuf->jb_channels[i] = 0; /* mark slot empty */ } @@ -3204,6 +3251,7 @@ STARTJOINLEN : STARTCREATELEN) + (jbuf->jb_comment ? strlen(jbuf->jb_comment) + 2 : 0)); +#if 0 /* and send the appropriate command */ switch (jbuf->jb_type) { case JOINBUF_TYPE_CREATE: @@ -3217,6 +3265,7 @@ jbuf->jb_comment); break; } +#endif return 0; } Index: ircd/ircd_features.c =================================================================== RCS file: /home/coder-com/cvs/ircu2.10/ircd/ircd_features.c,v retrieving revision 1.19 diff -u -r1.19 ircd_features.c --- ircd/ircd_features.c 2002/04/03 15:23:48 1.19 +++ ircd/ircd_features.c 2002/04/12 13:47:52 @@ -244,6 +244,7 @@ F_B(KILL_IPMISMATCH, FEAT_OPER, 0, 0), F_B(IDLE_FROM_MSG, 0, 1, 0), F_B(HUB, 0, 0, 0), + F_B(LAZY_LEAF, 0, 0, 0), F_B(WALLOPS_OPER_ONLY, 0, 0, 0), F_B(NODNS, 0, 0, 0), F_N(RANDOM_SEED, FEAT_NODISP, random_seed_set, 0, 0, 0, 0, 0, 0), Index: ircd/m_burst.c =================================================================== RCS file: /home/coder-com/cvs/ircu2.10/ircd/m_burst.c,v retrieving revision 1.16 diff -u -r1.16 m_burst.c --- ircd/m_burst.c 2002/03/27 22:30:24 1.16 +++ ircd/m_burst.c 2002/04/12 13:47:52 @@ -89,6 +89,7 @@ #include "ircd_policy.h" #include "ircd_reply.h" #include "ircd_string.h" +#include "ircd_features.h" #include "list.h" #include "match.h" #include "msg.h" @@ -463,6 +464,11 @@ lp->flags &= (CHFL_BAN | CHFL_BAN_IPMASK); /* reset the flag */ lp_p = &(*lp_p)->next; } + } + + if (IsLazy(cptr) && !LeafKnowsChannel(cptr, chptr)) { + chptr->ll_bits |= cli_serv(cptr)->ll_mask; + send_channel_modes(cptr, chptr); } return mbuf ? modebuf_flush(mbuf) : 0; Index: ircd/m_clearmode.c =================================================================== RCS file: /home/coder-com/cvs/ircu2.10/ircd/m_clearmode.c,v retrieving revision 1.20 diff -u -r1.20 m_clearmode.c --- ircd/m_clearmode.c 2002/02/14 00:20:42 1.20 +++ ircd/m_clearmode.c 2002/04/12 13:47:52 @@ -234,8 +234,8 @@ /* Then send it */ if (!IsLocalChannel(chptr->chname)) - sendcmdto_serv_butone(sptr, CMD_CLEARMODE, cptr, "%H %s", chptr, - control_buf); + sendcmdto_mask_butone(sptr, CMD_CLEARMODE, chptr->ll_bits, cptr, + "%H %s", chptr, control_buf); return 0; } Index: ircd/m_create.c =================================================================== RCS file: /home/coder-com/cvs/ircu2.10/ircd/m_create.c,v retrieving revision 1.12 diff -u -r1.12 m_create.c --- ircd/m_create.c 2002/02/14 00:20:42 1.12 +++ ircd/m_create.c 2002/04/12 13:47:52 @@ -154,6 +154,7 @@ continue; if ((chptr = FindChannel(name))) { + int hack2 = IsLazy(cptr) ? 0 : MODEBUF_DEST_HACK2; name = chptr->chname; /* Check if we need to bounce a mode */ @@ -162,7 +163,7 @@ chptr->creationtime != MAGIC_REMOTE_JOIN_TS)) { modebuf_init(&mbuf, sptr, cptr, chptr, (MODEBUF_DEST_SERVER | /* Send mode to server */ - MODEBUF_DEST_HACK2 | /* Send a HACK(2) message */ + hack2 | /* Send a HACK(2) message */ MODEBUF_DEST_BOUNCE)); /* And bounce the mode */ modebuf_mode_client(&mbuf, MODE_ADD | MODE_CHANOP, sptr); @@ -180,6 +181,11 @@ joinbuf_join(badop ? &join : &create, chptr, (badop || IsModelessChannel(name)) ? CHFL_DEOPPED : CHFL_CHANOP); + + if (IsLazy(cptr) && !LeafKnowsChannel(cptr, chptr)) { + chptr->ll_bits |= cli_serv(cptr)->ll_mask; + send_channel_modes(cptr, chptr); + } } joinbuf_flush(&join); /* flush out the joins and creates */ Index: ircd/m_join.c =================================================================== RCS file: /home/coder-com/cvs/ircu2.10/ircd/m_join.c,v retrieving revision 1.19 diff -u -r1.19 m_join.c --- ircd/m_join.c 2002/03/13 09:19:21 1.19 +++ ircd/m_join.c 2002/04/12 13:47:52 @@ -373,6 +373,11 @@ chptr->creationtime = creation; } + if (IsLazy(cptr) && !LeafKnowsChannel(cptr, chptr)) { + chptr->ll_bits |= cli_serv(cptr)->ll_mask; + send_channel_modes(cptr, chptr); + } + joinbuf_join(&join, chptr, flags); } Index: ircd/m_kick.c =================================================================== RCS file: /home/coder-com/cvs/ircu2.10/ircd/m_kick.c,v retrieving revision 1.8 diff -u -r1.8 m_kick.c --- ircd/m_kick.c 2002/03/13 09:19:21 1.8 +++ ircd/m_kick.c 2002/04/12 13:47:52 @@ -150,7 +150,7 @@ comment = EmptyString(parv[parc - 1]) ? parv[0] : parv[parc - 1]; if (!IsLocalChannel(name)) - sendcmdto_serv_butone(sptr, CMD_KICK, cptr, "%H %C :%s", chptr, who, + sendcmdto_mask_butone(sptr, CMD_KICK, chptr->ll_bits, cptr, "%H %C :%s", chptr, who, comment); sendcmdto_channel_butserv_butone(sptr, CMD_KICK, chptr, NULL, "%H %C :%s", chptr, who, @@ -228,7 +228,7 @@ } } else { /* Propagate kick... */ - sendcmdto_serv_butone(sptr, CMD_KICK, cptr, "%H %C :%s", chptr, who, + sendcmdto_mask_butone(sptr, CMD_KICK, chptr->ll_bits, cptr, "%H %C :%s", chptr, who, comment); if (member) { /* and tell the channel about it */ Index: ircd/m_server.c =================================================================== RCS file: /home/coder-com/cvs/ircu2.10/ircd/m_server.c,v retrieving revision 1.26 diff -u -r1.26 m_server.c --- ircd/m_server.c 2002/03/19 22:03:36 1.26 +++ ircd/m_server.c 2002/04/12 13:47:52 @@ -181,6 +181,9 @@ case 's': SetService(cptr); break; + case 'l': + SetLazy(cptr); + break; } } Index: ircd/m_topic.c =================================================================== RCS file: /home/coder-com/cvs/ircu2.10/ircd/m_topic.c,v retrieving revision 1.10 diff -u -r1.10 m_topic.c --- ircd/m_topic.c 2002/02/14 00:20:43 1.10 +++ ircd/m_topic.c 2002/04/12 13:47:52 @@ -115,8 +115,8 @@ chptr->topic_time = CurrentTime; /* Fixed in 2.10.11: Don't propergate local topics */ if (!IsLocalChannel(chptr->chname)) - sendcmdto_serv_butone(sptr, CMD_TOPIC, cptr, "%H :%s", chptr, - chptr->topic); + sendcmdto_mask_butone(sptr, CMD_TOPIC, chptr->ll_bits, cptr, "%H %Tu :%s", chptr, + chptr->topic_time, chptr->topic); if (newtopic) sendcmdto_channel_butserv_butone(sptr, CMD_TOPIC, chptr, NULL, "%H :%s", chptr, chptr->topic); Index: ircd/parse.c =================================================================== RCS file: /home/coder-com/cvs/ircu2.10/ircd/parse.c,v retrieving revision 1.34 diff -u -r1.34 parse.c --- ircd/parse.c 2002/03/19 22:03:36 1.34 +++ ircd/parse.c 2002/04/12 13:47:53 @@ -577,6 +577,13 @@ /* UNREG, CLIENT, SERVER, OPER, SERVICE */ { m_ignore, m_ignore, ms_account, m_ignore, m_ignore } }, + { + MSG_FORGET, + TOK_FORGET, + 0, MAXPARA, MFLG_SLOW, 0, + /* UNREG, CLIENT, SERVER, OPER, SERVICE */ + { m_ignore, m_ignore, ms_forget, m_ignore, m_ignore } + }, /* This command is an alias for QUIT during the unregistered part of * of the server. This is because someone jumping via a broken web * proxy will send a 'POST' as their first command - which we will Index: ircd/s_bsd.c =================================================================== RCS file: /home/coder-com/cvs/ircu2.10/ircd/s_bsd.c,v retrieving revision 1.48 diff -u -r1.48 s_bsd.c --- ircd/s_bsd.c 2002/04/03 06:45:49 1.48 +++ ircd/s_bsd.c 2002/04/12 13:47:53 @@ -465,7 +465,8 @@ sendrawto_one(cptr, MSG_SERVER " %s 1 %Tu %Tu J%s %s%s +%s :%s", cli_name(&me), cli_serv(&me)->timestamp, newts, MAJOR_PROTOCOL, NumServCap(&me), - feature_bool(FEAT_HUB) ? "h" : "", cli_info(&me)); + feature_bool(FEAT_HUB) ? "h" : + feature_bool(FEAT_LAZY_LEAF) ? "l" : "", cli_info(&me)); return (IsDead(cptr)) ? 0 : 1; } Index: ircd/s_misc.c =================================================================== RCS file: /home/coder-com/cvs/ircu2.10/ircd/s_misc.c,v retrieving revision 1.31 diff -u -r1.31 s_misc.c --- ircd/s_misc.c 2002/04/02 00:26:47 1.31 +++ ircd/s_misc.c 2002/04/12 13:47:53 @@ -48,6 +48,7 @@ #include "s_conf.h" #include "s_debug.h" #include "s_user.h" +#include "s_serv.h" #include "send.h" #include "struct.h" #include "support.h" @@ -477,6 +478,8 @@ sendto_opmask_butone(0, SNO_NETWORK, "Net break: %C %C (%s)", cli_serv(victim)->up, victim, comment); + if (IsLazy(victim)) + ll_remove(victim); #if defined(HEAD_IN_SAND_MAP) || defined(HEAD_IN_SAND_LINKS) map_update(victim); #endif Index: ircd/s_serv.c =================================================================== RCS file: /home/coder-com/cvs/ircu2.10/ircd/s_serv.c,v retrieving revision 1.28 diff -u -r1.28 s_serv.c --- ircd/s_serv.c 2002/02/14 00:20:44 1.28 +++ ircd/s_serv.c 2002/04/12 13:47:53 @@ -36,6 +36,7 @@ #include "ircd_string.h" #include "ircd_snprintf.h" #include "ircd_xopen.h" +#include "ircd_log.h" #include "jupe.h" #include "list.h" #include "match.h" @@ -61,6 +62,7 @@ unsigned int max_connection_count = 0; unsigned int max_client_count = 0; +unsigned long GlobalLeafBits = 0; int exit_new_server(struct Client *cptr, struct Client *sptr, const char *host, time_t timestamp, const char *pattern, ...) @@ -113,7 +115,8 @@ sendrawto_one(cptr, MSG_SERVER " %s 1 %Tu %Tu J%s %s%s +%s :%s", cli_name(&me), cli_serv(&me)->timestamp, cli_serv(cptr)->timestamp, MAJOR_PROTOCOL, NumServCap(&me), - feature_bool(FEAT_HUB) ? "h" : "", + feature_bool(FEAT_HUB) ? "h" : + feature_bool(FEAT_LAZY_LEAF) ? "l" : "", *(cli_info(&me)) ? cli_info(&me) : "IRCers United"); /* * Don't charge this IP# for connecting @@ -135,6 +138,9 @@ SetBurst(cptr); + if (IsLazy(cptr) && !ll_add(cptr)) + ClearLazy(cptr); + /* nextping = CurrentTime; */ /* @@ -241,6 +247,7 @@ * Last, send the BURST. * (Or for 2.9 servers: pass all channels plus statuses) */ + if (!IsLazy(cptr)) { struct Channel *chptr; for (chptr = GlobalChannelList; chptr; chptr = chptr->next) @@ -252,3 +259,42 @@ return 0; } +int ll_add(struct Client *cptr) +{ + int i = 1; + + assert(IsLazy(cptr)); + + while ((GlobalLeafBits & i) && i < 0x80000000) + i <<= 1; + if (GlobalLeafBits & i) { + sendto_opmask_butone(NULL, SNO_OLDSNO, "No more bits for LazyLeaf %s.", cli_name(cptr)); + return 0; + } + GlobalLeafBits |= i; + cli_serv(cptr)->ll_mask = i; + log_write(LS_DEBUG, L_DEBUG, 0, "Added LazyLeaf %s with mask 0x%lx. GlobalLeafBits=0x%lx", cli_name(cptr), i, GlobalLeafBits); + return 1; +} + +void ll_remove(struct Client *cptr) +{ + struct Channel *chptr; + + assert(IsLazy(cptr)); + + for (chptr = GlobalChannelList; chptr; chptr = chptr->next) + chptr->ll_bits &= ~cli_serv(cptr)->ll_mask; + + GlobalLeafBits &= ~cli_serv(cptr)->ll_mask; + log_write(LS_DEBUG, L_DEBUG, 0, "Removed LazyLeaf %s with mask 0x%lx. GlobalLeafBits=0x%lx", cli_name(cptr), cli_serv(cptr)->ll_mask, GlobalLeafBits); +} + +void ll_check_channel(struct Client *cptr, struct Channel *chptr) +{ + if (feature_bool(FEAT_LAZY_LEAF) && MyUser(cptr) && chptr->locals <= 1) { + log_write(LS_DEBUG, L_DEBUG, 0, "LazyLeaf: Channel %s has no more locals", chptr->chname); + sendcmdto_serv_butone(&me, CMD_FORGET, NULL, "%s", chptr->chname); + chptr->mode.mode |= MODE_EMPTY; + } +} Index: ircd/send.c =================================================================== RCS file: /home/coder-com/cvs/ircu2.10/ircd/send.c,v retrieving revision 1.46 diff -u -r1.46 send.c --- ircd/send.c 2002/02/14 00:20:45 1.46 +++ ircd/send.c 2002/04/12 13:47:53 @@ -328,6 +328,35 @@ msgq_clean(mb); } +void sendcmdto_mask_butone(struct Client *from, const char *cmd, + const char *tok, unsigned long ll_mask, + struct Client *one, + const char *pattern, ...) +{ + struct VarData vd; + struct MsgBuf *mb; + struct DLink *lp; + + vd.vd_format = pattern; /* set up the struct VarData for %v */ + va_start(vd.vd_args, pattern); + + /* use token */ + mb = msgq_make(&me, "%C %s %v", from, tok, &vd); + va_end(vd.vd_args); + + /* send it to our downlinks */ + for (lp = cli_serv(&me)->down; lp; lp = lp->next) { + if (one && lp->value.cptr == cli_from(one)) + continue; + if (IsLazy(lp->value.cptr) && !(cli_serv(lp->value.cptr)->ll_mask & ll_mask)) + continue; + send_buffer(lp->value.cptr, mb, 0); + } + + msgq_clean(mb); +} + + /* * Send a (prefix) command originating from to all channels * is locally on. must be a user. is ignored in --- /dev/null Thu Aug 24 12:00:32 2000 +++ doc/readme.lazylinks Fri Apr 12 16:47:36 2002 @@ -0,0 +1,46 @@ +Concept +~~~~~~~ +The idea behind lazy links is that leafs often don't need much of the +state information they are sent. Currently, only lazy channels are +implemented; this means lazy leafs will only be burst channels that +they have local users on. + +Protocol +~~~~~~~~ +If a leaf has FEAT_LAZY_LEAF set, it sends a +l flag in the SERVER message +it sends to its hub (note that if FEAT_HUB is also set, it takes precedence +over FEAT_LAZY_LEAF). The hub will then mark this leaf as 'lazy', and will +not burst any channels to it. The hub will also keep a bitmask of which leaves +know which channels. Subsequently, when the leaf tries to announce a channel +to its hub (via a BURST, JOIN or CREATE) and the leaf doesn't "know" about +that channel from the hub's point of view, the hub will send a full BURST of +the channel back to the leaf, and mark the channel as "known" to the leaf. +Note that a server with FEAT_LAZY_LEAF set *will* accept BURST messages outside +of net.burst. When a channel has no more local clients, the leaf will send a +FORGET message to the hub and destroy the channel locally. Upon receipt of this +meessage, the hub will remove the "known" bit for that channel/leaf pair, and +it will burst the channel again if the leaf tries to create it later on. The +FORGET message has the following syntax: + FO <#channel> + +Code +~~~~ +struct Server has a ll_mask field which is assigned to each lazy leaf on its +uplink hub. Every leaf gets a bit, so the maximum number of leafs is 32 on +32-bit machines. struct Channel now has a ll_bits bitmask field which stores +which leaves "know" the channel. A new sendcmd_to_mask_butone function was +used instead of sendcmdto_serv_butone which doesn't send to lazy leaves that +don't match the specified mask (currently, chptr->ll_bits). + +Bugs +~~~~ +This documentation is less than complete. + +Commands like LIST, TOPIC, MODE issued on a lazy leaf for channels that hasn't +been burst to it will incorrectly report the channels doesn't exist. This should +be handled by forwarding those messages to its uplink. + +joinbuf_flush now sends each join/part as a separate message, because they each +have to be matched against the leaves' "known channel" bits. + +Probably more. --- /dev/null Thu Aug 24 12:00:32 2000 +++ ircd/m_forget.c Wed Apr 3 23:07:14 2002 @@ -0,0 +1,123 @@ +/* + * IRC - Internet Relay Chat, ircd/m_forget.c + * Copyright (C) 2002 Alex Badea + * + * See file AUTHORS in IRC package for additional names of + * the programmers. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 1, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * $Id: lazy.diff,v 1.2 2002/04/12 13:50:27 vampire Exp $ + */ + +/* + * m_functions execute protocol messages on this server: + * + * cptr is always NON-NULL, pointing to a *LOCAL* client + * structure (with an open socket connected!). This + * identifies the physical socket where the message + * originated (or which caused the m_function to be + * executed--some m_functions may call others...). + * + * sptr is the source of the message, defined by the + * prefix part of the message if present. If not + * or prefix not found, then sptr==cptr. + * + * (!IsServer(cptr)) => (cptr == sptr), because + * prefixes are taken *only* from servers... + * + * (IsServer(cptr)) + * (sptr == cptr) => the message didn't + * have the prefix. + * + * (sptr != cptr && IsServer(sptr) means + * the prefix specified servername. (?) + * + * (sptr != cptr && !IsServer(sptr) means + * that message originated from a remote + * user (not local). + * + * combining + * + * (!IsServer(sptr)) means that, sptr can safely + * taken as defining the target structure of the + * message in this server. + * + * *Always* true (if 'parse' and others are working correct): + * + * 1) sptr->from == cptr (note: cptr->from == cptr) + * + * 2) MyConnect(sptr) <=> sptr == cptr (e.g. sptr + * *cannot* be a local connection, unless it's + * actually cptr!). [MyConnect(x) should probably + * be defined as (x == x->from) --msa ] + * + * parc number of variable parameter strings (if zero, + * parv is allowed to be NULL) + * + * parv a NULL terminated list of parameter pointers, + * + * parv[0], sender (prefix string), if not present + * this points to an empty string. + * parv[1]...parv[parc-1] + * pointers to additional parameters + * parv[parc] == NULL, *always* + * + * note: it is guaranteed that parv[0]..parv[parc-1] are all + * non-NULL pointers. + */ +#include "config.h" + +#include "client.h" +#include "hash.h" +#include "ircd.h" +#include "ircd_reply.h" +#include "ircd_string.h" +#include "msg.h" +#include "numeric.h" +#include "numnicks.h" +#include "send.h" +#include "channel.h" +#include "ircd_log.h" + +#include +#include + +/* + * ms_forget - server message handler + */ +int ms_forget(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) +{ + struct Channel *chptr; + + assert(0 != cptr); + assert(0 != sptr); + assert(IsServer(cptr)); + + if (parc < 2) + return need_more_params(sptr, "FORGET"); + + /* + * Only lazy leafs may forget about channels. + * Ignore forget messages for channels that don't exist. + */ + if (!IsLazy(cptr) || !(chptr = FindChannel(parv[1]))) + return 0; + + chptr->ll_bits &= ~cli_serv(cptr)->ll_mask; + log_write(LS_DEBUG, L_DEBUG, 0, "LazyLeaf %s forgot about %s", cli_name(cptr), chptr->chname); + + return 0; +} ircd-ircu-2.10.12.10.dfsg1/patches/diffs/login-on-connect.diff0000644000175000017500000004620407455557371023405 0ustar madkissmadkissIndex: ChangeLog =================================================================== RCS file: /home/coder-com/cvs/ircu2.10/ChangeLog,v retrieving revision 1.340 diff -u -r1.340 ChangeLog --- ChangeLog 2002/04/12 00:19:52 1.340 +++ ChangeLog 2002/04/12 13:17:10 @@ -1,5 +1,33 @@ 2002-04-12 Alex Badea + * include/ircd_features.h: new feature LOGIN_ON_CONNECT + + * ircd/ircd_features.c: new feature LOGIN_ON_CONNECT + + * include/client.h (struct Client): new fields for storing + bot name, username and password for login-on-connect + + * ircd/m_account.c: extensions for login-on-connect: route + and process auth-request and auth-reply messages + + * ircd/m_pass.c: store bot name, username and password for + service login + + * ircd/m_user.c: store username/hostname for the client + even if he finished registration, as register_user may not + do that anymore + + * ircd/s_user.c (register_user): if the client specified + a service login in the PASS command, attempt to log him in; + also, don't set his hostname if it was set remotely by a + service bot + + * doc/example.conf: default value for FEAT_LOGIN_ON_CONNECT + + * doc/readme.features: documented FEAT_LOGIN_ON_CONNECT + +2002-04-12 Alex Badea + * ircd/m_invite.c: don't propagate invites for local channels * include/patchlevel.h (PATCHLEVEL): bump patchlevel Index: doc/example.conf =================================================================== RCS file: /home/coder-com/cvs/ircu2.10/doc/example.conf,v retrieving revision 1.20 diff -u -r1.20 example.conf --- doc/example.conf 2002/04/03 15:23:47 1.20 +++ doc/example.conf 2002/04/12 13:17:10 @@ -702,6 +702,7 @@ # "HOST_HIDING"="FALSE"; # "HIDDEN_HOST"="users.undernet.org"; # "HIDDEN_IP"="127.0.0.1"; +# "LOGIN_ON_CONNECT"="FALSE"; # "KILLCHASETIMELIMIT"="30"; # "MAXCHANNELSPERUSER"="10"; # "AVBANLEN"="40"; Index: doc/readme.features =================================================================== RCS file: /home/coder-com/cvs/ircu2.10/doc/readme.features,v retrieving revision 1.5 diff -u -r1.5 readme.features --- doc/readme.features 2002/04/03 15:23:47 1.5 +++ doc/readme.features 2002/04/12 13:17:10 @@ -242,6 +242,13 @@ This selects a fake IP to be shown on /USERIP and /WHO %i when the target has a hidden host (see HOST_HIDING). +LOGIN_ON_CONNECT + * Type: boolean + * Default: FALSE + +This selects whether local clients can use specify a service bot login +in the connection phase. Read readme.login-on-connect for more details. + KILLCHASETIMELIMIT * Type: integer * Default: 30 Index: include/client.h =================================================================== RCS file: /home/coder-com/cvs/ircu2.10/include/client.h,v retrieving revision 1.26 diff -u -r1.26 client.h --- include/client.h 2002/04/05 11:36:58 1.26 +++ include/client.h 2002/04/12 13:17:10 @@ -196,6 +196,10 @@ char cli_name[HOSTLEN + 1]; /* Unique name of the client, nick or host */ char cli_username[USERLEN + 1]; /* username here now for auth stuff */ char cli_info[REALLEN + 1]; /* Free form additional client information */ + + char *cli_cs_user; /* channel service authentication (user)... */ + char *cli_cs_pass; /* ...and password... */ + char *cli_cs_service; /* ...and the service bot's nick */ }; #define CLIENT_MAGIC 0x4ca08286 Index: include/ircd_features.h =================================================================== RCS file: /home/coder-com/cvs/ircu2.10/include/ircd_features.h,v retrieving revision 1.15 diff -u -r1.15 ircd_features.h --- include/ircd_features.h 2002/04/03 15:23:47 1.15 +++ include/ircd_features.h 2002/04/12 13:17:10 @@ -45,6 +45,7 @@ FEAT_HOST_HIDING, FEAT_HIDDEN_HOST, FEAT_HIDDEN_IP, + FEAT_LOGIN_ON_CONNECT, /* features that probably should not be touched */ FEAT_KILLCHASETIMELIMIT, Index: ircd/ircd_features.c =================================================================== RCS file: /home/coder-com/cvs/ircu2.10/ircd/ircd_features.c,v retrieving revision 1.19 diff -u -r1.19 ircd_features.c --- ircd/ircd_features.c 2002/04/03 15:23:48 1.19 +++ ircd/ircd_features.c 2002/04/12 13:17:10 @@ -252,6 +252,7 @@ F_B(HOST_HIDING, 0, 0, 0), F_S(HIDDEN_HOST, FEAT_CASE, "users.undernet.org", 0), F_S(HIDDEN_IP, 0, "127.0.0.1", 0), + F_B(LOGIN_ON_CONNECT, 0, 0, 0), /* features that probably should not be touched */ F_I(KILLCHASETIMELIMIT, 0, 30, 0), Index: ircd/m_account.c =================================================================== RCS file: /home/coder-com/cvs/ircu2.10/ircd/m_account.c,v retrieving revision 1.2 diff -u -r1.2 m_account.c --- ircd/m_account.c 2002/02/14 00:20:42 1.2 +++ ircd/m_account.c 2002/04/12 13:17:10 @@ -84,9 +84,11 @@ #include "ircd.h" #include "ircd_reply.h" #include "ircd_string.h" +#include "ircd_alloc.h" #include "msg.h" #include "numnicks.h" #include "s_user.h" +#include "s_debug.h" #include "send.h" #include @@ -96,35 +98,108 @@ * * parv[0] = sender prefix * parv[1] = numeric of client to act on - * parv[2] = account name (12 characters or less) + * parv[2] = message type + * + * for *parv[2] == 'R' (remote auth): + * parv[3] = account name (12 characters or less) + * + * for *parv[2] == 'C' (auth check): + * parv[3] = numeric of client to check + * parv[4] = username + * parv[parc-1] = password + * + * for *parv[2] == 'A' (auth ok) or + * for *parv[2] == 'D' (auth denied) or + * parv[3] = numeric of client to check */ int ms_account(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) { struct Client *acptr; + char type; if (parc < 3) return need_more_params(sptr, "ACCOUNT"); + + if (parc < 4) { + /* old-style message, remap it */ + parv[4] = NULL; + parv[3] = parv[2]; + parv[2] = "R"; + } if (!IsServer(sptr)) return protocol_violation(cptr, "ACCOUNT from non-server %s", cli_name(sptr)); - - if (!(acptr = findNUser(parv[1]))) - return 0; /* Ignore ACCOUNT for a user that QUIT; probably crossed */ - - if (IsAccount(acptr)) - return protocol_violation(cptr, "ACCOUNT for already registered user %s " - "(%s -> %s)", cli_name(acptr), - cli_user(acptr)->account, parv[2]); - - assert(0 == cli_user(acptr)->account[0]); - - ircd_strncpy(cli_user(acptr)->account, parv[2], ACCOUNTLEN); - hide_hostmask(acptr, FLAGS_ACCOUNT); - sendcmdto_serv_butone(sptr, CMD_ACCOUNT, cptr, "%C %s", acptr, - cli_user(acptr)->account); + type = *parv[2]; + if (type == 'R') { + if (!(acptr = findNUser(parv[1]))) + return 0; /* Ignore ACCOUNT for a user that QUIT; probably crossed */ + + if (IsAccount(acptr)) + return protocol_violation(cptr, "ACCOUNT for already registered user %s " + "(%s -> %s)", cli_name(acptr), + cli_user(acptr)->account, parv[3]); + + assert(0 == cli_user(acptr)->account[0]); + + ircd_strncpy(cli_user(acptr)->account, parv[3], ACCOUNTLEN); + hide_hostmask(acptr, FLAGS_ACCOUNT); + +#if 0 + /* XXX Enable this when all servers speak the same language */ + sendcmdto_serv_butone(sptr, CMD_ACCOUNT, cptr, "%C R %s", acptr, + cli_user(acptr)->account); +#else + sendcmdto_serv_butone(sptr, CMD_ACCOUNT, cptr, "%C %s", acptr, + cli_user(acptr)->account); +#endif + } else { + if (!(acptr = findNUser(parv[1])) && !(acptr = FindNServer(parv[1]))) + return 0; + + if (type == 'C' && parc < 6) + return need_more_params(sptr, "ACCOUNT"); + + if (!IsMe(acptr)) { + /* in-transit message, forward it */ + sendcmdto_one(sptr, CMD_ACCOUNT, acptr, + type == 'C' ? "%C %s %s %s :%s" : "%C %s %s", + acptr, parv[2], parv[3], parv[4], parv[parc-1]); + return 0; + } + + /* the message is for me, process it */ + if (type == 'C') + return protocol_violation(cptr, "ACCOUNT check (%s %s %s)", parv[3], parv[4], parv[parc-1]); + + if (!(acptr = findNUser(parv[3]))) + return 0; + if (IsRegistered(acptr) || !acptr->cli_cs_service) + return protocol_violation(cptr, "Invalid ACCOUNT %s for %s", parv[2], cli_name(acptr)); + + if (type == 'A') { + ircd_strncpy(cli_user(acptr)->account, acptr->cli_cs_user, ACCOUNTLEN); + hide_hostmask(acptr, FLAGS_ACCOUNT | FLAGS_HIDDENHOST); + } + + sendcmdto_one(&me, CMD_NOTICE, acptr, "%C :AUTHENTICATION %s as %s", acptr, + type == 'A' ? "SUCCESSFUL" : "FAILED", + acptr->cli_cs_user); + + MyFree(acptr->cli_cs_service); + MyFree(acptr->cli_cs_user); + MyFree(acptr->cli_cs_pass); + acptr->cli_cs_service = acptr->cli_cs_user = acptr->cli_cs_pass = NULL; + + if (type != 'A') { + sendcmdto_one(&me, CMD_NOTICE, acptr, "%C :Type /QUOTE PASS to connect anyway", acptr); + return 0; + } + + return register_user(acptr, acptr, cli_name(acptr), cli_user(acptr)->username); + } return 0; } Index: ircd/m_pass.c =================================================================== RCS file: /home/coder-com/cvs/ircu2.10/ircd/m_pass.c,v retrieving revision 1.7 diff -u -r1.7 m_pass.c --- ircd/m_pass.c 2001/06/29 15:51:02 1.7 +++ ircd/m_pass.c 2002/04/12 13:17:10 @@ -84,7 +84,11 @@ #include "client.h" #include "ircd_reply.h" #include "ircd_string.h" +#include "ircd_alloc.h" +#include "ircd_features.h" +#include "s_user.h" #include "send.h" +#include "struct.h" #include @@ -99,15 +103,28 @@ assert(cptr == sptr); assert(!IsRegistered(sptr)); - if (EmptyString(password)) - return need_more_params(cptr, "PASS"); - /* TODO: For protocol negotiation */ #if 0 if (ircd_strcmp(password,"PROT")==0) { /* Do something here */ } #endif - ircd_strncpy(cli_passwd(cptr), password, PASSWDLEN); + + if (!EmptyString(password)) + ircd_strncpy(cli_passwd(cptr), password, PASSWDLEN); + + if (!feature_bool(FEAT_LOGIN_ON_CONNECT) || cptr->cli_cs_service) + return 0; + + if (parc > 3) { + DupString(cptr->cli_cs_service, parv[parc-3]); + DupString(cptr->cli_cs_user, parv[parc-2]); + DupString(cptr->cli_cs_pass, parv[parc-1]); + } + + /* Deal with password retries */ + if ((cli_name(cptr))[0] && cli_cookie(cptr) == COOKIE_VERIFIED) + return register_user(cptr, cptr, cli_name(cptr), cli_user(cptr)->username); + return 0; } Index: ircd/m_user.c =================================================================== RCS file: /home/coder-com/cvs/ircu2.10/ircd/m_user.c,v retrieving revision 1.7 diff -u -r1.7 m_user.c --- ircd/m_user.c 2001/06/08 23:12:17 1.7 +++ ircd/m_user.c 2002/04/12 13:17:10 @@ -142,16 +142,14 @@ user->server = &me; ircd_strncpy(cli_info(cptr), info, REALLEN); + ircd_strncpy(user->username, username, USERLEN); + ircd_strncpy(user->host, cli_sockhost(cptr), HOSTLEN); if ((cli_name(cptr))[0] && cli_cookie(cptr) == COOKIE_VERIFIED) { /* * NICK and PONG already received, now we have USER... */ return register_user(cptr, sptr, cli_name(sptr), username); - } - else { - ircd_strncpy(user->username, username, USERLEN); - ircd_strncpy(user->host, cli_sockhost(cptr), HOSTLEN); } return 0; } Index: ircd/s_user.c =================================================================== RCS file: /home/coder-com/cvs/ircu2.10/ircd/s_user.c,v retrieving revision 1.58 diff -u -r1.58 s_user.c --- ircd/s_user.c 2002/04/05 11:36:59 1.58 +++ ircd/s_user.c 2002/04/12 13:17:10 @@ -394,6 +394,25 @@ parv[0] = cli_name(sptr); parv[1] = parv[2] = NULL; + if (MyConnect(sptr) && sptr->cli_cs_service && sptr->cli_cs_user && sptr->cli_cs_pass) { + struct Client *acptr; + + if (!(acptr = FindUser(sptr->cli_cs_service)) || !IsChannelService(acptr)) { + sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :Service '%s' is not available", sptr, sptr->cli_cs_service); + sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :Type /QUOTE PASS to connect anyway", sptr); + MyFree(sptr->cli_cs_service); + MyFree(sptr->cli_cs_user); + MyFree(sptr->cli_cs_pass); + sptr->cli_cs_service = sptr->cli_cs_user = sptr->cli_cs_pass = NULL; + } else { + sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :Attempting service login to %s", + sptr, cli_name(acptr)); + sendcmdto_one(&me, CMD_ACCOUNT, acptr, "%C C %s%s %s :%s", acptr, + NumNick(sptr), sptr->cli_cs_user, sptr->cli_cs_pass); + } + return 0; + } + if (MyConnect(sptr)) { static time_t last_too_many1; @@ -441,7 +460,9 @@ IPcheck_connect_fail(cli_ip(sptr)); return exit_client(cptr, sptr, &me, "Unknown error -- Try again"); } - ircd_strncpy(user->host, cli_sockhost(sptr), HOSTLEN); + /* The host might be already set from login-on-connect */ + if (!HasHiddenHost(sptr)) + ircd_strncpy(user->host, cli_sockhost(sptr), HOSTLEN); ircd_strncpy(user->realhost, cli_sockhost(sptr), HOSTLEN); aconf = cli_confs(sptr)->value.aconf; --- /dev/null Thu Aug 24 12:00:32 2000 +++ doc/readme.login-on-connect Fri Apr 12 16:16:56 2002 @@ -0,0 +1,182 @@ +1. This feature is experimental. + +2. The main point is to allow clients to log in to a service bot (i.e., X) +*before* being announced to the network. Otherwise, a combination of a +malicious user, /ISON, /USERIP and low latency can reveal it's real host/IP +before he gets a chance to log in and set himself +x + +3. Client<->Server changes: +~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The PASS command now has the following syntax: + +PASS [optional Client block password] : + +If the client specifies sends such a password message, after sending NICK, +USER and PONG, it's username/passphrase are sent to the specified bot +for validation, while holding the client in the 'registration' state. +If the authentication succeeds, the client's account and umode +x are set, +after which he is introduced to the network, continuing the regular connect +phase. If authentication fails (or the bot is not on the network), the user +is given a chance to retry (he can do this by sending another PASS command), +or to disconnect from the server. If he wishes to connect without a hidden +hostmask, he can send a PASS command with no parameters. + +4. Server<->Server changes: +~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The ACCOUNT message now has the following syntax: + +Auth check: + AC C : +Servers send this message to request a service bot to authenticate the client. +Note that will only be used by the originating server for +matching auth replies, as the user has not yet been announced to the network. +Hubs will have to propagate this message as-is towards the service bot, +much like they do for PRIVMSGs. + +Auth reply: + AC A|D +Service bots send this in reply to an 'auth check' message from a server. +"A" stands for "accepted", "D" for "denied". Again, hubs will have +to proagate this message back to the client's server. + +Remote auth: + AC R +This is the current message used by service bots to announce the network +that a user has logged in. The old format is still supported: + AC + +5. ircu code changes +~~~~~~~~~~~~~~~~~~~~ +A new feature, FEAT_LOGIN_ON_CONNECT (default FALSE) will specify whether +ircu will honour the login scheme as specified above for the PASS command. +ircu will route ACCOUNT messages anyway, regardless of this feature's value. + +6. GNUWorld patches +~~~~~~~~~~~~~~~~~~~ +A patch follows that will implement auth checks and replies. + +Index: mod.cservice/cservice.cc +=================================================================== +RCS file: /cvsroot/gnuworld/gnuworld/mod.cservice/cservice.cc,v +retrieving revision 1.213 +diff -u -r1.213 cservice.cc +--- mod.cservice/cservice.cc 10 Apr 2002 19:00:10 -0000 1.213 ++++ mod.cservice/cservice.cc 12 Apr 2002 12:33:45 -0000 +@@ -2491,15 +2491,45 @@ + { + case EVT_ACCOUNT: + { +- iClient* tmpUser = static_cast< iClient* >( data1 ) ; +- networkData* tmpData = static_cast< networkData* >(tmpUser->getCustomData(this) ) ; +- /* Lookup this user account, if its not there.. trouble */ +- sqlUser* theUser = getUserRecord(tmpUser->getAccount()); +- if (theUser) +- { +- tmpData->currentUser = theUser; +- theUser->addAuthedClient(tmpUser); ++ char *ac_type = static_cast (data1); ++ if (*ac_type == 'R') { ++ iClient* tmpUser = static_cast< iClient* >( data2 ) ; ++ networkData* tmpData = static_cast< networkData* >(tmpUser->getCustomData(this) ) ; ++ /* Lookup this user account, if its not there.. trouble */ ++ sqlUser* theUser = getUserRecord(tmpUser->getAccount()); ++ if (theUser) ++ { ++ tmpData->currentUser = theUser; ++ theUser->addAuthedClient(tmpUser); ++ } ++ } else if (*ac_type == 'C') { ++ // server prefix, client prefix, username, password ++ char **param_list = static_cast (data2); ++ sqlUser* theUser = getUserRecord(param_list[2]); ++ strstream ac; ++ ++ LogDebugMessage("Checking account: user=%s pass=%s ok=%d susp=%d maxlog=%d/%d", ++ param_list[2], ++ param_list[3], ++ isPasswordRight(theUser, param_list[3]), ++ theUser->getFlag(sqlUser::F_GLOBAL_SUSPEND), ++ theUser->networkClientList.size() + 1, ++ theUser->getMaxLogins()); ++ ++ ac << getCharYY() << " AC " << param_list[0]; ++ ++ if (theUser && !theUser->getFlag(sqlUser::F_GLOBAL_SUSPEND) && ++ isPasswordRight(theUser, param_list[3]) && ++ theUser->networkClientList.size() + 1 <= theUser->getMaxLogins()) { ++ ac << " A "; ++ } else { ++ ac << " D "; + } ++ ++ ac << param_list[1] << ends; ++ Write(ac); ++ delete[] ac.str(); ++ } + break; + } + case EVT_BURST_ACK: +Index: src/msg_AC.cc +=================================================================== +RCS file: /cvsroot/gnuworld/gnuworld/src/msg_AC.cc,v +retrieving revision 1.1 +diff -u -r1.1 msg_AC.cc +--- src/msg_AC.cc 12 Jan 2002 21:42:17 -0000 1.1 ++++ src/msg_AC.cc 12 Apr 2002 12:33:46 -0000 +@@ -14,23 +14,48 @@ + * SOURCE AC TARGET ACCOUNT + * Eg: + * AXAAA AC BQrTd Gte ++ * ++ * AX AC BQrTd R Gte ++ * BQ AC AX C BqrTd Gte :Gte's Pass + */ +-int xServer::MSG_AC( xParameters& Param ) ++int xServer::MSG_AC(xParameters &Param) + { + /* + * First, update this users information. + */ + +-iClient* theClient = Network->findClient(Param[1]); +-if(!theClient) +- { +- return 0; +- } ++const char *numeric = NULL, *account = NULL; ++static char *ac_type_C = "C"; ++static char *ac_type_R = "R"; + +-theClient->setAccount(Param[2]); ++if (Param.size() < 4) { ++ numeric = Param[1]; ++ account = Param[2]; ++} else if (Param[2][0] == 'R') { ++ numeric = Param[1]; ++ account = Param[3]; ++} else if (Param[2][0] == 'C') { ++ const char *param_list[4]; ++ param_list[0] = Param[0]; ++ param_list[1] = Param[3]; ++ param_list[2] = Param[4]; ++ param_list[3] = Param[5]; ++ PostEvent(EVT_ACCOUNT, static_cast (ac_type_C), static_cast (param_list)); ++ return 0; ++} ++ ++if (!numeric || !account) ++ return 0; ++ ++iClient *theClient = Network->findClient(numeric); ++if (!theClient) ++ return 0; ++ ++theClient->setAccount(account); ++PostEvent(EVT_ACCOUNT, static_cast (ac_type_R), static_cast (theClient)) ; + +-PostEvent( EVT_ACCOUNT, static_cast< void* >( theClient ) ) ; + return 0; ++ + } + + } // namespace gnuworld ircd-ircu-2.10.12.10.dfsg1/patches/diffs/sline.diff0000644000175000017500000001631610006202226021313 0ustar madkissmadkissdiff -urdb doc/example.conf ircu2.10.11.06/doc/example.conf --- doc/example.conf Wed Jan 28 22:28:05 2004 +++ doc/example.conf Wed Jan 28 23:20:26 2004 @@ -365,6 +365,30 @@ # Y:10:90:0:100:160000 +# [S:lines] +# Opers may wish to hide their IP mask and hostname, even if they are on +# a bnc. This can prevent the risk of opers or their providers getting +# dos'd or whatever the case may be. +# +# When a client connects, his or her IP is compared to the incoming_IP in +# each of the S:lines in the conf. If it finds an exact match (NOT a mask +# match, but a simple comparison), it will substitute the client's ip with +# modified_IP and the client's real hostname with modified_hostname (as +# shown below). +# +# Syntax: +# S::: +# +# Example: +# S:193.178.138.13:192.168.128.1:undernet.org +# +# If a user connects to the server with the IP 193.178.138.13, it is +# automatically changed to 192.168.128.1 and the user's host is set to +# undernet.org. +# +# If no modified_IP is provided, only the host is modified. + + # [P:lines] # When your server gets more full, you will notice delays when trying to # connect to your server's primary listening port. It is possible via the diff -urdb include/client.h ircu2.10.11.06/include/client.h --- include/client.h Wed Jan 28 22:28:05 2004 +++ include/client.h Wed Jan 28 23:20:26 2004 @@ -127,6 +127,7 @@ FLAG_GOTID, /* successful ident lookup achieved */ FLAG_DOID, /* I-lines say must use ident return */ FLAG_NONL, /* No \n in buffer */ + FLAG_SLINE, /* User is S-lined */ FLAG_TS8, /* Why do you want to know? */ FLAG_MAP, /* Show server on the map */ FLAG_JUNCTION, /* Junction causing the net.burst */ @@ -429,6 +430,7 @@ #define IsAccount(x) HasFlag(x, FLAG_ACCOUNT) #define IsHiddenHost(x) HasFlag(x, FLAG_HIDDENHOST) #define HasHiddenHost(x) (IsAccount(x) && IsHiddenHost(x)) +#define HasSLine(x) HasFlag(x, FLAG_SLINE) #define IsPrivileged(x) (IsAnOper(x) || IsServer(x)) @@ -451,6 +453,7 @@ #define SetService(x) SetFlag(x, FLAG_SERVICE) #define SetAccount(x) SetFlag(x, FLAG_ACCOUNT) #define SetHiddenHost(x) SetFlag(x, FLAG_HIDDENHOST) +#define SetSLined(x) SetFlag(x, FLAG_SLINE) #define ClearAccess(x) ClrFlag(x, FLAG_CHKACCESS) #define ClearBurst(x) ClrFlag(x, FLAG_BURST) diff -urdb include/s_conf.h ircu2.10.11.06/include/s_conf.h --- include/s_conf.h Wed Jan 28 22:28:05 2004 +++ include/s_conf.h Wed Jan 28 23:20:26 2004 @@ -33,6 +33,7 @@ #define CONF_ILLEGAL 0x80000000 #define CONF_MATCH 0x40000000 +#define CONF_SPOOF 0x20000000 #define CONF_CLIENT 0x0002 #define CONF_SERVER 0x0004 #define CONF_LOCOP 0x0010 diff -urdb ircd/s_auth.c ircu2.10.11.06/ircd/s_auth.c --- ircd/s_auth.c Wed Jan 28 22:28:05 2004 +++ ircd/s_auth.c Wed Jan 28 23:20:26 2004 @@ -46,6 +46,7 @@ #include "querycmds.h" #include "res.h" #include "s_bsd.h" +#include "s_conf.h" #include "s_debug.h" #include "s_misc.h" #include "send.h" @@ -82,6 +83,7 @@ { "NOTICE AUTH :*** No ident response\r\n", 36 }, { "NOTICE AUTH :*** Your forward and reverse DNS do not match, " \ "ignoring hostname.\r\n", 80 }, + { "NOTICE AUTH :*** Using S-line privilege\r\n", 41 }, { "NOTICE AUTH :*** Invalid hostname\r\n", 35 } }; @@ -94,6 +96,7 @@ REPORT_FIN_ID, REPORT_FAIL_ID, REPORT_IP_MISMATCH, + REPORT_USING_SLINE, REPORT_INVAL_DNS } ReportType; @@ -595,6 +598,13 @@ struct AuthRequest* auth = 0; assert(0 != client); + + if (conf_check_slines(client)) { + sendheader(client, REPORT_USING_SLINE); + SetSLined(client); + release_auth_client(client); + return; + } auth = make_auth_request(client); assert(0 != auth); diff -urdb ircd/s_conf.c ircu2.10.11.06/ircd/s_conf.c --- ircd/s_conf.c Wed Jan 28 22:28:05 2004 +++ ircd/s_conf.c Wed Jan 28 23:20:26 2004 @@ -1170,6 +1170,10 @@ conf_add_quarantine(field_vector, field_count); aconf->status = CONF_ILLEGAL; break; + case 'S': + case 's': + aconf->status = CONF_SPOOF; + break; case 'T': /* print out different motd's */ case 't': /* based on hostmask - CONF_TLINES */ motd_add(field_vector[1], field_vector[2]); @@ -1272,6 +1276,9 @@ if ((aconf->status == CONF_UWORLD) && (aconf->passwd) && (*aconf->passwd)) addNickJupes(aconf->passwd); + if (aconf->status & CONF_SPOOF) + lookup_confhost(aconf); + collapse(aconf->host); collapse(aconf->name); Debug((DEBUG_NOTICE, @@ -1647,6 +1654,70 @@ c_conf->ipnum.s_addr = cli_ip(cptr).s_addr; Debug((DEBUG_DNS, "sv_cl: access ok: %s[%s]", cli_name(cptr), cli_sockhost(cptr))); + return 0; +} + +/* + * conf_check_slines() + * + * Check S lines for the specified client, passed in cptr struct. + * If the client's IP is S-lined, process the substitution here. + * 1. cptr->cli_ip (cli_ip(cptr)) + * 2. cptr->cli_connect->con_sock_ip (cli_sock_ip(cptr)) + * 3. cptr->cli_connect->sockhost (cli_sockhost(cptr)) + * + * If no substitued IP are specified, only change sockhost. + * + * Precondition + * cptr != NULL + * + * Returns + * 0 = No S-line found + * 1 = S-line found and substitution done. + * + * -mbuna 9/2001 + * + */ + +int +conf_check_slines(struct Client *cptr) +{ + struct ConfItem* aconf; + struct in_addr iptemp; + char* hostonly; + + for (aconf = GlobalConfList; aconf; aconf = aconf->next) { + if (aconf->status != CONF_SPOOF) + continue; + if ((aconf->dns_pending) + || (INADDR_NONE == aconf->ipnum.s_addr) + || EmptyString(aconf->name)) + continue; + + if (cli_ip(cptr).s_addr == aconf->ipnum.s_addr) { + + /* Ignore user part if u@h. */ + if ((hostonly = strchr(aconf->name, '@'))) + hostonly++; + else + hostonly = aconf->name; + + if(!*hostonly) + continue; + + if (!EmptyString(aconf->passwd)) { + iptemp.s_addr = inet_addr(aconf->passwd); + if (INADDR_NONE == iptemp.s_addr) + continue; + cli_ip(cptr).s_addr = iptemp.s_addr; + } + + /* Perform a luxurious ircd_ntoa for sanity. */ + ircd_strncpy(cli_sock_ip(cptr), ircd_ntoa((const char*) &cli_ip(cptr)), SOCKIPLEN); + ircd_strncpy(cli_sockhost(cptr), hostonly, HOSTLEN); + return 1; + } + } return 0; } diff -urdb ircd/s_user.c ircu2.10.11.06/ircd/s_user.c --- ircd/s_user.c Wed Jan 28 22:28:05 2004 +++ ircd/s_user.c Wed Jan 28 23:20:26 2004 @@ -422,7 +422,8 @@ clean_user_id(user->username, HasFlag(sptr, FLAG_GOTID) ? cli_username(sptr) : username, - HasFlag(sptr, FLAG_DOID) && !HasFlag(sptr, FLAG_GOTID)); + HasFlag(sptr, FLAG_DOID) && !HasFlag(sptr, FLAG_GOTID) + && !(HasSLine(sptr))); /* No tilde for S-lined users. */ if ((user->username[0] == '\0') || ((user->username[0] == '~') && (user->username[1] == '\000'))) ircd-ircu-2.10.12.10.dfsg1/configure.in0000644000175000017500000005705010347705422017154 0ustar madkissmadkissdnl Prefered emacs editing mode: -*- shell-script -*- dnl dnl Process this file with autoconf to produce a configure script. dnl dnl Copyright (c) 1997, by Carlo Wood dnl Copyright (C) 2001 Kevin L. Mitchell dnl dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 1, or (at your option) dnl any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. dnl dnl $Id: configure.in,v 1.34.2.1 2005/12/14 03:01:38 entrope Exp $ dnl Make sure we are in the correct directory (someone could have run dnl 'configure' with a wrong '--srcdir'). AC_INIT(ircd/ircd.c) dnl Set the default prefix AC_PREFIX_DEFAULT([$HOME]) AC_MSG_CHECKING([for installation prefix]) AC_CACHE_VAL(unet_cv_prefix, [unet_cv_prefix=$HOME]) if test x"$prefix" != xNONE; then unet_cv_prefix=$prefix fi AC_MSG_RESULT([$unet_cv_prefix]) dnl HACK WARNING: We are referencing an autoconf internal variable. This is dnl the only way to force the prefix to be retrieved from the config.cache dnl file! ac_default_prefix=$unet_cv_prefix dnl Define the input and output configuration header file. AC_CONFIG_HEADER([config.h]) dnl Demand at least version 2.59 of autoconf (for AS_HELP_STRING) AC_PREREQ(2.59) dnl Find out what type of system we are AC_CANONICAL_HOST dnl This should be done early. AC_PROG_CC dnl ANSIfy the C compiler whenever possible. AM_PROG_CC_STDC dnl Checks for libraries. dnl Locate the library containing crypt AC_SEARCH_LIBS(crypt, descrypt crypt, , [AC_MSG_ERROR([Unable to find library containing crypt()])]) dnl Do all the checks necessary to figure out -lnsl / -lsocket stuff AC_LIBRARY_NET dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS(crypt.h poll.h inttypes.h stdint.h sys/devpoll.h sys/epoll.h sys/event.h sys/param.h sys/resource.h sys/socket.h) dnl Checks for typedefs, structures, and compiler characteristics dnl AC_C_CONST AC_C_BIGENDIAN AC_TYPE_SIZE_T AC_HEADER_TIME AC_STRUCT_TM AC_TYPE_UID_T unet_CHECK_TYPE_SIZES AC_CHECK_TYPE(struct sockaddr_in6, [unet_have_sockaddr_in6="yes"], [unet_have_sockaddr_in6="no"], [#include #include ]) dnl Check for socklen_t. In traditional BSD this is an int, but some dnl OSes use a different type. Test until we find something that will dnl work properly. Test borrowed from a patch submitted for Python. AC_CHECK_TYPE([socklen_t], ,[ AC_MSG_CHECKING([for socklen_t equivalent]) AC_CACHE_VAL([curl_cv_socklen_t_equiv], [ dnl Systems have either "struct sockaddr*" or "void*" as second dnl arg to getpeername. curl_cv_socklen_t_equiv= for arg2 in "struct sockaddr" void ; do for t in int size_t unsigned long "unsigned long" ; do AC_TRY_COMPILE([#include #include int getpeername (int $arg2 *, $t *);],[$t len; getpeername(0, 0, &len);], [curl_cv_socklen_t_equiv="$t" break]) done done ]) AC_MSG_RESULT($curl_cv_socklen_t_equiv) AC_DEFINE_UNQUOTED(socklen_t, $curl_cv_socklen_t_equiv, [type to use in place of socklen_t if not defined])], [#include #include]) dnl Checks for library functions. AC_CHECK_FUNCS([kqueue setrlimit getrusage times]) dnl Do we have restarting syscalls ? AC_SYS_RESTARTABLE_SYSCALLS dnl Check for required features for admins? AC_MSG_CHECKING([for donuts]) AC_MSG_RESULT([yes]) dnl Test for programs AC_PROG_AWK AC_PROG_MAKE_SET AC_PROG_INSTALL AC_PROG_LN_S AC_PATH_PROGS(RMPROG, rm, /bin/rm) AC_PATH_PROGS(SHPROG, sh, /bin/sh) dnl (F)LEX - needed for the new conf file parser AC_PROG_LEX dnl The autoconf docs say $LEX defaults to 'lex'. They lie. if test "$LEX" = ":" ; then AC_MSG_ERROR([Cannot find flex.]) elif echo "" | $LEX -V -v --version > /dev/null 2>&1 ; then : else AC_MSG_ERROR([Cannot use $LEX as flex.]) fi if test -z "$LEXLIB" ; then AC_MSG_FAILURE([Cannot find a library with yywrap() in, but flex was found. It's possible the compiler you're using ($CC) is incompatible with the installed library.]) fi LIBS="$LEXLIB $LIBS" dnl YACC - ditto AC_PROG_YACC dnl The autoconf docs say $YACC defaults to 'yacc'. This seems to be true, dnl but judging from AC_PROG_LEX, it may not stay true. if test "$YACC" = ":" ; then AC_MSG_ERROR([Cannot find yacc.]) elif echo "" | $YACC -V -v --version > /dev/null 2>&1 ; then : else dnl byacc does not seem to have any way to test for workingness, so only warn. AC_MSG_WARN([$YACC may not work as yacc.]) fi unet_NONBLOCKING unet_SIGNALS dnl Check OS for os_dep files. AC_MSG_CHECKING(for OS-dependent information) case "$host" in *-linux*) AC_MSG_RESULT([Linux ($host) found.]) unet_poll_syscall=yes ;; *-solaris*) AC_MSG_RESULT([Solaris ($host) found.]) if test x"$ac_cv_header_poll_h" = xyes; then unet_poll_syscall=yes else unet_poll_syscall=no fi AC_DEFINE([IRCU_SOLARIS], 1, [Define if building on Solaris]) ;; *-sunos*) AC_MSG_RESULT([Solaris ($host) found.]) unet_poll_syscall=no ;; *-openbsd*) AC_MSG_RESULT([OpenBSD ($host) found.]) if test x"$ac_cv_header_poll_h" = xyes; then unet_poll_syscall=yes else unet_poll_syscall=no fi ;; *-*bsd*) AC_MSG_RESULT([Generic BSD ($host) found.]) if test x"$ac_cv_header_poll_h" = xyes; then unet_poll_syscall=yes else unet_poll_syscall=no fi ;; *-darwin*) AC_MSG_RESULT([Darwin (Mac OS X) ($host) found.]) unet_poll_syscall=no ;; *) AC_MSG_RESULT([Unknown system type $host found.]) AC_MSG_WARN([Unknown OS type; using generic routines.]) unet_poll_syscall=no ;; esac dnl Check user configuration options dnl Start with --enable-poll AC_MSG_CHECKING([whether to enable use of poll()]) AC_ARG_ENABLE([poll], [ --enable-poll Force poll to be used regardless of whether or not it is a system call], [unet_cv_enable_poll=$enable_poll], [AC_CACHE_VAL(unet_cv_enable_poll, [unet_cv_enable_poll=$unet_poll_syscall])]) # Force poll to be disabled if there is no poll.h if test x"$ac_cv_header_poll_h" != xyes; then unet_cv_enable_poll=no fi AC_MSG_RESULT([$unet_cv_enable_poll]) if test x"$unet_cv_enable_poll" = xyes; then AC_DEFINE([USE_POLL], 1, [Specify whether or not to use poll()]) ENGINE_C=engine_poll.c else ENGINE_C=engine_select.c fi AC_SUBST(ENGINE_C) dnl Now look for --enable-debug AC_MSG_CHECKING([whether to enable debug mode]) AC_ARG_ENABLE([debug], [ --enable-debug Turn on debugging mode], [unet_cv_enable_debug=$enable_debug], [AC_CACHE_VAL(unet_cv_enable_debug, [unet_cv_enable_debug=no])]) AC_MSG_RESULT([$unet_cv_enable_debug]) if test x"$unet_cv_enable_debug" = xyes; then AC_DEFINE([DEBUGMODE], 1, [Enable debugging code]) fi dnl Now look for --enable-leak-detect AC_MSG_CHECKING([whether to enable leak detection]) AC_ARG_WITH([leak-detect], [ --with-leak-detect Turn on the leak detector(requires patched boehm)], [unet_cv_with_leak_detect=$with_leak_detect], [AC_CACHE_VAL(unet_cv_with_leak_detect, [unet_cv_with_leak_detect=no])]) AC_MSG_RESULT([$unet_cv_enable_leak_detect]) if test x"$unet_cv_with_leak_detect" != xno; then LIBS="-lgc $LIBS" CFLAGS="-DMDEBUG $CFLAGS" if test x"$unet_cv_with_leak_detect" != xyes; then LIBS="-L$unet_cv_with_leak_detect $LIBS" fi fi AC_ARG_WITH([ipv6], AS_HELP_STRING([--without-ipv6], [disable IPv6 support (default is autodetect)]), [ac_cv_use_ipv6=$withval], [ac_cv_use_ipv6=$unet_have_sockaddr_in6]) AC_CACHE_CHECK([whether to use IPv6], [ac_cv_use_ipv6], [ac_cv_use_ipv6=no]) if test x"$ac_cv_use_ipv6" != "xno" ; then AC_DEFINE([IPV6], 1, [Enable IPv6 support]) fi dnl And now for --disable-asserts AC_MSG_CHECKING([whether to enable asserts]) AC_ARG_ENABLE([asserts], [ --disable-asserts Disable assertion checking], [unet_cv_enable_asserts=$enable_asserts], [AC_CACHE_VAL(unet_cv_enable_asserts, [unet_cv_enable_asserts=yes])]) AC_MSG_RESULT([$unet_cv_enable_asserts]) if test x"$unet_cv_enable_asserts" = xno; then AC_DEFINE([NDEBUG], 1, [Disable assertions]) fi dnl Now check for --enable-profile AC_MSG_CHECKING([whether to enable profiling support (gprof)]) AC_ARG_ENABLE([profile], [ --enable-profile Enable profiling support (add -pg to CFLAGS and LDFLAGS)], [unet_cv_enable_profile=$enable_profile], [AC_CACHE_VAL(unet_cv_enable_profile, [unet_cv_enable_profile=no])]) AC_MSG_RESULT([$unet_cv_enable_profile]) if test x"$unet_cv_enable_profile" = xyes; then CFLAGS="-pg $CFLAGS" LDFLAGS="-pg $LDFLAGS" fi dnl Now check for --enable-pedantic AC_MSG_CHECKING([whether to enable pedantic compiler warnings]) AC_ARG_ENABLE([pedantic], [ --enable-pedantic Enable pedantic warnings (add -pedantic to CFLAGS)], [unet_cv_enable_pedantic=$enable_pedantic], [AC_CACHE_VAL(unet_cv_enable_pedantic, [unet_cv_enable_pedantic=no])]) AC_MSG_RESULT([$unet_cv_enable_pedantic]) if test x"$unet_cv_enable_pedantic" = xyes; then CFLAGS="-pedantic $CFLAGS" fi dnl Now check for --enable-warnings AC_MSG_CHECKING([whether to enable compiler warnings]) AC_ARG_ENABLE([warnings], [ --enable-warnings Enable warnings (add -Wall to CFLAGS)], [unet_cv_enable_warnings=$enable_warnings], [AC_CACHE_VAL(unet_cv_enable_warnings, [unet_cv_enable_warnings=no])]) AC_MSG_RESULT([$unet_cv_enable_warnings]) if test x"$unet_cv_enable_warnings" = xyes; then CFLAGS="-Wall $CFLAGS" fi dnl --disable-inlines check... AC_MSG_CHECKING([whether to enable inlining for a few critical functions]) AC_ARG_ENABLE([inlines], [ --disable-inlines Disable inlining for a few critical functions], [unet_cv_enable_inlines=$enable_inlines], [AC_CACHE_VAL(unet_cv_enable_inlines, [unet_cv_enable_inlines=yes])]) AC_MSG_RESULT([$unet_cv_enable_inlines]) if test x"$unet_cv_enable_inlines" = xyes; then AC_DEFINE([FORCEINLINE], 1, [Force inlining for a few critical functions]) fi dnl --disable-devpoll check... AC_MSG_CHECKING([whether to enable the /dev/poll event engine]) AC_ARG_ENABLE([devpoll], [ --disable-devpoll Disable the /dev/poll-based engine], [unet_cv_enable_devpoll=$enable_devpoll], [AC_CACHE_VAL(unet_cv_enable_devpoll, [unet_cv_enable_devpoll=yes])]) if test x"$ac_cv_header_sys_devpoll_h" = xno; then unet_cv_enable_devpoll=no fi AC_MSG_RESULT([$unet_cv_enable_devpoll]) if test x"$unet_cv_enable_devpoll" != xno; then AC_DEFINE([USE_DEVPOLL], 1, [Define to enable the /dev/poll engine]) ENGINE_C="engine_devpoll.c $ENGINE_C" fi dnl --disable-kqueue check... AC_MSG_CHECKING([whether to enable the kqueue event engine]) AC_ARG_ENABLE([kqueue], [ --disable-kqueue Disable the kqueue-based engine], [unet_cv_enable_kqueue=$enable_kqueue], [AC_CACHE_VAL(unet_cv_enable_kqueue, [unet_cv_enable_kqueue=yes])]) if test x"$ac_cv_header_sys_event_h" = xno -o x"$ac_cv_func_kqueue" = xno; then unet_cv_enable_kqueue=no fi AC_MSG_RESULT([$unet_cv_enable_kqueue]) if test x"$unet_cv_enable_kqueue" != xno; then AC_DEFINE([USE_KQUEUE], 1, [Define to enable the kqueue engine]) ENGINE_C="engine_kqueue.c $ENGINE_C" fi dnl --disable-epoll check AC_MSG_CHECKING([whether to enable the epoll event engine]) AC_ARG_ENABLE([epoll], [ --disable-epoll Disable the epoll-based engine], [unet_cv_enable_epoll=$enable_epoll], [AC_CACHE_VAL(unet_cv_enable_epoll, [unet_cv_enable_epoll=yes])]) if test x"$ac_cv_header_sys_epoll_h" = xno -o x"$ac_cv_func_epoll" = xno; then unet_cv_enable_epoll=no fi AC_MSG_RESULT([$unet_cv_enable_epoll]) dnl If we have the header and user has not refused epoll, we still need dnl to check whether the functions are properly defined. if test x"$unet_cv_enable_epoll" != xno; then AC_MSG_CHECKING([whether epoll functions are properly defined]) AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], [epoll_create(10);])], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]) AC_DEFINE([EPOLL_NEED_BODY], 1, [Define to implement epoll system calls])]) AC_DEFINE([USE_EPOLL], 1, [Define to enable the epoll engine]) ENGINE_C="engine_epoll.c $ENGINE_C" fi dnl How to copy one va_list to another? AC_CACHE_CHECK([for va_copy], unet_cv_c_va_copy, [AC_LINK_IFELSE( [AC_LANG_PROGRAM([#include ], [va_list ap1, ap2; va_copy(ap1, ap2);])], [unet_cv_c_va_copy="yes"], [unet_cv_c_va_copy="no"] )]) if test "$unet_cv_c_va_copy" = "yes" ; then AC_DEFINE(HAVE_VA_COPY, 1, [Define if we have va_copy]) fi AC_CACHE_CHECK([for __va_copy], unet_cv_c___va_copy, [AC_LINK_IFELSE( [AC_LANG_PROGRAM([#include ], [va_list ap1, ap2; __va_copy(ap1, ap2);])], [unet_cv_c___va_copy="yes"], [unet_cv_c___va_copy="no"] )]) if test "$unet_cv_c___va_copy" = "yes" ; then AC_DEFINE(HAVE___VA_COPY, 1, [Define if we have __va_copy]) fi dnl --with-symlink lets us set the name of the symlink; defaults to "ircd" AC_MSG_CHECKING([what name to give the symlink]) AC_ARG_WITH([symlink], [ --with-symlink=name Name to give the symlink; if name is "no," no symlink will be created.], [unet_cv_with_symlink=$with_symlink], [AC_CACHE_VAL(unet_cv_with_symlink, [unet_cv_with_symlink="ircd"])]) if test x"$unet_cv_with_symlink" = xyes; then unet_cv_with_symlink="ircd" fi AC_MSG_RESULT([$unet_cv_with_symlink]) if test x"$unet_cv_with_symlink" = xno; then INSTALL_RULE=install-no-symlink SYMLINK= else INSTALL_RULE=install-with-symlink SYMLINK=$unet_cv_with_symlink fi AC_SUBST(INSTALL_RULE) AC_SUBST(SYMLINK) dnl --with-mode lets us set the permissions on the binary AC_MSG_CHECKING([what permissions to set on the installed binary]) AC_ARG_WITH([mode], [ --with-mode=mode Permissions (in octal) to give the binary], [unet_cv_with_mode=$with_mode], [AC_CACHE_VAL(unet_cv_with_mode, [unet_cv_with_mode=711])]) if test x"$unet_cv_with_mode" = xyes -o x"$unet_cv_with_mode" = xno; then unet_cv_with_mode=711 fi AC_MSG_RESULT([$unet_cv_with_mode]) IRCDMODE=$unet_cv_with_mode AC_SUBST(IRCDMODE) dnl --with-owner lets us set the owner of the binary changequote(,)dnl unet_uid=`id | sed -e 's/.*uid=[0-9]*(//' -e 's/).*//' 2> /dev/null` changequote([,])dnl AC_MSG_CHECKING([which user should own the installed binary]) AC_ARG_WITH([owner], [ --with-owner=owner Specify owner of the installed binary], [unet_cv_with_owner=$with_owner], [AC_CACHE_VAL(unet_cv_with_owner, [unet_cv_with_owner=$unet_uid])]) if test x"$unet_cv_with_owner" = xyes -o x"$unet_cv_with_owner" = xno; then unet_cv_with_owner=$unet_uid fi AC_MSG_RESULT([$unet_cv_with_owner]) IRCDOWN=$unet_cv_with_owner AC_SUBST(IRCDOWN) dnl --with-group lets us set the group owner of the binary changequote(,)dnl unet_gid=`id | sed -e 's/.*gid=[0-9]*(//' -e 's/).*//' 2> /dev/null` changequote([,])dnl AC_MSG_CHECKING([which group should own the installed binary]) AC_ARG_WITH([group], [ --with-group=group Specify group owner of the installed binary], [unet_cv_with_group=$with_group], [AC_CACHE_VAL(unet_cv_with_group, [unet_cv_with_group=$unet_gid])]) if test x"$unet_cv_with_group" = xyes -o x"$unet_cv_with_group" = xno; then unet_cv_with_group=$unet_gid fi AC_MSG_RESULT([$unet_cv_with_group]) IRCDGRP=$unet_cv_with_group AC_SUBST(IRCDGRP) dnl --with-domain lets us set the domain name for some statistics-gathering unet_domain= if test -f /etc/resolv.conf; then unet_domain=`awk '/^domain/ { print $2; exit }' /etc/resolv.conf` if test x"$unet_domain" = x; then unet_domain=`awk '/^search/ { print $2; exit }' /etc/resolv.conf` fi fi AC_MSG_CHECKING([for site domain name]) AC_ARG_WITH([domain], [ --with-domain=domain Domain name to use in local statistics gathering], [unet_cv_with_domain=$with_domain], [AC_CACHE_VAL(unet_cv_with_domain, [unet_cv_with_domain=$unet_domain])]) if test x"$unet_cv_with_domain" = xyes -o x"$unet_cv_with_domain" = xno; then unet_cv_with_domain=$unet_domain fi if test x"$unet_cv_with_domain" = xno; then AC_MSG_ERROR([Unable to determine server DNS domain; use --with-domain to set it]) fi AC_MSG_RESULT([$unet_cv_with_domain]) AC_DEFINE_UNQUOTED(DOMAINNAME, "*$unet_cv_with_domain", [Domain name to be used for some statistics gathering]) dnl --with-chroot lets us define a directory that we are going to be using dnl as the root of our filesystem AC_MSG_CHECKING([if chroot operation is desired]) AC_ARG_WITH([chroot], [ --with-chroot=dir Specify that the server will be operated under a different root directory given by dir. See doc/readme.chroot for more information.], [unet_cv_with_chroot=$with_chroot], [AC_CACHE_VAL(unet_cv_with_chroot, [unet_cv_with_chroot=no])]) if test x"$unet_cv_with_chroot" = xyes; then AC_MSG_ERROR([--with-chroot given with no directory. See doc/readme.chroot.]) fi # Ensure there are no trailing /'s to mess us up unet_cv_with_chroot=`echo "$unet_cv_with_chroot" | sed 's%/*$%%'` AC_MSG_RESULT([$unet_cv_with_chroot]) dnl Determine some default directory names dnl dnl HACK WARNING: We are referencing an autoconf internal variable. This is dnl the only way to figure out what value $prefix will have when we go to do dnl the install--and the only way we can stick that value in our definitions dnl of SPATH, etc. # Deal with the annoying value "NONE" here unet_save_prefix=$prefix if test x"$prefix" = xNONE; then prefix=$ac_default_prefix else prefix=$prefix fi unet_save_exec_prefix=$exec_prefix if test x"$exec_prefix" = xNONE; then exec_prefix=$prefix else exec_prefix=$exec_prefix fi # Obtain the actual interesting directories unet_bindir=`eval echo "$bindir"` unet_libdir=`eval echo "$libdir"` # Restore the original settings of $prefix and $exec_prefix prefix=$unet_save_prefix exec_prefix=$unet_save_exec_prefix dnl Now compute the name of the binary and verify that it will work under dnl chroot operation AC_MSG_CHECKING([where the binary will be for /restart]) if test x"$unet_cv_with_symlink" = xno; then unet_spath="$unet_bindir/ircd" else unet_spath="$unet_bindir/$unet_cv_with_symlink" fi AC_MSG_RESULT([$unet_spath]) if test x"$unet_cv_with_chroot" != xno; then if echo "$unet_spath" | grep "^$unet_cv_with_chroot" > /dev/null 2>&1; then unet_spath=`echo "$unet_spath" | sed "s%^$unet_cv_with_chroot%%"` else AC_MSG_WARN([Binary $unet_spath not relative to root directory $unet_cv_with_chroot; restarts will probably fail]) fi fi AC_DEFINE_UNQUOTED(SPATH, "$unet_spath", [Path to executable for restarts]) dnl --with-dpath sets the all-important DPATH AC_MSG_CHECKING([what the data directory should be]) AC_ARG_WITH([dpath], [ --with-dpath=dir Directory for all server data files], [unet_cv_with_dpath=$with_dpath], [AC_CACHE_VAL(unet_cv_with_dpath, [unet_cv_with_dpath=$unet_libdir])]) if test x"$unet_cv_with_dpath" = xyes -o x"$unet_cv_with_dpath" = xno; then unet_cv_with_dpath=$unet_libdir fi # Ensure there are no trailing /'s to mess us up unet_cv_with_dpath=`echo "$unet_cv_with_dpath" | sed 's%/*$%%'` AC_MSG_RESULT([$unet_cv_with_dpath]) if test x"$unet_cv_with_chroot" != xno; then if echo "$unet_cv_with_dpath" | grep "^$unet_cv_with_chroot" > /dev/null 2>&1; then unet_dpath=`echo "$unet_cv_with_dpath" | sed "s%^$unet_cv_with_chroot%%"` else AC_MSG_ERROR([Data directory $unet_cv_with_dpath not relative to root directory $unet_cv_with_chroot]) fi else unet_dpath=$unet_cv_with_dpath fi AC_DEFINE_UNQUOTED(DPATH, "$unet_dpath", [Path to data directory]) DPATH=$unet_cv_with_dpath AC_SUBST(DPATH) dnl --with-cpath allows us to specify the configuration file AC_MSG_CHECKING([where the default configuration file resides]) AC_ARG_WITH([cpath], [ --with-cpath=file Set server configuration file], [unet_cv_with_cpath=$with_cpath], [AC_CACHE_VAL(unet_cv_with_cpath, [unet_cv_with_cpath="ircd.conf"])]) if test x"$unet_cv_with_cpath" = xyes -o x"$unet_cv_with_cpath" = xno; then unet_cv_with_cpath="ircd.conf" fi AC_MSG_RESULT([$unet_cv_with_cpath]) if echo "$unet_cv_with_cpath" | grep '^/' > /dev/null 2>&1; then # Absolute path; check against chroot stuff if test x"$unet_cv_with_chroot" != xno; then if echo "$unet_cv_with_cpath" | grep "^$unet_cv_with_chroot" > /dev/null 2>&1; then unet_cpath=`echo "$unet_cv_with_cpath" | sed "s%^$unet_cv_with_chroot%%"` else AC_MSG_ERROR([Configuration file $unet_cv_with_cpath not relative to root directory $unet_cv_with_chroot]) fi else unet_cpath=$unet_cv_with_cpath fi else unet_cpath=$unet_cv_with_cpath fi AC_DEFINE_UNQUOTED(CPATH, "$unet_cpath", [Configuration file name]) dnl --with-lpath allows us to specify the default debugging log file AC_MSG_CHECKING([where to put the debugging log if debugging enabled]) AC_ARG_WITH([lpath], [ --with-lpath=file Set the debugging log file], [unet_cv_with_lpath=$with_lpath], [AC_CACHE_VAL(unet_cv_with_lpath, [unet_cv_with_lpath="ircd.log"])]) if test x"$unet_cv_with_lpath" = xyes -o x"$unet_cv_with_lpath" = xno; then unet_cv_with_lpath="ircd.log" fi AC_MSG_RESULT([$unet_cv_with_lpath]) if echo "$unet_cv_with_lpath" | grep '^/' > /dev/null 2>&1; then # Absolute path; check against chroot stuff if test x"$unet_cv_with_chroot" != xno; then if echo "$unet_cv_with_lpath" | grep "^$unet_cv_with_chroot" > /dev/null 2>&1; then unet_lpath=`echo "$unet_cv_with_lpath" | sed "s%^$unet_cv_with_chroot%%"` else AC_MSG_WARN([Log file $unet_cv_with_lpath not relative to root directory $unet_cv_with_chroot; using default ircd.log instead]) unet_cv_with_lpath="ircd.log" unet_lpath="ircd.log" fi else unet_lpath=$unet_cv_with_lpath fi else unet_lpath=$unet_cv_with_lpath fi AC_DEFINE_UNQUOTED(LPATH, "$unet_lpath", [Path to debugging log file]) dnl --with-maxcon allows us to set the maximum connections unet_maxcon=`ulimit -Hn` if test x"$unet_maxcon" = xunlimited; then unet_maxcon=`ulimit -Sn` fi unet_maxcon=`expr $unet_maxcon - 4` AC_MSG_CHECKING([max connections]) AC_ARG_WITH([maxcon], [ --with-maxcon=maxcon Maximum number of connections server will accept], [unet_cv_with_maxcon=$with_maxcon], [AC_CACHE_VAL(unet_cv_with_maxcon, [unet_cv_with_maxcon=$unet_maxcon])]) if test x"$unet_cv_with_maxcon" = xyes -o x"$unet_cv_with_maxcon" = xno; then unet_cv_with_maxcon=$unet_maxcon fi AC_MSG_RESULT([$unet_cv_with_maxcon]) AC_DEFINE_UNQUOTED(MAXCONNECTIONS, $unet_cv_with_maxcon, [Maximum number of network connections]) dnl Finally really generate all output files: AC_OUTPUT(Makefile ircd/Makefile ircd/test/Makefile doc/Makefile, [echo timestamp > stamp-h]) dnl Report configuration AC_OUTPUT_COMMANDS([echo " ircu is now hopefully configured for your system. Host system: $host_os Prefix: $prefix Asserts: $unet_cv_enable_asserts Warnings: $unet_cv_enable_warnings Debug: $unet_cv_enable_debug Profile: $unet_cv_enable_profile Owner/mode: $unet_cv_with_owner.$unet_cv_with_group ($unet_cv_with_mode) Chroot: $unet_cv_with_chroot Domain: $unet_cv_with_domain DPath: $unet_cv_with_dpath CPath: $unet_cv_with_cpath LPath: $unet_cv_with_lpath Maximum connections: $unet_cv_with_maxcon poll() engine: $unet_cv_enable_poll kqueue() engine: $unet_cv_enable_kqueue /dev/poll engine: $unet_cv_enable_devpoll epoll() engine: $unet_cv_enable_epoll "]) ircd-ircu-2.10.12.10.dfsg1/ChangeLog.110000644000175000017500000042707607416546144016655 0ustar madkissmadkiss2002-01-08 Perry Lorier * Fixed the build system -- MAKEFILES is *not* a variable you can just use in a makefile :) * Added "Quit: " prefix to quit messages. 2001-10-14 Perry Lorier * Minor fixes to the below 2001-09-21 Perry Lorier * ircd/send.c and various: replace sendcmdto_flag_butone with sendwallto_group_butone 2001-09-21 Vampire- * ircd/ircd_string.c: unique_name_vector round II. 2001-09-21 mbuna * configure.in: Add support for darwin 2001-09-21 Perry Lorier * ircd/s_user.c I'm stupid, s/acptr/from/, Hektik pointed it out 2001-09-20 Perry Lorier * Pullups from 2.10.10.pl16 * Added some warnings, and the concept of rate limited snotices 2001-08-31 Kevin L Mitchell * ircd/channel.c: use "%u" to format limit arguments; use strtoul() to process limit arguments in a /mode command--note: most clients seem to truncate the integer, probably because they're using atoi, and perhaps signed ints 2001-08-17 Kevin L Mitchell * ircd/numnicks.c: include stdlib.h for exit() * ircd/ircd_log.c: include stdlib.h for exit() * ircd/ircd_events.c: include stdlib.h for exit() * ircd/s_stats.c: remove description of /stats v, since it's gone * ircd/m_wallops.c (mo_wallops): add "*" to the beginning of /wallops to distinguish wallops from wallusers * ircd/m_error.c (mr_error): ignore ERROR from clients that aren't in the "handshake" or "connecting" states--I think the latter will never happen, but... * doc/Authors: apply delete's Authors patch * RELEASE.NOTES: rewrite RELEASE.NOTES, basing it a little on Braden's version * README: rewrite README 2001-07-31 Kevin L. Mitchell * ircd/s_serv.c (server_estab): remove unused variable split * ircd/parse.c: add mr_error to the parse table * ircd/m_error.c (mr_error): add mr_error() to handle ERRORs from unregistered connections--if IsUserPort() is true, the ERROR is ignored, otherwise, the message is saved 2001-07-28 Kevin L. Mitchell * ircd/m_kill.c (ms_kill): another minor typo *sigh* * ircd/s_user.c (send_supported): oops, minor typo... * ircd/s_user.c: implement send_supported() to send two ISUPPORT messages containing our feature buffers; make register_user() use send_supported() * ircd/s_misc.c (exit_client): make sure not to give away a remote server in the ERROR message sent to the client; if the killer is a server, we substitute our name in its place * ircd/m_version.c (m_version): use send_supported() to send the ISUPPORT values to the user * ircd/m_nick.c: shave nick collision kills here a bit, too, for the same reasons as for m_kill.c * ircd/m_kill.c: shave kills a bit so that the results look exactly the same no matter where you are; if we didn't do this, it would be possible to map the network by looking at the differences between kills originating under various circumstances * include/supported.h: split the features into two, so as to not bust the parameter count when sending the features list * include/s_user.h: declare new send_supported() function to send the ISUPPORT information 2001-07-27 Kevin L. Mitchell * ircd/s_bsd.c: disable IP (*not* TCP) options to prevent source-routed spoofing attacks; this is only available under u2.10.11, so don't even bother, since no one but testers are using the source base 2001-07-25 Kevin L. Mitchell * include/ircd_policy.h: enable HEAD_IN_SAND_REMOTE by default * ircd/s_err.c: put in a . for reporting link version on /trace, to match what /version does 2001-07-21 Kevin L. Mitchell * ircd/s_misc.c (exit_client): servers don't understand what the numeric nick ERROR is supposed to mean, so they ignore error messages, resulting in not knowing why we were rejected; use sendcmdto_one for servers and sendrawto_one for clients 2001-07-17 Kevin L. Mitchell * ircd/m_burst.c (ms_burst): in the case of a modeless channel and a nick collide, a bare BURST may be propagated; adjust the enforced parameter count to accept the bare BURST 2001-07-12 Kevin L. Mitchell * ircd/s_bsd.c: mark a client as having been IP checked * ircd/IPcheck.c (ip_registry_check_remote): remove unneeded second call to SetIPChecked() 2001-07-11 Kevin L. Mitchell * ircd/engine_poll.c: deal with POLLHUP properly (hopefully) * ircd/engine_devpoll.c: deal with POLLHUP properly (hopefully) 2001-07-09 Kevin L. Mitchell * ircd/os_bsd.c (os_get_rusage): move buf into the two ifdef'd sections so that if neither is used, the declaration of buf will not elicit an "unused variable" warning under NetBSD * ircd/m_map.c: include string.h to declare strcpy (fix warnings on alpha) * ircd/m_away.c: include string.h to declare strcpy/strlen (fix warnings on alpha) * ircd/ircd_log.c: include string.h to declare strcpy/strlen (fix warnings on alpha) * ircd/client.c: include string.h to declare memset (fix warnings on alpha) * ircd/channel.c: remove unused functions next_overlapped_ban, del_banid, and is_deopped (fix warnings under -O1) * ircd/IPcheck.c: include string.h to declare memset/memcpy (fix warnings on alpha) 2001-06-29 Kevin L. Mitchell * ircd/s_user.c (set_user_mode): clear the snomask if the user isn't supposed to receive server notices anymore * ircd/ircd_features.c: change CONFIG_OPERCMDS to default to FALSE * configure.in: use AC_MSG_CHECKING/AC_MSG_RESULT when checking installation prefix; default devpoll and kqueue to on (they get turned off if the required headers aren't present) * ircd/whocmds.c (do_who): use ircd_snprintf() instead of sprintf_irc(); it's a bit hackish, but it'll do for now * ircd/support.c: remove unused #include * ircd/send.c: remove unused #include * ircd/s_user.c: use ircd_snprintf() instead of sprintf_irc() * ircd/s_serv.c: remove unused #include * ircd/s_misc.c: use ircd_snprintf() and friends instead of sprintf_irc() and friends * ircd/s_err.c: moved atoi_tab[] from ircd/sprintf_irc.c to ircd/s_err.c, which is the only other file to refer to it * ircd/s_conf.c (conf_add_deny): use ircd_snprintf() instead of sprintf_irc() * ircd/s_bsd.c (connect_server): use ircd_snprintf() instead of sprintf_irc() * ircd/s_auth.c: use ircd_snprintf() instead of sprintf_irc() * ircd/res.c: use ircd_snprintf() instead of sprintf_irc() * ircd/m_version.c: use ircd_snprintf() instead of sprintf_irc() * ircd/m_kill.c: use ircd_snprintf() instead of sprintf_irc() * ircd/listener.c: use ircd_snprintf() instead of sprintf_irc() * ircd/gline.c: use ircd_snprintf() instead of sprintf_irc() * ircd/channel.c: don't include sprintf_irc.h; use ircd_snprintf() instead of sprintf_irc() * ircd/Makefile.in: remove sprintf_irc.c from sources list; run make depend * include/ircd_string.h: remove declaration of sprintf_irc() (what was it doing here anyway?) * include/sprintf_irc.h: removed unneeded source file * ircd/sprintf_irc.c: removed unneeded source file * ircd/s_debug.c (count_memory): remove some dead code * ircd/s_auth.c: remove some dead code * ircd/res.c (update_list): remove some dead code * ircd/m_whowas.c: remove some dead code * ircd/m_whois.c: remove some dead code * ircd/m_who.c: remove some dead code * ircd/m_wallusers.c: remove some dead code * ircd/m_wallops.c: remove some dead code * ircd/m_wallchops.c: remove some dead code * ircd/m_version.c: remove some dead code * ircd/m_userip.c: remove some dead code * ircd/m_userhost.c: remove some dead code * ircd/m_uping.c: remove some dead code * ircd/m_trace.c: remove some dead code * ircd/m_topic.c: remove some dead code * ircd/m_tmpl.c: remove some dead code * ircd/m_time.c: remove some dead code * ircd/m_squit.c: remove some dead code * ircd/m_silence.c: remove some dead code * ircd/m_settime.c: remove some dead code * ircd/m_set.c: remove some dead code * ircd/m_server.c: remove some dead code * ircd/m_rpong.c: remove some dead code * ircd/m_rping.c: remove some dead code * ircd/m_restart.c: remove some dead code * ircd/m_reset.c: remove some dead code * ircd/m_rehash.c: remove some dead code * ircd/m_quit.c: remove some dead code * ircd/m_proto.c: remove some dead code * ircd/m_privs.c: remove some dead code * ircd/m_privmsg.c: remove some dead code * ircd/m_pong.c: remove some dead code * ircd/m_ping.c: remove some dead code * ircd/m_pass.c: remove some dead code * ircd/m_part.c: remove some dead code * ircd/m_opmode.c: remove some dead code * ircd/m_oper.c: remove some dead code * ircd/m_notice.c: remove some dead code * ircd/m_nick.c: remove some dead code * ircd/m_map.c: remove some dead code * ircd/m_lusers.c: remove some dead code * ircd/m_list.c: remove some dead code * ircd/m_links.c: remove some dead code * ircd/m_kill.c: remove some dead code * ircd/m_kick.c: remove some dead code * ircd/m_jupe.c: remove some dead code * ircd/m_join.c: remove some dead code * ircd/m_ison.c: remove some dead code * ircd/m_invite.c: remove some dead code * ircd/m_info.c: remove some dead code * ircd/m_help.c: remove some dead code * ircd/m_gline.c: remove some dead code * ircd/m_get.c: remove some dead code * ircd/m_error.c: remove some dead code * ircd/m_endburst.c: remove some dead code * ircd/m_die.c: remove some dead code * ircd/m_desynch.c: remove some dead code * ircd/m_destruct.c: remove some dead code * ircd/m_defaults.c: remove some dead code * ircd/m_create.c: remove some dead code, along with an #if 1 * ircd/m_cprivmsg.c: remove some dead code * ircd/m_connect.c: remove some dead code * ircd/m_close.c: remove some dead code * ircd/m_clearmode.c: remove some dead code * ircd/m_burst.c: remove some dead code * ircd/m_away.c: remove some dead code * ircd/m_admin.c: remove some dead code * ircd/listener.c (accept_connection): remove some dead code * ircd/ircd_reply.c (need_more_params): remove some dead code * ircd/channel.c (add_banid): remove some dead code * include/support.h: remove some dead code * include/querycmds.h: remove some dead code * doc/readme.chroot: document how to do chroot operation 2001-06-28 Kevin L. Mitchell * ircd/Makefile.in: tune for VPATH builds/installs; add a rule to force bin directory to be created if necessary prior to installation; run make depend * doc/Makefile.in (install): tune for VPATH installs by cd'ing to the ${srcdir} * Makefile.in: tune to detect Makefile.in changes in subdirectories and to create installation directory indicated by ${prefix} * ircd/whocmds.c (count_users): routine to count the number of users matching a given user@host mask * ircd/s_err.c: add error messages for ERR_LONGMASK, ERR_TOOMANYUSERS, and ERR_MASKTOOWIDE * ircd/m_gline.c: look for and advance past '!' flag on G-lines from operators; only set GLINE_OPERFORCE flag if oper has the PRIV_WIDE_GLINE privilege * ircd/ircd_features.c: add GLINEMAXUSERCOUNT, which is the maximum number of users a G-line can impact before it has to be forced; OPER_WIDE_GLINE, to allow operators to use ! to force a wide G-line to be set; and LOCOP_WIDE_GLINE, to allow local operators to use ! to force a wide G-line to be set * ircd/gline.c: make make_gline() be called with separate user and host arguments, and not call canon_userhost() directly; implement gline_checkmask() to verify that a host mask is acceptable; move BADCHAN check up in gline_add(), and check passed-in mask under certain circumstances for acceptability; fix call to sendto_opmask_butone() to handle separation of userhost into user and host in gline_add(); update call to make_gline() * ircd/client.c: use FEAT_OPER_WIDE_GLINE and FEAT_LOCOP_WIDE_GLINE to set PRIV_WIDE_GLINE for an operator; add PRIV_WIDE_GLINE to privtab[] for client_report_privs() * include/whocmds.h (count_users): declare routine to count users matching a given user@host mask * include/numeric.h: added three new error returns: ERR_LONGMASK -- mask can't be formatted into a buffer; ERR_TOOMANYUSERS -- too many users would be impacted by the mask; ERR_MASKTOOWIDE -- mask contains wildcards in the wrong places * include/ircd_features.h: add FEAT_GLINEMAXUSERCOUNT, FEAT_OPER_WIDE_GLINE, and FEAT_LOCOP_WIDE_GLINE * include/gline.h (GLINE_OPERFORCE): provides a way for m_gline() to signal to gline_add() that the operator attempted to force the G-line to be set * include/client.h (PRIV_WIDE_GLINE): new privilege for operators * doc/readme.gline: update to document new "!" prefix to a G-line user@host mask * doc/readme.features: document GLINEMAXUSERCOUNT, OPER_WIDE_GLINE, and LOCOP_WIDE_GLINE * doc/example.conf: update to mention new features along with their defaults 2001-06-27 Kevin L. Mitchell * doc/example.conf: updated example.conf from Braden * include/supported.h: forward-port from pl15 2001-06-25 Kevin L. Mitchell * ircd/whocmds.c: include ircd_policy.h and implement HEAD_IN_SAND_WHO_OPCOUNT--forward-port from pl15 * ircd/m_whois.c: forward-port of the idle-time hiding code from pl15; this also required passing parc into do_whois(), which also meant passing parc into do_wilds()--*sigh* * include/ircd_policy.h: add a couple more HEAD_IN_SAND #define's--WHOIS_IDLETIME and WHO_HOPCOUNT 2001-06-22 Kevin L. Mitchell * tools/wrapper.c: add a wrapper program that can be used to adjust file descriptor limits and root directories; program must be run as root--NOT SETUID!--and given appropriate -u arguments * doc/readme.log: documentation of how to configure logging * doc/readme.features: documentation of each feature (except for logging) 2001-06-21 Kevin L. Mitchell * Makefile.in (config): add a deprecation notice with a pointer to tools/transition * tools/transition: shell script to convert old compile-time options into new compile-time options and appropriate F-lines * tools/mkchroot: shell-script to prepare the chroot area by copying over all the necessary libraries so they can be found 2001-06-20 Kevin L. Mitchell * INSTALL: partial update of INSTALL for u2.10.11 release... 2001-06-14 Kevin L. Mitchell * ircd/table_gen.c (makeTables): finally got tired of the "overflow in implicit conversion" warning, so just got rid of it by explicitly casting UCHAR_MAX to a (default) char; diffs show no differences in the tables generated 2001-06-11 Kevin L. Mitchell * ircd/send.c (sendcmdto_match_butone): don't let the server crash if a client is in the STAT_CONNECTING status 2001-06-10 Kevin L. Mitchell * ircd/send.c: remove unused vsendcmdto_one(), consolidating it into sendcmdto_one(); define new sendcmdto_prio_one(), which places the message into the priority queue * ircd/s_user.c (hunt_server_prio_cmd): definition of hunt_server_prio_cmd(), which simply calls sendcmdto_prio_one() instead of sendcmdto_one() * ircd/m_settime.c: use sendcmdto_prio_one() and hunt_server_prio_cmd() to send SETTIME * ircd/m_server.c: use sendcmdto_prio_one() to send SETTIME * include/send.h: removed declaration for unused vsendcmdto_one(); added a declaration for sendcmdto_prio_one() * include/s_user.h: declare hunt_server_prio_cmd(), which calls sendcmdto_prio_one() * ircd/send.c (sendcmdto_flag_butone): oops; /wallops should be put in the server's priority queue, too... * ircd/ircd.c: don't check LPATH for accessibility at all 2001-06-08 Kevin L. Mitchell * ircd/s_serv.c (server_estab): send a +h flag in our SERVER command if we're configured as a hub; send individual server flags in SERVER commands * ircd/s_bsd.c (completed_connection): send a +h flag in our SERVER command if we're configured as a hub * ircd/m_server.c: implement parv[7] as a mode-like string; +h sets the FLAGS_HUB flag for a server; +s sets the FLAGS_SERVICE flag for a server; +hs sets both flags; also modify CMD_SERVER format string to send the flags * include/client.h: define two new flags, FLAGS_HUB and FLAGS_SERVICE to mark services and hubs as such; define testing macros, setting macros * ircd/s_user.c: remove deprecated struct Gline* argument to register_user(); remove GLINE rebroadcast; do not send GLINE acknowledgement parameter to NICK; do not look for GLINE acknowledgement parameter to NICK while parsing * ircd/s_serv.c (server_estab): remove deprecated struct Jupe* argument to server_estab(); do not send JUPE/GLINE acknowledgement parameters for SERVER or NICK * ircd/m_user.c (m_user): remove deprecated argument to register_user() * ircd/m_server.c: remove deprecated argument to server_estab(); remove documentation comment regarding JUPE acknowledgement parameter to SERVER; remove JUPE rebroadcast * ircd/m_pong.c (mr_pong): remove deprecated argument to register_user() * ircd/m_nick.c: remove documentation comment regarding GLINE acknowledgement parameter to NICK * ircd/jupe.c: use user's real name in JUPE server notices if HEAD_IN_SAND_SNOTICES is defined * ircd/ircd.c: remove deprecated chroot() code; remove deprecated setuid code; correct ancient DEBUG vs DEBUGMODE typo * ircd/gline.c: use user's real name in GLINE server notices if HEAD_IN_SAND_SNOTICES is defined * ircd/channel.c (modebuf_flush_int): make apparent source be local server, not oper's server; use user's real name in hack notices and DESYNC notices if HEAD_IN_SAND_SNOTICES is defined * include/s_user.h: remove struct Gline pre-declaration; remove deprecated struct Gline argument from register_user() * include/s_serv.h: remove struct Jupe pre-declaration; remove deprecated struct Jupe argument from server_estab() 2001-06-07 Kevin L. Mitchell * ircd/s_stats.c (hunt_stats): forward-port from pl15 of all the changes required to control remote stats * ircd/s_numeric.c (do_numeric): rewrite numeric origins if recipient is not an operator and HEAD_IN_SAND_REWRITE is defined [forward-port from pl15] * ircd/m_whowas.c (m_whowas): report server name only if requester is an operator [forward-port from pl15] * ircd/m_whois.c (do_whois): /whois now correctly reports my server; if HEAD_IN_SAND_REMOTE is 1, ignore the middle argument and obtain the report from the user's server [forward-port from pl15] * ircd/m_who.c: add missing include for ircd_policy.h [forward-port from pl15] * ircd/m_version.c (m_version): require oper access for remote /version if HEAD_IN_SAND_REMOTE is 1 [forward-port from pl15] * ircd/m_time.c (m_time): require oper access for remote /time if HEAD_IN_SAND_REMOTE is 1 [forward-port from pl15] * ircd/m_stats.c: pass extra argument to hunt_stats(); correct missing semicolon [forward-port from pl15] * ircd/m_nick.c (ms_nick): hide the origin of certain collision kills [forward-port from pl15] * ircd/m_motd.c (m_motd): require oper access for remote /motd if HEAD_IN_SAND_REMOTE is 1 [forward-port from pl15] * ircd/m_lusers.c (m_lusers): require oper access for remote /lusers if HEAD_IN_SAND_REMOTE is 1 [forward-port from pl15] * ircd/m_burst.c (ms_burst): server-added bans are stored using local server name, to hide remote server names; modes also are to originate from the local server [forward-port from pl15] * ircd/m_admin.c (m_admin): require oper access for remote /admin if HEAD_IN_SAND_REMOTE is 1 [forward-port from pl15] * ircd/channel.c (add_banid): if a server is adding a ban, use my server name to hide the remote server's name [forward-port from pl15] * ircd/Makefile.in: ran make depend * include/s_stats.h: hunt_stats() has to have an extra argument to support the forward-port from pl15 * include/ircd_policy.h: #define HEAD_IN_SAND_STATS_P; add HEAD_IN_SAND_{BANWHO,REWRITE,REMOTE} [forward-port from pl15] * ircd/engine_poll.c (engine_loop): remove bogus assert that I forgot to check in the events branch 2001-06-06 Kevin L. Mitchell * ircd/res.c (init_resolver): don't start DNS expires with a 0 relative timeout--if the server starts slow, timeouts could be messy...there's probably a better solution, but this'll do for now * ircd/os_solaris.c: _XOPEN_SOURCE doesn't get along with Solaris headers very well; include stropts.h; define an os_set_tos() * ircd/os_generic.c (os_set_tos): added an os_set_tos() for os_generic.c * ircd/ircd.c: if there are no C-lines, we don't want to have a timer that expires at the absolute time of 0--it kinda blocks all the other timers! * ircd/engine_devpoll.c: some includes for open(); declare errcode and codesize in engine_loop() * ircd/list.c (free_client): remove bogus check on timer active flag * ircd/s_auth.c: pull out destruction code in auth_timeout_request() into an externally-visible destroy_auth_request(); manage cli_auth pointer in client structure; use it for an extra assertion check * ircd/list.c: include s_auth.h for destroy_auth_request(); add debugging notices to show flow when deallocating connections/clients; call destroy_auth_request() when free'ing a client that has an auth outstanding; don't free the connection if the process timer is unmarked but still active * ircd/ircd_events.c: set GEN_ACTIVE when initializing a generator and reset it before calling the event handler for an ET_DESTROY event * include/s_auth.h (destroy_auth_request): declare destroy_auth_request(), which can be used to destroy an outstanding auth request if a client socket goes away before the auth exchange is completed * include/ircd_events.h: add an active flag to keep track of whether or not particular generators are active, for the convenience of functions using the API * include/client.h: add a pointer for auth requests to struct Connection so we can kill outstanding auth requests if a client socket closes unexpectedly * ircd/s_bsd.c: cli_connect() could become 0 during the course of the sock or timer callback; take that into account in the assert * ircd/list.c: add magic number checking and setting--magic numbers are zero'd on frees to detect double-frees; add back setting of cli_from() to 0 to break the back-link from the struct Connection (duh) * ircd/ircd.c: set me's magic number correctly * include/client.h: define magic numbers and accessor/verifier macros * ircd/list.c: assert that dealloc_client() is called with cli_connect(cptr) == 0; set cli_connect(cptr) to 0 before calling dealloc_client(); don't mess with cli_from(cptr) * ircd/s_bsd.c: only attempt to dealloc a connection if the associated client has already been destroyed, or at least delinked 2001-06-05 Kevin L. Mitchell * ircd/list.c (free_client): only try to delete the socket when the fd hasn't already been closed, avoiding a double-free * ircd/list.c (free_connection): make sure the client is really gone before doing away with the connection * ircd/s_bsd.c: record that socket has been added in con_freeflag field; queue a socket_del() as soon as the socket is close()'d; use con_freeflag & FREEFLAG_TIMER instead of con_timer; clear FREEFLAG_SOCKET on ET_DESTROY event in client_sock_callback(), then dealloc the connection if safe; mark socket as dead when there's a read error or EOF; clear FREEFLAG_TIMER flag upon entry to client_timer_callback(); dealloc connection if safe upon ET_DESTROY event in client_timer_callback() * ircd/list.c: use con_freeflag instead of con_timer; only dealloc the connection if both socket and timer have been destroyed; destroy both socket and timer explicitly and carefully * include/client.h: replace the con_timer field with a con_freeflag field, to indicate what still needs freeing; define the freeflags * ircd/engine_select.c (engine_loop): duh...sockList[i] could become 0 * ircd/engine_devpoll.c (engine_loop): duh...sockList[i] could become 0 * ircd/s_bsd.c: add some extra assertions to try to track down a corruption problem * ircd/engine_select.c (engine_loop): add an extra assert to try to track down a corruption problem * ircd/engine_poll.c (engine_loop): add an extra assert to try to track down a corruption problem * ircd/engine_kqueue.c (engine_loop): add an extra assert to try to track down a corruption problem * ircd/engine_devpoll.c (engine_loop): skip slots that have become empty during processing; add an extra assert to try to track down a corruption problem * ircd/engine_kqueue.c (engine_delete): make sure to zero deleted entries 2001-06-04 Kevin L. Mitchell * ircd/s_bsd.c (client_sock_callback): client is no longer blocked, so we must mark it as unblocked * ircd/engine_select.c: add Debug() calls galore; add handling for SS_NOTSOCK; use a dummy sock variable to keep things from disappearing on us; correct timeout calculation; update nfds for efficiency * ircd/engine_poll.c: use new debugging level (DEBUG_ENGINE); remove a spurious "if (sock)" which will always be true; update nfds for efficiency * ircd/engine_kqueue.c: add Debug() calls galore; add handling for SS_NOTSOCK (just in case); correct timeout calculation * ircd/engine_devpoll.c: add Debug() calls galore; add handling for SS_NOTSOCK; correct timeout calculation; add EAGAIN handling * include/s_debug.h (DEBUG_ENGINE): add new debugging level; pretty-indent numbers * ircd/engine_poll.c (engine_loop): break out SS_NOTSOCK case--it's not a socket; the check for writability is most likely not needed, but present for completeness 2001-05-24 Kevin L. Mitchell * ircd/s_bsd.c: add Debug messages; call read_packet() even if the no newline flag is set; call read_packet() when the timer expires, regardless of what's in the buffer--read_packet() should be able to deal properly * ircd/IPcheck.c (ip_registry_connect_succeeded): correct a NOTICE sent to clients to include the client nickname (duh) * ircd/ircd_events.c: don't destroy a timer if it's already marked for destruction; replace a missing ! in socket_del() * ircd/engine_poll.c (engine_loop): reference a temporary variable so we don't have to worry about sockList[i] going away * ircd/s_bsd.c (client_sock_callback): add Debug messages * ircd/s_auth.c: add Debug messages all over the place * ircd/ircd_events.c: add and edit some Debug messages; add a list of routines to convert some of the enums and flags from numbers into human-readable strings for the Debug messages * ircd/engine_poll.c: hack some Debug messages to use the new name conversion routines in ircd_events.c; add an extra assert for a condition that shouldn't ever happen; apparently recv() can return EAGAIN when poll() returns readable--I wonder why... * include/ircd_events.h: declare some helper routines under DEBUGMODE 2001-05-23 Kevin L. Mitchell * ircd/s_bsd.c (client_sock_callback): add an extra assertion check * ircd/s_auth.c: add more Debug messages * ircd/list.c (make_client): add an extra assertion check * ircd/ircd_events.c (socket_events): don't call the engine events changer if we haven't actually made any changes to the event mask * ircd/uping.c: add some Debug messages * ircd/s_stats.c: document new /STATS e * ircd/s_err.c: add RPL_STATSENGINE to report the engine name * ircd/s_bsd.c: remove static client_timer variable; in read_packet(), if there's still data in the client's recvQ after parsing, add a 2 second timer (con_proc); fix the ET_DESTROY case of client_sock_callback to handle destroying the timer properly; rewrote client_timer_callback from scratch to be called on an individual client * ircd/m_stats.c: add /STATS e to report the engine name * ircd/list.c: deal with con_timer field in struct Connection properly; correct a core-level bug in remove_client_from_list--if the client is the only one in the list, we try to update GlobalClientList's cli_prev pointer--not good * ircd/ircd.c: remove call to init_client_timer() * ircd/engine_poll.c: made Debug messages more uniform by prepending "poll:" to them all; corrected an off-by-one error that caused poll_count to be 1 less than the actual count and removed my work-around; added Debug messages to indicate which socket is being checked and what the results are * ircd/Makefile.in: ran a make depend * include/s_bsd.h: remove init_client_timer(), since we're doing it differently now * include/numeric.h (RPL_STATSENGINE): a stats reply to report the engine name * include/ircd_policy.h (HEAD_IN_SAND_STATS_E): turn off /stats e reports for non-opers * include/client.h: add con_timer and con_proc fields to struct Connection and define accessor macros--con_timer marks that con_proc contains a valid timer, and con_proc is used to pace user data * ircd/s_bsd.c (close_connection): let free_client() destroy the socket * ircd/s_auth.c (start_auth): add a Debug call to indicate when auth has begun on a client * ircd/ircd_events.c: ensure that event_execute() is called with a non-NULL event; modify event_add() macro to properly zero list bits; modify gen_dequeue() to not try to clip it out of a list it's already been clipped out of; change signal socket initialization to use state SS_NOTSOCK; permit timeout values of 0 in add_timer(); add many Debug calls; change socket_del() and timer_del() to always set the GEN_DESTROY flag; use GEN_MARKED in timer_run() instead of GEN_DESTROY so that event_generate() will pass on the events; remove the switch and replace with a simpler if-then-else tree in timer_run(); don't allow destroyed sockets to be destroyed again, nor their states or event masks to be changed * ircd/ircd.c: initialize "running" to 1 * ircd/engine_poll.c: deal with SS_NOTSOCK "sockets"; add Debug messages all over the place; fix a counting problem in engine_add(); turn wait into a signed integer and set it to -1 only if timer_next() returns 0; adjust wait time to be relative; don't call gen_ref_dec() if socket disappeared while we were processing it * include/ircd_events.h: the pipe for signals is not a socket, so we must mark it as such--added SS_NOTSOCK for that special socket; events won't be generated if GEN_DESTROY is on, so add GEN_MARKED for the benefit of timer_run() * configure.in: add --enable-pedantic and --enable-warnings to turn on (and off) -Wall -pedantic in CFLAGS 2001-05-21 Kevin L. Mitchell * ircd/s_conf.c: change "s_addr" element accesses to "address" element accesses * include/s_conf.h: on some systems, "s_addr" is a macro; use "address" instead 2001-05-18 Kevin L. Mitchell * ircd/engine_kqueue.c: include ircd_alloc.h; set_or_clear returns void in this file; add a missing semi-colon; declare errcode, codesize * ircd/uping.c (uping_sender_callback): it's pptr, not uping * ircd/s_user.c (register_user): comment out spurious reference to nextping * ircd/s_serv.c (server_estab): comment out spurious reference to nextping * ircd/s_conf.c (read_configuration_file): comment out spurious reference to nextping and nextconnect * ircd/s_bsd.c: comment out some spurious references to formerly global (now non-existant) variables; correct a couple of typos * ircd/s_auth.c: pre-declare some functions referenced in the callback; correct a typo * ircd/res.c (start_resolver): pass errno value of ENFILE * ircd/listener.c (accept_connection): you know your API is messed up when...variables that shouldn't have been global crop up in other files * ircd/list.c (free_client): substitution of == for = * ircd/ircd_signal.c: include assert.h for assertion checking; check ev_data() to find out what signal generated event * ircd/ircd_events.c: some references to the variable "timer" should have been references to the variable "ptr" * ircd/engine_select.c: it's struct fd_set, not struct fdset; ev_timer(ev) is already a timer pointer; declare codesize as a size_t to correct signedness issue; use timer_next(), not time_next() * ircd/engine_poll.c: ev_timer(ev) is already a timer pointer; select fd out of struct pollfd in assertion checking; declare errcode and codesize; use timer_next(), not time_next() * ircd/engine_kqueue.c: ev_timer(ev) is already a timer pointer; use function timer_next(), not time_next() * ircd/engine_devpoll.c: ev_timer(ev) is already a timer pointer; use function timer_next(), not time_next() * ircd/Makefile.in (IRCD_SRC): add ircd_events.c to the list of compiled sources; do make depend * include/list.h: pre-declare struct Connection * include/ircd_events.h (gen_ref_inc): cast to the right structure name * include/s_auth.h: duh; missing */ 2001-05-10 Kevin L. Mitchell * ircd/send.c: update write events status after sending data or accumulating data to be sent * ircd/m_list.c (m_list): update write events status after canceling a running /list * ircd/channel.c (list_next_channels): update write events status after listing a few channels * ircd/s_bsd.c: extensive changes to update to new events model; remove on_write_unblocked() and the two implementations of read_message(), which have been deprecated by this change * ircd/s_auth.c: set the socket events we're interested in for clients; simplify some logic that does the connect_nonb followed by the socket_add * ircd/list.c: define free_connection() to free a connection that's become freeable once the struct Socket has been deallocated; fix up free_client() to take this new behavior into account * ircd/ircd.c: call init_client_timer() * include/s_bsd.h: declare new REGISTER_ERROR_MESSAGE when unable to register connect-in-progress with events system; declare init_client_timer() (HACK!) to preserve rate-limiting behavior * include/list.h: declare new free_connection() * include/client.h: add a struct Socket to struct Connection 2001-05-09 Kevin L. Mitchell * ircd/ircd_signal.c: massage the handlers for SIGHUP, SIGINT, and SIGTERM into event callbacks; perform the actions in the callbacks, since they're not called in the context of the signal; set up the signal callbacks in the event engine * ircd/ircd_events.c (signal_callback): we're supposed to look for a specific signal; don't generate an event if there is no signal structure for it * ircd/ircd.c: nuke nextconnect and nextping and replace them with connect_timer and ping_timer; massage try_connections() and check_pings() into timer callbacks that re-add themselves at the right time; remove ircd.c's "event_loop()"; initialize the event system and the connect_timer and ping_timer * ircd/uping.c: correct a couple more typos * ircd/s_auth.c: rework to use new events system * ircd/os_solaris.c (os_connect_nonb): update to new interface * ircd/os_openbsd.c (os_connect_nonb): update to new interface * ircd/os_linux.c (os_connect_nonb): update to new interface * ircd/os_generic.c (os_connect_nonb): update to new interface * ircd/os_bsd.c (os_connect_nonb): update to new interface * include/s_auth.h: remove deprecated members of struct AuthRequest, replacing them with struct Socket and struct Timer structures; add flags to indicate when these structures have been released by the event system; remove the deprecated timeout_auth_queries() * include/ircd_osdep.h (os_connect_nonb): connect could complete immediately, so change the interface to handle that possibility * ircd/uping.c (uping_server): noticed and corrected a typo * ircd/listener.c: set up to use ircd_event's struct Socket by adding an socket_add() call to inetport(), replacing free_listener() with socket_del() in close_listener(), and reworking accept_connection to be called as the callback * ircd/ircd.c: add a call to IPcheck_init() * ircd/IPcheck.c: remove IPcheck_expire(); rework ip_registry_expire() to be called from a timer; write IPcheck_init() to set up the expiration timer (hard-coded for a 60-second expiration time) * include/listener.h: add a struct Socket to the struct Listener; remove accept_connection() * include/IPcheck.h: add IPcheck_init(), remove IPcheck_expire() 2001-05-08 Kevin L. Mitchell * ircd/ircd_events.c: include config.h; use USE_KQUEUE and USE_DEVPOLL instead of HAVE_KQUEUE and HAVE_DEVPOLL_H * ircd/engine_select.c: include config.h; set FD_SETSIZE to MAXCONNECTIONS, not IRCD_FD_SETSIZE... * ircd/engine_poll.c: include config.h * ircd/engine_kqueue.c: include config.h * ircd/engine_devpoll.c: include config.h * ircd/Makefile.in: include engine sources in compilation and make depend steps * configure.in: add checks for enabling the /dev/poll- and kqueue-based engines * acconfig.h: add lines for USE_DEVPOLL and USE_KQUEUE * ircd/Makefile.in: work in the engine sources 2001-05-07 Kevin L. Mitchell * ircd/m_settime.c: include ircd_snprintf.h * ircd/ircd_relay.c: stomp a couple of gcc warnings suggesting parens around a construct that had both || and && * ircd/chkconf.c: #include "config.h" to get some important definitions * ircd/Makefile.in: revamp ircd makefile for new build system * doc/Makefile.in: revamp doc makefile for new build system * config/*: Removed old build system files * stamp-h.in: a stamp file * install-sh: install-sh for new build system * configure.in: configure.in for new build system * configure: configure script for new build system (built by autoconf) * config.sub: config.sub for new build system * config.h.in: config.h.in for new build system (built by autoheader) * config.guess: config.guess for new build system * aclocal.m4: aclocal.m4 for new build system (built by aclocal 1.4) * acinclude.m4: aclocal.m4 macros for new build system * acconfig.h: config.h skeleton for new build system * Makefile.in: modify for new build system 2001-05-01 Kevin L. Mitchell * ircd/s_err.c: get rid of the last vestiges of TIME_T_FMT * ircd/m_settime.c: get rid of the last vestiges of TIME_T_FMT * ircd/m_server.c: get rid of the last vestiges of TIME_T_FMT 2001-05-01 Perry Lorier * doc/iauth.doc: Protocol for iauth server. (from hybrid). * doc/linux-poll.patch: Patch to make Linux under 2.2 not deadlock when you have far far too many sockets in use. * {include,ircd}/iauth.c: A start on iauth support. 2001-05-01 Perry Lorier * ircd/s_err.c: Suggested wording change. * ircd/s_user.c: Users aren't target limited against +k users. * ircd/chkconf.c: Made it compile again, who knows if it works, but now I can at least make install * various: Cleanups on m_*.c files. 2001-04-23 Kevin L. Mitchell * ircd/s_misc.c (exit_client): make netsplit server notice say the right thing * ircd/m_links.c (m_links_redirect): forward-port RPL_ENDOFLINKS change to make Khaled happy... * ircd/m_whois.c (do_whois): pull-up of m_whois() fix (do_whois): duh... 2001-04-21 Kevin L. Mitchell * ircd/msgq.c: finally remove the msgq_integrity() hack, as it's turned up no more bugs * ircd/ircd.c: use /* */ comments instead of // comments--all the world's not gcc :( * ircd/s_conf.c (conf_add_server): use /* */ comments instead of // comments--all the world's not gcc :( * ircd/runmalloc.c: finally garbage-collect unused file * include/runmalloc.h: finally garbage-collect unused file * ircd/: addition of '#include "config.h"' before all other includes in most .c files * include/: remove includes of config.h, which are now going into the raw .c files 2001-04-20 Kevin L. Mitchell * ircd/m_whois.c (do_whois): display proper server name if the user is looking up himself * ircd/m_who.c (m_who): disable match by servername or display of server names by non-opers * include/ircd_policy.h: add define for HEAD_IN_SAND_WHO_SERVERNAME to cover full intent of sub-motion 15 of CFV 165 2001-04-18 Kevin L. Mitchell * ircd/s_conf.c: keep the $R in memory so we can see it clearly when we do a /stats k * ircd/s_user.c (set_user_mode): pull-up of changes to prevent users from turning on +s and +g * ircd/s_misc.c (exit_client): pull-up of changes to turn off net.split notice * ircd/parse.c: pull-up of changes to disable /trace, /links, and /map for users * ircd/m_whois.c (do_whois): pull-up of server name masking for /whois * ircd/m_user.c (m_user): removal of umode and snomask defaulting functions, pull-up * ircd/m_stats.c (m_stats): pull-up of stats-disabling stuff * ircd/m_map.c (m_map_redirect): pull-up of m_map_redirect() * ircd/m_links.c (m_links_redirect): pull-up of m_links_redirect() * ircd/channel.c (channel_modes): pull-up of channel key display as * * include/ircd_policy.h: pull-up of ircd_policy.h * include/client.h: pull-up of Set/ClearServNotice() * ircd/gline.c (do_gline): report client name in G-line message (pull-up) * ircd/s_user.c (register_user): pull-up--show IP address in some server notices dealing only with users; report which connection class has filled up * ircd/s_stats.c (report_deny_list): use conf->flags & DENY_FLAGS_IP insteaf of conf->ip_kill * ircd/m_stats.c (report_klines): use conf->flags & DENY_FLAGS_IP insteaf of conf->ip_kill * ircd/s_conf.c: use flags field in struct DenyConf; pull-up of K-line by real name * include/s_conf.h: use a flags field in struct DenyConf; define DENY_FLAGS_FILE, DENY_FLAGS_IP, and DENY_FLAGS_REALNAME for pull-up of K-line by real name * ircd/m_trace.c: pull-up of IP show for user connections * doc/example.conf: pull-up of the realname K-line documentation * ircd/ircd.c: forward port of pid file advisory locking mechanism 2001-04-16 Kevin L. Mitchell * ircd/send.c (sendcmdto_flag_butone): recast to just broadcast to all servers, rather than to only servers that have +w/+g/whatever users on them; among other things, this removes that atrocity known as sentalong[] from this function * ircd/m_admin.c: must include ircd.h to declare "me"; must include hash.h to declare FindUser() * ircd/m_wallusers.c: implementation of WALLUSERS * ircd/m_desynch.c (ms_desynch): only send DESYNCHs to opers * ircd/m_wallops.c: only send WALLOPS to opers * ircd/parse.c: add WALLUSERS command to parser table * include/handlers.h: declare wallusers handlers * include/msg.h: add WALLUSERS command * ircd/send.c (sendcmdto_flag_butone): if FLAGS_OPER is or'd with flag, send only to appropriate opers 2001-04-13 Kevin L. Mitchell * ircd/uping.c: refit to use the new events interface * ircd/res.c: refit to use the new events interface * ircd/ircd_events.c: create timer_chg(), which permits a (non-periodic) timer's expire time to be modified; change the logic in timer_run() so that timers that were re-added while the event was being processed will not be destroyed prematurely * include/uping.h: include the events header, declare some extra fields in struct UPing, remove timeout value, and define some flags for marking which cleanup items have yet to be done * include/ircd_events.h: add a prototype for timer_chg() to change the expire time of a running timer 2001-03-13 Joseph Bongaarts * ircd/os_openbsd.c: Tweaked the openbsd hack a bit. 2001-03-07 Joseph Bongaarts * config/configure.in: Add check for OpenBSD * ircd/os_openbsd.c: Add seperate os dep file for openbsd which differs from generic BSD, particularly in its handling of _XOPEN_SOURCE. 2001-02-12 Kevin L. Mitchell * ircd/m_gline.c (ms_gline): propagate a G-line that happened to have been added by a U-lined server, rather than going through the activate/deactivate logic; propagate G-line removals by U-lined servers as well * ircd/gline.c: rename propagate_gline() to gline_propagate(); make gline_propagate() return an int 0 (convenience return); only update lastmod in gline_activate() and gline_deactivate() if the current lastmod is non-zero, since 0 lastmod is our flag of a U-lined server having added a G-line * include/gline.h (gline_propagate): exporting the G-line propagation function * ircd/m_list.c (m_list): duh; permit explicit channel name specification only when /list gets two arguments ("Kev #wasteland") rather than when /list gets more than two arguments--nice braino 2001-01-29 Thomas Helvey * ircd/ircd_reply.c (need_more_params): fix bug that allowed unregistered clients to spam opers with protocol violation messages. Note: the bugfix may have eliminated some useful protocol violation messages. Please send protocol violation messages explicitly from the functions they are discovered in, you have much better context for the error there and it helps to document the behavior of the server. This was also a design bug in that it violated the "A function should do one thing" heuristic. Patching this one would have resulted in a continuous spawning of other bugs over the next 3 years, so I killed it. Check around for stuff this broke and readd the calls to protocol_violation in the functions that need to send the message. 2001-01-29 Kevin L. Mitchell * ircd/channel.c (mode_parse_ban): stopper a tiny leak--if a ban already existed, then the logic would (attempt to) skip it, but would not free the ban string; now the ban string is free'd and the ban count is decremented, releasing the ban for use * ircd/s_user.c: make send_umode_out() take a prop argument instead of testing for the PRIV_PROPAGATE privilege itself; fix set_umode() to use this new argument, calculating it before calculating the new privileges for a -o'd user * ircd/m_oper.c (m_oper): pass the new prop argument to send_umode_out() * ircd/channel.c (mode_parse_ban): turn off MODE_ADD bit in bans that we're not actually going to add because they already exist; test that particular bit before adding to the linked list * include/s_user.h: add a prop argument to send_umode_out() to indicate whether or not to propagate the user mode 2001-01-24 Kevin L. Mitchell * ircd/msgq.c: ircd_vsnprintf() returns the number of bytes that it would have written; upper-bound the number to prevent overflows by proxy; also, tune buffer size given to ircd_vsnprintf() to take into account the fact that ircd_vsnprintf() already takes the terminal \0 into account 2001-01-22 Kevin L. Mitchell * ircd/msgq.c: add an incredibly ugly hack to attempt to track down an apparent buffer overflow; remove msgq_map(), since it's no longer used anywhere; slight tweaks to prevent off-by-one errors, but these can't explain the problems we've seen * include/msgq.h: remove msgq_map(), since it's no longer used anywhere 2001-01-18 Kevin L. Mitchell * ircd/s_user.c (set_nick_name): call client_set_privs() after parsing user modes 2001-01-17 Kevin L. Mitchell * ircd/s_bsd.c (read_message): fix a typo in the select version of read_message() * ircd/whowas.c (whowas_free): MyFree() is a macro that expects its argument to be an lvalue, which means we can't use whowas_clean()'s handy-dandy "return ww" feature * ircd/ircd_features.c: default LOCOP_KILL to TRUE--oops... 2001-01-16 Kevin L. Mitchell * ircd/ircd_events.c (timer_run): it's possible that the timer got deleted during the callback processing, so don't go to the bother of requeuing it if the destroy flag is set * ircd/engine_select.c: define FD_SETSIZE to be IRCD_FD_SETSIZE out of config.h if this is a *BSD; include errno.h (oops); decrement error count after an hour using a timer; use FD_SETSIZE constant instead of IRCD_FD_SETSIZE constant; fill in event processing code * ircd/engine_poll.c: include errno.h (oops); decrement error count after an hour using a timer; fill in event processing code * ircd/engine_kqueue.c: include errno.h (oops); decrement error count after an hour using a timer; assert events filter is either EVFILT_READ or EVFILT_WRITE; fill in event processing code * ircd/engine_devpoll.c: include errno.h (oops); decrement error count after an hour using a timer; fill in event processing code 2001-01-15 Kevin L. Mitchell * ircd/client.c: fixed feattab; basically, when I changed features to use small integers specifying bit positions, instead of the bits themselves, I forgot to update feattab to not | these privileges together; also fixed a bug in the antiprivs masking loop in client_set_privs()--last index wouldn't get parsed 2001-01-11 Kevin L. Mitchell * ircd/ircd_events.c: call event_generate() with new data argument; make it set that field in struct Event; make socket_add() return the value of the eng_add callback * ircd/engine_select.c: make engine_add() return a successful/unsuccessful status; add bounds-checking outside of an assert; use accessor macros; use log_write(), not the deprecated ircd_log(); add an assert to engine_loop() to double-check for data structure corruption * ircd/engine_poll.c: make engine_add() return a successful/unsuccessful status; add bounds-checking outside of an assert; use accessor macros; use log_write(), not the deprecated ircd_log(); add an assert to engine_loop() to double-check for data structure corruption * ircd/engine_kqueue.c: implementation of an engine for kqueue() * ircd/engine_devpoll.c: implementation of an engine for /dev/poll * include/ircd_events.h: define some accessor macros; add ev_data to struct Event for certain important data--errno values, for instance; make EngineAdd callback tell us if it was successful or not; add extra argument to event_generate(); make socket_add() return the status from EngineAdd 2001-01-10 Kevin L. Mitchell * ircd/ircd_events.c: pass initializer information about how many total _filedescriptors_ may be opened at once * ircd/ircd.c: use exported "running" instead of unexported thisServer.running * ircd/engine_select.c: implementation of an event engine based on select() * ircd/engine_poll.c: implementation of an event engine based on poll() * include/ircd_events.h: pass the engine initializer an integer specifing how many _filedescriptors_ may be opened at once * include/ircd.h: running has to be exported for the engine_* event loops 2001-01-09 Kevin L. Mitchell * ircd/ircd_events.c: include some needed headers; add some comments; make evEngines[] const; bundle sig_sock and sig_fd into a struct named sigInfo; rework struct evInfo to have a queue of _generators_, and only when threaded; added a gen_init() function to centralize generator initialization; fix various compile-time errors; rework event_add() for new queueing scheme and checked for compile-time errors; add casts where needed; spell evEngines[] correctly; make engine_name() return const char* * include/ircd_events.h: type EventCallBack depends on struct Event, so pre-declare it; put _event_ queue into generators, and only when threaded; give engine data a union to store both ints and pointers; make engine name a const; fix gen_ref_dec() macro; make engine_name() return a const char* * ircd/ircd_events.c: gen_dequeue() is now exported, so move it down with the non-static functions; modify event_execute() to use the new gen_ref_dec() to simplify code; make sure event_generate() does not generate new events for generators marked for destruction * include/ircd_events.h: the engines, at least, may need to modify reference counts to keep generators from going away while something still points at them, so add reference counter manipulators and export gen_dequeue() for them * ircd/ircd_events.c: set up the list of engines to try; set up the signal struct Socket; rename netInfo to evInfo; move static functions near the beginning of the file; do away with signal_signal() (since we no longer keep a signal count ourselves) and call event_generate() directly from signal_callback--also renamed some functions; allow signal_callback() to read up to SIGS_PER_SOCK at once from the signal pipe; add event_init() to initialize the entire event system; add event_loop() to call the engine's event loop; initialize new struct GenHeader member, gh_engdata; remove timer_next(); add socket_add() function to add a socket; add socket_del() to mark a socket for deletion; add socket_state() to transition a socket between states; add socket_events() to set what events we're interested in on the socket; add engine_name() to retrieve event engine's name * include/ircd_events.h: add engine data field to struct GenHeader; rename SOCK_ACTION_REMOVE to SOCK_ACTION_DEL; add a note about states vs s_events; remove signal count; fold union Generator back into struct Event; remove count members from struct Generators; redefine engine callbacks to not take a struct Engine*; add explanatory comments to callback definitions; add some engine callbacks to handle operations; remove struct Engine flag member--can detect single flag from eng_signal member; add event_init(), event_loop(), engine_name(), and the socket_*() functions; make timer_next() a macro to avoid a function call 2001-01-08 Kevin L. Mitchell * include/ircd_events.h: rename to ircd_events.h, since it handles events, not just networking stuff; add signal support; more structural rearrangement * ircd/ircd_events.c: rename to ircd_events.c, since it handles events, not just networking stuff; add signal support; more structural rearrangement 2001-01-07 Kevin L. Mitchell * ircd/ircd_network.c: implement timer API; add reference counts appropriately * include/ircd_network.h: firm up some pieces of the interface; split out members everything has into a separate structure; add reference counts; add timer API 2001-01-06 Kevin L. Mitchell * ircd/ircd_network.c: static data and event manipulation functions for new event processing system * include/ircd_network.h: data structures for new event processing system 2001-01-03 Kevin L. Mitchell * ircd/whowas.c: Completely re-did the old allocation scheme by turning it into a linked list, permitting the NICKNAMEHISTORYLENGTH feature to be changed on the fly * ircd/s_debug.c (count_memory): use FEAT_NICKNAMEHISTORYLENGTH feature instead of old #define * ircd/ircd_features.c: add NICKNAMEHISTORYLENGTH feature as an integer feature with a notify callback (whowas_realloc) * ircd/client.c (client_set_privs): second memset was supposed to be over antiprivs, not privs; thanks, Chris Behrens for pointing that out... * include/whowas.h: new elements for an extra linked list in struct Whowas; a notify function for feature value changes * include/ircd_features.h: new feature--FEAT_NICKNAMEHISTORYLENGTH * config/config-sh.in: NICKNAMEHISTORYLENGTH is now a feature 2001-01-02 Kevin L. Mitchell * config/config-sh.in: get rid of DEFAULT_LIST_PARAMETER compile-time option--now in features subsystem * ircd/motd.c (motd_init): rework motd_init() to be called as the notify function for MPATH and RPATH features (should probably split it up a bit, though...) * ircd/m_privs.c (mo_privs): if called with no parameters, return privs of the caller, rather than an error * ircd/m_list.c: pull usage message into its own function; pull list parameter processing into its own function that does not modify the contents of the parameter; add list_set_default() to set the default list parameter (uses the notify hook); rework m_list() to make use of these functions; removed dead code * ircd/ircd_log.c (log_feature_mark): make sure to return 0, since we have no notify handler * ircd/ircd_features.c: add notify callback for notification of value changes; give mark callback an int return value to indicate whether or not to call the notify callback; fix up feature macros for new notify callback; add DEFAULT_LIST_PARAM feature; rewrite string handling in feature_set() to deal with def_str being a null pointer; wrote feature_init() to set up all defaults appropriately * ircd/ircd.c (main): call feature_init() instead of feature_mark(), to avoid calling notify functions while setting up defaults * ircd/client.c: updated to deal with new privileges structure * ircd/class.c: updated so init_class() can be called should one of PINGFREQUENCY, CONNECTFREQUENCY, MAXIMUM_LINKS, or DEFAULTMAXSENDQLENGTH be changed * include/ircd_log.h: log_feature_mark() updated to fit with new API changes * include/ircd_features.h: added DEFAULT_LIST_PARAM feature and feature_init() function (found necessary since adding the notify stuff and notifying motd.c during start-up...before we defined RPATH!) * include/client.h: move privs around to enable addition of more bits if necessary; based on the FD_* macros * include/channel.h: declare list_set_default (actually located in m_list.c *blanche*) * ircd/s_user.c: retrieve MAXSILES and MAXSILELENGTH (now AVBANLEN*MAXSILES) from features subsystem * ircd/s_debug.c (debug_serveropts): CMDLINE_CONFIG doesn't go to anything anymore * ircd/s_bsd.c: retrieve HANGONGOODLINK and HANGONRETRYDELAY from the features subsystem * ircd/s_auth.c (start_auth): NODNS migrated to the features subsystem * ircd/random.c: created random_seed_set() function to set seed value, along with some stuff to make ircrandom() a little more random--state preserving, xor of time instead of direct usage, etc.; it's still a pseudo-random number generator, though, and hopefully I haven't broken the randomness * ircd/m_version.c: FEATUREVALUES makes use of feature_int() calls * ircd/m_join.c: use features interface to retrieve MAXCHANNELSPERUSER * ircd/ircd_features.c: add NODISP flag for super-secret features; add a whole bunch of new features migrated over from make config * ircd/ircd.c: use features interface to retrieve PINGFREQUENCY, CONNECTTIMEOUT, and TIMESEC * ircd/client.c (client_get_ping): use features interface to retrieve PINGFREQUENCY * ircd/class.c: use features interface to retrieve PINGFREQUENCY, CONNECTFREQUENCY, MAXIMUM_LINKS, and DEFAULTMAXSENDQLENGTH * ircd/chkconf.c (DEFAULTMAXSENDQLENGTH): since it's now in the features subsystem, we have to add something explicit * ircd/channel.c: use features interface to retrieve KILLCHASETIMELIMIT, MAXBANLENGTH, MAXBANS, and MAXCHANNELSPERUSER; note that MAXBANLENGTH is now calculated dynamically from MAXBANS and AVBANLEN * ircd/Makefile.in: run make depend * include/supported.h (FEATURESVALUES): update to reference feature settings * include/random.h: add prototype for random_seed_set * include/ircd_features.h: add several more features * include/channel.h: move MAXBANS and MAXBANLENGTH into feature subsystem * config/config-sh.in: feature-ized some more stuff * include/motd.h: some new elements in motd.h for motd.c changes * ircd/motd.c: motd_cache() now searches a list of already cached MOTD files; saves us from having duplicate caches in memory if there are two identical T-lines for two different sites... 2001-01-02 Perry Lorier * ircd/motd.c: don't core if the motd isn't found. Bug found by Amarande. 2001-01-02 Perry Lorier * ircd/s_err.c: Added third param to 004 - the channel modes that tage params. Used by hybrid/epic. * ircd/s_channels.c: Added fix for msg'ing a -n+m channel - thanks to guppy for noticing, and hektik for providing the fix. * misc others: Minor cleanups, added more protocol_violations, ripped out more P09 stuffs, bit more protocol neg stuff. 2000-12-19 Kevin L. Mitchell * ircd/m_ison.c (m_ison): Dianora says that ISON has to end with a space (*sigh* stupid clients...) * ircd/s_user.c: make WALLOPS_OPER_ONLY a feature managed through ircd_features.[ch] * ircd/s_err.c: get rid of GODMODE conditionals * ircd/s_debug.c (debug_serveropts): switch to using appropriate calls into the features subsystem for various serveropts characters * ircd/s_conf.c (find_conf_entry): get rid of USEONE conditional * ircd/s_bsd.c: remove GODMODE conditional; use features subsystem to get value of VIRTUAL_HOST and CLIENT_FLOOD; remove NOFLOWCONTROL conditional * ircd/s_auth.c: use features subsystem to determine value of KILL_IPMISMATCH * ircd/parse.c: get rid of NOOPER and GODMODE conditionals; use features subsystem to determine the setting of IDLE_FROM_MSG * ircd/numnicks.c: get rid of EXTENDED_NUMERICS conditionals * ircd/motd.c: get value of NODEFAULTMOTD from features subsystem; use features subsystem to get motd file names * ircd/m_settime.c: get value of RELIABLE_CLOCK from features subsystem * ircd/m_server.c: get rid of CRYPT_LINK_PASSWORD, since it does us no good; use features subsystem to figure out if we need to do HUB-type stuff; make TESTNET debugging sendto_opmask_butone's use the Debug(()) macro instead; get value of RELIABLE_CLOCK from features subsystem * ircd/m_privmsg.c: get IDLE_FROM_MSG from the features subsystem * ircd/m_oper.c: get CRYPT_OPER_PASSWORD from the features subsystem * ircd/m_connect.c: get SERVER_PORT from the features subsystem * ircd/ircd_log.c (log_set_file): fix a bug that kept log files from getting marked if they were already set to something... * ircd/ircd_features.c: add a flag to indicates read-only access; add several new features that used to be compile-time selected * ircd/ircd.c: grab pidfile out of feature subsystem; don't check access to motd files (what the heck?); make sure to initialize the feature subsystem before trying to write the config file * ircd/dbuf.c: use feature_int() to retrieve BUFFERPOOL settings; use feature_bool() to figure out if we're using the FERGUSON flusher * ircd/Makefile.in: MPATH and RPATH are now done differently, so remove the clause that creates empty files of that name; also ran make depend * include/sys.h: CLIENT_FLOOD is now a feature; unfortunately, there is no easy way to bounds-check it at present * include/querycmds.h: make sure ircd_features.h is included; use feature_str(FEAT_DOMAINNAME) in calls to match() * include/ircd_features.h: many new features that used to be compile-time selected * config/config-sh.in: add * to DOMAINNAME; try also using first argument to search in /etc/resolv.conf; removed many compile-time options that now can be configured through the features system 2000-12-18 Kevin L. Mitchell * doc/api/log.txt: how to use the logging API * doc/api/features.txt: how to use the features API * doc/api/api.txt: how to write API documentation * include/ircd_features.h: rearranged a couple of features for neatness purposes * ircd/ircd_features.c: cleaned up the macros some; rearranged some code to all go into the switch; rearranged a couple of features for neatness purposes 2000-12-16 Greg Sikorski * ircd/os_bsd.c: Added os_set_tos for BSD users. 2000-12-16 Kevin L. Mitchell * ircd/ircd_features.c: Isomer almost got it right; you need to use F_I(), since it's an integer value, not a boolean value. The asserts in feature_int would catch you out... Also made the F_* macros take flags * ircd/s_err.c: define RPL_PRIVS reply * ircd/parse.c: put new PRIVS command into command table * ircd/m_privs.c (mo_privs): message handler to report operator privileges * ircd/ircd_features.c: declare new features OPER_SET and LOCOP_SET; redo boolean testing routine to accept TRUE, YES, and ON for boolean TRUE, and FALSE, NO, and OFF for boolean FALSE * ircd/client.c: simplify client_set_privs() with a table that defines what features to test for; add new client_report_privs() * ircd/Makefile.in: compile new m_privs.c; run make depend * include/numeric.h (RPL_PRIVS): new reply numeric for displaying an operator's privileges * include/msg.h: define new command: PRIVS * include/ircd_features.h: create new features OPER_SET and LOCOP_SET for controlling access to /set * include/handlers.h (mo_privs): declare message handler for reporting oper privileges * include/client.h (client_report_privs): declare function to report what privileges an oper has * ircd/m_whois.c (do_whois): fix a bug that caused /whois to report that a user is an oper if the oper doing the /whois had PRIV_SEE_OPERS 2000-12-17 Isomer * ircd/listener.c: added support for TOS twiddling as a 'feature'. 2000-12-17 Isomer * ircd/os_linux.c: add TOS stuffs * ircd/listener.c: add TOS stuffs 2000-12-16 Kevin L. Mitchell * ircd/whocmds.c (do_who): use HasPriv to determine whether or not to indicate a user is an oper * ircd/s_user.c: clear privileges setting when deopping; don't propagate +o unless user has PRIV_PROPAGATE privilege * ircd/s_debug.c (debug_serveropts): created debug_serveropts() function and replaced how the server option string is generated * ircd/parse.c: remove conditional on CONFIG_OPERCMDS * ircd/m_whois.c (do_whois): use HasPriv to determine whether or not to indicate the user is an operator * ircd/m_who.c: use HasPriv to determine whether or not a user should be displayed in the list of opers * ircd/m_version.c: call debug_serveropts() to get server option string * ircd/m_userip.c (userip_formatter): use HasPriv to determine whether or not to show oper status * ircd/m_userhost.c (userhost_formatter): use HasPriv to determine whether or not to show oper status * ircd/m_restart.c (mo_restart): replace ugly #ifdef conditional checks with HasPriv check; remove dead code * ircd/m_rehash.c (mo_rehash): replace ugly #ifdef conditional checks with HasPriv check * ircd/m_opmode.c (mo_opmode): use HasPriv to check permissions; use feature_bool to check if disabled * ircd/m_oper.c (m_oper): set oper priviliges * ircd/m_mode.c (m_mode): replace #ifdef conditional with HasPriv check * ircd/m_kill.c (mo_kill): use HasPriv checks to determine if we can kill * ircd/m_kick.c (m_kick): replace #ifdef conditional with HasPriv check * ircd/m_jupe.c (mo_jupe): rework permissions checking structure; use feature_bool to check if disabled * ircd/m_join.c (m_join): remove BADCHAN conditional; replace #ifdef conditional with a HasPriv check * ircd/m_gline.c (mo_gline): rework permissions checking structure; use feature_bool to check if any part is disabled * ircd/m_die.c: replace ugly #ifdef conditionals with HasPriv check; remove dead code * ircd/m_clearmode.c: use feature_bool() to detect if we're disabled; use HasPriv to figure out what we're permitted to do; only allow clearmode on moded channels * ircd/ircd_features.c: define various features; use HasPriv to verify permissions to set/reset * ircd/gline.c (gline_add): use HasPriv instead of #ifdef conditionals * ircd/client.c (client_set_privs): function to set an oper's privileges * ircd/channel.c: use HasPriv calls instead of #ifdef conditionals * include/whocmds.h: deconditionalize several macros and substitute appropriate calls to HasPriv() * include/s_debug.h: get rid of global serveropts[]; define new function debug_serveropts() to build that string on the fly * include/ircd_features.h: define some features * include/client.h: add privs member to struct Connection; define various priviledges * include/channel.h: no longer using IsOperOnLocalChannel; remove conditional of MAGIC_OPER_OVERRIDE on OPER_WALK_THROUGH_LMODES * doc/Configure.help: remove help information for deprecated options * config/config-sh.in: remove certain deprecated options having to do with what opers can and cannot do--first stage in moving compile-time constants into the .conf 2000-12-16 Isomer * ircd/parse.c: detect if the prefix is missing and try and recover instead of coring. 2000-12-15 Kevin L. Mitchell * ircd/ircd_log.c: found and fixed some bugs in the debug logging code that would sometimes result in the log file not being reopened--which meant that a user could connect and get the logging output--oops * ircd/Makefile.in: run make depend... * ircd/s_stats.c: get rid of report_feature_list() * ircd/s_err.c: add the 'bad value' error message, shift error messages over somewhat * ircd/s_debug.c (debug_init): call log_debug_init with the use_tty flag * ircd/s_conf.c (read_configuration_file): unmark features before reading the config file, then reset unmarked features after reading the config file * ircd/m_stats.c: use feature_report() instead of report_feature_list() * ircd/ircd_log.c: fix log_debug_file (bogus assertion); add special 'mark' flags and use them; add the stuff needed by the features API * ircd/ircd_features.c: rework the features API and add gobs of comments to try to explain what some of these complex functions are actually doing * include/s_stats.h: get rid of report_feature_list(); use feature_report() instead * include/numeric.h: added a new error message and shifted old values over some--this is, after all, an alpha * include/ircd_log.h: log_debug_init now takes an integer to tell it if it should be using the tty; added a couple of functions required by the features API * include/ircd_features.h: add an enum and some more functions to flesh out the feature API--it should now be possible to put all those compile-time constants in the config file! * ircd/send.c: got the direction of the assert incorrect... * ircd/send.c: implement the efficiency of flush_connections by creating a linked list of struct Connection's with queued data; also get rid of flush_sendq_except and make sure to yank connections out of the list when their sendQs become empty (notice the assertion in flush_connections!) * ircd/s_bsd.c (close_connection): must yank the Connection out of the sendq list * ircd/list.c (dealloc_connection): must yank the Connection out of the sendq list * ircd/dbuf.c (dbuf_put): call flush_connections instead of the deprecated flush_sendq_except * ircd/client.c: define a couple new helper functions for sendq threading--this will make the flush_connections function in send.c considerably more efficient by creating a linked list of Connections that have queued data to send * include/send.h: remove flush_sendq_except, as it's not used anymore * include/client.h: declare a couple new helper functions for the sendq threading system 2000-12-14 Kevin L. Mitchell * ircd/m_ison.c (m_ison): Apply Diane Bruce's patch to make ISON parse all arguments * ircd/s_debug.c (count_memory): modify to report for clients and connections, not local clients and remote clients * ircd/list.c: fiddle with the client-fiddling functions to take into account the divorce of struct Connection from struct Client * ircd/ircd.c: define a struct Connection for me, initialize it, and link it into the right place (ewww, globals!) * include/client.h: remove CLIENT_{LOCAL,REMOTE}_SIZE; split struct Client into struct Client and struct Connection; redefine local-portion accessor macros to go through struct Client to the struct Connection; define struct Connection accessor macros 2000-12-13 Kevin L. Mitchell * ircd/whowas.c: missed a couple of accesses to a struct Client * ircd/uping.c: missed a couple of accesses to a struct Client * ircd/send.c: missed a couple of accesses to a struct Client * ircd/s_user.c: missed a couple of accesses to a struct Client * ircd/s_misc.c: missed a couple of accesses to a struct Client * ircd/s_conf.c: missed a couple of accesses to a struct Client * ircd/s_bsd.c: missed a couple of accesses to a struct Client * ircd/s_auth.c: missed a couple of accesses to a struct Client * ircd/res.c: missed a couple of accesses to a struct Client * ircd/parse.c: missed a couple of accesses to a struct Client * ircd/m_whois.c: use new accessor macros for struct Client * ircd/m_who.c: use new accessor macros for struct Client * ircd/m_wallchops.c: use new accessor macros for struct Client * ircd/m_version.c: use new accessor macros for struct Client * ircd/m_userip.c: use new accessor macros for struct Client * ircd/m_userhost.c: use new accessor macros for struct Client * ircd/m_user.c: use new accessor macros for struct Client * ircd/m_uping.c: use new accessor macros for struct Client * ircd/m_trace.c: use new accessor macros for struct Client * ircd/m_topic.c: use new accessor macros for struct Client * ircd/m_time.c: use new accessor macros for struct Client * ircd/m_stats.c: use new accessor macros for struct Client * ircd/m_squit.c: use new accessor macros for struct Client * ircd/m_silence.c: use new accessor macros for struct Client * ircd/m_server.c: use new accessor macros for struct Client; remove dead code * ircd/m_rpong.c: use new accessor macros for struct Client * ircd/m_rping.c: use new accessor macros for struct Client * ircd/m_quit.c: use new accessor macros for struct Client * ircd/m_privmsg.c: use new accessor macros for struct Client * ircd/m_pong.c: use new accessor macros for struct Client; remove dead code * ircd/m_ping.c: use new accessor macros for struct Client * ircd/m_pass.c: use new accessor macros for struct Client * ircd/m_part.c: use new accessor macros for struct Client * ircd/m_oper.c: use new accessor macros for struct Client * ircd/m_notice.c: use new accessor macros for struct Client * ircd/m_nick.c: use new accessor macros for struct Client * ircd/m_names.c: use new accessor macros for struct Client * ircd/m_mode.c: use new accessor macros for struct Client * ircd/m_map.c: use new accessor macros for struct Client * ircd/m_list.c: use new accessor macros for struct Client * ircd/m_links.c: use new accessor macros for struct Client; remove some dead code * ircd/m_kill.c: use new accessor macros for struct Client; remove some dead code * ircd/m_kick.c: use new accessor macros for struct Client * ircd/m_join.c: use new accessor macros for struct Client; remove some dead code * ircd/m_ison.c: use new accessor macros for struct Client * ircd/m_invite.c: use new accessor macros for struct Client * ircd/m_info.c: use new accessor macros for struct Client * ircd/m_gline.c: use new accessor macros for struct Client * ircd/m_error.c: use new accessor macros for struct Client * ircd/m_create.c: use new accessor macros for struct Client * ircd/m_connect.c: use new accessor macros for struct Client; removed some dead code * ircd/m_burst.c: use new accessor macros for struct Client * ircd/m_away.c: use new accessor macros for struct Client * ircd/m_admin.c: use new accessor macros for struct Client * ircd/hash.c: missed a couple of accesses to a struct Client * ircd/gline.c: missed a couple of accesses to a struct Client * ircd/crule.c: missed a couple of accesses to a struct Client * ircd/class.c: missed an access to a struct Client * ircd/channel.c: missed a couple of accesses to a struct Client * ircd/IPcheck.c: missed an access to a struct Client * include/querycmds.h: fix a couple of stats macros to use structure accessor macros * include/client.h: change structure member names to highlight any places in the code I've missed 2000-12-12 Kevin L. Mitchell * ircd/whowas.c: use new struct Client accessor macros * ircd/whocmds.c: use new struct Client accessor macros * ircd/send.c: use new struct Client accessor macros * ircd/s_user.c: use new struct Client accessor macros; removed some dead code * ircd/s_serv.c: use new struct Client accessor macros; removed some dead code * ircd/s_numeric.c: use new struct Client accessor macros * ircd/s_misc.c: use new struct Client accessor macros * ircd/s_debug.c: use new struct Client accessor macros * ircd/s_conf.c: use new struct Client accessor macros * ircd/s_bsd.c: use new struct Client accessor macros * ircd/s_auth.c: use new struct Client accessor macros * ircd/parse.c: use new struct Client accessor macros * ircd/packet.c: use new struct Client accessor macros * ircd/numnicks.c: use new struct Client accessor macros * ircd/motd.c: use new struct Client accessor macros * ircd/listener.c: use new struct Client accessor macros * ircd/list.c: use new struct Client accessor macros * ircd/jupe.c: use new struct Client accessor macros * ircd/ircd_snprintf.c: use new struct Client accessor macros * ircd/ircd_reply.c: use new struct Client accessor macros * ircd/ircd_relay.c: use new struct Client accessor macros * ircd/ircd.c: use new struct Client accessor macros * ircd/gline.c: catch some instances of me. I missed previously * ircd/client.c: use cli_ instead of con_ * ircd/class.c: use cli_ instead of con_ * ircd/channel.c: use cli_ instead of con_ * ircd/IPcheck.c: use cli_ instead of con_; catch some instances of me. I missed previously * include/client.h: use cli_ instead of con_...seemed like a good idea at the time *shrug* 2000-12-11 Kevin L. Mitchell * ircd/hash.c: use struct Client accessor macros * ircd/gline.c: use struct Client accessor macros * ircd/crule.c: use struct Client accessor macros * ircd/client.c: use struct Client accessor macros; remove some dead code * ircd/class.c: use struct Client accessor macros * ircd/channel.c: use struct Client accessor macros; remove some dead code * ircd/IPcheck.c: use struct Client accessor macros * include/numnicks.h: use struct Client accessor macros * include/client.h: first step to divorcing struct Client and struct Connection--define accessor macros and use them * ircd/gline.c: When Uworld removed Uworld-set G-lines, only the uplink would remove them. This is because the removal protocol message wasn't being sent to the uplinks. This is fixed by fixing propagate_gline() to send the proper number of arguments depending on whether or not we're adding or deleting the Uworld gline, and by having gline_deactivate() make sure to turn off the active bit and call propagate_gline() if it's a Uworld gline 2000-12-10 Kevin L. Mitchell * ircd/os_generic.c: make sure IOV_MAX gets defined, just in case * ircd/os_bsd.c: apparently BSD doesn't have IOV_MAX defined anywhere intelligent... 2000-12-09 Kevin L. Mitchell * ircd/send.c (send_queued): call deliver_it with appropriate arguments * ircd/s_serv.c: reorder a couple of headers--cosmetic * ircd/s_bsd.c (deliver_it): make deliver_it work with a struct MsgQ * ircd/os_solaris.c (os_sendv_nonb): function for calling writev with appropriate iovec * ircd/os_linux.c (os_sendv_nonb): function for calling writev with appropriate iovec * ircd/os_generic.c (os_sendv_nonb): function for calling writev with appropriate iovec * ircd/os_bsd.c (os_sendv_nonb): function for calling writev with appropriate iovec * ircd/msgq.c (msgq_mapiov): add a len_p argument for totalling up exactly how much we're trying to write out to the fd * include/s_bsd.h: make deliver_it take a struct MsgQ * include/msgq.h: add a len_p argument to msgq_mapiov to help detect short writes that indicate possible socket blocking * include/ircd_osdep.h: declare os_sendv_nonb() * ircd/channel.c (modebuf_mode): don't add empty modes... 2000-12-08 Kevin L. Mitchell * include/send.h: add prio argument to send_buffer to select between normal and priority queues * ircd/s_user.c (send_user_info): add prio argument to send_buffer call * ircd/m_ison.c (m_ison): add prio argument to send_buffer call * ircd/ircd_reply.c (send_reply): add prio argument to send_buffer call * ircd/channel.c (send_channel_modes): add prio argument to send_buffer call * ircd/send.c (send_buffer): add a prio argument to select the priority queue; update send.c functions to use it * ircd/msgq.c (msgq_add): remove msgq_prio; fold msgq_link and msgq_add; add a prio argument to msgq_add to select the priority queue * include/msgq.h: remove msgq_prio; add a prio argument to msgq_add * ircd/send.c: remove sendbuf; remove GODMODE code; switch to using msgq functions instead of dbuf functions; remove old, dead sendto_* functions; redo send_buffer to take a struct MsgBuf; rework sendcmdto_* functions to make use of the new struct MsgBuf * ircd/s_user.c: remove hunt_server; restructure send_user_info to make appropriate use of struct MsgBuf * ircd/s_debug.c (count_memory): count memory used by the MsgQ system and report it * ircd/s_conf.c (read_configuration_file): use sendto_opmask_butone instead of the now dead sendto_op_mask * ircd/s_bsd.c: switch to using appropriate MsgQLength and other calls on sendQ * ircd/parse.c (parse_server): get rid of a piece of GODMODE code * ircd/msgq.c: add msgq_append and msgq_bufleft; fix a bug in msgq_clean * ircd/m_version.c: fix spelling in comments marking dead code * ircd/m_userip.c (userip_formatter): restructure to make use of struct MsgBuf * ircd/m_userhost.c (userhost_formatter): restructure to make use of struct MsgBuf * ircd/m_stats.c: use MsgQLength on a sendQ * ircd/m_settime.c: use MsgQLength instead of DBufLength on a sendQ; mark a piece of dead code * ircd/m_names.c: use send_reply instead of sendto_one * ircd/m_mode.c: use new mode; remove old dead code * ircd/m_ison.c (m_ison): restructure to make use of struct MsgBuf * ircd/m_burst.c: use BUFSIZE instead of IRC_BUFSIZE; remove old dead code * ircd/listener.c (accept_connection): use sendto_opmask_butone instead of sendto_op_mask * ircd/list.c (free_client): use MsgQClear to clear sendQ * ircd/ircd_reply.c: remove send_error_to_client; restructure send_reply to make use of struct MsgBuf * ircd/dbuf.c (dbuf_put): remove argument to flush_sendq_except, since its no longer used (at least currently) * ircd/channel.c: restructure send_channel_modes to make use of struct MsgBuf; remove set_mode, add_token_to_sendbuf, cancel_mode, and send_hack_notice; use BUFSIZE instead of IRC_BUFSIZE * ircd/Makefile.in: add msgq.c to list of sources; run make depend * ircd/IPcheck.c: use sendcmdto_one instead of sendto_one * include/send.h: send_buffer now takes a struct MsgBuf * instead of a char *; flush_sendq_except now takes no arguments, as sendq flushing currently only happens in dbuf.h and sendQ is a struct MsgQ; remove prototypes for a lot of old sendto_* functions that aren't used anymore; remove sendbuf and IRC_BUFSIZE--the former is no longer needed, and the latter is identical to BUFSIZE in ircd_defs.h * include/s_user.h: make InfoFormatter take a struct MsgBuf* instead of a char *; also make it return void, instead of char * * include/msgq.h: add msgq_append and msgq_bufleft functions * include/client.h: use a struct MsgQ instead of a struct DBuf for sendq * doc/Configure.help: Remove help for compile-time options that have gone away * config/config-sh.in: remove CONFIG_NEWMODE * ircd/m_server.c (mr_server): don't send server IPs in any server notices * ircd/msgq.c (msgq_vmake): add \r\n to messages 2000-12-07 Kevin L. Mitchell * include/msgq.h: declare the MsgQ API * ircd/msgq.c: implementation of new MsgQ system 2000-12-06 Kevin L. Mitchell * ircd/ircd_features.c: #include was supposed to be for ircd_features.h, not features.h--missed when I had to do a rename because of namespace collision 2000-12-05 Greg Sikorski * ircd/m_topic.c: Added missing braces that caused all remote topics to be ignored. 2000-12-04 Kevin L. Mitchell * ircd/m_create.c: I'm tired of the exit_client warning :) (ms_create): discovered that exit_client() was being called with too few arguments * ircd/s_misc.c (exit_client): remove all dependance on FNAME_USERLOG, since that's now gone; log only to LS_USER * ircd/s_debug.c: USE_SYSLOG no longer means anything * ircd/m_oper.c (m_oper): no longer log to LS_OPERLOG--we already log to LS_OPER * ircd/m_kill.c: no longer conditionalize on SYSLOG_KILL * ircd/ircd_log.c: remove LS_OPERLOG, LS_USERLOG * include/ircd_log.h: remove LS_OPERLOG, LS_USERLOG--they serve the same purpose as LS_USER and LS_OPER * config/config-sh.in: remove no longer relevant log config variables * ircd/uping.c (uping_init): use log_write instead of ircd_log * ircd/s_misc.c (exit_client): use log_write instead of ircd_log * ircd/s_conf.c: use log_write instead of ircd_log * ircd/s_bsd.c (report_error): use log_write instead of ircd_log * ircd/s_auth.c (timeout_auth_queries): use log_write instead of ircd_log * ircd/res.c (send_res_msg): use log_write instead of ircd_log * ircd/m_who.c: use log_write instead of write_log; no longer conditionalize on WPATH; mark dead ircd_log calls * ircd/m_uping.c: mark dead ircd_log call * ircd/m_server.c (mr_server): use log_write instead of ircd_log * ircd/m_restart.c: use log_write instead of ircd_log; mark dead ircd_log calls * ircd/m_rehash.c (mo_rehash): use log_write instead of ircd_log * ircd/m_oper.c: use log_write instead of ircd_log; no longer conditionalize on FNAME_OPERLOG; mark dead ircd_log calls * ircd/m_kill.c: mark dead ircd_log calls * ircd/m_connect.c: use log_write instead of ircd_log; mark dead ircd_log * ircd/m_clearmode.c: use log_write instead of write_log; no longer conditionalize on OPATH * ircd/jupe.c: use log_write instead of write_log; no longer conditionalize on JPATH * ircd/ircd_log.c: add USER subsystem; remove ircd_log() compat function; fix a couple of bugs * ircd/ircd_alloc.c: fixed a comment * ircd/ircd.c: use log_write instead of ircd_log; fold server notice generation in a couple of cases * ircd/gline.c: use log_write instead of write_log; no longer conditionalize on GPATH * ircd/channel.c (modebuf_flush_int): use log_write instead of write_log; no longer conditionalize on OPATH * ircd/Makefile.in: run make depend, since dependencies have changed * doc/example.conf: add system USER to documentation * include/ircd_log.h: add system USER; remove old ircd_log() declarations 2000-12-04 Isomer * ircd/m_names.c: Add NAMES_EON to do_names to say add a 'end_of_names' reply when done. * ircd/m_join.c: use NAMES_EON as mentioned above 2000-12-01 net * ircd/motd.c: add a freelist for struct Motds 2000-11-30 Kevin L. Mitchell * ircd/s_stats.c (report_feature_list): report features--only local opers can see logging configuration, since it doesn't really mean anything to users * ircd/s_err.c: add reply messages for new feature subsystem * ircd/s_conf.c: add F lines to .conf * ircd/parse.c: add the message descriptions for /set, /reset, and /get * ircd/m_stats.c: add /stats f * ircd/m_set.c (mo_set): implement /set * ircd/m_reset.c (mo_reset): implement /reset * ircd/m_rehash.c: /rehash m now flushes MOTD cache, and /rehash l reopens log files (for log file rotation) * ircd/m_get.c (mo_get): implement /get * ircd/ircd_log.c: use int instead of void return value; add log_report_features() and log_canon(); fix a function that disappears if DEBUGMODE not #define'd * ircd/ircd_features.c: functions to manipulate feature settings either from the config file or with the new /set, /reset, and /get commands * ircd/Makefile.in: add new .c files, run make depend * include/s_stats.h: declare report_feature_list() (/stats f handler) * include/numeric.h: add RPL_STATSFLINE, RPL_FEATURE, ERR_NOFEATURE, ERR_BADLOGTYPE, ERR_BADLOGSYS, and ERR_BADLOGVALUE reply numerics * include/msg.h: add defines for SET, RESET, and GET * include/ircd_log.h: add a function to canonicalize subsystem names; change some void return values to int * include/ircd_features.h: new features subsystem handles all the manipulation of special features, like log files * include/handlers.h: declare new mo_{s,res,g}et message handlers for fiddling with features run-time * include/client.h (SNO_DEFAULT): don't set SNO_DEBUG by default; seemed like a good idea at the time... * doc/example.conf: document new F lines 2000-11-29 Kevin L. Mitchell * ircd/s_debug.c: rewrite debug_init() and vdebug() in terms of new logging functions, which have special support for the debug log; added loop detection to vdebug(), so that I can sendto_opmask_butone() from log_vwrite() without incurring another call to vdebug() * ircd/s_conf.c (rehash): call log_reopen() from rehash routine; this allows log file rotations * ircd/m_kill.c: call log_write_kill() instead of ircd_log_kill() * ircd/ircd_log.c: much more work fleshing out the interface; removed old interface; included backwards-compat ircd_log() function that logs to subsystem LS_OLDLOG * ircd/ircd.c: switch to new log_init()/log_close()/log_reopen() functions * include/ircd_log.h: include stdarg.h for va_list; move ordering warning to top of file; fill out LogSys enum; declare new log_debug_init(), log_vwrite(), log_write_kill(), and log_[sg]et_*() functions; add flags argument to log_write(); defined flags to inhibit various logging actions * include/client.h: added support for new SNO_DEBUG, enabled only if DEBUGMODE is defined 2000-11-28 Kevin L. Mitchell * ircd/ircd_log.c: make sure the various LOG_* constants are defined (probably not needed, since #include isn't conditional); various static data needed for the new logging functions; definitions of new logging functions * include/ircd_log.h: new LogSys enum, declarations for part of new logging API * ircd/motd.c: we were setting type to MOTD_CLASS unconditionally, which was of course stupid; switched to using switch/case in initialization in motd_create(); zero the MotdList.other pointer from motd_clear() * ircd/ircd.c (main): motd_init() has to come before init_conf(), or we overwrite init_conf()'s hard work with respect to T-lines 2000-11-27 Kevin L. Mitchell * ircd/s_stats.c: comment out report_motd_list and include a reference to motd_report() * ircd/s_conf.c: rip out the old MOTD manipulation functions; call motd_add() from the conf parser; call motd_clear() from the rehash routine; remove the no longer needed memory clearing and reloading stuff from the rehash service routine * ircd/motd.c: loads new API, including static internal functions to do allocation/deallocation, etc. * ircd/m_stats.c: use new motd_report() instead of report_motd_list() * ircd/m_motd.c: use new syntax for motd_send() * ircd/ircd.c: use new motd_init() function * ircd/Makefile.in (SRC): forgot to add motd.c to SRC in Makefile.(in); also ran make depend * include/motd.h: don't need config.h, but now do need time.h; define new structures and constants; redefine old API and define new functions 2000-11-22 Kevin L. Mitchell * ircd/s_user.c (register_user): use motd_signon() instead of calling m_motd; much cleaner this way * ircd/motd.c: write the new motd_* stuff to make MOTD handling less of a crock * ircd/m_motd.c: rewrite m{,s}_motd to call out to new motd_* functions * include/motd.h: define new MOTD API stuff 2000-11-20 Kevin L. Mitchell * ircd/ircd_reply.c (protocol_violation): rewrite protocol_violation so it'll actually work oh, yeah, use %s -> cptr->name, instead of %c -> cptr, so we get the client's real name in there. * ircd/m_motd.c (m_motd): Iso's addition of get_client_class(sptr) resulted in core dumps if NODEFAULTMOTD is defined, because m_motd gets called from register_user with a NULL sptr. This is probably a design problem, but this bandaid will do for now... 2000-11-19 Isomer * ircd/ircd_reply.c: added 'protocol_violation', thus alerting us to problems in the server<->server protocol. * ircd/m_connect.c: allow remote connects with a port of '0' meaning to use the port in the config file. * ircd/m_create.c: Enable hacking protection, lets see how far we get. * ircd/m_error.c: The RFC says never accept ERROR from unreg'd clients, so we don't any more. * ircd/m_kill.c: The kill path is now made up of numnicks of servers, and the user@host is displayed of the victim. * ircd/m_map.c: reloaded 'dump_map'. * ircd/m_trace.c: allow per class T: * ircd/m_stats.c: allow local opers /remote stats anywhere on the 'net. 2000-11-17 Isomer * ircd/m_topic.c: Fixed bug where we'd only send to clients topics that were the *same* instead of different. Oh the embarrasment! * ircd/IPcheck.c: Merged net's fix. 2000-11-02 Kevin L. Mitchell * ircd/m_whois.c: remove compiler warning by adding a newline to end of file * ircd/m_names.c: moved the flags up to s_user.h * ircd/m_join.c: call do_names instead of m_names; restructure ms_join to never transmute a JOIN into a CREATE, but use the TS in the JOIN (if present) to timestamp the channel * ircd/channel.c: send JOINs individually, instead of grouping them, so that we can send the channel's creation time * include/s_user.h: declare do_names() 2000-10-30 Isomer * ircd/m_oper.c: Fixed warning 2000-10-30 Isomer * ircd/m_oper.c: Fixed over agressive cut and no paste 2000-10-30 Isomer * ircd/m_topic.c: Restructured, fixed bug where topics on local channels are propergated (I forget who pointed this out to me, but thanks anyway). Also to save bandwidth don't send the topic to users if the topic is already the same on the server (but still propergate to other servers). X/W's "autotopic" feature must chew a lot of bandwidth, hopefully this will help reduce this. * doc/rfc1459.rfc: Updated documentation on /topic. * ircd/listener.c: snotice warnings about failed accept()'s potentially warning admins that they're running out of fd's. * ircd/stats.c, ircd/class.c: Removed /stats v, added number of people in a class in /stats y * ircd/m_create.c: Checks for timewarp hacking and squit's evil servers. (currently disabled) 2000-10-30 net * ircd/gline.c: Fixed various bugs Isomer left behind. 2000-10-26 Kevin L. Mitchell * ircd/m_join.c (m_join): reply on attempt to join a BADCHANed channel is now ERR_BANNEDFROMCHAN instead of ERR_BADCHANNAME 2000-10-24 Kevin L. Mitchell * ircd/channel.c: ok, now last mode rules; mode +ps will always result in +s (and won't send a mode if the channel is already +s); mode +sp will always result in +p; -n+n on a +n channel results in no mode change; -n+n on a -n channel results in a +n mode change; etc. 2000-10-23 Kevin L. Mitchell * ircd/channel.c: add "add" and "del" elements to ParseState to avoid not-too-pretty -p+s when +s is sufficient; fix a bug in mode_parse_limit that caused it to clear all channel modes prematurely; restructure mode_parse_mode to avoid calling modebuf_mode too early (ties in with first mentioned change); better logic for +p/+s mutual exclusivity; initialize "add" and "del" elements in mode_parse; send simple modes down to modebuf_mode after the loop in mode_parse 2000-09-28 Greg Sikorski * ircd/m_names.c: Fixed a non-lethal logic error that triggers an assert() in find_member_link while debugging. (Spotted by Maniac-). 2000-09-19 Thomas Helvey * ircd/s_conf.c: move K:lines to their own list and data structures, add supporting code. * ircd/m_stats.c: cleanup stats processing a bit move kline listing code to a new function, haven't figured out where it goes yet tho' * ircd/s_stats.c: added K:line bulk lister * include/s_conf.h: added new DenyConf struct * *[ch]: fixeup code that depended on changes 2000-09-17 Thomas Helvey * ircd/class.c: encapsulate class list * include/class.h: clean up classes * * fixup code that depended on changes 2000-09-17 Thomas Helvey * ircd/s_conf.c: add me to local conf * include/s_conf.h: move CONF_ME macro to chkconf.c * ircd/s_bsd.c: cleanup initialization, allow virtual host to be changed by rehash 2000-09-17 Thomas Helvey * include/class.h: add missing prototype * ircd/class.c: make argument to get_conf_class const 2000-09-17 Thomas Helvey * ircd/*.c: merged in changes from 2.10.10.pl12, cleanup merge conflicts. * ircd/*.h: merged in changes from 2.10.10.pl12, cleanup merge conflicts 2000-09-16 Thomas Helvey * ircd/s_conf.c: add code for server struct * ircd/client.c: copy of class.c sort of, new file for client specific operations, will move things here as appropriate, currently only one function is exported from here. * ircd/*.c: general logic cleanups, convert negatives to positives in places. 2000-09-16 Thomas Helvey * ircd/s_conf.c: add code for new crule data structs, strip quotes * ircd/crule.c: clean up scary casting a bit, type safety stuff * include/s_conf.h: add CRuleConf struct and support, remove unused constants * include/crule.h: type safety cleanups * ircd/*.c: fixup code that depended on stuff I changed 2000-09-15 Thomas Helvey * ircd/s_conf.c: start adding code for new conf data structs, changed listeners, admin line, motd lines, class lines. Move validate_hostent to resolver. General mayhem. * include/s_conf.h: new data structs and accessors * ircd/res.c: move validate_hostent here, rewrite, use regular expression for validation. * doc/example.conf: update docs for port 2000-09-14 Thomas Helvey * ircd/s_conf.c (conf_init): rewrite conf file parser, start to break up conf_init into managable chunks. * ircd/listener.c (set_listener_mask): fix logic bug core dump. * include/s_conf.h: add new data struct for local info (unwinding the mess). 2000-09-13 Thomas Helvey * ircd/list.c: put Clients in free lists, pre-allocate MAXCONNECTIONS local clients. * ircd/list.c: put SLinks in free lists * ircd/channel.c: put Memberships in free lists * ircd/ircd.c: rearrange initializations a bit in main Note: With these changes, ircd NEVER frees Clients, SLinks or Memberships. It will also rarely need to allocate new ones during net bursts and other disruptions. This should cut down on memory fragmentation a bit as well. 2000-08-30 Kevin L. Mitchell * ircd/m_names.c (do_names): pull-up from do_names fix in u2.10.10.pl11 2000-07-15 Perry Lorier * various: IP only k:'s and G:'s now do bit tests instead of two(!) match()'s. Major Major cpu savings. Also speed up the other case slightly. As a side effect you can now k/Gline *@10.0.0.0/8. I'll do bans tomorrow, it's nearing 3am. 2000-07-15 Perry Lorier * various: Fixed warnings after compiling on an alpha. 2000-07-09 Perry Lorier * doc/ircd.8: Applied grammitical changes by Liandrin, applied changes suggested by various other people. * ircd/IPcheck.c: More bug fixes. Current problem appears to be that it gets a corrupt entry somehow. 2000-07-09 Greg Sikorski * ircd/m_oper.c: Clean up compiler warning. 2000-07-08 Perry Lorier * doc/ircd.8: Updated the documentation, it was slightly out of date being updated around 1989. * ircd/m_whois.c: Rewrote for clarity, and probably a bit more speed. fixed a few minor glitches. * doc/rfc1459.unet: Updated. * ircd/IPcheck.c: Fixed more bugs. * ircd/s_bsd.c: We now keep track of servers we've conected. 2000-07-02 Perry Lorier * ircd/s_misc.c: Fixed remote IPcheck bug. Ok, I'm a moron, so sue me. Thanks to Hektik, thanks thanks thanks thanks thanks thanks thanks thanks thank thanks thank thanks 2000-07-01 Perry Lorier * ircd/s_conf.c: "Fixed" the "bug" where people would "evade" K:'s. * ircd/s_conf.c, include/IPcheck.h: Fixed compile warnings. 2000-06-22 Perry Lorier * ircd/IPcheck.c: Large chunks redone. * ircd/s_conf.c: Changes due to IPcheck - ONE nolonger supported, single AND double digit limits are allowed now. * misc other: Changes to IPcheck. 2000-06-30 Perry Lorier * ircd/ircd.c: Fix command line parameter bugs. 2000-06-30 Perry Lorier * ircd/m_kill.c: Fixed bug with LOCAL_KILL_ONLY * ircd/m_nick.c: Tidied things up. 2000-06-12 Joseph Bongaarts * ircd/m_stats.c: Iso forgot mo_stats when he added /stats v 2000-05-29 Perry Lorier * ircd/m_stats.c: add /stats v to do only the last part of the /trace * ircd/IPcheck.c: Cosmetic change, if we meddle with it enough do you think it'll get bored and fix itself? 2000-06-09 Greg Sikorski * ircd/m_names.c: Clean up compiler warnings. 2000-06-09 Kevin L. Mitchell * ircd/channel.c (mode_parse_client): don't send warning if there's not enough arguments for a +/-o/v; means the habit of doing "/mode #channel +oooooo bob" doesn't result in a bunch of error messages 2000-06-04 Greg Sikorski * ircd/m_names.c: Re-factor code to remove unneccessary GlobalChannelList iteration every time someone joins a channel. 2000-06-02 Kevin L. Mitchell * ircd/s_user.c: add struct Gline * argument to register_user; look up global glines and repropagate them if necessary; send acknowledgement of gline to remote servers when registering users * ircd/s_serv.c (server_estab): don't send acknowledgement of local glines to remote servers; do send gline acknowledgement of bursted users * ircd/m_user.c (m_user): pass new struct Gline * argument to register_user * ircd/m_pong.c: pass new struct Gline * argument to register_user * ircd/m_nick.c (ms_nick): document protocol change * ircd/gline.c: support GLINE_LASTMOD * include/s_user.h: add struct Gline * argument to register_user * include/gline.h: add GLINE_LASTMOD to look up non-zero lastmods * ircd/s_conf.c (find_kill): add unsigned int argument to gline_lookup() * ircd/gline.c: add GLINE_GLOBAL to lookup or find only global glines; add unsigned int argument to gline_lookup() * include/gline.h: add GLINE_GLOBAL flag; add unsigned int argument to gline_lookup() * ircd/m_server.c: Resend jupe only when there is no % parameter, or when it falls out of bounds: see comments prior to call to jupe_resend(); call server_estab with struct Jupe parameter, so that we place the appropriate % in the appropriate place. * ircd/s_serv.c (server_estab): send % for introduced server, as well as for servers when we're sending the BURST * include/s_serv.h: add a struct Jupe * to the arguments for server_estab() so that we can send the appropriate lastmod parameter * ircd/m_gline.c (ms_gline): actually, this should be the slightest bit more efficient... * ircd/m_jupe.c (ms_jupe): actually, this should be the slightest bit more efficient... * ircd/m_gline.c (ms_gline): inhibit GLINE processing resends during netburst * ircd/m_jupe.c (ms_jupe): inhibit JUPE processing resends during netburst * ircd/channel.c (joinbuf_join): really remove user from local channels 2000-05-29 Perry Lorier * ircd/m_names.c: Removed redundant space. * ircd/s_bsd.c: Fixed incorrect syntax on ERROR line. 2000-05-18 Kevin L. Mitchell * ircd/m_burst.c (ms_burst): er...that should have been a ",", not a " " 2000-05-04 Kevin L. Mitchell * ircd/channel.c: replace bogus assertions with returns, which is logically correct; only wipe out limit/key if they were originally set in the first place; remove user from channel when doing a PARTALL; only send MODE +o for user CREATEing channel if user is not MyUser--CREATE will only be used if the channel did not originally exist, therefore we can assume no one local is on the channel anyway, and we don't exactly need for the user to see an explicit +o for themselves * doc/readme.gline: describe the syntax of the GLINE command * doc/readme.jupe: update to reflect a couple of changes to JUPE * ircd/gline.c: don't propagate local changes * ircd/jupe.c: don't propagate local changes * ircd/m_gline.c (mo_gline): force local flag when deactivating glines with 0 lastmod * ircd/gline.c (gline_deactivate): G-lines with zero lastmod time are now removed instead of being deactivated * ircd/m_gline.c (ms_gline): make G-lines of the form "GLINE * -" be accepted * ircd/channel.c (send_channel_modes): deal with one of the last vestiges of sendbuf * ircd/m_burst.c (ms_burst): debugged ban processing; removed debugging hooks * ircd/channel.c (modebuf_extract): remove debugging sendto_opmask_butone calls 2000-05-03 Kevin L. Mitchell * ircd/channel.c: support a couple of new flags to support using mode_parse; fix some bugs with 0 struct ModeBuf *; implementation of modebuf_extract to extract added flags for use by ms_burst * include/channel.h: a couple of new flags to support using mode_parse inside ms_burst * ircd/m_burst.c (ms_burst): brand new implementation of BURST * ircd/m_endburst.c: add loop to processing of end_of_burst to free empty channels after the BURST is over. * ircd/m_server.c: convert to use new send.c functions--I wanted to rewrite it from scratch, but the logic's pretty complex; I may still rewrite it, though... 2000-05-02 Thomas Helvey * ircd/ircd.c: fix broken header include ordering 2000-05-02 Thomas Helvey * ircd/IPcheck.c: cleanups for ZenShadow's cleanups review emailed privately * include/IPcheck.h: removed unneeded include 2000-05-02 Kevin L. Mitchell * ircd/s_user.c (hunt_server): throw in a comment so I know what the sendto_one is for * include/querycmds.h (Count_unknownbecomesclient): convert to sendto_opmask_butone * ircd/send.c: start removing dead code * include/send.h: start removing dead code * ircd/m_rping.c: convert to sendcmdto_one / send_reply / hunt_server_cmd * ircd/m_rpong.c: convert to sendcmdto_one / send_reply 2000-05-01 Kevin L. Mitchell * ircd/m_stats.c: convert to sendcmdto_one / send_reply * ircd/m_kick.c: Completely reimplement m_kick * ircd/channel.c: send_user_joins removed; it was dead code, anyway... 2000-05-01 Perry Lorier * ircd/m_invite.c: Fix for the rest of m_invite.c, and again. * ircd/channels.c: My fix for the part problem. Untested, probably won't work. Can't be much worse than the current problem. it'll either work or core, take your pick. 2000-04-30 Perry Lorier * config/config-sh.in: Fix for CONNEXIT * ircd/s_{user,misc}.c: Fix for CONNEXIT * ircd/m_invite.c: Fix for incorrectly numnickified invite. (Kev: Want to come talk to me about this?) 2000-04-30 Steven M. Doyle * ircd/ircd.c - general cleanups and readability enhancements - rewrite of setuid/chroot code. - server will no longer run as root - -DPROFIL compile option removed - Fixed IPcheck API calls * config/config-sh.in - Fixed up chroot compile options - Added options for debug and profile compiles * config/gen.ircd.Makefile - Support for new debug/profile options * ircd/Makefile.in - Support for new debug/profile options * ircd/ircd_signal.c - Removed -DPROFIL * include/IPcheck.h - Removed old API prototypes, added new ones * ircd/IPcheck.c - Readability cleanups (well, I -think-...) - Changed IPRegistryEntry.last_connect to a time_t. The previously used unsigned short was probably causing interesting things after a client had been connected longer than about 65,535 seconds... - Removed old API functions. * ircd/whocmds.c - Removed IPcheck.h include * Additionally modified IPcheck API calls in: - ircd/m_nick.c - ircd/m_auth.c - ircd/s_bsd.c - ircd/s_conf.c - ircd/s_misc.c - ircd/s_serv.c - ircd/s_user.c 2000-04-30 Perry Lorier * ircd/s_bsd.c: Sigh. :) * ircd/m_mode.c: fix for modeless channels by poptix. 2000-04-29 Kevin L. Mitchell * ircd/m_join.c: reimplement JOIN in terms of struct JoinBuf * ircd/channel.c (clean_channelname): make clean_channelname also truncate long channel names 2000-04-28 Kevin L. Mitchell * ircd/m_create.c: reimplement CREATE in terms of struct JoinBuf * ircd/channel.c: implemented joinbuf_init, joinbuf_join, joinbuf_flush * include/channel.h: definitions and declarations for the struct JoinBuf abstraction 2000-04-29 Perry Lorier * ircd/s_bsd.c: Ok, so I thought I compiled and tested this... 2000-04-29 Perry Lorier * ircd/s_bsd.c: Add debugging code to IPcheck 2000-04-28 Kevin L. Mitchell * include/ircd_reply.h (SND_EXPLICIT): use instead of RPL_EXPLICIT * ircd/ircd_reply.c (send_reply): use SND_EXPLICIT instead of RPL_EXPLICIT * ircd/m_userhost.c (m_userhost): add a dead code comment * ircd/m_desynch.c: forgot one... * ircd/m_rehash.c (mo_rehash): er, duplicates :) * ircd/m_proto.c (proto_send_supported): just change a comment so it doesn't show up in my scans * ircd/ircd_reply.c (send_reply): fix a slight bug... * ircd/s_numeric.c (do_numeric): use new sendcmdto_* functions, kinda hackish... * ircd/parse.c (parse_server): argument wrangling to make processing in do_numeric a little easier to deal with * ircd/s_serv.c (server_estab): SERVER should come from acptr->serv->up, not &me * ircd/m_lusers.c: accidentally left out sptr for a %C * ircd/send.c: hack to support doing wallchops... * ircd/m_whowas.c: convert to new send functions * ircd/m_whois.c: convert to new send functions * ircd/m_who.c: convert to new send functions * ircd/m_wallops.c: convert to new send functions * ircd/m_wallchops.c: convert to new send functions * ircd/m_version.c: convert to new send functions * ircd/m_userip.c: convert to new send functions * ircd/m_userhost.c: convert to new send functions * ircd/m_uping.c: convert to new send functions * ircd/m_trace.c: convert to new send functions * ircd/m_topic.c: convert to new send functions * ircd/m_time.c: convert to new send functions * ircd/m_squit.c: convert to new send functions * ircd/m_silence.c: convert to new send functions * ircd/m_settime.c: convert to new send functions * ircd/m_restart.c: convert to new send functions * ircd/m_rehash.c: convert to new send functions * ircd/m_privmsg.c: convert to new send functions * ircd/m_pong.c: convert to new send functions * ircd/m_ping.c: convert to new send functions * ircd/m_pass.c: convert to new send functions * ircd/m_opmode.c: convert to new send functions * ircd/m_oper.c: convert to new send functions * ircd/m_notice.c: convert to new send functions * ircd/m_nick.c: convert to new send functions * ircd/m_names.c: convert to new send functions * ircd/m_motd.c: convert to new send functions * ircd/m_mode.c: convert to new send functions * ircd/m_map.c: convert to new send functions * ircd/m_lusers.c: convert to new send functions * ircd/m_list.c: convert to new send functions * ircd/m_links.c: convert to new send functions * ircd/m_kill.c: convert to new send functions * ircd/m_jupe.c: convert to new send functions * ircd/m_invite.c: convert to new send functions * ircd/m_info.c: convert to new send functions * ircd/m_help.c: convert to new send functions * ircd/m_gline.c: convert to new send functions * ircd/m_error.c: convert to new send functions * ircd/m_endburst.c: convert to new send functions * ircd/m_die.c: convert to new send functions * ircd/m_destruct.c: convert to new send functions * ircd/m_defaults.c: convert to new send functions * ircd/m_connect.c: convert to new send functions 2000-04-28 Perry Lorier * RELEASE.NOTES: Describe a few more undocumented features. * config/config-sh.in: change the default paths for logging and the recommended number of channels. * include/supported.h: Rearrange slightly, added CHANTYPE's 2000-04-27 Kevin L. Mitchell * ircd/m_close.c: convert to send_reply * ircd/m_clearmode.c: convert to send_reply, sendcmdto_serv_butone * ircd/m_away.c: convert to send_reply and sendcmdto_serv_butone * ircd/m_admin.c: convert to send_reply and hunt_server_cmd * ircd/s_user.c (hunt_server_cmd): new hunt_server replacement that takes cmd and tok arguments, etc. NOTE: THIS IMPLEMENTATION HAS A MAJOR HACK!!! The whole hunt_server architecture should be carefully rethought... * ircd/s_stats.c (hunt_stats): use new hunt_server_cmd * include/s_user.h: hunt_server_cmd -- replacement for hunt_server * ircd/s_misc.c: *sigh* 2.10.10 doesn't support squitting by numeric nick; therefore, we have to use the server name * ircd/m_squit.c (ms_squit): allow to squit by server numeric nick * ircd/send.c: fix minor bugs * ircd/s_user.c (check_target_limit): mark dead code so I filter it when I grep * ircd/s_serv.c (exit_new_server): mark dead code so I filter it when I grep * ircd/parse.c: mark dead code so I filter it when I grep * ircd/map.c: mark dead code so I filter it when I grep * ircd/ircd.c: mark dead code so I filter it when I grep * ircd/ircd_relay.c: convert over to new sendcmdto_*, send_reply functions * ircd/channel.c: mark dead code so I filter it when I grep * ircd/s_stats.c: use send_reply instead of sendto_one w/rpl_str; hope I'm not stepping on toes... * ircd/s_conf.c: more sendto_opmask_butone / send_reply conversions; use ircd_snprintf in a couple of cases to negate the possibility of buffer overflow 2000-04-26 Kevin L. Mitchell * ircd/channel.c: convert as much as possible to new send semantics * ircd/send.c (sendcmdto_common_channels): fix a subtle bug -- test member->user->from->fd, not from->fd * ircd/gline.c (gline_add): go ahead and add badchans; we just won't look for them in m_gline; this way, they always work... * ircd/jupe.c: use ircd_vsnprintf conversion specifiers * ircd/gline.c: since write_log now uses ircd_vsnprintf, use ircd_vsnprintf conversion specifiers * ircd/support.c (write_log): use ircd_vsnprintf for write_log, so I have my conversion specifiers * ircd/gline.c (do_gline): use send_reply for ERR_YOUREBANNEDCREEP * ircd/send.c (sendcmdto_flag_butone): explicitly send WALLOPS to local users * ircd/s_serv.c (exit_new_server): rewrite exit_new_server to be a little less brain-dead * ircd/s_misc.c: use sendcmdto_one, sendrawto_one, and send_reply * ircd/s_debug.c: use send_reply with RPL_EXPLICIT for RPL_STATSDEBUG * ircd/res.c (cres_mem): use send_reply with RPL_EXPLICIT for RPL_STATSDEBUG * ircd/list.c (send_listinfo): use send_reply with RPL_EXPLICIT for RPL_STATSDEBUG * ircd/m_pong.c: use RPL_EXPLICIT for ERR_BADPING * ircd/ircd.c: use RPL_EXPLICIT for ERR_BADPING * ircd/s_user.c (register_user): use RPL_EXPLICIT for ERR_INVALIDUSERNAME * ircd/ircd_reply.c (send_reply): support RPL_EXPLICIT * include/ircd_reply.h (RPL_EXPLICIT): somewhat of a hack to mark a numeric as needing to use an explicit pattern, which will be the first argument in the variable argument list * ircd/s_user.c: use sendrawto_one instead of sendto_one to send non-prefixed nospoof PING * ircd/s_bsd.c: use sendrawto_one instead of sendto_one to send non-prefixed SERVER login * ircd/ircd.c (check_pings): fix last sendto_one calls (except for a numeric usage further up) * include/send.h: declare sendrawto_one * ircd/send.c (sendrawto_one): new function to use ONLY for non-prefixed commands, like PING to client, or PASS/SERVER on server registration 2000-04-25 Kevin L. Mitchell * ircd/ircd_snprintf.c (doprintf): implement %H for possible future expansion (channel numerics?) * include/ircd_snprintf.h: added documentation to # to explain use with %C; added documentation for : to explain use with %C; added documentation for %H for channels * ircd/whocmds.c: use send_reply * ircd/userload.c: use sendcmdto_one * ircd/uping.c: use sendcmdto_one * ircd/send.c: use new flags to %C format string; ':' prefixes client name with a colon for local connects, '#' uses nick!user@host form for local connects * ircd/s_user.c: use send_reply, sendto_opmask_butone, sendcmdto_one, sendcmdto_serv_butone, sendcmdto_flag_butone * ircd/s_serv.c: use sendcmdto_one, sendto_opmask_butone * ircd/s_bsd.c: use sendto_opmask_butone, send_reply, sendcmdto_one * ircd/s_auth.c: use sendto_opmask_butone * ircd/res.c: use sendcmdto_one * ircd/ircd_snprintf.c (doprintf): minor bug fixes and some debugging assertions 2000-04-24 Kevin L. Mitchell * ircd/support.c: dumpcore is no longer used, so get rid of it * ircd/parse.c: use send_reply, sendcmdto_one * ircd/map.c: use send_reply * ircd/listener.c: use send_reply * ircd/jupe.c: use sendto_opmask_butone, send_reply * ircd/ircd_reply.c: use send_reply * ircd/ircd.c: use sendto_opmask_butone * ircd/gline.c: use sendto_opmask_butone, send_reply * ircd/ircd_snprintf.c (doprintf): make it deal with incompletely registered clients; make FLAG_ALT print nick!user@host; make FLAG_COLON print :blah * ircd/class.c (report_classes): use send_reply instead of sendto_one * ircd/hash.c (m_hash): replace sendto_one with sendcmdto_one * ircd/IPcheck.c (ip_registry_connect_succeeded): replace sendto_one with sendcmdto_one 2000-04-21 Kevin L. Mitchell * ircd/send.c: clean up logic in sendcmdto_channel_butone; use MyConnect() instead of IsServer() in sendcmdto_flag_butone; define sendcmdto_match_butone * include/send.h: declare sendcmdto_match_butone 2000-04-20 Kevin L. Mitchell * ircd/jupe.c: update to use send_reply() * ircd/gline.c: update to use send_reply() * include/ircd_reply.h: declare send_reply * ircd/ircd_reply.c (send_reply): send_error_to_client, but for replies; uses ircd_snprintf * ircd/send.c: added comments to redirect searchers to appropriate sendcmdto_* function; moved new functions to end of file; added explanatory comments; reordered arguments; defined new functions mentioned below * ircd/m_jupe.c: reorder arguments to sendcmdto_* functions * ircd/m_gline.c: reorder arguments to sendcmdto_* functions * ircd/jupe.c: reorder arguments to sendcmdto_* functions * ircd/gline.c: reorder arguments to sendcmdto_* functions * include/send.h: reorder arguments, add explanatory comments, declare new functions sendcmdto_flag_butone, sendto_opmask_butone, and vsendto_opmask_butone 2000-04-19 Kevin L. Mitchell * ircd/send.c: define sendcmdto_channel_butone, wrote a simplified vsendto_op_mask that uses '*' instead of the receiving client nickname * include/send.h: declare sendcmdto_channel_butone; takes a skip argument that allows you to skip (or not to skip) deaf users, users behind bursting servers, and non channel operators 2000-04-17 Kevin L. Mitchell * ircd/send.c: new sendcmdto_channel_butserv -- note that old sendto_channel_butserv has a subtle bug; also wrote sendcmdto_common_channels. * include/send.h: declare new sendcmdto_* functions * ircd/jupe.c: support local deactivations of jupes * ircd/gline.c: support local deactivations of glines * include/jupe.h: JUPE_LDEACT allows jupes to be locally deactivated; if they aren't locally deactivated, then it slaves to the net-wide activation status; JupeIsRemActive() tests only whether the jupe is active everywhere else * include/gline.h: GLINE_LDEACT allows glines to be locally deactivated; if they aren't locally deactivated, then it slaves to the net-wide activation status; GlineIsRemActive() tests only whether the gline is active everywhere else * ircd/gline.c: detect overlapping G-lines; if an existing, wider gline expires after the new one will, we drop the new one, otherwise we add the G-line after that one (so the wide one will apply first); if the new one contains an existing G-line and if it will expire after the existing one, we drop the existing one to save memory * ircd/m_gline.c (mo_gline): opers could issue remote local glines when CONFIG_OPERCMDS was off; fixed 2000-04-16 Kevin L. Mitchell * ircd/m_jupe.c (mo_jupe): allow target argument to be dropped if this is a local JUPE * ircd/gline.c: add flags argument to gline_activate and gline_deactivate for future expansion * ircd/m_gline.c: pass flags to gline_activate and gline_deactivate * include/gline.h: add flags argument to gline_activate and gline_deactivate * ircd/jupe.c: add flags argument to jupe_activate and jupe_deactivate for future expansion * include/jupe.h: add flags argument to jupe_activate and jupe_deactivate * ircd/m_jupe.c: pass a flags argument to jupe_add instead of local, active; pass flags to jupe_activate and jupe_deactivate * include/gline.h: remove dead code * ircd/gline.c: make gline expire times relative to CurrentTime, since that should be monotonically increasing, instead of TStime(), which can be set backwards, and which can therefore cause an expire time to increase; make local glines be removed instead of just deactivated; don't let gline_find() look for user@host glines if the mask being looked up is a channel mask * ircd/send.c (vsendcmdto_one): forgot to account for the case where origin is a server and destination is a user * ircd/jupe.c: make jupe expire times relative to CurrentTime, since that should be monotonically increasing, instead of TStime(), which can be set backwards, and which can therefore cause an expire time to increase; make local jupes be removed instead of just deactivated * ircd/ircd_snprintf.c: d'oh, thanks for catching that; short for limit is fine. any other warnings I should know about? 2000-04-15 Thomas Helvey * ircd/*.c: const correctness and type safety cleanups to get code to compile with C++ compiler. Still has signed/unsigned comparison warnings. 2000-04-15 Greg Sikorski * ircd/userload.c: change include to for portability. 2000-04-14 Kevin L. Mitchell * ircd/m_gline.c (mo_gline): d'oh, target isn't a numeric; use %C and convert acptr... * ircd/s_user.c: move gline_lookup function call into register_user, where it'll have a username to lookup! * ircd/m_gline.c: modify to utilize new sendcmdto_* series of functions; also stuff send_error_to_client into return clauses * ircd/m_jupe.c: modify to utilize new sendcmdto_* series of functions; also use send_error_to_client where that makes sense * ircd/jupe.c: modify to utilize new sendcmdto_* series of functions; also use send_error_to_client where that makes sense * ircd/gline.c: modify to utilize new sendcmdto_* series of functions; also fix gline_lookup() to deal properly with remote clients--boy, do struct Client and struct User need to be cleaned up! * ircd/ircd_snprintf.c (doprintf): a dest of &me is a server, too... * ircd/send.c: wrote sendcmdto_one(), vsendcmdto_one(), and sendcmdto_serv_butone(), all utilizing the %v conversion of ircd_snprintf() * include/send.h: define IRC_BUFSIZE, max size of a message; declare sendcmdto_one(), vsendcmdto_one(), and sendcmdto_serv_butone() * include/msg.h: define all the CMD_* constants needed to utilize the new sendcmdto_* series of functions * ircd/Makefile.in (SRC): list ircd_snprintf.c; run make depend * ircd/gline.c: remove old, dead code. * ircd/m_gline.c (mo_gline): disallow setting of global G-lines unless CONFIG_OPERCMDS is enabled; disallow listing of all G-lines (don't advertise proxies); remove dead code * ircd/parse.c: oper handler for JUPE only lists jupes unless CONFIG_OPERCMDS is enabled * ircd/m_jupe.c (mo_jupe): don't compile mo_jupe() if CONFIG_OPERCMDS is not enabled; we'll disable it in parse.c * ircd/m_opmode.c (mo_opmode): if CONFIG_OPERCMDS is not enabled, always return ERR_DISABLED * ircd/m_clearmode.c (mo_clearmode): if CONFIG_OPERCMDS is not enabled, always return ERR_DISABLED * ircd/s_err.c: add error message to indicate disabled commands * include/numeric.h (ERR_DISABLED): to indicate disabled commands * doc/Configure.help: add documentation for CONFIG_OPERCMDS * config/config-sh.in: add CONFIG_OPERCMDS, default both it and CONFIG_NEW_MODE to 'y' for now * ircd/gline.c (gline_list): fix a minor formatting bogon * BUGS: since I fixed that bug, might as well mark it fixed. * ircd/m_join.c: look up badchans with GLINE_EXACT * ircd/m_gline.c: fix parc count problems; look up existing G-lines with GLINE_EXACT; only set new lastmod when activating/deactivating existing glines if old lastmod was not 0 * ircd/gline.c: forgot to copy the gline reason over; don't propagate a gline with 0 lastmod if origin is user; add GLINE_EXACT to force exact matching of gline mask * ircd/ircd_snprintf.c (doprintf): forgot to deal with the zero flag properly * ircd/s_conf.c (find_kill): gline_find() takes a char *userhost, but gline_lookup() actually takes a client--d'oh. 2000-04-13 Thomas Helvey * ircd/IPcheck.c: Back port BLMet's bugfix from 2.10.10 2000-04-13 Greg Sikorski * ircd/whocmds.c: Don't make idle flag default in /who, to prevent: "/who * x" "Gte3 H*iwg Gte@212.49.240.217 :1 :0 I am the one that was." (Found by Plexus). * ircd/whocmds.c: Change idle time calc from socket idle to user idle. 2000-04-13 Kevin L. Mitchell * config/aclocal.m4 (unet_CHECK_TYPE_SIZES): check size of void *, too, for ircd_snprintf.c * include/ircd_snprintf.h: documentation for ircd_(v)snprintf, in comments; mostly descended from the Linux manpage for printf, but also documenting the extensions. * ircd/ircd_snprintf.c: NULL dest is equivalent to going to a client; make 'q' be the same as 'L'; remove __inline__; only define EXTENSION if HAVE_LONG_LONG is defined * include/handlers.h: declare m_gline() * ircd/parse.c: gline can be called by users, but it only lists the glines. * ircd/s_user.c (set_nick_name): resend gline if a remote server introduces a glined client * ircd/s_serv.c (server_estab): burst glines, too * ircd/gline.c: fix up all the expire times to be offsets; simplify gline_resend() * ircd/m_gline.c: begin coding replacements for ms_gline(), mo_gline(), and m_gline() * ircd/gline.c (gline_add): allow *@#channel to work correctly; also, prohibit local BADCHANs if LOCAL_BADCHAN not defined 2000-04-13 Greg Sikorski * tools/Bouncer/*: Add comments/documentation/tags. * tools/Bouncer/*: Add debug defines, make task fork(). 2000-04-12 Thomas Helvey * ircd/s_err.c: Cleanup s_err.c make one table so we don't have to do anything tricky to get an error string. 2000-04-12 Greg Sikorski * Add port bouncer for http (x/w) 2000-04-12 Kevin L. Mitchell * ircd/s_conf.c (find_kill): replaced call to find_gline() with a call to gline_find(); also used GlineReason() instead of direct reference to structure member * ircd/m_join.c (m_join): replace bad_channel() calls with calls to gline_find(name, GLINE_BADCHAN), and also check to see if gline is active * ircd/channel.c: nothing seems to be called anywhere... * ircd/s_err.c: update a couple of replies to dovetail with new semantics * ircd/gline.c: begin complete re-implementation of gline.c along the lines of the final design of jupe.c * include/gline.h: begin complete re-implementation of gline.c along the lines of the final design of jupe.c * ircd/channel.c (mode_process_clients): fix "Deop of +k user on %s by %s" message... * ircd/ircd_snprintf.c: my new snprintf()-like functions * include/ircd_snprintf.h: my new snprintf()-like functions 2000-04-11 Thomas Helvey * ircd/IPcheck.c: removed old dead code * ircd/s_user.c (send_user_info): removed non-standard user not found message for userhost/userip 2000-04-11 Greg Sikorski * ircd/s_err.c: Added missing quotes to ERR_DONTCHEAT numeric. * doc/p10.html: Work on chapter 4. 2000-04-10 Kevin L. Mitchell * ircd/channel.c (mode_parse_client): fix coredump on /mode #foobar +o nosuchnick 2000-04-10 Perry Lorier * BUGS: Added bug. 2000-04-09 Thomas Helvey * include/IPcheck.h: fix prototype * ircd/s_user.c: fix usage of IPcheck_remote_connect * ircd/IPcheck.c: removed unused args 2000-04-09 Thomas Helvey * include/IPcheck.h: add proto for IPcheck_expire * ircd/IPcheck.c: Rewrote * ircd/ircd.c: Add IPcheck_expire to main message loop * ircd/s_user.c: Redo target hashing, refactor target code * include/numeric.h: Cleaned up numerics, added which ones are in use by other networks and what they are in use for. * ircd/channel.c: cleaned can_join(), allow anyone through anything if /invited, simplified the function. Opers overusing OPEROVERRIDE will get a message explaining to them not to cheat. * ircd/m_join.c: cleaned up the various join functions, should be a lot more efficient. Still needs work. Now assumes that s<->s won't send it a JOIN 0. Service coders - note this and tread with care. * ircd/m_stats.c: added Gte-'s stats doc patch. * ircd/m_version.c: /version now returns the 005 numeric as well. as requested by Liandrin. 2000-04-07 Kevin L. Mitchell * ircd/m_clearmode.c: add include for support.h for write_log() * configure: move ircd/crypt/* to tools/* 2000-04-06 Thomas Helvey * ircd/s_auth.c: Shorten auth connect timeout to 60 seconds set client host to server alias if connection from localhost 2000-04-06 Perry Lorier * ircd/ircd.c: Fix core during pinging (oops) 2000-04-06 Perry Lorier * ircd/send.c: fixed wrong ident being sent to channels bug. * include/numerics.h: Updated some of the numerics from other networks. Flagged some as 'unused' by undernet. 2000-03-30 Perry Lorier * ircd/ircd.c: Lets see if this helps the ping problem at all. * ircd/whocmds.c, /doc/readme.who: Added %l specifier to get idle time for local clients. (as requested), extended who now returns all the flags (@+!) so you can tell the complete state of a client. 2000-03-30 Thomas Helvey * m_rping.c m_rpong.c: add Gte's rping/rpong fixes 2000-03-30 Perry Lorier * ircd/parse.c: oops, missed opers. 2000-03-30 Perry Lorier * ircd/parse.c: fixed mystifying ping bug thats been plaguing us for so long. Remember: m_ping MUST be in the parse array. :) 2000-03-30 Perry Lorier * ircd/ircd.c: test in check_pings was wrong. I move that we disallow cvs commit after 10pm localtime.... 2000-03-30 Perry Lorier * ircd/m_pong.c: Fix it for servers too. 2000-03-30 Perry Lorier * ircd/m_pong.c: Fix ping timeout bugs 2000-03-30 Perry Lorier * ircd/channel.c: Bans had CurrentTime in their when field instead of TStime() 2000-03-31 Thomas Helvey * ircd/numnicks.c (SetXYYCapacity): fix for extended numerics. 2000-03-30 Perry Lorier * ircd/m_nick.c: send kills both ways so when we add nick change on collision we don't desync the network. * ircd/map.c: Fixup the map a bit more. 2000-03-31 Kevin L. Mitchell * ircd/m_clearmode.c (do_clearmode): Log the CLEARMODE to OPATH * ircd/m_opmode.c: Log the mode changes to OPATH * ircd/channel.c (modebuf_flush_int): Log the mode changes to OPATH * include/channel.h (MODEBUF_DEST_LOG): Log the mode changes to OPATH * doc/Configure.help: help text for CONFIG_LOG_OPMODE / OPATH * config/config-sh.in: added OPATH for opmode log file * ircd/m_clearmode.c (do_clearmode): updated uses of modebuf_mode_string() for the new usage * ircd/channel.c: added flag MODE_FREE and an int argument to modebuf_mode_string() to indicate that the string must be free'd; updated calls to modebuf_mode_string() for the new usage; called collapse(pretty_mask()) on the ban string and use allocated memory for it; added ban list length accounting; fixed a number of small bugs in ban processing * include/channel.h: added flag MODE_FREE and an int argument to modebuf_mode_string() to indicate that the string must be free'd * ircd/m_clearmode.c (do_clearmode): made sure clearmode removed keys and limits that are set 2000-03-30 Perry Lorier * ircd/ircd.c: rewrote check_pings() for maintainability and speed. Also changed quit msg's so they don't have redundant nick[host] info in them. * ircd/send.c: Changed write errors to report what error occured (if possible). * ircd/gline.c: added gline comment to the quit. * ircd/m_server.c: Added suggestions to server quits mentioning what went wrong so the admin can fix it earlier instead of asking questions... * ircd/map.c: Changed m_map() to hide numerics, show a * beside servers that aren't fully burst yet. And show '(--s)' for servers where its not sure. * doc/example.conf: Fixed wrapped U: 2000-03-30 Kevin L. Mitchell * ircd/m_mode.c (ms_mode): implemented a new m_mode in terms of mode_parse() (version selectable at compile time) * ircd/m_clearmode.c (mo_clearmode): clean_channelname(parv[1]) * ircd/m_opmode.c (mo_opmode): clean_channelname(parv[1]) * config/config-sh.in: add new config option to enable new m_mode implementation * doc/Configure.help: add documentation for new config option CONFIG_NEW_MODE * ircd/channel.c (mode_parse_client): /opmode #foobar -o -- 461 MODE -v : Not enough parameters * ircd/m_clearmode.c (do_clearmode): do_clearmode() would remove +k and +l even if they weren't set... * ircd/m_opmode.c: implement the OPMODE command using mode_parse() * ircd/channel.c: make mode_process_clients() clear the DEOPPED flag; fix +s+p exclusivity; add MODE_ADD/MODE_DEL to flag list for; test the 0-th member, not the i-th member, of the client change state stuff * ircd/m_clearmode.c (do_clearmode): use the new mode_invite_clear() function * ircd/channel.c: cleared up all the compile-time warnings and errors * include/channel.h: added declarations for mode_ban_invalidate() and mode_invite_clear() * ircd/channel.c: finished mode_parse(), then broke it up into a dozen or so helper functions to make the code easier to read 2000-03-29 Thomas Helvey * ircd/ircd.c: refactor server initialization a bit, use getopt for parsing command line, refactor init_sys, main, and other bits. * ircd/s_bsd.c: add functions for initialization to clean up logic a bit and remove duplicated code. * include/ircd.h: add struct for server process related variables. 2000-03-29 Kevin L. Mitchell * ircd/channel.c: initial definition of mode_parse(); flags to prevent doing the same thing multiple times; helper method send_notoper() to send a "Not oper"/"Not on channel" notice * include/channel.h: declare mode_parse() and helper flags * ircd/channel.c (modebuf_flush_int): fiddled with timestamp sending to match the current action of set_mode() closely enough that hopefully there won't be major conflicts * ircd/channel.c (modebuf_flush_int): consolidated the mode string building logic, reversed the order of the arguments to mode commands to have '-' preceed '+' 2000-03-29 Thomas Helvey * ircd/s_bsd.c (add_connection): don't disable socket options let OS tune itself and allow important performance tweaks to work. 2000-03-28 Kevin L. Mitchell * ircd/channel.c (modebuf_flush_int): use %d, not %-15d; I got confused by set_mode, which is doing some really weird logic; guess what I'm going to rewrite next? ;) 2000-03-28 Kevin L. Mitchell * include/channel.h: added MODE_SAVE for the bounds checking stuff in modebuf_flush * ircd/channel.c: make modebuf_flush into modebuf_flush_int and make it do bounds checking on the buffer; all modes are sent only if the all parameter is 1; modebuf_flush is the exported wrapper * include/channel.h: add BOUNCE, renumber flags to get a little more space * ircd/channel.c (modebuf_flush): don't overload HACK2, add BOUNCE; send DESYNCH message 2000-03-27 Kevin L. Mitchell * ircd/m_clearmode.c (do_clearmode): only mark the modes the channel actually has in effect for deletion * ircd/channel.c: added explanatory comments to all added functions; made flushing take place at the correct place even if the MODEBUF_DEST_DEOP flag is set; rewrote build_string() helper to bash some stupid bugs; made modebuf_flush() return if ModeBuf is empty, fixed the apparent source, removed some bogus string termination code, properly terminate the mode strings, add support for HACK2 and HACK3, made limit strings not be sent if the limit is being removed, changed where '+' and '-' come from in sent strings, added support for DEOP flag, set up bouncing code for HACK2 * ircd/Makefile.in: ran make depend * include/channel.h: added new defines for future functionality, made modebuf_flush() return int so I can use tail recursion * ircd/m_clearmode.c: add msg.h to includes; other misc cleanups to make it all compile * ircd/m_opmode.c: add msg.h to includes... * ircd/m_clearmode.c: implemented mo_clearchan()/ms_clearchan() * ircd/channel.c (modebuf_flush): realized I forgot to nul-terminate addbuf/rembuf properly... * ircd/m_clearmode.c (do_clearmode): wrote do_clearmode()... * ircd/channel.c (modebuf_flush): correct sendto_server_butone to sendto_serv_butone--blah^2 * ircd/send.c (sendto_serv_butone): stupid comments confused me * ircd/channel.c (modebuf_flush): if there are no mode changes to propagate, we're done... * ircd/channel.c (modebuf_flush): duh; it's sendto_server_butone, not sendto_all_butone * ircd/m_clearmode.c: define skeleton for m{o,s}_clearmode * ircd/m_opmode.c: define skeleton for m{o,s}_opmode * ircd/Makefile.in (SRC): added m_opmode() and m_clearmode() to the list * ircd/parse.c: added messages for opmode and clearmode * include/handlers.h: added declarations for mo_opmode(), ms_opmode(), mo_clearmode(), and ms_clearmode() * include/msg.h: define MSG_OPMODE, TOK_OPMODE, MSG_CLEARMODE, and TOK_CLEARMODE * include/channel.h (MODEBUF_DEST_OPMODE): Define the MODEBUF_DEST_OPMODE flag * ircd/channel.c (modebuf_flush): added new flag, MODEBUF_DEST_OPMODE; causes channel MODE/HACK(4) notice to appear to originate from source's server (or source itself, if IsServer(source)); also causes a server-level MODE to be sent as OPMODE instead * include/channel.h: defined MODEBUF_DEST_SERVER, MODEBUF_DEST_HACK4 * ircd/channel.c: Add another argument to build_string() to handle numeric nicks; implemented MODEBUF_DEST_SERVER to send MODEs to servers; implemented MODEBUF_DEST_HACK4 to cause HACK(4) notices to be sent out 2000-03-27 Perry Lorier * ircd/s_bsd.c: fixed missing 'u' typo. 2000-03-26 Kevin L. Mitchell * ircd/channel.c: implement modebuf_init(), _mode(), _mode_uint(), _mode_string(), _mode_client(), _flush(); also implemented a simple build_string() * include/channel.h: added definition of ModeBuf, modebuf_* manipulation functions, and a couple of helper macros 2000-03-24 Thomas Helvey * numicks.c: convert extended numerics to use original mask version * numnicks.h: "" * s_user.c: 2000-03-23 Thomas Helvey * Merge in changes from production 2000-03-22 Thomas Helvey * numicks.c: Tweak to numnick generator to reduce possibility of duplicates. * rfc1459.unet: Add Maniac's documentation for /names 0 * Fix misc. jupe bugs that somehow made it into the tree * Escape /names 0 to mean /names --Maniac * Don't core when server asks for info --Maniac * Add Kev's jupe patch --Bleep * Add Maniacs squit patch --Bleep * Merge in u2_10_10_beta07 changes --Bleep * Merge in u2_10_10_beta06 changes --Bleep * Start ircu2.10.11 development, beta branch u2_10_10 --Bleep #----------------------------------------------------------------------------- ircd-ircu-2.10.12.10.dfsg1/README0000644000175000017500000001276510266320137015523 0ustar madkissmadkiss Welcome to ircu2.10.12, the Undernet IRC daemon Version u2.10.12 of the Undernet ircd incorporates many new features over its predecessor, and we feel that using it will make you very happy indeed. New features include: - A completely rewritten network event engine, which make full use of the asynchronous event engines available in FreeBSD (kqueue) and Solaris (/dev/poll), resulting in dramaticaly improved performance. - New F: (feature) lines in ircd.conf, and the GET/SET commands allow many settings to be changed dynamically, rather than by with compile- time configuration. - The new "account" feature added to the P10 protocol, allows people to remain logged in to service bots (i.e., gnuworld) during a netsplit. This means people will not have to login again once the network rejoins. INSTALLATION Please see the INSTALL file for installation instructions, for hints on how to best configure your OS for running ircu under high load, see the various README. files. COMPATIBILITY This version of ircu will only work with servers that use the P10 protocol, some of the new features will only work between ircu2.10.12 servers. GENERAL PERFORMANCE HINTS For platform-specific notes and hints, see the platform-specific sections below. These notes apply to servers that will serve large numbers (thousands) of clients simultaneously. If your server serves a small amount of users, the defaults should work well enough. - Run an OS that supports an asynchronous network event engine; currently these are FreeBSD (kqueue), and Solaris (/dev/poll); possibly other BSDs will also support kqueue. This will have a dramatic effect on performance. - Make things as lean as possible: Make your server dedicated to ircu, disable anything that is not neccesary, and build a custom kernel (where possible). - Tune kernel parameters as described in the platform-specific sections below. - With many clients connecting each second, ircu will be doing lots of DNS lookups. Make sure that the DNS server(s) in your /etc/resolv.conf are as close as possible, or run a local caching DNS server on your IRC server. TIME SYNCHRONIZATION Many things can and will go horribly wrong when the clocks on the servers on your network become (too far) out of sync. It is therefore highly recommended that all servers run a version of ntpd that will keep their clocks from going astray. INFORMATION HIDING As per undernet-admins CFV-165, this server contains code that will, by default, hide certain information from ordinary users. If you do not want this, override the default "HIS" feature settings in your ircd.conf. MORE INFORMATION For more information on this software, see the included documentation in the doc/ directory, as well as http://coder-com.undernet.org. For general information on the Undernet, vist http://www.undernet.org Happy IRCing! RUNNING THIS SERVER ON LINUX If you run Linux 2.6 or above (or 2.4 with appropriate patches), ircu can use the epoll family of system calls for much more efficient checks of which connections are active. Most pre-epoll systems will use 100% CPU with 2000 clients; with epoll, a server may use only a few percent of CPU with the same load. To handle that many connections, the ircd must be started with a high enough file descriptor resource. Check your distribution's docs on how to set the global and per-user limits according to your expected load. RUNNING THIS SERVER ON FREEBSD When running on FreeBSD, ircu can make use of the kqueue() event engine, which results in much improved performance over the old poll()-based method. kqueue is included in the more recent 4.x releases of FreeBSD. In order for ircu to be able to serve many clients simultaneously, you need to increase the maximum allowable number of open files in the system. To do this, add commands such as the following during your system's boot sequence: sysctl -w kern.maxfiles=16384 sysctl -w kern.maxfilesperproc=16384 Unless you will be serving thousands of clients simultaneously, you will not need to do the following, unless of course you just can't stand having a system that is not optimized to its limits :) Build a custom kernel: Make your kernel as lean as possible by removing all drivers and options you will not need. The following parameters will affect performance, they are listed with suggested values only. For more information on what they do exactly, see FreeBSD's documentation. maxusers 2048 options NMBCLUSTERS=65535 options ICMP_BANDLIM Also, you may wish to run the following at system startup (from /etc/rc.local, or whichever other method you prefer): sysctl -w net.inet.tcp.rfc1323=1 sysctl -w net.inet.tcp.delayed_ack=0 sysctl -w net.inet.tcp.restrict_rst=1 sysctl -w kern.ipc.maxsockbuf=2097152 sysctl -w kern.ipc.somaxconn=2048 Created by Sengaia , July 20 2002. RUNNING THIS SERVER ON SOLARIS When running on Solaris, ircu can make use of the /dev/poll event engine, which results in much improved performance over the old poll()-based method. Solaris versions 8 and 9 include /dev/poll out of the box, for Solaris 7 you will have to grab and install Patch-ID 106541-21. In order to increase the number of clients ircu can handle, add lines such as the following to /etc/system: * set hard limit on file descriptors set rlim_fd_max = 16384 * set soft limit on file descriptors set rlim_fd_cur = 8192 For more useful hints see http://www.sean.de/Solaris/soltune.html Created by Sengaia on July 20, 2002. ircd-ircu-2.10.12.10.dfsg1/ChangeLog0000644000175000017500000127525010574371065016426 0ustar madkissmadkiss2007-03-09 Michael Poole * include/patchlevel.h (PATCHLEVEL): Bump for u2.10.12.10 release. 2007-03-05 Michael Poole * ircd/m_privs.c (ms_privs): Use the correct source when forwarding the PRIVS request. * tests/bug-1674539.cmd: New file to test for this. * tests/test-driver.pl: Recognize "oper" command from scripts. 2007-03-05 Michael Poole * tests/ircd.conf: Make into a hub. * tests/ircd-2.conf: New file, for a second server. * tests/ircd-3.conf: Configuration for a third server. 2007-03-04 Michael Poole * ircd/whocmds.c (count_users): Fix length of ipbuf. (Spotted by paulr.) 2007-02-28 Michael Poole * ircd/os_generic.c (sockaddr_from_irc): Zero out socket address before setting family, and regardless of whether we have an irc_sockaddr template. 2007-02-25 Michael Poole * doc/example.conf: Document new options for General block. * include/res.h (clear_nameservers): Declare new function. (add_nameserver): Declare previously static function. * include/s_bsd.h (VirtualHost_dns_v4): Declare. (VirtualHost_dns_v6): Likewise. * ircd/ircd_lexer.l (DNS): Recognize new token. * ircd/ircd_parser.y (DNS): Declare new token. (generalitem): Allow new items for dns vhost(s) and dns servers. (generaldnsvhost): New production. (generaldnsserver): New production. * ircd/ircd_res.c (VirtualHost_dns_v4): New variable. (VirtualHost_dns_v6): Likewise. (clear_nameservers): New function. (restart_resolver): Scan specified servers so we only try to open DNS client sockets that we need. * ircd/ircd_reslib.c (irc_nscount): Remove redundant initializer. (irc_res_init): Only read the resolver config file if there are no nameservers provided. (add_nameserver): Make non-static. Remove off-by-one check against IRCD_MAXNS. * ircd/s_conf.c (read_configuration_file): Clear nameserver list before reading the config file. 2007-01-27 Jeannot Langlois * doc/example.conf (Features): Illustrate URLREG feature. * doc/readme.features (URLREG): Define new feature. * include/ircd_features.h (Feature): Add FEAT_URLREG. * ircd/ircd_features.c (features): Set the default value. * ircd/m_join.c (m_join): For ERR_NEEDREGGEDNICK, include the URLREG value as a format argument. * ircd/s_err.c (replyTable): Update ERR_NEEDREGGEDNICK appropriately. 2007-02-03 Michael Poole * ircd/ircd_reply.c (protocol_violation): Avoid reusing the va_list in vd. * ircd/send.c (sendcmdto_channel_butone): Warn against using %v in the pattern -- that will cause incorrect behavior. (sendwallto_group_butone): Likewise. (sendcmdto_match_butone): Likewise. 2007-01-22 Michael Poole * ircd/channel.c (find_delayed_joins): New function. (modebuf_flush): Handle +D-D and related cases. (mode_parse_mode): It is too early to handle +D here, so don't. (CheckDelayedJoins): Use find_delayed_joins(). 2007-01-22 Michael Poole * tests: New subdirectory for test framework. * tests/ircd.conf: Helper file for testing. * tests/readme.txt: Simple documentation of test framework. * tests/test-driver.pl: Testing script interpreter. 2007-01-22 Michael Poole * doc/example.conf: Fix potentially confusing comment about ip mask syntax. 2007-01-22 Michael Poole * INSTALL: Mention source directory naming; update the reference to the config file converter (hah); update CVS directions. 2007-01-22 Michael Poole * include/supported.h: Move parameters from FEATURES1 to FEATURES2 so that neither ISUPPORT line has more than 15 parameters. (Some clients are picky about this.) 2007-01-21 Michael Poole * include/patchlevel.h (PATCHLEVEL): Bump for pre10 development. 2007-01-20 Michael Poole * include/patchlevel.h (PATCHLEVEL): Bump for 2.10.12.09 release. 2007-01-15 Michael Poole * doc/readme.iauth (U): Document extended fields. * include/s_auth.h (auth_set_user): Declare new parameters. * ircd/m_user.c (m_user): Pass new parameters. * ircd/s_auth.c (auth_set_user): Accept new parameters. When using Undernet extensions, forward them to the iauth process. 2007-01-14 Michael Poole * ircd/os_generic.c (os_recv_nonb): Set errno to zero when returning IO_FAILURE due to a closed connection. 2006-12-31 Michael Poole * ircd/m_mode.c (ms_mode): Bounce modes from deopped members. 2006-12-30 Michael Poole * ircd/ircd_string.c (ircd_strncpy): Make sure the output buffer is terminated. We don't rely on the arguable strncpy semantics. 2006-12-30 Michael Poole * include/struct.h (struct Server): Add asll_last field. * ircd/ircd.c (check_pings): Add check for asll_last. When a server doesn't ping, use an old-style ping rather than AsLL ping. * ircd/m_pong.c (ms_pong): Use ClearPingSent() rather than ClrFlag(). Set asll_last to current time. (mr_pong): Use ClearPingSent() rather than ClrFlag(). (m_pong): Likewise. * ircd/s_bsd.c (completed_connection): Likewise. (read_packet): Likewise. Update cli_lasttime for servers in addition to clients. 2006-01-13 Michael Poole * ircd/m_burst.c (ms_burst): Properly handle member mode :ov. 2006-01-13 Michael Poole * ircd/m_create.c (ms_create): Add channel name to the protocol violation notice for a redundant CREATE. 2006-01-13 Michael Poole * ircd/s_user.c (set_nick_name): Use user's account name rather than the account parameter, in case the parameter contains a colon (i.e. "account:1234" format). 2006-01-13 Michael Poole * doc/readme.who: Document 'd' user-matching flag. 2006-12-18 Michael Poole * ircd/m_jupe.c (mo_jupe): Fix which privilege is tested. 2006-12-07 Michael Poole * ircd/listener.c (show_ports): Update to show '4' and/or '6' as flags in response, with a '-' suffix if either one fails to open. 2006-12-07 Michael Poole * doc/example.conf (Port): Document the method to select IPv4 or IPv6 restriction for a port. * include/listener.h (LISTEN_IPV4): New listener flag. (LISTEN_IPV6): New listener flag. (struct Listener): Split 'fd' and 'socket' fields into two each. * ircd/ircd_lexer.l (gb): Move to be alphabetical. (gigabytes): Likewise. (ipv4): New token. (ipv6): Likewise. Adapted word matcher to handle digits in the non-leading character. * ircd/ircd_parser.y (USE_IPV4): New macro. (USE_IPV6): Likewise. (TOK_IPV4): New token. (TOK_IPV6): Likewise. (address_family): New non-terminal rule. (portblock): Default to listening on both IPv4 and IPv6. (portnumber): Add address_family element and use it. (portvhost): Likewise. * ircd/listener.c (make_listener): Adjust for newly split fields in struct Listener. (inetport): Likewise. Adjust return value as well. (add_listener): Update to handle both IPv4 and IPV6 support. (close_listener): Likewise. (accept_connection): Because each listener has two sockets, it is no longer safe to free the listener when one is destroyed -- so don't. Also accept() on the file descriptor from the incoming event rather than on a fixed fd. * ircd/os_generic.c (os_socket): For platforms with IPV6_V6ONLY, enable it for AF_INET6 sockets rather than disabling it for unspecified sockets. 2006-12-06 Michael Poole * include/listener.h (enum ListenerFlag): New enum. (struct Listener): Convert "active", "hidden" and "server" to a flagset. (add_listener): Convert "is_server" and "is_hidden" arguments to use the same flagset structure. * ircd/ircd_parser.y (listen_flags): New variable. (general_vhost): Consolidate references to $3 to use a variable. (portblock): Use listen_flags instead of tconn and tping. (portserver): Likewise. (porthidden): Likewise. * ircd/listener.c (show_ports): Use new field in Listener. (set_listener_options): New function. (inetport): Use it. (add_listener): Use new field in Listener. When reusing an extant listener, call set_listener_options() so the options are updated. (mark_listeners_closing): Use new field in Listener. (close_listeners): Use new helper macro to check activeness. (release_listener): Likewise. (accept_connection): Likewise. * ircd/s_bsd.c (report_error): Use the standard snotice rate limiting here. (add_connection): Use new helper macro to check serverness. 2006-11-04 Michael Poole * ircd/m_nick.c (m_nick): If we get NICK on a server port, tell the client to go away. 2006-11-04 Michael Poole * ircd/version.c.SH: Skip version.c. 2006-11-04 Michael Poole * doc/readme.who: Document new 'o' field flag. * include/whocmds.h (WHO_FIELD_OPL): New flag. * ircd/channel.c (send_channel_modes): Rename feat_oplevels to send_oplevels and determine it automatically. (modebuf_flush_int): Pass along oplevel if it's less than MAXOPLEVEL. (mode_process_clients): Allow oplevels to be inherited for -A channels. Inherit the opper's oplevel if >= MAXOPLEVEL. * ircd/m_who.c (m_who): Recognize 'o' flag as WHO_FIELD_OPL. * ircd/whocmds.c (do_who): Send oplevel for WHO_FIELD_OPL, but only show up to the requester's own oplevel. 2006-10-21 Michael Poole * ircd/convert-conf.c (finish_connects): Fix error display for missing C: lines when an H: line is present. 2006-08-02 Michael Poole * ircd/ircd_parser.y (connectblock): Check for too-long password. (operblock): Comment why we don't check password length. Move PRIV_PROPAGATE test earlier (so a buggy edit, rehash, /oper will not crash). (clientblock): Check for too-long password. 2006-08-02 Michael Poole * include/channel.h (struct Ban): Fix typo in doxygen comment. 2006-07-09 Michael Poole * include/patchlevel.h (PATCHLEVEL): Bump for pre09. 2006-07-09 Michael Poole * include/patchlevel.h (PATCHLEVEL): Bump for 2.10.12.08 release. 2006-07-05 Michael Poole * ircd/s_auth.c (auth_freelist): New static variable. (check_auth_finished): Move call to destroy_auth_request(). (destroy_auth_request): Prepend auth request to freelist. (start_auth): Use struct from auth freelist if possible. 2006-06-30 Michael Poole * ircd/ircd_parser.y (iauth*): Avoid leaking program name string. 2006-06-30 Michael Poole * ircd/s_auth.c (check_auth_finished): Free auth structure when done with it. (sendto_iauth): Free message buffer when done with it. 2006-06-26 Michael Poole * include/patchlevel.h (PATCHLEVEL): Bump for pre08. 2006-06-26 Michael Poole * include/patchlevel.h (PATCHEVEL): Bump for release. 2006-06-17 Michael Poole * ircd/m_pass.c (mr_pass): Only back 'len' up when it's safe. 2006-06-08 Michael Poole * ircd/m_whois.c (do_whois): Prefix '*' to names of secret (local) channels for locops as well as global opers. 2006-06-08 Michael Poole * ircd/m_gline.c (ms_gline): Use final argument as G-line reason. 2006-06-08 Michael Poole * ircd/gline.c (gline_stats): Show activation state in /stats g. * ircd/s_err.c (RPL_STATSGLINE): Update format string to match. 2006-06-07 Michael Poole * doc/example.conf: Document the list_chan privilege. * ircd/ircd_lexer.l: Recognize the token. * ircd/ircd_parser.y: Treat it appropriately. 2006-06-07 Michael Poole * ircd/s_auth.c (auth_ping_timeout): If the client never had an auth request, kill them on ping timeout. 2006-06-05 Michael Poole * ircd/s_auth.c (auth_timeout_callback): Clear AR_DNS_PENDING when destroying the lookup and reporting DNS failure. 2006-05-28 Michael Poole * doc/readme.features (MAXBANS): Update default value. (NICKLEN): Likewise. (HIS_STATS_*): Sort alphabetically. * ircd/m_stats.c (m_stats): Describe the intention so that there are not further questions about local opers and remote /stats. Fix places that use cptr instead of sptr. 2006-05-24 Michael Poole * ircd/s_auth.c (auth_dns_callback): Be more careful about handling failed DNS lookups. Use a more standard function to disconnect clients for IP mismatches. (start_auth): Use a more standard function to disconnect clients for peer or local socket address lookup failures. 2006-05-17 Michael Poole * ircd/s_auth.c (auth_ping_timeout): Fix off-by-one error. 2006-05-17 Michael Poole * ircd/Makefile.in (install-*): Install convert-conf. Install umkpasswd when ${BINDIR}/ircd is not a symlink. 2006-05-15 Michael Poole * ircd/s_auth.c (check_auth_finished): Only check passwords on user ports. 2006-05-14 Michael Poole * doc/example.conf (Connect): Mention the vhost option. 2006-05-08 Michael Poole * ircd/m_pong.c (mr_pong): Move cli_lasttime update from here... * ircd/s_auth.c (auth_set_pong): ... to here. 2006-05-07 Michael Poole * include/s_auth.h (auth_ping_timeout): Declare new function. * ircd/ircd.c (check_pings): Move auth timeout logic into that new function. * ircd/s_auth.c (HeaderMessages): Insert new message. (auth_ping_timeout): Define new function. (auth_timeout_callback): Remove "hurry" notification from here. 2006-05-07 Michael Poole * include/s_auth.h (destroy_auth_request): Remove second argument. * ircd/list.c (free_client): Update to match. * ircd/s_auth.c (check_auth_finished): Remove second argument and update call to destroy_auth_request(). (send_auth_query): Update call to destroy_auth_request(). (destroy_auth_request): Remove second argument. (auth_timeout_callback): Send timeout failure messages here instead. Update call to check_auth_finished(). (auth_dns_callback): Update call to check_auth_finished(). (start_auth): Likewise. (auth_set_pong): Likewise. (auth_set_user): Likewise. (auth_set_nick): Likewise. (auth_cap_done): Likewise. (iauth_parse): Likewise. 2006-05-06 Michael Poole * ircd/s_auth.c (AuthRequestFlag): Add AR_PASSWORD_CHECKED. (check_auth_finished): Move password check out of iauth-only part and use AR_PASSWORD_CHECKED to make sure we only check it once. 2006-04-28 Michael Poole * ircd/s_auth.c (AuthRequest): Clarify comment on 'timeout' field. (check_auth_finished): Fix timeout update. (destroy_auth_request): Only delete timer if it is active. (auth_timeout_callback): Do not disconnect client on timeout, so that the user can finish sending NICK/USER or doing iauth. 2006-04-28 Michael Poole * doc/example.conf (Admin): Fix documentation of which line can be listed twice. * ircd/ircd_parser.y (adminblock): Allow admin information to be changed via /rehash. 2006-04-06 Michael Poole * ircd/s_auth.c (start_auth): Add client to list after getting endpoint names (which can apparently fail for some reason). 2006-04-06 Michael Poole * ircd/ircd_snprintf.c: Use SIZEOF_LONG_LONG (which is 0 for unknown types) instead of the never-defined HAVE_LONG_LONG. 2006-04-06 Michael Poole * doc/example.conf (IAuth): Update to reflect new syntax. * doc/readme.who: Fix typo in metasyntactic variable name. 2006-04-04 Michael Poole * include/patchlevel.h: Update for pre07. 2006-04-04 Michael Poole * include/patchlevel.h: Update for u2.10.12.06 release. 2006-04-03 Michael Poole * ircd/channel.c (bmatch): If ipmask_check() indicates old_ban is a CIDR-wise superset of new_ban, check whether new_ban is a text-wise superset of old_ban. 2006-03-31 Michael Poole * tools/iauth-test (send_server_notice): Use a colon prefix before the message. (%handlers): Likewise. 2006-03-24 Michael Poole * ircd/ircd_signal.c (alloc_crec): Zero-fill returned ChildRecord structs. * ircd/jupe.c (make_jupe): Zero-fill newly allocated jupes. * ircd/list.c (make_link): Zero-fill returned SLink structs. * ircd/whowas.c (whowas_init): Delete function. (whowas_alloc): Rewrite to follow the more common pattern and to zero-fill returned Whowas structs. 2006-03-23 Kevin L. Mitchell * ircd/s_auth.c: rewrite iauth_read(), spliting out the parsing into iauth_parse(); change parsing to separate parameters and deal with the ':' sentinel; send sentinel in multi-word parameters; fix iauth_cmd_config() and iauth_cmd_stats() to clear the 'next' pointer in the SLink structure; fix buffering in iauth_read_stderr(); remove carriage returns from STDERR contents as well * doc/readme.iauth: fix a minor typo in comments for 'd' and 'N' server messages 2006-03-18 Michael Poole * ircd/convert-conf.c (finish_features): Do not emit a feature setting that has no values. 2006-03-18 Michael Poole * ircd/channel.c (mode_parse_key): Outside of burst, allow overwriting of keys by a service when a key is already set. (mode_parse_upass): Likewise. Instead, ignore new Upass during burst if it is lexicographically greater than the current one. (mode_parse_apas): Likewise for Apass, but only allow overwiting an existing Apass in a BURST. 2006-03-18 Michael Poole * ircd/channel.c (modebuf_flush_int): Fix typo about changing oplevels. Send correct channel TS for modes to other servers. (mode_parse): Accept timestamps on modes from users on other servers. If the received timestamp is too large, handle that. * ircd/m_create.c (ms_create): Mention the CREATE-during-burst case and handle it. * ircd/m_mode.c (ms_mode): Put back HACK(3) when oplevels are off. 2006-03-14 Wouter Coekarts * ircd/s_err.c (RPL_STATSILINE): Add two %s to the first field. * ircd/s_stats.c (stats_configured_links): Use the new %s's to show username masks for I: lines that have them. (stats_access): Likewise. 2006-03-13 Michael Poole * ircd/msgq.c (msgq_vmake): Try to clear msgbuf freelist after killing clients, so that that case does not lead immediately to a server panic. (msgq_count_memory): Report total buffer text used as a way to determine whether the BUFFERPOOL value is marginal. 2006-03-02 Michael Poole * include/ircd_osdep.h (os_socket): New parameter. * include/res.h (irc_in_addr_unspec): New macro. * ircd/ircd_res.c (restart_resolver): Set family appropriately. * ircd/listener.c (inetport): Let os_ library pick socket family. * ircd/os_generic.c: Do not #define _XOPEN_SOURCE on FreeBSD 5+. (sockaddr_from_irc): New parameter. (os_sendto_nonb): Use new parameter to sockaddr_from_irc(). (os_socket): New parameter. Try to turn off IPV6_V6ONLY on sockets that listen on unspecified addresses. (os_connect_nonb): Use new parameter to sockaddr_from_irc(). * ircd/s_auth.c (start_auth_query): Let os_ library pick socket family. * ircd/s_bsd.c (connect_inet): If we pick the IPv4 vhost, specify family for os_socket() as AF_INET. * ircd/uping.c (uping_init): Set socket family appropriately. (uping_server): Likewise. (uping_end): Fix format strings (the ms_* fields are int, not long, and this causes bad results on LP64 machines). 2006-02-22 Michael Poole * ircd/m_silence.c (apply_silence): Refuse to apply silences for local users that are broader than an IPv4 /16 or an IPv6 /32, unless they match every host indiscriminately. 2006-02-22 Michael Poole * ircd/s_auth.c (check_auth_finished): Give non-iauth clients connection classes, too. (auth_close_unused): Remove redundant check for iauth != NULL. (report_iauth_conf): Check iauth != NULL before deref'ing it. (report_iauth_stats): Likewise. 2006-02-22 Kevin L. Mitchell * ircd/s_auth.c: fix macros to not dereference a NULL pointer when iauth is not connected 2006-02-17 Alex Badea * ircd/s_auth.c (auth_set_username): Check if the last character of the username is alphanumeric, instead of the '\0' terminator. * ircd/m_pong.c (mr_pong): Parse cookie with strtoul(), since atol() causes signedness problems. 2006-02-15 Michael Poole * include/res.h (NXDOMAIN): Define. * ircd/ircd_res.c (res_readreply): Treat NXDOMAIN just like SERVFAIL. Patch courtesy of Dianora. * tools/iauth-test (Carp): This doesn't actually use Carp. 2006-02-15 Michael Poole * doc/example.conf: Include new HIS_STATS_IAUTH feature. * doc/readme.features: Document the feature. * doc/readme.iauth: Rewrite to reflect the new progressive iauth protocol, based on IRCnet's iauth. * doc/snomask.html: Document SNO_AUTH server notice flag. * include/client.h (FLAG_IAUTHED): Delete. (con_cookie): Delete. (con_unreg): Delete. (con_auth): Make comment capitalization consistent. (con_iauth): Delete. (CLIREG_*): Delete. (cli_unreg): Delete. (cli_cookie): Delete. (cli_iauth): Delete. (con_unreg): Delete. (con_iauth): Delete. (IsIAuthed): Delete. (SetIAuthed): Delete. (SNO_AUTH): New server notice flag. (SNO_ALL): Update to include SNO_AUTH. (SNO_OPER): Update to include SNO_AUTH. * include/ircd_auth.h: Delete file. * include/ircd_features.h (HIS_STATS_IAUTH): New feature. * include/s_auth.h: Rewrite almost everything for new auth system. * include/s_user.h (COOKIE_VERIFIED): Delete. (register_user): Remove redundant nick and username arguments. * ircd/ircd_auth.c: Delete file. * ircd/ircd_features.c (HIS_STATS_IAUTH): New feature. * ircd/ircd_lexer.l (PROGRAM): New token in grammar. * ircd/ircd_log.c (masks): Add SNO_AUTH flag. * ircd/ircd_parser.y (stringlist): Simplify production. (iauthblock): Revise to only include a PROGRAM production. * ircd/list.c (make_client): Do not assign to deleted field. * ircd/m_cap.c (cap_ls): Use auth_cap_start() instead of cli_unreg(). (cap_req): Likewise. (cap_end): Use auth_cap_done() instead of cli_unreg(). * ircd/m_pass.c (mr_pass): Merge arguments to PASS. Use auth_set_password() to notify iauth of password. * ircd/m_pong.c (mr_pong): Use auth_set_pong() instead of cli_cookie() and cli_unreg(). * ircd/m_user.c (m_user): Use auth_set_user() instead of cli_unreg(), etc. * ircd/s_auth.c: Rewrite most of the infrastructure for the new auth system. * ircd/s_conf.c (rehash): Call auth_*() instead of iauth_*(). * ircd/s_misc.c (exit_one_client): Do not use iauth_exit_client(). (exit_client): Use auth_send_exit() instead. * ircd/s_stats.c (statsinfo): Include iauth and iauthconf. * ircd/s_user.c (clean_user_id): Delete (moved into s_auth.c). (register_user): Remove nick and username parameters; move conf interactions and username validation to s_auth.c. (set_nick_name): Use auth_set_nick() instead of cli_cookie(), cli_unreg(), etc. * tools/iauth-test: Implementation of iauth for testing purposes. 2006-02-15 Michael Poole * ircd/ircd_snprintf.c (doprintf): Fix typecast for %hu. 2006-02-15 Michael Poole * include/ircd_signal.h (SigChldCallBack): New typedef. (register_child): Declare. (unregister_child): Declare. (reap_children): Declare. * ircd/ircd_signal.c (alloc_crec): New function. (release_crec): New function. (register_child): New function. (do_unregister_child): New function. (unregister_child): New function. (sigchld_callback): New function. (setup_signals): Hook SIGCHLD. (reap_children): New function. * ircd/ircd.c (server_restart): Call reap_children() on exit. 2006-02-15 Michael Poole * include/ircd_osdep.h (os_socketpair): Declare. * ircd/os_generic.c (is_blocked): New local function. (os_*): Use is_blocked() instead of cut-and-pasted code. (os_socketpair): New function. 2006-02-15 Michael Poole * ircd/match.c (match): Fix backtracking bug after an escape (reported by Michael, I think). 2006-02-04 Michael Poole * ircd/ircd.c (try_connections): Scan all Connect blocks for the earliest hold time (suggested by Michael). 2006-02-04 Michael Poole * ircd/m_join.c (m_join): Remove #if 0 code and update comment. * ircd/m_mode.c (ms_mode): Remove self-op support. 2006-01-12 Michael Poole * include/patchlevel.h (PATCHLEVEL): Update for 2.10.12.pre06. 2006-01-12 Michael Poole * include/patchlevel.h (PATCHLEVEL): Update for release. 2006-01-11 Michael Poole * doc/Makefile.in: Make install target VPATH-safe. * doc/example.conf: Comment out example IAuth block. * ircd/m_burst.c (ms_burst): Change isdigit() to IsDigit(), silencing a warning on Solaris. 2006-01-09 Michael Poole * ircd/s_user.c (register_user): Do not send +r flag to user when they first connect. 2006-01-09 Michael Poole * include/ircd_features.h (FEAT_ZANNELS): Actually, put it back. * ircd/ircd_features.c (FEAT_ZANNELS): Likewise. 2006-01-06 Michael Poole * ircd/channel.c (mode_process_clients): Do not reveal zombies who are being opped (MODE and KICK crossed). Reported by coekie. 2006-01-06 Michael Poole * ircd/m_join.c (ms_join): Wipe out all modes (not just chanops) when replacing a resurrected channel. * ircd/convert-conf.c (dupstring): Fix probable off-by-one size passed to memcpy(). 2006-01-03 Michael Poole * ircd/channel.c (modebuf_flush_int): Also send timestamp when &me originates the MODE going to other servers (currently just when a client joins a zannel or uses an A/U password). 2006-01-02 Michael Poole * include/ircd_features.h (FEAT_ZANNELS): Remove. * ircd/channel.c (sub1_from_channel): Remove reference to FEAT_ZANNELS. * ircd/ircd_features.c (FEAT_ZANNELS): Remove. * ircd/m_destruct.c (ms_destruct): Do not try to remove a destruct event for channels that do not have them (created by BURSTing a zannel but not yet destroyed by EOB). 2005-12-31 Michael Poole * ircd/m_whowas.c (m_whowas): Mention that IP is untracked in WHOWAS. Spotted by Progs. 2005-12-30 Michael Poole * ircd/m_topic.c: Remove block comment about sptr, cptr, etc. (do_settopic): Add doxygen comment. Move permissions checks.. (m_topic): .. to here. Update doxygen comment. (ms_topic): Update doxygen comment here too. 2005-12-30 Michael Poole * ircd/s_conf.c (conf_debug_iline): Fix display of null passwords. 2005-12-30 Michael Poole * RELEASE.NOTES: Mention removal of HIS_STATS_h. * ircd/convert-conf.c (removed_features): Add AUTOHIDE, HIS_DESYNCS and TIMESEC. (get_connect): Do not downcase connection name on insert. (do_feature): Do not upcase feature name (cf HIS_STATS_k). 2005-12-30 Michael Poole * ircd/engine_devpoll.c (engine_loop): Remove bogus assert. 2005-12-31 Perry Lorier * convert-conf.c: Skip with a warning, H:'s that are missing a corresponding C: 2005-12-28 Michael Poole * ircd-patch: Do not use [ for test, and do not use $[] for expr. (Solaris /bin/sh, among others, have problems with those.) 2005-12-23 Michael Poole * config.guess: Update to current version. * config.sub: Likewise. 2005-12-23 Kevin L. Mitchell * ircd/m_join.c: get rid of MAGIC_REMOTE_JOIN_TS; perform the deop-other-users loop only when creation < channel timestamp or when the channel in question happens to be a zannel; actually deop users, don't just say we are and not do it * ircd/m_create.c (ms_create): get rid of MAGIC_REMOTE_JOIN_TS * include/channel.h: get rid of MAGIC_REMOTE_JOIN_TS 2005-12-13 Michael Poole * configure.in: Define a macro when compiling on Solaris. * ircd/ircd_crypt_native.c (_XOPEN_SOURCE): Turn down to 500 so that Solaris doesn't complain that SUSv3 requires C99. * ircd/os_generic.c (_XOPEN_SOURCE): Likewise, but leave it at 600 on non-Solaris platforms so that IPv6 stays supported. 2005-12-13 Michael Poole * ircd/m_join.c (ms_join): Prevent net rides allowed by moving the channel timestamp backwards in time without deopping current ops. (Reported by Wouter Coekaerts.) 2005-12-13 Michael Poole * doc/example.conf: Remove extraneous "Other" Client block. * ircd/convert-conf.c (finish_operators): Fix operator precedence bug. * ircd/ircd_parser.y (clientclass): Fix typo in error message. 2005-11-27 Michael Poole * ircd/Makefile.in (version.c): version.c also depends on version.h, patchlevel.h and source files. 2005-11-27 Michael Poole * ircd/m_join.c (m_join): Count a join to a new channel as a target change. 2005-11-19 Michael Poole * ircd/s_stats.c (stats_servers_verbose): Display IPv6 support flag with the other per-server flags. 2005-11-19 Michael Poole * ircd/convert-conf.c (finish_features): Only emit "Features {" once in the converted configuration file. Display the original input line for each feature line in the output. 2005-11-18 Michael Poole * include/patchlevel.h (PATCHLEVEL): Update for pre05. 2005-11-18 Michael Poole * include/patchlevel.h (PATCHLEVEL): Update for release. 2005-11-15 Brian Cline * doc/example.conf: Add new line for HIS_MODEWHO feature. * doc/readme.features: Document new HIS_MODEWHO feature. * include/ircd_features.h: Declare new HIS_MODEWHO feature. * ircd/channel.c (modebuf_flush_int): Use new HIS_MODEWHO feature to show or hide the server name that performed a channel mode change. * ircd/ircd_features.c: Place new HIS_MODEWHO setting in the feature table and give it a default value of true, which will hide the originating server name. 2005-11-16 Michael Poole * doc/example.conf (Features): Mention ZANNELS default. * doc/readme.features: Document OPLEVELS and ZANNELS. 2005-11-17 Carlo Wood * include/ircd_features.h (Feature): Add ZANNELS. * ircd/ircd_features.c (FeatureDesc): idem. * ircd/channel.c (sub1_from_channel): Don't keep zannels around when ZANNELS and OPLEVELS are FALSE. * ircd/m_destruct.c (ms_destruct): Use JOIN instead of CREATE to recreate a non-empty channel after DESTRUCT. 2005-11-16 Michael Poole * tools/convert-conf.py: Delete obsolete code. 2005-11-16 Michael Poole * ircd/m_names.c (m_names): Fix handling of NAMES #a,#b. (ms_names): Likewise. 2005-11-15 Michael Poole * ircd/m_nick.c (ms_nick): Clarify message when an older nick overrules a newer nick. When killing a client for a nick collision, make sure to use the numnick as the first argument. 2005-11-14 Michael Poole * ircd/channel.c (member_can_send_to_channel): After prodding from reed, always allow remote users to send to a channel. He also pointed out a bug in the first version of this change. 2005-11-14 Carlo Wood * ircd/channel.c (modebuf_flush_int): Fix test for limitdel. (modebuf_mode_uint): Make sure the limit is included as an argument when necessary (and only when necessary) in a bounce. * ircd/m_destruct.c (ms_destruct): Generate a mode bounce instead of burst to resynchronize a non-empty destructed channel. 2005-11-14 Michael Poole * ircd/channel.c (find_no_nickchange_channel): Disallow nick changes by voiceless no-account users on a +r channel. 2005-11-14 Michael Poole * ircd/m_kick.c (ms_kick): Fix test for whether a client's own server is kicking him. 2005-11-13 Michael Poole * include/patchlevel.h (PATCHLEVEL): Bump for pre04. 2005-11-13 Michael Poole * include/patchlevel.h (PATCHLEVEL): Update for release. 2005-11-13 Carlo Wood * ircd/m_create (ms_create): Accept CREATE for zannels. * ircd/m_join.c (m_join): MODE +o for a zannel must come from the server for compatibility with older versions. 2005-11-12 Michael Poole * include/patchlevel.h (PATCHLEVEL): Bump for pre03. 2005-11-12 Michael Poole * include/patchlevel.h (PATCHLEVEL): Update for release. 2005-11-11 Michael Poole * ircd/ircd_res.c (proc_answer): Follow CNAME when doing A and AAAA lookups as well as PTR. 2005-11-07 Michael Poole * ircd/channel.c (mode_parse_client): Allow clients to specify oplevel in MODE #channel +o. (mode_process_clients): Allow oplevel 999 to deop another 999. * ircd/kick.c (m_kick): Allow oplevel 999 to kick another 999. 2005-10-31 Michael Poole (Based on a patch by Romain Bignon ) * ircd/channel.c: Some modes (currently only WASDELJOINS) should not be propagated to remote servers. 2005-10-30 Michael Poole * ircd/channel.c (mode_parse_apass): Move all send_reply() errors inside an if (MyUser(state->sptr)) test. * ircd/m_join.c (m_join): Reorganize zannel join check to match surrounding code. 2005-10-30 Carlo Wood * ircd/channel.c (sub1_from_channel): Delay destruction for -A channels. They become zombie channels (zannels). (mode_parse_upass): Add duration to ERR_NOMANAGER message. (mode_parse_apass): Likewise. Unconditionally set the member who sets Apass as oplevel 0. Clear Upass when clearing Apass. (joinbuf_join): Remove code to pass oplevel in JOIN. * ircd/m_burst.c (ms_burst): Handle zannels. * ircd/m_join.c (m_join): Handle a join to a zannel. If the user is joining with ops and/or an oplevel, send those. (ms_join): Stop trying to parse oplevels in JOIN. Copy join timestamp when a user joins a zannel. * ircd/m_mode.c (ms_mode): Never generate HACK3. Silently allow a user to op himself if he is the only one in a channel. * ircd/s_err.c (ERR_UPASSSET): Remove extra space. (ERR_UPASSNOTSET): Likewise. (ERR_NOMANAGER): Add field for channel lifetime. 2005-10-30 Michael Poole * ircd/m_join.c (m_join): Fix check for OVERRIDE when the real channel key is OVERRIDE. (Reworked patch from a1kmm.) 2005-10-30 Michael Poole * .cvsignore: Add autom4te.cache. * ircd/.cvsignore: Add convert-conf. * ircd/test/.cvsignore: Add ircd_match_t. * patches/.cvsignore: Add marks. 2005-10-28 Alex Badea * ircd/m_kick.c (ms_kick): Fix format string typo (bug #1339538) 2005-10-17 Diane Bruce * ircd/ircd_res.c: Don't send retries if the client did not resolve (SERVFAIL); this fixes a bug causing a flurry of retries in this case 2005-10-14 Michael Poole * include/patchlevel.h (PATCHLEVEL): Update to pre02. 2005-10-14 Michael Poole * doc/readme.cvs: Document tag name consistently with the release name. * include/patchlevel.h (PATCHLEVEL): Bump patchlevel for release of 2.10.12.01. 2005-10-12 Michael Poole * doc/example.conf: Update documentation to match this change. * ircd/client.c (client_set_privs): Make default global oper privileges match what was in 2.10.11. 2005-10-11 Michael Poole * ircd/os_generic.c (os_get_rusage): Make conditional on DEBUGMODE to mitigate bug #1313429. 2005-10-12 Perry Lorier * include/s_stats.h: Add new "Local" only flag to /stats. * ircd/m_stats.c: Consult it. * ircd/s_stats.c: Use the flag. 2004-01-04 Kevin L Mitchell * ircd/s_numeric.c (do_numeric): fix a crash when a numeric is sent to a channel... 2005-10-06 Michael Poole * ircd/m_join.c (m_join): Report too-long channel names as non-existent. 2005-10-05 Michael Poole * ircd/m_names.c (m_names): Fix format string when forwarding /names -D to other servers. (ms_names): Likewise. Add support for remote /names -D. 2005-10-05 Michael Poole * ircd/class.c (do_find_class): Fix bug from previous commit. * ircd/ircd_parser.y (clientblock): Allow setting Client port. * ircd/s_conf.c (check_limit_and_attach): Merge into attach_iline. (attach_iline): Only set FLAG_DOID when we are sure we will attach this Client block to the client. [Credit: Jukka Ollila and others] 2005-10-04 Michael Poole [Based on a patch by Jukka Ollila] * include/class.h (find_class): Rename to do_find_class(). * ircd/class.c (class_delete_marked): Keep invalid classes in list until next rehash. (add_class): Use new parameter to do_find_class() to allow a class to be "resurrected". (find_class): Rename. (report_classes): Use 'y' instead of 'Y' when reporting invalid classes. 2005-10-01 Michael Poole * ircd/m_kick.c (ms_kick): If the kick target is join-delayed, only send the KICK to the kicker. Spotted by Cesar_. 2005-10-01 Michael Poole * include/patchlevel.h (PATCHLEVEL): Update to pre1. * ircd/class.c (init_class): Only set default class's ->next pointer when first allocating it. 2005-09-30 Michael Poole * ircd/m_who.c (m_who): Handle matchsel & WHO_FIELD_ACC when matching users. 2005-09-30 Michael Poole * include/patchlevel.h: Update for release. 2005-09-28 Michael Poole * ircd/m_kick.c (ms_kick): Use correct oplevel when bouncing a chanop being kicked. 2005-09-26 Michael Poole * ircd/whocmds.c (do_who): Fix uninitialized variable warning about 'chan'. 2005-09-26 Michael Poole * ircd/parse.c (del_msg_element): Only delete empty subtrees, and leave subtrees that may still contain data. 2005-09-26 Michael Poole * include/channel.h (struct ModeBuf): Add mbm_oplevel to args array. (MB_OPLEVEL): New corresponding macro. (modebuf_mode_client): Add corresponding argument. * ircd/channel.c (modebuf_flush_int): Adjust worst-case buffer usage to include :999 suffix. Change format for oplevel passing. (modebuf_mode_client): Set oplevel field in mbuf args array. (struct ParseState): Add oplevel field to cli_change array. (mode_parse_client): Accept and record oplevel suffix from servers; fix it up if we're bouncing a deop. (mode_process_clients): If a valid oplevel was parsed, use it. * ircd/m_burst.c (ms_burst): Pass oplevel to modebuf_mode_client(). * ircd/m_clearmode.c (do_clearmode): Likewise. * ircd/m_create.c (ms_create): Likewise. * ircd/m_kick.c (ms_kick): Likewise. 2005-09-23 Michael Poole * include/whocmds.h (WHOSELECT_DELAY): Define new constant. * ircd/m_who.c (m_who): Accept 'd'/'D' as a way to set WHOSELECT_DELAY, just like 'o' for WHOSELECT_OPER. Do not skip join-delayed users if WHOSELECT_DELAY is set. * ircd/whocmds.c (do_who): Remember membership for shared channel if one exists. Use it when displaying flags, adding '<' for join-delayed users. 2005-09-22 Michael Poole * ircd/channel.c (mode_parse_key): Only accept the new key when the current one is empty or "greater" than the new one. (mode_parse_upass): Likewise, for upass. (mode_parse_apass): Likewise, for apass. 2005-09-22 Michael Poole * ircd/gline.c (gline_checkmask): Add missing digit in mask length check. 2005-09-21 Michael Poole * doc/example.conf: Remove confused and outdated references to Martians. 2005-09-20 Michael Poole * ircd/Makefile.in: Regenerate "make depend" dependencies. * ircd/test/Makefile.in: Likewise. 2005-09-16 Kevin L. Mitchell * ircd/m_join.c (last0): fix problem leading to protocol violations on certain combinations of /join 0 from remote servers (probably from local users, too) [bug #1291029]; remove redundant !IsChannelChar() check 2005-09-14 Michael Poole * doc/readme.cvs: Document the branching scheme for 2.10.12. 2005-09-14 Michael Poole * include/patchlevel.h (PATCHLEVEL): Increment to reflect the pre-release code freeze. 2005-09-14 Michael Poole * ircd/channel.c (find_ban): Fix the sense of another check. 2005-09-13 Michael Poole * include/channel.h (clean_channelname): Remove prototype. * ircd/m_invite.c (m_invite): Do not clean channel name; just reject invalid channel names. * ircd/m_join.c (m_join): Likewise. * ircd/m_mode.c (m_mode): Do not clean channel name. * ircd/m_names.c (m_names): Likewise. * ircd/m_opmode.c (mo_opmode): Likewise. 2005-09-13 Michael Poole * ircd/channel.c (find_ban): Revert to older style of comparison, fixing the sense of one check. Spotted by Alex Badea. 2005-09-13 Alex Badea * ircd/ircd.c (try_connections): modify autoreconnect logic to allow FEAT_CONNECTFREQUENCY to be smaller than Class connectfreq 2005-09-13 Alex Badea * ircd/s_conf.c (close_mappings): NULL out GlobalServiceMapList, otherwise the linked list has an invalid ending sentinel on rehash 2005-09-12 Michael Poole * ircd/channel.c (find_ban): Compare ban mask against hostname even when it looks like an IP, to match things like *!*@1.* when users have a hostname like 1.2.3.example.com. 2005-09-12 Michael Poole * RELEASE.NOTES: Note the resolution of ambiguous ipmasks. * ircd/ircd_string.c (ipmask_parse): Implement it. 2005-09-12 Michael Poole * ircd/m_join.c (m_join): If we find an empty key, null out the key pointer. 2005-09-11 Michael Poole * RELEASE.NOTES: Mention the side benefits of this change. * include/ircd_string.h (ipmask_parse): Declare function here. (ircd_aton): Becomes a special case of ipmask_parse(). * include/match.h (check_if_ipmask): Undeclare function. (ipmask_parse): Remove function prototype from this file. * ircd/ircd_string.c (ircd_aton_ip4): Add nullable pbits parameter to accept ipmask length. Rework to fill that in. (ircd_aton): Rework into... (ipmask_parse): this function, which knows how to fill in its own pbits parameter. * ircd/m_burst.c (ms_burst): Rely on make_ban() to set the ban flags correctly, to avoid call to check_if_ipmask(). * ircd/match.c (ipmask_parse_ipv4): Delete function. (check_if_ipmask): Likewise. (ipmask_parse): Delete this version in favor of ircd_string.c's. * ircd/test/ircd_in_addr_t.c (ipmask_test): New struct type. (test_masks): New array of ipmask_test. (test_ipmask): Function to run one of those tests. (main): Call test_ipmask(). 2005-09-11 Alex Badea * ircd/m_ping.c (ms_ping, mo_ping): misplaced chunk of code (probably during the forward port) which broke AsLL; fixed. 2005-09-01 Michael Poole * ircd/gline.c (make_gline): Remove debug output from when IPv6 support was being debugged. (do_gline): Likewise. (gline_lookup): Likewise, plus remove redundant code. 2005-09-01 Michael Poole * ircd/channel.c (joinbuf_join): Ignore joinbuf type when joining 0, since no other call passes a null channel. * ircd/m_join.c: Remove comment discussing argument meanings. (last0): Make this also handle the JOIN 0 logic, doxyfy. (join0): Merge into last0. (m_join): Doxygenate. Remove check for join0. Further reorganize, so new versus old channel handling are moved to just one place each within this function. (ms_join): Doxygenate. Remove check for join0. 2005-09-01 Michael Poole * RELEASE.NOTES: Bump revision date and highlight this change. * include/channel.h (MAGIC_OPER_OVERRIDE): Remove. (can_join): Remove declaration. * ircd/channel.c (compall): Remove. (can_join): Remove. * ircd/m_join.c (m_join): Remove redundant check for control characters (clean_channelname() will get them). Reorganize initial flags calculation. Accept channel keys like RFC 1459 says; this requires the old compall()/can_join() logic to modify 'keys', so inline the code and reorganize it. 2005-08-30 Michael Poole * include/channel.h (PASSLEN): Remove; use KEYLEN instead. * ircd/channel.c (mode_parse_upass): Likewise. (mode_parse_apass): Likewise. The inconsistency (in clean_key()) was reported by Reed. 2005-08-30 Michael Poole * RELEASE.NOTES: Document +D and +d channel modes. 2005-08-29 Michael Poole * include/numeric.h (ERR_NOMANAGER_LONG): Undefine. (ERR_NOMANAGER_SHORT): Rename to ERR_NOMANAGER. * ircd/s_err.c (replyTable): Change to reflect that. * ircd/channel.c (clean_key): New function. (mode_parse_key): Use it, and check that keys do not start with :. (mode_parse_upass): Likewise, and adjust for ERR_NOMANAGER. (mode_parse_apass): Likewise. The key and password changes fix bugs reported by coekie. 2005-08-27 Michael Poole * ircd/channel.c (add_user_to_channel): Use SetOpLevel() instead of assigning directly to member->oplevel. (mode_parse_apass): Likewise. (mode_process_clients): Users opped by outsiders should get oplevel 1, since they are not channel managers. * ircd/m_burst.c (ms_burst): Use SetOpLevel() instead of assigning directly to member->oplevel. 2005-08-25 Michael Poole * ircd/channel.c (member_can_send_to_channel): At coekie's suggestion, disallow channel manager talking after Apass is set, so they set and use Upass sooner. * ircd/class.c (init_class): Default class should have 1 link. (report_classes): Return links count minus one to match old output. * ircd/m_trace.c (do_trace): Fix links count here, too (spotted by Reed). 2005-08-25 Michael Poole * ircd/channel.c (mode_parse): Accept +A/+U from servers regardless of FEAT_OPLEVELS. 2005-08-24 Michael Poole * ircd/ircd.c (parse_command_line): Mention epoll engine when run with -v. 2005-08-24 Michael Poole * include/patchlevel.h (PATCHLEVEL): Increment. * ircd/channel.c (joinbuf_join): Double check that oplevel is 0 or 1 when propagating JOIN :#channel, to avoid PV on receiver. * ircd/engine_epoll.c: Add system call numbers for more CPU types. * ircd/ircd_log.c (log_open): Remove NFS-oriented alarm() calls; anyone who writes logs over NFS is mental. (Thanks to D. Bruce.) 2005-08-21 Michael Poole * include/s_conf.h (free_mapping): Declare new function. * ircd/ircd_parser.y (pseudoblock): Use it. * ircd/s_conf.c (free_mapping): Define it. (close_mappings): New function. (rehash): Call close_mappings() before reading file. * ircd/m_kill.c (do_kill): Revert 2005-08-18 change. 2005-08-19 Michael Poole * ircd/parse.c (tok_tree): Re-add token tree structure. (initmsgtree): Populate it. (parse_server): Prefer it to full message tree. 2005-08-18 Michael Poole * ircd/m_kill.c (do_kill): When FEAT_HIS_KILLWHO, change apparent source of KILLs to &his instead of &me. 2005-08-16 Michael Poole * ircd/channel.c (mode_parse_ban): Avoid overwriting part of newban->banstr[] when the source is a server. (Spotted by jcq.) 2005-08-16 Michael Poole * ircd/channel.c (joinbuf_join): Switch to &his instead of &me for announcements to local users in a channel. * ircd/m_burst.c (ms_burst): Likewise. * ircd/m_invite.c (m_invite): Likewise. (ms_invite): Likewise. * ircd/m_kick.c (ms_kick): Likewise. * ircd/m_topic.c (do_settopic): Another &me -> &his change for HIS, and use that apparent source for the channel localcast. 2005-08-16 Jukka Ollila * ircd/s_user.c (hide_hostmask): Use HIS_SERVERNAME instead of the real thing for the post-mode-x rejoin. 2005-08-15 Michael Poole * include/supported.h (FEATURESVALUES2): Add +d channel mode. * ircd/IPcheck.c (ip_registry_new_entry): Clarify that this is not a varadic function. (Suggested by Ian Kumlien.) * ircd/convert-conf.c (finish_operators): Likewise. * ircd/listener.c (close_listeners): Likewise. * ircd/channel.c (CheckDelayedJoins): Use HIS server name to remove channel mode +d. 2005-08-12 Michael Poole * ircd/channel.c (pretty_mask): Recognize ':' as unique to the host part of a ban mask. 2005-08-03 Jan Krueger * ircd/m_kick.c (m_kick): Send JOIN prior to confirming KICK on invisible member. 2005-08-08 Michael Poole * ircd/channel.c (find_ban): For non-IPmask bans, match the ban string against the string form of the client's IP address. 2005-07-16 Michael Poole * configure.in: Apply a test for socklen_t that Reed found. * configure: Regenerate. 2005-07-16 Michael Poole * RELEASE.NOTES: Mention that 2.10.11 does not support oplevels. * README.FreeBSD: Remove (merged into README). * README.Solaris: Remove (merged into README). * README: Merge in the above; also update for 2.10.12. * doc/example.conf: Change mention of K-lines to say Kill blocks instead. * doc/iauth.txt: Remove (out of date). * doc/readme.features: Update to reflect that 2.10.11 is not the current release. Change mention of various config lines to use the equivalent config entries or blocks instead. * doc/readme.log: Likewise. * doc/api/features.txt: Change F-line mentions to say Feature entry instead. * doc/api/modebuf.txt: Change U-line mention to say Uworld entry. * doc/api/motd.txt: Change T-line mentions to say Motd entry. 2005-07-15 Michael Poole * ircd/ircd_features.c (feature_init): Always call feature_notify_server*() so that 'his' is initialized. * ircd/m_whois.c (do_whois): Unswap sense of comparison to choose between user->server and &his. 2005-07-14 Michael Poole * ircd/channel.c (mode_parse_apass): Update oplevels when setting or removing the +A password. Partial credit goes to Reed Loden. 2005-07-14 Michael Poole * include/ircd_features.h: Declare new "his" pseudo-server to hold FEAT_HIS_SERVERNAME and FEAT_HIS_SERVERINFO in a convenient place. * ircd/ircd_features.c: Initialize and update it. * ircd/channel.c (modebuf_flush_int): Use it as the apparent source for opmodes and server mode changes (also when the source is me). * ircd/m_burst.c (ms_burst): Use it as the apparent source for net rider kicks. * ircd/m_whois.c (do_whois): Use it to simplify code here. * ircd/s_misc.c (exit_client): Use it as the apparent killer. 2005-07-14 Michael Poole * doc/example.conf (General): Update comment about vhost to match the code change below. * ircd/ircd_parser.y (generalvhost): Accept vhost="*"; as a synonym for the default behavior (for backwards compatibility). Spotted by Kev. * ircd/channel.c (sub1_from_channel): Remove stale code and comment, replacing with an up-to-date comment. Spotted by skx. 2005-07-11 Michael Poole * ircd/engine_select.c: Remove outdated comment about USE_POLL. * ircd/parse.c (msgtab): #if out CAP handler until we have caps. * RELEASE.NOTES: Remove mention of capabilities for now. 2005-07-11 Stephan Peijnik * ircd/gline.c (gline_add): It's only a protocol violation when a server issues a "whacky" gline. If it's an oper, only tell opers with SNO_GLINE. * ircd/ircd_auth.c (iauth_protocol_violation): Likewise, the whole network is not likely to care about IAuth PVs, so only tell opers with SNO_CONNEXIT. 2005-07-11 Michael Poole * doc/readme.features: Document FEAT_CHANNELLEN. * doc/example.conf: Give an example of it. * ircd/m_join.c (ms_join): Do not clean channel names from remote servers, to avoid desynchs. * ircd/m_names.c (ms_names): Likewise. 2005-07-11 Stephan Peijnik * include/ircd_features.h: Declare new FEAT_CHANNELLEN. * include/supported.h: Add it to the ISUPPORT display. * ircd/channel.c (clean_channelname): Impose the lower limit between FEAT_CHANNELLEN and CHANNELLEN. * ircd/ircd_features.c: Define FEAT_CHANNELLEN. 2005-07-11 Reed Loden * include/sys.h: Move FD_SETSIZE redefinition to engine_select.c. * ircd/s_bsd.c: Move FD_SETSIZE sanity check to engine_select.c Remove unused #include . * ircd/engine_select.c: Put FD_SETSIZE redefinition and sanity checks here, since they are not used elsewhere in the daemon. [Order slightly changed by Michael Poole to compile.] 2005-07-03 Michael Poole * ircd/convert-conf.c: New file. * ircd/Makefile: Compile it. 2005-06-27 Michael Poole * ircd/s_bsd.c (add_connection): Split logic for server versus client listeners; only do IPcheck for client connections. * ircd/s_serv.c (server_estab): There is no longer a need to remove IPcheck reference, so don't. 2005-06-27 Michael Poole * include/client.h (struct Connection): Remove con_dns_reply (and associated macros). * include/res.h (gethost_byname): Change calling signature to clarify memory ownership. (gethost_byaddr): Likewise. * include/s_bsd.h (release_dns_reply): Remove function. * ircd/hash.c: #include "match.h" to quash warning. * ircd/ircd_auth.c (struct IAuth): Remove i_query field. (iauth_dns_callback): Adjust for new gethost_byname signature. (iauth_reconnect): Likewise. * ircd/ircd_res.c (struct reslist): Make elements of query field inline rather than in a contained structure. (make_request): Reflect removal of DNSQuery. (do_query_name): Likewise. (do_query_number): Likewise. (make_dnsreply): Remove now-unused function. (timeout_resolver): Adjust to new callback signature. (delete_resolver_queries): Reflect removal of DNSQuery. (gethost_byname): Update to new signature. (gethost_byaddr): Likewise. (res_readreply): Reflect removal of DNSReply. * ircd/list.c (dealloc_connection): con_dns_reply no longer exists, so do not free it. * ircd/s_auth.c (auth_verify_hostname): constify. (auth_dns_callback): Adjust to new callback signature. (start_auth): Adjust to new gethost_byaddr() signature. * ircd/s_bsd.c (connect_dns_callback): Adjust to new callback signature. (release_dns_reply): Remove unused function. (connect_server): Adjust to new gethost_byname() signature. * ircd/s_conf.c (conf_dns_callback): Adjust to new callback signature. (conf_dns_lookup): Adjust to new gethost_byname() signature. (attach_iline): Use cli_sockhost() instead of DNS reply. (conf_check_server): Simplify use of DNS results. * ircd/s_serv.c (server_estab): Remove call to removed function. * ircd/s_user.c (register_user): Remove call to removed function. 2005-06-27 Michael Poole * include/s_misc.h (get_sockhost): Remove the unused (and deceptively named) get_sockhost(). * ircd/s_misc.c (get_sockhost): Likewise. 2005-06-25 Andrew Miller * ircd/ircd_crypt.c (ircd_crypt): strdup is not allowed, change to DupStr so memdebug works. * doc/debug_memleak_gc.patch : Update to gc6.5 2005-06-24 Andrew Miller * ircd/m_invite.c (m_invite): Don't propagate invites to local channels. 2005-06-21 Andrew Miller * ircd/m_list.c (param_parse): Add support for channel wildcards. * ircd/m_list.c (show_usage): Document the new format. * ircd/hash.c (list_next_channels): Check channel wildcard in list. * include/channel.h (ListingArgs): Add the wildcard member. 2005-06-19 Andrew Miller * ircd/ircd_res.c (proc_answer): Deal with unexpected record types more gracefully. * ircd/ircd_res.c (res_readreply): Check res_ourserver before walking the pending request list, to make DoS attacks harder. * ircd/m_invite.c (m_invite): Give no such channel rather than not on channel when the channel being invited to does not exist. 2005-06-18 Michael Poole * ircd/s_debug.c (count_memory): Consolidate several lines; make initial letter capitalization consistent. 2005-06-19 Andrew Miller * ircd/s_stats.c: Remove the "debug only" label on memusage stats, since it no longer applies. 2005-05-16 Michael Poole * include/channel.h (struct Ban): Make 'who' and 'banstr' direct arrays, rather than pointers. * ircd/channel.c (bans_alloc): New variable to count number of ban structures allocated. (bans_inuse): New variable to count number of ban structures currently in use. (set_banmask): Adapt to changes in struct Ban. (make_ban): Likewise, and update ban counts. (free_ban): Likewise. (bans_send_meminfo): New function. (apply_ban): Adapt to changes in struct Ban. (mode_parse_ban): Likewise. (mode_process_bans): Likewise. (mode_parse): Likewise. (RevealDelayedJoin): Fix brace placement. (CheckDelayedJoins): Fix brace placement and whitespace. * ircd/list.c (struct liststats): Add new fields to eliminate the separate count variables. (init_list): Adapt to those changes. (alloc_client): Likewise. (dealloc_client): Likewise. (alloc_connection): Likewise. (dealloc_connection): Likewise. (make_server): Likewise. (remove_client_from_list): Likewise. (verify_client_list): Likewise. (make_link): Likewise. (free_link): Likewise. (send_liststats): New function. (send_listinfo): Rewrite to use new struct liststats layout. * ircd/m_burst.c (ms_burst): Adapt to changes in struct Ban. * ircd/m_clearmode.c (do_clearmode): Adapt to changes in struct Ban. * ircd/s_stats.c (stats_meminfo): Define unconditionally and call bans_send_meminfo(). (statsinfo): Always give access to stats_meminfo. 2005-06-16 Michael Poole * include/ircd_string.h: Include necessary header. * ircd/test/.cvsignore: Ignore log output files. * ircd/test/Makefile.in: Remove log output files. * ircd/test/kill-block-1.cmd: Add sleeps to try to trigger Kills. * ircd/test/run-tests.sh: Switch sense of argument. Send an IRC debug dump to log files. 2005-06-13 Michael Poole * ircd/s_user.c (make_user): Unconditionally increment userCount. (free_user): Unconditionally decrement it here. * ircd/s_conf.c (make_conf): Unconditionally increment GlobalConfCount. (free_conf): Unconditionally decrement it here. * ircd/s_debug.c (count_memory): Fix termination condition for ban-walking loop. Add missing "e" to "members". 2005-06-10 Michael Poole * ircd/match.c (check_if_ipmask): Strings that contain '?' cannot be true IP masks. 2005-05-30 Michael Poole * ircd/test/Makefile.in: Add LDFLAGS variable for profiling purposes. * ircd/test/ircd_match_t.c: Test recovery from backtracking. * ircd/test/channel-1.cmd: Modify to improve code coverage. * ircd/test/client-1.cmd: Likewise. * ircd/test/gline-1.cmd: Likewise. * ircd/test/ircd-t1.conf: Likewise. * ircd/test/stats-1.cmd: Likewise. * ircd/test/run-tests.sh: Explicitly start ircds. Add new test scripts. * ircd/test/test-driver.pl: Silently handle more signals from IRC. * ircd/test/commands-1.cmd: New test script. * ircd/test/feature-1.cmd: New test script. * ircd/test/jupe-1.cmd: New test script. * ircd/test/kill-block-1.cmd: New test script. * ircd/test/ircd-t1-2.conf: New configuration file for test scripts. * ircd/test/ircd-t2.conf: Likewise. 2005-05-30 Michael Poole * ircd/s_debug.c (count_memory): Use count_listener_memory() to report memory used by listener structures. 2005-05-30 Michael Poole * include/class.h (get_con_freq): Remove unused function. * include/list.h (find_user_link): Remove unused function. * include/class.c (get_con_freq): Remove. * ircd/list.c (find_user_link): Remove. * include/string.h (string_is_hostname, string_is_address, strnChattr): Remove unused functions. (init_string): Remove function that becomes a noop. * ircd/string.h (init_string): Remove. (string_is_hostname, string_is_address, strnChattr): Likewise. * ircd/ircd.c (main): Remove call to init_string(). 2005-05-30 Michael Poole * include/numeric.h (RPL_TRACELOG, RPL_MYPORTIS, RPL_NOTOPERANYMORE): Undefine unused numeric replies. * ircd/s_err.c (replyTable): Fix format fields for certain numeric arguments. Remove some unused entries. * ircd/s_stats.c (stats_configured_links): Move invariant parameters to message format string. 2005-05-30 Michael Poole * ircd/client.c (privtab): Add missing LIST_CHAN privilege, move WIDE_GLINE to reflect its enumerated value. * ircd/s_debug.c (count_memory): Use user_count_memory() function to count User structs in-use. * ircd/m_server.c (mr_server): Change "C:line" to "Connect block". * ircd/s_bsd.c (connect_server): Likewise. * ircd/s_conf.c (conf_check_server): Likewise. * ircd/s_err.c (replyTable): Change "O-lines" to "Operator block". 2005-05-30 Michael Poole * ircd/match.c (match): Rewrite to handle globs that end in an escaped wildcard (and hopefully clarify the code). * ircd/test/Makefile.in: Add new ircd_match_t test program. * ircd/test/ircd_match_t.c: New file. * ircd/test/test_stub.c: Emite newlines after log and debug messages. 2005-05-25 Reed Loden * ircd/s_err.c (replyTable): Allow for the specification of 'O' or 'o' in RPL_STATSOLINE. * ircd/s_stats.c (stats_configured_links): In /stats o/O, display 'O' if either the oper block or the connection class has PRIV_PROPAGATE (global oper) and 'o' if neither has PRIV_PROPAGATE (local oper). 2005-05-30 Michael Poole * ircd/IPcheck.c: Add Debug()s to try to track why the connected count underflows. * ircd/m_endburst.c (ms_endofburst): Avoid dereferencing 'chan' after it may be freed (in sub1_from_channel). * ircd/s_user.c (register_user): Rearrange code to reduce number of "if (MyConnect(sptr))" checks. 2005-05-12 Michael Poole * configure.in: Do not try to outsmart the default CFLAGS. Simply add parameters explicitly requested by the user. * configure: Regenerate. * ircd/ircd_crypt_native.c: Use _XOPEN_SOURCE 600 (which is used in os_generic.c) to get crypt() on NetBSD. 2005-05-11 Kevin L. Mitchell * ircd/ircd.c: if debugging is enabled (both DEBUGMODE defined and -x given), reserve fd 2 for the use of the debugging log; otherwise, some engines may attempt to use fd 2, which would end up getting closed by debug_init() (actually, by log_debug_reopen(), called by log_debug_init(), called by debug_init()) 2005-08-10 Michael Poole * ircd/channel.c (joinbuf_join): Do not send a MODE +o when a local user creates a channel. * ircd/umkpasswd.c (crypt_pass): Allocate the proper amount of memory for the tagged output string. * ircd/test/test-driver.pl: Add -vhost=... option. * ircd/test/ircd-t1.conf: Add new Operator blocks. * ircd/test/*.cmd: Rearrange and add more coverage tests. 2005-08-09 Michael Poole * ircd/ircd_parser.y: Move error tokens to top level of parse, and make ';' a synchronizing token for them. This avoids crashes in situations like missing ';' between two Kill blocks. Move several ';'s earlier for earlier detection of syntax errors. * ircd/motd.c (motd_memory_count): Use size_t for memory counts to match the format strings used for those variables. * ircd/msgq.c (msgq_histogram): tmp.sizes[] is an array of unsigned int, not unsigned long; use correct format string. * ircd/s_stats.c (stats_crule_list): Restore display of 'D' vs 'd' based on crule type, rather than query type. (statsinfo): Remove STAT_FLAG_VARPARAM from the "modules" and "help" stats, which don't use the varparam. * ircd/test/test-driver.pl: Interpreter for test scripts.b * ircd/test/ircd-t1.conf: Configuration file for test scripts. * ircd/test/*.cmd: New test scripts for test-driver.pl. 2005-05-08 Jukka Ollila (Adapted slightly by Michael Poole.) * ircd/os_generic.c (sockaddr_to_irc): Change to use v4compat addresses event when !defined(IPV6). 2005-05-07 Michael Poole * ircd/channel.c (joinbuf_join): Be smarter about what source to use when opping a user that joins a channel. 2005-05-04 Reed Loden * ircd/m_trace.c (do_trace): Show the real nickname instead of the numnick. 2005-05-02 Jan Krueger * ircd/channel.c (member_can_send_to_channel): if the channel can only be joined by users with accounts (+r), do not allow users without accounts to speak. 2005-05-07 Michael Poole * ircd/numnicks.c (base64toip): Fix bugs in parsing IPv6 addresses. * ircd/test/ircd_in_addr_t.c (test_addrs): Add new entry. (test_address): Test base64toip() as well. 2005-05-05 Michael Poole * ircd/s_user.c (umode_str): Only clear the operator flag when not propagating; never set it. 2005-05-04 Michael Poole * ircd/channel.c (joinbuf_join): Include channel manager flag in determination of oplevel. If opping the user for a non-local non-create, include oplevel in message to other servers. Send "MODE +o " to local users whenever opping the client. * ircd/m_join.c (m_join): Remove logic that moved into joinbuf_join(). (ms_join): Look for level 0 and 1 joins from remote servers and adjust value of 'flags' appropriately. 2005-05-04 Michael Poole * include/numeric.h: Remap oplevel numerics to new range. * ircd/s_err.c: Likewise. 2005-05-03 Michael Poole * ircd/s_stats.c (stats_access): Update to use new CONF_CLIENT fields, fixing crash found by nighty. 2005-05-02 Michael Poole * include/numeric.h (ERR_UPASS_SAME_APASS): New error message when trying to set +U pass to the same as the +A pass. * ircd/channel.c (mode_parse_upass): Use it. * ircd/ircd_auth.c (iauth_exit_client): Only send ExitUser if there is an active IAuth connection, fixing PR#1193808. (iauth_dispose_request): Only delete the timer if it is active. * ircd/m_invite.c (m_invite): Always forward the invite in the correct direction, and then skip it as 'one' if announcing. (ms_invite): Likewise. * ircd/numnicks.c (base64toip): Do not interpret AAAAAA as ::ffff:0.0.0.0; keep it as ::. * ircd/s_err.c (replyTable): Add ERR_UPASS_SAME_APASS. 2005-05-01 Michael Poole * doc/readme.log: Document IAUTH log target, remove docs for OLDLOG log target. * include/ircd_log.h: Add LS_IAUTH target, remove LS_OLDLOG. * ircd/ircd_log.c (logDesc): Likewise. * ircd/engine_epoll.c (engine_loop): Handle EPOLLHUP for all sockets (e.g. when connecting) and do not generate read/write events in the same pass as error or EOF events. * ircd/ircd_auth.c: Convert old sendto and debug messages to use the LS_IAUTH log target. Consistently use IAUTH_CONNECTED flag instead of comparing fd to -1. (iauth_reconnect): If already connected, disconnect and schedule a reconnect later, since an immediate reconnect can cause assertion failure in the event engine. Also schedule a reconnect when the connection attempt fails. (iauth_read): Reconnect on IO_FAILURE. (iauth_sock_callback): Disconnect and schedule a reconnect on both error (after reporting the error) and EOF. (iauth_start_client): Record the IAuth request in the client. (iauth_exit_client): Report the client exit. * ircd/s_misc.c (exit_one_client): Fix formatting. 2005-04-30 Michael Poole * ircd/ircd_auth.c (iauth_connect): Initialize (but do not add) timer here and set fd to -1. (iauth_schedule_reconnect): Rewrite to handle previously initialized timer. (iauth_reconnect): If server is connected, disconnect first. Update socket generator fd before calling socket_add(). (iauth_read): When reading 0 bytes (EOF), reconnect. 2005-04-27 Michael Poole * ircd/ircd_parser.y: Report non-existent class names as errors earlier, and do not fall back to "default" for Client blocks. 2005-04-25 Reed Loden * ircd/ircd_lexer.l: Add missing header to squash a warning. 2005-04-25 Michael Poole * ircd/s_user.c (register_user): Replace call with set_user_mode() with a direct parsing of user modes. To match this, revert the initial display of usermode to how it was done before. 2005-04-24 Michael Poole * doc/example.conf: Document new autoconnect field of Connect. * include/s_conf.h: Add CONF_AUTOCONNECT and field for it. * ircd/ircd.c (try_connections): Skip non-autoconnect servers. * ircd/ircd_lexer.l: Recognize autoconnect token. * ircd/ircd_parser.y: Add autoconnect= option to Connect block. * ircd/m_invite.c (m_invite): Avoid sending channel timestamp to user being invited. (ms_invite): Likewise. * ircd/s_user.c (register_user): Show class name rather than pointer-as-integer. 2005-04-24 Michael Poole * ircd/ircd_parser.y: Rewrite so each error condition gets its own error message, and so that invalid parameters are printed out. 2005-04-23 Michael Poole * ircd/channel.c (apply_ban): Consistently free newban->banstr when the function fails. (mode_process_bans): Free banstr for all BAN_DEL bans. * ircd/ircd_parser.y: Fix a few memory leaks from previous commit. 2005-04-23 Michael Poole * include/patchlevel.h: Bump to being a beta. * ircd/ircd_lexer.l (QSTRING): Return a copy of the string so that parser actions don't have to be immediately after a QSTRING. * ircd/ircd_parser.y (FNAME): Remove unused token. (QSTRING): Adjust for QSTRING being an already-copied version. 2005-04-23 Michael Poole * doc/example.conf (UWorld): Illustrate new config extension. * ircd/ircd_parser.y (uworldblock): Do the expected thing when multiple name= entries are present. 2005-04-22 Michael Poole * RELEASE.NOTES: Silence exceptions use ~, not -. Oops! * doc/example.conf: Fix typo in example Kill block. * ircd/channel.c (mode_parse_ban): Use correct test for flag_p. * ircd/m_silence.c (apply_silence): Make mask pretty so that later processing does not convert * to @ (and match no one). 2005-04-21 Kevin L. Mitchell * ircd/m_userip.c (userip_formatter): /userip should *never* report the user's real IP unless its answering the user him/herself * ircd/m_userhost.c (userhost_formatter): /userhost should *never* report the user's real host unless its answering the user him/herself 2005-04-20 Michael Poole * ircd/ircd.c (parse_command_line): Update usage text. * ircd/numnicks.c (base64toip): Use v4mapped address range instead of v4compat address range, fixing IPv4-based /who. 2005-04-19 Michael Poole * configure.in: When --enable-profile, add -pg to LDFLAGS. * configure: Regenerate. 2005-04-19 Michael Poole * ircd/match.c (check_if_ipmask): Fix brown-paper-bag typo. * ircd/s_conf.c (conf_debug_iline): Look for matching Kill blocks once a matching Client block is found. * ircd/m_whowas.c (m_whowas): Change strcmp() to ircd_strcmp(). 2005-04-18 Michael Poole * ircd/match.c (check_if_ipmask): Do not interpret masks that start with . or / as IP-based host masks. 2005-04-17 Michael Poole * ircd/channel.c (mode_process_clients): Only prohibit deops of users with the same or higher oplevel where apass is set. Likewise, when opping users, give them MAXOPLEVEL for non-apass channels. (joinbuf_join): Give new ops MAXOPLEVEL for non-apass channels. * ircd/m_kick.c (m_kick): Only prohibit kicks of users with the same or higher oplevel where apass is set. * ircd/s_user.c (register_user): Fix order of server version vs various mode strings. * tools/linesync/linesync.sh: Add revision id field. 2005-04-17 Michael Poole * tools/linesync/linesync.sh: Fix typo comment. Check for multiple blocks per line in the linesync input. 2005-04-17 Dan * tools/linesync/linesync.sh: Update to support new syntax and to avoid rehashing the ircd when the config is the same. * tools/linesync/linesync.conf: Update allowed conf items. 2005-04-16 Michael Poole * doc/example.conf (Kill): Document newly supported syntax. * include/s_conf.h (DenyConf): Split realname mask into its own field. Remove the unused DENY_FLAGS_{IP,REALNAME}. * ircd/ircd_parser.y (Kill): Only require one of usermask, hostmask, realmask to be set for a valid block. (killitem): Add new production killusername. * ircd/s_conf.c (conf_erase_deny_list): Free realmask field. (find_kill): Rearrange slightly to clarify control flow. * ircd/s_err.c (RPL_STATSKLINE): Stick usermask before hostmask, so the old usermask field can be adopted for realname mask. Add double quotes around the realmask field. * ircd/s_stats.c (report_deny_list): Do so. (stats_klines): Likewise. 2005-04-17 Perry Lorier * tools/convert-conf.py: Fix lots of conversion problems with oper privielges (now they are converted), features (deprecated features commented out, most converted to priviliges), realname klines (also add host= lines) quarintines (generate blocks for them), connect blocks (don't generate empty port config lines) etc... 2005-04-16 Michael Poole * ircd/gline.c (do_gline): Fix typo when activating IP-based G-lines. 2005-04-16 Michael Poole * ircd/class.c (free_class): Free default_umode field. * ircd/ircd_parser.y (classblock): Free default_umode field before overwriting it. * ircd/s_conf.c (free_conf): Free username, origin_name, hub_limit fields. (find_kill): Realname Kill blocks no longer have $R at the start, so do not skip over the first two characters of the mask. 2005-04-15 Michael Poole * doc/example.conf (Operator): Properly qualify plaintext password. (Quarantine): Document (new) syntax. * ircd/ircd.c: Add to make compile correctly on BSDs. * ircd/ircd_parser.y (qconf): Remove global variable. (killuhost): Null terminate username when present. (quarantineblock): Replace with a syntax that works. * ircd/s_stats.c: #include for UserStats. (stats_server_verbose): Reinstate check for UserStats. 2005-04-09 Kevin L. Mitchell * ircd/ircd.c: conditionally include sys/resource.h; otherwise, RLIMIT_CORE will not be defined and so set_core_limit() will never be defined, much less run. * configure.in: add sys/resource.h to the list of headers to search for * configure: regenerate configure * config.h.in: rerun autoheader to add HAVE_SYS_RESOURCE_H to config.h.in 2005-04-08 Michael Poole * include/s_conf.h (conf_debug_iline): Declare new function. * ircd/ircd.c (dbg_client): New file-scoped variable. (parse_command_line): Set it from the new -c option. (main): If dbg_client is set during chkconf, use it. * ircd/ircd_string.c (ircd_aton): Generate IPv4-mapped addresses, not IPv4-compatible addresses, to match ipmask_parse(). * ircd/m_whowas.c (m_whowas): Split display of real host to a separate line, in hopes of not confusing opers in the future. * ircd/s_conf.c (conf_debug_iline): Implement new function. 2005-04-06 Michael Poole * ircd/m_burst.c (ms_burst): Clear channel manager bit when wiping out locally opped and voiced channel members. 2005-04-06 Michael Poole * include/numeric.h (RPL_APASSWARN): Replace with three distinct values. (ERR_NOMANAGER_LONG): Assign new numeric. (ERR_NOMANAGER_SHORT): Assign new numeric. * ircd/channel.c (parse_mode_upass): Adapt to new formats for ERR_NOTMANAGER separation. (parse_mode_apass): Likewise. Also adapt to RPL_APASSWARN split. * ircd/s_err.c (RPL_APASSWARN): Replace with three message strings, to avoid embedding long message strings in the logic implementation. (ERR_NOTMANAGER): Likewise (but not the same strings). 2005-04-06 Michael Poole * ircd/ircd_parser.y (clientblock): Use the password field. * ircd/s_user.c (register_user): Allow aconf->password to be a single digit, since per-IP limit is now in a separate field. 2005-04-06 Michael Poole * acinclude.m4 (unet_PIPE_CFLAGS): Remove; -pipe is obsolete in current gcc releases and is slower than files for previous releases on most OSes. * configure.in (AC_PREREQ): Bump to 2.59 because of AS_HELP_STRING. (unet_PIPE_CFLAGS): Remove use of macro. * aclocal.m4: Regenerate. * configure: Likewise. 2005-04-04 Michael Poole * configure.in: For developers' ease, allow passing an option to configure to persistently set optimization CFLAGS. * configure: Regenerate. 2005-04-04 Michael Poole * doc/example.conf (Jupe): Make the default Jupe block follow CFV-0255. (Thanks to FrankP for pointing me at this and to DinTn for getting me a copy of the CFV.) 2005-04-04 Michael Poole * include/capab.h (CAPFL_STICKY): Define. (CAPLIST): Remove the entries used for testing. * include/client.h (Connection): Clarify comment about the distinction between con_capab and con_active. * ircd/m_cap.c: Add doxygen comments and replace the long discussion of m_handler functions with an xref to it. (send_caplist): Add new parameters and change the terminal vs non-terminal line distinction to make compliant with current draft specification. (cap_empty): Rename to cap_ls(). (cap_req): Track modified capabilities bitwise, so that the responding ACK contains all the appropriate flags. (cap_ack): Add comment explaining why there is no response. (cap_clear): Build and send a list of cleared capabilities, as required by the current draft. (cap_list): Send capability list using LIST subcommand. (cmdlist): Add handler for LS subcommand. Remove entries for the empty and LSL subcommands, which are no longer allowed. (m_cap): Require at least one argument from user. 2005-04-01 Michael Poole * include/s_conf.h (SMAP_FAST): Define. (s_map): Add 'flags' field. * ircd/ircd_lexer.l: Recognize 'FAST' token. * ircd/ircd_parser.y (FAST): New token. (pseudoitem): Add pseudoflags alternative. (pseudoflags): New production, recognizing FAST token. * ircd/parse.c (register_mapping): Set MFLG_SLOW conditionally. Remove outdated comment. 2005-04-01 Michael Poole * include/handlers.h (ms_privs): Declare. * include/msg.h (TOK_PRIVS): Assign token. (CMD_PRIVS): Define. * ircd/m_privs.c: Add doxygen comments and replace the long discussion of m_handler functions with an xref to it. (mo_privs): Forward requests for non-local users to their own server. (ms_privs): Implement. * ircd/parse.c (PRIVS): Dispatch to ms_privs when a server sends the message. 2005-03-30 Michael Poole * include/client.h (struct Client): Explain where cli_username comes from. * include/struct.h (struct User): Explain where this username comes from, too * ircd/ircd_res.c (timeout_resolver): Update parameter name in Doxygen comment, too. * ircd/s_misc.c (get_client_name): Reorganize to have less indentation and behave like 2.10.11 when client is not idented. 2005-03-29 Michael Poole * doc/example.conf: Remove no-longer-used HIS_STATS_h. * doc/readme.features: Likewise. * include/ircd_features.h: Likewise. * ircd/ircd_features.c: Likewise. 2005-03-20 Reed Loden * include/ircd_features.h: Alphabetize HIS_STATS_? features. * ircd/ircd_features.c: Likewise. 2005-03-29 Michael Poole (The previously unapplied part of another patch (by Carlo Wood?).) * ircd/m_part.c (ms_part): Remove a check that should already be done by the user's own server. 2005-03-29 Michael Poole * doc/example.conf: Add HIS_STATS_J entry. * doc/readme.features: Likewise. 2005-03-25 Reed Loden * include/hash.h: Add needed prototypes for new stats_nickjupes() function. * include/ircd_features.h: Add FEAT_HIS_STATS_J. * include/numeric.h: Add RPL_STATSJLINE (222) for new nick jupes stats. Correct a typo in a comment. * ircd/hash.c: Add stats_nickjupes() function to report all nick jupes to an oper. Because of the nature of hash tables, there is no way to sort this list so the results look weird. * ircd/ircd_features.c: Add FEAT_HIS_STATS_J (default: TRUE). * ircd/s_err.c: Add RPL_STATSJLINE (222) for new nick jupes stats. * ircd/s_stats.c: Add RPL_STATSJLINE (222) for new nick jupes stats. Make 'j' case sensitive. Modify the comment for stats uworld. 2005-03-27 Michael Poole * ircd/m_burst.c (ms_burst): Do not send numeric oplevels in a -A channel when forwarding a channel burst line. 2005-03-25 Michael Poole * ircd/m_server.c (set_server_flags): New function. Unlike the old code, this recognizes the IPv6 flag. (Spotted by Reed.) (mr_server): Use the new function. (ms_server): Likewise. Also don't show "Net junction:" message if any closer server is still bursting (also spotted by Reed). Finally, forward the +6 flag to other servers. * ircd/s_serv.c (server_estab): Forward the +6 flag here, too. * ircd/s_bsd.c (client_sock_callback): Re-set cli_error() after it may be cleared by completed_connection(). 2005-03-23 Michael Poole * ircd/m_burst.c (ms_burst): Remove limit and keys when a channel is wiped out during burst. 2005-03-22 Michael Poole * ircd/ircd_res.c (check_resolver_timeout): I give up. Use the kludgy earlier version of the timeout fix. 2005-03-22 Michael Poole * ircd/channel.c (send_channel_modes): Fix test for when to send membership mode suffix, to avoid sending it more than once. 2005-03-22 Michael Poole (Many thanks to nex and Reed for helping hunt this down and doing the testing of various patches.) * ircd/ircd_events.c (timer_chg): Properly change a timer that is in the middle of executing its expiration event. * ircd/ircd_res.c (check_resolver_timeout): Simplify the test for whether to use timer_chg() or timer_add(). On second thought, use timer_add() unconditionally; the server connection loop does. (timeout_resolver): Do not try to re-schedule the DNS timeout unless it is the expiration event. (do_query_number): Properly initialize request->state. (res_readreply): Mention the response code that was bad. 2005-03-22 Michael Poole * ircd/engine_kqueue.c (engine_delete): The kernel removes close()'d FDs from the activity list, so don't try to remove the FD here (the caller may have already close()'d it). 2005-03-20 Michael Poole * ircd/IPcheck.c: Fix typos in comments and strings to reduce future slumming for credit. * ircd/channel.c, ircd/crule.c, ircd/engine_epoll.c: Likewise. * ircd/fileio.c, ircd/hash.c, ircd/ircd.c: Likewise. * ircd/ircd_auth.c, ircd/ircd_crypt.c: Likewise. * ircd/ircd_crypt_native.c, ircd/ircd_crypt_smd5.c: Likewise. * ircd/ircd_features.c, ircd/ircd_log.c: Likewise. * ircd/ircd_parser.y, ircd/ircd_res.c: Likewise. * ircd/ircd_reslib.c, ircd/ircd_string.c, ircd/list.c: Likewise. * ircd/m_burst.c, ircd/m_clearmode.c, ircd/m_destruct.c: Likewise. * ircd/m_invite.c, ircd/m_ison.c, ircd/m_kill.c: Likewise. * ircd/m_server.c, ircd/m_squit.c, ircd/m_topic.c: Likewise. * ircd/m_who.c, ircd/m_whois.c, ircd/m_whowas.c: Likewise. * ircd/match.c, ircd/msgq.c, ircd/numnicks.c: Likewise. * ircd/os_generic.c, ircd/parse.c, ircd/s_auth.c: Likewise. * ircd/s_bsd.c, ircd/s_conf.c, ircd/s_debug.c: Likewise. * ircd/s_misc.c, ircd/s_numeric.c, ircd/s_serv.c: Likewise. * ircd/s_stats.c, ircd/s_user.c, ircd/table_gen.c: Likewise. * ircd/umkpasswd.c, ircd/uping.c, ircd/whowas.c: Likewise. * ircd/test/test_stub.c: Make exit_client() argument list consistent with that in s_misc.c so doxygen is not confused. 2005-03-20 Michael Poole (Thanks to Reed Loden for pointing these out.) * ircd/channel.c: Fix typos in comments. * ircd/m_create.c: Likewise. * ircd/m_list.c: Likewise. * ircd/m_names.c: Likewise. * ircd/numnicks.c: Likewise. * ircd/s_bsd.c: Likewise. 2005-03-20 Michael Poole (Thanks to Reed Loden for pointing these out.) * doc/Configure.help: Remove outdated file. * doc/exaconf.2: Likewise. * doc/snomask.html: Add missing , SNO_AUTO, SNO_DEBUG, and update SNO_OPERDEFAULT list. * tools/mkpasswd.c: Remove outdated file (use ircd/umkpasswd instead). * tools/Makefile.crypt: Remove outdated file. * tools/mkpasswd.c: Likewise. * tools/transition: Likewise. 2005-03-19 Michael Poole * ircd/channel.c (sub1_from_channel): Check apass rather than mode to determine whether an apass is set (MODE_KEY/APASS/UPASS are not set in mode.mode). (send_channel_modes): Use the same change when determining how to send oplevels for channels. 2005-03-19 Michael Poole * include/IPcheck.h (IPcheck_connect_fail): Take a Client parameter instead of irc_in_addr. * ircd/IPcheck.c (IPcheck_connect_fail): Likewise. Assert that the client has been IP-checked. (IPcheck_remote_connect): Assert that the client has not yet been charged for connecting. (IPcheck_connect_succeeded): Assert that the client has been charged for connecting. (IPcheck_disconnect): Likewise. * ircd/m_nick.c (m_nick): Pass rejected client to IPcheck_connect_fail() when somebody takes the nick first. (ms_nick): Likewise. * ircd/s_serv.c (server_estab): Pass new server to IPcheck_connect_fail(). * ircd/s_user.c (register_user): When rejecting a user, pass the struct Client to IPcheck_connect_fail(). 2005-03-19 Michael Poole * doc/example.conf (Connect): Remove a buggy comment about leaf directives; refer the reader to the Connect block instead. * tools/convert-conf.py: Set "leaf;" rather than "leaf = yes;" 2005-03-19 Michael Poole * doc/example.conf (Operator): Correct the comment explaining hashed passwords. * ircd/m_oper.c (oper_password_match): Check correct variable to determine whether the hashed password matched. 2005-03-08 Michael Poole * ircd/match.c (ipmask_parse): Explicitly zero-initialize the mask and bit count for "*". (ipmask_check): Make more robust to similar errors. 2005-03-07 Michael Poole * configure.in: Consistently use a constant in AC_DEFINE(). * configure: Regenerate. * doc/example.conf (Port): Add comment about the mask option. (Port): Fix the vhosted Port example. * ircd/ircd_parser.y (clientblock): Correctly initialize the IP address and addrbits for a Client block with no IP mask. * ircd/match.c (ipmask_parse): Accept * as a zero-bit mask. * ircd/s_auth.c (start_auth_query): Count socket allocation failure as a failed auth check, as .11 does. * ircd/s_debug.c (debug_serveropts): Add '6' to server options when compiled with IPv6 support. 2005-02-23 Michael Poole * doc/example.conf: Explain apass_opmode privilege, pointing out that, unlike previous privs, the default is OFF for global opers. * include/client.h (PRIV_APASS_OPMODE): Define new privilege. * ircd/channel.c (mode_parse_upass): Only prevent local opers without the apass_opmode privilege from forcing a +U change. (mode_parse_apass): Likewise, for +A. * ircd/client.c (client_set_privs): Turn off PRIV_APASS_OPMODE in the default privileges for global opers. * ircd/ircd_lexer.l (apass_opmode): Recognize keyword. * ircd/ircd_parser.y (TPRIV_APASS_OPMODE): New token. (privtype): Fix typo for local_badchan privilege value. Accept apass_opmode token. 2005-02-23 Michael Poole * doc/example.conf: Fix comment's description of "whox" privilege. 2005-02-21 Michael Poole * include/channel.h (ShowChannel): Remove PRIV_LIST_CHAN check from here, so /whois does not show secret global channels. * ircd/m_list.c (param_parse): Require PRIV_LIST_CHAN to use "/list s". (m_list): Allow opers with PRIV_LIST_CHAN to see secret channels. 2005-02-21 Perry Lorier * ircd/s_stats.c: Hide the hub IP's. They're kinda important. 2005-02-20 Perry Lorier * ircd/ircd_parser.y: Moved some parse errors from log_write()'s to parse_error()'s so that ./ircd -k will display them. Also clarified the warning about oper blocks. 2005-02-20 Perry Lorier * tools/convert-conf.py: A multitude of changes to deal with parsing mistakes, generate a newer config file, better error handling, being smarter about what config elements you generate etc. 2005-02-20 Perry Lorier * ircd/engine_epoll.c: Change a size_t to socklen_t to match getsockopt prototype, so it compiles without warning on amd64 2005-02-19 Michael Poole * ircd/ircd_parser.y (clientblock): Parse IP address before allocating ConfItem; if the parse fails, generate an error. * ircd/s_err.c (RPL_STATSCLINE): Add format field to prefix IPv6 addresses starting with ':'. (RPL_STATSILINE): Likewise. (RPL_STATSOLINE): Add format field for username. * ircd/s_stats.c (stats_configured_links): Pass the appropriate argument for the RPL_STATSxLINE changes. Change RPL_STATSILINE to use * instead of when IP or host is null. 2005-02-18 Michael Poole * ircd/IPcheck.c (ip_registry_find): Use canonical form of IP address to look up and compare against hash entries. * ircd/channel.c (apply_ban): Do not free a succesful BAN_DEL ban. * ircd/ircd_parser.y (clientblock): Stash IP string in aconf->name. (clienthost): Split hosts that contain '@' into username and host. (clientip): Split IPs that contain '@' into username and IP. (killreason): Add missing ~ to mask off DENY_FLAGS_FILE. * ircd/m_silence.c (forward_silences): When we reject a silence, splice it out of the ban list. Warn the user if he is local. * ircd/s_bsd.c (connect_inet): Set IP TOS for outbound server connections. * ircd/s_stats.c (stats_configured_links): Display correct field when listing CONF_UWORLD entries. 2005-02-09 Michael Poole * configure.in (YACC): Only warn if we cannot get a version number from $YACC. * configure: Regenerate. * ircd/ircd_res.c (check_resolver_timeout): Try another way to avoid timer_chg() on a non-queued/active timer. * ircd/ircd_string.c (ircd_aton): Set part_start to handle input strings like "::127.0.0.1". * ircd/test/ircd_in_addr_t.c (test_addrs): Add a test for that. 2005-02-02 Michael Poole * Makefile.in (install): Do not create ${prefix}/include since it is no longer used. * ircd/Makefile.in (install-*): Remove commented-out code to touch and chown MPATH and RPATH. * ircd/gline.c (gline_find): Allow searching for host-based G-lines by plain hostname (not *@host), thus preventing "GLINE test ..." from inserting duplicate G-lines. * ircd/motd.c (motd_create): Null out new Motd's hostmask when appropriate, avoiding an uninitialized or stale pointer. 2005-01-26 Michael Poole * include/ircd_alloc.h (DoMallocZero): Parenthesize macro arguments, fixing operator precedence problems. (DoFree): Make debug version also overwrite p. * include/memdebug.h (fda_get_byte_count, fda_get_block_count): Declare functions used outside memdebug.c. * ircd/Makefile.in (UMKPASSWD_SRC): Add memdebug.c. * ircd/ircd_alloc.c (DoMalloc, DoMallocZero, DoRealloc): Do not use these if using the memdebug version. * ircd/memdebug.c: #include "send.h" and to get declarations for certain functions. * ircd/umkpasswd.c (CurrentTime): Define in case of memdebug. (sendto_opmask_butone): Likewise. 2005-01-25 Michael Poole * configure.in: Fix typos and thinkos in previous commut. * configure: Regenerate. * doc/example.conf: Change class name in Connect block to be consistent with earlier Class block. * ircd/ircd.c (try_connections): Consider Connect blocks with hold time of 0. Fix Links() vs MaxLinks() comparison to reflect ref count starting at 1. * ircd/ircd_parser.y (cruleblock, iauthblock): Clear unused variables after use. 2005-01-24 Michael Poole * configure.in: Make sure that $LEX and $YACC are reasonable and actually run. * configure: Regenerate. * ircd/ircd_res.c (check_resolver_timeout): Use correct macro to test whether the timer is already pending. 2005-01-23 Michael Poole * doc/example.conf (Kill): Fix typo in realname Kill block * include/client.h (infousermodes): Fix typo in comment. * ircd/ircd.c (parse_command_line): -k implies BOOT_TTY. (main): Move daemon_init() before event_init() to work around BSD lameness. 2005-01-23 Michael Poole * ircd/test/Makefile.in: Add missing "install" target. Make compatible with BSD make (which has no $^ and no $(CPPFLAGS) in its default .c.o rule). 2005-01-21 Michael Poole * ircd/engine_kqueue.c: Move earlier to fix build on FreeBSD 5.x (which needs it for ). * ircd/fileio.c (fbopen): Replace BSDism S_IREAD, S_IWRITE with portable equivalents. * ircd/ircd_log.c (log_open): Likewise. * ircd/os_generic.c (_XOPEN_SOURCE): Increase to 600 (SuSv3?) so that IPv6 definitions become visible on FreeBSD 5.3. * ircd/s_auth.c: Remove apparently unused because it fails to compile on FreeBSD 5.3. 2005-01-22 Perry Lorier * ircd/ircd_parser.y: Fix missing ; 2005-01-19 Michael Poole * ircd/m_invite.c (m_invite, ms_invite): Include timestamp in outbound INVITE messages. On incoming INVITEs, ignore if the timestamp is too recent or if the timestamp is missing and the peer server is in burst. 2005-01-15 Michael Poole * RELEASE.NOTES: Mention CIDR support for Client, Operator, bans and silences. Mention net.rider kick change. * doc/example.conf (Class): Add documentation for restart and local_opmode privileges. Fix name of local_jupe privilege. * ircd/ircd_lexer.l: Recognize local_opmode privilege. 2005-01-14 Michael Poole * RELEASE.NOTES: Further updates (mention Pseudo blocks, clarify CAP comment, mention named /stats, list config heteromorphisms. * doc/readme.features: Document HIS_STATS_a, HIS_STATS_L, HIS_STATS_R, LOCAL_CHANNELS, TOPIC_BURST. * ircd/channel.c (mode_parse_apass): Change old mention of +u mode to say +U. 2005-01-13 Michael Poole * RELEASE.NOTES: Update for 2.10.12. 2005-01-08 Michael Poole * ircd/channel.c (@page zombie): Add synopsis to explain what zombies are supposed to do. * doc/example.conf (Features): Transfer recommended LOG features from 2.10.11 example.conf. 2005-01-03 Michael Poole * ircd/ircd.c (try_connections): Test Connect hold time before updating it (spotted by Kev). 2005-01-03 Michael Poole * Makefile.in: Add ircd/test as a subdirectory. * ircd/.cvsignore: Ignore umkpasswd binary. * ircd/Makefile.in: Update dependencies. * ircd/test/.cvsignore: New file. * ircd/test/Makefile.in: Use ${} instead of $(). Add build, depend, distclean targets to integrate with rest of build system. 2005-01-03 Michael Poole * ircd/IPcheck.c (ip_registry_check_remote): Do not count clones that have an invalid IP address. * ircd/ircd.c (try_connections): Update Connect hold time before skipping it, to prevent infinite loops. 2005-01-03 Kevin L Mitchell * ircd/s_user.c (is_silenced): is_silenced() would core if sptr was a server; fixed to skip servers 2004-12-28 Michael Poole * include/s_bsd.h (VirtualHost): Replace with separate variables for IPv4 and IPv6 virtual hosts. * include/uping.h (uping_echo): Remove declaration. * ircd/ircd_auth.c (iauth_reconnect): Select VirtualHost_v4 or VirtualHost_v6 based on iauth server address family. * ircd/ircd_lexer.l: Do not recognize RESOLVER token. * ircd/ircd_parser.y (ResolverAddr): Remove declaration. (RESOLVER): Remove definition. (generalresolver): Remove. (generalvhost): Assign address to either VirtualHost_v4 or VirtualHost_v6, depending on format. * ircd/ircd_res.c (res_socket): Replace with separate variables for IPv4 and IPv6 resolver sockets. (ResolverAddr): Remove definition. (restart_resolver): Attempt to set up both IPv4 and IPv6 sockets. (send_res_msg): Select outbound FD based on resolver address type. (res_readreply): Recognize either inbound socket FD. * ircd/os_generic.c (sockaddr_from_irc): Require irc != NULL. (os_socket): Require local != NULL. * ircd/s_bsd.c (VirtualHost): Replace with separate variables for IPv4 and IPv6 virtual hosts. (connect_inet): Select virtual host based on destination address. * ircd/uping.c (UPingFIleDescriptor): Remove. (upingSock): Split into separate IPv4 and IPv6 variables. (uping_echo_callback): Incorporate uping_echo() body here, so the proper socket FD can be used. (uping_init): Attempt to set up both v4 and v6 UPING sockets. (uping_server): Create uping socket with appropriate local address. * doc/example.conf (General): Update example config file to reflect removal of Resolver setting and support for separate IPv4 and IPv6 VHost settings. 2004-12-28 Michael Poole * ircd/sys.h (BITS_ZERO_ON_*, HAVE_RELIABLE_SIGNALS, DOCURSES, DOTERMCAP, IRC_UID, IRC_GID, LIMIT_FMT, FALSE, TRUE): Remove unused macros. * ircd/ircd_auth.c, ircd/listener.c, ircd/s_auth.c, ircd/s_bsd.c, ircd/s_conf.c, ircd/uping.c, ircd/whocmds.c: Remove obsolete #include . 2004-12-28 Michael Poole * ircd/match.c: Remove obsolete #include . (ipmask_parse_ipv4): We already parse the dotted quads from the input string, so use them instead of inet_addr() to populate out->s_addr. * ircd/gline.c: Remove obsolete #includes , "sys.h". (do_gline): Pass SHOW_IP instead of TRUE as argument to get_client_name(). * ircd/ircd.c (try_connections): Revise to use fewer temporary variables. 2004-12-28 Michael Poole * include/res.h: Implement irc_in_addr_* as macros. * ircd/ircd_res.c: Remove the function bodies. * ircd/ircd_string.c (irc_in_addr_is_ipv4): Remove body. (ircd_ntoa_r): Do not append extra ':' when unparsing 0::. (ircd_aton): Accept IPv6 addresses with all eight segments specified (e.g. 0:0:0:0:0:0:0:0). Correctly parse addresses with IPv4 bits at the end (e.g. ::FFFF:127.0.0.1). * ircd/test/ircd_in_addr_t.c, ircd/test/test_stub.c: New files. * ircd/test/Makefile: Convert to Makefile.in for proper VPATH support. Add test_stub.c and ircd_in_addr_t.c references. * configure.in: Generate ircd/test/Makefile as an output file. * configure: Update. 2004-12-18 Michael Poole * include/client.h: Move unreg, privs, capab and active fields from struct Client to struct Connection since that is how they are really associated. Adjust macros to match. (SetPriv, ClrPriv): New macros. * ircd/client.c (client_set_privs): Exit earlier for remote clients. Adjust macro use to correspond. * ircd/m_server.c (mr_server): Grant all privileges except PRIV_SET to peer servers. 2004-12-18 Michael Poole * ircd/s_user.c (hide_hostmask): Add a missing "break;" to fix bug #1087461. 2004-12-18 Michael Poole * ircd/engine_kqueue.c (engine_loop): Remove an assertion that the socket's FD is the same after processing as it was before; local clients apparently have s_fd() == -1 after close. 2004-12-18 Kevin L Mitchell * ircd/s_user.c: make absolutely certain register_user() is never called with cli_unreg non-zero; transition set_nick_name() over to the new way of determining whether client is ready for register_user() * ircd/s_err.c: add ERR_UNKNOWNCAPCMD for reporting failure to understand a given CAP subcommand * ircd/parse.c: add "CAP" command * ircd/m_user.c (m_user): transition over to new way of determining whether client is ready for register_user() * ircd/m_pong.c (mr_pong): transition over to new way of determining whether client is ready for register_user() * ircd/m_cap.c: implementation of the IRC capabilities draft * ircd/list.c (make_client): initialize cli_unreg element of client structure * ircd/ircd_string.c: correct old bugs in ircd_strn?cmp() functions that were never found because cross-case ordering has not been needed until now * ircd/Makefile.in: add m_cap.c to list of .c files * include/numeric.h (ERR_UNKNOWNCAPCMD): define new error reply to indicate an unknown CAP subcommand * include/msg.h: add "CAP" command * include/handlers.h: add m_cap() to list of handlers * include/client.h: add support for client capabilities; rototill the registration mechanism to dovetail well with the capability system--i.e., allow the capability system to suspend registration if the user issues one of the CAP commands * include/capab.h: header file to define client capabilities 2004-12-17 Michael Poole * ircd/channel.h (apply_ban): Add new flag to indicate whether newban should be free()'d after it is used. * ircd/channel.c (apply_ban): Likewise. Also set BAN_DEL flag when setting BAN_OVERLAPPED, and free newban when BAN_DEL. (mode_parse_ban): Delete buggy shortcut when channel banlist is empty. (mode_process_bans): Always give ownership of ban->banstr to the mode buffer, avoiding a memory leak. * ircd/m_silence.c (apply_silence): Pass new parameter to apply_ban. 2004-12-17 Michael Poole * ircd/channel.c (sub1_from_channel): Immediately destroy non-Apass channels when oplevels are enabled; otherwise, they can stay opless for a considerable period. (mode_parse_ban): Initialize banstr to NULL so that set_ban_mask() does not try to free() an invalid pointer. * ircd/ircd_parser.y (uworldblock): Put UWorld server name into aconf->host, not aconf->name. * ircd/m_server.c (mr_server, ms_server): Attach CONF_UWORLD items by host here.. * ircd/s_conf.c (conf_check_server): .. rather than by name here. (attach_conf_uworld): New function to attach CONF_UWORLD items. (rehash): Use attach_conf_uworld() instead of attaching by name. 2004-12-15 Michael Poole * ircd/m_topic.c (do_settopic): Allow +k services to set topics on channels they are not joined. 2004-12-15 Michael Poole * ircd/IPcheck.c (IPTargetEntry): Make count unsigned to squash warning. (ip_registry_canonicalize): New function to convert an IP address into a canonical form for clone checks. (ip_registry_hash): Update to reflect canonical form. (ip_registry_find): Use ip_registry_canonicalize(). (ip_registry_check_local, ip_registry_check_remote): Likewise. * ircd/numnicks.c (iptobase64): Map 6to4 addresses to IPv4 when sending them to a non-IPv6 server. 2004-02-17 Michael Poole * ircd/s_user.c (hide_hostmask): Preserve user's visibility in a +D channel when they hide their hostmask. 2004-12-15 Michael Poole * doc/example.conf: Remove the example Server blocks since they are no longer used (were merged into Connect). * ircd/ircd_res.c (restart_resolver): Fix typo in previous commit. * ircd/m_server.c (check_loop_and_lh): Use a different argument to test whether an introduced server is directly connected or not. 2004-12-14 Michael Poole * include/client.h (FLAG_IPV6): New value for enum Flag. (IsIPv6, SetIPv6): Accessor macros for it. * include/numnicks.h (iptobase64): Add flag indicating whether to use full IPv6 addresses or fake them in an IPv4-compatible way. * ircd/numnicks.c (iptobase64): Use the new flag. * include/send.h (sendcmdto_flag_serv_butone): New function to send different lines to servers based on flags (like FLAG_IPV6). * ircd/send.c (sendcmdto_flag_serv_butone): Implement it. * ircd/s_bsd.c (completed_connection): Advertise IPv6 support in our server flags. * ircd/s_serv.c (server_estab): Likewise. Also make sure we send compatible IP addresses for the new server. * ircd/s_user.c (register_user): Only send full IPv6 addresses to links that have FLAG_IPV6 set. 2004-12-13 Michael Poole * doc/example.conf: Update General block comment to mention new RESOLVER option and to explain IPv6 support. * ircd/ircd_lexer.l: Recognize RESOLVER token. * ircd/ircd_parser.y: Declare RESOLVER token and use it in an alternative for generalitem. * ircd/ircd_res.c: Define global ResolverAddr variable. If it is valid, use it instead of VirtualHost in restart_resolver(). 2004-12-13 Michael Poole * doc/example.conf: Update configuration to move Client block comment after sample Class blocks, and update entries in it. * ircd/ircd_lexer.y: Recognize IP and USERNAME tokens. * ircd/ircd_parser.y: Add ip and username global variables and IP and USERNAME tokens. Add clientip and clientusername alternatives for clientitem, and update clientblock to correspond. * ircd/ircd_res.c (delete_resolver_queries): Do not try to walk the request_list before request_list is initialized. (cres_mem): Likewise. * ircd/os_generic.c (sockaddr_from_irc): Improve guessing of proper address family. * ircd/s_conf.c (attach_iline): Allow aconf->host == NULL, which means DNS reply is optional. If aconf->addrbits >= 0, test it. * tools/crypter: Delete. 2004-12-11 Kevin L Mitchell * ircd/*.c: use new assert() in ircd_log.h in preference to system assert() * ircd/umkpasswd.c: use new assert in ircd_log.h; add necessary glue so that umkpasswd will successfully compile and link * ircd/test/ircd_chattr_t.c: comment out include of assert.h since there are no calls to assert() * ircd/ircd_log.c: add sentinel (log_inassert) to prevent assert() from looping should there be an assertion failure somewhere in the logging subsystem * include/ircd_log.h: custom implementation of assert() that calls log_write() 2004-11-21 Michael Poole * ircd/channel.c (mode_parse_upass): Allow forced mode changes to be done by non-channel-managers, fixing a crash from OPMODE. (mode_parse_apass): Likewise. 2004-11-20 Michael Poole * ircd/m_create.c (ms_create): Complain if a user tries to CREATE a channel they are already in, but do not add them again. 2004-11-09 Michael Poole * include/res.h (init_resolver): Delete, and initialize lazily. * ircd/ircd.c (main): Do not call init_resolver(). * ircd/ircd_res.c (restart_resolver): Use default VirtualHost for local resolver socket address. (init_resolver): Delete. (make_request): Call restart_resolver() if necessary. (query_name): Use ircrandom() instead of rand(). * ircd/os_generic.c (sockaddr_from_irc): Convert last argument to a file descriptor that indicates the socket family to use. (os_sendto_nonb,os_socket,os_connect_nonb): Update to match. 2004-11-09 Michael Poole * ircd/engine_epoll.c (engine_delete): Do not attempt to remove a socket from epoll on delete, since the kernel does that for us. 2004-11-07 Michael Poole * ircd/m_server.c (m_server, ms_server): Assign timestamp before it might be used in exit_new_server(). 2004-11-07 Michael Poole * aclocal.m4, config.h.in, configure, ircd/Makefile.in: Regenerate to reflect the changes since these files' last rebuild. 2004-11-07 Michael Poole * include/ircd_crypt.h (ircd_crypt): This should return char*, not const char*, since it does not own the returned pointer. * ircd/ircd_crypt.c (ircd_crypt): Change return type. * ircd/ircd_crypt_smd5.c (irc_crypt_smd5): Make passwd a static field since it is returned but this function must own the buffer. * ircd/m_oper.c (oper_password_match): Free the string returned by ircd_crypt(). * ircd/engine_epoll.c (engine_loop): Fix a memory leak. 2004-11-07 Michael Poole * acinclude.m4: Look for a 64-bit integer type. * configure.in: Look for inttypes.h, since some systems have that but not stdint.h (and define 64-bit integers therein). * include/client.h: Delete con_sendK, con_receiveK. Make con_sendB and con_receiveB 64 bits wide. * include/s_misc.h: Delete is_cks, is_ckr, is_sks, is_skr. Convert the other byte counters and the connected time counters to 64 bits wide. * ircd/ircd_snprintf.c (doprintf): Unconditionalize the HAVE_LONG_LONG bits, and use the 64-bit integer types from above. * ircd/packet.c (update_bytes_received): Remove use of cli_receiveK(). * ircd/s_bsd.c (deliver_it): Likewise. (close_connection): Likewise. * ircd/s_misc.c (tstats): Likewise. Update format strings to use %Lu for 64-bit integer parameters. * ircd/s_stats (stats_links): Convert cli_sendK() and cli_receiveK() use shifted versions of the byte counters, and update format strings to use %Lu for 64-bit integer parameters. 2004-11-07 Michael Poole * include/s_user.h (add_silence): Delete. (del_silence): Delete. * include/struct.h (struct User): Convert silence list to struct Ban. * ircd/m_silence.c (apply_silence, forward_silences): New functions. (m_silence): Use forward_silences() instead of add_silence(). (ms_silence): Likewise. * ircd/s_err.c (replyTable): Update RPL_SILELIST. * ircd/s_misc.c (exit_one_client): Update to new silence list type. * ircd/s_user.c (is_silenced): Use find_ban() to search for silences. If one is found, send it plus any silence exceptions. (del_silence): Delete. (add_silence): Delete. 2004-11-07 Michael Poole * include/channel.h: Remove declarations for undefined functions cancel_mode(), add_token_to_sendbuf(), IsMember(). Delete add_banid(), next_removed_overlapped_ban(). Add BAN_EXCEPTION flag and new functions find_ban(), apply_ban(). * ircd/channel.c (PartFmt*, next_ban, prev_ban, removed_bans_list, LocalChanOperMode): Remove unused variable definitions. (make_nick_user_host): Delete. (add_banid): Delete. (next_removed_overlapped_ban): Delete. (find_ban): New function, which knows about exceptions. (is_banned): Use find_ban() and only work on a struct Membership. (bmatch): New function, which knows about CIDR bans. (apply_ban): New function to replace add_banid(). (mode_parse_ban): Use apply_ban(). 2004-10-28 Michael Poole * configure.in (AC_PREREQ): Depend on autoconf 2.50 since we use new macros like AC_LINK_IFELSE and AC_LANG_PROGRAM. 2004-10-22 Michael Poole * ircd/m_invite.c (m_invite, ms_invite): Fix INVITE forwarding with announcements enabled (do not "announce" to the recipient, and unconditionally send to the recipient). * ircd/send.c (sendcmdto_channel_servers_butone): Properly skip the "from" client and implement SKIP_NONOPS and SKIP_NONVOICES. 2004-10-21 Michael Poole * include/channel.h (Ban): Add fields address, nu_len, addrbits to support netmask-based bans. * ircd/channel.c (set_ban_mask): New function to parse a ban as either netmask-based or not. (make_ban): Use set_ban_mask(). (make_nick_user_ip): Becomes unused; remove it. (is_banned): Rewrite to match only once against the nick!user part of a ban, and compare addresses if BAN_IPMASK is set. (mode_parse_ban): Use set_ban_mask(). 2004-10-21 Michael Poole * ircd/s_conf.c (attach_iline): Test resolved host names against aconf->host, not the (NULL) aconf->name. 2004-10-19 Michael Poole * include/channel.h: Move ban flags out of channel flags and rename to reflect this. * ircd/channel.c: Update ban constant names. * ircd/m_burst.c: Likewise. 2004-10-18 Michael Poole * include/list.h (SLink): Remove ban elements from here... * include/channel.h (Ban): And move to the new struct Ban. (Channel): Update banlist field to match. (next_removed_overlapped_ban): Update return type to match. (make_ban, free_ban): New functions. * ircd/channel.c (next_ban, prev_ban, removed_bans_list): Update list types. (free_bans): New variable to hold unused Ban elements. (make_ban, free_ban): New functions. (destruct_channel, add_banid, next_removed_overlapped_ban): Update to use struct Ban. (is_banned, send_channel_modes, send_ban_list): Likewise. (ParseState, mode_parse_ban, mode_process_bans): Likewise. (mode_parse): Likewise. * ircd/m_burst.c (ms_burst): Update to use struct Ban. * ircd/m_clearmode.c (do_clearmode): Update to use struct Ban. * ircd/s_debug.c (count_memory): Update to use struct Ban. 2004-10-18 Kevin L Mitchell * ircd/gline.c (gline_find): unless we're looking for an exact match, we should call match() on hostnames, not ircd_strcmp() 2004-10-17 Michael Poole * include/s_conf.h (ConfItem): Add new field username. Replace unused field bits with addrbits. (find_conf_exact): Replace user and host arguments with cptr. (find_conf_name, read_tlines, find_restrict): Remove declaration for undefined functions. (conf_parse_userhost): New function. * ircd/m_oper.c (m_oper): Update calls to find_conf_exact(): both resolved hostname and IP are matched in one pass now. * ircd/s_bsd.c (close_connection): Update call to find_conf_exact(). * ircd/s_conf.c (conf_parse_userhost): New function. (check_limit_and_attach): Use correct ConfItem field to determine maximum connections per IP. (attach_iline): Replace user@host matching with shorter, clearer matching against username and host/IP fields. (find_conf_exact): Likewise. * ircd/ircd_parser.y: Replace assignment to aconf->host for CONF_CLIENT and CONF_OPERATOR with calls the CIDR-aware conf_parse_userhost(). This means CONF_CLIENT ConfItems no longer use the name field or the IP token. Remove the latter. * ircd/ircd_lexer.l: Remove unused token IP. 2004-10-17 Michael Poole * ircd/crule.c (crule_via): Simplify the lookup for the directly connected server name. 2004-10-16 Michael Poole * ircd/class.c: Make find_class() return NULL for unknown classes, rather than returning the start of connClassList. * ircd/match.c (parse_ipmask): Translate IPv4 masks as IPv4-compatible addresses. (check_ipmask): Fix comparison of IP masks. * ircd/motd.h, ircd/motd.c: Add a new MOTD type, MOTD_IPMASK, that uses CIDR style masks in the hostname field of a Motd block. 2004-10-16 Michael Poole * ircd/numeric.h: Remove the unused RPL_STATMEM and RPL_STATMEMTOT. Move the RPL_BOUNCE comment to its current value (the former RPL_STATMEM). * ircd/s_err.c: Remove format strings for RPL_STATMEM and RPL_STATMEMTOT. 2004-10-16 Michael Poole * ircd/m_server.c: Look up server configuration by name of our directly connected peer rather than the server being introduced. 2004-10-13 Michael Poole * include/channel.h: Delete MODE_LISTED and is_listed(). Replace ListingArgs.chptr with ListingArgs.bucket. Move declaration of list_next_channels() to.. * include/hash.h: here, and drop the "nr" argument. * ircd/channel.c: Remove redundant scan of local clients for channels being listed. Delete list_next_channels() function. * ircd/hash.c: Add list_next_channels() here, revising to not use MODE_LISTED and to use ListingArgs.bucket instead of chptr. Also decide when to stop sending RPL_LISTs based on a half-full sendq. * ircd/m_burst.c, ircd/s_misc.c: Delete mention of MODE_LISTED. * ircd/m_list.c: Delete mention of MODE_LISTED. Unconditionally call list_next_channels(sptr). * ircd/s_bsd.c: Remove the "nr" argument to list_next_channels(). * ircd/Makefile.in: Update dependencies (for hash.c). 2004-10-13 Michael Poole * ircd/ircd_parser.y: Consistently zero out global variables after they are used (prevents double frees and other problems). 2004-10-12 Michael Poole * include/client.h: Rename FLAGSET_ISSET, _SET, _CLEAR to FlagHas, Set, Clr respectively. Get rid of FLAG_CHKACCESS and FLAG_LOCAL. Delete con_fd (get from con_socket) and con_port. Move sentalong from send.c to struct Connection, and cli_lasttime and cli_since from struct Client to struct Connection. Update cli_*() macros to use con_*(cli_connect(cli)). * ircd/client.c: Replace PrivSet() with FlagSet(), PrivClr() with FlagClr(), PrivHas() with FlagHas(). * ircd/ircd_parser.y: Likewise. * ircd/list.c: Remove assignment to cli_local() since it is now a calculated value. * ircd/s_bsd.c: Remove uses of cli_port(). * ircd/s_conf.c: Remove uses of ClearAccess(). * ircd/send.c: Delete sentalong array and replace with references to con_sentalong(). 2004-10-12 Michael Poole * doc/example.conf: Update example config to reflect the changes made in the remainder of this patch. * include/list.h: Make make_conf() take a type argument. * include/s_conf.h: Delete CONF_LEAF and CONF_HUB. Add "maximum" and "hub_limit" to ConfItem to compensate. * ircd/ircd_lexer.l: Recognize MAXHOPS token. * ircd/ircd_parser.y: Get rid of aconf global variable and add hub_limit global variable. Add MAXHOPS token, and productions inside connectblock to recognize it and hub masks. Allow maxlinks field in a Client block, rather than overloading password field. Convert serverblock to uworldblock and remove extraneous fields. * ircd/m_server.c: Make check_loop_and_lh() look up ConfItem and calculate LHcptr and active_lh_line. Merge some duplicated code so handling active_lh_line cases is clearer. * ircd/s_conf.c: Make make_conf() take a type argument. Delete CONF_LEAF and CONF_HUB. Do not overwrite server name with what is specified in the config file. * ircd/s_err.c: Remove the unused RPL_STATSNLINE and RPL_STATSHLINE. Remove useless parameters and format fields from RPL_STATSCLINE, RPL_STATSILINE, RPL_STATSLLINE, RPL_STATSOLINE and RPL_STATSULINE. * ircd/s_serv.c: Delete CONF_LEAF and CONF_HUB. * ircd/s_stats.c: Get rid of report_array and make stats_configured_links() directly use RPL_STATSxLINE (adding the new fields for Server and Client blocks). Remove /stats h, since that has no meaning. 2004-10-12 Michael Poole * ircd/m_burst.c: Mask off channel modes in a wiped-out channel by default rather than by listing which should be wiped out. 2004-10-09 Michael Poole * ircd/m_server.c: Forward port checks for leaf and hub config rules, and reorganize mr_server() and ms_server() by moving out common code. Add doxygen comments for the file. 2004-10-09 Michael Poole * ircd/hash.c: Fix thinko in hash function: It is not indexed simply by character value, so we cannot just remap the values by case. 2004-10-05 Michael Poole * ircd/hash.c: Replace the old hash function with one based on randomized CRC-32. The new one avoids a big table from the old function. 2004-10-05 Michael Poole * ircd/random.c: Convert to use ircd_md5 interface and hopefully keep more internal random state. 2004-10-05 Michael Poole * include/ircd_md5.h, ircd/ircd_md5.c, ircd_crypt_smd5.c, ircd/umkpasswd.c: Get rid of the GoodMD5xxx/BrokenMD5xxx prefixes. 2004-10-05 Michael Poole * adns, lib/adns: Remove unused adns library. 2004-10-05 Michael Poole , hikari , Perry Lorier * include/*.h, ircd/*.c: Convert comments to Doxygen-compatible format, and add new comments where needed. * Doxyfile: New file to tell Doxygen how to run. 2004-09-21 Michael Poole * ircd/s_auth.c (HeaderMessages): Make the compiler, not the programmer, generate magic numbers. (AuthIncompleteList): Remove. (AuthPollList): Remove. 2004-09-19 Michael Poole * acinclude.m4: Clean up AC_DEFINE()s so we no longer need acconfig.h. * acconfig.h: Remove since it is now redundant. * aclocal.m4, config.h.in, configure: Regenerate. 2004-09-19 hikari * configure.in: Fixed configure script rules to fail if (f)lex or yacc/bison aren't found as they're essential for compilation. Regenerated files with autreconf. 2004-09-18 Michael Poole * doc/example.conf: Add NETWORK feature example. Fix typos in eaxmples for HANGONGOODLINK and IRCD_RES_TIMEOUT. * include.class.h: Make max_links and ref_count unsigned ints. Make ping_freq and conn_freq unsigned short. (No more negative numbers in /stats y.) * ircd/ircd.c: Report configuration file name for "ircd -k". 2004-09-18 hikari * ircd/Makefile.in: Fixed a missing internal build dependency. 2004-09-16 Michael Poole * INSTALL: Fix name of example.conf and mention its installed location. * include/supported.h (FEATURESVALUES2): Fix a reference to channel mode +u that escaped earlier rename attempts. * ircd/ircd_auth.c (iauth_connect): Assign port number after zeroing out the destination address. Add some additional debug statements to help follow operations. * ircd/ircd_parser.y (iauthblock): Do not require "name" to be set. 2004-09-11 Bas Steendijk * include/channel.h, include/supported.h, ircd/channel.c, ircd/s_err.c: Use +U instead of +u for user keys. 2004-09-13 Michael Poole * doc/example.conf: Remove sample VIRTUAL_HOST setting. * doc/readme.features: Remove VIRTUAL_HOST documentation, and update NODNS documentation to match current behavior. * include/s_conf.h: Remove now-unused vhost_address field and set_virtual_host() function. * include/ircd_features.h, ircd/ircd_features.c, ircd/s_debug.c: Remove VIRTUAL_HOST. * ircd/ircd_auth.c, ircd/s_bsd.c: Use VirtualHost as local address if we do not have a more specific alternate. * ircd/ircd_parser.y: Check for sanity in General blocks (from old conf_add_local()) and assign vhost directly to VirtualHost. * ircd/ircd_res.c (irc_in_addr_valid): Fix thinko; obviously any value will be either != 0 or != 0xffff. * ircd/os_generic.c: Use AF_INET instead of AF_INET6 when the local addresses are specified as IPv4 addresses. * ircd/s_conf.c: Remove unused conf_add_local() and set_virtual_host(). 2004-09-13 Michael Poole * ircd/listener.c (add_listener): Consolidate duplicated code, and make sure listener->server is set before calling inetport() on it. 2004-09-12 Michael Poole * include/channel.c (mode_parse_upass, mode_parse_apass): Only let services (not normal opers) force a change of +A or +u. 2004-09-11 Michael Poole * include/s_stats.h: Add sd_name to struct StatDesc. Stop publishing the statsinfo and statsmap arrays; replace them with stats_find(). Change argument list of StatFunc() to work with names. * ircd/m_stats.c: Use stats_find() instead of statsmap[]. Use the full argument instead of just the first character in reports. * ircd/s_stats.c: Adapt individual stats handler functions to new argument list. Add long names to statsinfo[]. Add new functions stats_cmp(), stats_search(), stats_find(). Sort statsinfo[] in stats_init(). * ircd/s_err.c: Change ENDOFSTATS to display a string rather than a single character. * ircd/s_user.c: Send an error to the user when a message loses its target in transit. * include/class.h include/gline.h include/ircd_features.h include/listener.h include/motd.h include/msgq.h include/res.h include/s_debug.h include/s_misc.h include/userload.h ircd/class.c ircd/gline.c ircd/ircd_features.c ircd/ircd_res.c ircd/listener.c ircd/motd.c ircd/msgq.c ircd/s_debug.c ircd/s_misc.c ircd/userload.c: Adjust stats handlers to new argument list. 2004-09-11 Michael Poole * include/numeric.h, ircd/s_err.c: Remove RPL_TRACEPING, and replace with RPL_TRACEEND. * ircd/s_trace.c: Move all the duplicated code in m*_trace() to do_trace(). Implement RPL_TRACEEND, per RFE#830291. 2003-06-20 Alexander Maassen * ircd/m_topic.c : Don't allow banned users to set a topic in a channel. 2004-09-11 Kevin L Mitchell * config.h.in, tools/Makefile.crypt: Remove wrong pathname from comment in header. * ircd/m_clearmode.c, ircd/m_opmode.c: Fix wrong pathname in header comment. * ircd/m_away.c, ircd/m_kill.c, ircd/m_notice.c, ircd/m_ping.c, ircd/m_pong.c, ircd/m_privmsg.c, ircd/m_quit.c, ircd/m_topic.c, ircd/m_version.c: Remove "template" moniker from comments. * ircd/test/ircd_chattr.0.dat (IsChannelPrefix): Drop + from channel prefix list. 2004-09-11 Michael Poole * doc/example.conf: Add examples for FEAT_HIS_* features. 2003-06-08 Matthias Crauwels [Feature renamed to FEAT_HIS_WHOIS_LOCALCHAN by Michael Poole.] * include/ircd_features.h: new feature FEAT_HIS_LOCAL_CHAN_WHOIS * ircd/ircd_features.c: new feature FEAT_HIS_LOCAL_CHAN_WHOIS * ircd/m_whois.c: hide local channels in local WHOIS, this breaks HIS * doc/readme.features: documented FEAT_HIS_LOCAL_CHAN_WHOIS * doc/ircd.conf.sample: default value for FEAT_HIS_LOCAL_CHAN_WHOIS 2004-09-11 Michael Poole * ircd/ircd_relay.c (server_relay_channel_message, server_relay_channel_notice): Do not allow other servers to send or relay to local channels. * ircd/m_wallchops (ms_wallchops): Likewise. * ircd/m_wallvoices (ms_wallvoices): Likewise. 2004-09-11 Kevin L Mitchell * ircd/gline.c (gline_add): fix GLINE logging (Bug #750927) * ircd/channel.c: removing limits shouldn't gobble an argument; this was a subtle interaction issue with modebuf...fixed by adding MODE_LIMIT to modebuf_flush_int() and short-circuiting modebuf_mode_uint() to add MODE_LIMIT to mbuf->mb_rem in the removal case. Note that this is not proof against the sequence, "modebuf_mode_uint(mbuf, MODE_ADD | MODE_LIMIT, 10); modebuf_mode_uint(mbuf, MODE_DEL | MODE_LIMIT, 10);" (Bug #916138) 2004-09-11 Michael Poole * include/supported.h: Kev pointed out I misinterpreted the meaning of CHANMODES; fix this. Also define CHANNELLEN and STATUSMSG from the ISUPPORT draft. 2004-09-10 Michael Poole * include/supported.h (FEATURESVALUES2): Include A,u, in CHANMODES when oplevels are enabled. 2004-09-10 Michael Poole * ircd/channel.c (send_channel_modes): Only send oplevels for channels that actually use them -- for -A channels, send chanops as :o even if OPLEVELS is enabled. * ircd/ircd.c: Fix -k (chkconf mode) and show in usage help. * ircd/numnicks.c (base64toip): Fill in the right number of 0 words when we see _ in a base64-encoded IPv6 address. 2004-09-10 Michael Poole * ircd/ircd.c: Add -k as a chkconf-like option to exit after reading the configuration file. * ircd/chkconf.c: Remove as unused. * ircd/Makefile.in: Remove last mentions of chkconf from Makefile. 2004-09-10 Michael Poole * doc/example.conf: Remove examples for unused features (TIMESEC, CRYPT_OPER_PASSWORD) and add for new feature (ANNOUNCE_INVITES). * doc/readme.features: Remove documentation for unused features (TIMESEC, CRYPT_OPER_PASSWORD, oper/locop privileges, HIS_DESYNCS), update defaults for SOCKSENDBUF and SOCKRECVBUF, and add documentation for ANNOUNCE_INVITES. * include/ircd_features.h: Remove unused features (TIMESEC, CRYPT_OPER_PASSWORD, LIST_CHAN, HIS_DESYNCS). * include/ircd_features.c: Likewise. * ircd/ircd_res.c: Actually use FEAT_IRCD_RES_RETRIES and FEAT_IRCD_RES_TIMEOUT where appropriate. * ircd/s_debug.c: Do not display setting of unused (and now non-existent) FEAT_CRYPT_OPER_PASSWORD. 2004-09-10 Michael Poole * ircd/os_generic.c (sockaddr_from_irc): Fix IPv4 implementation to use the correct address family and IP offset. 2004-09-10 Michael Poole * include/s_conf.h (struct ConfItem): Add origin and origin_name fields. * ircd/ircd_parser.y: Add new global variable "origin." Add a new "connectionvhost" production that accepts vhost = "IP" inside a Connect block and assigns the IP to origin_name. * ircd/s_bsd (connect_inet): If aconf has a valid origin, use it as the local address. Otherwise, fall back to the old logic (if VIRTUAL_HOST="TRUE", use the virtual host setting). * ircd/s_conf.c (lookup_confhost): If the ConfItem has an origin_name, try to parse it as an IP address. 2004-04-17 Isomer * ircd/parse.c: Don't rate limit /gline messages 2004-09-10 Michael Poole * ircd/ircd_parser.y: Replace references to yylval.whatever with references to the appropriate term. This fixes bugs like "1 hour 30 minutes" being misrecognized as 30 seconds. 2004-09-10 Michael Poole * ircd/ircd_features.c (features): Change default values for SOCKSENDBUF and SOCKRECVBUF to SERVER_TCP_WINDOW, so that users need not specify them in ircd.conf. 2004-09-10 Michael Poole * ircd/ircd_parser.y (serverblock): Server blocks should default to CONF_LEAF status. * doc/example.conf: Update example to reflect this. 2004-09-10 Michael Poole * ircd/parse.c (msg_tree_parse): Reject commands that contain non-alphabetic characters. 2004-09-09 Michael Poole * config.h.in: Remove duplicated and unused macro definitions. 2004-08-24 Michael Poole * ircd/client.h: Properly parenthesize "flag" argument to FLAGSET_INDEX() and FLAGSET_MASK() macros. 2004-08-22 Michael Poole * ircd/channel.c (send_channel_modes): If oplevels are disabled, send 'o' for chanops instead of the member's oplevel. 2004-08-22 Michael Poole * ircd/s_conf.c: find_conf_byip() should use irc_in_addr_cmp() instead of memcmp(). (Fixes IPv4 servers linking to an IPv6 server.) 2004-08-22 Alex Badea * include/ircd_defs.h: increased SOCKIPLEN to fit ipv6 addresses 2004-08-19 Michael Poole * include/res.h: Remove unused function gethost_byname_type(). * ircd/ircd_res.c: Likewise, and clean up some small functions only used once (remove_dlink(), timeout_resolver()). Use rand() for random request IDs instead of the deprecated *rand48(). Make resolver timeout event fire only when needed instead of once a second. 2004-08-17 Michael Poole IPv6 support, with lots of code and design borrowed from a patch by Alex Badea. * config.h.in: Add place to #define IPV6 support. * configure.in: Check for struct sockaddr_in6, and use that as the default choice for IPv6 support. * configure: Regenerate. * include/IPcheck.h, include/client.h, include/gline.h, include/ircd_string.h, include/listener.h, include/match.h, include/res.h, include/s_bsd.h: Convert from struct in_addr (from ) to struct irc_in_addr (from "res.h"). * include/ircd_osdep.h, include/s_conf.h, include/uping.h: Convert from struct sockaddr_in (from ) to struct irc_sockaddr (from "res.h"). Add new functions os_socket(), os_accept(), os_sendto_nonb() to help abstract away actual sockaddr types. * include/ircd_chattr.h, ircd/table_gen.c: Define new bit to mark characters valid in IPv6 addresses. * include/numnicks.h, ircd/numnicks.c: New functions iptobase64() and base64toip() to convert from base64 to struct irc_in_addr. * ircd/IPcheck.c, ircd/channel.c, ircd/m_nick.c, ircd/m_oper.c, ircd/m_userip.c, ircd/m_who.c, ircd/m_whois.c, ircd/s_misc.c, ircd/s_serv.c, ircd/s_user.c, ircd/whocmds.c: Use struct irc_in_addr instead of unsigned int or struct in_addr. * ircd/gline.c: Use new more-generic ipmask functions. * ircd/ircd.c: Use struct irc_sockaddr instead of separate port fields. * ircd/ircd_reslib.c: Use struct irc_sockaddr and ircd_aton() instead of irc_ssaddr and irc_getaddrinfo(). * ircd/ircd_string.c: Implement new functions: IPv6-capable ircd_ntoa_r(), ircd_aton_ip4(), ircd_aton(). * ircd/match.c: Delete IPv4-only matchcompIP(). Replace with IPv6-capable ipmask_parse() and ipmask_check(). * ircd/numnicks.c: Implement new functions: iptobase64() and base64toip(). * ircd/os_generic: Convert external parameters to be struct irc_addrinfo. When using IPv6 support, sockaddr_in6 is native. Implement new functions os_sendto_nonb(), os_socket() and os_accept(). * ircd/ircd_auth.c, ircd/ircd_parser.y, ircd/ircd_res.c, ircd/listener.c, ircd/m_connect.c, ircd/s_auth.c, ircd/s_bsd.c, ircd/s_conf.c, ircd/s_stats.c, ircd/uping.c: Use struct irc_sockaddr instead of separate in_addr and port fields and new OS support functions. * include/ircd_addrinfo.h, ircd/ircd_getaddrinfo.c, ircd/ircd_getnameinfo.c: Remove, since these functions are no longer used. * ircd/os_bsd.c, ircd/os_linux.c, ircd/os_openbsd.c, ircd/os_solaris.c, ircd/res_adns.c, ircd/res_libresolv.c: Remove, since these are unused and not compatible with IPv6 support. * ircd/Makefile.in: Remove references to ircd_getXxxxinfo.c. Regenerate dependencies. 2004-08-17 Michael Poole * ircd/ircd_lexer.l: Change tokenizer to reduce number of lexer states and be case-insensitive again. 2004-08-15 Michael Poole * aclocal.m4: Check for uintNN_t instead of u_intNN_t, since the former is from C99 (and the latter is absent on Solaris). * configure.in: Remove check for inttypes.h (which is a C99 format string header); replace with check for stdint.h. Add checks for sys/param.h and sys/socket.h. Check for socklen_t being defined (OS X does not set it). Run program tests for lex and yacc, and use them rather than assuming flex and bison. Remove OSDEP_C and mention to adns. Remove check for res_mkquery(). * config.h.in: Update u_intNN_t #undef lines. Add #undef socklen_t so configure test can set it. * configure: Regenerate. * include/ircd_addrinfo.h: #include headers needed for netdb.h and to define struct addrinfo and uintNN_t. * include/ircd_reslib.h: Replace u_intNN_t with uintNN_t. * include/res.h: #include "ircd_addrinfo.h" to get proper type definitions. #define INADDR_NONE if it is not defined (as on Solaris). * ircd/Makefile.in: Replace LEX and YACC definitions. Remove OSDEP_C and OSDEP_SRC; always compile os_generic.c. Remove adns directory from CPPFLAGS. Regenerate dependencies. * ircd/client.c: Return when no propagation set for oper, to squash warning about use of "defaults" before it is set. * ircd/engine_epoll.c: #include correct C99 integer header. * ircd/engine_poll.c: Last argument to getsockopt() should be of socklen_t, not size_t; fix. * ircd/engine_select.c: Squash warning about bzero(). * ircd/ircd_auth.c: OS X does not define in_addr_t, so replace it with uint32_t. We need for that, so include it. * ircd/ircd_getnameinfo.c, ircd/memdebug.c: Replace u_int32_t with uint32_t. * ircd/ircd_lexer.l: Replace flex-isms with portable syntax. There is no portable way to do %option, so remove that. lex on Solaris needs several of its internal tables to be bigger, so increase those sizes. * ircd/ircd_parser.y: Remove the second declarations of two tokens, since standard yacc warns about changing precedence. * ircd/os_generic.c: Make this compile on common OSes (Linux, Solaris, OS X, FreeBSD, OpenBSD). * ircd/table_gen.c: Make arguments to isprint() all unsigned char to squash warnings on Solaris that array index is "char." * ircd/umkpasswd.c: Remove #include since it is not portable, and replace basename() with an equivalent. * ircd/uping.c: Typecast printf arguments for 64-bit OSes. 2004-07-27 Michael Poole * ircd/m_burst.c: Add new netride_modes() function to check which modes could be used in a net.ride. Use this instead of the old check for just +i or +k. (Based on patches by beware and pomac.) 2004-07-25 Michael Poole * ircd/ircd_parser.y: Remove redundant semicolon; it causes errors on some versions of yacc. 2004-07-21 Michael Poole * include/client.h, ircd/ircd_auth.c, ircd/ircd_crypt_smd5.c, ircd/ircd_reslib.c: Fix warnings from gcc -pedantic. 2004-07-21 Michael Poole New DNS resolver code, courtesy of Dianora and the rest of the Hybrid team. (Bugs are of course my fault.) * configure.in, Makefile.in, ircd/Makefile.in: Remove adns and libresolv from the build process. Update dependencies. * configure: Regenerate. * include/client.h: Change connection's DNS reply type. * include/ircd_features.h, ircd/ircd_features.c: New HIS_STATS_a. * include/numeric.h, ircd/s_err.c, ircd/s_stats.c: Add new RPL_STATSALINE and /stats a to list DNS servers. * include/ircd_addrinfo.h, include/ircd_reslib.h, include/res.h, ircd/ircd_getaddrinfo.c, ircd/ircd_getnameinfo.c, ircd/ircd_res.c, ircd/ircd_reslib.c: New resolver files. * ircd/ircd_auth.c, ircd/s_auth.c, ircd/s_bsd.c, ircd/s_conf.c: Update to new resolver callback interface and to only deal with one IP and one name per DNS reply. * ircd/parse.c: Remove /DNS command, since new resolver does not track those statistics. 2004-07-20 Michael Poole * doc/readme.features: Change references to O:, Y:, etc lines into references to the appropriate block types. 2004-07-01 Michael Poole * include/fileio.h: Elaborate on "works for any file descriptor." * include/iauth.h: Remove unused file. 2004-07-01 Michael Poole * include/map.h, ircd/map.c: Remove unused code. * ircd/m_links.c, ircd/m_map.c, ircd/s_misc.c: Remove includes of map.h and a call to map_update(). * ircd/Makefile.in: Remove map.c and regenerate dependencies. * ircd/ircd_parser.y: Recognize Diane Bruce as a copyright holder for the new config parser. * ircd/match.c: Remove pointless pointer dereference (Reed points out that this generates a warning with old gcc). * ircd/s_user.c: Display connection class in CONNEXIT connection notice as a string rather than an integer. * tools/ringlog.c, tools/ringlog.pl: At Kevin's request, remove lines (falsely) identifying ringlog as related to IRC; the files are general purpose. * configure.in, include/ircd_snprintf.h: Add checks for va_copy()-like alternatives and use them if va_copy() is missing. * configure, config.h.in: Regenerate. 2004-02-01 beware * ircd/channel.c: Check bans that look like IP bans against user's hostname just in case they have a host like 1234.domain.tld. 2003-12-18 Timothy Grant Vogelsang * ircd/ircd_log.c, ircd/send.c: va_list is not a scalar type 2004-04-02 Gavin Grieve * ircd/ircd_parser.y: Fix rehash warnings for servername and numeric so they only warn if changed in the config file. 2004-06-30 Michael Poole * doc/readme.iauth, include/ircd_auth.h, ircd/ircd_auth.c: New files. * doc/example.conf: Illustrate IAUTH configuration. * include/client.h: Add fields to record IAUTH status. * ircd/Makefile.in: Add ircd_auth.c to Makefile. * ircd/ircd_lexer.l, ircd/ircd_parser.y: Add new IAUTH section. * ircd/s_conf.c: Notify IAUTH code when reloading a configuration so that an obsolete connection can be abandoned. * ircd/s_misc.c: Report client exits via IAUTH. * ircd/s_user.c: If IAUTH is active and a connecting user has not been checked against it, interrogate the IAUTH server. 2004-06-25 Michael Poole * configure.in: Check for crypt.h as well. * configure: Regenerate. * ircd/ircd_crypt_native.c: Move XOPEN defines earlier so they affect the first includes of system headers. Include crypt.h if it is available. * ircd/umkpasswd.c: Quash a gcc warning. 2004-06-23 Michael Poole * doc/Authors: Add contributors to ircu2.10.11 and myself. * ircd/gline.c: Fix buglet in my forward port of Alex Badea's fix. * configure.in: Add missing check for inttypes.h; remove obsolete display of Head-in-sand, add display of epoll() engine. * INSTALL, INSTALL_FR, doc/readme.cvs: Update descriptions of how to use SourceForge's CVS server, from the u2.10.11 branch. 2003-11-09 beware * ircd/s_user.c: move assigning a numeric to a local client from when nick is set, to when connection becomes client, to not waste numerics. 2004-06-08 Kevin L Mitchell * ircd/parse.c: don't let rank-and-file users escape HIS limitations with /jupe... 2004-06-18 Alex Badea * ircd/gline.c (gline_lookup): only return a gline if it's active * ircd/s_conf.c (find_kill): don't check for active gline, since gline_lookup does now 2002-11-11 hikari * ircd/ircd.c: added call to irc_crypt_init() - someone hurry up and modularise :P * ircd/ircd_xopen.c: removed, superseded by new crypto system. * ircd/ircd_crypt.c: wrote scary ircd_crypt() interface function, wrote ircd_crypt_mech_register() function, various other bits designed to create a near-pluggable crypto system for ircu. currently this code also loads the various mechanisms i've written code for. * ircd/ircd_crypt_smd5.c: imported the crypt_md5 function from elsewhere, manipulated to suit ircu, returns a salted MD5 password. * ircd/ircd_crypt_native.c: replaces the old ircd_xopen.c file, generate a crypted password using the systems native crypt() function. * ircd/ircd_crypt_plain.c: plain text crypt mechanism, should really only be used for testing purposes. * ircd/ircd_md5.c: main gubbins of the MD5 hashing code, lifted from elsewhere, ircuified. * ircd/umkpasswd.c: mkpasswd program for ircu. * include/ircd_xopen.h: removed, superseded by new crypto system. * include/ircd_crypt.h: external definitions for the new ircd_crypt() function and definition of the ircd_crypt_mech structure for containing crypto mechanism data. * include/ircd_crypt_smd5.h: sundary definitions for the salted MD5 mechanism. * include/ircd_crypt_native.h: sundary definitions for the native crypt() mechanism. * include/ircd_crypt_plain.h: sundary definitions for the plain text mechanism. * include/umkpasswd.h: fluff for umkpasswd. 2003-03-11 Landon Fuller (landonf) * configure.in: allow ircu to build on OS X. 2004-05-24 Michael Poole * ircd/m_invite.c (m_invite): Include channel name in invitation announcements. (ms_invite): Likewise, and also fix a use-before-assignment bug in them. 2004-05-18 Michael Poole Announce invitations to other channel operators. * include/ircd_features.h, ircd/ircd_features.c (ANNOUNCE_INVITES): Add new boolean feature, default off. * include/numeric.h, ircd/s_err.c (RPL_ISSUEDINVITE): Add new reply. * include/send.h, ircd/send.c (sendcmdto_channel_butserv_butone): Add 'skip' parameter that is needed elsewhere. (sendcmdto_channel_servers_butone): New function. * ircd/channel.c, ircd/m_burst.c, ircd/m_kick.c, ircd/m_topic.c, ircd/s_user.c: Add argument for 'skip' to calls to s_c_b_b. * ircd/m_invite.c (m_invite, ms_invite): If ANNOUNCE_INVITES, send the INVITE message to all interested servers, and send a numeric to all local chanops. 2004-05-18 Michael Poole * ircd/res_adns.c (res_ourserver): Remove unused function. (validate_name): Likewise. 2004-05-17 Michael Poole * include/ircd_features.h, ircd/ircd_features.c, ircd/s_debug.c: Rip out feature settings related to oper privileges. * include/client.h: Comment a few unexplained privileges. * ircd/ircd_lexer.l: Rename privilege keywords to match their names in code and /PRIVS output. Add support for two "new" privileges (FORCE_OPMODE, FORCE_LOCAL_OPMODE). * include/class.h, ircd/client.c, ircd/ircd_parser.y, ircd/m_oper.c: Replace the removed feature settings with per-connection class operator privileges. * doc/example.conf: Document the change. * ircd/ircd_parser.y (portblock): Fix slight memory leak. 2004-05-16 Michael Poole * doc/example.conf: Make this show the new NICKLEN default. 2004-05-14 Kevin L Mitchell * ircd/ircd_features.c: per CFV-0243, NICKLEN default is increased to 12 2004-05-14 Kevin L Mitchell * ircd/s_user.c: process account creation timestamp if present in user mode portion of a N protocol message; add account creation timestamp to outgoing N protocol messages if that timestamp is non-zero * ircd/m_account.c: process account creation timestamp if present in AC protocol message * include/struct.h: add account creation timestamp 2004-05-16 Michael Poole * doc/example.conf: Document operator privilege settings. 2004-05-16 Michael Poole Get rid of CONF_LOCOP; use PRIV_PROPAGATE instead. * ircd/ircd_parser.y (invert): New variable. (operlocal): Remove production. (operpriv): Use "invert" variable. (privtype): Add LOCAL alternative production. * ircd/m_oper.c (m_oper): Remove references to CONF_LOCOP; replace with CONF_OPERATOR or PRIV_PROPAGATE checks, as appropriate. * ircd/s_conf.c (AuthorizationCheckResult, find_conf_exact): Likewise. * ircd/s_stats.c (report_array, statsinfo): Likewise. * ircd/s_user.c (set_user_mode): Likewise. 2004-05-15 Michael Poole * patches/diffs/astralnet.diff, patches/diffs/nocfv.diff: Remove patches obsoleted by F: lines. * patches/diffs/topicburst.diff: Remove patch that was integrated into the main code. 2004-05-15 Isomer [Original ChangeLog date: 2003-11-05 -MDP] * ircd/m_whois.c: On remote whois, show +s local channels with a * prefix to opers. 2004-05-15 Michael Poole * include/gline.h, ircd/gline.c, ircd/s_err.c: Forward port a lot of gline-related fixes from 2.10.11. Things that work are due to Kev, Isomer, Spike, hikari, and probably others; CVS makes it hard to figure out who did what. Any mistakes are mine. 2004-05-15 Isomer [Original ChangeLog date: 2003-11-05 -MDP] * ircd/s_misc.c, ircd/s_user.c: added numnick to SNO_CONNEXIT messages (so you can match EXIT's to CONN's) 2004-05-15 Reed Loden [Original ChangeLog date: 2003-05-01 -MDP] * ircd/s_err.c: Added network to text and edited 001 a bit. * ircd/s_user.c: Send network with 001. 2004-05-15 Michael Poole * ircd/s_user.c (add_target): Move free target invite check... * ircd/s_user.c (check_target_limit): to here, matching 2.10.11's behavior. 2004-05-15 Isomer [Original ChangeLog date: 2003-11-23 -MDP] * ircd/s_user.c: Don't credit users with an extra attempt if they are klined/glined, throttle them! 2004-05-15 Jeekay [Original ChangeLog date: 2003-04-24 -MDP] * ircd/s_user.c: Altered (K-lined) to depend on find_kill type 2004-05-15 splidge [Original ChangeLog date: 2003-09-03 -MDP] * ircd/s_user.c: Made hide_hostmask() not show bogus joins for channels where the user is a zombie. 2004-05-15 beware [Original ChangeLog date: 2003-10-25 -MDP] * ircd/m_whois.c: Fixed /whois comma separated list with wildcards cpu hog bug 2004-05-15 Michael Poole * ircd/s_conf.c (rehash): Call clear_quarantines on rehash since 2.10.11 does. Show ident and IP for clients being killed by new G-lines and K-lines. 2004-05-15 hikari [Original ChangeLog date: 2003-06-27 -MDP] * ircd/ircd.c: After thought, update the next check time based on when an unregistered client should expire. 2004-05-15 hikari [Original ChangeLog date: 2003-06-22 -MDP] * ircd/ircd.c: Fixed check_pings() - shouldn't be any problem with clients not being able to connect anymore. 2004-05-15 Michael Poole * ircd/channel.c (can_join): Revert to using IsInvited() rather than walking the list directly. (modebuf_flush_int): Fix errant HEAD_IN_SAND_SNOTICES check to use feature_bool(FEAT_HIS_SNOTICES) instead. 2004-05-15 Kevin L Mitchell [Original ChangeLog date: 2004-01-31 -MDP] * ircd/channel.c (mode_parse_key): don't allow , in keys! 2003-04-12 David Mansell (splidge) [Original ChangeLog date: 2003-04-14 -MDP] * ircd/channel.c: When keys and limits conflict on burst, the key which is first alphabetically or the limit which is lower will be used by both servers. This matches pre-2.10.11 behaviour. Closes: (#713930) 2004-05-15 David Mansell [Original ChangeLog date: 2002-12-28 -MDP] * ircd/channel.c (mode_parse_limit): don't allow -l when no limit is set, don't allow -l with negative parameter (or unsigned >2^31). 2004-05-15 David Mansell [Original ChangeLog date: 2002-12-31 -MDP] * ircd/m_burst.c (ms_burst): when kicking net riders, clear invites too. 2004-05-15 Isomer [Original ChangeLog date: 2003-11-04 -MDP] * ircd/s_serv.c: Burst glines/jupes early 2004-05-15 volta [Original ChangeLog date: 2003-04-26 -MDP] * ircd/m_userip.c, ircd/m_userhost.c: Small fix, that allows users to see their own ip & hostname. (Should solve all problems with dcc) 2004-05-15 Kevin L Mitchell [Original ChangeLog date: 2003-06-13 -MDP] * ircd/m_settime.c: it's supposed to be %ld, not %l 2004-05-15 Isomer [Original ChangeLog date: 2004-03-20 -MDP] * ircd/m_invite.c: Disallow invites to non existant channels 2004-05-15 David Mansell [Original ChangeLog date: 2003-04-26 -MDP] * ircd/m_invite.c: let +k users invite into channels they aren't on. 2004-05-15 hikari [Original ChangeLog date: 2003-07-13 -MDP] * ircd/IPcheck.c: Fixed (another) overflow problem in ip_registry_check_local() [Original ChangeLog date: 2003-06-29 -MDP] * ircd/IPcheck.c: Fixed overflow problem in ip_registry_connect_fail() 2004-05-15 Isomer [Original ChangeLog date: 2003-05-02 -MDP] * ircd/IPcheck.c: Added assert()'s to check for underflow 2004-05-15 Kevin L Mitchell [Original ChangeLog date: 2003-11-22 -MDP] * tools/wrapper.c: commit uid on chroot fix from ubra * ircd/version.c.SH: fix generation generation 2004-05-15 Isomer [Original ChangeLog date: 2003-11-23 -MDP] * ircd/os_*.c, ircd/ircd_features.c: Default changing window sizes to off. if an admin is smart enough to understand these features they can enable them manually. 2004-05-15 splidge [Original ChangeLog date: 2003-03-26 -MDP] * ircd/include/ircd_features.h, include/ircd_osdep.h, ircd/ircd_features.c, ircd/listener.c, ircd/os_bsd.c, ircd/os_generic.c, ircd/os_linux.c, ircd/os_openbsd.c ircd/os_solaris.c, ircd/s_bsd.c: Patch to allow socket bufs to be altered via F: lines 2004-05-15 Isomer [Original ChangeLog date: 2003-11-18 -MDP] * ircd/s_auth.c, ircd/res_libresolv.c, ircd/res_adns.c: Clean up the preregistration subsystem allowing customisation of timers, make the dns resolver stats oper only, and make it much more clear what all the numbers are. 2004-05-15 Spike [Original ChangeLog date: 2003-11-23 -MDP] * ircd/IPcheck.c: Make IPcheck constants configurable 2004-05-14 Kevin L Mitchell [Original ChangeLog date: 2003-11-22 -MDP] * ircd/m_nick.c (m_nick): truncate the nickname to the minimum of the maximum allowed length (NICKLEN) or the allowed nickname length specified as the NICKLEN feature * ircd/ircd_features.c: declare NICKLEN and set its default value to 9 * include/supported.h: add MAXNICKLEN to ISUPPORT and do a little rearranging... * include/ircd_features.h: add NICKLEN feature * include/ircd_defs.h (NICKLEN): raise max NICKLEN to 15 * doc/readme.features: document new NICKLEN feature * doc/example.conf: list new NICKLEN F-line 2004-05-14 Matthias Crauwels [Original ChangeLog date: 2003-06-08 -MDP] * ircd/gline.c: fixed the counting bug in gline_memory_count * ircd/jupe.c: fixed the counting bug in jupe_memory_count 2004-05-14 Michael Poole * ircd/m_mode.c (ms_mode): Do not always try to call set_user_mode() when parv[1] is a channel name. 2004-05-10 Michael Poole Implement a per-connection-class default usermode option. * doc/example.conf: Illustrate how to use the option. * include/class.h (struct ConnectionClass): New "default_umode" field. (ConfUmode): New macro. * include/client.h (client_get_default_umode): New function. * ircd/client.c (client_get_default_umode): Implement it. * ircd/ircd_lexer.l (usermode): New token. * ircd/ircd_parser.y (classblock, etc): New syntax. * ircd/s_user.c (register_user): Set default user modes for user. This sends the new mode to the user, so the explicit send later is no longer necessary. 2004-05-10 Michael Poole Forward port of asuka-topicburst.patch from Quakenet's "Asuka" patch set. * include/ircd_features.h (FEAT_TOPIC_BURST): Add new feature. * ircd/channel.c (send_channel_modes): If F:TOPIC_BURST:TRUE, also send a TOPIC to the peer. * ircd/ircd_features.c (FEAT_TOPIC_BURST): Add new boolean feature, defaulting to FALSE. * ircd/m_topic.c (do_settopic): Add argument for topic timestamp, and allow F:HIS_BANWHO to hide the originator of the topic. (ms_topic): Parse optional timestamp arguments to TOPIC, and use them to decide whether to ignore the topic. 2004-05-10 Michael Poole Forward port of delayed-join.patch from Quakenet's "Asuka" patch set (which was a port of code I wrote for the other ircu). * include/channel.h (CHFL_DELAYED): New membership flag. (MODE_DELJOINS, MODE_WASDELJOINS): New channel modes. (infochanmodes): Add +D to list of supported channel modes. (IsDelayedJoin, SetDelayedJoin, ClearDelayedJoin): New macros. (member_can_send_to_channel, client_can_send_to_channel): Add "reveal" parameter to indicate whether a request should cause a join-delayed user to become visible. (RevealDelayedJoin, CheckDelayedJoins): New functions. * include/numeric.h (RPL_DELNAMREPLY): New numeric. * include/s_user.h (NAMES_DEL): New flag for do_names(). * include/supported.h (FEATURESVALUES2): Add +D to list of supported channel modes. * ircd/channel.c (remove_member_from_channel, member_can_send_to_channel, client_can_send_to_channel, joinbuf_join): Handle join-delayed users. (channel_modes, modebuf_flush_int, modebuf_mode, modebuf_flush, modebuf_extract, mode_process_clients, mode_parse_mode, mode_parse): Handle delayed-join channels. (RevealDelayedJoin, CheckDelayedJoins): New functions. * ircd/ircd_relay.c (relay_channel_message, relay_channel_notice, server_relay_channel_message, server_relay_channel_notice): Add argument for "reveal" parameter to client_can_send_to_channel(). * ircd/m_burst.c (ms_burst): Support MODE_DELJOINS channels. * ircd/m_clearmode.c (do_clearmode): Support clearing mode +D. * ircd/m_join.c (join0): Pass the CHFL_DELAYED flag when parting a channel with JOIN 0. * ircd/m_kick.c (m_kick): For join-delayed members, only send the KICK to the kicker and kickee. Then check whether +d can be removed. * ircd/m_names.c (do_names): Show join-delayed users if and only if the NAMES_DEL flag is given. If NAMES_DEL is given, also use RPL_DELNAMREPLY instead of RPL_NAMREPLY. (m_names): If NAMES -D, pass NAMES_DEL to do_names(). * ircd/m_part.c (m_part, ms_part): Add "reveal" argument for member_can_send_to_channel(). Set CHFL_DELAYED join in joinbuf if the user is join-delayed. * ircd/m_quit.c (m_quit): Handle join-delayed users and new argument for member_can_send_to_channel(). * ircd/m_topic.c (do_settopic): If a join-delayed channel member changes the topic, reveal the member. * ircd/m_wallchops.c (m_wallchops, ms_wallchops): Add argument for "reveal" parameter to client_can_send_to_channel(). * ircd/m_wallvoices.c (m_wallvoices, ms_wallvoices): Likewise. * ircd/m_who.c (m_who): Skip join-delayed members where we skip zombies. * ircd/m_whois.c (do_whois): Use '<' as a prefix for join-delayed users. Use slightly more efficient macros rather than function calls to test for ops and voice. * ircd/s_err.c (RPL_DELNAMREPLY): New numeric response string. * ircd/s_user.c (hide_hostmask): For users with no modes in a join-delayed channel, do not send JOIN to other members after the QUIT :Registered. * ircd/send.c (sendcmdto_common_channels_butone): Skip join-delayed users where we skip zombies. 2004-05-10 Michael Poole * ircd/ircd_events.c: Actually reference and try to use the epoll event engine. Omitted from yesterday's commit. 2004-05-09 Michael Poole Forward port of Paul "Zoot" Chang's pseudo-command.patch and pseudo-support.patch. * doc/example.conf: Illustrate how to use the feature. * include/handlers.h (m_pseudo): Declare new handler function. * include/ircd_features.h (HIS_STATS_R): Add a feature to control user visibility of the pseudo-commands. * include/msg.h: Add flag and field for the extra information used to select a pseudo-command's target. * include/numeric.h (RPL_STATSRLINE, ERR_SERVICESDOWN): Add definitions. * include/parse.h (register_mapping, unregister_mapping): Declare. * include/s_conf.h (struct nick_host, struct s_map, GlobalServiceMapList): Define. * ircd/Makefile.in: Add m_pseudo.c to IRCD_SRC. Add generated files to "make depend" dependency list. Update dependencies. * ircd/ircd_features.c (HIS_STATS_R): Define feature type and default value. * ircd/ircd_lexer.l (pseudo, prepend): Recognize new tokens. * ircd/ircd_parser.y: Support "Pseudo" configuration blocks. * ircd/parse.c (msgtab): Add initializer for field "extra" to all commands. (msg_tree_insert, msg_tree_remove, register_mapping, unregister_mapping): New functions. (parse_client): Implement MFLG_EXTRA extra argument passing. * ircd/s_conf.c (GlobalServiceMapList): New variable. * ircd/s_err.c (RPL_STATRLINE, ERR_SERVICESDOWN): Add format strings for new numeric responses. * ircd/s_stats.c (stats_mapping): New function. (statsinfo): Add entry for /stats R and make old /stats r entry case-sensitive. 2004-05-09 Michael Poole * ircd/ircd_parser.y (parse_error): Convert to being a wrapper for yyerror() so that configuration errors all go to the same place. * ircd/s_conf.c: New variables conf_error and conf_already_read. conf_error is cleared by read_configuration_file() and set by yyerror(); conf_already_read is set by read_configuration_file() and never cleared. Make yyerror() display error to stderr before conf_already_read is set. Make configuration errors a fatal condition in init_conf(). 2004-05-09 Michael Poole * ircd/Makefile.in: Pass the source directory as an argument to version.c.SH so it knows where to find the source files for an out-of-srcdir build. * ircd/version.c.SH: Use that information. 2004-05-09 Michael Poole * Makefile.in: Ensure ${prefix}/include exists, since the adns install puts files in that directory. (The adns Makefile does not use configure's ${includedir}.) 2004-05-09 Michael Poole * doc/readme.features: The logic for F:AUTOHIDE was removed, but not its documentation. Fix that omission. * include/ircd_features.h, ircd/ircd_features.c: Remove the unused definitions for FEATURE_AUTOHIDE. 2004-05-09 Michael Poole * doc/readme.who: Document the support for account matching and display in the WHO command. 2004-05-09 Michael Poole * ircd/ircd.c (main): Move check_pid() call until after we read the configuration file so that F:PPATH works correctly. 2004-05-09 Michael Poole * ircd/match.c (match): Use ToLower() instead of tolower() for character comparisons. 2004-05-09 Michael Poole * ircd/s_user.c (register_user): Initialize "flag" (user's old modes) passed to send_umode() so that the real set of modes are sent to the user. 2004-05-09 Michael Poole * ircd/m_server.c (ms_server): Apply +h/+s flags only to the new server, not to a hub between us and the new server. * ircd/ircd_relay.c (relay_directed_message): Check FLAG_SERVICE on target server rather than FLAG_CHSERV (so that directed messages work at all). 2004-05-09 Michael Poole * configure.in: Add checks for epoll_* system call family. * configure: Regenerate. * ircd/engine_epoll.c: New file; forward ported from 2.10.11 branch. 2004-05-09 Michael Poole * include/ircd_alloc.h: Add definitions for MyRealloc, since they are needed by kqueue and epoll event engines; kill #if 0'd block. * include/memdebug.h: Declare dbg_realloc() helper function. * ircd/ircd_alloc.c: Implement DoRealloc() helper function. * ircd/memdebug.c: Implement dbg_realloc() helper function. 2004-05-09 Michael Poole * ircd/channel.c (find_no_nickchange_channel): Disallow nick changes on a moderated channel with neither ops nor voice. * ircd/s_err.c: Update ERR_BANNICKCHANGE message to match. 2004-01-20 Perry Lorier * ircd/ircd_parser.y: Fixed parser to work with a more modern bison 2004-01-21 Gavin Grieve * ircd/channel.c, include/channel.h: bring forward the IsUserParting() code to resolve the multiple part messages bug written by Entrope. 2003-08-12 Timothy Vogelsang * ircd/match.c: (match) rewrote function based on existing code from the hybrid ircd -- death to goto 2003-07-07 Bas Steendijk * ircd/s_user.c: invalidate ban cache for user on host hiding/account 2003-07-04 Bas Steendijk * include/client.h, ircd/m_userhost.c, ircd/m_userip.c, ircd/m_who.c, ircd/m_whois.c, ircd/whocmds.c: the same code, for "can user A see user B is an oper", appeared in a lot of places. made it a define SeeOper. 2003-07-04 Bas Steendijk * ircd/s_user.c: umode_str (user modes in N token) internal flags var was not initialized to the user's flags, returned a string with random modes set. 2003-07-01 Bas Steendijk * ircd/m_names.c: length counter being incremented one too many for each nick, resulting names reply messages are about 50 chars shorter than possible. fixed. 2003-06-29 Bas Steendijk * ircd/channel.c: don't ever send mode changes for local channels to servers. 2003-06-27 Bas Steendijk * include/channel.h, include/client.h, ircd/s_user.c, ircd/s_err.c: moved the supported channel/user mode strings of the 004 reply from s_err.c to the header files where the channels/user modes are defined, and show or hide +Au based on OPLEVELS setting. 2003-06-25 Bas Steendijk * ircd/m_burst.c: Clear topic set by netrider on burst. 2003-08-05 Diane Bruce * ircd/parse.c: Fixed the typo the fix of the typo created 2003-08-01 Diane Bruce * ircd/parse.c: Fixed typo 2003-06-22 Diane Bruce * ircd/parse.c: Completely rewritten June 2, 2003 - Dianora 2003-06-22 Bas Steendijk * include/ircd_features.h, include/supported.h, ircd/ircd_features.c, ircd/ircd_features.c, ircu2.10/ircd/m_join.c, doc/example.conf: Make ability to create local channels a feature which can be disabled. 2003-06-22 Bas Steendijk * include/ircd_features.h, ircd/channel.c, ircd/ircd_features.c, ircd/m_kick.c, doc/example.conf: Added OPLEVELS feature, which makes it possible to disable the +Au/oplevels functions. 2003-06-17 Alex Badea * ircd/res_adns.c: included sys/types.h, for non-Linux headers 2003-03-06 Kevin L. Mitchell * libs/dbprim: database primitives library, including flexible linked lists, auto-resizing hash tables, and sparse matrices. Has a test suite for everything but portions of the sparse matrix routines (I'm lazy; someone help me write them!). Documentation generated by doxygen--feel free to critique, suggest phrasing improvements, etc. 2003-01-22 Kevin L. Mitchell * libs: put third-party libraries in this subdirectory. Started by copying adns into it--will fix the rest and remove the top-level copy later. 2003-01-14 Andrew Miller * ircd/m_settime.c: Fixed a minor format string issue. 2003-01-12 Thomas Helvey * adns/src/check.c, adns/src/transmit.c, ircd/m_opmode.c, ircd/motd.c, ircd/s_user.c: Cleanup warnings, fix precedence bugs in transmit.c and m_opmode.c. 2003-01-12 Thomas Helvey * include/class.h, include/ircd_string.h, ircd/class.c, ircd/gline.c, ircd_string.c: Fix undefined order of evaluation bug in gline.c, add general purpose hasher for conf entries. 2003-01-11 Thomas Helvey * include/channel.h, include/ircd_alloc.h, ircd/channel.c, ircd/client.c, ircd/gline.c, ircd/ircd_alloc.c, ircd/ircd_events.c, ircd/ircd_log.c, ircd/ircd_parser.y, ircd/ircd_snprintf.c, ircd/listener.c, ircd/m_nick.c, ircd/m_opmode.c, ircd/m_whois.c, ircd/motd.c, ircd/s_auth.c, ircd/s_bsd.c, ircd/uping.c: Server compiles with g++ again, type safety, const correctness fixes, remove C++ keywords again :/ 2003-01-11 Thomas Helvey * ircd/client.c, ircd/ircd_feature.c: Bugfix, the feature table data was in a different order than the feature data structure, which resulted in a wild index being used in feature_bool. The feature_bool function didn't check it's index before indexing the features array resulting in a core dump on /oper. 2003-01-10 Thomas Helvey * include/client.h, include/res.h, include/s_bsd.h, ircd/ircd.c, ircd/list.c ircd/m_connect.c, ircd/res_adns.c, ircd/res_libresolv.c, ircd/s_auth.c, ircd/s_bsd.c, ircd/s_conf.c: Remove resolver cache wart, change hostent representation, cleanup resolver clients. 2003-01-10 Thomas Helvey * ircd/map.c, ircd/Makefile.in, include/map.h: Remove HEAD_IN_SAND macros to get server to build, rebuild dependencies. 2003-01-08 Fredrik Soderblom * ircd/s_err.c, ircd/s_user.c (hide_hostmask): Simplify RPL_HOSTHIDDEN and the use of it. 2003-01-07 Kevin L Mitchell * BUGS: removed from distribution * ChangeLog.07: moved into doc/history * ChangeLog.10: moved into doc/history * INSTALL: pulled up from u2.10.11.04 * README: pulled up from u2.10.11.04 * README.FreeBSD: pulled up from u2.10.11.04 * README.Solaris: pulled up from u2.10.11.04 * RELEASE.NOTES: add sysctl note from u2.10.11.04 * TODO: removed from distribution * configure.in: add extra check for res_mkquery; remove --disable-headinsand since it no longer has any effect; pull up "Enable" vs. "Disable" changes from u2.10.11.04 * doc/readme.asll: pulled up from u2.10.11.04 * doc/readme.features: pull up missing documentation, including a couple of corrections * doc/readme.log: correct text to read FACILITY instead of SYSLOG in the documentation for configuring syslog facility * include/channel.h: declare IsInvited() * include/handlers.h: do some minor reorderings * include/ircd_defs.h: remove deprecated NETWORK and URL_CLIENTS #define's * include/ircd_policy.h: removed from the distribution * include/jupe.h: declare jupe_memory_count() * include/msgq.h: remove MsgCounts structure * include/numeric.h: add a blank line after RPL_STATSQLINE; add RPL_HOSTHIDDEN * include/s_stats.h: include ircd_features.h for definition of the enum; remove extraneous declarations * ircd/Makefile.in: add LDFLAGS to table_gen * ircd/engine_poll.c: remove commented-out assertion * ircd/ircd.c: include s_stats.h and call stats_init() * ircd/ircd_features.c: feature names have to be case-sensitive because of some of the HIS features * ircd/ircd_relay.c: reorder includes * ircd/m_account.c: include string.h for strlen() * ircd/m_clearmode.c: remove extraneous clean_channelname(); make sure to refer to chname, not parv[1] * ircd/m_create.c: remove the broken code that squits servers that are >5 minutes fast; fix "badop || CHFL_CHANOP" bug that caused op desyncs * ircd/m_gline.c: if it's a server, force the gline; don't gline_find() before determining if the oper had the privilege * ircd/m_kick.c: kicks by servers should appear to be from the local server thanks to HIS * ircd/m_lusers.c: needs ircd_features.h, not ircd_policy.h * ircd/m_map.c: needs ircd_features.h, not ircd_policy.h * ircd/m_nick.c: added an assertion and some explanatory comments pulled up from u2.10.11.04 * ircd/m_opmode.c: no longer requiring oper to be on the channel; search for quarantines before allowing ops * ircd/m_privmsg.c: one character typo that probably means nothing * ircd/m_settime.c: add back comments I left in the code * ircd/m_squit.c: remove protocol_violation() notices * ircd/m_userhost.c: return realhost if user is an oper * ircd/m_wallvoices.c: only m_wallvoices() should add a + * ircd/m_who.c: add handling for the 'a' field * ircd/m_whois.c: correct a typo of FEAT_HIS_SERVERNAME for FEAT_HIS_SERVERINFO * ircd/s_bsd.c: close file descriptors 0, 1, and 2; pull up some ancient bug fixes from the u2.10.11 branch * ircd/s_debug.c: include gline.h, jupe.h, motd.h, and s_stats.h; call motd_memory_count(), gline_memory_count(), and jupe_memory_count() when reporting memory usage; add back a comment regarding "DBuf caveats" * ircd/s_err.c: add RPL_STATSQLINE, RPL_HOSTHIDDEN, and pull up change to ERR_NOPRIVILEGES wording * ircd/s_misc.c: include ircd_features.h and not ircd_policy.h * ircd/s_stats.c: count from 0 and not 1 when initializing the stats * ircd/s_user.c: comment out assertion; remove extraneous definition of FLAGS_HOST_HIDDEN; add in hikari's "your host is now hidden" reply; don't detach oper confs unless sptr is not an oper * ircd/table_gen.c: pull up change to NTL_CHPFX (removing +); change channel name character range to be from '\041' (!) to UCHAR_MAX * ircd/whocmds.c: pull up fix to /who idle time from u2.10.11.04 * tools/linesync/linesync.conf: pull up from u2.10.11.04 * tools/linesync/linesync.sh: pull up from u2.10.11.04 2003-01-07 Andrew Miller * almost everything: Forward ported numerous changes from .11 to .12 2002-07-05 Andrew Miller * ircd/packet.c(connect_dopacket): Pass the job on to server_dopacket when they become a server. * ircd/s_bsd.c(read_packet): Check they are now a server *after* the packet is sent. * ircd/class.c(make_class): Fixed an assert to be more useful. 2002-07-05 Andrew Miller * ircd/packet.c * ircd/packet.h: (connect_dopacket): Made a dopacket function for connecting links which sends the messages through the correct message handler. * ircd/s_bsd.c(read_packet): Put packets through the correct handler for connecting links. Properly handle unknown links becoming connecting or servers. 2002-07-01 Andrew Miller * include/ircd_alloc.h (MyFree): Accept NULL pointers to do nothing with, this is used quite a lot. * ircd/class.c (make_class): Initialise the ref_count to 1 so that we don't leak. * ircd/class.c (add_class): When updating a class, free the old name first to prevent leakage. * ircd/class.c (class_delete_marked): Decrement the ref_count for the class after it is removed from the linked list. * ircd/ircd_parser.y: Changed a free to MyFree(). * ircd/ircd_parser.y: Removed a few debugging messages. 2002-07-01 Andrew Miller * s_bsd.c (read_packet): Our daily addition to the list of entities to treat as servers - Connecting servers. 2002-07-01 Andrew Miller * doc/debug_memleak_gc.patch, * include/ircd_ircd_alloc.h, * include/memdebug.h, * configure.in, * ircd/Makefile.in, * ircd/memdebug.c: added a Boehm's gc based leak detector to find leaks and notify the operators. 2002-06-29 Andrew Miller * ircd/s_bsd.c (read_packet): don't make handshaking servers go through the dbufs. 2002-06-18 Andrew Miller * ircd/s_bsd.c (read_packet): don't allow unregistered clients to flood the server. 2002-06-18 Alex Badea * ircd/m_burst.c (ms_burst): kick local members if the channel has a larger local TS and it's +i or +k remotely (anti net.ride) * ircd/ircd_parser.y: fixed a bug that broke IP-based C:lines * ircd/s_err.c: connection classes are now strings (RPL_STATSCLINE) * include/s_conf.h: externalized lookup_confhost * adns/Makefile.in: compilation-outside-source-tree fix 2002-06-17 Alex Badea * adns/*: added a slightly hacked copy of adns * configure.in: added a --disable-adns switch if you want to use the old libresolv res.c * configure: ran autoconf * ircd/res_libresolv.c: renamed from res.c * ircd/res_adns.c: added adns resolver 2002-06-17 Alex Badea * ircd/ircd_parser.y: fixed 'Connect' block processing so now you can actually connect to other servers 2002-06-04 Alex Badea * ircd/m_stats.c (report_servers_verbose): oops, fixed it so it displays all servers, not just local connects 2002-05-30 Jean-Edouard Babin * ircd/m_server.c (mr_server): fixed core bug on insufficient arguments 2002-05-26 Jeekay * ircd/m_join.c (HasControlChars): fixed unsigned vs signed 2002-05-26 Jeekay * ircd/m_join.c (m_join,HasControlChars): check if a channel name has any control chars (<=32) in it before allowing a local user to join. 2002-21-05 Andrew Miller * ircd/ircd_relay.c: stop an information leak about the the network topography from relayed messages. 2002-04-19 Alex Badea * ircd/m_who.c (m_who): disallow non-opers to /who server.name 2002-04-18 Alex Badea * ircd/s_err.c (RPL_STATSILINE): connection classes are now strings 2002-04-17 beware * m_whois.c (m_whois): disallow remote queries for non-existent local users when originated by a non-oper 2002-04-16 Alex Badea * ircd/s_user.c (hunt_server_cmd): also send a "no such server" reply if the servername contains a '*' and it doesn't exist * include/patchlevel.h (PATCHLEVEL): bump patchlevel 2002-04-16 beware * ircd/m_whois.c: the previous patch broke whois, fixed it another way * ircd/m_admin.c: cleaned up m_admin too while we're here, hunt_server_cmd can do all the work for us 2002-04-15 Alex Badea * ircd/m_stats.c: added verbose server reporting (/stats v or /stats V for machine-readable format) (bugzilla bug 52) * include/numeric.h: added RPL_STATSVERBOSE 236 * ircd/s_err.c: added RPL_STATSVERBOSE * ircd/s_stats.c: added help for stats 'v' 2002-04-15 Alex Badea * ircd/class.c (get_client_class): fixed typo which caused /trace (and perhaps motd) to core 2002-04-15 beware * ircd/m_whois.c: Fixed /whois servermask nomatch bug where normal users could use the function to discover servers, also the NOSUCHSERVER check code was missing. 2002-04-14 Alex Badea * ircd/ircd_parser.y: fixed cli_info(&me) not being set from 'description' conf 2002-04-13 Stephane Thiell * ircd/m_whois.c: removed FindUser() in ms_whois to fix remote whois relaying. * ircd/class.c: removed unused (and duplicated) code get_client_ping(). * include/class.h: removed unused function prototype. * config.guess: upgraded with latest * config.sub: upgraded with latest 2002-04-12 Alex Badea * ircd-patch: report which files failed the dry run (so the user may force the patch if the rejects are in less-than-vital files, such as ChangeLog or documentation) 2002-04-12 Alex Badea * ircd/m_invite.c: don't propagate invites for local channels * include/patchlevel.h (PATCHLEVEL): bump patchlevel 2002-04-10 Joseph Bongaarts * ircd/ircd.c: The last fix broke autoconnects completely. Fixed it another way. 2002-04-09 Brian Cline * ircd/ircd.c (try_connections): To avoid problems with infinite event loops, don't try connecting to servers whose connect frequency is 0. 2002-04-10 Alex Badea * ircd/ircd_parser.y: fixed a "features" block parse bug * tools/convert-conf.py: added a configuration file converter from 2.10.11 to 2.10.12 format * ircd-patch: added GPL information to top of file 2002-04-09 Alex Badea * configure.in: added a human-readable report of configured options at the end of the configure process * configure: regenerated with autoconf 2002-04-08 Gavin Grieve * include/supported.h: change CHARSET to CASEMAPPING after discussions as to what would be the preferred name. 2002-04-05 Andrew Miller * ircd/s_conf.c, ircd_parser.y, ircd_lexer.l: Add privilege specification. * Fix a minor parser bug that meant rehash didn't always work correctly. 2002-04-03 Alex Badea * include/channel.h: fix compiler warnings (paratheses around &&) * ircd/channel.c (modebuf_extract): fix compiler warnings (uninitialized variables) * ircd/Makefile.in: make ircd properly compile outside the source tree 2002-04-03 Alex Badea * include/s_user.h: added a sptr parameter to InfoFormatter function type * ircd/m_who.c: don't match IPs for clients which have a hidden host, except when the inquiring user is an oper * ircd/whocmds.c: show the fake IP from FEAT_HIDDEN_IP if the target has a hidden host, but show real IP to opers * ircd/m_userip.c (userip_formatter): add sptr parameter; show the fake IP from FEAT_HIDDEN_IP if the target has a hidden host, but show real IP to opers * ircd/m_userhost.c (userhost_formatter): add (unused) sptr parameter * ircd/s_user.c (send_user_info): pass sptr to the formatting function * include/ircd_features.h: new feature FEAT_HIDDEN_IP (stores which fake IP to show for clients with a hidden host) * ircd/ircd_features.c: new feature FEAT_HIDDEN_IP * doc/example.conf: default value for FEAT_HIDDEN_IP * doc/readme.features: documented FEAT_HIDDEN_IP 2002-04-03 Andrew Miller * doc/example.conf: Cleaned up some comments that ended up in strange places due to problems in the merge process. * ircd/m_nick.c: Cleaned up ms_nick, and fixed a bug that probably dates back to Jarkko code. 2002-04-02 Kevin L Mitchell * ircd/m_kill.c: let ms_kill() and mo_kill() seperate the message from the path before calling do_kill(); add a msg argument to do_kill() and use it in preference to comment; remove all that old code that fiddled with the buf and the comment * ircd/ircd_log.c (log_write_kill): add a seperate msg argument * include/ircd_log.h: add a seperate msg argument to log_write_kill() * ircd/ircd.c: display event engine and MAXCONNECTIONS information 2002-04-02 Alex Badea * ircd-patch: Automatically generate a version string from patches 2002-04-02 Alex Badea * ircd-patch: Test before doing anything dangerous, provide -f to to it anyway. exit levels for easy scripting. 2002-04-01 Kevin L Mitchell * ircd/channel.c (joinbuf_join): don't add a channel to the list in the joinbuf unless when we flush it, we empty the list 2002-04-02 Andrew Miller * ircd/ircd_parser.y: Added ircd parser, lexer, to replace the old configuration file format. * ircd/ircd_lexer.l * ircd/s_conf.c * doc/example.conf 2002-03-23 Bert Faes * s_misc.c made /trace reply always show the username 2002-03-28 Kevin L Mitchell * configure.in: use AC_CHECK_FUNCS to define HAVE_* macros; test for setrlimit, getrusage, and times * configure: rerun auto-conf * config.h.in: rerun autoheader 2002-03-27 Kevin L Mitchell * ircd/m_burst.c (ms_burst): use MODEBUF_DEST_NOKEY to suppress sending of the key to the channel * ircd/channel.c (modebuf_flush_int): when processing keys, only include the actual key in the mode sent to the channel if MODEBUF_DEST_NOKEY is not set * include/channel.h: needed more bits for MODEBUF_DEST_*, especially when adding MODEBUF_DEST_NOKEY to force keys in the BURST to be reported as "*" to the channel * ircd/m_oper.c (m_oper): clear the new oper's sendq so it gets inherited from the class associated with the O-line 2002-03-25 Kevin L Mitchell * ircd/s_user.c (set_nick_name): invalidate all ban valid caching when a user changes his nickname so we can catch if he now matches a ban 2002-03-20 Reed Loden * doc/example.conf: Added OPER_LIST_CHAN and LOCOP_LIST_CHAN. * doc/readme.features: Added OPER_LIST_CHAN and LOCOP_LIST_CHAN. 2002-03-20 LordLuke * ircd/client.c: Add LOCOP_LIST_CHAN feature. * ircd/ircd_features.h: Add LOCOP_LIST_CHAN feature. 2002-03-19 Joseph Bongaarts * ircd/m_links.c: Make /links behave like /map for head_in_sand. cleaned up excess code. * ircd/map.c: Added map_dump_links_head_in_sand() Made changes in map_add() and map_update() for links changes. * include/map.h: Added info and prot to struct Map * include/ircd_defs.h: Added MAP_CACHE_TIME for length of time servers are cached in MapList * ircd/s_misc.c: changed #ifdef for map_update() * ircd/m_server.c: changed #ifdef for map_update() * include/ircd_policy.h: added NO_HEAD_IN_SAND for easier removal of hiding features. * configure.in: add --disable-headinsand * configure: Ran autoconf * ircd/m_stats.c: Fixed a bug in /stats i and made /stats i show connect limits * ircd/s_stats.c: Made /stats i report connect limits * ircd/s_err.c: Modified RPL_STATSILINE to use %s instead of "*" for the password field. 2002-03-19 LordLuke * include/channel.h: Allow opers to view +s channels in /list * include/client.h: Add "PRIV_LIST_CHAN" oper privilege * include/ircd_features.h: added "LIST_CHAN" feature * ircd/channel.c: Allow opers to view +s channels in /list * ircd/client.c: Add "PRIV_LIST_CHAN" * ircd/ircd_features.c: Add "LIST_CHAN" feature 2002-03-13 Joseph Bongaarts * ircd/m_kill.c: Last of the last of the bug fixes (Thanks Spike). Must be more careful when forward porting by hand... 2002-03-13 Carlo Wood * include/channel.h: CHFL_CHANNEL_MANAGER, new local channel flag set when someone creates a channel or joins using the Apass. IsChannelManager(), SetChannelManager(): macros to manipulate new channel flag. channel_modes: Added new argument to avoid calling find_member_link more often than needed. * include/numeric.h: RPL_APASSWARN, ERR_NOTLOWEROPLEVEL, ERR_NOTMANAGER, ERR_CHANSECURED, ERR_UPASSSET, ERR_UPASSNOTSET: new numeric replies. * ircd/channel.c: is_level0_op: removed. member_can_send_to_channel: disallow channel manager to talk. channel_modes: show upass to level0 ops. mode_parse_upass: Only the channel manager is allowed to change the upass. Only allow to set upass when apass is also set. mode_parse_apass: Don't allow to change the Apass if the channel is older than 48 hours. Only allow to remove the apass when upass is not set. Send clear warnings regarding the importance of apass. mode_process_clients: Don't change the oplevel of an opped member in a channel where upass is not set. * ircd/destruct_event.c: exec_expired_destruct_events: Bug fix: send DESTRUCT message when destructing a channel. * ircd/m_destruct.c: ms_destruct: Bug fix: use self as prefix for DESTRUCT message. * ircd/m_join.c: m_join: Handle apass and upass. * ircd/m_kick.c: m_kick: Don't allow to kick member with a higher or equal op-level. * ircd/m_mode.c: m_mode: Now pass member to channel_modes. ms_mode: Allow server to do modes on channels with apass set. * ircd/s_err.c: RPL_APASSWARN, ERR_NOTLOWEROPLEVEL, ERR_NOTMANAGER, ERR_CHANSECURED, ERR_UPASSSET, ERR_UPASSNOTSET: new numeric replies. 2002-03-10 Joseph Bongaarts * ircd/m_kill.c: Last of the bug fixes for do_kill() * ircd/list.c: Don't remove clients from the linked list that aren't actually in the list. 2002-03-08 Carlo Wood * include/channel.h: Added CHFL_BURST_ALREADY_OPPED and CHFL_BURST_ALREADY_VOICED. * ircd/m_burst.c: Allow BURST outside net-burst and take into account that users are already joined to the channel in that case. * ircd/m_destruct.c: Implementation of DESTRUCT handling code. * ircd/m_join.c: Set the channel creationtime to the timestamp of a message when that timestamp is smaller. 2002-02-27 Reed Loden * tools/crypter: Updated some variables, added another notice, added CVS Id tag, and updated Perl location. * tools/ringlog.c: Added IRC - Internet Relay Chat, tools/ringlog.c * tools/ringlog.pl: Added IRC - Internet Relay Chat, tools/ringlog.pl * tools/wrapper.c: Added IRC - Internet Relay Chat, tools/wrapper.c * tools/mkpasswd.c: Added CVS Id tag * tools/sums: Updated to comply with sums being moved to tools/ and added CVS Id tag * tools/README: Updated location of file and partly rewrote to fit u2.10.11's Features * tools/Makefile.crypt: Updated location of file and added CVS Id tag * acconfig.h: Updated location of file * config.h.in: Updated location of file * tools/Bounce/bounce.conf: Added CVS Id tag * tools/Bounce/Bounce.cpp: Updated location of file * tools/Bounce/Bounce.h: Updated location of file * tools/hashtoy: Added CVS Id Tag 2002-02-27 Carlo Wood * /ircd/ircd.c: check_pings: First check if a PING was sent at all. 2002-03-01 Carlo Wood * include/channel.h: struct Channel: new attribute destruct_event. Prototype for destruct_channel(). * include/destruct_event.h: new header file for destruct_event.c. * ircd/Makefile.in: New source file: destruct_event.c. * ircd/channel.c: sub1_from_channel: Don't destruct channel immedeately but instead schedule it for destruction after some time when a channel becomes empty (and clear invite only and limit in that case). destruct_channel: new function, was previously the destructing part of sub1_from_channel. add_user_to_channel: remove destruction request if any. * ircd/destruct_event.c: New file. Implementation of functions schedule_destruct_event_1m, schedule_destruct_event_48h, remove_destruct_event and exec_expired_destruct_events. * ircd/ircd.c: destruct_event_timer: new timer. main: use destruct_event_timer to call exec_expired_destruct_events once per minute. * ircd/m_endburst.c: ms_end_of_burst: Don't complain about empty channels. Schedule new empty channels for destruction. * ircd/m_join.c: m_join: Destruct just-created channel immedeately. 2002-03-01 Carlo Wood * ircd/s_misc.c: exit_client: Only call map_update() for servers. 2002-02-28 Carlo Wood * include/channel.h: New attribute 'oplevel' in struct Membership. Added defines MAXOPLEVELDIGITS and MAXOPLEVEL. New macros: OpLevel(member): returns op-level of member and SetOpLevel(member, value): sets op-level of member. Prototype of add_user_to_channel: add oplevel to parameters. Prototype of mode_parse: add member to to parameters. * include/numeric.h: added ERR_NOTLOWEROPLEVEL. * ircd/s_err.c: idem. * ircd/channel.c: Removed unmatched '{' braces from comments (confuses vi). add_user_to_channel: oplevel is passed to function and added in the created MemberShip structure. send_channel_modes: Generate the nick:mode list of the BURST msg in the new style (with op-levels). DONE_UPASS/DONE_APASS: fixed typo in comment. struct ParseState: New attribute: member. mode_process_clients: Disallow deopping someone with an equal or higher op-level, take care of inheritance of op-level. mode_parse: member is passed to function and added in the created ParseState structure. joinbuf_join: pass 0 as oplevel to add_user_to_channel as needed initialization of oplevel in struct MemberShip. * ircd/m_burst.c: ms_burst: Implementation of op-levels in the decoding of a BURST message and passing on a BURST message. Renamed default_mode to current_mode. * ircd/m_mode.c: m_mode/ms_mode: pass on `member' to mode_parse. * ircd/m_opmode.c: ms_opmode/mo_opmode: pass on NULL as member to mode_parse (causes opped member to get op-level 0). 2002-02-25 Carlo Wood * include/channel.h: Added two new strings to struct Mode, upass and apass, both with maximum length PASSLEN (a new define in this file). Two new mode defines MODE_UPASS and MODE_APASS. * ircd/channel.c: is_level0_op: Added as dummy function. channel_modes/modebuf_flush_int/modebuf_extract/mode_parse: Added support for MODE_APASS (+A) and MODE_UPASS (+u). mode_parse_upass: New function to parse mode +u. mode_parse_apass: New function to parse mode +A. * ircd/s_err.c: Added 'A' and 'u' to mode list (RPL_MYINFO). 2002-02-25 Carlo Wood * ircd/m_server.c: remove unused variables 2002-02-25 Joseph Bongaarts * ircd/m_map.c: Modified to show a useful output to non-opered clients when HEAD_IN_SAND_MAP is defined. Servers are added to the list when first seen (after receiving SERVER) and that list is sent to clients. Servers are excluded from the list if they are hubs, services, or have been missing for more than 1 week. * ircd/map.c: Created file for map_* functions * include/map.h: Created file for map_* functions * ircd/m_server.c: Added calls to map_update() * ircd/s_misc.c: Added call to map_update() * ircd/parse.c: Changed to use m_map() and mo_map() 2002-02-22 Reed Loden * ircd/m_connect.c: Removed an extra : in remote connect message. 2002-02-19 Joseph Bongaarts * ircd/whocmds.c: Local opers should also be able to see servernames in /who * ircd/gline.c: Fix core bug in gline_find() * ircd/m_kill.c: Bug fix for HIS_KILLWHO 2002-02-19 John Buttery * ircd/ircd.c: Updated "No such file" error message. 2002-02-18 Joseph Bongaarts * ircd/m_kill.c: Changed m_kill() to do_kill() because its not a message handler, and some general cleanups and bug fixes. * include/ircd_policy.h: Added HEAD_IN_SAND_KILLWHO for hiding kill source. 2002-02-16 Tim Vogelsang * ircd/m_kill.c: added a new static function, m_kill, which performs the actual kill. 2002-02-14 Joseph Bongaarts * Added support for LIST STOP 2002-02-13 Joseph Bongaarts * Merged changes from u2_10_11 to main branch. 2002-02-08 Tim Vogelsang * ircd/m_quit.c: don't prefix user quits with "Quit:" unless a reason is supplied. 2002-02-06 Kevin L Mitchell * ircd/s_auth.c (read_auth_reply): left out an = in an assertion--shouldn't have had any impact, though * ircd/Makefile.in: add a hook for using ringlog; run make depend * tools/ringlog.c: for the heck of it, add a comment including rules for /etc/magic 2002-02-05 Kevin L Mitchell * tools/ringlog.pl: perl script to take output from ringlog and pass it to addr2line to get function, file, and line number information * tools/ringlog.c: program/object to help in building function trace information 2002-02-04 Alex Badea * include/ircd_features.h: added new feature MOTD_BANNER * ircd/ircd_features.c: added new feature MOTD_BANNER * ircd/motd.c (motd_signon): send a one-line banner from FEAT_MOTD_BANNER if it's not NULL and FEAT_NODEFAULTMOTD is set * doc/example.conf: default value for MOTD_BANNER feature * doc/readme.features: documented the MOTD_BANNER feature 2002-02-04 Kevin L Mitchell * ircd/s_debug.c (debug_serveropts): remove deprecated CHROOTDIR check; added character 'A' to the server options string to indicate when assertion checking is enabled 2002-02-03 Kevin L Mitchell * include/patchlevel.h (PATCHLEVEL): bump patchlevel * ircd/engine_kqueue.c (set_or_clear): don't generate an ET_ERROR event if the errno is EBADF, since the caller probably already knows about it and just hasn't gotten around to processing it yet * ircd/ircd_events.c: set the GEN_ERROR flag if an ET_ERROR event is generated; don't process socket_events() or socket_state() if an error occurred; add GEN_ERROR to list of flags in gen_flags() * include/ircd_events.h: define new GEN_ERROR flag; add a macro to clear it 2002-02-01 Kevin L Mitchell * ircd/channel.c: change make_nick_user_{ip,host} to not use a static buffer--instead, a buffer of the right size (NUH_BUFSIZE or NUI_BUFSIZE--I confess they're not well-named) is allocated by the caller 2002-02-02 Alex Badea * include/client.h: added user flag FLAGS_HIDDENHOST * include/ircd_features.h: added FEAT_HOST_HIDING and FEAT_HIDDEN_HOST * include/numeric.h: defined numeric 338 (RPL_WHOISACTUALLY) to report real hostnames and IPs to opers * include/s_user.h: exported hide_hostmask() * include/send.h: changed sendcmdto_channel_butserv to sendcmdto_channel_butserv_butone; ditto for sendcmdto_common_channels * include/struct.h: added realhost to struct User * include/whowas.h: added realhost to struct Whowas * ircd/channel.c: match bans against both real and hidden hostmasks; moved some calls to use sendcmdto_*_butone * ircd/gline.c: match glines agains real host * ircd/ircd_features.c: added FEAT_HOST_HIDING and FEAT_HIDDEN_HOST * ircd/m_account.c: call hide_hostmask() for possibly hiding the user's host * ircd/m_burst.c: moved some calls to use sendcmdto_*_butone * ircd/m_topic.c: moved some calls to use sendcmdto_*_butone * ircd/m_userip.c: report IP 127.0.0.1 if the user has a hidden host * ircd/m_who.c: match real hosts, if the query comes from an oper * ircd/m_whois.c: report real hostname and IP to opers * ircd/m_whowas.c: report real hostname to opers * ircd/s_err.c: added user mode 'x' to the list of supported user modes in RPL_MYINFO (004); added RPL_WHOISACTUALLY for reporting real hostnames to opers * ircd/s_misc.c: moved some calls to use sendcmdto_*_butone * ircd/s_serv.c: send real hostname to servers * ircd/s_user.c: send real hostname to servers; added processing of usermode 'x'; added hide_hostmask() which actually does the work of hiding a user's host; moved some calls to use sendcmdto_*_butone * ircd/send.c: changed sendcmdto_channel_butserv to sendcmdto_channel_butserv_butone; ditto for sendcmdto_common_channels * ircd/whocmds.c: extra letter 'x' in WHO reply if the user has it's host hidden * ircd/whowas.c: if needed, store a user's real host so we can report it to opers later * doc/readme.features: documented HOST_HIDING and HIDDEN_HOST features * doc/example.conf: default values for HOST_HIDING and HIDDEN_HOST features 2002-02-01 Tim Vogelsang * ircd/send.c (sendwallto_group_butone): don't sent wallops to ordinary users 2002-01-28 Kevin L Mitchell * ircd/jupe.c (jupe_activate): remove a bogus assertion * include/patchlevel.h (PATCHLEVEL): bump patchlevel * ircd/s_err.c: added new channel mode 'r' to list of supported channel modes in RPL_MYINFO (004); migrated RPL_USERIP to use numeric 340 instead of 307; add ERR_NEEDREGGEDNICK (477) for informing users why they can't join a +r channel * ircd/m_clearmode.c (do_clearmode): add support for MODE_REGONLY (+r) to do_clearmode(); note that it is *not* being added to the default clearmode mask! * ircd/channel.c: don't allow non-+r users to send messages to +r channels from off the channel; add support for MODE_REGONLY (+r) to channel_modes(); don't allow non-+r users to join +r channels without an invite; add support for MODE_REGONLY to the modebuf_*() family of functions (changes in modebuf_flush_int(), modebuf_mode(), and modebuf_extract()); add support for MODE_REGONLY to mode_parse() * include/supported.h (FEATURESVALUES2): added the new channel mode 'r' to the list of supported channel modes * include/numeric.h: move RPL_USERIP to 340 to avoid the 307 conflict; add ERR_NEEDREGGEDNICK (477) for the new +r channels * include/channel.h: remove unused MODE_SENDTS; add new MODE_REGONLY * ircd/s_bsd.c (read_packet): remove call to timer_verify() * ircd/list.c: remove calls to timer_verify() from alloc_connection() and dealloc_connection() * ircd/ircd_events.c: turn off timer_verify(); remove calls to it from timer_run() 2002-01-27 Kevin L Mitchell * include/patchlevel.h (PATCHLEVEL): bump patchlevel * ircd/ircd_events.c (timer_run): why did I ever use a next pointer when the algorithm guarantees that the head pointer will always be the next pointer? 2002-01-26 Kevin L Mitchell * include/patchlevel.h (PATCHLEVEL): bump patchlevel * ircd/s_bsd.c (read_packet): call timer_verify() after adding the client process timer to catch any list corruption * ircd/list.c: surround alloc_connection() and dealloc_connection() with calls to timer_verify() * ircd/ircd_events.c: add sledgehammer known as timer_verify() to verify the timer list's structure; call it around timer_run() 2002-01-22 Kevin L Mitchell * ircd/send.c (sendcmdto_common_channels): don't send message to a channel that the source is a zombie on 2002-01-13 Kevin L Mitchell * ircd/ircd_events.c (timer_enqueue): one more assertion--make sure a timer has the ACTIVE flag set before enqueueing the timer * include/patchlevel.h (PATCHLEVEL): bump patchlevel * ircd/list.c (dealloc_connection): assert that the process timer has been removed from the timer queue before dealloc_connection() is called 2002-01-12 Kevin L Mitchell * ircd/res.c: don't accept T_A when we're looking for T_PTR * ircd/channel.c (modebuf_flush_int): nuke the code that would send a HACK DESYNCH notice on a HACK(2)--it would be far too chatty * ircd/m_away.c (user_set_away): use AWAYLEN instead of TOPICLEN * include/supported.h: add AWAYLEN to the list of supported features * include/ircd_defs.h: add AWAYLEN to specify the maximum length of an away message * include/patchlevel.h (PATCHLEVEL): bump patchlevel * ircd/m_mode.c (m_mode): pass extra parameter to channel_modes() * ircd/channel.c: pass a buflen parameter to channel_modes() for pbuf--we were using sizeof(pbuf), which would always be sizeof(char*) before; change send_channel_modes() to pass extra parameter to channel_modes() * include/channel.h: pass a buflen parameter to channel_modes() for pbuf * include/patchlevel.h (PATCHLEVEL): bump patchlevel * ircd/uping.c (uping_start): initialize some timers * ircd/s_bsd.c (read_packet): use new t_onqueue() macro to figure out when we need to re-add the process timer * ircd/s_auth.c (make_auth_request): initialize a timer * ircd/res.c (init_resolver): initialize some timers * ircd/list.c (alloc_connection): initialize the client process timer * ircd/ircd_events.c: add a function, timer_init(), to initialize a struct Timer; recast timer_add() to catch when adding a marked timer and not re-enqueue it--but mark it for re-enqueuing; update timer_del() to turn off the GEN_READD flag and to ignore reference counts when destroying the timer--we're using GEN_MARKED as an ersatz referance count; changed timer_run() to work with the new way of doing things; add GEN_ACTIVE and GEN_READD to gen_flags()'s map[] * ircd/ircd.c: initialize some timers * ircd/engine_select.c (engine_loop): initialize a timer * ircd/engine_poll.c (engine_loop): initialize a timer * ircd/engine_kqueue.c (engine_loop): initialize a timer * ircd/engine_devpoll.c (engine_loop): initialize a timer * ircd/IPcheck.c (IPcheck_init): initialize a timer * include/ircd_events.h: add GEN_READD flag for timers to indicate that a timer must be readded; add t_onqueue() macro to check to see if a timer is on the queue (this is a hack, though); added timer_init() to initialize a struct Timer--we're no longer doing the initialization in timer_add() 2002-01-11 Kevin L Mitchell * ircd/engine_devpoll.c (engine_loop): relocate an assertion to prevent a core bug *in* the assertion * doc/readme.features: document new POLLS_PER_LOOP feature; change documentation to reflect that OPER_SET now defaults to FALSE * doc/p10.html: documented the new ACCOUNT stuff * doc/example.conf: document new POLLS_PER_LOOP default; change default for OPER_SET * RELEASE.NOTES: changed documentation to reflect the fact that assertions are now enabled by default and do not cause memory leaks * ircd/res.c (make_cache): removed a bogus assertion we probably never caught because assertions haven't been enabled on production servers for any length of time before * ircd/engine_devpoll.c (engine_loop): ditto for POLLS_PER_DEVPOLL * ircd/engine_kqueue.c (engine_loop): stupid me forgot one instance of POLLS_PER_KQUEUE * include/patchlevel.h (PATCHLEVEL): bump patchlevel * ircd/s_bsd.c (client_timer_callback): only clear the FREEFLAG_TIMER flag when the timer is being destroyed * ircd/ircd_features.c: create a new feature, POLLS_PER_LOOP, and default it to 200; turn OPER_SET off by default * ircd/engine_kqueue.c: dynamically allocate and reallocate the array of events to obtain from the kernel * ircd/engine_devpoll.c: dynamically allocate and reallocate the array of events to obtain from the kernel * include/ircd_features.h: add a new feature for tuning how many events to get from the kernel, for engines that support that * ircd/Makefile.in: re-run make depend to correct dependancies * ircd/m_who.c: remove unneeded inclusion of list.h * ircd/ircd_events.c: remove unneeded inclusion of list.h * ircd/whocmds.c (do_who): hide server name in /who unless requester is an operator; simplify hop count insertion * ircd/s_misc.c (exit_one_client): make sure client's snomask is cleared * ircd/parse.c: use mo_version and mo_admin when opers do /version or /admin * ircd/m_whowas.c (m_whowas): use HEAD_IN_SAND_SERVERNAME instead of the static string "*.undernet.org" * ircd/m_version.c: only let ordinary users get version information for the server they are on * ircd/m_admin.c: only let ordinary users get admin information for the server they are on * ircd/channel.c (client_can_send_to_channel): check is_banned() before letting the client speak on a channel s/he is not on * include/supported.h: add NETWORK to feature list * include/handlers.h: declare mo_admin() and mo_version() 2002-01-10 Kevin L Mitchell * include/patchlevel.h (PATCHLEVEL): bump patchlevel * ircd/s_debug.c (count_memory): conditionalize on MDEBUG instead of !NDEBUG * ircd/m_stats.c: conditionalize /stats M on MDEBUG instead of !NDEBUG * ircd/ircd_alloc.c: conditionalize on MDEBUG instead of on !NDEBUG * ircd/fda.c: conditionalize on MDEBUG instead of on !NDEBUG * ircd/Makefile.in: run make depend on chkconf.c as well * include/ircd_alloc.h: instead of conditionalizing on !NDEBUG, conditionalize on MDEBUG * include/fda.h: instead of conditionalizing on !NDEBUG, conditionalize on MDEBUG * configure: rebuild configure script * configure.in: enable assertion checking by default, since we have now decoupled memory debugging from the NDEBUG macro * ircd/s_user.c (set_nick_name): remove calls to verify_client_list() * ircd/s_misc.c (exit_one_client): remove calls to verify_client_list() * ircd/s_conf.c (rehash): remove calls to verify_client_list() * ircd/m_who.c (m_who): remove calls to verify_client_list() * ircd/list.c: remove calls to verify_client_list(); keep verify_client_list() around just in case we ever need it again, but never compile it in * ircd/ircd_events.c (event_execute): remove calls to verify_client_list() * ircd/client.c (client_get_ping): remove calls to verify_client_list() * include/list.h (send_listinfo): remove temporary debugging function verify_client_list() * ircd/uping.c: don't die if the event type is ET_ERROR in socket callback functions * ircd/res.c (res_callback): don't die if the event type is ET_ERROR * ircd/listener.c (accept_connection): don't die if the event type is ET_ERROR 2002-01-09 Kevin L Mitchell * ircd/s_user.c (set_nick_name): bracket call to add_client_to_list() with calls to verify_client_list() * include/patchlevel.h (PATCHLEVEL): bump patchlevel (again) * ircd/list.c (verify_client_list): add a probabilistic loop detector: for every client added, there is a 2% probability that it will be used to replace the value of sentinel; if at any time, sentinel is found again, we know we're in a loop * ircd/ircd_events.c (event_execute): add verify_client_list() calls wrapping event_execute; at the very least, I'll figure out what event the corruption occurred in * ircd/list.c: moved verify_client_list() to try to keep it from being inlined * ircd/Makefile.in (version.c): version.c wasn't dependant on version.h and patchlevel.h, like it was supposed to be * include/patchlevel.h (PATCHLEVEL): bump patchlevel * ircd/s_auth.c (destroy_auth_request): overload send_reports argument to also indicate whether or not to call release_auth_client() and thereby enter the client into the linked list * ircd/engine_devpoll.c (engine_loop): remove bogus assertion * include/patchlevel.h (PATCHLEVEL): bump patchlevel * ircd/list.c (free_client): verify that destroy_auth_request() didn't automagically re-add us to the list; we might have to think about this interaction more carefully, actually * ircd/s_auth.c (auth_kill_client): zero the auth pointer before calling free_client(); otherwise, free_client() will try to free the auth by calling destroy_auth_request(), which will call add_client_to_list() * ircd/s_misc.c (exit_one_client): liberally sprinkle calls to verify_client_list() around to catch any corruption that might occur here * ircd/s_conf.c (rehash): liberally sprinkle calls to verify_client_list() here, since this is about the only routine I can think of that could cause the "core on kill -HUP" bug * ircd/m_who.c: sprinkle calls to verify_client_list() around liberally, since we've seen crashes here; temporarily include the otherwise unneeded list.h header * ircd/list.c: sprinkle calls to verify_client_list() around quite liberally; add debugging asserts to list manipulation functions to catch strange settings for next and prev pointers; define verify_client_list(), which walks the client list and verifies that everything is as it's supposed to be * ircd/client.c: wrap client_get_ping with calls to verify_client_list() to see if that's where we're dying * include/patchlevel.h (PATCHLEVEL): bump to 03 * include/list.h: declare verify_client_list() if DEBUGMODE enabled; otherwise, define it to be empty 2002-01-08 Kevin L Mitchell * ircd/m_quit.c (m_quit): remove an unused variable * include/patchlevel.h (PATCHLEVEL): bump PATCHLEVEL to 2 * ircd/s_user.c: when building the user mode to send to the user, don't include +r; add an extra set of parens to squelch a warning * ircd/m_quit.c (m_quit): use exit_client_msg() * include/patchlevel.h (PATCHLEVEL): bump patch level, so we can keep track of who's running what version * ircd/m_squit.c (ms_squit): remove debugging calls to protocol_violation() * Makefile.in: change MAKEFILES to IRCD_MAKEFILES to work around a new gmake "feature" (pull-up from trunk) * ircd/m_quit.c (m_quit): prefix user quits with "Quit:" (pull-up from trunk) 2002-01-07 Kevin L Mitchell * ircd/s_user.c: add FLAGS_ACCOUNT, represented as 'r', to the list of user modes; process account name as part of user mode in NICK decoding (set_nick_name()); add account name to usermode when building the usermode to incorporate in outgoing NICK messages * ircd/s_err.c: add RPL_WHOISACCOUNT for reporting what account a user is logged in to * ircd/parse.c: define the new ACCOUNT command, usable only by servers and ignored by everything else * ircd/m_whois.c: report what account name is associated with a user, if any * ircd/m_account.c: implement the ACCOUNT command * ircd/Makefile.in: add m_account.c to the list of sources; ran make depend * include/struct.h: add an account field to struct User * include/numeric.h: add a reply, RPL_WHOISACCOUNT, for reporting what username a user is logged in under * include/msg.h: add ACCOUNT command and token (AC) * include/ircd_defs.h: define ACCOUNTLEN to be 12--this matches the maximum length of a username for X * include/handlers.h: add declaration for ms_account() * include/client.h: add FLAGS_ACCOUNT to flag when a user account name has been set; added FLAGS_ACCOUNT to SEND_UMODES; added IsAccount() and SetAccount() to manipulate the flag * ircd/m_squit.c (ms_squit): if we call FindNServer() on a server name like "Amsterdam2.NL.EU.undernet.org", we get the struct Client for the server with numeric "Am", which happens to be stockholm! To fix this, we look up the full name *first*; if that doesn't get it, *then* we look up by numeric. 2001-12-24 Perry Lorier * ircd/m_server.c: cleanups, maybe this will make the bug easier to find. * ircd/m_stats.c: display maximum number of connects in an I: 2001-11-22 Perry Lorier * ircd/m_squit.c: Bug fix in squit 2001-11-03 Greg Sikorski * ircd/parse.c, include/handlers.h: Give remote whois the correct handler. 2001-11-01 Kevin L Mitchell * ircd/send.c: some minor white-space fiddling; recast selector test in sendwallto_group_butone() to remove a warning regarding putting & within parentheses * ircd/m_create.c (ms_create): use time_t instead of int as a declaration for rate * ircd/ircd_reply.c (protocol_violation): it's supposed to be WALL_DESYNCH, not CMD_DESYNCH, if I understand things right--no wonder we weren't seeing any protocol violations! * include/send.h: include time.h for time_t; move WALL_* closer to the function they're used in; some white-space fiddling; add declaration of sendto_opmask_butone_ratelimited() * ircd/m_squit.c (ms_squit): add protocol_violation() calls in the cases where we ignore a squit, so we aren't taken by surprise, at least... * ircd/m_create.c (ms_create): Display origin server, not origin user * ircd/m_create.c (ms_create): Fix "Timestamp drift" server notice 2001-10-31 Perry Lorier * include/m_ping.c: Forward port ping bug 2001-10-31 Perry Lorier * include/patchlevel.h: We're beta now 2001-10-31 Perry Lorier * ircd/s_user.c: fixed hunt_server 2001-09-21 Perry Lorier * ircd/send.c and various: replace sendcmdto_flag_butone with sendwallto_group_butone 2001-09-21 Vampire- * ircd/ircd_string.c: unique_name_vector round II. 2001-09-21 mbuna * configure.in: Add support for darwin 2001-09-21 Perry Lorier * ircd/s_user.c I'm stupid, s/acptr/from/, Hektik pointed it out 2001-09-20 Perry Lorier * Pullups from 2.10.10.pl16 * Added some warnings, and the concept of rate limited snotices 2001-08-31 Kevin L Mitchell * ircd/channel.c: use "%u" to format limit arguments; use strtoul() to process limit arguments in a /mode command--note: most clients seem to truncate the integer, probably because they're using atoi, and perhaps signed ints 2001-08-17 Kevin L Mitchell * ircd/numnicks.c: include stdlib.h for exit() * ircd/ircd_log.c: include stdlib.h for exit() * ircd/ircd_events.c: include stdlib.h for exit() * ircd/s_stats.c: remove description of /stats v, since it's gone * ircd/m_wallops.c (mo_wallops): add "*" to the beginning of /wallops to distinguish wallops from wallusers * ircd/m_error.c (mr_error): ignore ERROR from clients that aren't in the "handshake" or "connecting" states--I think the latter will never happen, but... * doc/Authors: apply delete's Authors patch * RELEASE.NOTES: rewrite RELEASE.NOTES, basing it a little on Braden's version * README: rewrite README 2001-07-31 Kevin L. Mitchell * ircd/s_serv.c (server_estab): remove unused variable split * ircd/parse.c: add mr_error to the parse table * ircd/m_error.c (mr_error): add mr_error() to handle ERRORs from unregistered connections--if IsUserPort() is true, the ERROR is ignored, otherwise, the message is saved 2001-07-28 Kevin L. Mitchell * ircd/m_kill.c (ms_kill): another minor typo *sigh* * ircd/s_user.c (send_supported): oops, minor typo... * ircd/s_user.c: implement send_supported() to send two ISUPPORT messages containing our feature buffers; make register_user() use send_supported() * ircd/s_misc.c (exit_client): make sure not to give away a remote server in the ERROR message sent to the client; if the killer is a server, we substitute our name in its place * ircd/m_version.c (m_version): use send_supported() to send the ISUPPORT values to the user * ircd/m_nick.c: shave nick collision kills here a bit, too, for the same reasons as for m_kill.c * ircd/m_kill.c: shave kills a bit so that the results look exactly the same no matter where you are; if we didn't do this, it would be possible to map the network by looking at the differences between kills originating under various circumstances * include/supported.h: split the features into two, so as to not bust the parameter count when sending the features list * include/s_user.h: declare new send_supported() function to send the ISUPPORT information 2001-07-27 Kevin L. Mitchell * ircd/s_bsd.c: disable IP (*not* TCP) options to prevent source-routed spoofing attacks; this is only available under u2.10.11, so don't even bother, since no one but testers are using the source base 2001-07-25 Kevin L. Mitchell * include/ircd_policy.h: enable HEAD_IN_SAND_REMOTE by default * ircd/s_err.c: put in a . for reporting link version on /trace, to match what /version does 2001-07-21 Kevin L. Mitchell * ircd/s_misc.c (exit_client): servers don't understand what the numeric nick ERROR is supposed to mean, so they ignore error messages, resulting in not knowing why we were rejected; use sendcmdto_one for servers and sendrawto_one for clients 2001-07-17 Kevin L. Mitchell * ircd/m_burst.c (ms_burst): in the case of a modeless channel and a nick collide, a bare BURST may be propagated; adjust the enforced parameter count to accept the bare BURST 2001-07-12 Kevin L. Mitchell * ircd/s_bsd.c: mark a client as having been IP checked * ircd/IPcheck.c (ip_registry_check_remote): remove unneeded second call to SetIPChecked() 2001-07-11 Kevin L. Mitchell * ircd/engine_poll.c: deal with POLLHUP properly (hopefully) * ircd/engine_devpoll.c: deal with POLLHUP properly (hopefully) 2001-07-09 Kevin L. Mitchell * ircd/os_bsd.c (os_get_rusage): move buf into the two ifdef'd sections so that if neither is used, the declaration of buf will not elicit an "unused variable" warning under NetBSD * ircd/m_map.c: include string.h to declare strcpy (fix warnings on alpha) * ircd/m_away.c: include string.h to declare strcpy/strlen (fix warnings on alpha) * ircd/ircd_log.c: include string.h to declare strcpy/strlen (fix warnings on alpha) * ircd/client.c: include string.h to declare memset (fix warnings on alpha) * ircd/channel.c: remove unused functions next_overlapped_ban, del_banid, and is_deopped (fix warnings under -O1) * ircd/IPcheck.c: include string.h to declare memset/memcpy (fix warnings on alpha) 2001-06-29 Kevin L. Mitchell * ircd/s_user.c (set_user_mode): clear the snomask if the user isn't supposed to receive server notices anymore * ircd/ircd_features.c: change CONFIG_OPERCMDS to default to FALSE * configure.in: use AC_MSG_CHECKING/AC_MSG_RESULT when checking installation prefix; default devpoll and kqueue to on (they get turned off if the required headers aren't present) * ircd/whocmds.c (do_who): use ircd_snprintf() instead of sprintf_irc(); it's a bit hackish, but it'll do for now * ircd/support.c: remove unused #include * ircd/send.c: remove unused #include * ircd/s_user.c: use ircd_snprintf() instead of sprintf_irc() * ircd/s_serv.c: remove unused #include * ircd/s_misc.c: use ircd_snprintf() and friends instead of sprintf_irc() and friends * ircd/s_err.c: moved atoi_tab[] from ircd/sprintf_irc.c to ircd/s_err.c, which is the only other file to refer to it * ircd/s_conf.c (conf_add_deny): use ircd_snprintf() instead of sprintf_irc() * ircd/s_bsd.c (connect_server): use ircd_snprintf() instead of sprintf_irc() * ircd/s_auth.c: use ircd_snprintf() instead of sprintf_irc() * ircd/res.c: use ircd_snprintf() instead of sprintf_irc() * ircd/m_version.c: use ircd_snprintf() instead of sprintf_irc() * ircd/m_kill.c: use ircd_snprintf() instead of sprintf_irc() * ircd/listener.c: use ircd_snprintf() instead of sprintf_irc() * ircd/gline.c: use ircd_snprintf() instead of sprintf_irc() * ircd/channel.c: don't include sprintf_irc.h; use ircd_snprintf() instead of sprintf_irc() * ircd/Makefile.in: remove sprintf_irc.c from sources list; run make depend * include/ircd_string.h: remove declaration of sprintf_irc() (what was it doing here anyway?) * include/sprintf_irc.h: removed unneeded source file * ircd/sprintf_irc.c: removed unneeded source file * ircd/s_debug.c (count_memory): remove some dead code * ircd/s_auth.c: remove some dead code * ircd/res.c (update_list): remove some dead code * ircd/m_whowas.c: remove some dead code * ircd/m_whois.c: remove some dead code * ircd/m_who.c: remove some dead code * ircd/m_wallusers.c: remove some dead code * ircd/m_wallops.c: remove some dead code * ircd/m_wallchops.c: remove some dead code * ircd/m_version.c: remove some dead code * ircd/m_userip.c: remove some dead code * ircd/m_userhost.c: remove some dead code * ircd/m_uping.c: remove some dead code * ircd/m_trace.c: remove some dead code * ircd/m_topic.c: remove some dead code * ircd/m_tmpl.c: remove some dead code * ircd/m_time.c: remove some dead code * ircd/m_squit.c: remove some dead code * ircd/m_silence.c: remove some dead code * ircd/m_settime.c: remove some dead code * ircd/m_set.c: remove some dead code * ircd/m_server.c: remove some dead code * ircd/m_rpong.c: remove some dead code * ircd/m_rping.c: remove some dead code * ircd/m_restart.c: remove some dead code * ircd/m_reset.c: remove some dead code * ircd/m_rehash.c: remove some dead code * ircd/m_quit.c: remove some dead code * ircd/m_proto.c: remove some dead code * ircd/m_privs.c: remove some dead code * ircd/m_privmsg.c: remove some dead code * ircd/m_pong.c: remove some dead code * ircd/m_ping.c: remove some dead code * ircd/m_pass.c: remove some dead code * ircd/m_part.c: remove some dead code * ircd/m_opmode.c: remove some dead code * ircd/m_oper.c: remove some dead code * ircd/m_notice.c: remove some dead code * ircd/m_nick.c: remove some dead code * ircd/m_map.c: remove some dead code * ircd/m_lusers.c: remove some dead code * ircd/m_list.c: remove some dead code * ircd/m_links.c: remove some dead code * ircd/m_kill.c: remove some dead code * ircd/m_kick.c: remove some dead code * ircd/m_jupe.c: remove some dead code * ircd/m_join.c: remove some dead code * ircd/m_ison.c: remove some dead code * ircd/m_invite.c: remove some dead code * ircd/m_info.c: remove some dead code * ircd/m_help.c: remove some dead code * ircd/m_gline.c: remove some dead code * ircd/m_get.c: remove some dead code * ircd/m_error.c: remove some dead code * ircd/m_endburst.c: remove some dead code * ircd/m_die.c: remove some dead code * ircd/m_desynch.c: remove some dead code * ircd/m_destruct.c: remove some dead code * ircd/m_defaults.c: remove some dead code * ircd/m_create.c: remove some dead code, along with an #if 1 * ircd/m_cprivmsg.c: remove some dead code * ircd/m_connect.c: remove some dead code * ircd/m_close.c: remove some dead code * ircd/m_clearmode.c: remove some dead code * ircd/m_burst.c: remove some dead code * ircd/m_away.c: remove some dead code * ircd/m_admin.c: remove some dead code * ircd/listener.c (accept_connection): remove some dead code * ircd/ircd_reply.c (need_more_params): remove some dead code * ircd/channel.c (add_banid): remove some dead code * include/support.h: remove some dead code * include/querycmds.h: remove some dead code * doc/readme.chroot: document how to do chroot operation 2001-06-28 Kevin L. Mitchell * ircd/Makefile.in: tune for VPATH builds/installs; add a rule to force bin directory to be created if necessary prior to installation; run make depend * doc/Makefile.in (install): tune for VPATH installs by cd'ing to the ${srcdir} * Makefile.in: tune to detect Makefile.in changes in subdirectories and to create installation directory indicated by ${prefix} * ircd/whocmds.c (count_users): routine to count the number of users matching a given user@host mask * ircd/s_err.c: add error messages for ERR_LONGMASK, ERR_TOOMANYUSERS, and ERR_MASKTOOWIDE * ircd/m_gline.c: look for and advance past '!' flag on G-lines from operators; only set GLINE_OPERFORCE flag if oper has the PRIV_WIDE_GLINE privilege * ircd/ircd_features.c: add GLINEMAXUSERCOUNT, which is the maximum number of users a G-line can impact before it has to be forced; OPER_WIDE_GLINE, to allow operators to use ! to force a wide G-line to be set; and LOCOP_WIDE_GLINE, to allow local operators to use ! to force a wide G-line to be set * ircd/gline.c: make make_gline() be called with separate user and host arguments, and not call canon_userhost() directly; implement gline_checkmask() to verify that a host mask is acceptable; move BADCHAN check up in gline_add(), and check passed-in mask under certain circumstances for acceptability; fix call to sendto_opmask_butone() to handle separation of userhost into user and host in gline_add(); update call to make_gline() * ircd/client.c: use FEAT_OPER_WIDE_GLINE and FEAT_LOCOP_WIDE_GLINE to set PRIV_WIDE_GLINE for an operator; add PRIV_WIDE_GLINE to privtab[] for client_report_privs() * include/whocmds.h (count_users): declare routine to count users matching a given user@host mask * include/numeric.h: added three new error returns: ERR_LONGMASK -- mask can't be formatted into a buffer; ERR_TOOMANYUSERS -- too many users would be impacted by the mask; ERR_MASKTOOWIDE -- mask contains wildcards in the wrong places * include/ircd_features.h: add FEAT_GLINEMAXUSERCOUNT, FEAT_OPER_WIDE_GLINE, and FEAT_LOCOP_WIDE_GLINE * include/gline.h (GLINE_OPERFORCE): provides a way for m_gline() to signal to gline_add() that the operator attempted to force the G-line to be set * include/client.h (PRIV_WIDE_GLINE): new privilege for operators * doc/readme.gline: update to document new "!" prefix to a G-line user@host mask * doc/readme.features: document GLINEMAXUSERCOUNT, OPER_WIDE_GLINE, and LOCOP_WIDE_GLINE * doc/example.conf: update to mention new features along with their defaults 2001-06-27 Kevin L. Mitchell * doc/example.conf: updated example.conf from Braden * include/supported.h: forward-port from pl15 2001-06-25 Kevin L. Mitchell * ircd/whocmds.c: include ircd_policy.h and implement HEAD_IN_SAND_WHO_OPCOUNT--forward-port from pl15 * ircd/m_whois.c: forward-port of the idle-time hiding code from pl15; this also required passing parc into do_whois(), which also meant passing parc into do_wilds()--*sigh* * include/ircd_policy.h: add a couple more HEAD_IN_SAND #define's--WHOIS_IDLETIME and WHO_HOPCOUNT 2001-06-22 Kevin L. Mitchell * tools/wrapper.c: add a wrapper program that can be used to adjust file descriptor limits and root directories; program must be run as root--NOT SETUID!--and given appropriate -u arguments * doc/readme.log: documentation of how to configure logging * doc/readme.features: documentation of each feature (except for logging) 2001-06-21 Kevin L. Mitchell * Makefile.in (config): add a deprecation notice with a pointer to tools/transition * tools/transition: shell script to convert old compile-time options into new compile-time options and appropriate F-lines * tools/mkchroot: shell-script to prepare the chroot area by copying over all the necessary libraries so they can be found 2001-06-20 Kevin L. Mitchell * INSTALL: partial update of INSTALL for u2.10.11 release... 2001-06-14 Kevin L. Mitchell * ircd/table_gen.c (makeTables): finally got tired of the "overflow in implicit conversion" warning, so just got rid of it by explicitly casting UCHAR_MAX to a (default) char; diffs show no differences in the tables generated 2001-06-11 Kevin L. Mitchell * ircd/send.c (sendcmdto_match_butone): don't let the server crash if a client is in the STAT_CONNECTING status 2001-06-10 Kevin L. Mitchell * ircd/send.c: remove unused vsendcmdto_one(), consolidating it into sendcmdto_one(); define new sendcmdto_prio_one(), which places the message into the priority queue * ircd/s_user.c (hunt_server_prio_cmd): definition of hunt_server_prio_cmd(), which simply calls sendcmdto_prio_one() instead of sendcmdto_one() * ircd/m_settime.c: use sendcmdto_prio_one() and hunt_server_prio_cmd() to send SETTIME * ircd/m_server.c: use sendcmdto_prio_one() to send SETTIME * include/send.h: removed declaration for unused vsendcmdto_one(); added a declaration for sendcmdto_prio_one() * include/s_user.h: declare hunt_server_prio_cmd(), which calls sendcmdto_prio_one() * ircd/send.c (sendcmdto_flag_butone): oops; /wallops should be put in the server's priority queue, too... * ircd/ircd.c: don't check LPATH for accessibility at all 2001-06-08 Kevin L. Mitchell * ircd/s_serv.c (server_estab): send a +h flag in our SERVER command if we're configured as a hub; send individual server flags in SERVER commands * ircd/s_bsd.c (completed_connection): send a +h flag in our SERVER command if we're configured as a hub * ircd/m_server.c: implement parv[7] as a mode-like string; +h sets the FLAGS_HUB flag for a server; +s sets the FLAGS_SERVICE flag for a server; +hs sets both flags; also modify CMD_SERVER format string to send the flags * include/client.h: define two new flags, FLAGS_HUB and FLAGS_SERVICE to mark services and hubs as such; define testing macros, setting macros * ircd/s_user.c: remove deprecated struct Gline* argument to register_user(); remove GLINE rebroadcast; do not send GLINE acknowledgement parameter to NICK; do not look for GLINE acknowledgement parameter to NICK while parsing * ircd/s_serv.c (server_estab): remove deprecated struct Jupe* argument to server_estab(); do not send JUPE/GLINE acknowledgement parameters for SERVER or NICK * ircd/m_user.c (m_user): remove deprecated argument to register_user() * ircd/m_server.c: remove deprecated argument to server_estab(); remove documentation comment regarding JUPE acknowledgement parameter to SERVER; remove JUPE rebroadcast * ircd/m_pong.c (mr_pong): remove deprecated argument to register_user() * ircd/m_nick.c: remove documentation comment regarding GLINE acknowledgement parameter to NICK * ircd/jupe.c: use user's real name in JUPE server notices if HEAD_IN_SAND_SNOTICES is defined * ircd/ircd.c: remove deprecated chroot() code; remove deprecated setuid code; correct ancient DEBUG vs DEBUGMODE typo * ircd/gline.c: use user's real name in GLINE server notices if HEAD_IN_SAND_SNOTICES is defined * ircd/channel.c (modebuf_flush_int): make apparent source be local server, not oper's server; use user's real name in hack notices and DESYNC notices if HEAD_IN_SAND_SNOTICES is defined * include/s_user.h: remove struct Gline pre-declaration; remove deprecated struct Gline argument from register_user() * include/s_serv.h: remove struct Jupe pre-declaration; remove deprecated struct Jupe argument from server_estab() 2001-06-07 Kevin L. Mitchell * ircd/s_stats.c (hunt_stats): forward-port from pl15 of all the changes required to control remote stats * ircd/s_numeric.c (do_numeric): rewrite numeric origins if recipient is not an operator and HEAD_IN_SAND_REWRITE is defined [forward-port from pl15] * ircd/m_whowas.c (m_whowas): report server name only if requester is an operator [forward-port from pl15] * ircd/m_whois.c (do_whois): /whois now correctly reports my server; if HEAD_IN_SAND_REMOTE is 1, ignore the middle argument and obtain the report from the user's server [forward-port from pl15] * ircd/m_who.c: add missing include for ircd_policy.h [forward-port from pl15] * ircd/m_version.c (m_version): require oper access for remote /version if HEAD_IN_SAND_REMOTE is 1 [forward-port from pl15] * ircd/m_time.c (m_time): require oper access for remote /time if HEAD_IN_SAND_REMOTE is 1 [forward-port from pl15] * ircd/m_stats.c: pass extra argument to hunt_stats(); correct missing semicolon [forward-port from pl15] * ircd/m_nick.c (ms_nick): hide the origin of certain collision kills [forward-port from pl15] * ircd/m_motd.c (m_motd): require oper access for remote /motd if HEAD_IN_SAND_REMOTE is 1 [forward-port from pl15] * ircd/m_lusers.c (m_lusers): require oper access for remote /lusers if HEAD_IN_SAND_REMOTE is 1 [forward-port from pl15] * ircd/m_burst.c (ms_burst): server-added bans are stored using local server name, to hide remote server names; modes also are to originate from the local server [forward-port from pl15] * ircd/m_admin.c (m_admin): require oper access for remote /admin if HEAD_IN_SAND_REMOTE is 1 [forward-port from pl15] * ircd/channel.c (add_banid): if a server is adding a ban, use my server name to hide the remote server's name [forward-port from pl15] * ircd/Makefile.in: ran make depend * include/s_stats.h: hunt_stats() has to have an extra argument to support the forward-port from pl15 * include/ircd_policy.h: #define HEAD_IN_SAND_STATS_P; add HEAD_IN_SAND_{BANWHO,REWRITE,REMOTE} [forward-port from pl15] * ircd/engine_poll.c (engine_loop): remove bogus assert that I forgot to check in the events branch 2001-06-06 Kevin L. Mitchell * ircd/res.c (init_resolver): don't start DNS expires with a 0 relative timeout--if the server starts slow, timeouts could be messy...there's probably a better solution, but this'll do for now * ircd/os_solaris.c: _XOPEN_SOURCE doesn't get along with Solaris headers very well; include stropts.h; define an os_set_tos() * ircd/os_generic.c (os_set_tos): added an os_set_tos() for os_generic.c * ircd/ircd.c: if there are no C-lines, we don't want to have a timer that expires at the absolute time of 0--it kinda blocks all the other timers! * ircd/engine_devpoll.c: some includes for open(); declare errcode and codesize in engine_loop() * ircd/list.c (free_client): remove bogus check on timer active flag * ircd/s_auth.c: pull out destruction code in auth_timeout_request() into an externally-visible destroy_auth_request(); manage cli_auth pointer in client structure; use it for an extra assertion check * ircd/list.c: include s_auth.h for destroy_auth_request(); add debugging notices to show flow when deallocating connections/clients; call destroy_auth_request() when free'ing a client that has an auth outstanding; don't free the connection if the process timer is unmarked but still active * ircd/ircd_events.c: set GEN_ACTIVE when initializing a generator and reset it before calling the event handler for an ET_DESTROY event * include/s_auth.h (destroy_auth_request): declare destroy_auth_request(), which can be used to destroy an outstanding auth request if a client socket goes away before the auth exchange is completed * include/ircd_events.h: add an active flag to keep track of whether or not particular generators are active, for the convenience of functions using the API * include/client.h: add a pointer for auth requests to struct Connection so we can kill outstanding auth requests if a client socket closes unexpectedly * ircd/s_bsd.c: cli_connect() could become 0 during the course of the sock or timer callback; take that into account in the assert * ircd/list.c: add magic number checking and setting--magic numbers are zero'd on frees to detect double-frees; add back setting of cli_from() to 0 to break the back-link from the struct Connection (duh) * ircd/ircd.c: set me's magic number correctly * include/client.h: define magic numbers and accessor/verifier macros * ircd/list.c: assert that dealloc_client() is called with cli_connect(cptr) == 0; set cli_connect(cptr) to 0 before calling dealloc_client(); don't mess with cli_from(cptr) * ircd/s_bsd.c: only attempt to dealloc a connection if the associated client has already been destroyed, or at least delinked 2001-06-05 Kevin L. Mitchell * ircd/list.c (free_client): only try to delete the socket when the fd hasn't already been closed, avoiding a double-free * ircd/list.c (free_connection): make sure the client is really gone before doing away with the connection * ircd/s_bsd.c: record that socket has been added in con_freeflag field; queue a socket_del() as soon as the socket is close()'d; use con_freeflag & FREEFLAG_TIMER instead of con_timer; clear FREEFLAG_SOCKET on ET_DESTROY event in client_sock_callback(), then dealloc the connection if safe; mark socket as dead when there's a read error or EOF; clear FREEFLAG_TIMER flag upon entry to client_timer_callback(); dealloc connection if safe upon ET_DESTROY event in client_timer_callback() * ircd/list.c: use con_freeflag instead of con_timer; only dealloc the connection if both socket and timer have been destroyed; destroy both socket and timer explicitly and carefully * include/client.h: replace the con_timer field with a con_freeflag field, to indicate what still needs freeing; define the freeflags * ircd/engine_select.c (engine_loop): duh...sockList[i] could become 0 * ircd/engine_devpoll.c (engine_loop): duh...sockList[i] could become 0 * ircd/s_bsd.c: add some extra assertions to try to track down a corruption problem * ircd/engine_select.c (engine_loop): add an extra assert to try to track down a corruption problem * ircd/engine_poll.c (engine_loop): add an extra assert to try to track down a corruption problem * ircd/engine_kqueue.c (engine_loop): add an extra assert to try to track down a corruption problem * ircd/engine_devpoll.c (engine_loop): skip slots that have become empty during processing; add an extra assert to try to track down a corruption problem * ircd/engine_kqueue.c (engine_delete): make sure to zero deleted entries 2001-06-04 Kevin L. Mitchell * ircd/s_bsd.c (client_sock_callback): client is no longer blocked, so we must mark it as unblocked * ircd/engine_select.c: add Debug() calls galore; add handling for SS_NOTSOCK; use a dummy sock variable to keep things from disappearing on us; correct timeout calculation; update nfds for efficiency * ircd/engine_poll.c: use new debugging level (DEBUG_ENGINE); remove a spurious "if (sock)" which will always be true; update nfds for efficiency * ircd/engine_kqueue.c: add Debug() calls galore; add handling for SS_NOTSOCK (just in case); correct timeout calculation * ircd/engine_devpoll.c: add Debug() calls galore; add handling for SS_NOTSOCK; correct timeout calculation; add EAGAIN handling * include/s_debug.h (DEBUG_ENGINE): add new debugging level; pretty-indent numbers * ircd/engine_poll.c (engine_loop): break out SS_NOTSOCK case--it's not a socket; the check for writability is most likely not needed, but present for completeness 2001-05-24 Kevin L. Mitchell * ircd/s_bsd.c: add Debug messages; call read_packet() even if the no newline flag is set; call read_packet() when the timer expires, regardless of what's in the buffer--read_packet() should be able to deal properly * ircd/IPcheck.c (ip_registry_connect_succeeded): correct a NOTICE sent to clients to include the client nickname (duh) * ircd/ircd_events.c: don't destroy a timer if it's already marked for destruction; replace a missing ! in socket_del() * ircd/engine_poll.c (engine_loop): reference a temporary variable so we don't have to worry about sockList[i] going away * ircd/s_bsd.c (client_sock_callback): add Debug messages * ircd/s_auth.c: add Debug messages all over the place * ircd/ircd_events.c: add and edit some Debug messages; add a list of routines to convert some of the enums and flags from numbers into human-readable strings for the Debug messages * ircd/engine_poll.c: hack some Debug messages to use the new name conversion routines in ircd_events.c; add an extra assert for a condition that shouldn't ever happen; apparently recv() can return EAGAIN when poll() returns readable--I wonder why... * include/ircd_events.h: declare some helper routines under DEBUGMODE 2001-05-23 Kevin L. Mitchell * ircd/s_bsd.c (client_sock_callback): add an extra assertion check * ircd/s_auth.c: add more Debug messages * ircd/list.c (make_client): add an extra assertion check * ircd/ircd_events.c (socket_events): don't call the engine events changer if we haven't actually made any changes to the event mask * ircd/uping.c: add some Debug messages * ircd/s_stats.c: document new /STATS e * ircd/s_err.c: add RPL_STATSENGINE to report the engine name * ircd/s_bsd.c: remove static client_timer variable; in read_packet(), if there's still data in the client's recvQ after parsing, add a 2 second timer (con_proc); fix the ET_DESTROY case of client_sock_callback to handle destroying the timer properly; rewrote client_timer_callback from scratch to be called on an individual client * ircd/m_stats.c: add /STATS e to report the engine name * ircd/list.c: deal with con_timer field in struct Connection properly; correct a core-level bug in remove_client_from_list--if the client is the only one in the list, we try to update GlobalClientList's cli_prev pointer--not good * ircd/ircd.c: remove call to init_client_timer() * ircd/engine_poll.c: made Debug messages more uniform by prepending "poll:" to them all; corrected an off-by-one error that caused poll_count to be 1 less than the actual count and removed my work-around; added Debug messages to indicate which socket is being checked and what the results are * ircd/Makefile.in: ran a make depend * include/s_bsd.h: remove init_client_timer(), since we're doing it differently now * include/numeric.h (RPL_STATSENGINE): a stats reply to report the engine name * include/ircd_policy.h (HEAD_IN_SAND_STATS_E): turn off /stats e reports for non-opers * include/client.h: add con_timer and con_proc fields to struct Connection and define accessor macros--con_timer marks that con_proc contains a valid timer, and con_proc is used to pace user data * ircd/s_bsd.c (close_connection): let free_client() destroy the socket * ircd/s_auth.c (start_auth): add a Debug call to indicate when auth has begun on a client * ircd/ircd_events.c: ensure that event_execute() is called with a non-NULL event; modify event_add() macro to properly zero list bits; modify gen_dequeue() to not try to clip it out of a list it's already been clipped out of; change signal socket initialization to use state SS_NOTSOCK; permit timeout values of 0 in add_timer(); add many Debug calls; change socket_del() and timer_del() to always set the GEN_DESTROY flag; use GEN_MARKED in timer_run() instead of GEN_DESTROY so that event_generate() will pass on the events; remove the switch and replace with a simpler if-then-else tree in timer_run(); don't allow destroyed sockets to be destroyed again, nor their states or event masks to be changed * ircd/ircd.c: initialize "running" to 1 * ircd/engine_poll.c: deal with SS_NOTSOCK "sockets"; add Debug messages all over the place; fix a counting problem in engine_add(); turn wait into a signed integer and set it to -1 only if timer_next() returns 0; adjust wait time to be relative; don't call gen_ref_dec() if socket disappeared while we were processing it * include/ircd_events.h: the pipe for signals is not a socket, so we must mark it as such--added SS_NOTSOCK for that special socket; events won't be generated if GEN_DESTROY is on, so add GEN_MARKED for the benefit of timer_run() * configure.in: add --enable-pedantic and --enable-warnings to turn on (and off) -Wall -pedantic in CFLAGS 2001-05-21 Kevin L. Mitchell * ircd/s_conf.c: change "s_addr" element accesses to "address" element accesses * include/s_conf.h: on some systems, "s_addr" is a macro; use "address" instead 2001-05-18 Kevin L. Mitchell * ircd/engine_kqueue.c: include ircd_alloc.h; set_or_clear returns void in this file; add a missing semi-colon; declare errcode, codesize * ircd/uping.c (uping_sender_callback): it's pptr, not uping * ircd/s_user.c (register_user): comment out spurious reference to nextping * ircd/s_serv.c (server_estab): comment out spurious reference to nextping * ircd/s_conf.c (read_configuration_file): comment out spurious reference to nextping and nextconnect * ircd/s_bsd.c: comment out some spurious references to formerly global (now non-existant) variables; correct a couple of typos * ircd/s_auth.c: pre-declare some functions referenced in the callback; correct a typo * ircd/res.c (start_resolver): pass errno value of ENFILE * ircd/listener.c (accept_connection): you know your API is messed up when...variables that shouldn't have been global crop up in other files * ircd/list.c (free_client): substitution of == for = * ircd/ircd_signal.c: include assert.h for assertion checking; check ev_data() to find out what signal generated event * ircd/ircd_events.c: some references to the variable "timer" should have been references to the variable "ptr" * ircd/engine_select.c: it's struct fd_set, not struct fdset; ev_timer(ev) is already a timer pointer; declare codesize as a size_t to correct signedness issue; use timer_next(), not time_next() * ircd/engine_poll.c: ev_timer(ev) is already a timer pointer; select fd out of struct pollfd in assertion checking; declare errcode and codesize; use timer_next(), not time_next() * ircd/engine_kqueue.c: ev_timer(ev) is already a timer pointer; use function timer_next(), not time_next() * ircd/engine_devpoll.c: ev_timer(ev) is already a timer pointer; use function timer_next(), not time_next() * ircd/Makefile.in (IRCD_SRC): add ircd_events.c to the list of compiled sources; do make depend * include/list.h: pre-declare struct Connection * include/ircd_events.h (gen_ref_inc): cast to the right structure name * include/s_auth.h: duh; missing */ 2001-05-10 Kevin L. Mitchell * ircd/send.c: update write events status after sending data or accumulating data to be sent * ircd/m_list.c (m_list): update write events status after canceling a running /list * ircd/channel.c (list_next_channels): update write events status after listing a few channels * ircd/s_bsd.c: extensive changes to update to new events model; remove on_write_unblocked() and the two implementations of read_message(), which have been deprecated by this change * ircd/s_auth.c: set the socket events we're interested in for clients; simplify some logic that does the connect_nonb followed by the socket_add * ircd/list.c: define free_connection() to free a connection that's become freeable once the struct Socket has been deallocated; fix up free_client() to take this new behavior into account * ircd/ircd.c: call init_client_timer() * include/s_bsd.h: declare new REGISTER_ERROR_MESSAGE when unable to register connect-in-progress with events system; declare init_client_timer() (HACK!) to preserve rate-limiting behavior * include/list.h: declare new free_connection() * include/client.h: add a struct Socket to struct Connection 2001-05-09 Kevin L. Mitchell * ircd/ircd_signal.c: massage the handlers for SIGHUP, SIGINT, and SIGTERM into event callbacks; perform the actions in the callbacks, since they're not called in the context of the signal; set up the signal callbacks in the event engine * ircd/ircd_events.c (signal_callback): we're supposed to look for a specific signal; don't generate an event if there is no signal structure for it * ircd/ircd.c: nuke nextconnect and nextping and replace them with connect_timer and ping_timer; massage try_connections() and check_pings() into timer callbacks that re-add themselves at the right time; remove ircd.c's "event_loop()"; initialize the event system and the connect_timer and ping_timer * ircd/uping.c: correct a couple more typos * ircd/s_auth.c: rework to use new events system * ircd/os_solaris.c (os_connect_nonb): update to new interface * ircd/os_openbsd.c (os_connect_nonb): update to new interface * ircd/os_linux.c (os_connect_nonb): update to new interface * ircd/os_generic.c (os_connect_nonb): update to new interface * ircd/os_bsd.c (os_connect_nonb): update to new interface * include/s_auth.h: remove deprecated members of struct AuthRequest, replacing them with struct Socket and struct Timer structures; add flags to indicate when these structures have been released by the event system; remove the deprecated timeout_auth_queries() * include/ircd_osdep.h (os_connect_nonb): connect could complete immediately, so change the interface to handle that possibility * ircd/uping.c (uping_server): noticed and corrected a typo * ircd/listener.c: set up to use ircd_event's struct Socket by adding an socket_add() call to inetport(), replacing free_listener() with socket_del() in close_listener(), and reworking accept_connection to be called as the callback * ircd/ircd.c: add a call to IPcheck_init() * ircd/IPcheck.c: remove IPcheck_expire(); rework ip_registry_expire() to be called from a timer; write IPcheck_init() to set up the expiration timer (hard-coded for a 60-second expiration time) * include/listener.h: add a struct Socket to the struct Listener; remove accept_connection() * include/IPcheck.h: add IPcheck_init(), remove IPcheck_expire() 2001-05-08 Kevin L. Mitchell * ircd/ircd_events.c: include config.h; use USE_KQUEUE and USE_DEVPOLL instead of HAVE_KQUEUE and HAVE_DEVPOLL_H * ircd/engine_select.c: include config.h; set FD_SETSIZE to MAXCONNECTIONS, not IRCD_FD_SETSIZE... * ircd/engine_poll.c: include config.h * ircd/engine_kqueue.c: include config.h * ircd/engine_devpoll.c: include config.h * ircd/Makefile.in: include engine sources in compilation and make depend steps * configure.in: add checks for enabling the /dev/poll- and kqueue-based engines * acconfig.h: add lines for USE_DEVPOLL and USE_KQUEUE * ircd/Makefile.in: work in the engine sources 2001-05-07 Kevin L. Mitchell * ircd/m_settime.c: include ircd_snprintf.h * ircd/ircd_relay.c: stomp a couple of gcc warnings suggesting parens around a construct that had both || and && * ircd/chkconf.c: #include "config.h" to get some important definitions * ircd/Makefile.in: revamp ircd makefile for new build system * doc/Makefile.in: revamp doc makefile for new build system * config/*: Removed old build system files * stamp-h.in: a stamp file * install-sh: install-sh for new build system * configure.in: configure.in for new build system * configure: configure script for new build system (built by autoconf) * config.sub: config.sub for new build system * config.h.in: config.h.in for new build system (built by autoheader) * config.guess: config.guess for new build system * aclocal.m4: aclocal.m4 for new build system (built by aclocal 1.4) * acinclude.m4: aclocal.m4 macros for new build system * acconfig.h: config.h skeleton for new build system * Makefile.in: modify for new build system 2001-05-01 Kevin L. Mitchell * ircd/s_err.c: get rid of the last vestiges of TIME_T_FMT * ircd/m_settime.c: get rid of the last vestiges of TIME_T_FMT * ircd/m_server.c: get rid of the last vestiges of TIME_T_FMT 2001-05-01 Perry Lorier * doc/iauth.doc: Protocol for iauth server. (from hybrid). * doc/linux-poll.patch: Patch to make Linux under 2.2 not deadlock when you have far far too many sockets in use. * {include,ircd}/iauth.c: A start on iauth support. 2001-05-01 Perry Lorier * ircd/s_err.c: Suggested wording change. * ircd/s_user.c: Users aren't target limited against +k users. * ircd/chkconf.c: Made it compile again, who knows if it works, but now I can at least make install * various: Cleanups on m_*.c files. 2001-04-23 Kevin L. Mitchell * ircd/s_misc.c (exit_client): make netsplit server notice say the right thing * ircd/m_links.c (m_links_redirect): forward-port RPL_ENDOFLINKS change to make Khaled happy... * ircd/m_whois.c (do_whois): pull-up of m_whois() fix (do_whois): duh... 2001-04-21 Kevin L. Mitchell * ircd/msgq.c: finally remove the msgq_integrity() hack, as it's turned up no more bugs * ircd/ircd.c: use /* */ comments instead of // comments--all the world's not gcc :( * ircd/s_conf.c (conf_add_server): use /* */ comments instead of // comments--all the world's not gcc :( * ircd/runmalloc.c: finally garbage-collect unused file * include/runmalloc.h: finally garbage-collect unused file * ircd/: addition of '#include "config.h"' before all other includes in most .c files * include/: remove includes of config.h, which are now going into the raw .c files 2001-04-20 Kevin L. Mitchell * ircd/m_whois.c (do_whois): display proper server name if the user is looking up himself * ircd/m_who.c (m_who): disable match by servername or display of server names by non-opers * include/ircd_policy.h: add define for HEAD_IN_SAND_WHO_SERVERNAME to cover full intent of sub-motion 15 of CFV 165 2001-04-18 Kevin L. Mitchell * ircd/s_conf.c: keep the $R in memory so we can see it clearly when we do a /stats k * ircd/s_user.c (set_user_mode): pull-up of changes to prevent users from turning on +s and +g * ircd/s_misc.c (exit_client): pull-up of changes to turn off net.split notice * ircd/parse.c: pull-up of changes to disable /trace, /links, and /map for users * ircd/m_whois.c (do_whois): pull-up of server name masking for /whois * ircd/m_user.c (m_user): removal of umode and snomask defaulting functions, pull-up * ircd/m_stats.c (m_stats): pull-up of stats-disabling stuff * ircd/m_map.c (m_map_redirect): pull-up of m_map_redirect() * ircd/m_links.c (m_links_redirect): pull-up of m_links_redirect() * ircd/channel.c (channel_modes): pull-up of channel key display as * * include/ircd_policy.h: pull-up of ircd_policy.h * include/client.h: pull-up of Set/ClearServNotice() * ircd/gline.c (do_gline): report client name in G-line message (pull-up) * ircd/s_user.c (register_user): pull-up--show IP address in some server notices dealing only with users; report which connection class has filled up * ircd/s_stats.c (report_deny_list): use conf->flags & DENY_FLAGS_IP insteaf of conf->ip_kill * ircd/m_stats.c (report_klines): use conf->flags & DENY_FLAGS_IP insteaf of conf->ip_kill * ircd/s_conf.c: use flags field in struct DenyConf; pull-up of K-line by real name * include/s_conf.h: use a flags field in struct DenyConf; define DENY_FLAGS_FILE, DENY_FLAGS_IP, and DENY_FLAGS_REALNAME for pull-up of K-line by real name * ircd/m_trace.c: pull-up of IP show for user connections * doc/example.conf: pull-up of the realname K-line documentation * ircd/ircd.c: forward port of pid file advisory locking mechanism 2001-04-16 Kevin L. Mitchell * ircd/send.c (sendcmdto_flag_butone): recast to just broadcast to all servers, rather than to only servers that have +w/+g/whatever users on them; among other things, this removes that atrocity known as sentalong[] from this function * ircd/m_admin.c: must include ircd.h to declare "me"; must include hash.h to declare FindUser() * ircd/m_wallusers.c: implementation of WALLUSERS * ircd/m_desynch.c (ms_desynch): only send DESYNCHs to opers * ircd/m_wallops.c: only send WALLOPS to opers * ircd/parse.c: add WALLUSERS command to parser table * include/handlers.h: declare wallusers handlers * include/msg.h: add WALLUSERS command * ircd/send.c (sendcmdto_flag_butone): if FLAGS_OPER is or'd with flag, send only to appropriate opers 2001-04-13 Kevin L. Mitchell * ircd/uping.c: refit to use the new events interface * ircd/res.c: refit to use the new events interface * ircd/ircd_events.c: create timer_chg(), which permits a (non-periodic) timer's expire time to be modified; change the logic in timer_run() so that timers that were re-added while the event was being processed will not be destroyed prematurely * include/uping.h: include the events header, declare some extra fields in struct UPing, remove timeout value, and define some flags for marking which cleanup items have yet to be done * include/ircd_events.h: add a prototype for timer_chg() to change the expire time of a running timer 2001-03-13 Joseph Bongaarts * ircd/os_openbsd.c: Tweaked the openbsd hack a bit. 2001-03-07 Joseph Bongaarts * config/configure.in: Add check for OpenBSD * ircd/os_openbsd.c: Add seperate os dep file for openbsd which differs from generic BSD, particularly in its handling of _XOPEN_SOURCE. 2001-02-12 Kevin L. Mitchell * ircd/m_gline.c (ms_gline): propagate a G-line that happened to have been added by a U-lined server, rather than going through the activate/deactivate logic; propagate G-line removals by U-lined servers as well * ircd/gline.c: rename propagate_gline() to gline_propagate(); make gline_propagate() return an int 0 (convenience return); only update lastmod in gline_activate() and gline_deactivate() if the current lastmod is non-zero, since 0 lastmod is our flag of a U-lined server having added a G-line * include/gline.h (gline_propagate): exporting the G-line propagation function * ircd/m_list.c (m_list): duh; permit explicit channel name specification only when /list gets two arguments ("Kev #wasteland") rather than when /list gets more than two arguments--nice braino 2001-01-29 Thomas Helvey * ircd/ircd_reply.c (need_more_params): fix bug that allowed unregistered clients to spam opers with protocol violation messages. Note: the bugfix may have eliminated some useful protocol violation messages. Please send protocol violation messages explicitly from the functions they are discovered in, you have much better context for the error there and it helps to document the behavior of the server. This was also a design bug in that it violated the "A function should do one thing" heuristic. Patching this one would have resulted in a continuous spawning of other bugs over the next 3 years, so I killed it. Check around for stuff this broke and readd the calls to protocol_violation in the functions that need to send the message. 2001-01-29 Kevin L. Mitchell * ircd/channel.c (mode_parse_ban): stopper a tiny leak--if a ban already existed, then the logic would (attempt to) skip it, but would not free the ban string; now the ban string is free'd and the ban count is decremented, releasing the ban for use * ircd/s_user.c: make send_umode_out() take a prop argument instead of testing for the PRIV_PROPAGATE privilege itself; fix set_umode() to use this new argument, calculating it before calculating the new privileges for a -o'd user * ircd/m_oper.c (m_oper): pass the new prop argument to send_umode_out() * ircd/channel.c (mode_parse_ban): turn off MODE_ADD bit in bans that we're not actually going to add because they already exist; test that particular bit before adding to the linked list * include/s_user.h: add a prop argument to send_umode_out() to indicate whether or not to propagate the user mode 2001-01-24 Kevin L. Mitchell * ircd/msgq.c: ircd_vsnprintf() returns the number of bytes that it would have written; upper-bound the number to prevent overflows by proxy; also, tune buffer size given to ircd_vsnprintf() to take into account the fact that ircd_vsnprintf() already takes the terminal \0 into account 2001-01-22 Kevin L. Mitchell * ircd/msgq.c: add an incredibly ugly hack to attempt to track down an apparent buffer overflow; remove msgq_map(), since it's no longer used anywhere; slight tweaks to prevent off-by-one errors, but these can't explain the problems we've seen * include/msgq.h: remove msgq_map(), since it's no longer used anywhere 2001-01-18 Kevin L. Mitchell * ircd/s_user.c (set_nick_name): call client_set_privs() after parsing user modes 2001-01-17 Kevin L. Mitchell * ircd/s_bsd.c (read_message): fix a typo in the select version of read_message() * ircd/whowas.c (whowas_free): MyFree() is a macro that expects its argument to be an lvalue, which means we can't use whowas_clean()'s handy-dandy "return ww" feature * ircd/ircd_features.c: default LOCOP_KILL to TRUE--oops... 2001-01-16 Kevin L. Mitchell * ircd/ircd_events.c (timer_run): it's possible that the timer got deleted during the callback processing, so don't go to the bother of requeuing it if the destroy flag is set * ircd/engine_select.c: define FD_SETSIZE to be IRCD_FD_SETSIZE out of config.h if this is a *BSD; include errno.h (oops); decrement error count after an hour using a timer; use FD_SETSIZE constant instead of IRCD_FD_SETSIZE constant; fill in event processing code * ircd/engine_poll.c: include errno.h (oops); decrement error count after an hour using a timer; fill in event processing code * ircd/engine_kqueue.c: include errno.h (oops); decrement error count after an hour using a timer; assert events filter is either EVFILT_READ or EVFILT_WRITE; fill in event processing code * ircd/engine_devpoll.c: include errno.h (oops); decrement error count after an hour using a timer; fill in event processing code 2001-01-15 Kevin L. Mitchell * ircd/client.c: fixed feattab; basically, when I changed features to use small integers specifying bit positions, instead of the bits themselves, I forgot to update feattab to not | these privileges together; also fixed a bug in the antiprivs masking loop in client_set_privs()--last index wouldn't get parsed 2001-01-11 Kevin L. Mitchell * ircd/ircd_events.c: call event_generate() with new data argument; make it set that field in struct Event; make socket_add() return the value of the eng_add callback * ircd/engine_select.c: make engine_add() return a successful/unsuccessful status; add bounds-checking outside of an assert; use accessor macros; use log_write(), not the deprecated ircd_log(); add an assert to engine_loop() to double-check for data structure corruption * ircd/engine_poll.c: make engine_add() return a successful/unsuccessful status; add bounds-checking outside of an assert; use accessor macros; use log_write(), not the deprecated ircd_log(); add an assert to engine_loop() to double-check for data structure corruption * ircd/engine_kqueue.c: implementation of an engine for kqueue() * ircd/engine_devpoll.c: implementation of an engine for /dev/poll * include/ircd_events.h: define some accessor macros; add ev_data to struct Event for certain important data--errno values, for instance; make EngineAdd callback tell us if it was successful or not; add extra argument to event_generate(); make socket_add() return the status from EngineAdd 2001-01-10 Kevin L. Mitchell * ircd/ircd_events.c: pass initializer information about how many total _filedescriptors_ may be opened at once * ircd/ircd.c: use exported "running" instead of unexported thisServer.running * ircd/engine_select.c: implementation of an event engine based on select() * ircd/engine_poll.c: implementation of an event engine based on poll() * include/ircd_events.h: pass the engine initializer an integer specifing how many _filedescriptors_ may be opened at once * include/ircd.h: running has to be exported for the engine_* event loops 2001-01-09 Kevin L. Mitchell * ircd/ircd_events.c: include some needed headers; add some comments; make evEngines[] const; bundle sig_sock and sig_fd into a struct named sigInfo; rework struct evInfo to have a queue of _generators_, and only when threaded; added a gen_init() function to centralize generator initialization; fix various compile-time errors; rework event_add() for new queueing scheme and checked for compile-time errors; add casts where needed; spell evEngines[] correctly; make engine_name() return const char* * include/ircd_events.h: type EventCallBack depends on struct Event, so pre-declare it; put _event_ queue into generators, and only when threaded; give engine data a union to store both ints and pointers; make engine name a const; fix gen_ref_dec() macro; make engine_name() return a const char* * ircd/ircd_events.c: gen_dequeue() is now exported, so move it down with the non-static functions; modify event_execute() to use the new gen_ref_dec() to simplify code; make sure event_generate() does not generate new events for generators marked for destruction * include/ircd_events.h: the engines, at least, may need to modify reference counts to keep generators from going away while something still points at them, so add reference counter manipulators and export gen_dequeue() for them * ircd/ircd_events.c: set up the list of engines to try; set up the signal struct Socket; rename netInfo to evInfo; move static functions near the beginning of the file; do away with signal_signal() (since we no longer keep a signal count ourselves) and call event_generate() directly from signal_callback--also renamed some functions; allow signal_callback() to read up to SIGS_PER_SOCK at once from the signal pipe; add event_init() to initialize the entire event system; add event_loop() to call the engine's event loop; initialize new struct GenHeader member, gh_engdata; remove timer_next(); add socket_add() function to add a socket; add socket_del() to mark a socket for deletion; add socket_state() to transition a socket between states; add socket_events() to set what events we're interested in on the socket; add engine_name() to retrieve event engine's name * include/ircd_events.h: add engine data field to struct GenHeader; rename SOCK_ACTION_REMOVE to SOCK_ACTION_DEL; add a note about states vs s_events; remove signal count; fold union Generator back into struct Event; remove count members from struct Generators; redefine engine callbacks to not take a struct Engine*; add explanatory comments to callback definitions; add some engine callbacks to handle operations; remove struct Engine flag member--can detect single flag from eng_signal member; add event_init(), event_loop(), engine_name(), and the socket_*() functions; make timer_next() a macro to avoid a function call 2001-01-08 Kevin L. Mitchell * include/ircd_events.h: rename to ircd_events.h, since it handles events, not just networking stuff; add signal support; more structural rearrangement * ircd/ircd_events.c: rename to ircd_events.c, since it handles events, not just networking stuff; add signal support; more structural rearrangement 2001-01-07 Kevin L. Mitchell * ircd/ircd_network.c: implement timer API; add reference counts appropriately * include/ircd_network.h: firm up some pieces of the interface; split out members everything has into a separate structure; add reference counts; add timer API 2001-01-06 Kevin L. Mitchell * ircd/ircd_network.c: static data and event manipulation functions for new event processing system * include/ircd_network.h: data structures for new event processing system 2001-01-03 Kevin L. Mitchell * ircd/whowas.c: Completely re-did the old allocation scheme by turning it into a linked list, permitting the NICKNAMEHISTORYLENGTH feature to be changed on the fly * ircd/s_debug.c (count_memory): use FEAT_NICKNAMEHISTORYLENGTH feature instead of old #define * ircd/ircd_features.c: add NICKNAMEHISTORYLENGTH feature as an integer feature with a notify callback (whowas_realloc) * ircd/client.c (client_set_privs): second memset was supposed to be over antiprivs, not privs; thanks, Chris Behrens for pointing that out... * include/whowas.h: new elements for an extra linked list in struct Whowas; a notify function for feature value changes * include/ircd_features.h: new feature--FEAT_NICKNAMEHISTORYLENGTH * config/config-sh.in: NICKNAMEHISTORYLENGTH is now a feature 2001-01-02 Kevin L. Mitchell * config/config-sh.in: get rid of DEFAULT_LIST_PARAMETER compile-time option--now in features subsystem * ircd/motd.c (motd_init): rework motd_init() to be called as the notify function for MPATH and RPATH features (should probably split it up a bit, though...) * ircd/m_privs.c (mo_privs): if called with no parameters, return privs of the caller, rather than an error * ircd/m_list.c: pull usage message into its own function; pull list parameter processing into its own function that does not modify the contents of the parameter; add list_set_default() to set the default list parameter (uses the notify hook); rework m_list() to make use of these functions; removed dead code * ircd/ircd_log.c (log_feature_mark): make sure to return 0, since we have no notify handler * ircd/ircd_features.c: add notify callback for notification of value changes; give mark callback an int return value to indicate whether or not to call the notify callback; fix up feature macros for new notify callback; add DEFAULT_LIST_PARAM feature; rewrite string handling in feature_set() to deal with def_str being a null pointer; wrote feature_init() to set up all defaults appropriately * ircd/ircd.c (main): call feature_init() instead of feature_mark(), to avoid calling notify functions while setting up defaults * ircd/client.c: updated to deal with new privileges structure * ircd/class.c: updated so init_class() can be called should one of PINGFREQUENCY, CONNECTFREQUENCY, MAXIMUM_LINKS, or DEFAULTMAXSENDQLENGTH be changed * include/ircd_log.h: log_feature_mark() updated to fit with new API changes * include/ircd_features.h: added DEFAULT_LIST_PARAM feature and feature_init() function (found necessary since adding the notify stuff and notifying motd.c during start-up...before we defined RPATH!) * include/client.h: move privs around to enable addition of more bits if necessary; based on the FD_* macros * include/channel.h: declare list_set_default (actually located in m_list.c *blanche*) * ircd/s_user.c: retrieve MAXSILES and MAXSILELENGTH (now AVBANLEN*MAXSILES) from features subsystem * ircd/s_debug.c (debug_serveropts): CMDLINE_CONFIG doesn't go to anything anymore * ircd/s_bsd.c: retrieve HANGONGOODLINK and HANGONRETRYDELAY from the features subsystem * ircd/s_auth.c (start_auth): NODNS migrated to the features subsystem * ircd/random.c: created random_seed_set() function to set seed value, along with some stuff to make ircrandom() a little more random--state preserving, xor of time instead of direct usage, etc.; it's still a pseudo-random number generator, though, and hopefully I haven't broken the randomness * ircd/m_version.c: FEATUREVALUES makes use of feature_int() calls * ircd/m_join.c: use features interface to retrieve MAXCHANNELSPERUSER * ircd/ircd_features.c: add NODISP flag for super-secret features; add a whole bunch of new features migrated over from make config * ircd/ircd.c: use features interface to retrieve PINGFREQUENCY, CONNECTTIMEOUT, and TIMESEC * ircd/client.c (client_get_ping): use features interface to retrieve PINGFREQUENCY * ircd/class.c: use features interface to retrieve PINGFREQUENCY, CONNECTFREQUENCY, MAXIMUM_LINKS, and DEFAULTMAXSENDQLENGTH * ircd/chkconf.c (DEFAULTMAXSENDQLENGTH): since it's now in the features subsystem, we have to add something explicit * ircd/channel.c: use features interface to retrieve KILLCHASETIMELIMIT, MAXBANLENGTH, MAXBANS, and MAXCHANNELSPERUSER; note that MAXBANLENGTH is now calculated dynamically from MAXBANS and AVBANLEN * ircd/Makefile.in: run make depend * include/supported.h (FEATURESVALUES): update to reference feature settings * include/random.h: add prototype for random_seed_set * include/ircd_features.h: add several more features * include/channel.h: move MAXBANS and MAXBANLENGTH into feature subsystem * config/config-sh.in: feature-ized some more stuff * include/motd.h: some new elements in motd.h for motd.c changes * ircd/motd.c: motd_cache() now searches a list of already cached MOTD files; saves us from having duplicate caches in memory if there are two identical T-lines for two different sites... 2001-01-02 Perry Lorier * ircd/motd.c: don't core if the motd isn't found. Bug found by Amarande. 2001-01-02 Perry Lorier * ircd/s_err.c: Added third param to 004 - the channel modes that tage params. Used by hybrid/epic. * ircd/s_channels.c: Added fix for msg'ing a -n+m channel - thanks to guppy for noticing, and hektik for providing the fix. * misc others: Minor cleanups, added more protocol_violations, ripped out more P09 stuffs, bit more protocol neg stuff. 2000-12-19 Kevin L. Mitchell * ircd/m_ison.c (m_ison): Dianora says that ISON has to end with a space (*sigh* stupid clients...) * ircd/s_user.c: make WALLOPS_OPER_ONLY a feature managed through ircd_features.[ch] * ircd/s_err.c: get rid of GODMODE conditionals * ircd/s_debug.c (debug_serveropts): switch to using appropriate calls into the features subsystem for various serveropts characters * ircd/s_conf.c (find_conf_entry): get rid of USEONE conditional * ircd/s_bsd.c: remove GODMODE conditional; use features subsystem to get value of VIRTUAL_HOST and CLIENT_FLOOD; remove NOFLOWCONTROL conditional * ircd/s_auth.c: use features subsystem to determine value of KILL_IPMISMATCH * ircd/parse.c: get rid of NOOPER and GODMODE conditionals; use features subsystem to determine the setting of IDLE_FROM_MSG * ircd/numnicks.c: get rid of EXTENDED_NUMERICS conditionals * ircd/motd.c: get value of NODEFAULTMOTD from features subsystem; use features subsystem to get motd file names * ircd/m_settime.c: get value of RELIABLE_CLOCK from features subsystem * ircd/m_server.c: get rid of CRYPT_LINK_PASSWORD, since it does us no good; use features subsystem to figure out if we need to do HUB-type stuff; make TESTNET debugging sendto_opmask_butone's use the Debug(()) macro instead; get value of RELIABLE_CLOCK from features subsystem * ircd/m_privmsg.c: get IDLE_FROM_MSG from the features subsystem * ircd/m_oper.c: get CRYPT_OPER_PASSWORD from the features subsystem * ircd/m_connect.c: get SERVER_PORT from the features subsystem * ircd/ircd_log.c (log_set_file): fix a bug that kept log files from getting marked if they were already set to something... * ircd/ircd_features.c: add a flag to indicates read-only access; add several new features that used to be compile-time selected * ircd/ircd.c: grab pidfile out of feature subsystem; don't check access to motd files (what the heck?); make sure to initialize the feature subsystem before trying to write the config file * ircd/dbuf.c: use feature_int() to retrieve BUFFERPOOL settings; use feature_bool() to figure out if we're using the FERGUSON flusher * ircd/Makefile.in: MPATH and RPATH are now done differently, so remove the clause that creates empty files of that name; also ran make depend * include/sys.h: CLIENT_FLOOD is now a feature; unfortunately, there is no easy way to bounds-check it at present * include/querycmds.h: make sure ircd_features.h is included; use feature_str(FEAT_DOMAINNAME) in calls to match() * include/ircd_features.h: many new features that used to be compile-time selected * config/config-sh.in: add * to DOMAINNAME; try also using first argument to search in /etc/resolv.conf; removed many compile-time options that now can be configured through the features system 2000-12-18 Kevin L. Mitchell * doc/api/log.txt: how to use the logging API * doc/api/features.txt: how to use the features API * doc/api/api.txt: how to write API documentation * include/ircd_features.h: rearranged a couple of features for neatness purposes * ircd/ircd_features.c: cleaned up the macros some; rearranged some code to all go into the switch; rearranged a couple of features for neatness purposes 2000-12-16 Greg Sikorski * ircd/os_bsd.c: Added os_set_tos for BSD users. 2000-12-16 Kevin L. Mitchell * ircd/ircd_features.c: Isomer almost got it right; you need to use F_I(), since it's an integer value, not a boolean value. The asserts in feature_int would catch you out... Also made the F_* macros take flags * ircd/s_err.c: define RPL_PRIVS reply * ircd/parse.c: put new PRIVS command into command table * ircd/m_privs.c (mo_privs): message handler to report operator privileges * ircd/ircd_features.c: declare new features OPER_SET and LOCOP_SET; redo boolean testing routine to accept TRUE, YES, and ON for boolean TRUE, and FALSE, NO, and OFF for boolean FALSE * ircd/client.c: simplify client_set_privs() with a table that defines what features to test for; add new client_report_privs() * ircd/Makefile.in: compile new m_privs.c; run make depend * include/numeric.h (RPL_PRIVS): new reply numeric for displaying an operator's privileges * include/msg.h: define new command: PRIVS * include/ircd_features.h: create new features OPER_SET and LOCOP_SET for controlling access to /set * include/handlers.h (mo_privs): declare message handler for reporting oper privileges * include/client.h (client_report_privs): declare function to report what privileges an oper has * ircd/m_whois.c (do_whois): fix a bug that caused /whois to report that a user is an oper if the oper doing the /whois had PRIV_SEE_OPERS 2000-12-17 Isomer * ircd/listener.c: added support for TOS twiddling as a 'feature'. 2000-12-17 Isomer * ircd/os_linux.c: add TOS stuffs * ircd/listener.c: add TOS stuffs 2000-12-16 Kevin L. Mitchell * ircd/whocmds.c (do_who): use HasPriv to determine whether or not to indicate a user is an oper * ircd/s_user.c: clear privileges setting when deopping; don't propagate +o unless user has PRIV_PROPAGATE privilege * ircd/s_debug.c (debug_serveropts): created debug_serveropts() function and replaced how the server option string is generated * ircd/parse.c: remove conditional on CONFIG_OPERCMDS * ircd/m_whois.c (do_whois): use HasPriv to determine whether or not to indicate the user is an operator * ircd/m_who.c: use HasPriv to determine whether or not a user should be displayed in the list of opers * ircd/m_version.c: call debug_serveropts() to get server option string * ircd/m_userip.c (userip_formatter): use HasPriv to determine whether or not to show oper status * ircd/m_userhost.c (userhost_formatter): use HasPriv to determine whether or not to show oper status * ircd/m_restart.c (mo_restart): replace ugly #ifdef conditional checks with HasPriv check; remove dead code * ircd/m_rehash.c (mo_rehash): replace ugly #ifdef conditional checks with HasPriv check * ircd/m_opmode.c (mo_opmode): use HasPriv to check permissions; use feature_bool to check if disabled * ircd/m_oper.c (m_oper): set oper priviliges * ircd/m_mode.c (m_mode): replace #ifdef conditional with HasPriv check * ircd/m_kill.c (mo_kill): use HasPriv checks to determine if we can kill * ircd/m_kick.c (m_kick): replace #ifdef conditional with HasPriv check * ircd/m_jupe.c (mo_jupe): rework permissions checking structure; use feature_bool to check if disabled * ircd/m_join.c (m_join): remove BADCHAN conditional; replace #ifdef conditional with a HasPriv check * ircd/m_gline.c (mo_gline): rework permissions checking structure; use feature_bool to check if any part is disabled * ircd/m_die.c: replace ugly #ifdef conditionals with HasPriv check; remove dead code * ircd/m_clearmode.c: use feature_bool() to detect if we're disabled; use HasPriv to figure out what we're permitted to do; only allow clearmode on moded channels * ircd/ircd_features.c: define various features; use HasPriv to verify permissions to set/reset * ircd/gline.c (gline_add): use HasPriv instead of #ifdef conditionals * ircd/client.c (client_set_privs): function to set an oper's privileges * ircd/channel.c: use HasPriv calls instead of #ifdef conditionals * include/whocmds.h: deconditionalize several macros and substitute appropriate calls to HasPriv() * include/s_debug.h: get rid of global serveropts[]; define new function debug_serveropts() to build that string on the fly * include/ircd_features.h: define some features * include/client.h: add privs member to struct Connection; define various priviledges * include/channel.h: no longer using IsOperOnLocalChannel; remove conditional of MAGIC_OPER_OVERRIDE on OPER_WALK_THROUGH_LMODES * doc/Configure.help: remove help information for deprecated options * config/config-sh.in: remove certain deprecated options having to do with what opers can and cannot do--first stage in moving compile-time constants into the .conf 2000-12-16 Isomer * ircd/parse.c: detect if the prefix is missing and try and recover instead of coring. 2000-12-15 Kevin L. Mitchell * ircd/ircd_log.c: found and fixed some bugs in the debug logging code that would sometimes result in the log file not being reopened--which meant that a user could connect and get the logging output--oops * ircd/Makefile.in: run make depend... * ircd/s_stats.c: get rid of report_feature_list() * ircd/s_err.c: add the 'bad value' error message, shift error messages over somewhat * ircd/s_debug.c (debug_init): call log_debug_init with the use_tty flag * ircd/s_conf.c (read_configuration_file): unmark features before reading the config file, then reset unmarked features after reading the config file * ircd/m_stats.c: use feature_report() instead of report_feature_list() * ircd/ircd_log.c: fix log_debug_file (bogus assertion); add special 'mark' flags and use them; add the stuff needed by the features API * ircd/ircd_features.c: rework the features API and add gobs of comments to try to explain what some of these complex functions are actually doing * include/s_stats.h: get rid of report_feature_list(); use feature_report() instead * include/numeric.h: added a new error message and shifted old values over some--this is, after all, an alpha * include/ircd_log.h: log_debug_init now takes an integer to tell it if it should be using the tty; added a couple of functions required by the features API * include/ircd_features.h: add an enum and some more functions to flesh out the feature API--it should now be possible to put all those compile-time constants in the config file! * ircd/send.c: got the direction of the assert incorrect... * ircd/send.c: implement the efficiency of flush_connections by creating a linked list of struct Connection's with queued data; also get rid of flush_sendq_except and make sure to yank connections out of the list when their sendQs become empty (notice the assertion in flush_connections!) * ircd/s_bsd.c (close_connection): must yank the Connection out of the sendq list * ircd/list.c (dealloc_connection): must yank the Connection out of the sendq list * ircd/dbuf.c (dbuf_put): call flush_connections instead of the deprecated flush_sendq_except * ircd/client.c: define a couple new helper functions for sendq threading--this will make the flush_connections function in send.c considerably more efficient by creating a linked list of Connections that have queued data to send * include/send.h: remove flush_sendq_except, as it's not used anymore * include/client.h: declare a couple new helper functions for the sendq threading system 2000-12-14 Kevin L. Mitchell * ircd/m_ison.c (m_ison): Apply Diane Bruce's patch to make ISON parse all arguments * ircd/s_debug.c (count_memory): modify to report for clients and connections, not local clients and remote clients * ircd/list.c: fiddle with the client-fiddling functions to take into account the divorce of struct Connection from struct Client * ircd/ircd.c: define a struct Connection for me, initialize it, and link it into the right place (ewww, globals!) * include/client.h: remove CLIENT_{LOCAL,REMOTE}_SIZE; split struct Client into struct Client and struct Connection; redefine local-portion accessor macros to go through struct Client to the struct Connection; define struct Connection accessor macros 2000-12-13 Kevin L. Mitchell * ircd/whowas.c: missed a couple of accesses to a struct Client * ircd/uping.c: missed a couple of accesses to a struct Client * ircd/send.c: missed a couple of accesses to a struct Client * ircd/s_user.c: missed a couple of accesses to a struct Client * ircd/s_misc.c: missed a couple of accesses to a struct Client * ircd/s_conf.c: missed a couple of accesses to a struct Client * ircd/s_bsd.c: missed a couple of accesses to a struct Client * ircd/s_auth.c: missed a couple of accesses to a struct Client * ircd/res.c: missed a couple of accesses to a struct Client * ircd/parse.c: missed a couple of accesses to a struct Client * ircd/m_whois.c: use new accessor macros for struct Client * ircd/m_who.c: use new accessor macros for struct Client * ircd/m_wallchops.c: use new accessor macros for struct Client * ircd/m_version.c: use new accessor macros for struct Client * ircd/m_userip.c: use new accessor macros for struct Client * ircd/m_userhost.c: use new accessor macros for struct Client * ircd/m_user.c: use new accessor macros for struct Client * ircd/m_uping.c: use new accessor macros for struct Client * ircd/m_trace.c: use new accessor macros for struct Client * ircd/m_topic.c: use new accessor macros for struct Client * ircd/m_time.c: use new accessor macros for struct Client * ircd/m_stats.c: use new accessor macros for struct Client * ircd/m_squit.c: use new accessor macros for struct Client * ircd/m_silence.c: use new accessor macros for struct Client * ircd/m_server.c: use new accessor macros for struct Client; remove dead code * ircd/m_rpong.c: use new accessor macros for struct Client * ircd/m_rping.c: use new accessor macros for struct Client * ircd/m_quit.c: use new accessor macros for struct Client * ircd/m_privmsg.c: use new accessor macros for struct Client * ircd/m_pong.c: use new accessor macros for struct Client; remove dead code * ircd/m_ping.c: use new accessor macros for struct Client * ircd/m_pass.c: use new accessor macros for struct Client * ircd/m_part.c: use new accessor macros for struct Client * ircd/m_oper.c: use new accessor macros for struct Client * ircd/m_notice.c: use new accessor macros for struct Client * ircd/m_nick.c: use new accessor macros for struct Client * ircd/m_names.c: use new accessor macros for struct Client * ircd/m_mode.c: use new accessor macros for struct Client * ircd/m_map.c: use new accessor macros for struct Client * ircd/m_list.c: use new accessor macros for struct Client * ircd/m_links.c: use new accessor macros for struct Client; remove some dead code * ircd/m_kill.c: use new accessor macros for struct Client; remove some dead code * ircd/m_kick.c: use new accessor macros for struct Client * ircd/m_join.c: use new accessor macros for struct Client; remove some dead code * ircd/m_ison.c: use new accessor macros for struct Client * ircd/m_invite.c: use new accessor macros for struct Client * ircd/m_info.c: use new accessor macros for struct Client * ircd/m_gline.c: use new accessor macros for struct Client * ircd/m_error.c: use new accessor macros for struct Client * ircd/m_create.c: use new accessor macros for struct Client * ircd/m_connect.c: use new accessor macros for struct Client; removed some dead code * ircd/m_burst.c: use new accessor macros for struct Client * ircd/m_away.c: use new accessor macros for struct Client * ircd/m_admin.c: use new accessor macros for struct Client * ircd/hash.c: missed a couple of accesses to a struct Client * ircd/gline.c: missed a couple of accesses to a struct Client * ircd/crule.c: missed a couple of accesses to a struct Client * ircd/class.c: missed an access to a struct Client * ircd/channel.c: missed a couple of accesses to a struct Client * ircd/IPcheck.c: missed an access to a struct Client * include/querycmds.h: fix a couple of stats macros to use structure accessor macros * include/client.h: change structure member names to highlight any places in the code I've missed 2000-12-12 Kevin L. Mitchell * ircd/whowas.c: use new struct Client accessor macros * ircd/whocmds.c: use new struct Client accessor macros * ircd/send.c: use new struct Client accessor macros * ircd/s_user.c: use new struct Client accessor macros; removed some dead code * ircd/s_serv.c: use new struct Client accessor macros; removed some dead code * ircd/s_numeric.c: use new struct Client accessor macros * ircd/s_misc.c: use new struct Client accessor macros * ircd/s_debug.c: use new struct Client accessor macros * ircd/s_conf.c: use new struct Client accessor macros * ircd/s_bsd.c: use new struct Client accessor macros * ircd/s_auth.c: use new struct Client accessor macros * ircd/parse.c: use new struct Client accessor macros * ircd/packet.c: use new struct Client accessor macros * ircd/numnicks.c: use new struct Client accessor macros * ircd/motd.c: use new struct Client accessor macros * ircd/listener.c: use new struct Client accessor macros * ircd/list.c: use new struct Client accessor macros * ircd/jupe.c: use new struct Client accessor macros * ircd/ircd_snprintf.c: use new struct Client accessor macros * ircd/ircd_reply.c: use new struct Client accessor macros * ircd/ircd_relay.c: use new struct Client accessor macros * ircd/ircd.c: use new struct Client accessor macros * ircd/gline.c: catch some instances of me. I missed previously * ircd/client.c: use cli_ instead of con_ * ircd/class.c: use cli_ instead of con_ * ircd/channel.c: use cli_ instead of con_ * ircd/IPcheck.c: use cli_ instead of con_; catch some instances of me. I missed previously * include/client.h: use cli_ instead of con_...seemed like a good idea at the time *shrug* 2000-12-11 Kevin L. Mitchell * ircd/hash.c: use struct Client accessor macros * ircd/gline.c: use struct Client accessor macros * ircd/crule.c: use struct Client accessor macros * ircd/client.c: use struct Client accessor macros; remove some dead code * ircd/class.c: use struct Client accessor macros * ircd/channel.c: use struct Client accessor macros; remove some dead code * ircd/IPcheck.c: use struct Client accessor macros * include/numnicks.h: use struct Client accessor macros * include/client.h: first step to divorcing struct Client and struct Connection--define accessor macros and use them * ircd/gline.c: When Uworld removed Uworld-set G-lines, only the uplink would remove them. This is because the removal protocol message wasn't being sent to the uplinks. This is fixed by fixing propagate_gline() to send the proper number of arguments depending on whether or not we're adding or deleting the Uworld gline, and by having gline_deactivate() make sure to turn off the active bit and call propagate_gline() if it's a Uworld gline 2000-12-10 Kevin L. Mitchell * ircd/os_generic.c: make sure IOV_MAX gets defined, just in case * ircd/os_bsd.c: apparently BSD doesn't have IOV_MAX defined anywhere intelligent... 2000-12-09 Kevin L. Mitchell * ircd/send.c (send_queued): call deliver_it with appropriate arguments * ircd/s_serv.c: reorder a couple of headers--cosmetic * ircd/s_bsd.c (deliver_it): make deliver_it work with a struct MsgQ * ircd/os_solaris.c (os_sendv_nonb): function for calling writev with appropriate iovec * ircd/os_linux.c (os_sendv_nonb): function for calling writev with appropriate iovec * ircd/os_generic.c (os_sendv_nonb): function for calling writev with appropriate iovec * ircd/os_bsd.c (os_sendv_nonb): function for calling writev with appropriate iovec * ircd/msgq.c (msgq_mapiov): add a len_p argument for totalling up exactly how much we're trying to write out to the fd * include/s_bsd.h: make deliver_it take a struct MsgQ * include/msgq.h: add a len_p argument to msgq_mapiov to help detect short writes that indicate possible socket blocking * include/ircd_osdep.h: declare os_sendv_nonb() * ircd/channel.c (modebuf_mode): don't add empty modes... 2000-12-08 Kevin L. Mitchell * include/send.h: add prio argument to send_buffer to select between normal and priority queues * ircd/s_user.c (send_user_info): add prio argument to send_buffer call * ircd/m_ison.c (m_ison): add prio argument to send_buffer call * ircd/ircd_reply.c (send_reply): add prio argument to send_buffer call * ircd/channel.c (send_channel_modes): add prio argument to send_buffer call * ircd/send.c (send_buffer): add a prio argument to select the priority queue; update send.c functions to use it * ircd/msgq.c (msgq_add): remove msgq_prio; fold msgq_link and msgq_add; add a prio argument to msgq_add to select the priority queue * include/msgq.h: remove msgq_prio; add a prio argument to msgq_add * ircd/send.c: remove sendbuf; remove GODMODE code; switch to using msgq functions instead of dbuf functions; remove old, dead sendto_* functions; redo send_buffer to take a struct MsgBuf; rework sendcmdto_* functions to make use of the new struct MsgBuf * ircd/s_user.c: remove hunt_server; restructure send_user_info to make appropriate use of struct MsgBuf * ircd/s_debug.c (count_memory): count memory used by the MsgQ system and report it * ircd/s_conf.c (read_configuration_file): use sendto_opmask_butone instead of the now dead sendto_op_mask * ircd/s_bsd.c: switch to using appropriate MsgQLength and other calls on sendQ * ircd/parse.c (parse_server): get rid of a piece of GODMODE code * ircd/msgq.c: add msgq_append and msgq_bufleft; fix a bug in msgq_clean * ircd/m_version.c: fix spelling in comments marking dead code * ircd/m_userip.c (userip_formatter): restructure to make use of struct MsgBuf * ircd/m_userhost.c (userhost_formatter): restructure to make use of struct MsgBuf * ircd/m_stats.c: use MsgQLength on a sendQ * ircd/m_settime.c: use MsgQLength instead of DBufLength on a sendQ; mark a piece of dead code * ircd/m_names.c: use send_reply instead of sendto_one * ircd/m_mode.c: use new mode; remove old dead code * ircd/m_ison.c (m_ison): restructure to make use of struct MsgBuf * ircd/m_burst.c: use BUFSIZE instead of IRC_BUFSIZE; remove old dead code * ircd/listener.c (accept_connection): use sendto_opmask_butone instead of sendto_op_mask * ircd/list.c (free_client): use MsgQClear to clear sendQ * ircd/ircd_reply.c: remove send_error_to_client; restructure send_reply to make use of struct MsgBuf * ircd/dbuf.c (dbuf_put): remove argument to flush_sendq_except, since its no longer used (at least currently) * ircd/channel.c: restructure send_channel_modes to make use of struct MsgBuf; remove set_mode, add_token_to_sendbuf, cancel_mode, and send_hack_notice; use BUFSIZE instead of IRC_BUFSIZE * ircd/Makefile.in: add msgq.c to list of sources; run make depend * ircd/IPcheck.c: use sendcmdto_one instead of sendto_one * include/send.h: send_buffer now takes a struct MsgBuf * instead of a char *; flush_sendq_except now takes no arguments, as sendq flushing currently only happens in dbuf.h and sendQ is a struct MsgQ; remove prototypes for a lot of old sendto_* functions that aren't used anymore; remove sendbuf and IRC_BUFSIZE--the former is no longer needed, and the latter is identical to BUFSIZE in ircd_defs.h * include/s_user.h: make InfoFormatter take a struct MsgBuf* instead of a char *; also make it return void, instead of char * * include/msgq.h: add msgq_append and msgq_bufleft functions * include/client.h: use a struct MsgQ instead of a struct DBuf for sendq * doc/Configure.help: Remove help for compile-time options that have gone away * config/config-sh.in: remove CONFIG_NEWMODE * ircd/m_server.c (mr_server): don't send server IPs in any server notices * ircd/msgq.c (msgq_vmake): add \r\n to messages 2000-12-07 Kevin L. Mitchell * include/msgq.h: declare the MsgQ API * ircd/msgq.c: implementation of new MsgQ system 2000-12-06 Kevin L. Mitchell * ircd/ircd_features.c: #include was supposed to be for ircd_features.h, not features.h--missed when I had to do a rename because of namespace collision 2000-12-05 Greg Sikorski * ircd/m_topic.c: Added missing braces that caused all remote topics to be ignored. 2000-12-04 Kevin L. Mitchell * ircd/m_create.c: I'm tired of the exit_client warning :) (ms_create): discovered that exit_client() was being called with too few arguments * ircd/s_misc.c (exit_client): remove all dependance on FNAME_USERLOG, since that's now gone; log only to LS_USER * ircd/s_debug.c: USE_SYSLOG no longer means anything * ircd/m_oper.c (m_oper): no longer log to LS_OPERLOG--we already log to LS_OPER * ircd/m_kill.c: no longer conditionalize on SYSLOG_KILL * ircd/ircd_log.c: remove LS_OPERLOG, LS_USERLOG * include/ircd_log.h: remove LS_OPERLOG, LS_USERLOG--they serve the same purpose as LS_USER and LS_OPER * config/config-sh.in: remove no longer relevant log config variables * ircd/uping.c (uping_init): use log_write instead of ircd_log * ircd/s_misc.c (exit_client): use log_write instead of ircd_log * ircd/s_conf.c: use log_write instead of ircd_log * ircd/s_bsd.c (report_error): use log_write instead of ircd_log * ircd/s_auth.c (timeout_auth_queries): use log_write instead of ircd_log * ircd/res.c (send_res_msg): use log_write instead of ircd_log * ircd/m_who.c: use log_write instead of write_log; no longer conditionalize on WPATH; mark dead ircd_log calls * ircd/m_uping.c: mark dead ircd_log call * ircd/m_server.c (mr_server): use log_write instead of ircd_log * ircd/m_restart.c: use log_write instead of ircd_log; mark dead ircd_log calls * ircd/m_rehash.c (mo_rehash): use log_write instead of ircd_log * ircd/m_oper.c: use log_write instead of ircd_log; no longer conditionalize on FNAME_OPERLOG; mark dead ircd_log calls * ircd/m_kill.c: mark dead ircd_log calls * ircd/m_connect.c: use log_write instead of ircd_log; mark dead ircd_log * ircd/m_clearmode.c: use log_write instead of write_log; no longer conditionalize on OPATH * ircd/jupe.c: use log_write instead of write_log; no longer conditionalize on JPATH * ircd/ircd_log.c: add USER subsystem; remove ircd_log() compat function; fix a couple of bugs * ircd/ircd_alloc.c: fixed a comment * ircd/ircd.c: use log_write instead of ircd_log; fold server notice generation in a couple of cases * ircd/gline.c: use log_write instead of write_log; no longer conditionalize on GPATH * ircd/channel.c (modebuf_flush_int): use log_write instead of write_log; no longer conditionalize on OPATH * ircd/Makefile.in: run make depend, since dependencies have changed * doc/example.conf: add system USER to documentation * include/ircd_log.h: add system USER; remove old ircd_log() declarations 2000-12-04 Isomer * ircd/m_names.c: Add NAMES_EON to do_names to say add a 'end_of_names' reply when done. * ircd/m_join.c: use NAMES_EON as mentioned above 2000-12-01 net * ircd/motd.c: add a freelist for struct Motds 2000-11-30 Kevin L. Mitchell * ircd/s_stats.c (report_feature_list): report features--only local opers can see logging configuration, since it doesn't really mean anything to users * ircd/s_err.c: add reply messages for new feature subsystem * ircd/s_conf.c: add F lines to .conf * ircd/parse.c: add the message descriptions for /set, /reset, and /get * ircd/m_stats.c: add /stats f * ircd/m_set.c (mo_set): implement /set * ircd/m_reset.c (mo_reset): implement /reset * ircd/m_rehash.c: /rehash m now flushes MOTD cache, and /rehash l reopens log files (for log file rotation) * ircd/m_get.c (mo_get): implement /get * ircd/ircd_log.c: use int instead of void return value; add log_report_features() and log_canon(); fix a function that disappears if DEBUGMODE not #define'd * ircd/ircd_features.c: functions to manipulate feature settings either from the config file or with the new /set, /reset, and /get commands * ircd/Makefile.in: add new .c files, run make depend * include/s_stats.h: declare report_feature_list() (/stats f handler) * include/numeric.h: add RPL_STATSFLINE, RPL_FEATURE, ERR_NOFEATURE, ERR_BADLOGTYPE, ERR_BADLOGSYS, and ERR_BADLOGVALUE reply numerics * include/msg.h: add defines for SET, RESET, and GET * include/ircd_log.h: add a function to canonicalize subsystem names; change some void return values to int * include/ircd_features.h: new features subsystem handles all the manipulation of special features, like log files * include/handlers.h: declare new mo_{s,res,g}et message handlers for fiddling with features run-time * include/client.h (SNO_DEFAULT): don't set SNO_DEBUG by default; seemed like a good idea at the time... * doc/example.conf: document new F lines 2000-11-29 Kevin L. Mitchell * ircd/s_debug.c: rewrite debug_init() and vdebug() in terms of new logging functions, which have special support for the debug log; added loop detection to vdebug(), so that I can sendto_opmask_butone() from log_vwrite() without incurring another call to vdebug() * ircd/s_conf.c (rehash): call log_reopen() from rehash routine; this allows log file rotations * ircd/m_kill.c: call log_write_kill() instead of ircd_log_kill() * ircd/ircd_log.c: much more work fleshing out the interface; removed old interface; included backwards-compat ircd_log() function that logs to subsystem LS_OLDLOG * ircd/ircd.c: switch to new log_init()/log_close()/log_reopen() functions * include/ircd_log.h: include stdarg.h for va_list; move ordering warning to top of file; fill out LogSys enum; declare new log_debug_init(), log_vwrite(), log_write_kill(), and log_[sg]et_*() functions; add flags argument to log_write(); defined flags to inhibit various logging actions * include/client.h: added support for new SNO_DEBUG, enabled only if DEBUGMODE is defined 2000-11-28 Kevin L. Mitchell * ircd/ircd_log.c: make sure the various LOG_* constants are defined (probably not needed, since #include isn't conditional); various static data needed for the new logging functions; definitions of new logging functions * include/ircd_log.h: new LogSys enum, declarations for part of new logging API * ircd/motd.c: we were setting type to MOTD_CLASS unconditionally, which was of course stupid; switched to using switch/case in initialization in motd_create(); zero the MotdList.other pointer from motd_clear() * ircd/ircd.c (main): motd_init() has to come before init_conf(), or we overwrite init_conf()'s hard work with respect to T-lines 2000-11-27 Kevin L. Mitchell * ircd/s_stats.c: comment out report_motd_list and include a reference to motd_report() * ircd/s_conf.c: rip out the old MOTD manipulation functions; call motd_add() from the conf parser; call motd_clear() from the rehash routine; remove the no longer needed memory clearing and reloading stuff from the rehash service routine * ircd/motd.c: loads new API, including static internal functions to do allocation/deallocation, etc. * ircd/m_stats.c: use new motd_report() instead of report_motd_list() * ircd/m_motd.c: use new syntax for motd_send() * ircd/ircd.c: use new motd_init() function * ircd/Makefile.in (SRC): forgot to add motd.c to SRC in Makefile.(in); also ran make depend * include/motd.h: don't need config.h, but now do need time.h; define new structures and constants; redefine old API and define new functions 2000-11-22 Kevin L. Mitchell * ircd/s_user.c (register_user): use motd_signon() instead of calling m_motd; much cleaner this way * ircd/motd.c: write the new motd_* stuff to make MOTD handling less of a crock * ircd/m_motd.c: rewrite m{,s}_motd to call out to new motd_* functions * include/motd.h: define new MOTD API stuff 2000-11-20 Kevin L. Mitchell * ircd/ircd_reply.c (protocol_violation): rewrite protocol_violation so it'll actually work oh, yeah, use %s -> cptr->name, instead of %c -> cptr, so we get the client's real name in there. * ircd/m_motd.c (m_motd): Iso's addition of get_client_class(sptr) resulted in core dumps if NODEFAULTMOTD is defined, because m_motd gets called from register_user with a NULL sptr. This is probably a design problem, but this bandaid will do for now... 2000-11-19 Isomer * ircd/ircd_reply.c: added 'protocol_violation', thus alerting us to problems in the server<->server protocol. * ircd/m_connect.c: allow remote connects with a port of '0' meaning to use the port in the config file. * ircd/m_create.c: Enable hacking protection, lets see how far we get. * ircd/m_error.c: The RFC says never accept ERROR from unreg'd clients, so we don't any more. * ircd/m_kill.c: The kill path is now made up of numnicks of servers, and the user@host is displayed of the victim. * ircd/m_map.c: reloaded 'dump_map'. * ircd/m_trace.c: allow per class T: * ircd/m_stats.c: allow local opers /remote stats anywhere on the 'net. 2000-11-17 Isomer * ircd/m_topic.c: Fixed bug where we'd only send to clients topics that were the *same* instead of different. Oh the embarrasment! * ircd/IPcheck.c: Merged net's fix. 2000-11-02 Kevin L. Mitchell * ircd/m_whois.c: remove compiler warning by adding a newline to end of file * ircd/m_names.c: moved the flags up to s_user.h * ircd/m_join.c: call do_names instead of m_names; restructure ms_join to never transmute a JOIN into a CREATE, but use the TS in the JOIN (if present) to timestamp the channel * ircd/channel.c: send JOINs individually, instead of grouping them, so that we can send the channel's creation time * include/s_user.h: declare do_names() 2000-10-30 Isomer * ircd/m_oper.c: Fixed warning 2000-10-30 Isomer * ircd/m_oper.c: Fixed over agressive cut and no paste 2000-10-30 Isomer * ircd/m_topic.c: Restructured, fixed bug where topics on local channels are propergated (I forget who pointed this out to me, but thanks anyway). Also to save bandwidth don't send the topic to users if the topic is already the same on the server (but still propergate to other servers). X/W's "autotopic" feature must chew a lot of bandwidth, hopefully this will help reduce this. * doc/rfc1459.rfc: Updated documentation on /topic. * ircd/listener.c: snotice warnings about failed accept()'s potentially warning admins that they're running out of fd's. * ircd/stats.c, ircd/class.c: Removed /stats v, added number of people in a class in /stats y * ircd/m_create.c: Checks for timewarp hacking and squit's evil servers. (currently disabled) 2000-10-30 net * ircd/gline.c: Fixed various bugs Isomer left behind. 2000-10-26 Kevin L. Mitchell * ircd/m_join.c (m_join): reply on attempt to join a BADCHANed channel is now ERR_BANNEDFROMCHAN instead of ERR_BADCHANNAME 2000-10-24 Kevin L. Mitchell * ircd/channel.c: ok, now last mode rules; mode +ps will always result in +s (and won't send a mode if the channel is already +s); mode +sp will always result in +p; -n+n on a +n channel results in no mode change; -n+n on a -n channel results in a +n mode change; etc. 2000-10-23 Kevin L. Mitchell * ircd/channel.c: add "add" and "del" elements to ParseState to avoid not-too-pretty -p+s when +s is sufficient; fix a bug in mode_parse_limit that caused it to clear all channel modes prematurely; restructure mode_parse_mode to avoid calling modebuf_mode too early (ties in with first mentioned change); better logic for +p/+s mutual exclusivity; initialize "add" and "del" elements in mode_parse; send simple modes down to modebuf_mode after the loop in mode_parse 2000-09-28 Greg Sikorski * ircd/m_names.c: Fixed a non-lethal logic error that triggers an assert() in find_member_link while debugging. (Spotted by Maniac-). 2000-09-19 Thomas Helvey * ircd/s_conf.c: move K:lines to their own list and data structures, add supporting code. * ircd/m_stats.c: cleanup stats processing a bit move kline listing code to a new function, haven't figured out where it goes yet tho' * ircd/s_stats.c: added K:line bulk lister * include/s_conf.h: added new DenyConf struct * *[ch]: fixeup code that depended on changes 2000-09-17 Thomas Helvey * ircd/class.c: encapsulate class list * include/class.h: clean up classes * * fixup code that depended on changes 2000-09-17 Thomas Helvey * ircd/s_conf.c: add me to local conf * include/s_conf.h: move CONF_ME macro to chkconf.c * ircd/s_bsd.c: cleanup initialization, allow virtual host to be changed by rehash 2000-09-17 Thomas Helvey * include/class.h: add missing prototype * ircd/class.c: make argument to get_conf_class const 2000-09-17 Thomas Helvey * ircd/*.c: merged in changes from 2.10.10.pl12, cleanup merge conflicts. * ircd/*.h: merged in changes from 2.10.10.pl12, cleanup merge conflicts 2000-09-16 Thomas Helvey * ircd/s_conf.c: add code for server struct * ircd/client.c: copy of class.c sort of, new file for client specific operations, will move things here as appropriate, currently only one function is exported from here. * ircd/*.c: general logic cleanups, convert negatives to positives in places. 2000-09-16 Thomas Helvey * ircd/s_conf.c: add code for new crule data structs, strip quotes * ircd/crule.c: clean up scary casting a bit, type safety stuff * include/s_conf.h: add CRuleConf struct and support, remove unused constants * include/crule.h: type safety cleanups * ircd/*.c: fixup code that depended on stuff I changed 2000-09-15 Thomas Helvey * ircd/s_conf.c: start adding code for new conf data structs, changed listeners, admin line, motd lines, class lines. Move validate_hostent to resolver. General mayhem. * include/s_conf.h: new data structs and accessors * ircd/res.c: move validate_hostent here, rewrite, use regular expression for validation. * doc/example.conf: update docs for port 2000-09-14 Thomas Helvey * ircd/s_conf.c (conf_init): rewrite conf file parser, start to break up conf_init into managable chunks. * ircd/listener.c (set_listener_mask): fix logic bug core dump. * include/s_conf.h: add new data struct for local info (unwinding the mess). 2000-09-13 Thomas Helvey * ircd/list.c: put Clients in free lists, pre-allocate MAXCONNECTIONS local clients. * ircd/list.c: put SLinks in free lists * ircd/channel.c: put Memberships in free lists * ircd/ircd.c: rearrange initializations a bit in main Note: With these changes, ircd NEVER frees Clients, SLinks or Memberships. It will also rarely need to allocate new ones during net bursts and other disruptions. This should cut down on memory fragmentation a bit as well. 2000-08-30 Kevin L. Mitchell * ircd/m_names.c (do_names): pull-up from do_names fix in u2.10.10.pl11 2000-07-15 Perry Lorier * various: IP only k:'s and G:'s now do bit tests instead of two(!) match()'s. Major Major cpu savings. Also speed up the other case slightly. As a side effect you can now k/Gline *@10.0.0.0/8. I'll do bans tomorrow, it's nearing 3am. 2000-07-15 Perry Lorier * various: Fixed warnings after compiling on an alpha. 2000-07-09 Perry Lorier * doc/ircd.8: Applied grammitical changes by Liandrin, applied changes suggested by various other people. * ircd/IPcheck.c: More bug fixes. Current problem appears to be that it gets a corrupt entry somehow. 2000-07-09 Greg Sikorski * ircd/m_oper.c: Clean up compiler warning. 2000-07-08 Perry Lorier * doc/ircd.8: Updated the documentation, it was slightly out of date being updated around 1989. * ircd/m_whois.c: Rewrote for clarity, and probably a bit more speed. fixed a few minor glitches. * doc/rfc1459.unet: Updated. * ircd/IPcheck.c: Fixed more bugs. * ircd/s_bsd.c: We now keep track of servers we've conected. 2000-07-02 Perry Lorier * ircd/s_misc.c: Fixed remote IPcheck bug. Ok, I'm a moron, so sue me. Thanks to Hektik, thanks thanks thanks thanks thanks thanks thanks thanks thank thanks thank thanks 2000-07-01 Perry Lorier * ircd/s_conf.c: "Fixed" the "bug" where people would "evade" K:'s. * ircd/s_conf.c, include/IPcheck.h: Fixed compile warnings. 2000-06-22 Perry Lorier * ircd/IPcheck.c: Large chunks redone. * ircd/s_conf.c: Changes due to IPcheck - ONE nolonger supported, single AND double digit limits are allowed now. * misc other: Changes to IPcheck. 2000-06-30 Perry Lorier * ircd/ircd.c: Fix command line parameter bugs. 2000-06-30 Perry Lorier * ircd/m_kill.c: Fixed bug with LOCAL_KILL_ONLY * ircd/m_nick.c: Tidied things up. 2000-06-12 Joseph Bongaarts * ircd/m_stats.c: Iso forgot mo_stats when he added /stats v 2000-05-29 Perry Lorier * ircd/m_stats.c: add /stats v to do only the last part of the /trace * ircd/IPcheck.c: Cosmetic change, if we meddle with it enough do you think it'll get bored and fix itself? 2000-06-09 Greg Sikorski * ircd/m_names.c: Clean up compiler warnings. 2000-06-09 Kevin L. Mitchell * ircd/channel.c (mode_parse_client): don't send warning if there's not enough arguments for a +/-o/v; means the habit of doing "/mode #channel +oooooo bob" doesn't result in a bunch of error messages 2000-06-04 Greg Sikorski * ircd/m_names.c: Re-factor code to remove unneccessary GlobalChannelList iteration every time someone joins a channel. 2000-06-02 Kevin L. Mitchell * ircd/s_user.c: add struct Gline * argument to register_user; look up global glines and repropagate them if necessary; send acknowledgement of gline to remote servers when registering users * ircd/s_serv.c (server_estab): don't send acknowledgement of local glines to remote servers; do send gline acknowledgement of bursted users * ircd/m_user.c (m_user): pass new struct Gline * argument to register_user * ircd/m_pong.c: pass new struct Gline * argument to register_user * ircd/m_nick.c (ms_nick): document protocol change * ircd/gline.c: support GLINE_LASTMOD * include/s_user.h: add struct Gline * argument to register_user * include/gline.h: add GLINE_LASTMOD to look up non-zero lastmods * ircd/s_conf.c (find_kill): add unsigned int argument to gline_lookup() * ircd/gline.c: add GLINE_GLOBAL to lookup or find only global glines; add unsigned int argument to gline_lookup() * include/gline.h: add GLINE_GLOBAL flag; add unsigned int argument to gline_lookup() * ircd/m_server.c: Resend jupe only when there is no % parameter, or when it falls out of bounds: see comments prior to call to jupe_resend(); call server_estab with struct Jupe parameter, so that we place the appropriate % in the appropriate place. * ircd/s_serv.c (server_estab): send % for introduced server, as well as for servers when we're sending the BURST * include/s_serv.h: add a struct Jupe * to the arguments for server_estab() so that we can send the appropriate lastmod parameter * ircd/m_gline.c (ms_gline): actually, this should be the slightest bit more efficient... * ircd/m_jupe.c (ms_jupe): actually, this should be the slightest bit more efficient... * ircd/m_gline.c (ms_gline): inhibit GLINE processing resends during netburst * ircd/m_jupe.c (ms_jupe): inhibit JUPE processing resends during netburst * ircd/channel.c (joinbuf_join): really remove user from local channels 2000-05-29 Perry Lorier * ircd/m_names.c: Removed redundant space. * ircd/s_bsd.c: Fixed incorrect syntax on ERROR line. 2000-05-18 Kevin L. Mitchell * ircd/m_burst.c (ms_burst): er...that should have been a ",", not a " " 2000-05-04 Kevin L. Mitchell * ircd/channel.c: replace bogus assertions with returns, which is logically correct; only wipe out limit/key if they were originally set in the first place; remove user from channel when doing a PARTALL; only send MODE +o for user CREATEing channel if user is not MyUser--CREATE will only be used if the channel did not originally exist, therefore we can assume no one local is on the channel anyway, and we don't exactly need for the user to see an explicit +o for themselves * doc/readme.gline: describe the syntax of the GLINE command * doc/readme.jupe: update to reflect a couple of changes to JUPE * ircd/gline.c: don't propagate local changes * ircd/jupe.c: don't propagate local changes * ircd/m_gline.c (mo_gline): force local flag when deactivating glines with 0 lastmod * ircd/gline.c (gline_deactivate): G-lines with zero lastmod time are now removed instead of being deactivated * ircd/m_gline.c (ms_gline): make G-lines of the form "GLINE * -" be accepted * ircd/channel.c (send_channel_modes): deal with one of the last vestiges of sendbuf * ircd/m_burst.c (ms_burst): debugged ban processing; removed debugging hooks * ircd/channel.c (modebuf_extract): remove debugging sendto_opmask_butone calls 2000-05-03 Kevin L. Mitchell * ircd/channel.c: support a couple of new flags to support using mode_parse; fix some bugs with 0 struct ModeBuf *; implementation of modebuf_extract to extract added flags for use by ms_burst * include/channel.h: a couple of new flags to support using mode_parse inside ms_burst * ircd/m_burst.c (ms_burst): brand new implementation of BURST * ircd/m_endburst.c: add loop to processing of end_of_burst to free empty channels after the BURST is over. * ircd/m_server.c: convert to use new send.c functions--I wanted to rewrite it from scratch, but the logic's pretty complex; I may still rewrite it, though... 2000-05-02 Thomas Helvey * ircd/ircd.c: fix broken header include ordering 2000-05-02 Thomas Helvey * ircd/IPcheck.c: cleanups for ZenShadow's cleanups review emailed privately * include/IPcheck.h: removed unneeded include 2000-05-02 Kevin L. Mitchell * ircd/s_user.c (hunt_server): throw in a comment so I know what the sendto_one is for * include/querycmds.h (Count_unknownbecomesclient): convert to sendto_opmask_butone * ircd/send.c: start removing dead code * include/send.h: start removing dead code * ircd/m_rping.c: convert to sendcmdto_one / send_reply / hunt_server_cmd * ircd/m_rpong.c: convert to sendcmdto_one / send_reply 2000-05-01 Kevin L. Mitchell * ircd/m_stats.c: convert to sendcmdto_one / send_reply * ircd/m_kick.c: Completely reimplement m_kick * ircd/channel.c: send_user_joins removed; it was dead code, anyway... 2000-05-01 Perry Lorier * ircd/m_invite.c: Fix for the rest of m_invite.c, and again. * ircd/channels.c: My fix for the part problem. Untested, probably won't work. Can't be much worse than the current problem. it'll either work or core, take your pick. 2000-04-30 Perry Lorier * config/config-sh.in: Fix for CONNEXIT * ircd/s_{user,misc}.c: Fix for CONNEXIT * ircd/m_invite.c: Fix for incorrectly numnickified invite. (Kev: Want to come talk to me about this?) 2000-04-30 Steven M. Doyle * ircd/ircd.c - general cleanups and readability enhancements - rewrite of setuid/chroot code. - server will no longer run as root - -DPROFIL compile option removed - Fixed IPcheck API calls * config/config-sh.in - Fixed up chroot compile options - Added options for debug and profile compiles * config/gen.ircd.Makefile - Support for new debug/profile options * ircd/Makefile.in - Support for new debug/profile options * ircd/ircd_signal.c - Removed -DPROFIL * include/IPcheck.h - Removed old API prototypes, added new ones * ircd/IPcheck.c - Readability cleanups (well, I -think-...) - Changed IPRegistryEntry.last_connect to a time_t. The previously used unsigned short was probably causing interesting things after a client had been connected longer than about 65,535 seconds... - Removed old API functions. * ircd/whocmds.c - Removed IPcheck.h include * Additionally modified IPcheck API calls in: - ircd/m_nick.c - ircd/m_auth.c - ircd/s_bsd.c - ircd/s_conf.c - ircd/s_misc.c - ircd/s_serv.c - ircd/s_user.c 2000-04-30 Perry Lorier * ircd/s_bsd.c: Sigh. :) * ircd/m_mode.c: fix for modeless channels by poptix. 2000-04-29 Kevin L. Mitchell * ircd/m_join.c: reimplement JOIN in terms of struct JoinBuf * ircd/channel.c (clean_channelname): make clean_channelname also truncate long channel names 2000-04-28 Kevin L. Mitchell * ircd/m_create.c: reimplement CREATE in terms of struct JoinBuf * ircd/channel.c: implemented joinbuf_init, joinbuf_join, joinbuf_flush * include/channel.h: definitions and declarations for the struct JoinBuf abstraction 2000-04-29 Perry Lorier * ircd/s_bsd.c: Ok, so I thought I compiled and tested this... 2000-04-29 Perry Lorier * ircd/s_bsd.c: Add debugging code to IPcheck 2000-04-28 Kevin L. Mitchell * include/ircd_reply.h (SND_EXPLICIT): use instead of RPL_EXPLICIT * ircd/ircd_reply.c (send_reply): use SND_EXPLICIT instead of RPL_EXPLICIT * ircd/m_userhost.c (m_userhost): add a dead code comment * ircd/m_desynch.c: forgot one... * ircd/m_rehash.c (mo_rehash): er, duplicates :) * ircd/m_proto.c (proto_send_supported): just change a comment so it doesn't show up in my scans * ircd/ircd_reply.c (send_reply): fix a slight bug... * ircd/s_numeric.c (do_numeric): use new sendcmdto_* functions, kinda hackish... * ircd/parse.c (parse_server): argument wrangling to make processing in do_numeric a little easier to deal with * ircd/s_serv.c (server_estab): SERVER should come from acptr->serv->up, not &me * ircd/m_lusers.c: accidentally left out sptr for a %C * ircd/send.c: hack to support doing wallchops... * ircd/m_whowas.c: convert to new send functions * ircd/m_whois.c: convert to new send functions * ircd/m_who.c: convert to new send functions * ircd/m_wallops.c: convert to new send functions * ircd/m_wallchops.c: convert to new send functions * ircd/m_version.c: convert to new send functions * ircd/m_userip.c: convert to new send functions * ircd/m_userhost.c: convert to new send functions * ircd/m_uping.c: convert to new send functions * ircd/m_trace.c: convert to new send functions * ircd/m_topic.c: convert to new send functions * ircd/m_time.c: convert to new send functions * ircd/m_squit.c: convert to new send functions * ircd/m_silence.c: convert to new send functions * ircd/m_settime.c: convert to new send functions * ircd/m_restart.c: convert to new send functions * ircd/m_rehash.c: convert to new send functions * ircd/m_privmsg.c: convert to new send functions * ircd/m_pong.c: convert to new send functions * ircd/m_ping.c: convert to new send functions * ircd/m_pass.c: convert to new send functions * ircd/m_opmode.c: convert to new send functions * ircd/m_oper.c: convert to new send functions * ircd/m_notice.c: convert to new send functions * ircd/m_nick.c: convert to new send functions * ircd/m_names.c: convert to new send functions * ircd/m_motd.c: convert to new send functions * ircd/m_mode.c: convert to new send functions * ircd/m_map.c: convert to new send functions * ircd/m_lusers.c: convert to new send functions * ircd/m_list.c: convert to new send functions * ircd/m_links.c: convert to new send functions * ircd/m_kill.c: convert to new send functions * ircd/m_jupe.c: convert to new send functions * ircd/m_invite.c: convert to new send functions * ircd/m_info.c: convert to new send functions * ircd/m_help.c: convert to new send functions * ircd/m_gline.c: convert to new send functions * ircd/m_error.c: convert to new send functions * ircd/m_endburst.c: convert to new send functions * ircd/m_die.c: convert to new send functions * ircd/m_destruct.c: convert to new send functions * ircd/m_defaults.c: convert to new send functions * ircd/m_connect.c: convert to new send functions 2000-04-28 Perry Lorier * RELEASE.NOTES: Describe a few more undocumented features. * config/config-sh.in: change the default paths for logging and the recommended number of channels. * include/supported.h: Rearrange slightly, added CHANTYPE's 2000-04-27 Kevin L. Mitchell * ircd/m_close.c: convert to send_reply * ircd/m_clearmode.c: convert to send_reply, sendcmdto_serv_butone * ircd/m_away.c: convert to send_reply and sendcmdto_serv_butone * ircd/m_admin.c: convert to send_reply and hunt_server_cmd * ircd/s_user.c (hunt_server_cmd): new hunt_server replacement that takes cmd and tok arguments, etc. NOTE: THIS IMPLEMENTATION HAS A MAJOR HACK!!! The whole hunt_server architecture should be carefully rethought... * ircd/s_stats.c (hunt_stats): use new hunt_server_cmd * include/s_user.h: hunt_server_cmd -- replacement for hunt_server * ircd/s_misc.c: *sigh* 2.10.10 doesn't support squitting by numeric nick; therefore, we have to use the server name * ircd/m_squit.c (ms_squit): allow to squit by server numeric nick * ircd/send.c: fix minor bugs * ircd/s_user.c (check_target_limit): mark dead code so I filter it when I grep * ircd/s_serv.c (exit_new_server): mark dead code so I filter it when I grep * ircd/parse.c: mark dead code so I filter it when I grep * ircd/map.c: mark dead code so I filter it when I grep * ircd/ircd.c: mark dead code so I filter it when I grep * ircd/ircd_relay.c: convert over to new sendcmdto_*, send_reply functions * ircd/channel.c: mark dead code so I filter it when I grep * ircd/s_stats.c: use send_reply instead of sendto_one w/rpl_str; hope I'm not stepping on toes... * ircd/s_conf.c: more sendto_opmask_butone / send_reply conversions; use ircd_snprintf in a couple of cases to negate the possibility of buffer overflow 2000-04-26 Kevin L. Mitchell * ircd/channel.c: convert as much as possible to new send semantics * ircd/send.c (sendcmdto_common_channels): fix a subtle bug -- test member->user->from->fd, not from->fd * ircd/gline.c (gline_add): go ahead and add badchans; we just won't look for them in m_gline; this way, they always work... * ircd/jupe.c: use ircd_vsnprintf conversion specifiers * ircd/gline.c: since write_log now uses ircd_vsnprintf, use ircd_vsnprintf conversion specifiers * ircd/support.c (write_log): use ircd_vsnprintf for write_log, so I have my conversion specifiers * ircd/gline.c (do_gline): use send_reply for ERR_YOUREBANNEDCREEP * ircd/send.c (sendcmdto_flag_butone): explicitly send WALLOPS to local users * ircd/s_serv.c (exit_new_server): rewrite exit_new_server to be a little less brain-dead * ircd/s_misc.c: use sendcmdto_one, sendrawto_one, and send_reply * ircd/s_debug.c: use send_reply with RPL_EXPLICIT for RPL_STATSDEBUG * ircd/res.c (cres_mem): use send_reply with RPL_EXPLICIT for RPL_STATSDEBUG * ircd/list.c (send_listinfo): use send_reply with RPL_EXPLICIT for RPL_STATSDEBUG * ircd/m_pong.c: use RPL_EXPLICIT for ERR_BADPING * ircd/ircd.c: use RPL_EXPLICIT for ERR_BADPING * ircd/s_user.c (register_user): use RPL_EXPLICIT for ERR_INVALIDUSERNAME * ircd/ircd_reply.c (send_reply): support RPL_EXPLICIT * include/ircd_reply.h (RPL_EXPLICIT): somewhat of a hack to mark a numeric as needing to use an explicit pattern, which will be the first argument in the variable argument list * ircd/s_user.c: use sendrawto_one instead of sendto_one to send non-prefixed nospoof PING * ircd/s_bsd.c: use sendrawto_one instead of sendto_one to send non-prefixed SERVER login * ircd/ircd.c (check_pings): fix last sendto_one calls (except for a numeric usage further up) * include/send.h: declare sendrawto_one * ircd/send.c (sendrawto_one): new function to use ONLY for non-prefixed commands, like PING to client, or PASS/SERVER on server registration 2000-04-25 Kevin L. Mitchell * ircd/ircd_snprintf.c (doprintf): implement %H for possible future expansion (channel numerics?) * include/ircd_snprintf.h: added documentation to # to explain use with %C; added documentation for : to explain use with %C; added documentation for %H for channels * ircd/whocmds.c: use send_reply * ircd/userload.c: use sendcmdto_one * ircd/uping.c: use sendcmdto_one * ircd/send.c: use new flags to %C format string; ':' prefixes client name with a colon for local connects, '#' uses nick!user@host form for local connects * ircd/s_user.c: use send_reply, sendto_opmask_butone, sendcmdto_one, sendcmdto_serv_butone, sendcmdto_flag_butone * ircd/s_serv.c: use sendcmdto_one, sendto_opmask_butone * ircd/s_bsd.c: use sendto_opmask_butone, send_reply, sendcmdto_one * ircd/s_auth.c: use sendto_opmask_butone * ircd/res.c: use sendcmdto_one * ircd/ircd_snprintf.c (doprintf): minor bug fixes and some debugging assertions 2000-04-24 Kevin L. Mitchell * ircd/support.c: dumpcore is no longer used, so get rid of it * ircd/parse.c: use send_reply, sendcmdto_one * ircd/map.c: use send_reply * ircd/listener.c: use send_reply * ircd/jupe.c: use sendto_opmask_butone, send_reply * ircd/ircd_reply.c: use send_reply * ircd/ircd.c: use sendto_opmask_butone * ircd/gline.c: use sendto_opmask_butone, send_reply * ircd/ircd_snprintf.c (doprintf): make it deal with incompletely registered clients; make FLAG_ALT print nick!user@host; make FLAG_COLON print :blah * ircd/class.c (report_classes): use send_reply instead of sendto_one * ircd/hash.c (m_hash): replace sendto_one with sendcmdto_one * ircd/IPcheck.c (ip_registry_connect_succeeded): replace sendto_one with sendcmdto_one 2000-04-21 Kevin L. Mitchell * ircd/send.c: clean up logic in sendcmdto_channel_butone; use MyConnect() instead of IsServer() in sendcmdto_flag_butone; define sendcmdto_match_butone * include/send.h: declare sendcmdto_match_butone 2000-04-20 Kevin L. Mitchell * ircd/jupe.c: update to use send_reply() * ircd/gline.c: update to use send_reply() * include/ircd_reply.h: declare send_reply * ircd/ircd_reply.c (send_reply): send_error_to_client, but for replies; uses ircd_snprintf * ircd/send.c: added comments to redirect searchers to appropriate sendcmdto_* function; moved new functions to end of file; added explanatory comments; reordered arguments; defined new functions mentioned below * ircd/m_jupe.c: reorder arguments to sendcmdto_* functions * ircd/m_gline.c: reorder arguments to sendcmdto_* functions * ircd/jupe.c: reorder arguments to sendcmdto_* functions * ircd/gline.c: reorder arguments to sendcmdto_* functions * include/send.h: reorder arguments, add explanatory comments, declare new functions sendcmdto_flag_butone, sendto_opmask_butone, and vsendto_opmask_butone 2000-04-19 Kevin L. Mitchell * ircd/send.c: define sendcmdto_channel_butone, wrote a simplified vsendto_op_mask that uses '*' instead of the receiving client nickname * include/send.h: declare sendcmdto_channel_butone; takes a skip argument that allows you to skip (or not to skip) deaf users, users behind bursting servers, and non channel operators 2000-04-17 Kevin L. Mitchell * ircd/send.c: new sendcmdto_channel_butserv -- note that old sendto_channel_butserv has a subtle bug; also wrote sendcmdto_common_channels. * include/send.h: declare new sendcmdto_* functions * ircd/jupe.c: support local deactivations of jupes * ircd/gline.c: support local deactivations of glines * include/jupe.h: JUPE_LDEACT allows jupes to be locally deactivated; if they aren't locally deactivated, then it slaves to the net-wide activation status; JupeIsRemActive() tests only whether the jupe is active everywhere else * include/gline.h: GLINE_LDEACT allows glines to be locally deactivated; if they aren't locally deactivated, then it slaves to the net-wide activation status; GlineIsRemActive() tests only whether the gline is active everywhere else * ircd/gline.c: detect overlapping G-lines; if an existing, wider gline expires after the new one will, we drop the new one, otherwise we add the G-line after that one (so the wide one will apply first); if the new one contains an existing G-line and if it will expire after the existing one, we drop the existing one to save memory * ircd/m_gline.c (mo_gline): opers could issue remote local glines when CONFIG_OPERCMDS was off; fixed 2000-04-16 Kevin L. Mitchell * ircd/m_jupe.c (mo_jupe): allow target argument to be dropped if this is a local JUPE * ircd/gline.c: add flags argument to gline_activate and gline_deactivate for future expansion * ircd/m_gline.c: pass flags to gline_activate and gline_deactivate * include/gline.h: add flags argument to gline_activate and gline_deactivate * ircd/jupe.c: add flags argument to jupe_activate and jupe_deactivate for future expansion * include/jupe.h: add flags argument to jupe_activate and jupe_deactivate * ircd/m_jupe.c: pass a flags argument to jupe_add instead of local, active; pass flags to jupe_activate and jupe_deactivate * include/gline.h: remove dead code * ircd/gline.c: make gline expire times relative to CurrentTime, since that should be monotonically increasing, instead of TStime(), which can be set backwards, and which can therefore cause an expire time to increase; make local glines be removed instead of just deactivated; don't let gline_find() look for user@host glines if the mask being looked up is a channel mask * ircd/send.c (vsendcmdto_one): forgot to account for the case where origin is a server and destination is a user * ircd/jupe.c: make jupe expire times relative to CurrentTime, since that should be monotonically increasing, instead of TStime(), which can be set backwards, and which can therefore cause an expire time to increase; make local jupes be removed instead of just deactivated * ircd/ircd_snprintf.c: d'oh, thanks for catching that; short for limit is fine. any other warnings I should know about? 2000-04-15 Thomas Helvey * ircd/*.c: const correctness and type safety cleanups to get code to compile with C++ compiler. Still has signed/unsigned comparison warnings. 2000-04-15 Greg Sikorski * ircd/userload.c: change include to for portability. 2000-04-14 Kevin L. Mitchell * ircd/m_gline.c (mo_gline): d'oh, target isn't a numeric; use %C and convert acptr... * ircd/s_user.c: move gline_lookup function call into register_user, where it'll have a username to lookup! * ircd/m_gline.c: modify to utilize new sendcmdto_* series of functions; also stuff send_error_to_client into return clauses * ircd/m_jupe.c: modify to utilize new sendcmdto_* series of functions; also use send_error_to_client where that makes sense * ircd/jupe.c: modify to utilize new sendcmdto_* series of functions; also use send_error_to_client where that makes sense * ircd/gline.c: modify to utilize new sendcmdto_* series of functions; also fix gline_lookup() to deal properly with remote clients--boy, do struct Client and struct User need to be cleaned up! * ircd/ircd_snprintf.c (doprintf): a dest of &me is a server, too... * ircd/send.c: wrote sendcmdto_one(), vsendcmdto_one(), and sendcmdto_serv_butone(), all utilizing the %v conversion of ircd_snprintf() * include/send.h: define IRC_BUFSIZE, max size of a message; declare sendcmdto_one(), vsendcmdto_one(), and sendcmdto_serv_butone() * include/msg.h: define all the CMD_* constants needed to utilize the new sendcmdto_* series of functions * ircd/Makefile.in (SRC): list ircd_snprintf.c; run make depend * ircd/gline.c: remove old, dead code. * ircd/m_gline.c (mo_gline): disallow setting of global G-lines unless CONFIG_OPERCMDS is enabled; disallow listing of all G-lines (don't advertise proxies); remove dead code * ircd/parse.c: oper handler for JUPE only lists jupes unless CONFIG_OPERCMDS is enabled * ircd/m_jupe.c (mo_jupe): don't compile mo_jupe() if CONFIG_OPERCMDS is not enabled; we'll disable it in parse.c * ircd/m_opmode.c (mo_opmode): if CONFIG_OPERCMDS is not enabled, always return ERR_DISABLED * ircd/m_clearmode.c (mo_clearmode): if CONFIG_OPERCMDS is not enabled, always return ERR_DISABLED * ircd/s_err.c: add error message to indicate disabled commands * include/numeric.h (ERR_DISABLED): to indicate disabled commands * doc/Configure.help: add documentation for CONFIG_OPERCMDS * config/config-sh.in: add CONFIG_OPERCMDS, default both it and CONFIG_NEW_MODE to 'y' for now * ircd/gline.c (gline_list): fix a minor formatting bogon * BUGS: since I fixed that bug, might as well mark it fixed. * ircd/m_join.c: look up badchans with GLINE_EXACT * ircd/m_gline.c: fix parc count problems; look up existing G-lines with GLINE_EXACT; only set new lastmod when activating/deactivating existing glines if old lastmod was not 0 * ircd/gline.c: forgot to copy the gline reason over; don't propagate a gline with 0 lastmod if origin is user; add GLINE_EXACT to force exact matching of gline mask * ircd/ircd_snprintf.c (doprintf): forgot to deal with the zero flag properly * ircd/s_conf.c (find_kill): gline_find() takes a char *userhost, but gline_lookup() actually takes a client--d'oh. 2000-04-13 Thomas Helvey * ircd/IPcheck.c: Back port BLMet's bugfix from 2.10.10 2000-04-13 Greg Sikorski * ircd/whocmds.c: Don't make idle flag default in /who, to prevent: "/who * x" "Gte3 H*iwg Gte@212.49.240.217 :1 :0 I am the one that was." (Found by Plexus). * ircd/whocmds.c: Change idle time calc from socket idle to user idle. 2000-04-13 Kevin L. Mitchell * config/aclocal.m4 (unet_CHECK_TYPE_SIZES): check size of void *, too, for ircd_snprintf.c * include/ircd_snprintf.h: documentation for ircd_(v)snprintf, in comments; mostly descended from the Linux manpage for printf, but also documenting the extensions. * ircd/ircd_snprintf.c: NULL dest is equivalent to going to a client; make 'q' be the same as 'L'; remove __inline__; only define EXTENSION if HAVE_LONG_LONG is defined * include/handlers.h: declare m_gline() * ircd/parse.c: gline can be called by users, but it only lists the glines. * ircd/s_user.c (set_nick_name): resend gline if a remote server introduces a glined client * ircd/s_serv.c (server_estab): burst glines, too * ircd/gline.c: fix up all the expire times to be offsets; simplify gline_resend() * ircd/m_gline.c: begin coding replacements for ms_gline(), mo_gline(), and m_gline() * ircd/gline.c (gline_add): allow *@#channel to work correctly; also, prohibit local BADCHANs if LOCAL_BADCHAN not defined 2000-04-13 Greg Sikorski * tools/Bouncer/*: Add comments/documentation/tags. * tools/Bouncer/*: Add debug defines, make task fork(). 2000-04-12 Thomas Helvey * ircd/s_err.c: Cleanup s_err.c make one table so we don't have to do anything tricky to get an error string. 2000-04-12 Greg Sikorski * Add port bouncer for http (x/w) 2000-04-12 Kevin L. Mitchell * ircd/s_conf.c (find_kill): replaced call to find_gline() with a call to gline_find(); also used GlineReason() instead of direct reference to structure member * ircd/m_join.c (m_join): replace bad_channel() calls with calls to gline_find(name, GLINE_BADCHAN), and also check to see if gline is active * ircd/channel.c: nothing seems to be called anywhere... * ircd/s_err.c: update a couple of replies to dovetail with new semantics * ircd/gline.c: begin complete re-implementation of gline.c along the lines of the final design of jupe.c * include/gline.h: begin complete re-implementation of gline.c along the lines of the final design of jupe.c * ircd/channel.c (mode_process_clients): fix "Deop of +k user on %s by %s" message... * ircd/ircd_snprintf.c: my new snprintf()-like functions * include/ircd_snprintf.h: my new snprintf()-like functions 2000-04-11 Thomas Helvey * ircd/IPcheck.c: removed old dead code * ircd/s_user.c (send_user_info): removed non-standard user not found message for userhost/userip 2000-04-11 Greg Sikorski * ircd/s_err.c: Added missing quotes to ERR_DONTCHEAT numeric. * doc/p10.html: Work on chapter 4. 2000-04-10 Kevin L. Mitchell * ircd/channel.c (mode_parse_client): fix coredump on /mode #foobar +o nosuchnick 2000-04-10 Perry Lorier * BUGS: Added bug. 2000-04-09 Thomas Helvey * include/IPcheck.h: fix prototype * ircd/s_user.c: fix usage of IPcheck_remote_connect * ircd/IPcheck.c: removed unused args 2000-04-09 Thomas Helvey * include/IPcheck.h: add proto for IPcheck_expire * ircd/IPcheck.c: Rewrote * ircd/ircd.c: Add IPcheck_expire to main message loop * ircd/s_user.c: Redo target hashing, refactor target code * include/numeric.h: Cleaned up numerics, added which ones are in use by other networks and what they are in use for. * ircd/channel.c: cleaned can_join(), allow anyone through anything if /invited, simplified the function. Opers overusing OPEROVERRIDE will get a message explaining to them not to cheat. * ircd/m_join.c: cleaned up the various join functions, should be a lot more efficient. Still needs work. Now assumes that s<->s won't send it a JOIN 0. Service coders - note this and tread with care. * ircd/m_stats.c: added Gte-'s stats doc patch. * ircd/m_version.c: /version now returns the 005 numeric as well. as requested by Liandrin. 2000-04-07 Kevin L. Mitchell * ircd/m_clearmode.c: add include for support.h for write_log() * configure: move ircd/crypt/* to tools/* 2000-04-06 Thomas Helvey * ircd/s_auth.c: Shorten auth connect timeout to 60 seconds set client host to server alias if connection from localhost 2000-04-06 Perry Lorier * ircd/ircd.c: Fix core during pinging (oops) 2000-04-06 Perry Lorier * ircd/send.c: fixed wrong ident being sent to channels bug. * include/numerics.h: Updated some of the numerics from other networks. Flagged some as 'unused' by undernet. 2000-03-30 Perry Lorier * ircd/ircd.c: Lets see if this helps the ping problem at all. * ircd/whocmds.c, /doc/readme.who: Added %l specifier to get idle time for local clients. (as requested), extended who now returns all the flags (@+!) so you can tell the complete state of a client. 2000-03-30 Thomas Helvey * m_rping.c m_rpong.c: add Gte's rping/rpong fixes 2000-03-30 Perry Lorier * ircd/parse.c: oops, missed opers. 2000-03-30 Perry Lorier * ircd/parse.c: fixed mystifying ping bug thats been plaguing us for so long. Remember: m_ping MUST be in the parse array. :) 2000-03-30 Perry Lorier * ircd/ircd.c: test in check_pings was wrong. I move that we disallow cvs commit after 10pm localtime.... 2000-03-30 Perry Lorier * ircd/m_pong.c: Fix it for servers too. 2000-03-30 Perry Lorier * ircd/m_pong.c: Fix ping timeout bugs 2000-03-30 Perry Lorier * ircd/channel.c: Bans had CurrentTime in their when field instead of TStime() 2000-03-31 Thomas Helvey * ircd/numnicks.c (SetXYYCapacity): fix for extended numerics. 2000-03-30 Perry Lorier * ircd/m_nick.c: send kills both ways so when we add nick change on collision we don't desync the network. * ircd/map.c: Fixup the map a bit more. 2000-03-31 Kevin L. Mitchell * ircd/m_clearmode.c (do_clearmode): Log the CLEARMODE to OPATH * ircd/m_opmode.c: Log the mode changes to OPATH * ircd/channel.c (modebuf_flush_int): Log the mode changes to OPATH * include/channel.h (MODEBUF_DEST_LOG): Log the mode changes to OPATH * doc/Configure.help: help text for CONFIG_LOG_OPMODE / OPATH * config/config-sh.in: added OPATH for opmode log file * ircd/m_clearmode.c (do_clearmode): updated uses of modebuf_mode_string() for the new usage * ircd/channel.c: added flag MODE_FREE and an int argument to modebuf_mode_string() to indicate that the string must be free'd; updated calls to modebuf_mode_string() for the new usage; called collapse(pretty_mask()) on the ban string and use allocated memory for it; added ban list length accounting; fixed a number of small bugs in ban processing * include/channel.h: added flag MODE_FREE and an int argument to modebuf_mode_string() to indicate that the string must be free'd * ircd/m_clearmode.c (do_clearmode): made sure clearmode removed keys and limits that are set 2000-03-30 Perry Lorier * ircd/ircd.c: rewrote check_pings() for maintainability and speed. Also changed quit msg's so they don't have redundant nick[host] info in them. * ircd/send.c: Changed write errors to report what error occured (if possible). * ircd/gline.c: added gline comment to the quit. * ircd/m_server.c: Added suggestions to server quits mentioning what went wrong so the admin can fix it earlier instead of asking questions... * ircd/map.c: Changed m_map() to hide numerics, show a * beside servers that aren't fully burst yet. And show '(--s)' for servers where its not sure. * doc/example.conf: Fixed wrapped U: 2000-03-30 Kevin L. Mitchell * ircd/m_mode.c (ms_mode): implemented a new m_mode in terms of mode_parse() (version selectable at compile time) * ircd/m_clearmode.c (mo_clearmode): clean_channelname(parv[1]) * ircd/m_opmode.c (mo_opmode): clean_channelname(parv[1]) * config/config-sh.in: add new config option to enable new m_mode implementation * doc/Configure.help: add documentation for new config option CONFIG_NEW_MODE * ircd/channel.c (mode_parse_client): /opmode #foobar -o -- 461 MODE -v : Not enough parameters * ircd/m_clearmode.c (do_clearmode): do_clearmode() would remove +k and +l even if they weren't set... * ircd/m_opmode.c: implement the OPMODE command using mode_parse() * ircd/channel.c: make mode_process_clients() clear the DEOPPED flag; fix +s+p exclusivity; add MODE_ADD/MODE_DEL to flag list for; test the 0-th member, not the i-th member, of the client change state stuff * ircd/m_clearmode.c (do_clearmode): use the new mode_invite_clear() function * ircd/channel.c: cleared up all the compile-time warnings and errors * include/channel.h: added declarations for mode_ban_invalidate() and mode_invite_clear() * ircd/channel.c: finished mode_parse(), then broke it up into a dozen or so helper functions to make the code easier to read 2000-03-29 Thomas Helvey * ircd/ircd.c: refactor server initialization a bit, use getopt for parsing command line, refactor init_sys, main, and other bits. * ircd/s_bsd.c: add functions for initialization to clean up logic a bit and remove duplicated code. * include/ircd.h: add struct for server process related variables. 2000-03-29 Kevin L. Mitchell * ircd/channel.c: initial definition of mode_parse(); flags to prevent doing the same thing multiple times; helper method send_notoper() to send a "Not oper"/"Not on channel" notice * include/channel.h: declare mode_parse() and helper flags * ircd/channel.c (modebuf_flush_int): fiddled with timestamp sending to match the current action of set_mode() closely enough that hopefully there won't be major conflicts * ircd/channel.c (modebuf_flush_int): consolidated the mode string building logic, reversed the order of the arguments to mode commands to have '-' preceed '+' 2000-03-29 Thomas Helvey * ircd/s_bsd.c (add_connection): don't disable socket options let OS tune itself and allow important performance tweaks to work. 2000-03-28 Kevin L. Mitchell * ircd/channel.c (modebuf_flush_int): use %d, not %-15d; I got confused by set_mode, which is doing some really weird logic; guess what I'm going to rewrite next? ;) 2000-03-28 Kevin L. Mitchell * include/channel.h: added MODE_SAVE for the bounds checking stuff in modebuf_flush * ircd/channel.c: make modebuf_flush into modebuf_flush_int and make it do bounds checking on the buffer; all modes are sent only if the all parameter is 1; modebuf_flush is the exported wrapper * include/channel.h: add BOUNCE, renumber flags to get a little more space * ircd/channel.c (modebuf_flush): don't overload HACK2, add BOUNCE; send DESYNCH message 2000-03-27 Kevin L. Mitchell * ircd/m_clearmode.c (do_clearmode): only mark the modes the channel actually has in effect for deletion * ircd/channel.c: added explanatory comments to all added functions; made flushing take place at the correct place even if the MODEBUF_DEST_DEOP flag is set; rewrote build_string() helper to bash some stupid bugs; made modebuf_flush() return if ModeBuf is empty, fixed the apparent source, removed some bogus string termination code, properly terminate the mode strings, add support for HACK2 and HACK3, made limit strings not be sent if the limit is being removed, changed where '+' and '-' come from in sent strings, added support for DEOP flag, set up bouncing code for HACK2 * ircd/Makefile.in: ran make depend * include/channel.h: added new defines for future functionality, made modebuf_flush() return int so I can use tail recursion * ircd/m_clearmode.c: add msg.h to includes; other misc cleanups to make it all compile * ircd/m_opmode.c: add msg.h to includes... * ircd/m_clearmode.c: implemented mo_clearchan()/ms_clearchan() * ircd/channel.c (modebuf_flush): realized I forgot to nul-terminate addbuf/rembuf properly... * ircd/m_clearmode.c (do_clearmode): wrote do_clearmode()... * ircd/channel.c (modebuf_flush): correct sendto_server_butone to sendto_serv_butone--blah^2 * ircd/send.c (sendto_serv_butone): stupid comments confused me * ircd/channel.c (modebuf_flush): if there are no mode changes to propagate, we're done... * ircd/channel.c (modebuf_flush): duh; it's sendto_server_butone, not sendto_all_butone * ircd/m_clearmode.c: define skeleton for m{o,s}_clearmode * ircd/m_opmode.c: define skeleton for m{o,s}_opmode * ircd/Makefile.in (SRC): added m_opmode() and m_clearmode() to the list * ircd/parse.c: added messages for opmode and clearmode * include/handlers.h: added declarations for mo_opmode(), ms_opmode(), mo_clearmode(), and ms_clearmode() * include/msg.h: define MSG_OPMODE, TOK_OPMODE, MSG_CLEARMODE, and TOK_CLEARMODE * include/channel.h (MODEBUF_DEST_OPMODE): Define the MODEBUF_DEST_OPMODE flag * ircd/channel.c (modebuf_flush): added new flag, MODEBUF_DEST_OPMODE; causes channel MODE/HACK(4) notice to appear to originate from source's server (or source itself, if IsServer(source)); also causes a server-level MODE to be sent as OPMODE instead * include/channel.h: defined MODEBUF_DEST_SERVER, MODEBUF_DEST_HACK4 * ircd/channel.c: Add another argument to build_string() to handle numeric nicks; implemented MODEBUF_DEST_SERVER to send MODEs to servers; implemented MODEBUF_DEST_HACK4 to cause HACK(4) notices to be sent out 2000-03-27 Perry Lorier * ircd/s_bsd.c: fixed missing 'u' typo. 2000-03-26 Kevin L. Mitchell * ircd/channel.c: implement modebuf_init(), _mode(), _mode_uint(), _mode_string(), _mode_client(), _flush(); also implemented a simple build_string() * include/channel.h: added definition of ModeBuf, modebuf_* manipulation functions, and a couple of helper macros ircd-ircu-2.10.12.10.dfsg1/config.sub0000755000175000017500000007703210353031251016615 0ustar madkissmadkiss#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. timestamp='2005-12-23' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32r | m32rle | m68000 | m68k | m88k | maxq | mb | microblaze | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | mt \ | msp430 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b \ | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m32c) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa-* \ | ymp-* \ | z8k-*) ;; m32c-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; c90) basic_machine=c90-cray os=-unicos ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16c) basic_machine=cr16c-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: ircd-ircu-2.10.12.10.dfsg1/RELEASE.NOTES0000644000175000017500000002200410355360420016516 0ustar madkissmadkissRelease notes for ircu2.10.12 Last updated: 1 Sep 2005 Written by Michael Poole Based on earlier documents by Kev and Braden . This document briefly describes changes in ircu2.10.12 relative to ircu2.10.11. ircu2.10.12 is only compatible with servers that implement the P10 protocol. It has been tested to link against ircu2.10.11, but some features (notably IPv6 support and oplevels) are not supported by ircu2.10.11. Semantic Changes (TAKE NOTE): Channel keys and passwords (see the "oplevels" enhancement below) listed in a JOIN are now only checked against the corresponding channel. In ircu2.10.11, "JOIN #a,#b key" would attempt to use "key" as the key for both #a and #b. ircu2.10.12 will only attempt to use it as the key for #a. ircu2.10.12's behavior matches that documented in RFC 1459. Enhancements: The configuration file format has changed to one that is easier to read. It is based on the configuration parser found in ircd-hybrid. As usual, an example configuration file can be found in the doc subdirectory. ircu now supports IPv6 clients. If your operating system provides IPv6 socket support, ircu can accept connections on IPv6 addresses. Even if your operating system does not support IPv6 sockets, you can link (using IPv4) to a server that has IPv6 clients, and ircu will treat the IPv6 clients correctly. The DNS resolver has been replaced with a streamlined version (also from ircd-hybrid) that avoids some of the complications from using the full libresolv or adns libraries. The server can query an IAUTH external authorization server. The protocol is described in doc/readme.iauth. This allows an external program to accept or reject any client that connects to the server and allows that external program to assign an account stamp to the incoming user. A new feature called "oplevels" has been added. It uses new channel keys (+A for the administrator, +U for users) to grant chanop status when you join using those keys. Part of this channel protection is that you cannot be deopped in channel by someone who you opped. A new channel mode, +D, has been added for auditorium-style channels. These are channels where most users listen but do not speak or receive ops or voice. The effect of +D is that the server waits to send the JOIN message for new users until the user gets ops or voice or sends a message to the channel. A list of join-delayed users in a channel may be retrieved by using /NAMES -d #channel. The response to /NAMES -d uses the same format as numeric 353, but uses numeric 355 instead. If an op removes +D while there are still join-delayed users, the server automatically sets mode +d, and removes +d when the last user's join is shown. It is not possible to set channel mode +d manually; its purpose is to warn channel users that there are "hidden" users in the channel. More than one hashing mechanism is now supported for oper passwords, and a new tool (ircd/umkpasswd) is provided to generate them. Commands that send messages to specified services may be defined in the configuration file by using Pseudo blocks. This lets users use commands like /X or /CHANSERV from their client, without tying the admin to a particular arrangement or naming of services. The /stats command accepts string identifiers in addition to single-character identifiers. For example, "/stats access" shows the same data as "/stats i". Supported names are shown by /stats. New /stats options are: /stats a (nameservers), to list DNS nameservers in use; /stats L (modules), to list loaded modules; and /stats R (mappings), to list privmsg helper commands defined by Pseudo blocks. By default, all of these are hidden from normal users. Client blocks (previously I: lines), Operator blocks (previously O: and o: lines), channel bans and silences may use CIDR notation instead of simple wildcards. You may also have silence exceptions by putting '~' before the mask; for example, if you wish to silence everyone except X, you could use SILENCE *!*@*,~X!cservice@undernet.org. The server will no longer kick "net riders" in keyed (+k) channels if both sides of the net join have the same key. IP masks (as used in bans, G-lines, etc) are now parsed in a more forgiving manner. 127.0.0.0/8, 127.* and 127/8 are all accepted and mean the same thing. Ambiguous expressions like 127/8 are interpreted as IPv4 masks; to interpret it as an IPv6 mask, use 127:/8. Configuration Changes: As mentioned above, the configuration file format has changed radically. Please consult doc/example.conf for details on the new format. Some prominent changes follow. The old contents of H: lines have been merged into the Connect block that describes the peer server(s) that should be allowed to hub. Two default virtual host addresses may be specified, one for IPv4 sockets and one for IPv6 sockets. Nickname jupes have their own blocks, and do not share structure with UWorld server declarations. Operator connection classes and individual operator blocks may be assigned privileges, rather than having them controlled globally. Because of this, the feature settings that controlled the privileges globally have been removed. The maximum number of clients allowed per IP may be set in a Client block (the equivalent of C: lines). New feature settings (see doc/readme.features for explanations): ANNOUNCE_INVITES, HIS_STATS_L, HIS_STATS_a, HIS_STATS_R, LOCAL_CHANNELS, TOPIC_BURST. Deleted features, since they had no effect even in 2.10.11: AUTOHIDE, HIS_DESYNCS, TIMESEC. Deleted features since they are now controlled by other configuration entries: VIRTUAL_HOST, oper and locop privilege features. Deleted feature since it no longer applies: HIS_STATS_h. Compile Time Options: A listing of supported compile-time options may be seen by running "./configure --help". The defaults should be sane. In particular, you should NOT compile with --enable-debug or with --disable-symbols on a production network. Otherwise Undocumented Features: Despite our preferences to keep these undocumented, they are occasionally useful, and are described here for users who may need them. To enable these, you need to add them to CFLAGS prior to running ./configure, usually as in: CFLAGS="-O2 -D