mirror of
https://github.com/osmarks/ngircd.git
synced 2025-12-28 08:19:05 +00:00
Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
807da1356c | ||
|
|
024c58435e | ||
|
|
e72b817ae6 | ||
|
|
47d1cf9b55 | ||
|
|
aaaca987cd | ||
|
|
a34d8ae59f | ||
|
|
d917f06af8 | ||
|
|
715e5532a9 | ||
|
|
64a8f8a3fd | ||
|
|
7c2d0f20ed | ||
|
|
e75f23cfe8 | ||
|
|
c31167572b | ||
|
|
dc49d040c2 | ||
|
|
473feb44bb | ||
|
|
1ea7b10a82 |
4
AUTHORS
4
AUTHORS
@@ -1,7 +1,7 @@
|
||||
|
||||
ngIRCd - Next Generation IRC Server
|
||||
|
||||
(c)2001-2003 by Alexander Barton,
|
||||
(c)2001-2004 by Alexander Barton,
|
||||
alex@barton.de, http://www.barton.de/
|
||||
|
||||
ngIRCd is free software and published under the
|
||||
@@ -30,4 +30,4 @@ Andrew Tridgell & Martin Pool: strl{cpy|cat}()-functions
|
||||
|
||||
|
||||
--
|
||||
$Id: AUTHORS,v 1.5.2.1 2003/11/07 20:51:08 alex Exp $
|
||||
$Id: AUTHORS,v 1.5.2.2 2004/02/03 16:01:29 alex Exp $
|
||||
|
||||
20
ChangeLog
20
ChangeLog
@@ -1,7 +1,7 @@
|
||||
|
||||
ngIRCd - Next Generation IRC Server
|
||||
|
||||
(c)2001-2003 by Alexander Barton,
|
||||
(c)2001-2004 by Alexander Barton,
|
||||
alex@barton.de, http://www.barton.de/
|
||||
|
||||
ngIRCd is free software and published under the
|
||||
@@ -10,6 +10,22 @@
|
||||
-- ChangeLog --
|
||||
|
||||
|
||||
ngIRCd 0.7.7 (2004-02-05)
|
||||
|
||||
- The info text ("real name") of users is set to "-" if none has been
|
||||
specified using the USER command (e. g. "USER user * * :"). Reason:
|
||||
the original ircd doesn't like empty ones and would KILL such users.
|
||||
- Fixed (optional) TCP Wrapper test which was broken and could result in
|
||||
false results. Thanks to Fuminori Tanizaki <tany@mcnet.ad.jp>!
|
||||
- Removed "USE_" prefixes of configuration #defines.
|
||||
|
||||
ngIRCd 0.7.6 (2003-12-05)
|
||||
|
||||
- Fixed abort() ("server crash") when INVITE'ing users to nonexistent
|
||||
channels. Bug found by <hiddenx@wp.pl>.
|
||||
- Extended version numbering of CVS versions (added date).
|
||||
- Enhanced/fixed doc/Protocol.txt;
|
||||
|
||||
ngIRCd 0.7.5 (2003-11-07)
|
||||
|
||||
- Fixed ban behavior: users which are banned from a channel can't no
|
||||
@@ -477,4 +493,4 @@ ngIRCd 0.0.1, 31.12.2001
|
||||
|
||||
|
||||
--
|
||||
$Id: ChangeLog,v 1.188.2.18 2003/11/07 20:51:08 alex Exp $
|
||||
$Id: ChangeLog,v 1.188.2.24 2004/02/05 13:33:24 alex Exp $
|
||||
|
||||
4
INSTALL
4
INSTALL
@@ -1,7 +1,7 @@
|
||||
|
||||
ngIRCd - Next Generation IRC Server
|
||||
|
||||
(c)2001-2003 by Alexander Barton,
|
||||
(c)2001-2004 by Alexander Barton,
|
||||
alex@barton.de, http://www.barton.de/
|
||||
|
||||
ngIRCd is free software and published under the
|
||||
@@ -158,4 +158,4 @@ number. In both cases the server exits after the output.
|
||||
|
||||
|
||||
--
|
||||
$Id: INSTALL,v 1.15.2.1 2003/04/22 20:00:32 alex Exp $
|
||||
$Id: INSTALL,v 1.15.2.2 2004/02/03 16:01:29 alex Exp $
|
||||
|
||||
4
NEWS
4
NEWS
@@ -1,7 +1,7 @@
|
||||
|
||||
ngIRCd - Next Generation IRC Server
|
||||
|
||||
(c)2001-2003 by Alexander Barton,
|
||||
(c)2001-2004 by Alexander Barton,
|
||||
alex@barton.de, http://www.barton.de/
|
||||
|
||||
ngIRCd is free software and published under the
|
||||
@@ -174,4 +174,4 @@ ngIRCd 0.0.1, 31.12.2001
|
||||
|
||||
|
||||
--
|
||||
$Id: NEWS,v 1.53.2.5 2003/11/07 20:51:08 alex Exp $
|
||||
$Id: NEWS,v 1.53.2.6 2004/02/03 16:01:29 alex Exp $
|
||||
|
||||
4
README
4
README
@@ -1,7 +1,7 @@
|
||||
|
||||
ngIRCd - Next Generation IRC Server
|
||||
|
||||
(c)2001-2003 by Alexander Barton,
|
||||
(c)2001-2004 by Alexander Barton,
|
||||
alex@barton.de, http://www.barton.de/
|
||||
|
||||
ngIRCd is free software and published under the
|
||||
@@ -83,4 +83,4 @@ mail to: <alex@barton.de> or <alex@arthur.ath.cx>
|
||||
|
||||
|
||||
--
|
||||
$Id: README,v 1.17 2003/03/09 22:03:58 alex Exp $
|
||||
$Id: README,v 1.17.2.1 2004/02/03 16:01:29 alex Exp $
|
||||
|
||||
16
configure.in
16
configure.in
@@ -8,13 +8,13 @@
|
||||
# (at your option) any later version.
|
||||
# Please read the file COPYING, README and AUTHORS for more information.
|
||||
#
|
||||
# $Id: configure.in,v 1.89.2.11 2003/11/07 20:51:08 alex Exp $
|
||||
# $Id: configure.in,v 1.89.2.16 2004/02/05 13:33:24 alex Exp $
|
||||
#
|
||||
|
||||
# -- Initialisierung --
|
||||
|
||||
AC_PREREQ(2.50)
|
||||
AC_INIT(ngircd, 0.7.5)
|
||||
AC_INIT(ngircd, 0.7.7)
|
||||
AC_CONFIG_SRCDIR(src/ngircd/ngircd.c)
|
||||
AC_CANONICAL_TARGET
|
||||
AM_INIT_AUTOMAKE(1.6)
|
||||
@@ -26,9 +26,9 @@ AH_TEMPLATE([DEBUG], [Define if debug-mode should be enabled])
|
||||
AH_TEMPLATE([HAVE_socklen_t], [Define if socklen_t exists])
|
||||
AH_TEMPLATE([SNIFFER], [Define if IRC sniffer should be enabled])
|
||||
AH_TEMPLATE([STRICT_RFC], [Define if ngIRCd should behave strict RFC compliant])
|
||||
AH_TEMPLATE([USE_SYSLOG], [Define if syslog should be used for logging])
|
||||
AH_TEMPLATE([USE_ZLIB], [Define if zlib compression should be enabled])
|
||||
AH_TEMPLATE([USE_TCPWRAP], [Define if TCP wrappers should be used])
|
||||
AH_TEMPLATE([SYSLOG], [Define if syslog should be used for logging])
|
||||
AH_TEMPLATE([ZLIB], [Define if zlib compression should be enabled])
|
||||
AH_TEMPLATE([TCPWRAP], [Define if TCP wrappers should be used])
|
||||
AH_TEMPLATE([IRCPLUS], [Define if IRC+ protocol should be used])
|
||||
AH_TEMPLATE([RENDEZVOUS], [Define if Rendezvous support should be included])
|
||||
|
||||
@@ -162,7 +162,7 @@ AC_ARG_WITH(syslog,
|
||||
]
|
||||
)
|
||||
if test "$x_syslog_on" = "yes"; then
|
||||
AC_DEFINE(USE_SYSLOG, 1)
|
||||
AC_DEFINE(SYSLOG, 1)
|
||||
AC_CHECK_HEADERS(syslog.h)
|
||||
fi
|
||||
|
||||
@@ -181,7 +181,7 @@ AC_ARG_WITH(zlib,
|
||||
]
|
||||
)
|
||||
if test "$x_zlib_on" = "yes"; then
|
||||
AC_DEFINE(USE_ZLIB, 1)
|
||||
AC_DEFINE(ZLIB, 1)
|
||||
AC_CHECK_HEADERS(zlib.h)
|
||||
fi
|
||||
|
||||
@@ -198,7 +198,7 @@ AC_ARG_WITH(tcp-wrappers,
|
||||
ptr = hosts_access;
|
||||
],[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(USE_TCPWRAP, 1)
|
||||
AC_DEFINE(TCPWRAP, 1)
|
||||
x_tcpwrap_on=yes
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
%define name ngircd
|
||||
%define version 0.7.5
|
||||
%define version 0.7.7
|
||||
%define release 1
|
||||
%define prefix %{_prefix}
|
||||
|
||||
Summary: Next Generation Internet Relay Chat Daemon
|
||||
Summary: A lightweight daemon for the Internet Relay Chat (IRC)
|
||||
Name: %{name}
|
||||
Version: %{version}
|
||||
Release: %{release}
|
||||
@@ -15,17 +15,18 @@ Packager: Sean Reifschneider <jafo-rpms@tummy.com>
|
||||
BuildRoot: /var/tmp/%{name}-root
|
||||
|
||||
%description
|
||||
ngIRCd is a free open source daemon for Internet Relay Chat (IRC),
|
||||
ngIRCd is a free open source daemon for the Internet Relay Chat (IRC),
|
||||
developed under the GNU General Public License (GPL). It's written from
|
||||
scratch and is not based upon the original IRCd like many others.
|
||||
|
||||
Why should you use ngIRCd? Because ...
|
||||
Advantages:
|
||||
- no problems with servers using changing/non-static IP addresses.
|
||||
- small and lean configuration file.
|
||||
- free, modern and open source C code.
|
||||
- still under active development.
|
||||
|
||||
* ... there are no problems with servers on changing or non-static IP
|
||||
addresses.
|
||||
* ... there is a small and lean configuration file.
|
||||
* ... there is a free, modern and open source C source code.
|
||||
* ... it is still under active development.
|
||||
ngIRCd is compatible to the "original" ircd 2.10.3p3, so you can run
|
||||
mixed networks.
|
||||
|
||||
%prep
|
||||
%setup
|
||||
|
||||
5
debian/Makefile.am
vendored
5
debian/Makefile.am
vendored
@@ -8,10 +8,11 @@
|
||||
# (at your option) any later version.
|
||||
# Please read the file COPYING, README and AUTHORS for more information.
|
||||
#
|
||||
# $Id: Makefile.am,v 1.1.2.1 2003/07/09 21:08:55 alex Exp $
|
||||
# $Id: Makefile.am,v 1.1.2.2 2003/12/05 13:31:22 alex Exp $
|
||||
#
|
||||
|
||||
EXTRA_DIST = changelog compat control copyright ngircd.init rules
|
||||
EXTRA_DIST = rules changelog compat control copyright \
|
||||
ngircd.init ngircd.postinst
|
||||
|
||||
maintainer-clean-local:
|
||||
rm -f Makefile Makefile.in
|
||||
|
||||
19
debian/changelog
vendored
19
debian/changelog
vendored
@@ -1,3 +1,22 @@
|
||||
ngircd (0.7.7-0ab1) unstable; urgency=low
|
||||
|
||||
* New upstream version.
|
||||
|
||||
-- Alexander Barton <alex@Arthur.Ath.CX> Thu, 5 Feb 2004 14:11:08 +0100
|
||||
|
||||
ngircd (0.7.6-0ab1) unstable; urgency=medium
|
||||
|
||||
* New upstream version.
|
||||
* Changed version numvering scheme of debian package.
|
||||
|
||||
-- Alexander Barton <alex@Arthur.Ath.CX> Fri, 5 Dec 2003 14:26:41 +0100
|
||||
|
||||
ngircd (0.7.5-0.2ab) unstable; urgency=low
|
||||
|
||||
* Updated RPM and Debian package description and configuration.
|
||||
|
||||
-- Alexander Barton <alex@Arthur.Ath.CX> Sat, 29 Nov 2003 21:24:32 +0100
|
||||
|
||||
ngircd (0.7.5-0.1ab) unstable; urgency=low
|
||||
|
||||
* New upstream version.
|
||||
|
||||
10
debian/control
vendored
10
debian/control
vendored
@@ -9,14 +9,14 @@ Package: ngircd
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends} ${misc:Depends}
|
||||
Description: A lightweight daemon for the Internet Relay Chat (IRC)
|
||||
The ngIRCd is a free open source daemon for Internet Relay Chat (IRC),
|
||||
developed under the GNU General Public License (GPL). It's written from
|
||||
scratch and is not based upon the original IRCd like many others.
|
||||
ngIRCd is a free open source daemon for the Internet Relay Chat (IRC)
|
||||
network. It is written from scratch and is not based upon the original
|
||||
IRCd like many others.
|
||||
.
|
||||
Advantages:
|
||||
- no problems with servers on changing or non-static IP addresses.
|
||||
- no problems with servers using changing/non-static IP addresses.
|
||||
- small and lean configuration file.
|
||||
- free, modern and open source C source code.
|
||||
- free, modern and open source C code.
|
||||
- still under active development.
|
||||
.
|
||||
ngIRCd is compatible to the "original" ircd 2.10.3p3, so you can run
|
||||
|
||||
2
debian/copyright
vendored
2
debian/copyright
vendored
@@ -3,7 +3,7 @@ Tue, 20 May 2003 15:47:40 +0200.
|
||||
|
||||
It was downloaded from ftp://Arthur.Ath.CX/pub/Users/alex/ngircd/
|
||||
|
||||
Upstream Author(s): Alexander Barton <alex@barton.de>
|
||||
Upstream Author: Alexander Barton <alex@barton.de>
|
||||
|
||||
This software is copyright (c) 1999-2003 by Alexander Barton.
|
||||
|
||||
|
||||
12
debian/ngircd.postinst
vendored
12
debian/ngircd.postinst
vendored
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Debian post-installation script
|
||||
# $Id: ngircd.postinst,v 1.1.2.3 2003/07/12 22:57:00 alex Exp $
|
||||
# $Id: ngircd.postinst,v 1.1.2.4 2003/11/29 20:29:02 alex Exp $
|
||||
#
|
||||
|
||||
if [ -f /etc/ngircd/ngircd.conf ]; then
|
||||
@@ -9,14 +9,6 @@ if [ -f /etc/ngircd/ngircd.conf ]; then
|
||||
chmod o= /etc/ngircd/ngircd.conf
|
||||
fi
|
||||
|
||||
if [ -x "/etc/init.d/ngircd" ]; then
|
||||
# setup init scripts and startup ngircd
|
||||
update-rc.d ngircd defaults >/dev/null
|
||||
if [ -x /usr/sbin/invoke-rc.d ]; then
|
||||
invoke-rc.d ngircd start
|
||||
else
|
||||
/etc/init.d/ngircd start
|
||||
fi
|
||||
fi
|
||||
#DEBHELPER#
|
||||
|
||||
# -eof-
|
||||
|
||||
32
debian/rules
vendored
32
debian/rules
vendored
@@ -1,7 +1,17 @@
|
||||
#!/usr/bin/make -f
|
||||
#
|
||||
# ngIRCd -- The Next Generation IRC Daemon
|
||||
# Copyright (c)2001-2003 by Alexander Barton (alex@barton.de)
|
||||
#
|
||||
# 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.
|
||||
# Please read the file COPYING, README and AUTHORS for more information.
|
||||
#
|
||||
# debian/rules for ngIRCd
|
||||
#
|
||||
# $Id: rules,v 1.1.2.1 2003/07/09 21:12:00 alex Exp $
|
||||
# $Id: rules,v 1.1.2.2 2003/11/29 20:29:02 alex Exp $
|
||||
#
|
||||
# Based on the sample debian/rules that uses debhelper,
|
||||
# GNU copyright 1997 to 1999 by Joey Hess.
|
||||
@@ -12,8 +22,8 @@
|
||||
|
||||
# These are used for cross-compiling and for saving the configure script
|
||||
# from having to guess our platform (since we know it already)
|
||||
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
|
||||
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
|
||||
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
|
||||
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
|
||||
|
||||
CFLAGS = -Wall -g
|
||||
|
||||
@@ -28,14 +38,17 @@ endif
|
||||
|
||||
config.status: configure
|
||||
dh_testdir
|
||||
|
||||
# Add here commands to configure the package.
|
||||
./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
|
||||
--prefix=/usr --sysconfdir=/etc/ngircd --mandir=\$${prefix}/share/man \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc/ngircd \
|
||||
--mandir=\$${prefix}/share/man \
|
||||
--with-syslog --with-zlib
|
||||
|
||||
build: build-stamp
|
||||
|
||||
build-stamp: config.status
|
||||
build-stamp: config.status
|
||||
dh_testdir
|
||||
|
||||
# Add here commands to compile the package.
|
||||
@@ -50,6 +63,7 @@ clean:
|
||||
|
||||
# Add here commands to clean up after the build process.
|
||||
-$(MAKE) distclean
|
||||
|
||||
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
|
||||
cp -f /usr/share/misc/config.sub config.sub
|
||||
endif
|
||||
@@ -66,11 +80,12 @@ install: build
|
||||
|
||||
# Add here commands to install the package into debian/ngircd.
|
||||
$(MAKE) install DESTDIR=$(CURDIR)/debian/ngircd
|
||||
|
||||
rm -f $(CURDIR)/debian/ngircd/usr/share/doc/ngircd/INSTALL*
|
||||
rm -f $(CURDIR)/debian/ngircd/usr/share/doc/ngircd/COPYING*
|
||||
|
||||
# Build architecture-independent files here.
|
||||
binary-indep: build install
|
||||
# We have nothing to do by default.
|
||||
# We have nothing to do by default.
|
||||
|
||||
# Build architecture-dependent files here.
|
||||
binary-arch: build install
|
||||
@@ -81,7 +96,7 @@ binary-arch: build install
|
||||
dh_installinit
|
||||
dh_strip
|
||||
dh_compress
|
||||
dh_fixperms -Xetc/ngircd.conf
|
||||
dh_fixperms
|
||||
dh_installdeb
|
||||
dh_shlibdeps
|
||||
dh_gencontrol
|
||||
@@ -89,6 +104,7 @@ binary-arch: build install
|
||||
dh_builddeb
|
||||
|
||||
binary: binary-indep binary-arch
|
||||
|
||||
.PHONY: build clean binary-indep binary-arch binary install
|
||||
|
||||
# -eof-
|
||||
|
||||
@@ -22,9 +22,10 @@ in all details. But because the ngIRCd should be a fully compatible
|
||||
replacement for this server ("ircd") it tries to emulate these differences.
|
||||
|
||||
If you don't like this behavior please ./configure the ngIRCd using the
|
||||
"--enable-strict-rfc" command line option. But please note: not all IRC
|
||||
clients are compatible with such an server, some can't even connect at all!
|
||||
Therefore this option isn't desired for "normal operation".
|
||||
"--enable-strict-rfc" command line option. But keep in mind: not all IRC
|
||||
clients are compatible with a server configured that way, some can't even
|
||||
connect at all! Therefore this option usually isn't desired for "normal
|
||||
server operation".
|
||||
|
||||
|
||||
II. The IRC+ Protocol
|
||||
@@ -35,8 +36,8 @@ as defined in RFC 2810-2813. This enhanced protocol is named "IRC+". It is
|
||||
backwards compatible to the "plain" IRC protocol and will only be used by
|
||||
the ngIRCd if it detects that the peer supports it as well.
|
||||
|
||||
The "PASSV" command is used to detect the protocol and peer versions (see
|
||||
RFC 2813, section 4.1.1).
|
||||
The "PASS" command is used to detect the protocol and peer versions see
|
||||
RFC 2813 (section 4.1.1) and below.
|
||||
|
||||
|
||||
II.1 Register new server link
|
||||
@@ -57,9 +58,11 @@ The following optional(!) 10 bytes contain an implementation-dependent
|
||||
version number. Servers supporting the IRC+ protocol as defined in this
|
||||
document provide the string "-IRC+" here.
|
||||
|
||||
Example for <version>: "0210-IRC+".
|
||||
|
||||
<flags> consists of two parts separated with the character "|" and is at
|
||||
most 100 bytes long. The first part contains the name of the implementation
|
||||
(ngIRCd sets this to "ngIRCd", the original ircd to "IRC", e.g.). The second
|
||||
(ngIRCd sets this to "ngircd", the original ircd to "IRC", e.g.). The second
|
||||
part is implementation-dependent and should only be parsed if the peer
|
||||
supports the IRC+ protocol as well. In this case the following syntax is
|
||||
used: "<serverversion>[:<serverflags>]".
|
||||
@@ -68,15 +71,19 @@ used: "<serverversion>[:<serverflags>]".
|
||||
number, <serverflags> indicates the supported IRC+ protocol extensions (and
|
||||
may be empty!).
|
||||
|
||||
The optional parameter <options> is used to propagate server options as
|
||||
defined in RFC 2813, section 4.1.1.
|
||||
|
||||
The following <serverflags> are defined at the moment:
|
||||
|
||||
- C: The server supports the CHANINFO command.
|
||||
|
||||
- o: IRC operators are allowed to change channel- and channel-user-modes
|
||||
even if they aren't channel-operator of the affected channel.
|
||||
|
||||
- C: The server supports the CHANINFO command.
|
||||
- Z: Compressed server links are supported by the server.
|
||||
|
||||
Example for a complete <flags> string: "ngircd|0.7.5:CZ".
|
||||
|
||||
The optional parameter <options> is used to propagate server options as
|
||||
defined in RFC 2813, section 4.1.1.
|
||||
|
||||
|
||||
II.2 Exchange channel-modes, topics, and persistent channels
|
||||
@@ -104,4 +111,4 @@ channel mode). In this case <limit> should be "0".
|
||||
|
||||
|
||||
--
|
||||
$Id: Protocol.txt,v 1.9.2.1 2003/04/29 13:42:24 alex Exp $
|
||||
$Id: Protocol.txt,v 1.9.2.2 2003/12/08 14:24:13 alex Exp $
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
# $Id: sample-ngircd.conf,v 1.20.2.3 2003/11/07 20:51:09 alex Exp $
|
||||
# $Id: sample-ngircd.conf,v 1.20.2.4 2003/12/19 14:30:49 alex Exp $
|
||||
|
||||
#
|
||||
# This is a sample configuration file for the ngIRCd, which must adept to
|
||||
# the local preferences and needs.
|
||||
# This is a sample configuration file for the ngIRCd, which must be adepted
|
||||
# to the local preferences and needs.
|
||||
#
|
||||
# Comments are started with "#" or ";".
|
||||
#
|
||||
# Author: Alexander Barton, <alex@barton.de>
|
||||
# Initial translation by Ilja Osthoff, <ilja@glide.ath.cx>
|
||||
# Use "ngircd --configtest" (see manual page ngircd(8)) to validate that the
|
||||
# server interpreted the configuration file as expected!
|
||||
#
|
||||
|
||||
[Global]
|
||||
@@ -17,7 +17,7 @@
|
||||
# on which the server should be listening.
|
||||
|
||||
# Server name in the IRC network, must contain at least one dot
|
||||
# (".") and be unique in the IRC network.
|
||||
# (".") and be unique in the IRC network. Required!
|
||||
Name = irc.the.net
|
||||
|
||||
# Info text of the server. This will be shown by WHOIS and
|
||||
@@ -28,7 +28,7 @@
|
||||
;Password = abc
|
||||
|
||||
# Information about the server and the administrator, used by the
|
||||
# ADMIN command.
|
||||
# ADMIN command. Not required by server but by RFC!
|
||||
;AdminInfo1 = Description
|
||||
;AdminInfo2 = Location
|
||||
;AdminEMail = admin@irc.server
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
# (at your option) any later version.
|
||||
# Please read the file COPYING, README and AUTHORS for more information.
|
||||
#
|
||||
# $Id: Makefile.am,v 1.39.2.2 2003/11/07 20:51:10 alex Exp $
|
||||
# $Id: Makefile.am,v 1.39.2.3 2003/12/04 14:13:42 alex Exp $
|
||||
#
|
||||
|
||||
AUTOMAKE_OPTIONS = ../portab/ansi2knr
|
||||
@@ -63,6 +63,10 @@ lint:
|
||||
|
||||
ngircd.c: cvs-version.h
|
||||
|
||||
irc-login.c: cvs-version.h
|
||||
|
||||
irc-info.c: cvs-version.h
|
||||
|
||||
cvs-version.h: cvs-date
|
||||
|
||||
cvs-date:
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
#include "portab.h"
|
||||
|
||||
static char UNUSED id[] = "$Id: conf.c,v 1.57.2.3 2003/11/07 20:51:10 alex Exp $";
|
||||
static char UNUSED id[] = "$Id: conf.c,v 1.57.2.4 2003/12/19 14:30:49 alex Exp $";
|
||||
|
||||
#include "imp.h"
|
||||
#include <assert.h>
|
||||
@@ -854,7 +854,7 @@ Validate_Config( BOOLEAN Configtest )
|
||||
if( ! Conf_ServerName[0] )
|
||||
{
|
||||
/* No server name configured! */
|
||||
Config_Error( LOG_ALERT, "No server name configured in \"%s\" ('ServerName')!", NGIRCd_ConfFile );
|
||||
Config_Error( LOG_ALERT, "No server name configured in \"%s\" (section 'Global': 'Name')!", NGIRCd_ConfFile );
|
||||
if( ! Configtest )
|
||||
{
|
||||
Config_Error( LOG_ALERT, "%s exiting due to fatal errors!", PACKAGE_NAME );
|
||||
@@ -862,10 +862,10 @@ Validate_Config( BOOLEAN Configtest )
|
||||
}
|
||||
}
|
||||
|
||||
if( ! strchr( Conf_ServerName, '.' ))
|
||||
if( Conf_ServerName[0] && ! strchr( Conf_ServerName, '.' ))
|
||||
{
|
||||
/* No dot in server name! */
|
||||
Config_Error( LOG_ALERT, "Invalid server name configured in \"%s\" ('ServerName'): Dot missing!", NGIRCd_ConfFile );
|
||||
Config_Error( LOG_ALERT, "Invalid server name configured in \"%s\" (section 'Global': 'Name'): Dot missing!", NGIRCd_ConfFile );
|
||||
if( ! Configtest )
|
||||
{
|
||||
Config_Error( LOG_ALERT, "%s exiting due to fatal errors!", PACKAGE_NAME );
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
#include "portab.h"
|
||||
|
||||
static char UNUSED id[] = "$Id: conn-func.c,v 1.1.2.1 2003/11/07 20:51:11 alex Exp $";
|
||||
static char UNUSED id[] = "$Id: conn-func.c,v 1.1.2.2 2003/12/26 16:16:48 alex Exp $";
|
||||
|
||||
#include "imp.h"
|
||||
#include <assert.h>
|
||||
@@ -198,7 +198,7 @@ Conn_SendQ( CONN_ID Idx )
|
||||
/* Laenge der Daten im Schreibbuffer liefern */
|
||||
|
||||
assert( Idx > NONE );
|
||||
#ifdef USE_ZLIB
|
||||
#ifdef ZLIB
|
||||
if( My_Connections[Idx].options & CONN_ZIP ) return My_Connections[Idx].zip.wdatalen;
|
||||
else
|
||||
#endif
|
||||
@@ -232,7 +232,7 @@ Conn_RecvQ( CONN_ID Idx )
|
||||
/* Laenge der Daten im Lesebuffer liefern */
|
||||
|
||||
assert( Idx > NONE );
|
||||
#ifdef USE_ZLIB
|
||||
#ifdef ZLIB
|
||||
if( My_Connections[Idx].options & CONN_ZIP ) return My_Connections[Idx].zip.rdatalen;
|
||||
else
|
||||
#endif
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
#define CONN_MODULE
|
||||
|
||||
|
||||
#ifdef USE_ZLIB
|
||||
#ifdef ZLIB
|
||||
|
||||
static char UNUSED id[] = "$Id: conn-zip.c,v 1.3 2003/04/21 10:52:26 alex Exp $";
|
||||
static char UNUSED id[] = "$Id: conn-zip.c,v 1.3.2.1 2003/12/26 16:16:48 alex Exp $";
|
||||
|
||||
#include "imp.h"
|
||||
#include <assert.h>
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
* (at your option) any later version.
|
||||
* Please read the file COPYING, README and AUTHORS for more information.
|
||||
*
|
||||
* $Id: conn-zip.h,v 1.1 2002/12/30 16:07:23 alex Exp $
|
||||
* $Id: conn-zip.h,v 1.1.2.1 2003/12/26 16:16:48 alex Exp $
|
||||
*
|
||||
* Connection compression using ZLIB (header)
|
||||
*/
|
||||
|
||||
|
||||
#ifdef USE_ZLIB
|
||||
#ifdef ZLIB
|
||||
|
||||
#ifndef __conn_zip_h__
|
||||
#define __conn_zip_h__
|
||||
@@ -32,7 +32,7 @@ GLOBAL LONG Zip_RecvBytes PARAMS(( CONN_ID Idx ));
|
||||
|
||||
#endif /* __conn_zip_h__ */
|
||||
|
||||
#endif /* USE_ZLIB */
|
||||
#endif /* ZLIB */
|
||||
|
||||
|
||||
/* -eof- */
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
#include "portab.h"
|
||||
|
||||
static char UNUSED id[] = "$Id: conn.c,v 1.122.2.2 2003/11/07 20:51:11 alex Exp $";
|
||||
static char UNUSED id[] = "$Id: conn.c,v 1.122.2.4 2004/02/03 13:54:36 alex Exp $";
|
||||
|
||||
#include "imp.h"
|
||||
#include <assert.h>
|
||||
@@ -43,7 +43,7 @@ static char UNUSED id[] = "$Id: conn.c,v 1.122.2.2 2003/11/07 20:51:11 alex Exp
|
||||
#include <stdint.h> /* e.g. for Mac OS X */
|
||||
#endif
|
||||
|
||||
#ifdef USE_TCPWRAP
|
||||
#ifdef TCPWRAP
|
||||
#include <tcpd.h> /* for TCP Wrappers */
|
||||
#endif
|
||||
|
||||
@@ -93,7 +93,7 @@ LOCAL fd_set My_Listeners;
|
||||
LOCAL fd_set My_Sockets;
|
||||
LOCAL fd_set My_Connects;
|
||||
|
||||
#ifdef USE_TCPWRAP
|
||||
#ifdef TCPWRAP
|
||||
INT allow_severity = LOG_INFO;
|
||||
INT deny_severity = LOG_ERR;
|
||||
#endif
|
||||
@@ -395,7 +395,7 @@ Conn_Handler( VOID )
|
||||
FD_ZERO( &write_sockets );
|
||||
for( i = 0; i < Pool_Size; i++ )
|
||||
{
|
||||
#ifdef USE_ZLIB
|
||||
#ifdef ZLIB
|
||||
if(( My_Connections[i].sock > NONE ) && (( My_Connections[i].wdatalen > 0 ) || ( My_Connections[i].zip.wdatalen > 0 )))
|
||||
#else
|
||||
if(( My_Connections[i].sock > NONE ) && ( My_Connections[i].wdatalen > 0 ))
|
||||
@@ -581,7 +581,7 @@ Conn_Write( CONN_ID Idx, CHAR *Data, INT Len )
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef USE_ZLIB
|
||||
#ifdef ZLIB
|
||||
if( My_Connections[Idx].options & CONN_ZIP )
|
||||
{
|
||||
/* Daten komprimieren und in Puffer kopieren */
|
||||
@@ -611,7 +611,7 @@ Conn_Close( CONN_ID Idx, CHAR *LogMsg, CHAR *FwdMsg, BOOLEAN InformClient )
|
||||
|
||||
CLIENT *c;
|
||||
DOUBLE in_k, out_k;
|
||||
#ifdef USE_ZLIB
|
||||
#ifdef ZLIB
|
||||
DOUBLE in_z_k, out_z_k;
|
||||
INT in_p, out_p;
|
||||
#endif
|
||||
@@ -673,7 +673,7 @@ Conn_Close( CONN_ID Idx, CHAR *LogMsg, CHAR *FwdMsg, BOOLEAN InformClient )
|
||||
/* Calculate statistics and log information */
|
||||
in_k = (DOUBLE)My_Connections[Idx].bytes_in / 1024;
|
||||
out_k = (DOUBLE)My_Connections[Idx].bytes_out / 1024;
|
||||
#ifdef USE_ZLIB
|
||||
#ifdef ZLIB
|
||||
if( My_Connections[Idx].options & CONN_ZIP )
|
||||
{
|
||||
in_z_k = (DOUBLE)My_Connections[Idx].zip.bytes_in / 1024;
|
||||
@@ -701,7 +701,7 @@ Conn_Close( CONN_ID Idx, CHAR *LogMsg, CHAR *FwdMsg, BOOLEAN InformClient )
|
||||
/* Servers: Modify time of next connect attempt? */
|
||||
Conf_UnsetServer( Idx );
|
||||
|
||||
#ifdef USE_ZLIB
|
||||
#ifdef ZLIB
|
||||
/* Clean up zlib, if link was compressed */
|
||||
if( Conn_Options( Idx ) & CONN_ZIP )
|
||||
{
|
||||
@@ -762,7 +762,7 @@ Try_Write( CONN_ID Idx )
|
||||
assert( My_Connections[Idx].sock > NONE );
|
||||
|
||||
/* sind ueberhaupt Daten vorhanden? */
|
||||
#ifdef USE_ZLIB
|
||||
#ifdef ZLIB
|
||||
if(( ! My_Connections[Idx].wdatalen > 0 ) && ( ! My_Connections[Idx].zip.wdatalen )) return TRUE;
|
||||
#else
|
||||
if( ! My_Connections[Idx].wdatalen > 0 ) return TRUE;
|
||||
@@ -877,7 +877,7 @@ Handle_Write( CONN_ID Idx )
|
||||
return Conn_WriteStr( Idx, "SERVER %s :%s", Conf_ServerName, Conf_ServerInfo );
|
||||
}
|
||||
|
||||
#ifdef USE_ZLIB
|
||||
#ifdef ZLIB
|
||||
/* Schreibpuffer leer, aber noch Daten im Kompressionsbuffer?
|
||||
* Dann muss dieser nun geflushed werden! */
|
||||
if( My_Connections[Idx].wdatalen == 0 ) Zip_Flush( Idx );
|
||||
@@ -912,7 +912,7 @@ New_Connection( INT Sock )
|
||||
/* Neue Client-Verbindung von Listen-Socket annehmen und
|
||||
* CLIENT-Struktur anlegen. */
|
||||
|
||||
#ifdef USE_TCPWRAP
|
||||
#ifdef TCPWRAP
|
||||
struct request_info req;
|
||||
#endif
|
||||
struct sockaddr_in new_addr;
|
||||
@@ -934,9 +934,10 @@ New_Connection( INT Sock )
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef USE_TCPWRAP
|
||||
#ifdef TCPWRAP
|
||||
/* Validate socket using TCP Wrappers */
|
||||
request_init( &req, RQ_DAEMON, PACKAGE_NAME, RQ_FILE, new_sock, RQ_CLIENT_SIN, &new_addr, NULL );
|
||||
fromhost(&req);
|
||||
if( ! hosts_access( &req ))
|
||||
{
|
||||
/* Access denied! */
|
||||
@@ -1097,7 +1098,7 @@ Read_Request( CONN_ID Idx )
|
||||
* Tritt ein Fehler auf, so wird der Socket geschlossen. */
|
||||
|
||||
INT len, bsize;
|
||||
#ifdef USE_ZLIB
|
||||
#ifdef ZLIB
|
||||
CLIENT *c;
|
||||
#endif
|
||||
|
||||
@@ -1107,12 +1108,12 @@ Read_Request( CONN_ID Idx )
|
||||
/* wenn noch nicht registriert: maximal mit ZREADBUFFER_LEN arbeiten,
|
||||
* ansonsten koennen Daten ggf. nicht umkopiert werden. */
|
||||
bsize = READBUFFER_LEN;
|
||||
#ifdef USE_ZLIB
|
||||
#ifdef ZLIB
|
||||
c = Client_GetFromConn( Idx );
|
||||
if(( Client_Type( c ) != CLIENT_USER ) && ( Client_Type( c ) != CLIENT_SERVER ) && ( Client_Type( c ) != CLIENT_SERVICE ) && ( bsize > ZREADBUFFER_LEN )) bsize = ZREADBUFFER_LEN;
|
||||
#endif
|
||||
|
||||
#ifdef USE_ZLIB
|
||||
#ifdef ZLIB
|
||||
if(( bsize - My_Connections[Idx].rdatalen - 1 < 1 ) || ( ZREADBUFFER_LEN - My_Connections[Idx].zip.rdatalen < 1 ))
|
||||
#else
|
||||
if( bsize - My_Connections[Idx].rdatalen - 1 < 1 )
|
||||
@@ -1124,7 +1125,7 @@ Read_Request( CONN_ID Idx )
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef USE_ZLIB
|
||||
#ifdef ZLIB
|
||||
if( My_Connections[Idx].options & CONN_ZIP )
|
||||
{
|
||||
len = recv( My_Connections[Idx].sock, My_Connections[Idx].zip.rbuf + My_Connections[Idx].zip.rdatalen, ( ZREADBUFFER_LEN - My_Connections[Idx].zip.rdatalen ), 0 );
|
||||
@@ -1179,7 +1180,7 @@ Handle_Buffer( CONN_ID Idx )
|
||||
CHAR *ptr;
|
||||
INT len, delta;
|
||||
BOOLEAN action, result;
|
||||
#ifdef USE_ZLIB
|
||||
#ifdef ZLIB
|
||||
BOOLEAN old_z;
|
||||
#endif
|
||||
|
||||
@@ -1189,7 +1190,7 @@ Handle_Buffer( CONN_ID Idx )
|
||||
/* Check penalty */
|
||||
if( My_Connections[Idx].delaytime > time( NULL )) return result;
|
||||
|
||||
#ifdef USE_ZLIB
|
||||
#ifdef ZLIB
|
||||
/* ggf. noch unkomprimiete Daten weiter entpacken */
|
||||
if( My_Connections[Idx].options & CONN_ZIP )
|
||||
{
|
||||
@@ -1235,7 +1236,7 @@ Handle_Buffer( CONN_ID Idx )
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#ifdef USE_ZLIB
|
||||
#ifdef ZLIB
|
||||
/* merken, ob Stream bereits komprimiert wird */
|
||||
old_z = My_Connections[Idx].options & CONN_ZIP;
|
||||
#endif
|
||||
@@ -1252,7 +1253,7 @@ Handle_Buffer( CONN_ID Idx )
|
||||
My_Connections[Idx].rdatalen -= len;
|
||||
memmove( My_Connections[Idx].rbuf, My_Connections[Idx].rbuf + len, My_Connections[Idx].rdatalen );
|
||||
|
||||
#ifdef USE_ZLIB
|
||||
#ifdef ZLIB
|
||||
if(( ! old_z ) && ( My_Connections[Idx].options & CONN_ZIP ) && ( My_Connections[Idx].rdatalen > 0 ))
|
||||
{
|
||||
/* Mit dem letzten Befehl wurde Socket-Kompression aktiviert.
|
||||
@@ -1531,7 +1532,7 @@ Init_Conn_Struct( CONN_ID Idx )
|
||||
My_Connections[Idx].flag = 0;
|
||||
My_Connections[Idx].options = 0;
|
||||
|
||||
#ifdef USE_ZLIB
|
||||
#ifdef ZLIB
|
||||
My_Connections[Idx].zip.rbuf[0] = '\0';
|
||||
My_Connections[Idx].zip.rdatalen = 0;
|
||||
My_Connections[Idx].zip.wbuf[0] = '\0';
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* (at your option) any later version.
|
||||
* Please read the file COPYING, README and AUTHORS for more information.
|
||||
*
|
||||
* $Id: conn.h,v 1.31 2003/03/27 01:20:22 alex Exp $
|
||||
* $Id: conn.h,v 1.31.2.1 2003/12/26 16:16:48 alex Exp $
|
||||
*
|
||||
* Connection management (header)
|
||||
*/
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#define CONN_ISCLOSING 1 /* Conn_Close() already called */
|
||||
|
||||
#ifdef USE_ZLIB
|
||||
#ifdef ZLIB
|
||||
#define CONN_ZIP 2 /* zlib compressed link */
|
||||
#endif
|
||||
|
||||
@@ -36,7 +36,7 @@ typedef INT CONN_ID;
|
||||
#include "defines.h"
|
||||
#include "resolve.h"
|
||||
|
||||
#ifdef USE_ZLIB
|
||||
#ifdef ZLIB
|
||||
#include <zlib.h>
|
||||
typedef struct _ZipData
|
||||
{
|
||||
@@ -48,7 +48,7 @@ typedef struct _ZipData
|
||||
INT wdatalen; /* Length of data in write buffer (uncompressed) */
|
||||
LONG bytes_in, bytes_out; /* Counter for statistics (uncompressed!) */
|
||||
} ZIPDATA;
|
||||
#endif /* USE_ZLIB */
|
||||
#endif /* ZLIB */
|
||||
|
||||
typedef struct _Connection
|
||||
{
|
||||
@@ -69,9 +69,9 @@ typedef struct _Connection
|
||||
LONG msg_in, msg_out; /* Received and sent IRC messages */
|
||||
INT flag; /* Flag (see "irc-write" module) */
|
||||
INT options; /* Link options */
|
||||
#ifdef USE_ZLIB
|
||||
#ifdef ZLIB
|
||||
ZIPDATA zip; /* Compression information */
|
||||
#endif /* USE_ZLIB */
|
||||
#endif /* ZLIB */
|
||||
} CONNECTION;
|
||||
|
||||
GLOBAL CONNECTION *My_Connections;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* (at your option) any later version.
|
||||
* Please read the file COPYING, README and AUTHORS for more information.
|
||||
*
|
||||
* $Id: defines.h,v 1.42.2.1 2003/11/07 20:51:11 alex Exp $
|
||||
* $Id: defines.h,v 1.42.2.2 2003/12/26 16:16:48 alex Exp $
|
||||
*
|
||||
* Global defines of ngIRCd.
|
||||
*/
|
||||
@@ -57,7 +57,7 @@
|
||||
#define READBUFFER_LEN 2048 /* Laenge des Lesepuffers je Verbindung (Bytes) */
|
||||
#define WRITEBUFFER_LEN 4096 /* Laenge des Schreibpuffers je Verbindung (Bytes) */
|
||||
|
||||
#ifdef USE_ZLIB
|
||||
#ifdef ZLIB
|
||||
#define ZREADBUFFER_LEN 1024 /* Laenge des Lesepuffers je Verbindung (Bytes) */
|
||||
#define ZWRITEBUFFER_LEN 4096 /* Laenge des Schreibpuffers fuer Kompression (Bytes) */
|
||||
#endif
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
#include "portab.h"
|
||||
|
||||
static char UNUSED id[] = "$Id: irc-info.c,v 1.16.2.2 2003/11/07 20:51:11 alex Exp $";
|
||||
static char UNUSED id[] = "$Id: irc-info.c,v 1.16.2.4 2003/12/26 16:16:48 alex Exp $";
|
||||
|
||||
#include "imp.h"
|
||||
#include <assert.h>
|
||||
@@ -379,7 +379,7 @@ IRC_STATS( CLIENT *Client, REQUEST *Req )
|
||||
if( cl && (( Client_Type( cl ) == CLIENT_SERVER ) || ( cl == Client )))
|
||||
{
|
||||
/* Server link or our own connection */
|
||||
#ifdef USE_ZLIB
|
||||
#ifdef ZLIB
|
||||
if( Conn_Options( con ) & CONN_ZIP )
|
||||
{
|
||||
if( ! IRC_WriteStrClient( from, RPL_STATSLINKINFOZIP_MSG, Client_ID( from ), Client_Mask( cl ), Conn_SendQ( con ), Conn_SendMsg( con ), Zip_SendBytes( con ), Conn_SendBytes( con ), Conn_RecvMsg( con ), Zip_RecvBytes( con ), Conn_RecvBytes( con ), (LONG)( time( NULL ) - Conn_StartTime( con )))) return DISCONNECTED;
|
||||
@@ -494,7 +494,7 @@ IRC_VERSION( CLIENT *Client, REQUEST *Req )
|
||||
{
|
||||
CLIENT *target, *prefix;
|
||||
#ifdef CVSDATE
|
||||
CHAR ver[12];
|
||||
CHAR ver[12], vertxt[30];
|
||||
#endif
|
||||
|
||||
assert( Client != NULL );
|
||||
@@ -528,7 +528,8 @@ IRC_VERSION( CLIENT *Client, REQUEST *Req )
|
||||
strlcpy( ver, CVSDATE, sizeof( ver ));
|
||||
strncpy( ver + 4, ver + 5, 2 );
|
||||
strncpy( ver + 6, ver + 8, 3 );
|
||||
return IRC_WriteStrClient( Client, RPL_VERSION_MSG, Client_ID( prefix ), PACKAGE_NAME, ver, NGIRCd_DebugLevel, Conf_ServerName, NGIRCd_VersionAddition( ));
|
||||
snprintf( vertxt, sizeof( vertxt ), "%s(%s)", PACKAGE_VERSION, ver );
|
||||
return IRC_WriteStrClient( Client, RPL_VERSION_MSG, Client_ID( prefix ), PACKAGE_NAME, vertxt, NGIRCd_DebugLevel, Conf_ServerName, NGIRCd_VersionAddition( ));
|
||||
#else
|
||||
return IRC_WriteStrClient( Client, RPL_VERSION_MSG, Client_ID( prefix ), PACKAGE_NAME, PACKAGE_VERSION, NGIRCd_DebugLevel, Conf_ServerName, NGIRCd_VersionAddition( ));
|
||||
#endif
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
#include "portab.h"
|
||||
|
||||
static char UNUSED id[] = "$Id: irc-login.c,v 1.34.2.1 2003/11/07 20:51:11 alex Exp $";
|
||||
static char UNUSED id[] = "$Id: irc-login.c,v 1.34.2.3 2004/02/04 20:04:54 alex Exp $";
|
||||
|
||||
#include "imp.h"
|
||||
#include <assert.h>
|
||||
@@ -34,6 +34,7 @@ static char UNUSED id[] = "$Id: irc-login.c,v 1.34.2.1 2003/11/07 20:51:11 alex
|
||||
#include "irc.h"
|
||||
#include "irc-info.h"
|
||||
#include "irc-write.h"
|
||||
#include "cvs-version.h"
|
||||
|
||||
#include "exp.h"
|
||||
#include "irc-login.h"
|
||||
@@ -293,11 +294,17 @@ IRC_USER( CLIENT *Client, REQUEST *Req )
|
||||
if( Client_Type( Client ) == CLIENT_GOTNICK || Client_Type( Client ) == CLIENT_GOTPASS )
|
||||
#endif
|
||||
{
|
||||
/* Falsche Anzahl Parameter? */
|
||||
/* Wrong number of parameters? */
|
||||
if( Req->argc != 4 ) return IRC_WriteStrClient( Client, ERR_NEEDMOREPARAMS_MSG, Client_ID( Client ), Req->command );
|
||||
|
||||
/* User name */
|
||||
Client_SetUser( Client, Req->argv[0], FALSE );
|
||||
Client_SetInfo( Client, Req->argv[3] );
|
||||
|
||||
/* "Real name" or user info text: Don't set it to the empty
|
||||
* string, the original ircd can't deal with such "real names"
|
||||
* (e. g. "USER user * * :") ... */
|
||||
if( *Req->argv[3] ) Client_SetInfo( Client, Req->argv[3] );
|
||||
else Client_SetInfo( Client, "-" );
|
||||
|
||||
Log( LOG_DEBUG, "Connection %d: got valid USER command ...", Client_Conn( Client ));
|
||||
if( Client_Type( Client ) == CLIENT_GOTNICK ) return Hello_User( Client );
|
||||
@@ -429,12 +436,16 @@ IRC_PONG( CLIENT *Client, REQUEST *Req )
|
||||
LOCAL BOOLEAN
|
||||
Hello_User( CLIENT *Client )
|
||||
{
|
||||
#ifdef CVSDATE
|
||||
CHAR ver[12], vertxt[30];
|
||||
#endif
|
||||
|
||||
assert( Client != NULL );
|
||||
|
||||
/* Passwort ueberpruefen */
|
||||
/* Check password ... */
|
||||
if( strcmp( Client_Password( Client ), Conf_ServerPwd ) != 0 )
|
||||
{
|
||||
/* Falsches Passwort */
|
||||
/* Bad password! */
|
||||
Log( LOG_ERR, "User \"%s\" rejected (connection %d): Bad password!", Client_Mask( Client ), Client_Conn( Client ));
|
||||
Conn_Close( Client_Conn( Client ), NULL, "Bad password", TRUE );
|
||||
return DISCONNECTED;
|
||||
@@ -442,13 +453,29 @@ Hello_User( CLIENT *Client )
|
||||
|
||||
Log( LOG_NOTICE, "User \"%s\" registered (connection %d).", Client_Mask( Client ), Client_Conn( Client ));
|
||||
|
||||
/* Andere Server informieren */
|
||||
/* Inform other servers */
|
||||
IRC_WriteStrServers( NULL, "NICK %s 1 %s %s 1 +%s :%s", Client_ID( Client ), Client_User( Client ), Client_Hostname( Client ), Client_Modes( Client ), Client_Info( Client ));
|
||||
|
||||
/* Welcome :-) */
|
||||
if( ! IRC_WriteStrClient( Client, RPL_WELCOME_MSG, Client_ID( Client ), Client_Mask( Client ))) return FALSE;
|
||||
|
||||
/* Version and system type */
|
||||
#ifdef CVSDATE
|
||||
strlcpy( ver, CVSDATE, sizeof( ver ));
|
||||
strncpy( ver + 4, ver + 5, 2 );
|
||||
strncpy( ver + 6, ver + 8, 3 );
|
||||
snprintf( vertxt, sizeof( vertxt ), "%s(%s)", PACKAGE_VERSION, ver );
|
||||
if( ! IRC_WriteStrClient( Client, RPL_YOURHOST_MSG, Client_ID( Client ), Client_ID( Client_ThisServer( )), vertxt, TARGET_CPU, TARGET_VENDOR, TARGET_OS )) return FALSE;
|
||||
#else
|
||||
if( ! IRC_WriteStrClient( Client, RPL_YOURHOST_MSG, Client_ID( Client ), Client_ID( Client_ThisServer( )), PACKAGE_VERSION, TARGET_CPU, TARGET_VENDOR, TARGET_OS )) return FALSE;
|
||||
#endif
|
||||
|
||||
if( ! IRC_WriteStrClient( Client, RPL_CREATED_MSG, Client_ID( Client ), NGIRCd_StartStr )) return FALSE;
|
||||
#ifdef CVSDATE
|
||||
if( ! IRC_WriteStrClient( Client, RPL_MYINFO_MSG, Client_ID( Client ), Client_ID( Client_ThisServer( )), vertxt, USERMODES, CHANMODES )) return FALSE;
|
||||
#else
|
||||
if( ! IRC_WriteStrClient( Client, RPL_MYINFO_MSG, Client_ID( Client ), Client_ID( Client_ThisServer( )), PACKAGE_VERSION, USERMODES, CHANMODES )) return FALSE;
|
||||
#endif
|
||||
|
||||
/* Features */
|
||||
if( ! IRC_WriteStrClient( Client, RPL_ISUPPORT_MSG, Client_ID( Client ), CLIENT_NICK_LEN - 1, CHANNEL_TOPIC_LEN - 1, CLIENT_AWAY_LEN - 1, Conf_MaxJoins )) return DISCONNECTED;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* ngIRCd -- The Next Generation IRC Daemon
|
||||
* Copyright (c)2001,2002 by Alexander Barton (alex@barton.de)
|
||||
* Copyright (c)2001-2003 by Alexander Barton (alex@barton.de)
|
||||
*
|
||||
* 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
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
#include "portab.h"
|
||||
|
||||
static char UNUSED id[] = "$Id: irc-op.c,v 1.11 2002/12/12 12:24:18 alex Exp $";
|
||||
static char UNUSED id[] = "$Id: irc-op.c,v 1.11.4.1 2003/12/05 13:33:12 alex Exp $";
|
||||
|
||||
#include "imp.h"
|
||||
#include <assert.h>
|
||||
@@ -69,14 +69,14 @@ IRC_INVITE( CLIENT *Client, REQUEST *Req )
|
||||
assert( Client != NULL );
|
||||
assert( Req != NULL );
|
||||
|
||||
/* Falsche Anzahl Parameter? */
|
||||
/* Wrong number of parameters? */
|
||||
if( Req->argc != 2 ) return IRC_WriteStrClient( Client, ERR_NEEDMOREPARAMS_MSG, Client_ID( Client ), Req->command );
|
||||
|
||||
if( Client_Type( Client ) == CLIENT_SERVER ) from = Client_Search( Req->prefix );
|
||||
else from = Client;
|
||||
if( ! from ) return IRC_WriteStrClient( Client, ERR_NOSUCHNICK_MSG, Client_ID( Client ), Req->prefix );
|
||||
|
||||
/* User suchen */
|
||||
/* Search user */
|
||||
target = Client_Search( Req->argv[0] );
|
||||
if(( ! target ) || ( Client_Type( target ) != CLIENT_USER )) return IRC_WriteStrClient( from, ERR_NOSUCHNICK_MSG, Client_ID( Client ), Req->argv[0] );
|
||||
|
||||
@@ -84,36 +84,38 @@ IRC_INVITE( CLIENT *Client, REQUEST *Req )
|
||||
|
||||
if( chan )
|
||||
{
|
||||
/* Der Channel existiert bereits; ist der User Mitglied? */
|
||||
/* Channel exists. Is the user a valid member of the channel? */
|
||||
if( ! Channel_IsMemberOf( chan, from )) return IRC_WriteStrClient( from, ERR_NOTONCHANNEL_MSG, Client_ID( Client ), Req->argv[1] );
|
||||
|
||||
/* Ist der Channel "invite-only"? */
|
||||
/* Is the channel "invite-only"? */
|
||||
if( strchr( Channel_Modes( chan ), 'i' ))
|
||||
{
|
||||
/* Ja. Der User muss Channel-Operator sein! */
|
||||
/* Yes. The user must be channel operator! */
|
||||
if( ! strchr( Channel_UserModes( chan, from ), 'o' )) return IRC_WriteStrClient( from, ERR_CHANOPRIVSNEEDED_MSG, Client_ID( from ), Channel_Name( chan ));
|
||||
remember = TRUE;
|
||||
}
|
||||
|
||||
/* Ist der Ziel-User bereits Mitglied? */
|
||||
/* Is the target user already member of the channel? */
|
||||
if( Channel_IsMemberOf( chan, target )) return IRC_WriteStrClient( from, ERR_USERONCHANNEL_MSG, Client_ID( from ), Req->argv[0], Req->argv[1] );
|
||||
}
|
||||
|
||||
/* Wenn der User gebanned ist, so muss das Invite auch gespeichert werden */
|
||||
if( Lists_CheckBanned( target, chan )) remember = TRUE;
|
||||
/* If the target user is banned on that channel: remember invite */
|
||||
if( Lists_CheckBanned( target, chan )) remember = TRUE;
|
||||
|
||||
if( remember )
|
||||
{
|
||||
/* We must memember this invite */
|
||||
if( ! Lists_AddInvited( from, Client_Mask( target ), chan, TRUE )) return CONNECTED;
|
||||
}
|
||||
}
|
||||
|
||||
Log( LOG_DEBUG, "User \"%s\" invites \"%s\" to \"%s\" ...", Client_Mask( from ), Req->argv[0], Req->argv[1] );
|
||||
if( remember )
|
||||
{
|
||||
if( ! Lists_AddInvited( from, Client_Mask( target ), chan, TRUE )) return CONNECTED;
|
||||
}
|
||||
|
||||
/* an Ziel-Client forwarden ... */
|
||||
/* Inform target client */
|
||||
IRC_WriteStrClientPrefix( target, from, "INVITE %s %s", Req->argv[0], Req->argv[1] );
|
||||
|
||||
if( Client_Conn( target ) > NONE )
|
||||
{
|
||||
/* lokaler Ziel-Client, Status-Code melden */
|
||||
/* The target user is local, so we have to send the status code */
|
||||
if( ! IRC_WriteStrClientPrefix( from, target, RPL_INVITING_MSG, Client_ID( from ), Req->argv[0], Req->argv[1] )) return DISCONNECTED;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
#include "portab.h"
|
||||
|
||||
static char UNUSED id[] = "$Id: irc-server.c,v 1.32.2.1 2003/07/09 18:53:08 alex Exp $";
|
||||
static char UNUSED id[] = "$Id: irc-server.c,v 1.32.2.2 2003/12/26 16:16:48 alex Exp $";
|
||||
|
||||
#include "imp.h"
|
||||
#include <assert.h>
|
||||
@@ -117,7 +117,7 @@ IRC_SERVER( CLIENT *Client, REQUEST *Req )
|
||||
Client_SetType( Client, CLIENT_SERVER );
|
||||
Conf_SetServer( i, con );
|
||||
|
||||
#ifdef USE_ZLIB
|
||||
#ifdef ZLIB
|
||||
/* Kompression initialisieren, wenn erforderlich */
|
||||
if( strchr( Client_Flags( Client ), 'Z' ))
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
#include "portab.h"
|
||||
|
||||
static char UNUSED id[] = "$Id: irc.c,v 1.120.2.2 2003/11/07 20:51:11 alex Exp $";
|
||||
static char UNUSED id[] = "$Id: irc.c,v 1.120.2.3 2003/12/26 16:16:48 alex Exp $";
|
||||
|
||||
#include "imp.h"
|
||||
#include <assert.h>
|
||||
@@ -302,7 +302,7 @@ Option_String( CONN_ID Idx )
|
||||
options = Conn_Options( Idx );
|
||||
|
||||
strcpy( option_txt, "F" ); /* No idea what this means but the original ircd sends it ... */
|
||||
#ifdef USE_ZLIB
|
||||
#ifdef ZLIB
|
||||
if( options & CONN_ZIP ) strcat( option_txt, "z" );
|
||||
#endif
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
#include "portab.h"
|
||||
|
||||
static char UNUSED id[] = "$Id: log.c,v 1.43 2003/03/31 15:54:21 alex Exp $";
|
||||
static char UNUSED id[] = "$Id: log.c,v 1.43.2.1 2003/12/26 16:16:48 alex Exp $";
|
||||
|
||||
#include "imp.h"
|
||||
#include <assert.h>
|
||||
@@ -25,7 +25,7 @@ static char UNUSED id[] = "$Id: log.c,v 1.43 2003/03/31 15:54:21 alex Exp $";
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef USE_SYSLOG
|
||||
#ifdef SYSLOG
|
||||
#include <syslog.h>
|
||||
#endif
|
||||
|
||||
@@ -50,7 +50,7 @@ LOCAL VOID Wall_ServerNotice PARAMS(( CHAR *Msg ));
|
||||
GLOBAL VOID
|
||||
Log_Init( VOID )
|
||||
{
|
||||
#ifdef USE_SYSLOG
|
||||
#ifdef SYSLOG
|
||||
/* Syslog initialisieren */
|
||||
openlog( PACKAGE_NAME, LOG_CONS|LOG_PID, LOG_LOCAL5 );
|
||||
#endif
|
||||
@@ -125,7 +125,7 @@ Log_Exit( VOID )
|
||||
/* Error-File (stderr) loeschen */
|
||||
if( unlink( Error_File ) != 0 ) Log( LOG_ERR, "Can't delete \"%s\": %s", Error_File, strerror( errno ));
|
||||
|
||||
#ifdef USE_SYSLOG
|
||||
#ifdef SYSLOG
|
||||
/* syslog abmelden */
|
||||
closelog( );
|
||||
#endif
|
||||
@@ -180,7 +180,7 @@ va_dcl
|
||||
fprintf( stdout, "[%d] %s\n", Level, msg );
|
||||
fflush( stdout );
|
||||
}
|
||||
#ifdef USE_SYSLOG
|
||||
#ifdef SYSLOG
|
||||
else
|
||||
{
|
||||
/* Syslog */
|
||||
@@ -206,7 +206,7 @@ va_dcl
|
||||
GLOBAL VOID
|
||||
Log_Init_Resolver( VOID )
|
||||
{
|
||||
#ifdef USE_SYSLOG
|
||||
#ifdef SYSLOG
|
||||
openlog( PACKAGE_NAME, LOG_CONS|LOG_PID, LOG_LOCAL5 );
|
||||
#endif
|
||||
} /* Log_Init_Resolver */
|
||||
@@ -215,7 +215,7 @@ Log_Init_Resolver( VOID )
|
||||
GLOBAL VOID
|
||||
Log_Exit_Resolver( VOID )
|
||||
{
|
||||
#ifdef USE_SYSLOG
|
||||
#ifdef SYSLOG
|
||||
closelog( );
|
||||
#endif
|
||||
} /* Log_Exit_Resolver */
|
||||
@@ -234,7 +234,7 @@ va_dcl
|
||||
{
|
||||
/* Eintrag des Resolver in Logfile(s) schreiben */
|
||||
|
||||
#ifndef USE_SYSLOG
|
||||
#ifndef SYSLOG
|
||||
return;
|
||||
#else
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* (at your option) any later version.
|
||||
* Please read the file COPYING, README and AUTHORS for more information.
|
||||
*
|
||||
* $Id: log.h,v 1.13 2002/12/12 12:23:43 alex Exp $
|
||||
* $Id: log.h,v 1.13.4.1 2003/12/26 16:16:48 alex Exp $
|
||||
*
|
||||
* Logging functions (header)
|
||||
*/
|
||||
@@ -18,7 +18,7 @@
|
||||
#define __log_h__
|
||||
|
||||
|
||||
#ifdef USE_SYSLOG
|
||||
#ifdef SYSLOG
|
||||
# include <syslog.h>
|
||||
#else
|
||||
# define LOG_EMERG 0
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* (at your option) any later version.
|
||||
* Please read the file COPYING, README and AUTHORS for more information.
|
||||
*
|
||||
* $Id: messages.h,v 1.64 2003/03/19 21:16:16 alex Exp $
|
||||
* $Id: messages.h,v 1.64.2.1 2003/12/26 16:16:48 alex Exp $
|
||||
*
|
||||
* IRC numerics (Header)
|
||||
*/
|
||||
@@ -117,7 +117,7 @@
|
||||
#define ERR_UMODEUNKNOWNFLAG2_MSG "501 %s :Unknown mode \"%c%c\""
|
||||
#define ERR_USERSDONTMATCH_MSG "502 %s :Can't set/get mode for other users"
|
||||
|
||||
#ifdef USE_ZLIB
|
||||
#ifdef ZLIB
|
||||
#define RPL_STATSLINKINFOZIP_MSG "211 %s %s %d %ld %ld/%ld %ld %ld/%ld :%ld"
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* ngIRCd -- The Next Generation IRC Daemon
|
||||
* Copyright (c)2001-2003 by Alexander Barton (alex@barton.de)
|
||||
* Copyright (c)2001-2004 by Alexander Barton (alex@barton.de)
|
||||
*
|
||||
* 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
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
#include "portab.h"
|
||||
|
||||
static char UNUSED id[] = "$Id: ngircd.c,v 1.76.2.1 2003/07/18 20:50:05 alex Exp $";
|
||||
static char UNUSED id[] = "$Id: ngircd.c,v 1.76.2.3 2004/01/02 19:24:46 alex Exp $";
|
||||
|
||||
#include "imp.h"
|
||||
#include <assert.h>
|
||||
@@ -298,7 +298,7 @@ main( int argc, const char *argv[] )
|
||||
* sind in doc/Protocol.txt beschrieben. */
|
||||
#ifdef IRCPLUS
|
||||
sprintf( NGIRCd_ProtoID, "%s%s %s|%s:%s", PROTOVER, PROTOIRCPLUS, PACKAGE_NAME, PACKAGE_VERSION, IRCPLUSFLAGS );
|
||||
#ifdef USE_ZLIB
|
||||
#ifdef ZLIB
|
||||
strcat( NGIRCd_ProtoID, "Z" );
|
||||
#endif
|
||||
if( Conf_OperCanMode ) strcat( NGIRCd_ProtoID, "o" );
|
||||
@@ -306,7 +306,7 @@ main( int argc, const char *argv[] )
|
||||
sprintf( NGIRCd_ProtoID, "%s%s %s|%s", PROTOVER, PROTOIRC, PACKAGE_NAME, PACKAGE_VERSION );
|
||||
#endif
|
||||
strcat( NGIRCd_ProtoID, " P" );
|
||||
#ifdef USE_ZLIB
|
||||
#ifdef ZLIB
|
||||
strcat( NGIRCd_ProtoID, "Z" );
|
||||
#endif
|
||||
Log( LOG_DEBUG, "Protocol and server ID is \"%s\".", NGIRCd_ProtoID );
|
||||
@@ -361,15 +361,15 @@ NGIRCd_VersionAddition( VOID )
|
||||
|
||||
strcpy( txt, "" );
|
||||
|
||||
#ifdef USE_SYSLOG
|
||||
#ifdef SYSLOG
|
||||
if( txt[0] ) strcat( txt, "+" );
|
||||
strcat( txt, "SYSLOG" );
|
||||
#endif
|
||||
#ifdef USE_ZLIB
|
||||
#ifdef ZLIB
|
||||
if( txt[0] ) strcat( txt, "+" );
|
||||
strcat( txt, "ZLIB" );
|
||||
#endif
|
||||
#ifdef USE_TCPWRAP
|
||||
#ifdef TCPWRAP
|
||||
if( txt[0] ) strcat( txt, "+" );
|
||||
strcat( txt, "TCPWRAP" );
|
||||
#endif
|
||||
@@ -529,7 +529,7 @@ LOCAL VOID
|
||||
Show_Version( VOID )
|
||||
{
|
||||
puts( NGIRCd_Version( ));
|
||||
puts( "Copyright (c)2001-2003 by Alexander Barton (<alex@barton.de>)." );
|
||||
puts( "Copyright (c)2001-2004 by Alexander Barton (<alex@barton.de>)." );
|
||||
puts( "Homepage: <http://arthur.ath.cx/~alex/ngircd/>\n" );
|
||||
puts( "This is free software; see the source for copying conditions. There is NO" );
|
||||
puts( "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." );
|
||||
|
||||
Reference in New Issue
Block a user