mirror of
https://github.com/osmarks/ngircd.git
synced 2025-09-23 20:54:02 +00:00
Compare commits
388 Commits
branch-21.
...
rel-26-rc1
Author | SHA1 | Date | |
---|---|---|---|
![]() |
03aec7d0b3 | ||
![]() |
5d5fdfb3fd | ||
![]() |
05261c020e | ||
![]() |
e860807500 | ||
![]() |
e889de9d92 | ||
![]() |
fcf2874a9d | ||
![]() |
4b7e8db418 | ||
![]() |
bc22f41c51 | ||
![]() |
d11f13f187 | ||
![]() |
21f33e5911 | ||
![]() |
db88b92c8a | ||
![]() |
02850008f4 | ||
![]() |
52d8fa2c09 | ||
![]() |
1f40776bc1 | ||
![]() |
387a29a7fd | ||
![]() |
54fac57603 | ||
![]() |
9f05f5ee61 | ||
![]() |
629a45ee0f | ||
![]() |
8d414b079c | ||
![]() |
8a37695bf3 | ||
![]() |
71e9bb1ca6 | ||
![]() |
0dc692b1f7 | ||
![]() |
79a917f954 | ||
![]() |
11ea6a5070 | ||
![]() |
42e8654d7b | ||
![]() |
1fc54ebef1 | ||
![]() |
c2c84a1d26 | ||
![]() |
05324b232f | ||
![]() |
ea1207238f | ||
![]() |
830f00e953 | ||
![]() |
14777c18cf | ||
![]() |
e4a6bd5099 | ||
![]() |
ab62dd27dc | ||
![]() |
c6e3c13f27 | ||
![]() |
04de1423eb | ||
![]() |
13b8324c4a | ||
![]() |
f27827d793 | ||
![]() |
86f3c563d6 | ||
![]() |
eead4a631f | ||
![]() |
9c5e42458e | ||
![]() |
61ac8be2fd | ||
![]() |
3aa1d880fe | ||
![]() |
ba3b22b851 | ||
![]() |
4d519cfdbf | ||
![]() |
fed22184c5 | ||
![]() |
a3072ce698 | ||
![]() |
decf98d5ef | ||
![]() |
a77353361b | ||
![]() |
3f7caff630 | ||
![]() |
8d173a3328 | ||
![]() |
e7cb9b1a00 | ||
![]() |
c411643d45 | ||
![]() |
2e1797d5a5 | ||
![]() |
f5fa7db4ba | ||
![]() |
22cae1b5fc | ||
![]() |
fb5aa8f652 | ||
![]() |
91e87af605 | ||
![]() |
9286686c09 | ||
![]() |
1f69f1d0ab | ||
![]() |
b03fcaab5a | ||
![]() |
70eb1ee57d | ||
![]() |
80437b2533 | ||
![]() |
de1de40551 | ||
![]() |
4169cb25e6 | ||
![]() |
9a69c02567 | ||
![]() |
147e424d98 | ||
![]() |
e954b59d41 | ||
![]() |
b1893e740e | ||
![]() |
2c495a1fe7 | ||
![]() |
52c53f523a | ||
![]() |
f8002057f2 | ||
![]() |
13122bc97d | ||
![]() |
bb1d014aba | ||
![]() |
ad8c4b8efb | ||
![]() |
ad86a41eee | ||
![]() |
aec86aa84c | ||
![]() |
74631fa728 | ||
![]() |
1d4f80b422 | ||
![]() |
fe01ef9a51 | ||
![]() |
96bad2b861 | ||
![]() |
456eea6f18 | ||
![]() |
7690716e4f | ||
![]() |
c97fb2e93e | ||
![]() |
c8162a80be | ||
![]() |
e8e04b4c8f | ||
![]() |
a38eea8987 | ||
![]() |
d0f9d3d92e | ||
![]() |
bb4101cd6c | ||
![]() |
e29e15ca27 | ||
![]() |
8bd88be8ad | ||
![]() |
fb760d9473 | ||
![]() |
7f2d21f962 | ||
![]() |
6af9476cad | ||
![]() |
263c5edb60 | ||
![]() |
b4f7aae67e | ||
![]() |
798de94d65 | ||
![]() |
ac341176da | ||
![]() |
6a622c0084 | ||
![]() |
91ef17aba2 | ||
![]() |
13761f1ec9 | ||
![]() |
03acae970d | ||
![]() |
8f0c705029 | ||
![]() |
d803ff0525 | ||
![]() |
3559940e4a | ||
![]() |
34bdb0d98a | ||
![]() |
7ed22d0b22 | ||
![]() |
d9f81ac669 | ||
![]() |
7207bef418 | ||
![]() |
619a3f3ff2 | ||
![]() |
05640f9285 | ||
![]() |
e009fc87d5 | ||
![]() |
c37d6971d6 | ||
![]() |
ddeb7b20eb | ||
![]() |
543f44bff8 | ||
![]() |
bc728f92de | ||
![]() |
2f6f6929d8 | ||
![]() |
f244ab2219 | ||
![]() |
e17d4bdec7 | ||
![]() |
b2ba3e745a | ||
![]() |
3890304b54 | ||
![]() |
a69866f3f9 | ||
![]() |
7071476d2a | ||
![]() |
3c627dd70d | ||
![]() |
879d550408 | ||
![]() |
2bb917f05a | ||
![]() |
72acf53d69 | ||
![]() |
479d7d99c1 | ||
![]() |
181da30997 | ||
![]() |
bfebdaece8 | ||
![]() |
d2a134b79c | ||
![]() |
74f021fb44 | ||
![]() |
8e09180295 | ||
![]() |
f0532c98cd | ||
![]() |
9e0e955daf | ||
![]() |
3e44738416 | ||
![]() |
02c8887543 | ||
![]() |
77861f6fe2 | ||
![]() |
e9e3df27b7 | ||
![]() |
0dc3c13469 | ||
![]() |
d0d4de4980 | ||
![]() |
85df414907 | ||
![]() |
f5ff22d98f | ||
![]() |
995bbfd627 | ||
![]() |
dd6d75d37d | ||
![]() |
daa88b7651 | ||
![]() |
2924b3d52a | ||
![]() |
a335e480c5 | ||
![]() |
dde89b1267 | ||
![]() |
455f073687 | ||
![]() |
804c240320 | ||
![]() |
fb99d7c92e | ||
![]() |
1d06ed02ce | ||
![]() |
c283b52a78 | ||
![]() |
b708c95173 | ||
![]() |
722afc1b81 | ||
![]() |
86a64ce6aa | ||
![]() |
e84000f7b8 | ||
![]() |
a93247d32f | ||
![]() |
a673a6e3af | ||
![]() |
0ab4e7bffd | ||
![]() |
8f0d24c831 | ||
![]() |
0a6e284582 | ||
![]() |
2254e92e60 | ||
![]() |
7cda2f13f4 | ||
![]() |
7dba1a0766 | ||
![]() |
055d6e8056 | ||
![]() |
432a9297f8 | ||
![]() |
4dcd5f1225 | ||
![]() |
6a5569c27d | ||
![]() |
49ab79d0e6 | ||
![]() |
cedba36965 | ||
![]() |
40bea95c08 | ||
![]() |
7c7d03b730 | ||
![]() |
4693226d69 | ||
![]() |
afb59ab8e5 | ||
![]() |
d90f0323e5 | ||
![]() |
01e590b007 | ||
![]() |
7b7ee6a3ca | ||
![]() |
46838510ab | ||
![]() |
0903343f85 | ||
![]() |
182bfac855 | ||
![]() |
1e386fb7ac | ||
![]() |
52ccba5d1e | ||
![]() |
98e9467c85 | ||
![]() |
e8dacb68dc | ||
![]() |
398022631a | ||
![]() |
f2cef85fde | ||
![]() |
6ed59a8548 | ||
![]() |
49acb68584 | ||
![]() |
d8aba40f07 | ||
![]() |
87887bc632 | ||
![]() |
cb3a4321a2 | ||
![]() |
1e84b2640e | ||
![]() |
86d27eaf89 | ||
![]() |
4acf95ab61 | ||
![]() |
57cd41d289 | ||
![]() |
eb9929e82c | ||
![]() |
c2e4c304e3 | ||
![]() |
c56138c280 | ||
![]() |
a1ce3fc779 | ||
![]() |
ccc899c7f4 | ||
![]() |
2a52befa56 | ||
![]() |
2c18e9a7f8 | ||
![]() |
9811223fb8 | ||
![]() |
0083fe177f | ||
![]() |
34578b8b30 | ||
![]() |
85dc4d8777 | ||
![]() |
64c265cf33 | ||
![]() |
b72a7a4b96 | ||
![]() |
b8482fd3cf | ||
![]() |
90ea23ab4f | ||
![]() |
6e7e744cc6 | ||
![]() |
24cec978ee | ||
![]() |
a02524465e | ||
![]() |
813ea874f8 | ||
![]() |
813897023e | ||
![]() |
a5ca8be658 | ||
![]() |
c364d67f80 | ||
![]() |
5545e1bebf | ||
![]() |
d118cd74b6 | ||
![]() |
599626d570 | ||
![]() |
571b1a8b83 | ||
![]() |
b71a0ddbd5 | ||
![]() |
7ff16e8116 | ||
![]() |
f6b7764eb5 | ||
![]() |
adfe5affed | ||
![]() |
27934afd7e | ||
![]() |
f64cb901ef | ||
![]() |
d28d838cb9 | ||
![]() |
2fc61ce8a6 | ||
![]() |
5c48d7e9c7 | ||
![]() |
0f490b5cae | ||
![]() |
a43d79aeff | ||
![]() |
93a872a36b | ||
![]() |
c4245220de | ||
![]() |
f8f7f83f5a | ||
![]() |
03c8997af3 | ||
![]() |
4396936f38 | ||
![]() |
4da04640e6 | ||
![]() |
10c7ba99e7 | ||
![]() |
1136b97690 | ||
![]() |
d9a97f2857 | ||
![]() |
a4af9024fd | ||
![]() |
6fc53558ed | ||
![]() |
21767c968d | ||
![]() |
c5da483685 | ||
![]() |
4330f5d1c9 | ||
![]() |
81b81c818c | ||
![]() |
52825cde29 | ||
![]() |
03e6568079 | ||
![]() |
7dacc314f9 | ||
![]() |
24adfb88b4 | ||
![]() |
6ed440a030 | ||
![]() |
c7bbc9a390 | ||
![]() |
6171beb7ab | ||
![]() |
2196e945e4 | ||
![]() |
f16eb1b686 | ||
![]() |
c41f18e3f9 | ||
![]() |
dbfe1beca8 | ||
![]() |
6bdae55177 | ||
![]() |
fb5ae9e844 | ||
![]() |
bd8d4e710c | ||
![]() |
9a931a549b | ||
![]() |
3c30490d54 | ||
![]() |
6250335352 | ||
![]() |
7e14bd3b58 | ||
![]() |
31b3c83c1f | ||
![]() |
6e4235443e | ||
![]() |
cdcf474f15 | ||
![]() |
f33a4067a1 | ||
![]() |
100de3e4cc | ||
![]() |
7b58538074 | ||
![]() |
3f436e1810 | ||
![]() |
967deebacd | ||
![]() |
74262a4093 | ||
![]() |
be88707027 | ||
![]() |
7d7eb735f0 | ||
![]() |
fa7fac88d2 | ||
![]() |
84ff5a6eb9 | ||
![]() |
bf2eae3249 | ||
![]() |
ffad2da835 | ||
![]() |
3f1547ecde | ||
![]() |
7893dc5241 | ||
![]() |
896d45471a | ||
![]() |
01c3552140 | ||
![]() |
ce3c4074ba | ||
![]() |
40ed94a1f2 | ||
![]() |
c1f180b87b | ||
![]() |
f5944a17e4 | ||
![]() |
06920df4bb | ||
![]() |
e864b1f33e | ||
![]() |
3f807e1045 | ||
![]() |
39b8fc65b6 | ||
![]() |
3de972e0bd | ||
![]() |
ec2bf5c5a2 | ||
![]() |
70160b3a5b | ||
![]() |
a90004b913 | ||
![]() |
9e79ed8605 | ||
![]() |
cdd6b961af | ||
![]() |
bfc727ce49 | ||
![]() |
dee824a3f0 | ||
![]() |
f5ae1dd36c | ||
![]() |
794cb51e4b | ||
![]() |
dd4b74e29b | ||
![]() |
daed2467dd | ||
![]() |
d314c75a37 | ||
![]() |
5009ab3e8c | ||
![]() |
5713c49c84 | ||
![]() |
35f1db5f28 | ||
![]() |
4c2acd55c6 | ||
![]() |
f547981188 | ||
![]() |
b35f8916a5 | ||
![]() |
3d7aa9f906 | ||
![]() |
a534e71e8d | ||
![]() |
a13bb78b1e | ||
![]() |
b130b35f48 | ||
![]() |
37090a28e8 | ||
![]() |
67256f9da1 | ||
![]() |
7b10a0e4ee | ||
![]() |
259c314d14 | ||
![]() |
51396f8f1c | ||
![]() |
6238196dac | ||
![]() |
43fb18f2f5 | ||
![]() |
a4ed90ba9a | ||
![]() |
af9161a9bc | ||
![]() |
485d0aec81 | ||
![]() |
abf280d5bd | ||
![]() |
ccc9e1baa4 | ||
![]() |
755562d147 | ||
![]() |
384b27cee0 | ||
![]() |
6496fa4655 | ||
![]() |
20b52fe33d | ||
![]() |
0fc822d8c4 | ||
![]() |
2e168c7809 | ||
![]() |
14a84dfca5 | ||
![]() |
4cb36e370e | ||
![]() |
e273bd226a | ||
![]() |
3b24ebf122 | ||
![]() |
599cfd0944 | ||
![]() |
90062111f7 | ||
![]() |
e747fe9277 | ||
![]() |
0f85c4c6a7 | ||
![]() |
e73d70ce6f | ||
![]() |
2560e5f156 | ||
![]() |
1f5508d049 | ||
![]() |
97b4fd8a08 | ||
![]() |
fe73835666 | ||
![]() |
5b4b7e2f55 | ||
![]() |
8ae2cdfce9 | ||
![]() |
6685ae063f | ||
![]() |
e2b85ccde3 | ||
![]() |
7b358a57ac | ||
![]() |
5d88030bd1 | ||
![]() |
8872653ef6 | ||
![]() |
4d4512cd72 | ||
![]() |
bc098794ee | ||
![]() |
788da901ee | ||
![]() |
2a40112f09 | ||
![]() |
61b7932e82 | ||
![]() |
f024a4992a | ||
![]() |
d38747d951 | ||
![]() |
18070e5381 | ||
![]() |
d913323ca9 | ||
![]() |
9230f2fff1 | ||
![]() |
86bdf6e1d4 | ||
![]() |
1a628fff51 | ||
![]() |
bd33bd770d | ||
![]() |
b8433e9261 | ||
![]() |
5a424f60da | ||
![]() |
444308ccde | ||
![]() |
1ad536eeed | ||
![]() |
c68ae1a9f5 | ||
![]() |
df7ea9e7b4 | ||
![]() |
34824abe0d | ||
![]() |
ae00c100ac | ||
![]() |
61d1c864c5 | ||
![]() |
8d25044ce5 | ||
![]() |
c3c719b978 | ||
![]() |
9ee3760493 | ||
![]() |
344185b1bd | ||
![]() |
fcf61e9e02 | ||
![]() |
9f236c4b91 | ||
![]() |
00249f3c80 | ||
![]() |
925b4de298 | ||
![]() |
48ea69d778 | ||
![]() |
80d0613bf2 | ||
![]() |
4ab688c5e8 | ||
![]() |
2e93129877 |
4
.clang_complete
Normal file
4
.clang_complete
Normal file
@@ -0,0 +1,4 @@
|
||||
-I./src
|
||||
-I./src/ipaddr
|
||||
-I./src/portab
|
||||
-I./src/tool
|
20
.editorconfig
Normal file
20
.editorconfig
Normal file
@@ -0,0 +1,20 @@
|
||||
# ngIRCd -- The Next Generation IRC Daemon
|
||||
# Copyright (c)2001-2016 Alexander Barton (alex@barton.de) and Contributors.
|
||||
#
|
||||
# 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.
|
||||
|
||||
# .editorconfig: Editor settings, see <http://editorconfig.org>.
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = tab
|
||||
indent_size = 8
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
56
.gitignore
vendored
56
.gitignore
vendored
@@ -1,4 +1,5 @@
|
||||
Makefile
|
||||
Makefile.am
|
||||
Makefile.in
|
||||
aclocal.m4
|
||||
ansi2knr.1
|
||||
@@ -7,18 +8,73 @@ ansi2knr.h
|
||||
ar-lib
|
||||
autom4te.cache
|
||||
build-stamp-ngircd*
|
||||
build+*
|
||||
compile
|
||||
config.cache
|
||||
config.log
|
||||
config.status
|
||||
configure
|
||||
configure.ac
|
||||
configure.lineno
|
||||
cov-int
|
||||
cscope.out
|
||||
debian
|
||||
depcomp
|
||||
install-sh
|
||||
missing
|
||||
ngircd.dest
|
||||
.*.swp
|
||||
.deps
|
||||
.vscode
|
||||
*.a
|
||||
*.o
|
||||
doc/sample-ngircd.conf
|
||||
doc/src/html
|
||||
man/ngircd.8
|
||||
man/ngircd.conf.5
|
||||
src/config.h
|
||||
src/config.h.in
|
||||
src/config.h.in~
|
||||
src/stamp-h1
|
||||
src/ngircd/check-help
|
||||
src/ngircd/check-version
|
||||
src/ngircd/ngircd
|
||||
src/ngircd/ngircd.exe
|
||||
src/portab/portabtest
|
||||
src/portab/portabtest.exe
|
||||
src/testsuite/*.e_
|
||||
src/testsuite/channel-test
|
||||
src/testsuite/connect-ssl-cert1-test
|
||||
src/testsuite/connect-ssl-cert2-test
|
||||
src/testsuite/connect-test
|
||||
src/testsuite/connect-tls-cert1-test
|
||||
src/testsuite/connect-tls-cert2-test
|
||||
src/testsuite/invite-test
|
||||
src/testsuite/join-test
|
||||
src/testsuite/kick-test
|
||||
src/testsuite/logs
|
||||
src/testsuite/message-test
|
||||
src/testsuite/misc-test
|
||||
src/testsuite/mode-test
|
||||
src/testsuite/ngircd-test1.log
|
||||
src/testsuite/ngircd-test1.motd
|
||||
src/testsuite/ngircd-test2.log
|
||||
src/testsuite/ngircd-test2.motd
|
||||
src/testsuite/ngircd-test3.log
|
||||
src/testsuite/ngircd-test3.motd
|
||||
src/testsuite/opless-channel-test
|
||||
src/testsuite/server-link-test
|
||||
src/testsuite/server-login-test
|
||||
src/testsuite/ssl/cert.pem
|
||||
src/testsuite/ssl/dhparams.pem
|
||||
src/testsuite/ssl/key.pem
|
||||
src/testsuite/T-ngircd1
|
||||
src/testsuite/T-ngircd1.exe
|
||||
src/testsuite/T-ngircd2
|
||||
src/testsuite/T-ngircd2.exe
|
||||
src/testsuite/T-ngircd3
|
||||
src/testsuite/T-ngircd3.exe
|
||||
src/testsuite/tests
|
||||
src/testsuite/tests-skipped.lst
|
||||
src/testsuite/who-test
|
||||
src/testsuite/whois-test
|
||||
|
20
.mailmap
20
.mailmap
@@ -1,4 +1,22 @@
|
||||
# mailmap file for git-[short]log and git-blame
|
||||
# use "git shortlog -se" to see the list of all authors.
|
||||
|
||||
Alexander Barton <alex@barton.de> <anonymous>
|
||||
Alexander Barton <alex@barton.de> <alex@kfreebsd.barton.de>
|
||||
|
||||
Alexander Barton <anonymous>
|
||||
Ali Shemiran <ashemira@ucsd.edu>
|
||||
|
||||
Christoph Biedl <ngircd.anoy@manchmal.in-ulm.de> <debian.axhn@manchmal.in-ulm.de>
|
||||
|
||||
Dana Dahlstrom <dana+ngIRCd@cs.ucsd.edu> <dana@cs.ucsd.edu>
|
||||
Dana Dahlstrom <dana+ngIRCd@cs.ucsd.edu> <dana+70@cs.ucsd.edu>
|
||||
|
||||
DNS <dns@rbose.org>
|
||||
|
||||
Götz Hoffart <goetz@hoffart.de>
|
||||
|
||||
LucentW <lucent@zebes.info> <LucentW@users.noreply.github.com>
|
||||
|
||||
Michi <michi+ngircd@dataswamp.org>
|
||||
|
||||
Sam James <sam@cmpct.info> <11667869+thesamesam@users.noreply.github.com>
|
||||
|
13
.travis.yml
13
.travis.yml
@@ -1,7 +1,14 @@
|
||||
language: c
|
||||
before_install:
|
||||
- sudo apt-get update -qq
|
||||
- sudo apt-get install -qq libident-dev libpam0g-dev libssl-dev libwrap0-dev zlib1g-dev expect telnet
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libident-dev
|
||||
- libpam0g-dev
|
||||
- libssl-dev
|
||||
- libwrap0-dev
|
||||
- zlib1g-dev
|
||||
- expect
|
||||
- telnet
|
||||
compiler:
|
||||
- gcc
|
||||
- clang
|
||||
|
39
AUTHORS
39
AUTHORS
@@ -2,16 +2,18 @@
|
||||
ngIRCd - Next Generation IRC Server
|
||||
http://ngircd.barton.de/
|
||||
|
||||
(c)2001-2013 Alexander Barton and Contributors.
|
||||
(c)2001-2020 Alexander Barton and Contributors.
|
||||
ngIRCd is free software and published under the
|
||||
terms of the GNU General Public License.
|
||||
|
||||
-- AUTHORS and CONTRIBUTORS --
|
||||
|
||||
|
||||
Note: If you have critics, patches or something else, please feel free to
|
||||
post a mail to the ngIRCd mailing list: <ngircd-ml@arthur.barton.de> (please
|
||||
see <http://ngircd.barton.de/#ml> for details).
|
||||
Note:
|
||||
If you have comments, patches or something else, please feel free to post
|
||||
a mail to the ngIRCd mailing list: <ngircd-ml@ngircd.barton.de> (please see
|
||||
<http://ngircd.barton.de/support.php> for details) or join the ngIRCd IRC
|
||||
channel "#ngircd" on irc.barton.de: <irc://irc.barton.de/ngircd>.
|
||||
|
||||
Don't mail the people listed here directly, if possible!
|
||||
|
||||
@@ -27,32 +29,53 @@ Contributors
|
||||
Ali Shemiran <ashemira@ucsd.edu>
|
||||
Ask Bjørn Hansen <ask@develooper.com>
|
||||
Benjamin Pineau <ben@zouh.org>
|
||||
Bernd Kuhls <bernd.kuhls@t-online.de>
|
||||
Brandon Beresini <beresini@google.com>
|
||||
Brett Smith <brett@w3.org>
|
||||
Brian Collins <bricollins@gmail.com>
|
||||
Bryan Caldwell <bcaldwel@ucsd.edu>
|
||||
Christian Aistleitner <christian@quelltextlich.at>
|
||||
Christoph Biedl <ngircd.anoy@manchmal.in-ulm.de>
|
||||
DNS <dns@rbose.org>
|
||||
Dana Dahlstrom <dana+ngIRCd@cs.ucsd.edu>
|
||||
David Kingston <deathking1337@aim.com>
|
||||
DNS <dns@rbose.org>
|
||||
Eric Grunow <egrunow@ucsd.edu>
|
||||
Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Federico G. Schwindt <fgsch@lodoss.net>
|
||||
Gabor Adam Toth <tg@tgbit.net>
|
||||
Goetz Hoffart <goetz@hoffart.de>
|
||||
Götz Hoffart <goetz@hoffart.de>
|
||||
Hilko Bengen <bengen@hilluzination.de>
|
||||
Ian Chard <ian@chard.org>
|
||||
Ilja Osthoff <i.osthoff@gmx.net>
|
||||
ItsOnlyBinary <ItsOnlyBinary@users.noreply.github.com>
|
||||
James Lu <james@overdrivenetworks.com>
|
||||
Jari Aalto <jari.aalto@cante.net>
|
||||
Johann Hartwig Hauschild <git@hauschild.it>
|
||||
JRMU <jrmu@lecturify.com>
|
||||
LucentW <lucent@zebes.info>
|
||||
Mantas Mikulėnas <grawity@gmail.com>
|
||||
Michi <michi+ngircd@dataswamp.org>
|
||||
Neale Pickett <neale@woozle.org>
|
||||
Peter Powell <petpow@saberuk.com>
|
||||
Rolf Eike Beer <eike@sf-mail.de>
|
||||
Rosen Penev <rosenp@gmail.com>
|
||||
Roy Sindre Norangshol <roy.sindre@norangshol.no>
|
||||
Sam James <sam@cmpct.info>
|
||||
Scott Perry <scperry@ucsd.edu>
|
||||
Sean Reifschneider <jafo-rpms@tummy.com>
|
||||
Sebastian Köhler <sebkoehler@whoami.org.uk>
|
||||
shankari <shankari@eecs.berkeley.edu>
|
||||
Tassilo Schweyer <dev@welterde.de>
|
||||
Tom Ryder <tom@sanctum.geek.nz>
|
||||
Unit 193 <unit193@ubuntu.com>
|
||||
William Pitcock <nenolod@dereferenced.org>
|
||||
Windree <57554809+Windree@users.noreply.github.com>
|
||||
xor <xorboy@gmail.com>
|
||||
Yecheng Fu <cofyc.jackson@gmail.com>
|
||||
|
||||
|
||||
Code snippets
|
||||
~~~~~~~~~~~~~
|
||||
J. Kercheval: pattern matching functions
|
||||
Patrick Powell <papowell@astart.com>: snprintf()-function
|
||||
Andrew Tridgell & Martin Pool: strl{cpy|cat}()-functions
|
||||
John Kercheval: pattern matching functions
|
||||
Patrick Powell <papowell@astart.com>: snprintf()-function
|
||||
|
552
ChangeLog
552
ChangeLog
@@ -2,19 +2,503 @@
|
||||
ngIRCd - Next Generation IRC Server
|
||||
http://ngircd.barton.de/
|
||||
|
||||
(c)2001-2013 Alexander Barton and Contributors.
|
||||
(c)2001-2020 Alexander Barton and Contributors.
|
||||
ngIRCd is free software and published under the
|
||||
terms of the GNU General Public License.
|
||||
|
||||
-- ChangeLog --
|
||||
|
||||
ngIRCd 26
|
||||
|
||||
ngIRCd 26~rc1 (2020-05-10)
|
||||
- Tweak & update doc/HowToRelease.txt, .mailmap and AUTHORS files.
|
||||
- Allow up to 512 characters per line in MOTD and help text files (but keep
|
||||
in mind that lines can't get that long, because they have to be prefixed
|
||||
before being sent to the client). But this allows for more fancy MOTDs :-)
|
||||
Closes #271.
|
||||
- Show the actually allowed channel types in the ISUPPORT(005) numeric which
|
||||
are configured by the "AllowedChannelTypes" configuration variable.
|
||||
Closes #273.
|
||||
- Handle commands in the read buffer before reading more data and don't wait
|
||||
for the network in this case: If there are more bytes in the read buffer
|
||||
already than a single valid IRC command can get long (513 bytes), wait for
|
||||
this/those command(s) to be handled first and don't try to read even more
|
||||
data from the network (which most probably would overflow the read buffer
|
||||
of this connection soon).
|
||||
- Update Travis-CI configuration, "sudo" is depreacted.
|
||||
- Log G-/K-Line changes only when not initiated by a server: this prevents
|
||||
the log from becomming spammed during "net bursts".
|
||||
- Update test suite to include SSL tests, including checking for reloading
|
||||
certificates during runtime.
|
||||
- Makefile.am: Replace "make" with "${MAKE}". This fixes warnings like this:
|
||||
"warning: jobserver unavailable: using -j1. Add `+' to parent make rule."
|
||||
Thanks to Sam James (sam_c) <sam@cmpct.info>!
|
||||
Closes #270.
|
||||
- Add support for GnuTLS certificate reload, which is quite handy when using
|
||||
Let's Encrypt, for example. Until now this was only supported when linked
|
||||
with OpenSSL. Thanks a lot, Hilko Bengen <bengen@hilluzination.de>!
|
||||
- Remove deprecated legacy configuration options and related functions that
|
||||
have been marked for removal for quite some time:
|
||||
- PredefChannelsOnly (v22)
|
||||
- NoticeAuth (v24)
|
||||
- NoXXX (v19)
|
||||
- Old '[GLOBAL]' section handling (v19)
|
||||
Thanks to Michi <michi+ngircd@dataswamp.org> for the patch!
|
||||
- Fix recursion bug on write errors: Depending on the stack size, too many
|
||||
clients on the same channel quitting at the same time would trigger a crash
|
||||
due to too many recursive calls to Conn_Close(). Thanks to Michi
|
||||
<michi+ngircd@dataswamp.org> for the patch!
|
||||
- Fix builds using GCC option -fno-common, which is the default starting with
|
||||
GCC 10. Thanks to Michi <michi+ngircd@dataswamp.org> for the patch!
|
||||
Closes #266.
|
||||
- Convert INSTALL and README files to Markdown.
|
||||
- Allow setting arbitrary channel modes in the configuration file by handling
|
||||
them like in MODE commands, and allow multiple "Modes =" lines per [Channel]
|
||||
section. Thanks to Michi <michi+ngircd@dataswamp.org>!
|
||||
Closes #55.
|
||||
- Add "FNC" (forced nick changes) to ISUPPORT(005) numeric. Most probably
|
||||
this doesn't make any difference to any client, but it seems correct.
|
||||
See <http://www.irc.org/tech_docs/005.html> for details.
|
||||
- Reuse old SSL key if loading a new one failed.
|
||||
- Remove outdated OpenBSD/NetBSD systrace.policy.
|
||||
- Enhance handling of command line errors, and return with exit code 0 ("no
|
||||
error") when "--help" or "--version" is used (which resulted in exit code 1,
|
||||
"error" before). Exit with code 2 ("command line error") for all other
|
||||
invalid command line options, and show the error message itself on stderr
|
||||
(instead of stdout and exit code 1, "generic error", as before).
|
||||
This new behaviour is more in line with the GNU "coding standards",
|
||||
see <https://www.gnu.org/prep/standards/html_node/_002d_002dhelp.html>.
|
||||
- Fix and update Xcode project: Reference correct contrib/Makefile.am file,
|
||||
correctly sort contrib/nglog.sh and add "ORGANIZATIONNAME" setting.
|
||||
- contrib/ngindent.sh: Add more GNU indent options for better results, and
|
||||
add the ".sh" suffix to bring this script in line with the others in the
|
||||
contrib/ folder.
|
||||
- Add ./contrib/nglog.sh: This script parses the log output of ngircd(8),
|
||||
and colorizes the messages according to their log level. Example usage:
|
||||
ngircd -f $PWD/doc/sample-ngircd.conf -np | ./contrib/nglog.sh
|
||||
- Log received signals with their names using strsignal(3), when available.
|
||||
- Make test suite compatible with Haiku OS.
|
||||
- Fix host mask cloaking bug, don't cloak multiple times: Previously, each
|
||||
server would cloak every user's host mask. The problem is that if a network
|
||||
has more than one server, then a user's host mask would get cloaked twice.
|
||||
This patch ensures that a server only cloaks the host mask if it has not yet
|
||||
been cloaked (the period indicates it's still an IP address). Thanks to
|
||||
JRMU <jrmu@lecturify.com> for the patch!
|
||||
Closes #228.
|
||||
- Enlarge buffers of info texts to 128 bytes. This includes:
|
||||
- "Real name" of a client (4th filed of the USER command).
|
||||
- Server info text ("Info" configuration option).
|
||||
- Admin info texts and email address ("AdminInfo1", "AdminInfo2" and
|
||||
"AdminEmail" configuration options).
|
||||
- Network name ("Network" configuration option).
|
||||
The limit was 64 bytes before ...
|
||||
Closes #258.
|
||||
- Streamline handling of invalid and unset server name: Don't exit during
|
||||
runtime (REHASH command, HUP signal), because the server name can't be
|
||||
changed in this case anyway and the new invalid name will be ignored.
|
||||
- Fix and extend documentation: Fix some typos, fix syntax of LINKS and LIST
|
||||
commands, whitespace and spelling fixes, update dependencies and add some
|
||||
more information about IRCv3 support.
|
||||
Thanks to Thanks Windree, Étienne Mollier <etienne.mollier@mailoo.org> and
|
||||
Christoph Biedl <debian.axhn@manchmal.in-ulm.de>.
|
||||
Closes #264.
|
||||
- Slightly reorder startup steps, and enhance logging:
|
||||
- Show name of configuration file at the beginning of start up.
|
||||
- Add a message when ngIRCd is ready, including its host name.
|
||||
- Show name of configuration file on REHASH (SIGHUP), too.
|
||||
- Change level of "done message" to NOTICE, like "starting" & "ready".
|
||||
- Initialize IO functions before channels, connections, clients, ...
|
||||
- configure.ng: OpenSSL can depends on lz or latomic so use pkg-config to
|
||||
find those dependencies and fallback to existing mechanism.
|
||||
Closes #256.
|
||||
- ngircd.conf.5: Fix wording as suggested by lintian.
|
||||
|
||||
ngIRCd 25 (2019-01-23)
|
||||
|
||||
- Fix documentation of MotdPhrase length, which actually is 126 characters:
|
||||
update sample configuration file as well as the man page. Thanks to
|
||||
shankari <shankari@eecs.berkeley.edu>.
|
||||
Closes #254.
|
||||
- Implement new configuration option "MaxPenaltyTime", which configures the
|
||||
maximum penalty time increase in seconds, per penalty event. Set to -1 for
|
||||
no limit (the default), 0 to disable penalties altogether. ngIRCd doesn't
|
||||
use penalty increases higher than 2 seconds during normal operation, so
|
||||
values higher than 1 rarely make sense.
|
||||
Disabling (or reducing) penalties can greatly speed up "make check" runs
|
||||
for example, see below, but are mostly a debugging feature and normally
|
||||
not meant to be used on production systems!
|
||||
Some example timings running "make check" from my macOS workstation:
|
||||
- MaxPenaltyTime not set: 4:41,79s
|
||||
- "MaxPenaltyTime = 1": 3:14,71s
|
||||
- "MaxPenaltyTime = 0": 25,46s
|
||||
Closes #249 and #251.
|
||||
- Fix compilation without deprecated OpenSSL APIs. Thanks to Rosen Penev
|
||||
<rosenp@gmail.com> for the patch!
|
||||
Closes #252.
|
||||
- Update Xcode project for latest Xcode version (10.0)
|
||||
- Fix some compiler warnings of Apple Xcode/Clang
|
||||
- Allow a 5th parameter in WEBIRC. Thanks to "ItsOnlyBinary".
|
||||
Closes #247.
|
||||
- Update some more documentation files and source code comments.
|
||||
- Platforms.txt: Add and update systems.
|
||||
|
||||
ngIRCd 25~rc1 (2018-08-11)
|
||||
- Update config.guess (2018-03-08) and config.sub (2018-03-08) files.
|
||||
- Correctly retry to establish an outgoing connections when forking of the
|
||||
resolver sub-process failed (for example because of lack of free memory).
|
||||
Until now, such a connection was never retried once this error was hit.
|
||||
Thanks to Robert Obermeier for reporting this bug!
|
||||
Closes #243.
|
||||
- Fix a "use after free" bug which can be triggered on a newly established
|
||||
connection when the daemon handles an ERROR command received from the peer
|
||||
during client login. Thanks a lot to Joseph Bisch <joseph.bisch@gmail.com>
|
||||
for discovering and reporting this issue!
|
||||
- Only send TOPIC updates to a channel when the topic actually changed:
|
||||
This prevents the channel from becoming flooded by unnecessary TOPIC update
|
||||
messages, that can happen when IRC services try to enforce a certain topic
|
||||
but which is already set (at least on the local server), for example.
|
||||
Therefore still forward it to all servers, but don't inform local clients
|
||||
(still update setter and timestamp information, though).
|
||||
- Update Xcode project for latest Xcode version (9.2). This includes adding
|
||||
missing and deleting obsolete file references.
|
||||
- Handle user mode "C" ("Only users that share a channel are allowed to send
|
||||
messages") like user mode "b" ("block private messages and notices"): allow
|
||||
messages from servers, services, and IRC Operators, too. Change proposed by
|
||||
"wowaname" back in 2015 in #ngircd, thanks!
|
||||
- Fix some compiler warnings.
|
||||
- Add contrib/ngircd.logcheck: Some sample logcheck(8) rules.
|
||||
- Allow IRC Ops and remote servers to KILL service clients: such clients
|
||||
behave like regular users, therefore IRC operators and servers should be
|
||||
able to KILL them: for example to resolve nick collisions.
|
||||
Closes #242.
|
||||
- Don't forward KILLs to other servers if they've been blocked locally:
|
||||
This prevents clients from killing IRC services, for example.
|
||||
Closes #238 and #239.
|
||||
- Fix a cross-compiler issue related to the Get_Error() function.
|
||||
Closes #240 and #241.
|
||||
- Update ./doc/Services.txt, enhance configuration examples.
|
||||
|
||||
ngIRCd 24 (2017-01-20)
|
||||
|
||||
- Make sure that ./contrib/platformtest.sh aborts when ./autogen.sh fails.
|
||||
- Update config.guess (2016-10-02) and config.sub (2016-11-04) files.
|
||||
- Build Debian packages with OpenSSL instead of GnuTLS: OpenSSL allows
|
||||
to reload used certificates on runtime for example (which is very
|
||||
useful when using Let's Encrypt), and therefore is preferred. And
|
||||
explicitly specify the "source format".
|
||||
- Fix handling of connection pool allocation and enlargement: up to now,
|
||||
the daemon only enlarged its connection pool when accepting new incoming
|
||||
client or server connections, not when establishing new outgoing server
|
||||
links, which could lead to problems when hitting the configured limit,
|
||||
see "MaxConnections". Thanks to Lukas Braun (k00mi) for reporting this!
|
||||
Closes #231.
|
||||
|
||||
ngIRCd 24~rc1 (2017-01-07)
|
||||
- Enhance systemd service file, and install it in Debian package.
|
||||
- Update configuration of Debian package.
|
||||
- Log privilege violations and failed OPER request with log level "error"
|
||||
and send it to the "&SERVER" channel, too.
|
||||
- Immediately shut down connection when receiving an "ERROR" command,
|
||||
don't wait for the peer to close the connection. This allows the daemon
|
||||
to forward the received "ERROR" message in the network, instead of the
|
||||
very generic "client closed connection" message.
|
||||
- Fix sending of entry duration (no negative values!) when synchronizing
|
||||
"x-lines" (G-LINES).
|
||||
- List expiration (G-LINES): use same log level as when setting, and log
|
||||
this event to the &SERVER channel, too.
|
||||
- Explicitly forbid remote servers to modify "x-lines" (G-LINES) when the
|
||||
"AllowRemoteOper" configuration option isn't set, even when the command
|
||||
seems to originate from the remote server itself: this prevents GLINE's
|
||||
to become set during server handshake in this case (what wouldn't be
|
||||
possible during regular runtime when a remote IRC Op sends the command)
|
||||
and what can't be undone by IRC Ops later on (because of the missing
|
||||
"AllowRemoteOper" option) ...
|
||||
- Make scripts and init-files in ./contrib executable.
|
||||
- Fix building ngIRCd with OpenSSL 1.1. Thanks to Christoph Biedl
|
||||
<ngircd.anoy@manchmal.in-ulm.de> for the patch!
|
||||
- Fix code indentation warnings of gcc 6.2.
|
||||
- Update config.guess (2016-04-02) and config.sub (2016-03-30) files.
|
||||
- Fix warnings of the "shellcheck" linter in autogen.sh, contrib/ngindent
|
||||
and contrib/platformtest.sh.
|
||||
- Update Xcode project for latest Xcode version (8.0), and fix "duplicate
|
||||
symbols" error messages when building (linking) the binary.
|
||||
- Add "Documentation" variables to systemd configuration files.
|
||||
- Make sure that SYSCONFDIR is always set, which can be handy when
|
||||
using source code linters when ./configure hasn't been run already.
|
||||
- Add the new "PAMServiceName" configuration option to specify the name
|
||||
used as PAM service name. This setting allows to run multiple ngIRCd
|
||||
instances with different PAM configurations for each instance.
|
||||
Thanks to Christian Aistleitner <christian@quelltextlich.at> for the
|
||||
patch, closes #226.
|
||||
- Add an ".editorconfig" file to the project.
|
||||
- Travis-CI: use "container-based infrastructure".
|
||||
- Limit the number of message targets, and suppress duplicates: This
|
||||
prevents an user from flooding the server using commands like this:
|
||||
"PRIVMSG nick1,nick1,nick1,...".
|
||||
Duplicate targets are suppressed silently (channels and clients).
|
||||
In addition, the maximum number of targets per PRIVMSG, NOTICE, ...
|
||||
command are limited to MAX_HNDL_TARGETS (25). If there are more, the
|
||||
daemon sends the new 407 (ERR_TOOMANYTARGETS_MSG) numeric, containing
|
||||
the first target that hasn't been handled any more. Closes #187.
|
||||
- Test suite: Add new test for server-server logins.
|
||||
- contrib/ngindent: Fix shebang line.
|
||||
- Make contrib/platformtest.sh script more portable, and only show
|
||||
"runs=Y" when the test suite really has been passed successfully.
|
||||
- Code cleanup in the NJON handler and the function killing clients as
|
||||
well as the function sending messages to a "mask" (cleaner code, more
|
||||
fault tolerant, better code comments).
|
||||
- Update and enhance documentation: README file, doc/Platforms.txt,
|
||||
doc/Modes.txt, doc/Commands.txt, doc/PAM.txt.
|
||||
- Fix NJOIN not propagating "half ops" status: ngIRCd tested for the wrong
|
||||
prefix of "half ops" when processing NJOIN commands and therefore never
|
||||
classified a remote user as "half op".
|
||||
Thanks to wowaname for pointing this out on #ngircd!
|
||||
|
||||
ngIRCd 23 (2015-11-16)
|
||||
|
||||
- Explicitly cast time_t to long when printing it out: this prevents
|
||||
wrong sized data types on platforms where time_t doesn't equal a
|
||||
long any more, for example on OpenBSD (which would result in garbled
|
||||
output on those platforms).
|
||||
- contrib/Debian/changelog: Fix email address.
|
||||
- Documentation: Spelling fixes; update doc/Platforms.txt.
|
||||
|
||||
ngIRCd 23~rc1 (2015-09-06)
|
||||
- Add ".clang_complete" file, which is used by the "linter-clang" package
|
||||
of the Atom editor, for example.
|
||||
- Make server-to-server protocol more robust: ngIRCd now catches more
|
||||
errors on the server-to-server (S2S) protocol that could crash the
|
||||
daemon before. This hasn't been a real problem because the IRC S2S
|
||||
protocol is "trusted" by design, but the behavior is much better now.
|
||||
Thanks to wowaname on #ngircd for pointing this out!
|
||||
- Make platformtest.sh, autogen.sh, and ngircd.init more portable.
|
||||
- Enables "reproducible builds" for ngIRCd: Use the optional BIRTHTIME
|
||||
constant while building ngIRCd, which contains a time stamp for the
|
||||
"Birth Date" information, in seconds since the epoch.
|
||||
See <https://wiki.debian.org/ReproducibleBuilds>.
|
||||
- Update "contrib/ngircd.service" file for systemd.
|
||||
- INSTALL: Add deprecation notice for "PredefChannelsOnly" variable.
|
||||
- Use "NOTICE *" before registration instead of "NOTICE AUTH". "AUTH" is
|
||||
a valid nickname so sending notices to it is probably not a good idea.
|
||||
Use "*" as the target instead as done with numerics when the nick is not
|
||||
available. This mimics the behavior in Charybdis, IRCD-Hybrid, InspIRCd
|
||||
2.2, Plexus 4, etc. Closes #217.
|
||||
The "NoticeAuth" configuration variable (ngircd.conf) has been renamed
|
||||
to "NoticeBeforeRegistration" accordingly, but the old name is still
|
||||
supported for compatibility reasons.
|
||||
- Implement new channel mode "N" (regular users can't change their nick
|
||||
name while on this channel). Closes #214.
|
||||
- README, AUTHORS: Update mailing list and issue tracker URLs.
|
||||
- Remove doc/GIT.txt (it is outdated), update doc/Contributing.txt:
|
||||
ngIRCd uses GitHub, and Git itself is quite common today. So don't
|
||||
include an own Git "mini HowTo" any longer.
|
||||
- Specify session context for OpenSSL clients. This enables some OpenSSL
|
||||
clients, including Pidgin and stunnel 5.06, to reuse a session.
|
||||
Patch by Tom Ryder <tom@sanctum.geek.nz>, thanks! Closes #182.
|
||||
- Keep track of who placed bans, invites, and excepts.
|
||||
Idea and implementation by LucentW, Thanks! Closes #203.
|
||||
- Make setgroups(3) function optional: For example, Interix is missing
|
||||
this function, which prevented ngIRCd to build on this platform. When
|
||||
setgroups(3) isn't available, a warning message is issued on startup.
|
||||
- Implement numeric RPL_LISTSTART(321). lightIRC and other clients
|
||||
expecting RPL_LISTSTART should now behave correctly.
|
||||
Idea and implementation by LucentW, Thanks! Closes #207.
|
||||
- Update ngircd.conf.5: "CloakUserToNick" hides user _and_ real name.
|
||||
This closes #208.
|
||||
- Fix case insensitive pattern matching: Up to now, only the input
|
||||
string became lowercased and was then compared to the pattern -- which
|
||||
failed when the pattern itself wasn't all lowercase!
|
||||
- Streamline the effect of "MorePrivacy" option: Update documentation
|
||||
in ngircd.conf(5); don't hide channels for IRC Ops on LIST and don't
|
||||
hide IP addresses/hostnames on WHOIS when "MorePrivacy" is in effect.
|
||||
This closes #198.
|
||||
- IRC operators now can kick anyone when "OperCanMode" is set.
|
||||
Idea and implementation by LucentW, Thanks! Closes #202.
|
||||
- Implement user mode "I": Hide channels on WHOIS: this mode prevents
|
||||
ngIRCd from showing channels on WHOIS (IRC Operators can always see
|
||||
the channel list).
|
||||
Idea and implementation by LucentW, Thanks! Closes #197.
|
||||
- INVITE command: Implement ERR_USERNOTONSERV(504) numeric and make sure
|
||||
that the target user is on the same server when inviting other users
|
||||
to local ("&") channels.
|
||||
Idea by Cahata, thanks! Closes #183.
|
||||
- INVITE command: Enforce 1 second penalty time, which prevents flooding
|
||||
of the target client.
|
||||
This closes #186. Reported by Cahata, thanks!
|
||||
- MODE command: Always report channel creation time. Up to now when
|
||||
receiving a MODE command, ngIRCd only reported the channel creation
|
||||
time to clients that were members of the channel. This patch reports
|
||||
the channel creation time to all clients, regardless if they are joined
|
||||
to that channel or not. At least ircd-seven behaves like this.
|
||||
This closes #188. Reported by Cahata, thanks!
|
||||
- Update Xcode project for latest Xcode version (6.3).
|
||||
|
||||
ngIRCd 22.1 (2015-04-06)
|
||||
|
||||
- Update doc/Platforms.txt and doc/FAQ.txt.
|
||||
- Fix spelling of RPL_WHOISBOT message text.
|
||||
- Don't send nick name as default PART reason: No other IRC daemon seems
|
||||
to do this (today?). Closes #185.
|
||||
Reported by Cahata in #ngircd, thanks!
|
||||
- Fix "WHO #<chan>" showing invisible users and hiding all visible, the
|
||||
logic was reversed! This bug has been introduced by commit c74115f2,
|
||||
"Simplify mode checking on channels and users within a channel", ngIRCd
|
||||
releases 21, 21.1, and 22 are affected :-( Problem reported by Cahata
|
||||
in #ngircd, Thanks!
|
||||
- Fix typo in src/testsuite/README
|
||||
- Auth PING: Fix our information text for manual sending of "PONG". Up to
|
||||
now, ngIRCd doesn't send a valid IRC command at all, oops!
|
||||
- Auth PING: Fix internal time stamp conversion and don't send a prefix in
|
||||
our PING command. The prefix confuses WeeChat, at least, which doesn't
|
||||
send an appropriate PONG in the case ...
|
||||
Debugging and patch by "wowaname" on #ngircd, thanks!
|
||||
- Fix syntax of ERR_LISTFULL_MSG(478) numeric. Pointed out by "wowaname"
|
||||
in #ngircd, thanks!
|
||||
- Enhance debug messages while sending CHANINFO commands.
|
||||
- Reset "last try" timer when enabling a passive server. This results in
|
||||
a new connection attempt as soon as possible.
|
||||
- Change log message for "Can't resolve address" and for IP address
|
||||
forgeries.
|
||||
- doc/HowToRelease.txt: Add note about the bug tracker.
|
||||
- Update "CipherList" to not enable SSLv3 by default. Idea, initial patch,
|
||||
and testing by Christoph Biedl <ngircd.anoy@manchmal.in-ulm.de>.
|
||||
- Change ngIRCd test suite not to use DNS lookups: Different operating
|
||||
systems do behave quite differently when doing DNS lookups, for example
|
||||
"127.0.0.1" sometimes resolves to "localhost" and sometimes to
|
||||
"localhost.localdomain" (for example OpenBSD). And other OS resolve
|
||||
"localhost" to the real host name (for example Cygwin). So not using
|
||||
DNS at all makes the test site much more portable.
|
||||
|
||||
ngIRCd 22 (2014-10-11)
|
||||
|
||||
- Match all list patterns case-insensitive: this affects the invite-,
|
||||
ban-, and except lists, as well as G-Lines an K-Lines.
|
||||
Problem pointed out by "wowaname" on #ngircd, thanks!
|
||||
|
||||
ngIRCd 22~rc1 (2014-09-29)
|
||||
- Sync "except lists" between servers: Up to now, ban, invite, and G-Line
|
||||
lists have been synced between servers while linking -- but obviously
|
||||
nobody noticed that except list have been missing ever since. Until now.
|
||||
Thanks to "j4jackj", who reported this issue in #ngircd.
|
||||
- Allow longer user names (up to 63 characters) for authentication.
|
||||
- Correctly check that a server has a valid hostname and port, thanks to
|
||||
David Binderman <dcb314@hotmail.com> who reported this bug.
|
||||
- Fix the function which generates complete "IRC masks" from user input,
|
||||
don't destroy the source buffer and use all provided parts (nick, user,
|
||||
host name). This fixes GLINEs/KLINEs from not working in some situations.
|
||||
- Increase MAX_SERVERS from 16 to 64: There are installations out there
|
||||
that would like to configure more than 16 links per server, so increase
|
||||
this limit. Best would be to get rid of MAX_SERVERS altogether and make
|
||||
if fully dynamic, but start with this quick and dirty hack ...
|
||||
- Debian: Don't adjust path names that are correct by default and correctly
|
||||
set and use "docdir".
|
||||
- Update config.guess and config.sub to recent versions.
|
||||
- Test suite/platformtest.sh: Detect when tests have been skipped.
|
||||
- doc/Bopm.txt: Update "connregex" and "kline" for current ngIRCd.
|
||||
- Allow "DefaultUserModes" to set all possible modes, including modes only
|
||||
settable by IRC Operators.
|
||||
- Spoofed prefixes: Really kill connection on non-server links.
|
||||
- Implement user mode "F": "relaxed flood protection". Clients with mode
|
||||
"F" set are allowed to rapidly send data to the daemon. This mode is only
|
||||
settable by IRC Operators and can cause problems in the network -- so be
|
||||
careful and only set it on "trusted" clients!
|
||||
User mode "F" is used by Bahamut for this purpose, for example.
|
||||
- Handle "throttling" in a single function: ngIRCd implements "command
|
||||
throttling" and "bps throttling" (bytes per second). The states are
|
||||
detected in different functions, Conn_Handler() and Read_Request(), but
|
||||
handle the actual "throttling" in a common function: this enables us to
|
||||
guarantee consistent behavior and to disable throttling for special
|
||||
connections in only one place
|
||||
- Use server password when PAM is compiled in but disabled.
|
||||
- Streamline punctuation of log messages.
|
||||
- Return ISUPPORT(005) numerics on "VERSION". This is how ircd-seven,
|
||||
Charybdis, Hybrid, and InspIRCd behave, for example.
|
||||
- configure: Only link "contrib/Debian" if it exists, which isn't the case
|
||||
on "VPATH builds", for example.
|
||||
- Show the account name in WHOIS. This uses the same numeric as Charybdis
|
||||
and ircu families: WHOISLOGGEDIN(330).
|
||||
- Pattern matching: Remove "range matching" in our pattern matching code
|
||||
using the "[...]" syntax, because [ and ] are valid characters in nick
|
||||
names and one has to quote them currently using the "\" character, which
|
||||
is quite unexpected for users.
|
||||
- platformtest.sh: New option "-x", don't regenerate build system and
|
||||
allow using separate source and build trees.
|
||||
- Test suite: explicitly enable glibc memory checking.
|
||||
- Make "MODE -k" handling more robust and compatible, send "fake '*' key"
|
||||
in all replies.
|
||||
- Update configure.ng: ngIRCd requires GNU autoconf 2.61 for generating its
|
||||
build system, so update the build system accordingly and implement all
|
||||
changes that autoupdate(1) suggests: Update AC_PREREQ and AC_INIT, use
|
||||
AC_LINK_IFELSE, AC_RUN_IFELSE, and AC_COMPILE_IFELSE, and remove
|
||||
AC_TYPE_SIGNAL (we don't use RETSIGTYPE).
|
||||
- portabtest: Actually test the functions snprintf(), strlcpy(), strlcat(),
|
||||
and vsnprintf() for correctness, not only existence (which was quite
|
||||
useless, because if they weren't available, the program could not have
|
||||
been linked at all ...).
|
||||
- Implement new configuration option "Network": it is used to set the
|
||||
(completely optional) "network name", to which this instance of the
|
||||
daemon belongs. When set, this name is used in the ISUPPORT(005) numeric
|
||||
which is sent to all clients connecting to the server after logging in.
|
||||
- Update doc/Platforms.txt.
|
||||
- Various code cleanups, remove unused code, streamline error handling.
|
||||
Remove all imp.h and exp.h header files, support non-standard vsnprintf()
|
||||
return codes, and fix some K&R C portability issues. Streamline
|
||||
DEBUG_ARRAY, DEBUG_BUFFER, DEBUG_IO, DEBUG_ZIP definitions.
|
||||
- Increase penalty time to 10 seconds when handling OPER commands with an
|
||||
invalid password.
|
||||
|
||||
ngIRCd 21.1 (2014-03-25)
|
||||
|
||||
- Don't ignore but use the server password when PAM is compiled in but
|
||||
disabled. Thanks to Roy Sindre Norangshol <roy.sindre@norangshol.no>!
|
||||
- doc/Platforms.txt: Update from master branch.
|
||||
- Really kill connections that send "spoofed prefixes" on non-server links.
|
||||
This fixes commit 6cbe1308 which only killed the connection when the
|
||||
spoofed prefix itself belonged to a non-server client.
|
||||
- CHARCONV command: Fix handling conversion errors, don't overwrite already
|
||||
converted text!
|
||||
- doc/Services.txt: Update information for Anope 2.x.
|
||||
- Correctly use cloaked IRC masks on "INVITE nickname": The cloaked IRC mask
|
||||
of a user is his visible mask, so the daemon has to use it for generating
|
||||
the "one time" entries for the invite list of the given channel, and not
|
||||
the "real" mask which will never match while the target client is "+x", and
|
||||
even worse, will disclose the real mask on "MODE #channel +I" commands :-/
|
||||
Bug reported by Cahata on #ngircd, thanks!
|
||||
- configure: Only link "contrib/Debian" if it exists. This isn't the case on
|
||||
"VPATH builds", for example.
|
||||
- Use $(MKDIR_P) instead of $(mkinstalldirs) in Makefile's and test for
|
||||
"mkdir -p" using AC_PROG_MKDIR_P in "configure".
|
||||
- Fix configure script and "make check" for TCP Wrappers (problems spotted on
|
||||
OpenBSD): add missing #include's and static variables, and add libwrap at
|
||||
the end of the configure run because if libwrap becomes added earlier,
|
||||
other tests may fail.
|
||||
- configure: add support for the LDFLAGS_END and LIBS_END variables to add
|
||||
linker flags and libraries at the end of the configure run (CFLAGS_END has
|
||||
been implemented already).
|
||||
- platformtest.sh and Makefile.am: Don't use "test -e", it isn't portable.
|
||||
- Update Copyright notices for 2014 :-)
|
||||
- Fix permanent {G|K}LINES (with a timeout of 0 seconds).
|
||||
- WEBIRC: Don't set the hostname received by the WEBIRC command when DNS
|
||||
lookups are disabled, but use the IP address instead.
|
||||
Reported by Toni Spets <toni.spets@iki.fi>, thanks!
|
||||
- Check for working getaddrinfo() function: At least AIX 4.3.3 and 5.1 have a
|
||||
broken implementation of getaddrinfo() which doesn't handle "0" as numeric
|
||||
service correctly. This patch adds a configure check for this case and
|
||||
changes all calling functions to only use getaddrinfo() if it "works".
|
||||
See <http://www.stacken.kth.se/lists/heimdal-discuss/2004-05/msg00059.html>
|
||||
- Only use the unsetenv() function when it is available (AIX 4.3 doesn't
|
||||
support it, for example).
|
||||
- Make sure that the source code is still compatible with the "ansi2knr" tool
|
||||
and builds using non-ANSI K&R C compilers. Tested with Apple C on A/UX.
|
||||
- Fix building ngIRCd without support for ZLIB compression. Reported by
|
||||
"der_baer" on #ngircd, thanks!
|
||||
|
||||
ngIRCd 21 (2013-10-30)
|
||||
|
||||
- ./contrib/Debian/ngircd.init: Make sure no stale PID file is left over
|
||||
when (re-)starting ngIRCd.
|
||||
- Change ./contrib/platformtest.sh and update ./doc/Platforms.txt to
|
||||
allow usernames up to 8 characters.
|
||||
allow user names up to 8 characters.
|
||||
- Call arc4random_stir() in forked subprocesses, when available. This
|
||||
is required by FreeBSD <10 and current NetBSD at least to correctly
|
||||
initialize the "arc4" random number generator on these platforms.
|
||||
@@ -174,7 +658,7 @@ ngIRCd 20.3 (2013-08-23)
|
||||
ngIRCd 20.2 (2013-02-15)
|
||||
|
||||
- Security: Fix a denial of service bug in the function handling KICK
|
||||
commands that could be used by arbitrary users to to crash the daemon
|
||||
commands that could be used by arbitrary users to crash the daemon
|
||||
(CVE-2013-1747).
|
||||
- WHO command: Use the currently "displayed hostname" (which can be cloaked!)
|
||||
for hostname matching, not the real one. In other words: don't display all
|
||||
@@ -374,7 +858,7 @@ ngIRCd 20 (2012-12-17)
|
||||
the hash function. When "CloakHostSalt" is not set (the default), a
|
||||
random salt will be generated after each server restart. (Closes #133)
|
||||
|
||||
ngIRCd Release 19.2 (2012-06-19)
|
||||
ngIRCd 19.2 (2012-06-19)
|
||||
|
||||
- doc/Capabilities.txt: document "multi-prefix" capability
|
||||
|
||||
@@ -398,13 +882,13 @@ ngIRCd Release 19.2 (2012-06-19)
|
||||
"CC=xxx MAKE=yyy ./platformtest.sh" calling convention.
|
||||
- Add instructions for setting up Atheme IRC services.
|
||||
- Implement support for IRC capability handling, the new "CAP" command,
|
||||
and capablity "multi-prefix" which allows both the NAME and WHO command
|
||||
and capability "multi-prefix" which allows both the NAME and WHO command
|
||||
handlers to return more than one "class prefix" to the client.
|
||||
- Update Xcode project files: reference missing documentation files.
|
||||
- Fix: Don't ignore "permission denied" errors when enabling chroot.
|
||||
- FAQ: enhance description of chroot setup.
|
||||
|
||||
ngIRCd Release 19.1 (2012-03-19)
|
||||
ngIRCd 19.1 (2012-03-19)
|
||||
|
||||
- Fix gcc warning (v4.6.3), initialize "list" variable to NULL.
|
||||
- Fix typos: "recieved" -> "received", "Please not" -> "Please note",
|
||||
@@ -414,7 +898,7 @@ ngIRCd Release 19.1 (2012-03-19)
|
||||
- getpid.sh: Fix test case error for Debian using sbuild(1).
|
||||
- Don't log "ngIRCd hello message" two times when starting up.
|
||||
|
||||
ngIRCd Release 19 (2012-02-29)
|
||||
ngIRCd 19 (2012-02-29)
|
||||
|
||||
- Update build system: bump config.guess and config.sub files used by
|
||||
GNU autoconf/automake to recent versions.
|
||||
@@ -564,7 +1048,7 @@ ngIRCd Release 19 (2012-02-29)
|
||||
asynchronous nature of the IRC protocol. So don't break server-
|
||||
links, only log a message and ignore the command. (Closes #113)
|
||||
|
||||
ngIRCd Release 18 (2011-07-10)
|
||||
ngIRCd 18 (2011-07-10)
|
||||
|
||||
- Update timestamp of ngircd(8) manual page.
|
||||
- Add preliminary ngIRCd protocol module for Anope 1.9 to contrib/Anope/.
|
||||
@@ -674,7 +1158,7 @@ ngIRCd Release 18 (2011-07-10)
|
||||
only relevant when a trusted server on a server-server link sends invalid
|
||||
commands).
|
||||
|
||||
ngIRCd Release 17.1 (2010-12-19)
|
||||
ngIRCd 17.1 (2010-12-19)
|
||||
|
||||
- --configtest: remember if MOTD is configured by file or phrase
|
||||
- Enhance log messages when establishing server links a little bit
|
||||
@@ -690,7 +1174,7 @@ ngIRCd Release 17.1 (2010-12-19)
|
||||
- New numeric 329: get channel creation time on "MODE #chan" commands
|
||||
- Save channel creation time; new function Channel_CreationTime()
|
||||
|
||||
ngIRCd Release 17 (2010-11-07)
|
||||
ngIRCd 17 (2010-11-07)
|
||||
|
||||
- doc: change path names in sample-ngircd.conf depending on sysconfdir
|
||||
- Fix up generation and distribution of sample-ngircd.conf
|
||||
@@ -698,7 +1182,7 @@ ngIRCd Release 17 (2010-11-07)
|
||||
- contrib/platformtest.sh: make command name quoting consistent
|
||||
|
||||
ngIRCd 17~rc3 (2010-10-27)
|
||||
- Xcode builds: detect version number correctly, updateed project file
|
||||
- Xcode builds: detect version number correctly, updated project file
|
||||
to use the Mac OS X 10.5.x SDK, disable pam_fail_delay() because it
|
||||
is only available starting with Mac OS X 10.6, and generate a default
|
||||
PAM configuration for the Mac OS X Installer.app package of ngIRCd.
|
||||
@@ -710,7 +1194,7 @@ ngIRCd Release 17 (2010-11-07)
|
||||
ngIRCd 17~rc2 (2010-10-25)
|
||||
- ZeroConf: include header files missing since commit a988bbc86a.
|
||||
- Generate ngIRCd version number from GIT tag.
|
||||
- Make sourcecode compatible with ansi2knr again. This allows to compile
|
||||
- Make source code compatible with ansi2knr again. This allows to compile
|
||||
ngIRCd using a pre-ANSI K&R C compiler again.
|
||||
- ./configure: check if C compiler can compile ISO Standard C.
|
||||
- ./configure: check support for C prototypes again.
|
||||
@@ -726,7 +1210,7 @@ ngIRCd Release 17 (2010-11-07)
|
||||
Howl, Avahi or on Mac OS X).
|
||||
- New configuration option "SyslogFacility" to define the syslog "facility"
|
||||
(the "target"), to which ngIRCd should send its log messages.
|
||||
Possible values are system dependant, but most probably "auth", "daemon",
|
||||
Possible values are system dependent, but most probably "auth", "daemon",
|
||||
"user" and "local1" through "local7" are possible values; see syslog(3).
|
||||
Default is "local5" for historical reasons.
|
||||
- Dump the "internal server state" (configured servers, established
|
||||
@@ -747,7 +1231,7 @@ ngIRCd Release 17 (2010-11-07)
|
||||
- Make configure switch "--docdir" work (closes: #108).
|
||||
- Reformat and update FAQ.txt a little bit.
|
||||
- INSTALL: mention SSL, IPv6, and changed handling of MotdFile.
|
||||
- Change MOTD file handling: ngIRCd now caches the contens of the MOTD
|
||||
- Change MOTD file handling: ngIRCd now caches the contents of the MOTD
|
||||
file, so the daemon now requires a HUP signal or REHASH command to
|
||||
re-read the MOTD file when its content changed.
|
||||
- Startup: open /dev/null before chroot'ing the daemon.
|
||||
@@ -771,7 +1255,7 @@ ngIRCd Release 17 (2010-11-07)
|
||||
- Fix "beeing" typo ...
|
||||
- SSL/TLS: fix bogus "socket closed" error message.
|
||||
|
||||
ngIRCd Release 16 (2010-05-02)
|
||||
ngIRCd 16 (2010-05-02)
|
||||
|
||||
- doc/SSL: remove line continuation marker
|
||||
|
||||
@@ -783,14 +1267,14 @@ ngIRCd Release 16 (2010-05-02)
|
||||
- Include netinet/{in.h, in_systm.h} when checking for netinet/ip.h
|
||||
- Only include <netinet/in_systm.h> if it exists
|
||||
- Updated doc/Platforms.txt
|
||||
- Enhace connection statistics counters: display total number of served
|
||||
- Enhance connection statistics counters: display total number of served
|
||||
connections on daemon shutdown and when a new client connects using
|
||||
the new numeric RPL_STATSCONN (250).
|
||||
|
||||
ngIRCd 16~rc1 (2010-03-25)
|
||||
- Various fixes to the build system and code cleanups.
|
||||
- contrib/platformtest.sh: Only show latest commit.
|
||||
- Updatet doc/Platforms.txt, added new README-Interix.txt documenting
|
||||
- Updated doc/Platforms.txt, added new README-Interix.txt documenting
|
||||
how to tun ngIRCd on Microsoft Services for UNIX (MS SFU, MS SUA).
|
||||
- Updated links to the ngIRCd homepage (bug tracker, mailing list).
|
||||
- Added missing modes to USERMODES #define
|
||||
@@ -811,14 +1295,14 @@ ngIRCd Release 16 (2010-05-02)
|
||||
every channel, and c) remote clients using a server not supporting this
|
||||
mode are not checked either and therefore always allowed to join.
|
||||
|
||||
ngIRCd Release 15 (2009-11-07)
|
||||
ngIRCd 15 (2009-11-07)
|
||||
|
||||
- "ngircd --configtest": print SSL configuration options even when unset.
|
||||
|
||||
ngIRCd 15~rc1 (2009-10-15)
|
||||
- Do not add default listening port (6667) if SSL ports were specified, so
|
||||
ngIRCd can be configured to only accept SSL-encrypted connections now.
|
||||
- Enable IRC operators to use the IRC command SQUIT (insted of the already
|
||||
- Enable IRC operators to use the IRC command SQUIT (instead of the already
|
||||
implemented but non-standard DISCONNECT command).
|
||||
- New configuration option "AllowRemoteOper" (disabled by default) that
|
||||
enables remote IRC operators to use the IRC commands SQUIT and CONNECT
|
||||
@@ -837,7 +1321,7 @@ ngIRCd Release 15 (2009-11-07)
|
||||
- Fix a few error handling glitches for SSL/TLS connections.
|
||||
- Minor fixes to manual pages and documentation.
|
||||
|
||||
ngIRCd Release 14.1 (2009-05-05)
|
||||
ngIRCd 14.1 (2009-05-05)
|
||||
|
||||
- Security: fix remotely triggerable crash in SSL/TLS code.
|
||||
- BSD start script contrib/ngircd.sh has been renamed to ngircd-bsd.sh.
|
||||
@@ -850,7 +1334,7 @@ ngIRCd Release 14.1 (2009-05-05)
|
||||
- Fix server list announcement.
|
||||
- Do not remove host names from info text.
|
||||
|
||||
ngIRCd Release 14 (2009-04-20)
|
||||
ngIRCd 14 (2009-04-20)
|
||||
|
||||
- Display IPv6 addresses as "[<addr>]" when accepting connections.
|
||||
|
||||
@@ -872,9 +1356,9 @@ ngIRCd Release 14 (2009-04-20)
|
||||
- Fix memory leak when a encrypted and compressed server link goes down.
|
||||
(closes bug #95, reported by Christoph, fiesh@fiesh.homeip.net)
|
||||
- Fix handling of channels containing dots.
|
||||
(closes ug #93, reported by Gonosz Csiga)
|
||||
(closes bug #93, reported by Gonosz Csiga)
|
||||
|
||||
ngIRCd Release 13 (2008-12-25)
|
||||
ngIRCd 13 (2008-12-25)
|
||||
|
||||
- Updated documentation, especially doc/Services.txt and doc/SSL.txt.
|
||||
- Make the test suite work on OpenSolaris.
|
||||
@@ -965,7 +1449,7 @@ ngIRCd 0.11.0 (2008-01-15)
|
||||
ngIRCd 0.11.0-pre2 (2008-01-07)
|
||||
- SECURITY: IRC_PART could reference invalid memory, causing
|
||||
ngircd to crash [from HEAD]. (CVE-2008-0285)
|
||||
|
||||
|
||||
ngIRCd 0.11.0-pre1 (2008-01-02)
|
||||
- Use dotted-decimal IP address if host name is >= 64.
|
||||
- Add support for /STAT u (server uptime) command.
|
||||
@@ -999,7 +1483,7 @@ ngIRCd 0.10.4 (2008-01-07)
|
||||
|
||||
- SECURITY: IRC_PART could reference invalid memory, causing
|
||||
ngircd to crash [from HEAD]. (CVE-2008-0285)
|
||||
|
||||
|
||||
ngIRCd 0.10.3 (2007-08-01)
|
||||
|
||||
- SECURITY: Fixed a severe bug in handling JOIN commands, which could
|
||||
@@ -1102,7 +1586,7 @@ ngIRCd 0.9.0 (2005-07-24)
|
||||
- Fixed ./configure test for TCP Wrappers: now it runs on Mac OS X as well.
|
||||
- Enhanced configure script: now you can pass an (optional) search path
|
||||
to all --with-XXX parameters, e. g. "--with-ident=/opt/ident".
|
||||
- Removed typedefs for the native C datatypes.
|
||||
- Removed typedefs for the native C data types.
|
||||
Use stdbool.h / inttypes.h if available.
|
||||
- New configuration option "OperServerMode" to enable a workaround needed
|
||||
when running an network with ircd2 servers and "OperCanUseMode" enabled
|
||||
@@ -1283,7 +1767,7 @@ ngIRCd 0.7.0 (2003-05-01)
|
||||
to add a new server (ngIRCd tries to connect new servers only once!).
|
||||
- Added DISCONNECT command ("DISCONNECT <name>") to disable servers.
|
||||
- Restructured the documentation: Now the main language is English. The
|
||||
german documentation has been removed (until there is a maintainer).
|
||||
German documentation has been removed (until there is a maintainer).
|
||||
- Enhanced killing of users caused by a nickname collision.
|
||||
- Better error detection for status code ("numerics") forwarding.
|
||||
- Moved tool functions to own library: "libngtool".
|
||||
@@ -1305,7 +1789,7 @@ ngIRCd 0.7.0 (2003-05-01)
|
||||
- Documentation is now installed in $(datadir)/doc/ngircd.
|
||||
- Enhanced handling of NJOIN in case of nick collisions.
|
||||
|
||||
ngIRCd 0.6.1, 2003-01-21
|
||||
ngIRCd 0.6.1 (2003-01-21)
|
||||
|
||||
- Fixed KILL: you can't crash the server by killing yourself any more,
|
||||
ngIRCd no longer sends a QUIT to other servers after the KILL, and you
|
||||
@@ -1324,17 +1808,17 @@ ngIRCd 0.6.1, 2003-01-21
|
||||
member when changing his channel user modes which could crash ngIRCd.
|
||||
|
||||
|
||||
Older changes (sorry, only available in german language):
|
||||
Older changes (sorry, only available in German language):
|
||||
|
||||
ngIRCd 0.6.0, 2002-12-24
|
||||
ngIRCd 0.6.0, 24.12.2002
|
||||
|
||||
ngIRCd 0.6.0-pre2, 2002-12-23
|
||||
ngIRCd 0.6.0-pre2, 23.12.2002
|
||||
- neuer Numeric 005 ("Features") beim Connect.
|
||||
- LUSERS erweitert: nun wird die maximale Anzahl der lokalen und globalen
|
||||
Clients, die dem Server bzw. im Netzwerk seit dem letzten (Re-)Start
|
||||
dem Server gleichzeitig bekannt waren, angezeigt.
|
||||
|
||||
ngIRCd 0.6.0-pre1, 2002-12-18
|
||||
ngIRCd 0.6.0-pre1, 18.12.2002
|
||||
- beim Schliessen einer Verbindung zeigt der Server nun vor dem ERROR
|
||||
noch eine Statistik ueber die empfangene und gesendete Datenmenge an.
|
||||
- der Server wartet bei einer eingehenden Verbindung nun laenger auf den
|
||||
@@ -1385,7 +1869,7 @@ ngIRCd 0.6.0, 2002-12-24
|
||||
|
||||
ngIRCd 0.5.4, 24.11.2002
|
||||
|
||||
- Fehler-Handling von connect() gefixed: der Server kann sich nun auch
|
||||
- Fehler-Handling von connect() gefixed: der Server kann sich nun auch
|
||||
unter A/UX wieder zu anderen verbinden.
|
||||
- in den Konfigurationsvariablen ServerUID und ServerGID kann nun nicht
|
||||
nur die numerische ID, sondern auch der Name des Users bzw. der Gruppe
|
||||
@@ -1497,7 +1981,7 @@ ngIRCd 0.5.0, 20.09.2002
|
||||
- ADMIN-Befehl implementiert. Die Daten hierzu werden in der Konfig-Datei
|
||||
im [Global]-Abschnitt mit den Variablen "AdminInfo1", "AdminInfo2" und
|
||||
"AdminEMail" konfiguriert.
|
||||
|
||||
|
||||
ngIRCd 0.4.3, 11.06.2002
|
||||
|
||||
- Bei PRIVMSG und NOTICE hat der ngIRCd nicht ueberpruft, ob das Ziel
|
||||
|
350
INSTALL
350
INSTALL
@@ -1,350 +0,0 @@
|
||||
|
||||
ngIRCd - Next Generation IRC Server
|
||||
http://ngircd.barton.de/
|
||||
|
||||
(c)2001-2013 Alexander Barton and Contributors.
|
||||
ngIRCd is free software and published under the
|
||||
terms of the GNU General Public License.
|
||||
|
||||
-- INSTALL --
|
||||
|
||||
|
||||
I. Upgrade Information
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Differences to version 20.x
|
||||
|
||||
- Starting with ngIRCd 21, the ciphers used by SSL are configurable and
|
||||
default to HIGH:!aNULL:@STRENGTH (OpenSSL) or SECURE128 (GnuTLS).
|
||||
Previous version were using the OpenSSL or GnuTLS defaults, DEFAULT
|
||||
and NORMAL respectively.
|
||||
|
||||
- When adding GLINE's or KLINE's to ngIRCd 21 (or newer), all clients matching
|
||||
the new mask will be KILL'ed. This was not the case with earlier versions
|
||||
that only added the mask but didn't kill already connected users.
|
||||
|
||||
Differences to version 19.x
|
||||
|
||||
- Starting with ngIRCd 20, users can "cloak" their hostname only when the
|
||||
configuration variable "CloakHostModeX" (introduced in 19.2) is set.
|
||||
Otherwise, only IRC operators, other servers, and services are allowed to
|
||||
set mode +x. This prevents regular users from changing their hostmask to
|
||||
the name of the IRC server itself, which confused quite a few people ;-)
|
||||
|
||||
Differences to version 17
|
||||
|
||||
- Support for ZeroConf/Bonjour/Rendezvous service registration has been
|
||||
removed. The configuration option "NoZeroconf" is no longer available.
|
||||
|
||||
- The structure of ngircd.conf has been cleaned up and three new configuration
|
||||
sections have been introduced: [Limits], [Options], and [SSL].
|
||||
Lots of configuration variables stored in the [Global] section are now
|
||||
deprecated there and should be stored in one of these new sections (but
|
||||
still work in [Global]):
|
||||
"AllowRemoteOper" -> [Options]
|
||||
"ChrootDir" -> [Options]
|
||||
"ConnectIPv4" -> [Options]
|
||||
"ConnectIPv6" -> [Options]
|
||||
"ConnectRetry" -> [Limits]
|
||||
"MaxConnections" -> [Limits]
|
||||
"MaxConnectionsIP" -> [Limits]
|
||||
"MaxJoins" -> [Limits]
|
||||
"MaxNickLength" -> [Limits]
|
||||
"NoDNS" -> [Options], and renamed to "DNS"
|
||||
"NoIdent" -> [Options], and renamed to "Ident"
|
||||
"NoPAM" -> [Options], and renamed to "PAM"
|
||||
"OperCanUseMode" -> [Options]
|
||||
"OperServerMode" -> [Options]
|
||||
"PingTimeout" -> [Limits]
|
||||
"PongTimeout" -> [Limits]
|
||||
"PredefChannelsOnly" -> [Options]
|
||||
"SSLCertFile" -> [SSL], and renamed to "CertFile"
|
||||
"SSLDHFile" -> [SSL], and renamed to "DHFile"
|
||||
"SSLKeyFile" -> [SSL], and renamed to "KeyFile"
|
||||
"SSLKeyFilePassword" -> [SSL], and renamed to "KeyFilePassword"
|
||||
"SSLPorts" -> [SSL], and renamed to "Ports"
|
||||
"SyslogFacility" -> [Options]
|
||||
"WebircPassword" -> [Options]
|
||||
You should adjust your ngircd.conf and run "ngircd --configtest" to make
|
||||
sure that your settings are correct and up to date!
|
||||
|
||||
Differences to version 16
|
||||
|
||||
- Changes to the "MotdFile" specified in ngircd.conf now require a ngircd
|
||||
configuration reload to take effect (HUP signal, REHASH command).
|
||||
|
||||
Differences to version 0.9.x
|
||||
|
||||
- The option of the configure script to enable support for Zeroconf/Bonjour/
|
||||
Rendezvous/WhateverItIsNamedToday has been renamed:
|
||||
--with-rendezvous -> --with-zeroconf
|
||||
|
||||
Differences to version 0.8.x
|
||||
|
||||
- The maximum length of passwords has been raised to 20 characters (instead
|
||||
of 8 characters). If your passwords are longer than 8 characters then they
|
||||
are cut at an other position now.
|
||||
|
||||
Differences to version 0.6.x
|
||||
|
||||
- Some options of the configure script have been renamed:
|
||||
--disable-syslog -> --without-syslog
|
||||
--disable-zlib -> --without-zlib
|
||||
Please call "./configure --help" to review the full list of options!
|
||||
|
||||
Differences to version 0.5.x
|
||||
|
||||
- Starting with version 0.6.0, other servers are identified using asynchronous
|
||||
passwords: therefore the variable "Password" in [Server]-sections has been
|
||||
replaced by "MyPassword" and "PeerPassword".
|
||||
|
||||
- New configuration variables, section [Global]: MaxConnections, MaxJoins
|
||||
(see example configuration file "doc/sample-ngircd.conf"!).
|
||||
|
||||
|
||||
II. Standard Installation
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
ngIRCd is developed for UNIX-based systems, which means that the installation
|
||||
on modern UNIX-like systems that are supported by GNU autoconf and GNU
|
||||
automake ("configure") should be no problem.
|
||||
|
||||
The normal installation procedure after getting (and expanding) the source
|
||||
files (using a distribution archive or GIT) is as following:
|
||||
|
||||
0) Satisfy prerequisites
|
||||
1) ./autogen.sh [only necessary when using GIT]
|
||||
2) ./configure
|
||||
3) make
|
||||
4) make install
|
||||
|
||||
(Please see details below!)
|
||||
|
||||
Now the newly compiled executable "ngircd" is installed in its standard
|
||||
location, /usr/local/sbin/.
|
||||
|
||||
The next step is to configure and afterwards starting the daemon. Please
|
||||
have a look at the ngircd(8) and ngircd.conf(5) manual pages for details
|
||||
and all possible options -- and don't forget to run "ngircd --configtest"
|
||||
to validate your configuration file!
|
||||
|
||||
If no previous version of the configuration file exists (the standard name
|
||||
is /usr/local/etc/ngircd.conf), a sample configuration file containing all
|
||||
possible options will be installed there. You'll find its template in the
|
||||
doc/ directory: sample-ngircd.conf.
|
||||
|
||||
|
||||
0): Satisfy prerequisites
|
||||
|
||||
When building from source, you'll need some other software to build ngIRCd:
|
||||
for example a working C compiler, make tool, GNU automake and autoconf (only
|
||||
when not using a distribution archive), and a few libraries depending on the
|
||||
features you want to compile in (like IDENT support, SSL, and PAM).
|
||||
|
||||
If you are using one of the "big" operating systems or Linux distributions,
|
||||
you can use the following commands to install all the required packages to
|
||||
build the sources including all optional features and to run the test suite:
|
||||
|
||||
* RedHat / Fedora based distributions:
|
||||
|
||||
yum install \
|
||||
autoconf automake expect gcc glibc-devel gnutls-devel \
|
||||
libident-devel make pam-devel tcp_wrappers-devel telnet zlib-devel
|
||||
|
||||
* Debian / Ubuntu based distributions:
|
||||
|
||||
apt-get install \
|
||||
autoconf automake build-essential expect libgnutls-dev \
|
||||
libident-dev libpam-dev libwrap0-dev libz-dev telnet
|
||||
|
||||
|
||||
1): "autogen.sh"
|
||||
|
||||
The first step, autogen.sh, is only necessary if the configure-script isn't
|
||||
already generated. This never happens in official ("stable") releases in
|
||||
tar.gz-archives, but when using GIT.
|
||||
|
||||
This step is therefore only interesting for developers.
|
||||
|
||||
autogen.sh produces the Makefile.in's, which are necessary for the configure
|
||||
script itself, and some more files for make. To run autogen.sh you'll need
|
||||
GNU autoconf and GNU automake: at least autoconf 2.61 and automake 1.10 are
|
||||
requird, newer is better. But don't use automake 1.12 or newer for creating
|
||||
distribution archives: it will work but lack "de-ANSI-fucation" support in the
|
||||
generated Makefile's! Stick with automake 1.11.x for this purpose ...
|
||||
So automake 1.11.x and autoconf 2.67+ is recommended.
|
||||
|
||||
Again: "end users" do not need this step and neither need GNU autoconf nor GNU
|
||||
automake at all!
|
||||
|
||||
|
||||
2): "./configure"
|
||||
|
||||
The configure-script is used to detect local system dependencies.
|
||||
|
||||
In the perfect case, configure should recognize all needed libraries, header
|
||||
files and so on. If this shouldn't work, "./configure --help" shows all
|
||||
possible options.
|
||||
|
||||
In addition, you can pass some command line options to "configure" to enable
|
||||
and/or disable some features of ngIRCd. All these options are shown using
|
||||
"./configure --help", too.
|
||||
|
||||
Compiling a static binary will avoid you the hassle of feeding a chroot dir
|
||||
(if you want use the chroot feature). Just do something like:
|
||||
CFLAGS=-static ./configure [--your-options ...]
|
||||
Then you can use a void directory as ChrootDir (like OpenSSH's /var/empty).
|
||||
|
||||
|
||||
3): "make"
|
||||
|
||||
The make command uses the Makefiles produced by configure and compiles the
|
||||
ngIRCd daemon.
|
||||
|
||||
|
||||
4): "make install"
|
||||
|
||||
Use "make install" to install the server and a sample configuration file on
|
||||
the local system. Normally, root privileges are necessary to complete this
|
||||
step. If there is already an older configuration file present, it won't be
|
||||
overwritten.
|
||||
|
||||
These files and folders will be installed by default:
|
||||
|
||||
- /usr/local/sbin/ngircd: executable server
|
||||
- /usr/local/etc/ngircd.conf: sample configuration (if not already present)
|
||||
- /usr/local/share/doc/ngircd/: documentation
|
||||
- /usr/local/share/man/: manual pages
|
||||
|
||||
|
||||
III. Additional features
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The following optional features can be compiled into the daemon by passing
|
||||
options to the "configure" script. Most options can handle a <path> argument
|
||||
which will be used to search for the required libraries and header files in
|
||||
the given paths ("<path>/lib/...", "<path>/include/...") in addition to the
|
||||
standard locations.
|
||||
|
||||
* Syslog Logging (autodetected by default):
|
||||
--with-syslog[=<path>] / --without-syslog
|
||||
|
||||
Enable (disable) support for logging to "syslog", which should be
|
||||
available on most modern UNIX-like operating systems by default.
|
||||
|
||||
* ZLib Compression (autodetected by default):
|
||||
--with-zlib[=<path>] / --without-zlib
|
||||
|
||||
Enable (disable) support for compressed server-server links.
|
||||
The Z compression library ("libz") is required for this option.
|
||||
|
||||
* IO Backend (autodetected by default):
|
||||
--with-select[=<path>] / --without-select
|
||||
--with-poll[=<path>] / --without-poll
|
||||
--with-devpoll[=<path>] / --without-devpoll
|
||||
--with-epoll[=<path>] / --without-epoll
|
||||
--with-kqueue[=<path>] / --without-kqueue
|
||||
|
||||
ngIRCd can use different IO "backends": the "old school" select() and poll()
|
||||
API which should be supported by most UNIX-like operating systems, or the
|
||||
more efficient and flexible epoll() (Linux >=2.6), kqueue() (BSD) and
|
||||
/dev/poll APIs.
|
||||
By default the IO backend is autodetected, but you can use "--without-xxx"
|
||||
to disable a more enhanced API.
|
||||
When using the epoll() API, support for select() is compiled in as well by
|
||||
default to enable the binary to run on older Linux kernels (<2.6), too.
|
||||
|
||||
* IDENT-Support:
|
||||
--with-ident[=<path>]
|
||||
|
||||
Include support for IDENT ("AUTH") lookups. The "ident" library is
|
||||
required for this option.
|
||||
|
||||
* TCP-Wrappers:
|
||||
--with-tcp-wrappers[=<path>]
|
||||
|
||||
Include support for Wietse Venemas "TCP Wrappers" to limit client access
|
||||
to the daemon, for example by using "/etc/hosts.{allow|deny}".
|
||||
The "libwrap" is required for this option.
|
||||
|
||||
* PAM:
|
||||
--with-pam[=<path>]
|
||||
|
||||
Enable support for PAM, the Pluggable Authentication Modules library.
|
||||
See doc/PAM.txt for details.
|
||||
|
||||
* SSL:
|
||||
--with-openssl[=<path>]
|
||||
--with-gnutls[=<path>]
|
||||
|
||||
Enable support for SSL/TLS using OpenSSL or gnutls libraries.
|
||||
See doc/SSL.txt for details.
|
||||
|
||||
* IPv6:
|
||||
--enable-ipv6
|
||||
|
||||
Adds support for version 6 of the Internet Protocol.
|
||||
|
||||
|
||||
IV. Useful make-targets
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The Makefile produced by the configure-script contains always these useful
|
||||
targets:
|
||||
|
||||
- clean: delete every product from the compiler/linker
|
||||
next step: -> make
|
||||
|
||||
- distclean: the above plus erase all generated Makefiles
|
||||
next step: -> ./configure
|
||||
|
||||
- maintainer-clean: erase all automatic generated files
|
||||
next step: -> ./autogen.sh
|
||||
|
||||
|
||||
V. Sample configuration file ngircd.conf
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
In the sample configuration file, there are comments beginning with "#" OR
|
||||
";" -- this is only for the better understanding of the file.
|
||||
|
||||
The file is separated in five blocks: [Global], [Features], [Operator],
|
||||
[Server], and [Channel].
|
||||
|
||||
In the [Global] section, there is the main configuration like the server
|
||||
name and the ports, on which the server should be listening. Options in
|
||||
the [Features] section enable or disable functionality in the daemon.
|
||||
IRC operators of this server are defined in [Operator] blocks, remote
|
||||
servers are configured in [Server] sections, and [Channel] blocks are
|
||||
used to configure pre-defined ("persistent") IRC channels.
|
||||
|
||||
The meaning of the variables in the configuration file is explained in the
|
||||
"doc/sample-ngircd.conf", which is used as sample configuration file in
|
||||
/usr/local/etc after running "make install" (if you don't already have one)
|
||||
and in the ngircd.conf(5) manual page.
|
||||
|
||||
|
||||
VI. Command line options
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
These parameters could be passed to the ngIRCd:
|
||||
|
||||
-f, --config <file>
|
||||
The daemon uses the file <file> as configuration file rather than
|
||||
the standard configuration /usr/local/etc/ngircd.conf.
|
||||
|
||||
-n, --nodaemon
|
||||
ngIRCd should be running as a foreground process.
|
||||
|
||||
-p, --passive
|
||||
Server-links won't be automatically established.
|
||||
|
||||
-t, --configtest
|
||||
Reads, validates and dumps the configuration file as interpreted
|
||||
by the server. Then exits.
|
||||
|
||||
Use "--help" to see a short help text describing all available parameters
|
||||
the server understands, with "--version" the ngIRCd shows its version
|
||||
number. In both cases the server exits after the output.
|
||||
|
||||
Please see the ngircd(8) manual page for complete details!
|
411
INSTALL.md
Normal file
411
INSTALL.md
Normal file
@@ -0,0 +1,411 @@
|
||||
# [ngIRCd](https://ngircd.barton.de) - Internet Relay Chat Server
|
||||
|
||||
This document explains how to install ngIRCd, the lightweight Internet Relay
|
||||
Chat (IRC) server.
|
||||
|
||||
The first section lists noteworthy changes to earlier releases; you definitely
|
||||
should read this when upgrading your setup! But you can skip over this section
|
||||
when you do a fresh installation.
|
||||
|
||||
All the subsequent sections describe the steps required to install and
|
||||
configure ngIRCd.
|
||||
|
||||
## Upgrade Information
|
||||
|
||||
Differences to version 25
|
||||
|
||||
- **Attention**:
|
||||
All already deprecated legacy options (besides the newly deprecated *Key* and
|
||||
*MaxUsers* settings, see below) were removed in ngIRCd 26, so make sure to
|
||||
update your configuration before upgrading, if you haven't done so already
|
||||
(you got a warning on daemon startup when using deprecated options): you can
|
||||
check your configuration using `ngircd --configtest` -- which is a good idea
|
||||
anyway ;-)
|
||||
|
||||
- Setting modes for predefined channels in *[Channel]* sections has been
|
||||
enhanced: now you can set *all* modes, like in IRC "MODE" commands, and have
|
||||
this setting multiple times per *[Channel]* block. Modifying lists (ban list,
|
||||
invite list, exception list) is supported, too.
|
||||
|
||||
Both the *Key* and *MaxUsers* settings are now deprecated and should be
|
||||
replaced by `Modes = +l <limit>` and `Modes = +k <key>` respectively.
|
||||
|
||||
Differences to version 22.x
|
||||
|
||||
- The *NoticeAuth* `ngircd.conf` configuration variable has been renamed to
|
||||
*NoticeBeforeRegistration*. The old *NoticeAuth* variable still works but
|
||||
is deprecated now.
|
||||
|
||||
- The default value of the SSL *CipherList* variable has been changed to
|
||||
"HIGH:!aNULL:@STRENGTH:!SSLv3" (OpenSSL) and "SECURE128:-VERS-SSL3.0"
|
||||
(GnuTLS) to disable the old SSLv3 protocol by default.
|
||||
|
||||
To enable connections of clients still requiring the weak SSLv3 protocol,
|
||||
the *CipherList* must be set to its old value (not recommended!), which
|
||||
was "HIGH:!aNULL:@STRENGTH" (OpenSSL) and "SECURE128" (GnuTLS), see below.
|
||||
|
||||
Differences to version 20.x
|
||||
|
||||
- Starting with ngIRCd 21, the ciphers used by SSL are configurable and
|
||||
default to "HIGH:!aNULL:@STRENGTH" (OpenSSL) or "SECURE128" (GnuTLS).
|
||||
Previous version were using the OpenSSL or GnuTLS defaults, "DEFAULT"
|
||||
and "NORMAL" respectively.
|
||||
|
||||
- When adding GLINE's or KLINE's to ngIRCd 21 (or newer), all clients matching
|
||||
the new mask will be KILL'ed. This was not the case with earlier versions
|
||||
that only added the mask but didn't kill already connected users.
|
||||
|
||||
- The *PredefChannelsOnly* configuration variable has been superseded by the
|
||||
new *AllowedChannelTypes* variable. It is still supported and translated to
|
||||
the appropriate *AllowedChannelTypes* setting but is deprecated now.
|
||||
|
||||
Differences to version 19.x
|
||||
|
||||
- Starting with ngIRCd 20, users can "cloak" their hostname only when the
|
||||
configuration variable *CloakHostModeX* (introduced in 19.2) is set.
|
||||
Otherwise, only IRC operators, other servers, and services are allowed to
|
||||
set mode +x. This prevents regular users from changing their hostmask to
|
||||
the name of the IRC server itself, which confused quite a few people ;-)
|
||||
|
||||
Differences to version 17.x
|
||||
|
||||
- Support for ZeroConf/Bonjour/Rendezvous service registration has been
|
||||
removed. The configuration option *NoZeroconf* is no longer available.
|
||||
|
||||
- The structure of `ngircd.conf` has been cleaned up and three new configuration
|
||||
sections have been introduced: *[Limits]*, *[Options]*, and *[SSL]*.
|
||||
|
||||
Lots of configuration variables stored in the *[Global]* section are now
|
||||
deprecated there and should be stored in one of these new sections (but
|
||||
still work in *[Global]*):
|
||||
|
||||
- *AllowRemoteOper* -> [Options]
|
||||
- *ChrootDir* -> [Options]
|
||||
- *ConnectIPv4* -> [Options]
|
||||
- *ConnectIPv6* -> [Options]
|
||||
- *ConnectRetry* -> [Limits]
|
||||
- *MaxConnections* -> [Limits]
|
||||
- *MaxConnectionsIP* -> [Limits]
|
||||
- *MaxJoins* -> [Limits]
|
||||
- *MaxNickLength* -> [Limits]
|
||||
- *NoDNS* -> [Options], and renamed to *DNS*
|
||||
- *NoIdent* -> [Options], and renamed to *Ident*
|
||||
- *NoPAM* -> [Options], and renamed to *PAM*
|
||||
- *OperCanUseMode* -> [Options]
|
||||
- *OperServerMode* -> [Options]
|
||||
- *PingTimeout* -> [Limits]
|
||||
- *PongTimeout* -> [Limits]
|
||||
- *PredefChannelsOnly* -> [Options]
|
||||
- *SSLCertFile* -> [SSL], and renamed to *CertFile*
|
||||
- *SSLDHFile* -> [SSL], and renamed to *DHFile*
|
||||
- *SSLKeyFile* -> [SSL], and renamed to *KeyFile*
|
||||
- *SSLKeyFilePassword* -> [SSL], and renamed to *KeyFilePassword*
|
||||
- *SSLPorts* -> [SSL], and renamed to *Ports*
|
||||
- *SyslogFacility* -> [Options]
|
||||
- *WebircPassword* -> [Options]
|
||||
|
||||
You should adjust your `ngircd.conf` and run `ngircd --configtest` to make
|
||||
sure that your settings are correct and up to date!
|
||||
|
||||
Differences to version 16.x
|
||||
|
||||
- Changes to the *MotdFile* specified in `ngircd.conf` now require a ngIRCd
|
||||
configuration reload to take effect (HUP signal, *REHASH* command).
|
||||
|
||||
Differences to version 0.9.x
|
||||
|
||||
- The option of the configure script to enable support for Zeroconf/Bonjour/
|
||||
Rendezvous/WhateverItIsNamedToday has been renamed:
|
||||
|
||||
- `--with-rendezvous` -> `--with-zeroconf`
|
||||
|
||||
Differences to version 0.8.x
|
||||
|
||||
- The maximum length of passwords has been raised to 20 characters (instead
|
||||
of 8 characters). If your passwords are longer than 8 characters then they
|
||||
are cut at an other position now.
|
||||
|
||||
Differences to version 0.6.x
|
||||
|
||||
- Some options of the configure script have been renamed:
|
||||
|
||||
- `--disable-syslog` -> `--without-syslog`
|
||||
- `--disable-zlib` -> `--without-zlib`
|
||||
|
||||
Please call `./configure --help` to review the full list of options!
|
||||
|
||||
Differences to version 0.5.x
|
||||
|
||||
- Starting with version 0.6.0, other servers are identified using asynchronous
|
||||
passwords: therefore the variable *Password* in *[Server]*-sections has been
|
||||
replaced by *MyPassword* and *PeerPassword*.
|
||||
|
||||
- New configuration variables, section *[Global]*: *MaxConnections*, *MaxJoins*
|
||||
(see example configuration file `doc/sample-ngircd.conf`!).
|
||||
|
||||
## Standard Installation
|
||||
|
||||
*Note*: This sections describes installing ngIRCd *from sources*. If you use
|
||||
packages available for your operating system distribution you should skip over
|
||||
and continue with the *Configuration* section, see below.
|
||||
|
||||
ngIRCd is developed for UNIX-based systems, which means that the installation
|
||||
on modern UNIX-like systems that are supported by GNU autoconf and GNU
|
||||
automake ("`configure` script") should be no problem.
|
||||
|
||||
The normal installation procedure after getting (and expanding) the source
|
||||
files (using a distribution archive or Git) is as following:
|
||||
|
||||
1) Satisfy prerequisites
|
||||
2) `./autogen.sh` [only necessary when using "raw" sources with Git]
|
||||
3) `./configure`
|
||||
4) `make`
|
||||
5) `make install`
|
||||
|
||||
(Please see details below!)
|
||||
|
||||
Now the newly compiled executable "ngircd" is installed in its standard
|
||||
location, `/usr/local/sbin/`.
|
||||
|
||||
If no previous version of the configuration file exists (the standard name
|
||||
is `/usr/local/etc/ngircd.conf)`, a sample configuration file containing all
|
||||
possible options will be installed there. You'll find its template in the
|
||||
`doc/` directory: `sample-ngircd.conf`.
|
||||
|
||||
The next step is to configure and afterwards start the daemon. See the section
|
||||
*Configuration* below.
|
||||
|
||||
### Satisfy prerequisites
|
||||
|
||||
When building from source, you'll need some other software to build ngIRCd:
|
||||
for example a working C compiler, make tool, and a few libraries depending on
|
||||
the feature set you want to enable at compile time (like IDENT, SSL, and PAM).
|
||||
|
||||
And if you aren't using a distribution archive ("tar.gz" file), but cloned the
|
||||
plain source archive, you need a few additional tools to generate the build
|
||||
system itself: GNU automake and autoconf, as well as pkg-config.
|
||||
|
||||
If you are using one of the "big" operating systems or Linux distributions,
|
||||
you can use the following commands to install all the required packages to
|
||||
build the sources including all optional features and to run the test suite:
|
||||
|
||||
#### Red Hat / Fedora based distributions
|
||||
|
||||
``` shell
|
||||
yum install \
|
||||
autoconf automake expect gcc glibc-devel gnutls-devel \
|
||||
libident-devel make pam-devel pkg-config tcp_wrappers-devel \
|
||||
telnet zlib-devel
|
||||
```
|
||||
|
||||
#### Debian / Ubuntu based distributions
|
||||
|
||||
``` shell
|
||||
apt-get install \
|
||||
autoconf automake build-essential expect libgnutls28-dev \
|
||||
libident-dev libpam-dev pkg-config libwrap0-dev libz-dev telnet
|
||||
```
|
||||
|
||||
### `./autogen.sh`
|
||||
|
||||
The first step, to run `./autogen.sh`, is *only* necessary if the `configure`
|
||||
script itself isn't already generated and available. This never happens in
|
||||
official ("stable") releases in "tar.gz" archives, but when cloning the source
|
||||
code repository using Git.
|
||||
|
||||
**This step is therefore only interesting for developers!**
|
||||
|
||||
The `autogen.sh` script produces the `Makefile.in`'s, which are necessary for
|
||||
the configure script itself, and some more files for `make(1)`.
|
||||
|
||||
To run `autogen.sh` you'll need GNU autoconf, GNU automake and pkg-config: at
|
||||
least autoconf 2.61 and automake 1.10 are required, newer is better. But don't
|
||||
use automake 1.12 or newer for creating distribution archives: it will work
|
||||
but lack "de-ANSI-fication" support in the generated Makefile's! Stick with
|
||||
automake 1.11.x for this purpose ...
|
||||
|
||||
So *automake 1.11.x* and *autoconf 2.67+* is recommended.
|
||||
|
||||
Again: "end users" do not need this step and neither need GNU autoconf nor GNU
|
||||
automake at all!
|
||||
|
||||
### `./configure`
|
||||
|
||||
The `configure` script is used to detect local system dependencies.
|
||||
|
||||
In the perfect case, `configure` should recognize all needed libraries, header
|
||||
files and so on. If this shouldn't work, `./configure --help` shows all
|
||||
possible options.
|
||||
|
||||
In addition, you can pass some command line options to `configure` to enable
|
||||
and/or disable some features of ngIRCd. All these options are shown using
|
||||
`./configure --help`, too.
|
||||
|
||||
Compiling a static binary will avoid you the hassle of feeding a chroot dir
|
||||
(if you want use the chroot feature). Just do something like:
|
||||
|
||||
``` shell
|
||||
CFLAGS=-static ./configure [--your-options ...]
|
||||
```
|
||||
|
||||
Then you can use a void directory as ChrootDir (like OpenSSH's `/var/empty`).
|
||||
|
||||
### `make`
|
||||
|
||||
The `make(1)` command uses the `Makefile`'s produced by `configure` and
|
||||
compiles the ngIRCd daemon.
|
||||
|
||||
### `make install`
|
||||
|
||||
Use `make install` to install the server and a sample configuration file on
|
||||
the local system. Normally, root privileges are necessary to complete this
|
||||
step. If there is already an older configuration file present, it won't be
|
||||
overwritten.
|
||||
|
||||
These files and folders will be installed by default:
|
||||
|
||||
- `/usr/local/sbin/ngircd`: executable server
|
||||
- `/usr/local/etc/ngircd.conf`: sample configuration (if not already present)
|
||||
- `/usr/local/share/doc/ngircd/`: documentation
|
||||
- `/usr/local/share/man/`: manual pages
|
||||
|
||||
### Additional features
|
||||
|
||||
The following optional features can be compiled into the daemon by passing
|
||||
options to the `configure` script. Most options can handle a `<path>` argument
|
||||
which will be used to search for the required libraries and header files in
|
||||
the given paths (`<path>/lib/...`, `<path>/include/...`) in addition to the
|
||||
standard locations.
|
||||
|
||||
- Syslog Logging (autodetected by default):
|
||||
|
||||
`--with-syslog[=<path>]` / `--without-syslog`
|
||||
|
||||
Enable (disable) support for logging to "syslog", which should be
|
||||
available on most modern UNIX-like operating systems by default.
|
||||
|
||||
- ZLib Compression (autodetected by default):
|
||||
|
||||
`--with-zlib[=<path>]` / `--without-zlib`
|
||||
|
||||
Enable (disable) support for compressed server-server links.
|
||||
The Z compression library ("libz") is required for this option.
|
||||
|
||||
- IO Backend (autodetected by default):
|
||||
|
||||
- `--with-select[=<path>]` / `--without-select`
|
||||
- `--with-poll[=<path>]` / `--without-poll`
|
||||
- `--with-devpoll[=<path>]` / `--without-devpoll`
|
||||
- `--with-epoll[=<path>]` / `--without-epoll`
|
||||
- `--with-kqueue[=<path>]` / `--without-kqueue`
|
||||
|
||||
ngIRCd can use different IO "backends": the "old school" `select(2)` and
|
||||
`poll(2)` API which should be supported by most UNIX-like operating systems,
|
||||
or the more efficient and flexible `epoll(7)` (Linux >=2.6), `kqueue(2)`
|
||||
(BSD) and `/dev/poll` APIs.
|
||||
|
||||
By default the IO backend is autodetected, but you can use `--without-xxx`
|
||||
to disable a more enhanced API.
|
||||
|
||||
When using the `epoll(7)` API, support for `select(2)` is compiled in as
|
||||
well by default, to enable the binary to run on older Linux kernels (<2.6),
|
||||
too.
|
||||
|
||||
- IDENT-Support:
|
||||
|
||||
`--with-ident[=<path>]`
|
||||
|
||||
Include support for IDENT ("AUTH") lookups. The "ident" library is
|
||||
required for this option.
|
||||
|
||||
- TCP-Wrappers:
|
||||
|
||||
`--with-tcp-wrappers[=<path>]`
|
||||
|
||||
Include support for Wietse Venemas "TCP Wrappers" to limit client access
|
||||
to the daemon, for example by using `/etc/hosts.{allow|deny}`.
|
||||
The "libwrap" is required for this option.
|
||||
|
||||
- PAM:
|
||||
|
||||
`--with-pam[=<path>]`
|
||||
|
||||
Enable support for PAM, the Pluggable Authentication Modules library.
|
||||
See `doc/PAM.txt` for details.
|
||||
|
||||
- SSL:
|
||||
|
||||
- `--with-openssl[=<path>]`
|
||||
- `--with-gnutls[=<path>]`
|
||||
|
||||
Enable support for SSL/TLS using OpenSSL or GnuTLS libraries.
|
||||
See `doc/SSL.txt` for details.
|
||||
|
||||
- IPv6:
|
||||
|
||||
`--enable-ipv6`
|
||||
|
||||
Adds support for version 6 of the Internet Protocol.
|
||||
|
||||
## Configuration
|
||||
|
||||
Please have a look at the `ngircd(8)` and `ngircd.conf(5)` manual pages for
|
||||
details and all possible command line and configuration options -- **and don't
|
||||
forget to run `ngircd --configtest` to validate your configuration file!**
|
||||
|
||||
After installing ngIRCd, a sample configuration file will be set up (if it
|
||||
does not exist already). By default, when installing from sources, the file is
|
||||
named `/usr/local/etc/ngircd.conf` (other common names, especially for
|
||||
distribution packages, are `/etc/ngircd.conf` or `/etc/ngircd/ngircd.conf`).
|
||||
|
||||
You can find the template of the sample configuration file in the `doc/`
|
||||
directory as `sample-ngircd.conf` and
|
||||
[online](https://ngircd.barton.de/doc/sample-ngircd.conf) on the homepage. It
|
||||
contains all available options.
|
||||
|
||||
In the sample configuration file, there are comments beginning with `#` *or*
|
||||
`;` -- this is only for the better understanding of the file, both comment
|
||||
styles are equal.
|
||||
|
||||
The file is separated in five blocks: *[Global]*, *[Features]*, *[Operator]*,
|
||||
*[Server]*, and *[Channel]*.
|
||||
|
||||
In the *[Global]* section, there is the main configuration like the server
|
||||
name and the ports, on which the server should be listening. Options in
|
||||
the *[Features]* section enable or disable functionality in the daemon.
|
||||
IRC operators of this server are defined in *[Operator]* blocks, remote
|
||||
servers are configured in *[Server]* sections, and *[Channel]* blocks are
|
||||
used to configure pre-defined ("persistent") IRC channels.
|
||||
|
||||
### Manual Pages Online
|
||||
|
||||
- Daemon: [ngircd.8](https://manpages.debian.org/ngircd.8)
|
||||
- Configutation file: [ngircd.conf.5](https://manpages.debian.org/ngircd.conf.5)
|
||||
|
||||
## Command line options
|
||||
|
||||
ngIRCd supports the following command line options:
|
||||
|
||||
- `-f`, `--config <file>`
|
||||
|
||||
The daemon uses the file `<file>` as configuration file rather than
|
||||
the standard configuration `/usr/local/etc/ngircd.conf`.
|
||||
|
||||
- `-n`, `--nodaemon`
|
||||
|
||||
ngIRCd should be running as a foreground process.
|
||||
|
||||
- `-p`, `--passive`
|
||||
|
||||
Server-links won't be automatically established.
|
||||
|
||||
- `-t`, `--configtest`
|
||||
|
||||
Reads, validates and dumps the configuration file as interpreted
|
||||
by the server. Then exits.
|
||||
|
||||
Use `--help` to see a short help text describing all available parameters
|
||||
the server understands, with `--version` the ngIRCd shows its version
|
||||
number. In both cases the server exits after the output.
|
||||
|
||||
Please see the `ngircd(8)` manual page for more details!
|
26
Makefile.am
26
Makefile.am
@@ -1,6 +1,6 @@
|
||||
#
|
||||
# ngIRCd -- The Next Generation IRC Daemon
|
||||
# Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors
|
||||
# Copyright (c)2001-2015 Alexander Barton (alex@barton.de) and Contributors
|
||||
#
|
||||
# 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
|
||||
@@ -9,11 +9,9 @@
|
||||
# Please read the file COPYING, README and AUTHORS for more information.
|
||||
#
|
||||
|
||||
AUTOMAKE_OPTIONS = gnu
|
||||
|
||||
SUBDIRS = doc src man contrib
|
||||
|
||||
EXTRA_DIST = autogen.sh configure.ng .mailmap
|
||||
EXTRA_DIST = README.md INSTALL.md autogen.sh configure.ng .clang_complete .mailmap
|
||||
|
||||
clean-local: osxpkg-clean
|
||||
rm -f build-stamp*
|
||||
@@ -25,13 +23,13 @@ maintainer-clean-local:
|
||||
rm -f config.log debian
|
||||
|
||||
testsuite:
|
||||
cd src/testsuite && make check
|
||||
cd src/testsuite && ${MAKE} check
|
||||
|
||||
lint:
|
||||
cd src/ngircd && make lint
|
||||
cd src/ngircd && ${MAKE} lint
|
||||
|
||||
srcdoc:
|
||||
cd doc && make srcdoc
|
||||
cd doc && ${MAKE} srcdoc
|
||||
|
||||
have-xcodebuild:
|
||||
@xcodebuild -project contrib/MacOSX/ngIRCd.xcodeproj -list \
|
||||
@@ -66,20 +64,20 @@ osxpkg: have-packagemaker osxpkg-dest
|
||||
--out ../../$(distdir).mpkg
|
||||
rm -f $(distdir).mpkg.zip
|
||||
zip -ro9 $(distdir).mpkg.zip $(distdir).mpkg
|
||||
make osxpkg-clean
|
||||
${MAKE} osxpkg-clean
|
||||
|
||||
osxpkg-clean:
|
||||
[ ! -e ngircd.dest ] || sudo -n rm -rf ngircd.dest
|
||||
[ ! -r ngircd.dest ] || sudo -n rm -rf ngircd.dest
|
||||
rm -rf ngircd.dest $(distdir).mpkg
|
||||
|
||||
osxpkg-dest: have-xcodebuild osxpkg-clean clean
|
||||
./configure --prefix=/opt/ngircd
|
||||
make xcode
|
||||
make -C contrib/MacOSX de.barton.ngircd.plist
|
||||
${MAKE} xcode
|
||||
${MAKE} -C contrib/MacOSX de.barton.ngircd.plist
|
||||
mkdir -p ngircd.dest/opt/ngircd/sbin
|
||||
DESTDIR="$$PWD/ngircd.dest" make -C doc install
|
||||
DESTDIR="$$PWD/ngircd.dest" make -C contrib install
|
||||
DESTDIR="$$PWD/ngircd.dest" make -C man install
|
||||
DESTDIR="$$PWD/ngircd.dest" ${MAKE} -C doc install
|
||||
DESTDIR="$$PWD/ngircd.dest" ${MAKE} -C contrib install
|
||||
DESTDIR="$$PWD/ngircd.dest" ${MAKE} -C man install
|
||||
cp contrib/MacOSX/build/Default/ngIRCd \
|
||||
ngircd.dest/opt/ngircd/sbin/ngircd
|
||||
rm ngircd.dest/opt/ngircd/etc/ngircd.conf
|
||||
|
297
NEWS
297
NEWS
@@ -2,12 +2,265 @@
|
||||
ngIRCd - Next Generation IRC Server
|
||||
http://ngircd.barton.de/
|
||||
|
||||
(c)2001-2013 Alexander Barton and Contributors.
|
||||
(c)2001-2020 Alexander Barton and Contributors.
|
||||
ngIRCd is free software and published under the
|
||||
terms of the GNU General Public License.
|
||||
|
||||
-- NEWS --
|
||||
|
||||
ngIRCd 26
|
||||
|
||||
ngIRCd 26~rc1 (2020-05-10)
|
||||
- Allow up to 512 characters per line in MOTD and help text files (but keep
|
||||
in mind that lines can't get that long, because they have to be prefixed
|
||||
before being sent to the client). But this allows for more fancy MOTDs :-)
|
||||
Closes #271.
|
||||
- Show the actually allowed channel types in the ISUPPORT(005) numeric which
|
||||
are configured by the "AllowedChannelTypes" configuration variable.
|
||||
Closes #273.
|
||||
- Handle commands in the read buffer before reading more data and don't wait
|
||||
for the network in this case: If there are more bytes in the read buffer
|
||||
already than a single valid IRC command can get long (513 bytes), wait for
|
||||
this/those command(s) to be handled first and don't try to read even more
|
||||
data from the network (which most probably would overflow the read buffer
|
||||
of this connection soon).
|
||||
- Log G-/K-Line changes only when not initiated by a server: this prevents
|
||||
the log from becomming spammed during "net bursts".
|
||||
- Update test suite to include SSL tests, including checking for reloading
|
||||
certificates during runtime.
|
||||
- Add support for GnuTLS certificate reload, which is quite handy when using
|
||||
Let's Encrypt, for example. Until now this was only supported when linked
|
||||
with OpenSSL. Thanks a lot, Hilko Bengen <bengen@hilluzination.de>!
|
||||
- Allow setting arbitrary channel modes in the configuration file by handling
|
||||
them like in MODE commands, and allow multiple "Modes =" lines per [Channel]
|
||||
section. Thanks to Michi <michi+ngircd@dataswamp.org>!
|
||||
Closes #55.
|
||||
- Add "FNC" (forced nick changes) to ISUPPORT(005) numeric. Most probably
|
||||
this doesn't make any difference to any client, but it seems correct.
|
||||
See <http://www.irc.org/tech_docs/005.html> for details.
|
||||
- Enhance handling of command line errors, and return with exit code 0 ("no
|
||||
error") when "--help" or "--version" is used (which resulted in exit code 1,
|
||||
"error" before). Exit with code 2 ("command line error") for all other
|
||||
invalid command line options, and show the error message itself on stderr
|
||||
(instead of stdout and exit code 1, "generic error", as before).
|
||||
This new behaviour is more in line with the GNU "coding standards",
|
||||
see <https://www.gnu.org/prep/standards/html_node/_002d_002dhelp.html>.
|
||||
- Add ./contrib/nglog.sh: This script parses the log output of ngircd(8),
|
||||
and colorizes the messages according to their log level. Example usage:
|
||||
ngircd -f $PWD/doc/sample-ngircd.conf -np | ./contrib/nglog.sh
|
||||
- Enlarge buffers of info texts to 128 bytes. This includes:
|
||||
- "Real name" of a client (4th filed of the USER command).
|
||||
- Server info text ("Info" configuration option).
|
||||
- Admin info texts and email address ("AdminInfo1", "AdminInfo2" and
|
||||
"AdminEmail" configuration options).
|
||||
- Network name ("Network" configuration option).
|
||||
The limit was 64 bytes before ...
|
||||
Closes #258.
|
||||
- Streamline handling of invalid and unset server name: Don't exit during
|
||||
runtime (REHASH command, HUP signal), because the server name can't be
|
||||
changed in this case anyway and the new invalid name will be ignored.
|
||||
- Slightly reorder startup steps, and enhance logging:
|
||||
- Show name of configuration file at the beginning of start up.
|
||||
- Add a message when ngIRCd is ready, including its host name.
|
||||
- Show name of configuration file on REHASH (SIGHUP), too.
|
||||
- Change level of "done message" to NOTICE, like "starting" & "ready".
|
||||
- Initialize IO functions before channels, connections, clients, ...
|
||||
- configure.ng: OpenSSL can depends on lz or latomic so use pkg-config to
|
||||
find those dependencies and fallback to existing mechanism.
|
||||
Closes #256.
|
||||
|
||||
ngIRCd 25 (2019-01-23)
|
||||
|
||||
- Implement new configuration option "MaxPenaltyTime", which configures the
|
||||
maximum penalty time increase in seconds, per penalty event. Set to -1 for
|
||||
no limit (the default), 0 to disable penalties altogether. ngIRCd doesn't
|
||||
use penalty increases higher than 2 seconds during normal operation, so
|
||||
values higher than 1 rarely make sense.
|
||||
Disabling (or reducing) penalties can greatly speed up "make check" runs
|
||||
for example, see below, but are mostly a debugging feature and normally
|
||||
not meant to be used on production systems!
|
||||
Some example timings running "make check" from my macOS workstation:
|
||||
- MaxPenaltyTime not set: 4:41,79s
|
||||
- "MaxPenaltyTime = 1": 3:14,71s
|
||||
- "MaxPenaltyTime = 0": 25,46s
|
||||
Closes #249 and #251.
|
||||
- Update Xcode project for latest Xcode version (10.0)
|
||||
- Allow a 5th parameter in WEBIRC. Thanks to "ItsOnlyBinary".
|
||||
Closes #247.
|
||||
|
||||
ngIRCd 25~rc1 (2018-08-11)
|
||||
- Only send TOPIC updates to a channel when the topic actually changed:
|
||||
This prevents the channel from becoming flooded by unecessary TOPIC update
|
||||
messages, that can happen when IRC services try to enforce a certain topic
|
||||
but which is already set (at least on the local server), for example.
|
||||
Therefore still forward it to all servers, but don't inform local clients
|
||||
(still update setter and timestamp information, though!).
|
||||
- Update Xcode project for latest Xcode version (9.2). This includes adding
|
||||
missing and deleting obsolete file references.
|
||||
- Handle user mode "C" ("Only users that share a channel are allowed to send
|
||||
messages") like user mode "b" ("block private messages and notices"): allow
|
||||
messages from servers, services, and IRC Operators, too. Change proposed by
|
||||
"wowaname" back in 2015 in #ngircd, thanks!
|
||||
- Allow IRC Ops and remote servers to KILL service clients: such clients
|
||||
behave like regular users, therefore IRC operators and servers should be
|
||||
able to KILL them: for example to resolve nick collisions.
|
||||
Closes #242.
|
||||
|
||||
ngIRCd 24 (2017-01-20)
|
||||
|
||||
ngIRCd 24~rc1 (2017-01-07)
|
||||
- Log privilege violations and failed OPER request with log level "error"
|
||||
and send it to the "&SERVER" channel, too.
|
||||
- Immediately shut down connection when receiving an "ERROR" command,
|
||||
don't wait for the peer to close the connection. This allows the daemon
|
||||
to forward the received "ERROR" message in the network, instead of the
|
||||
very generic "client closed connection" message.
|
||||
- Explicitly forbid remote servers to modify "x-lines" (G-LINES) when the
|
||||
"AllowRemoteOper" configuration option isn't set, even when the command
|
||||
seems to originate from the remote server itself: this prevents GLINE's
|
||||
to become set during server handshake in this case (what wouldn't be
|
||||
possible during regular runtime when a remote IRC Op sends the command)
|
||||
and what can't be undone by IRC Ops later on (because of the missing
|
||||
"AllowRemoteOper" option) ...
|
||||
- Update Xcode project for latest Xcode version (8.0), and fix "duplicate
|
||||
symbols" error messages when building (linking) the binary.
|
||||
- Add "Documentation" variables to systemd configuration files.
|
||||
- Make sure that SYSCONFDIR is always set, which can be handy when
|
||||
using source code linters when ./configure hasn't been run already.
|
||||
- Add the new "PAMServiceName" configuration option to specify the name
|
||||
used as PAM service name. This setting allows to run multiple ngIRCd
|
||||
instances with different PAM configurations for each instance.
|
||||
Thanks to Christian Aistleitner <christian@quelltextlich.at> for the
|
||||
patch, closes #226.
|
||||
- Add an ".editorconfig" file to the project.
|
||||
- Limit the number of message target, and suppress duplicates: This
|
||||
prevents an user from flooding the server using commands like this:
|
||||
"PRIVMSG nick1,nick1,nick1,...".
|
||||
Duplicate targets are suppressed silently (channels and clients).
|
||||
In addition, the maximum number of targets per PRIVMSG, NOTICE, ...
|
||||
command are limited to MAX_HNDL_TARGETS (25). If there are more, the
|
||||
daemon sends the new 407 (ERR_TOOMANYTARGETS_MSG) numeric, containing
|
||||
the first target that hasn't been handled any more. Closes #187.
|
||||
- Make contrib/platformtest.sh script more portable, and only show
|
||||
"runs=Y" when the test suite really has been passed successfully.
|
||||
|
||||
ngIRCd 23 (2015-11-16)
|
||||
|
||||
ngIRCd 23~rc1 (2015-09-06)
|
||||
- Use "NOTICE *" before registration instead of "NOTICE AUTH". "AUTH" is
|
||||
a valid nickname so sending notices to it is probably not a good idea.
|
||||
Use "*" as the target instead as done with numerics when the nick is not
|
||||
available. This mimics the behavior in Charybdis, IRCD-Hybrid, InspIRCd
|
||||
2.2, Plexus 4, etc. Closes #217.
|
||||
The "NoticeAuth" configuration variable (ngircd.conf) has been renamed
|
||||
to "NoticeBeforeRegistration" accordingly, but the old name is still
|
||||
supported for compatibility reasons.
|
||||
- Implement new channel mode "N" (regular users can't change their nick
|
||||
name while on this channel). Closes #214.
|
||||
- Keep track of who placed bans, invites, and excepts.
|
||||
Idea and implementation by LucentW, Thanks! Closes #203.
|
||||
- Implement numeric RPL_LISTSTART(321). lightIRC and other clients
|
||||
expecting RPL_LISTSTART should now behave correctly.
|
||||
Idea and implementation by LucentW, Thanks! Closes #207.
|
||||
- Streamline the effect of "MorePrivacy" option: Update documentation
|
||||
in ngircd.conf(5); don't hide channels for IRC Ops on LIST and don't
|
||||
hide IP addresses/hostnames on WHOIS when "MorePrivacy" is in effect.
|
||||
This closes #198.
|
||||
- IRC operators now can kick anyone when "OperCanMode" is set.
|
||||
Idea and implementation by LucentW, Thanks! Closes #202.
|
||||
- Implement user mode "I": Hide channels on WHOIS: this mode prevents
|
||||
ngIRCd from showing channels on WHOIS (IRC Operators can always see
|
||||
the channel list).
|
||||
Idea and implementation by LucentW, Thanks! Closes #197.
|
||||
- INVITE command: Implement ERR_USERNOTONSERV(504) numeric and make sure
|
||||
that the target user is on the same server when inviting other users
|
||||
to local ("&") channels.
|
||||
Idea by Cahata, thanks! Closes #183.
|
||||
- MODE command: Always report channel creation time. Up to now when
|
||||
receiving a MODE command, ngIRCd only reported the channel creation
|
||||
time to clients that were members of the channel. This patch reports
|
||||
the channel creation time to all clients, regardless if they are joined
|
||||
to that channel or not. At least ircd-seven behaves like this.
|
||||
This closes #188. Reported by Cahata, thanks!
|
||||
|
||||
ngIRCd 22.1 (2015-04-06)
|
||||
|
||||
- Update "CipherList" to not enable SSLv3 by default. Idea, initial patch,
|
||||
and testing by Christoph Biedl <ngircd.anoy@manchmal.in-ulm.de>.
|
||||
- Change ngIRCd test suite not to use DNS lookups: Different operating
|
||||
systems do behave quite differently when doing DNS lookups, for example
|
||||
"127.0.0.1" sometimes resolves to "localhost" and sometimes to
|
||||
"localhost.localdomain" (for example OpenBSD). And other OS resolve
|
||||
"localhost" to the real host name (for example Cygwin). So not using
|
||||
DNS at all makes the test site much more portable.
|
||||
|
||||
ngIRCd 22 (2014-10-11)
|
||||
|
||||
- Match all list patterns case-insensitive: this affects the invite-,
|
||||
ban-, and except lists, as well as G-Lines an K-Lines.
|
||||
Problem pointed out by "wowaname" on #ngircd, thanks!
|
||||
|
||||
ngIRCd 22~rc1 (2014-09-29)
|
||||
- Sync "except lists" between servers: Up to now, ban, invite, and G-Line
|
||||
lists have been synced between servers while linking -- but obviously
|
||||
nobody noticed that except list have been missing ever since. Until now.
|
||||
Thanks to "j4jackj", who reported this issue in #ngircd.
|
||||
- Allow longer user names (up to 63 characters) for authentication.
|
||||
- Increase MAX_SERVERS from 16 to 64: There are installations out there
|
||||
that would like to configure more than 16 links per server, so increase
|
||||
this limit. Best would be to get rid of MAX_SERVERS altogether and make
|
||||
if fully dynamic, but start with this quick and dirty hack ...
|
||||
- Test suite/platformtest.sh: Detect when tests have been skipped.
|
||||
- Allow "DefaultUserModes" to set all possible modes, including modes only
|
||||
settable by IRC Operators.
|
||||
- Implement user mode "F": "relaxed flood protection". Clients with mode
|
||||
"F" set are allowed to rapidly send data to the daemon. This mode is only
|
||||
settable by IRC Operators and can cause problems in the network -- so be
|
||||
careful and only set it on "trusted" clients!
|
||||
User mode "F" is used by Bahamut for this purpose, for example.
|
||||
- Use server password when PAM is compiled in but disabled.
|
||||
- Streamline punctuation of log messages.
|
||||
- Return ISUPPORT(005) numerics on "VERSION". This is how ircd-seven,
|
||||
Charybdis, Hybrid, and InspIRCd behave, for example.
|
||||
- configure: Only link "contrib/Debian" if it exists, which isn't the case
|
||||
on "VPATH builds", for example.
|
||||
- Show the account name in WHOIS. This uses the same numeric as Charybdis
|
||||
and ircu families: WHOISLOGGEDIN(330).
|
||||
- Pattern matching: Remove "range matching" in our pattern matching code
|
||||
using the "[...]" syntax, because [ and ] are valid characters in nick
|
||||
names and one has to quote them currently using the "\" character, which
|
||||
is quite unexpected for users.
|
||||
- platformtest.sh: New option "-x", don't regenerate build system and
|
||||
allow using separate source and build trees.
|
||||
- Test suite: explicitly enable glibc memory checking.
|
||||
- Make "MODE -k" handling more robust and compatible, send "fake '*' key"
|
||||
in all replies.
|
||||
- portabtest: Actually test the functions snprintf(), strlcpy(), strlcat(),
|
||||
and vsnprintf() for correctness, not only existence (which was quite
|
||||
useless, because if they weren't available, the program could not have
|
||||
been linked at all ...).
|
||||
- Implement new configuration option "Network": it is used to set the
|
||||
(completely optional) "network name", to which this instance of the
|
||||
daemon belongs. When set, this name is used in the ISUPPORT(005) numeric
|
||||
which is sent to all clients connecting to the server after logging in.
|
||||
- Update doc/Platforms.txt.
|
||||
- Various code cleanups, remove unused code, streamline error handling.
|
||||
Remove all imp.h and exp.h header files, support non-standard vsnprintf()
|
||||
return codes, and fix some K&R C portability issues. Streamline
|
||||
DEBUG_ARRAY, DEBUG_BUFFER, DEBUG_IO, DEBUG_ZIP definitions.
|
||||
- Increase penalty time to 10 seconds when handling OPER commands with an
|
||||
invalid password.
|
||||
|
||||
ngIRCd 21.1 (2014-03-25)
|
||||
|
||||
- Don't ignore but use the server password when PAM is compiled in but
|
||||
disabled. Thanks to Roy Sindre Norangshol <roy.sindre@norangshol.no>!
|
||||
- doc/Platforms.txt: Update from master branch.
|
||||
- doc/Services.txt: Update information for Anope 2.x.
|
||||
- configure: add support for the LDFLAGS_END and LIBS_END variables to add
|
||||
linker flags and libraries at the end of the configure run (CFLAGS_END has
|
||||
been implemented already).
|
||||
- Update Copyright notices for 2014 :-)
|
||||
|
||||
ngIRCd 21 (2013-10-30)
|
||||
|
||||
@@ -105,7 +358,7 @@ ngIRCd 20.2 (2013-02-15)
|
||||
|
||||
- This release is a bugfix release only, without new features.
|
||||
- Security: Fix a denial of service bug in the function handling KICK
|
||||
commands that could be used by arbitrary users to to crash the daemon
|
||||
commands that could be used by arbitrary users to crash the daemon
|
||||
(CVE-2013-1747).
|
||||
|
||||
ngIRCd 20.1 (2013-01-02)
|
||||
@@ -197,7 +450,7 @@ ngIRCd 20 (2012-12-17)
|
||||
the hash function. When "CloakHostSalt" is not set (the default), a
|
||||
random salt will be generated after each server restart.
|
||||
|
||||
ngIRCd Release 19.2 (2012-06-19)
|
||||
ngIRCd 19.2 (2012-06-19)
|
||||
|
||||
ngIRCd 19.2~rc1 (2012-06-13)
|
||||
- New configuration option "CloakHostModeX" to configure the hostname
|
||||
@@ -206,15 +459,15 @@ ngIRCd Release 19.2 (2012-06-19)
|
||||
which still is the default when "CloakHostModeX" isn't set.
|
||||
- Add instructions for setting up Atheme IRC services.
|
||||
- Implement support for IRC capability handling, the new "CAP" command,
|
||||
and capablity "multi-prefix" which allows both the NAME and WHO command
|
||||
and capability "multi-prefix" which allows both the NAME and WHO command
|
||||
handlers to return more than one "class prefix" to the client.
|
||||
|
||||
ngIRCd Release 19.1 (2012-03-19)
|
||||
ngIRCd 19.1 (2012-03-19)
|
||||
|
||||
- Really include _all_ patches to build the Anope module into the
|
||||
distribution archive ... ooops!
|
||||
|
||||
ngIRCd Release 19 (2012-02-29)
|
||||
ngIRCd 19 (2012-02-29)
|
||||
|
||||
ngIRCd 19~rc1 (2012-02-12)
|
||||
- Update preliminary ngIRCd protocol module for Anope 1.9.6, which now
|
||||
@@ -282,7 +535,7 @@ ngIRCd Release 19 (2012-02-29)
|
||||
argument. Like unknown user and channel modes, these modes are saved
|
||||
and forwarded to other servers, but ignored otherwise.
|
||||
|
||||
ngIRCd Release 18 (2011-07-10)
|
||||
ngIRCd 18 (2011-07-10)
|
||||
|
||||
- Add preliminary ngIRCd protocol module for Anope 1.9 to contrib/Anope/.
|
||||
|
||||
@@ -357,19 +610,19 @@ ngIRCd Release 18 (2011-07-10)
|
||||
vice-versa). The defaults are adjusted accordingly and the old variables
|
||||
in [Global] are still accepted, so there is no functional change.
|
||||
|
||||
ngIRCd Release 17.1 (2010-12-19)
|
||||
ngIRCd 17.1 (2010-12-19)
|
||||
|
||||
- Don't log critical (or worse) messages to stderr
|
||||
- Remove "error file" when compiled with debug code enabled
|
||||
- New numeric 329: get channel creation time on "MODE #chan" commands
|
||||
|
||||
ngIRCd Release 17 (2010-11-07)
|
||||
ngIRCd 17 (2010-11-07)
|
||||
|
||||
- doc: change path names in sample-ngircd.conf depending on sysconfdir
|
||||
|
||||
ngIRCd 17~rc2 (2010-10-25)
|
||||
- Generate ngIRCd version number from GIT tag.
|
||||
- Make sourcecode compatible with ansi2knr again. This allows to compile
|
||||
- Make source code compatible with ansi2knr again. This allows to compile
|
||||
ngIRCd using a pre-ANSI K&R C compiler again.
|
||||
|
||||
ngIRCd 17~rc1 (2010-10-11)
|
||||
@@ -378,7 +631,7 @@ ngIRCd Release 17 (2010-11-07)
|
||||
Howl, Avahi or on Mac OS X).
|
||||
- New configuration option "SyslogFacility" to define the syslog "facility"
|
||||
(the "target"), to which ngIRCd should send its log messages.
|
||||
Possible values are system dependant, but most probably "auth", "daemon",
|
||||
Possible values are system dependent, but most probably "auth", "daemon",
|
||||
"user" and "local1" through "local7" are possible values; see syslog(3).
|
||||
Default is "local5" for historical reasons.
|
||||
- Dump the "internal server state" (configured servers, established
|
||||
@@ -388,7 +641,7 @@ ngIRCd Release 17 (2010-11-07)
|
||||
signal SIGUSR1, when debug code is compiled in, not only on startup
|
||||
using the command line parameters.
|
||||
- Implement user mode "x": host name cloaking (closes: #102).
|
||||
- Change MOTD file handling: ngIRCd now caches the contens of the MOTD
|
||||
- Change MOTD file handling: ngIRCd now caches the contents of the MOTD
|
||||
file, so the daemon now requires a HUP signal or REHASH command to
|
||||
re-read the MOTD file when its content changed.
|
||||
- Allow IRC ops to change channel modes even without OperServerMode set.
|
||||
@@ -401,10 +654,10 @@ ngIRCd Release 17 (2010-11-07)
|
||||
this new mode requires the user to be an IRC operator.
|
||||
- Show SSL status in WHOIS output, numeric 275.
|
||||
|
||||
ngIRCd Release 16 (2010-05-02)
|
||||
ngIRCd 16 (2010-05-02)
|
||||
|
||||
ngIRCd 16~rc2 (2010-04-25)
|
||||
- Enhace connection statistics counters: display total number of served
|
||||
- Enhance connection statistics counters: display total number of served
|
||||
connections on daemon shutdown and when a new client connects using
|
||||
the new numeric RPL_STATSCONN (250).
|
||||
|
||||
@@ -421,12 +674,12 @@ ngIRCd Release 16 (2010-05-02)
|
||||
every channel, and c) remote clients using a server not supporting this
|
||||
mode are not checked either and therefore always allowed to join.
|
||||
|
||||
ngIRCd Release 15 (2009-11-07)
|
||||
ngIRCd 15 (2009-11-07)
|
||||
|
||||
ngIRCd 15~rc1 (2009-10-15)
|
||||
- Do not add default listening port (6667) if SSL ports were specified, so
|
||||
ngIRCd can be configured to only accept SSL-encrypted connections now.
|
||||
- Enable IRC operators to use the IRC command SQUIT (insted of the already
|
||||
- Enable IRC operators to use the IRC command SQUIT (instead of the already
|
||||
implemented but non-standard DISCONNECT command).
|
||||
- New configuration option "AllowRemoteOper" (disabled by default) that
|
||||
enables remote IRC operators to use the IRC commands SQUIT and CONNECT
|
||||
@@ -435,13 +688,13 @@ ngIRCd Release 15 (2009-11-07)
|
||||
a throttling scheme: an IRC client can send up to 3 commands or 256 bytes
|
||||
per second before a one second pause is enforced.
|
||||
|
||||
ngIRCd Release 14.1 (2009-05-05)
|
||||
ngIRCd 14.1 (2009-05-05)
|
||||
|
||||
- Security: fix remotely triggerable crash in SSL/TLS code.
|
||||
- Debian: build ngircd-full-dbg package.
|
||||
- Allow ping timeout quit messages to show the timeout value.
|
||||
|
||||
ngIRCd Release 14 (2009-04-20)
|
||||
ngIRCd 14 (2009-04-20)
|
||||
|
||||
ngIRCd 14~rc1 (2009-03-29)
|
||||
- Allow creation of persistent modeless channels.
|
||||
@@ -452,7 +705,7 @@ ngIRCd Release 14 (2009-04-20)
|
||||
individual channel keys for different users.
|
||||
- Remove limit on maximum number of predefined channels in ngircd.conf.
|
||||
|
||||
ngIRCd Release 13 (2008-12-25)
|
||||
ngIRCd 13 (2008-12-25)
|
||||
|
||||
ngIRCd 13~rc1 (2008-11-21):
|
||||
- New version number scheme :-)
|
||||
@@ -584,7 +837,7 @@ ngIRCd 0.7.5 (2003-07-11)
|
||||
(DoS), the default is 5 connections per client IP.
|
||||
- Added new configuration variable "Listen" to bind all listening
|
||||
sockets of the server to a single IP address.
|
||||
|
||||
|
||||
ngIRCd 0.7.1 (2003-07-18)
|
||||
|
||||
- Added support for GNU/Hurd.
|
||||
@@ -609,9 +862,9 @@ ngIRCd 0.7.0 (2003-05-01)
|
||||
- Documentation is now installed in $(datadir)/doc/ngircd.
|
||||
|
||||
|
||||
Older news (sorry, only available in german language):
|
||||
Older news (sorry, only available in German language):
|
||||
|
||||
ngIRCd 0.6.0, 2002-12-24
|
||||
ngIRCd 0.6.0, 24.12.2002
|
||||
|
||||
- beim Schliessen einer Verbindung zeigt der Server nun vor dem ERROR
|
||||
noch eine Statistik ueber die empfangene und gesendete Datenmenge an.
|
||||
|
93
README
93
README
@@ -1,93 +0,0 @@
|
||||
|
||||
ngIRCd - Next Generation IRC Server
|
||||
http://ngircd.barton.de/
|
||||
|
||||
(c)2001-2013 Alexander Barton and Contributors.
|
||||
ngIRCd is free software and published under the
|
||||
terms of the GNU General Public License.
|
||||
|
||||
-- README --
|
||||
|
||||
|
||||
I. Introduction
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
ngIRCd is a free, portable and lightweight Internet Relay Chat server for
|
||||
small or private networks, developed under the GNU General Public License
|
||||
(GPL; please see the file COPYING for details). It is simple to configure,
|
||||
can cope with dynamic IP addresses, and supports IPv6 as well as SSL. It is
|
||||
written from scratch and not based on the original IRCd.
|
||||
|
||||
The name ngIRCd means next generation IRC daemon, which is a little bit
|
||||
exaggerated: lightweight Internet Relay Chat server most probably would be a
|
||||
better name :-)
|
||||
|
||||
Please see the INSTALL document for installation and upgrade information!
|
||||
|
||||
|
||||
II. Status
|
||||
~~~~~~~~~~~
|
||||
|
||||
It is not the goal of ngIRCd to implement all the nasty behaviours of the
|
||||
original ircd, but to implement most of the useful commands and semantics
|
||||
specified by the RFCs.
|
||||
|
||||
In the meantime ngIRCd should be quite feature complete and stable to be
|
||||
used in real IRC networks.
|
||||
|
||||
Implemented IRC-commands are:
|
||||
|
||||
ADMIN, AWAY, CHANINFO, CONNECT, DIE, DISCONNECT, ERROR, GLINE, HELP, INFO,
|
||||
INVITE, ISON, JOIN, KICK, KILL, KLINE, LINKS, LIST, LUSERS, MODE, MOTD,
|
||||
NAMES, NICK, NJOIN, NOTICE, OPER, PART, PASS, PING, PONG, PRIVMSG, QUIT,
|
||||
REHASH, RESTART, SERVER, SERVICE, SERVLIST, SQUERY, SQUIT, STATS, SUMMON,
|
||||
TIME, TOPIC, TRACE, USER, USERHOST, USERS, VERSION, WALLOPS, WEBIRC, WHO,
|
||||
WHOIS, WHOWAS.
|
||||
|
||||
III. Features (or: why use ngIRCd?)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- well arranged (lean) configuration file
|
||||
- simple to build/install, configure and maintain
|
||||
- supports IPv6 and SSL
|
||||
- no problems with servers that have dynamic IP addresses
|
||||
- freely available, modern, portable and tidy C-source
|
||||
- wide field of supported platforms, including AIX, A/UX, FreeBSD, HP-UX,
|
||||
IRIX, Linux, Mac OS X, NetBSD, OpenBSD, Solaris, and Windows with Cygwin.
|
||||
- ngIRCd is being actively developed since 2001.
|
||||
|
||||
|
||||
IV. Documentation
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
More documentation can be found in the "doc/" directory and the homepage of
|
||||
the ngIRCd: <http://ngircd.barton.de/>.
|
||||
|
||||
|
||||
V. Download
|
||||
~~~~~~~~~~~
|
||||
|
||||
The homepage of the ngIRCd is: <http://ngircd.barton.de/>; you will find
|
||||
the newest information about the ngIRCd and the most recent ("stable")
|
||||
releases there.
|
||||
|
||||
If you are interested in the latest development versions (which are not
|
||||
always stable), then please read the section about "GIT" on the homepage and
|
||||
the file "doc/GIT.txt" which describes the use of GIT, the version control
|
||||
system used by ngIRCd (homepage: http://git-scm.com/).
|
||||
|
||||
|
||||
VI. Bugs
|
||||
~~~~~~~~
|
||||
|
||||
If you find bugs in the ngIRCd (which might be there :-), please report
|
||||
them at the following URL:
|
||||
|
||||
<http://ngircd.barton.de/bugtracker.php>
|
||||
|
||||
There you can read about known bugs and limitations, too.
|
||||
|
||||
If you have critics, patches or something else, please feel free to post a
|
||||
mail to the ngIRCd mailing list: <ngircd-ml@arthur.barton.de> (please see
|
||||
<http://ngircd.barton.de/support.php#ml> for details) or join the ngIRCd
|
||||
IRC channel: <irc://irc.barton.de/ngircd>.
|
76
README.md
Normal file
76
README.md
Normal file
@@ -0,0 +1,76 @@
|
||||
# [ngIRCd](https://ngircd.barton.de) - Internet Relay Chat Server
|
||||
|
||||
## Introduction
|
||||
|
||||
*ngIRCd* is a free, portable and lightweight *Internet Relay Chat* ([IRC])
|
||||
server for small or private networks, developed under the terms of the GNU
|
||||
General Public License ([GPL]); please see the file `COPYING` for licensing
|
||||
information.
|
||||
|
||||
The server is simple to configure, can cope with dynamic IP addresses, and
|
||||
supports IPv6 as well as SSL. It is written from scratch and not based on the
|
||||
original IRCd.
|
||||
|
||||
The name ngIRCd means *next generation IRC daemon*, which is a little bit
|
||||
exaggerated: *lightweight Internet Relay Chat server* most probably would have
|
||||
been a better name :-)
|
||||
|
||||
Please see the `INSTALL.md` document for installation and upgrade information,
|
||||
online available here: <https://ngircd.barton.de/doc/INSTALL.md>!
|
||||
|
||||
## Status
|
||||
|
||||
ngIRCd should be quite feature complete and stable to be used as daemon in
|
||||
real world IRC networks.
|
||||
|
||||
It is not the goal of ngIRCd to implement all the nasty behaviors of the
|
||||
original ircd, but to implement most of the useful commands and semantics
|
||||
specified by the RFCs that are used by existing clients.
|
||||
|
||||
## Features (or: why use ngIRCd?)
|
||||
|
||||
- Well arranged (lean) configuration file.
|
||||
- Simple to build, install, configure, and maintain.
|
||||
- Supports IPv6 and SSL.
|
||||
- Can use PAM for user authentication.
|
||||
- Lots of popular user and channel modes are implemented.
|
||||
- Supports "cloaking" of users.
|
||||
- No problems with servers that have dynamic IP addresses.
|
||||
- Freely available, modern, portable and tidy C source.
|
||||
- Wide field of supported platforms, including AIX, A/UX, FreeBSD, HP-UX,
|
||||
IRIX, Linux, macOS, NetBSD, OpenBSD, Solaris, and Windows with Cygwin.
|
||||
- ngIRCd is being actively developed since 2001.
|
||||
|
||||
## Documentation
|
||||
|
||||
The **homepage** of the ngIRCd project is <https://ngircd.barton.de>.
|
||||
|
||||
More documentation can be found in the `doc/` directory and
|
||||
[online](https://ngircd.barton.de/documentation).
|
||||
|
||||
## Downloads & Source Code
|
||||
|
||||
You can find the latest information about the ngIRCd and the most recent
|
||||
stable release on the [news](https://ngircd.barton.de/news) and
|
||||
[downloads](https://ngircd.barton.de/download) pages of the homepage.
|
||||
|
||||
Visit our source code repository at [GitHub](https://github.com) if you are
|
||||
interested in the latest development code: <https://github.com/ngircd/ngircd>.
|
||||
|
||||
## Problems, Bugs, Patches
|
||||
|
||||
Please don't hesitate to contact us if you encounter problems:
|
||||
|
||||
- On IRC: <irc://irc.barton.de/ngircd>
|
||||
- Via the mailing list: <ngircd-ml@ngircd.barton.de>
|
||||
|
||||
See <http://ngircd.barton.de/support> for details.
|
||||
|
||||
If you find any bugs in ngIRCd (which most probably will be there ...), please
|
||||
report them to our issue tracker at GitHub:
|
||||
|
||||
- Bug tracker: <https://github.com/ngircd/ngircd/issues>
|
||||
- Patches, "pull requests": <https://github.com/ngircd/ngircd/pulls>
|
||||
|
||||
[IRC]: https://wikipedia.org/wiki/Internet_Relay_Chat
|
||||
[GPL]: https://wikipedia.org/wiki/GNU_General_Public_License
|
47
autogen.sh
47
autogen.sh
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# ngIRCd -- The Next Generation IRC Daemon
|
||||
# Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors
|
||||
# Copyright (c)2001-2015 Alexander Barton (alex@barton.de) and Contributors
|
||||
#
|
||||
# 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
|
||||
@@ -95,7 +95,7 @@ Search()
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
minor=`expr $minor - 1`
|
||||
minor=$(expr $minor - 1)
|
||||
done
|
||||
return 1
|
||||
}
|
||||
@@ -103,14 +103,15 @@ Search()
|
||||
Notfound()
|
||||
{
|
||||
echo "Error: $* not found!"
|
||||
echo "Please install recent versions of GNU autoconf and GNU automake."
|
||||
echo 'Please install supported versions of GNU autoconf, GNU automake'
|
||||
echo 'and pkg-config: see the INSTALL file for details.'
|
||||
exit 1
|
||||
}
|
||||
|
||||
Run()
|
||||
{
|
||||
[ "$VERBOSE" = "1" ] && echo " - running \"$@\" ..."
|
||||
$@
|
||||
[ "$VERBOSE" = "1" ] && echo " - running \"$*\" ..."
|
||||
"$@"
|
||||
}
|
||||
|
||||
# Reset locale settings to suppress warning messages of Perl
|
||||
@@ -139,42 +140,43 @@ fi
|
||||
# Try to detect the needed tools when no environment variable already
|
||||
# specifies one:
|
||||
echo "Searching for required tools ..."
|
||||
[ -z "$ACLOCAL" ] && ACLOCAL=`Search aclocal 1`
|
||||
[ -z "$ACLOCAL" ] && ACLOCAL=$(Search aclocal 1)
|
||||
[ "$VERBOSE" = "1" ] && echo " - ACLOCAL=$ACLOCAL"
|
||||
[ -z "$AUTOHEADER" ] && AUTOHEADER=`Search autoheader 2`
|
||||
[ -z "$AUTOHEADER" ] && AUTOHEADER=$(Search autoheader 2)
|
||||
[ "$VERBOSE" = "1" ] && echo " - AUTOHEADER=$AUTOHEADER"
|
||||
[ -z "$AUTOMAKE" ] && AUTOMAKE=`Search automake 1`
|
||||
[ -z "$AUTOMAKE" ] && AUTOMAKE=$(Search automake 1)
|
||||
[ "$VERBOSE" = "1" ] && echo " - AUTOMAKE=$AUTOMAKE"
|
||||
[ -z "$AUTOCONF" ] && AUTOCONF=`Search autoconf 2`
|
||||
[ -z "$AUTOCONF" ] && AUTOCONF=$(Search autoconf 2)
|
||||
[ "$VERBOSE" = "1" ] && echo " - AUTOCONF=$AUTOCONF"
|
||||
|
||||
AUTOCONF_VERSION=`echo $AUTOCONF | cut -d'-' -f2-`
|
||||
[ -n "$AUTOCONF_VERSION" -a "$AUTOCONF_VERSION" != "autoconf" ] \
|
||||
AUTOCONF_VERSION=$(echo "$AUTOCONF" | cut -d'-' -f2-)
|
||||
[ -n "$AUTOCONF_VERSION" ] && [ "$AUTOCONF_VERSION" != "autoconf" ] \
|
||||
&& export AUTOCONF_VERSION || unset AUTOCONF_VERSION
|
||||
[ "$VERBOSE" = "1" ] && echo " - AUTOCONF_VERSION=$AUTOCONF_VERSION"
|
||||
AUTOMAKE_VERSION=`echo $AUTOMAKE | cut -d'-' -f2-`
|
||||
[ -n "$AUTOMAKE_VERSION" -a "$AUTOMAKE_VERSION" != "automake" ] \
|
||||
AUTOMAKE_VERSION=$(echo $AUTOMAKE | cut -d'-' -f2-)
|
||||
[ -n "$AUTOMAKE_VERSION" ] && [ "$AUTOMAKE_VERSION" != "automake" ] \
|
||||
&& export AUTOMAKE_VERSION || unset AUTOMAKE_VERSION
|
||||
[ "$VERBOSE" = "1" ] && echo " - AUTOMAKE_VERSION=$AUTOMAKE_VERSION"
|
||||
|
||||
[ $# -gt 0 ] && CONFIGURE_ARGS=" $@" || CONFIGURE_ARGS=""
|
||||
[ -z "$GO" -a -n "$CONFIGURE_ARGS" ] && GO=1
|
||||
[ $# -gt 0 ] && CONFIGURE_ARGS=" $*" || CONFIGURE_ARGS=""
|
||||
[ -z "$GO" ] && [ -n "$CONFIGURE_ARGS" ] && GO=1
|
||||
|
||||
# Verify that all tools have been found
|
||||
command -v pkg-config >/dev/null || Notfound pkg-config
|
||||
[ -z "$ACLOCAL" ] && Notfound aclocal
|
||||
[ -z "$AUTOHEADER" ] && Notfound autoheader
|
||||
[ -z "$AUTOMAKE" ] && Notfound automake
|
||||
[ -z "$AUTOCONF" ] && Notfound autoconf
|
||||
|
||||
AM_VERSION=`$AUTOMAKE --version | head -n 1 | sed -e 's/.* //g'`
|
||||
AM_VERSION=$($AUTOMAKE --version | head -n 1 | sed -e 's/.* //g')
|
||||
ifs=$IFS; IFS="."; set $AM_VERSION; IFS=$ifs
|
||||
AM_MAJOR="$1"; AM_MINOR="$2"; AM_PATCHLEVEL="$3"
|
||||
AM_MAJOR="$1"; AM_MINOR="$2"
|
||||
echo "Detected automake $AM_VERSION ..."
|
||||
|
||||
AM_MAKEFILES="src/ipaddr/Makefile.ng src/ngircd/Makefile.ng src/testsuite/Makefile.ng src/tool/Makefile.ng"
|
||||
|
||||
# De-ANSI-fication?
|
||||
if [ "$AM_MAJOR" -eq "1" -a "$AM_MINOR" -lt "12" ]; then
|
||||
if [ "$AM_MAJOR" -eq "1" ] && [ "$AM_MINOR" -lt "12" ]; then
|
||||
# automake < 1.12 => automatic de-ANSI-fication support available
|
||||
echo " - Enabling de-ANSI-fication support."
|
||||
sed -e "s|^__ng_PROTOTYPES__|AM_C_PROTOTYPES|g" configure.ng >configure.ac
|
||||
@@ -188,19 +190,20 @@ else
|
||||
DEANSI_END=" (disabled by ./autogen.sh script)"
|
||||
fi
|
||||
# Serial test harness?
|
||||
if [ "$AM_MAJOR" -eq "1" -a "$AM_MINOR" -ge "13" ]; then
|
||||
if [ "$AM_MAJOR" -eq "1" ] && [ "$AM_MINOR" -ge "13" ]; then
|
||||
# automake >= 1.13 => enforce "serial test harness"
|
||||
echo " - Enforcing serial test harness."
|
||||
SERIAL_TESTS="serial-tests"
|
||||
else
|
||||
# automake < 1.13 => no new test harness, nothing to do
|
||||
# shellcheck disable=SC2034
|
||||
SERIAL_TEST=""
|
||||
fi
|
||||
|
||||
sed -e "s|^__ng_Makefile_am_template__|AUTOMAKE_OPTIONS = ${SERIAL_TESTS} ${DEANSI_START}ansi2knr${DEANSI_END}|g" \
|
||||
src/portab/Makefile.ng >src/portab/Makefile.am
|
||||
for makefile_ng in $AM_MAKEFILES; do
|
||||
makefile_am=`echo "$makefile_ng" | sed -e "s|\.ng\$|\.am|g"`
|
||||
makefile_am=$(echo "$makefile_ng" | sed -e "s|\.ng\$|\.am|g")
|
||||
sed -e "s|^__ng_Makefile_am_template__|AUTOMAKE_OPTIONS = ${SERIAL_TESTS} ${DEANSI_START}../portab/ansi2knr${DEANSI_END}|g" \
|
||||
$makefile_ng >$makefile_am
|
||||
done
|
||||
@@ -214,10 +217,10 @@ Run $ACLOCAL && \
|
||||
Run $AUTOHEADER && \
|
||||
Run $AUTOMAKE --add-missing --no-force
|
||||
|
||||
if [ $? -eq 0 -a -x ./configure ]; then
|
||||
if [ $? -eq 0 ] && [ -x ./configure ]; then
|
||||
# Success: if we got some parameters we call ./configure and pass
|
||||
# all of them to it.
|
||||
NAME=`grep PACKAGE_STRING= configure | cut -d"'" -f2`
|
||||
NAME=$(grep PACKAGE_STRING= configure | cut -d"'" -f2)
|
||||
if [ "$GO" = "1" ]; then
|
||||
[ -n "$PREFIX" ] && p=" --prefix=$PREFIX" || p=""
|
||||
c="./configure${p}${CONFIGURE_ARGS}"
|
||||
|
1017
config.guess
vendored
Normal file → Executable file
1017
config.guess
vendored
Normal file → Executable file
File diff suppressed because it is too large
Load Diff
2767
config.sub
vendored
Normal file → Executable file
2767
config.sub
vendored
Normal file → Executable file
File diff suppressed because it is too large
Load Diff
183
configure.ng
183
configure.ng
@@ -1,6 +1,6 @@
|
||||
#
|
||||
# ngIRCd -- The Next Generation IRC Daemon
|
||||
# Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors
|
||||
# Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors
|
||||
#
|
||||
# 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
|
||||
@@ -23,14 +23,13 @@ m4_ifdef([AM_SILENT_RULES],
|
||||
# -- Initialisation --
|
||||
|
||||
AC_PREREQ([2.61])
|
||||
AC_INIT([ngIRCd], VERSION_ID,
|
||||
[ngircd-ml@ngircd.barton.de], [ngircd], [http://ngircd.barton.de/])
|
||||
AC_INIT([ngIRCd],[VERSION_ID],[ngircd-ml@ngircd.barton.de],[ngircd],[http://ngircd.barton.de/])
|
||||
|
||||
AC_CONFIG_SRCDIR([src/ngircd/ngircd.c])
|
||||
AC_CONFIG_HEADER([src/config.h])
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
AM_INIT_AUTOMAKE([-Wall 1.10 ]ng_color_tests)
|
||||
AM_INIT_AUTOMAKE([-Wall 1.10 foreign ]ng_color_tests)
|
||||
|
||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
||||
|
||||
@@ -67,6 +66,7 @@ AC_PROG_AWK
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_LN_S
|
||||
AC_PROG_MAKE_SET
|
||||
AC_PROG_MKDIR_P
|
||||
AC_PROG_RANLIB
|
||||
|
||||
# -- Compiler Features --
|
||||
@@ -75,23 +75,57 @@ AC_C_CONST
|
||||
AC_C_INLINE
|
||||
__ng_PROTOTYPES__
|
||||
|
||||
# -- Hard coded system and compiler dependencies/features/options ... --
|
||||
# -- Function Definitions --
|
||||
|
||||
AC_DEFUN([GCC_STACK_PROTECT_CC],[
|
||||
ssp_cc=yes
|
||||
# we use -fstack-protector-all for the test to enfoce the use of the guard variable
|
||||
AC_MSG_CHECKING([whether ${CC} accepts -fstack-protector])
|
||||
ssp_old_cflags="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -fstack-protector-all"
|
||||
AC_TRY_LINK(,,, ssp_cc=no)
|
||||
echo $ssp_cc
|
||||
CFLAGS="$ssp_old_cflags"
|
||||
if test "X$ssp_cc" = "Xyes"; then
|
||||
CFLAGS="$CFLAGS -fstack-protector"
|
||||
AC_DEFINE([ENABLE_SSP_CC], 1, [Define if SSP C support is enabled.])
|
||||
fi
|
||||
ssp_cc=yes
|
||||
# Use -fstack-protector-all for the test to enfoce the use of the
|
||||
# guard variable
|
||||
AC_MSG_CHECKING([whether ${CC} accepts -fstack-protector])
|
||||
ssp_old_cflags="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -fstack-protector-all"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],[],[ssp_cc=no])
|
||||
echo $ssp_cc
|
||||
CFLAGS="$ssp_old_cflags"
|
||||
if test "X$ssp_cc" = "Xyes"; then
|
||||
CFLAGS="$CFLAGS -fstack-protector"
|
||||
AC_DEFINE([ENABLE_SSP_CC], 1, [Define if SSP C support is enabled.])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([WORKING_GETADDRINFO],[
|
||||
AC_CHECK_FUNCS([getaddrinfo],[
|
||||
AC_MSG_CHECKING([whether getaddrinfo() works])
|
||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netdb.h>
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
struct addrinfo hints, *ai;
|
||||
memset(&hints, 0, sizeof(hints));
|
||||
hints.ai_flags = AI_PASSIVE;
|
||||
hints.ai_socktype = SOCK_STREAM;
|
||||
hints.ai_family = PF_UNSPEC;
|
||||
if(getaddrinfo(NULL, "0", &hints, &ai) != 0)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
]])],[
|
||||
AC_DEFINE([HAVE_WORKING_GETADDRINFO], 1, [getaddrinfo(0)])
|
||||
AC_MSG_RESULT(yes)
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
])
|
||||
])
|
||||
|
||||
# -- Hard coded system and compiler dependencies/features/options ... --
|
||||
|
||||
if test "$GCC" = "yes"; then
|
||||
# We are using the GNU C compiler. Good!
|
||||
CFLAGS="$CFLAGS -pipe -W -Wall -Wpointer-arith -Wstrict-prototypes"
|
||||
@@ -120,33 +154,47 @@ AC_HEADER_TIME
|
||||
|
||||
# Required header files
|
||||
AC_CHECK_HEADERS([ \
|
||||
fcntl.h netdb.h netinet/in.h stdlib.h string.h \
|
||||
strings.h sys/socket.h sys/time.h unistd.h \
|
||||
fcntl.h \
|
||||
netdb.h \
|
||||
netinet/in.h \
|
||||
stdlib.h \
|
||||
string.h \
|
||||
strings.h \
|
||||
sys/socket.h \
|
||||
sys/time.h \
|
||||
sys/types.h \
|
||||
unistd.h \
|
||||
],,AC_MSG_ERROR([required C header missing!]))
|
||||
|
||||
# Optional header files
|
||||
AC_CHECK_HEADERS_ONCE([ \
|
||||
arpa/inet.h inttypes.h malloc.h netinet/in_systm.h netinet/ip.h \
|
||||
stdbool.h stddef.h stdint.h varargs.h \
|
||||
])
|
||||
arpa/inet.h \
|
||||
inttypes.h \
|
||||
malloc.h \
|
||||
netinet/in_systm.h \
|
||||
netinet/ip.h \
|
||||
stdbool.h \
|
||||
stddef.h \
|
||||
stdint.h \
|
||||
varargs.h \
|
||||
])
|
||||
|
||||
# -- Datatypes --
|
||||
|
||||
AC_MSG_CHECKING(whether socklen_t exists)
|
||||
AC_TRY_COMPILE([
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
],[
|
||||
]],[[
|
||||
socklen_t a, b;
|
||||
a = 2; b = 4; a += b;
|
||||
],[
|
||||
]])],[
|
||||
AC_DEFINE(HAVE_socklen_t) AC_MSG_RESULT(yes)
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
|
||||
AC_TYPE_PID_T
|
||||
AC_TYPE_SIGNAL
|
||||
AC_TYPE_SIZE_T
|
||||
AC_TYPE_SSIZE_T
|
||||
AC_TYPE_UID_T
|
||||
@@ -179,17 +227,52 @@ AC_FUNC_STRFTIME
|
||||
|
||||
# Required functions
|
||||
AC_CHECK_FUNCS([ \
|
||||
alarm dup2 endpwent gethostbyaddr gethostbyname gethostname \
|
||||
gettimeofday inet_ntoa memmove memset setsid socket strcasecmp \
|
||||
strchr strcspn strerror strncasecmp strrchr strspn strstr \
|
||||
alarm \
|
||||
dup2 \
|
||||
endpwent \
|
||||
gethostbyaddr \
|
||||
gethostbyname \
|
||||
gethostname \
|
||||
gettimeofday \
|
||||
inet_ntoa \
|
||||
memmove \
|
||||
memset \
|
||||
setsid \
|
||||
socket \
|
||||
strcasecmp \
|
||||
strchr \
|
||||
strcspn \
|
||||
strerror \
|
||||
strncasecmp \
|
||||
strrchr \
|
||||
strspn \
|
||||
strstr \
|
||||
],,
|
||||
AC_MSG_ERROR([required function missing!]))
|
||||
|
||||
# Optional functions
|
||||
AC_CHECK_FUNCS_ONCE([ \
|
||||
arc4random arc4random_stir gai_strerror getaddrinfo getnameinfo inet_aton
|
||||
sigaction sigprocmask snprintf vsnprintf strdup strndup strlcpy strlcat \
|
||||
strtok_r waitpid])
|
||||
AC_CHECK_FUNCS_ONCE([
|
||||
arc4random \
|
||||
arc4random_stir \
|
||||
gai_strerror \
|
||||
getnameinfo \
|
||||
inet_aton \
|
||||
setgroups \
|
||||
sigaction \
|
||||
sigprocmask \
|
||||
snprintf \
|
||||
strdup \
|
||||
strlcat \
|
||||
strlcpy \
|
||||
strndup \
|
||||
strsignal \
|
||||
strtok_r \
|
||||
unsetenv \
|
||||
vsnprintf \
|
||||
waitpid \
|
||||
])
|
||||
|
||||
WORKING_GETADDRINFO
|
||||
|
||||
# -- Configuration options --
|
||||
|
||||
@@ -382,9 +465,13 @@ AC_ARG_WITH(openssl,
|
||||
CPPFLAGS="-I$withval/include $CPPFLAGS"
|
||||
LDFLAGS="-L$withval/lib $LDFLAGS"
|
||||
fi
|
||||
AC_CHECK_LIB(crypto, BIO_s_mem)
|
||||
AC_CHECK_LIB(ssl, SSL_library_init)
|
||||
AC_CHECK_FUNCS(SSL_library_init, x_ssl_openssl=yes,
|
||||
PKG_CHECK_MODULES([OPENSSL], [libssl libcrypto],
|
||||
[LIBS="$LIBS $OPENSSL_LIBS" CFLAGS="$CFLAGS $OPENSSL_CFLAGS"
|
||||
AC_DEFINE(HAVE_LIBSSL, 1)],
|
||||
[AC_CHECK_LIB(crypto, BIO_s_mem)
|
||||
AC_CHECK_LIB(ssl, SSL_new)]
|
||||
)
|
||||
AC_CHECK_FUNCS(SSL_new, x_ssl_openssl=yes,
|
||||
AC_MSG_ERROR([Can't enable openssl])
|
||||
)
|
||||
fi
|
||||
@@ -419,6 +506,8 @@ if test "$x_ssl_openssl" = "yes"; then
|
||||
x_ssl_lib=openssl
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(HAVE_SSL, [test $x_ssl_lib != "no"])
|
||||
|
||||
# use TCP wrappers?
|
||||
|
||||
x_tcpwrap_on=no
|
||||
@@ -432,14 +521,18 @@ AC_ARG_WITH(tcp-wrappers,
|
||||
LDFLAGS="-L$withval/lib $LDFLAGS"
|
||||
fi
|
||||
AC_MSG_CHECKING(for hosts_access)
|
||||
saved_LIBS="$LIBS"
|
||||
LIBS="-lwrap $LIBS"
|
||||
AC_TRY_LINK([
|
||||
LIBS_END="-lwrap $LIBS_END"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <tcpd.h>
|
||||
int allow_severity = 0;
|
||||
int deny_severity = 0;
|
||||
],[
|
||||
]],[[
|
||||
tcpd_warn("link test");
|
||||
],[
|
||||
]])],[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(TCPWRAP, 1)
|
||||
x_tcpwrap_on=yes
|
||||
@@ -447,6 +540,7 @@ int deny_severity = 0;
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_ERROR([Can't enable TCP wrappers!])
|
||||
])
|
||||
LIBS="$saved_LIBS"
|
||||
fi
|
||||
]
|
||||
)
|
||||
@@ -602,9 +696,12 @@ AC_DEFINE_UNQUOTED(HOST_CPU, "$host_cpu" )
|
||||
AC_DEFINE_UNQUOTED(HOST_VENDOR, "$host_vendor" )
|
||||
AC_DEFINE_UNQUOTED(HOST_OS, "$host_os" )
|
||||
|
||||
# Add additional CFLAGS, eventually specified on the command line, but after
|
||||
# running this configure script. Useful for "-Werror" for example.
|
||||
# Add additional CFLAGS, LDFLAGS and LIBS which were specified on the command
|
||||
# line or by some tests from above, but after running this script. Useful for
|
||||
# adding "-Werror", for example:
|
||||
test -n "$CFLAGS_END" && CFLAGS="$CFLAGS $CFLAGS_END"
|
||||
test -n "$LDFLAGS_END" && LDFLAGS="$LDFLAGS $LDFLAGS_END"
|
||||
test -n "$LIBS_END" && LIBS="$LIBS $LIBS_END"
|
||||
|
||||
# -- Generate files --
|
||||
|
||||
@@ -633,7 +730,9 @@ if test $? -eq 0; then
|
||||
# Generate debian/ link if the dpkg command exists
|
||||
# (read: if we are running on a debian compatible system)
|
||||
echo "creating Debian-specific links ..."
|
||||
test -f debian/rules || ln -s contrib/Debian debian
|
||||
if test ! -f debian/rules -a -f contrib/Debian/rules; then
|
||||
ln -s contrib/Debian debian
|
||||
fi
|
||||
fi
|
||||
|
||||
# -- Result --
|
||||
|
3
contrib/Debian/.gitignore
vendored
3
contrib/Debian/.gitignore
vendored
@@ -4,10 +4,13 @@
|
||||
files
|
||||
ngircd/
|
||||
ngircd-full/
|
||||
ngircd.service
|
||||
ngircd-full.default
|
||||
ngircd-full.init
|
||||
ngircd-full.postinst
|
||||
ngircd-full.service
|
||||
ngircd-full-dbg/
|
||||
ngircd-full-dbg.default
|
||||
ngircd-full-dbg.init
|
||||
ngircd-full-dbg.postinst
|
||||
ngircd-full-dbg.service
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#
|
||||
# ngIRCd -- The Next Generation IRC Daemon
|
||||
# Copyright (c)2001-2010 Alexander Barton (alex@barton.de)
|
||||
# Copyright (c)2001-2017 Alexander Barton (alex@barton.de) and Contributors
|
||||
#
|
||||
# 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
|
||||
@@ -10,7 +10,8 @@
|
||||
#
|
||||
|
||||
EXTRA_DIST = rules changelog compat control copyright \
|
||||
ngircd.init ngircd.default ngircd.pam ngircd.postinst
|
||||
ngircd.init ngircd.default ngircd.pam ngircd.postinst \
|
||||
source/format
|
||||
|
||||
maintainer-clean-local:
|
||||
rm -f Makefile Makefile.in
|
||||
|
@@ -1,3 +1,83 @@
|
||||
ngircd (26~rc1-0ab1) unstable; urgency=low
|
||||
|
||||
* New "upstream" release candidate 1 for ngIRCd Release 26.
|
||||
|
||||
-- Alexander Barton <alex@barton.de> Sun, 10 May 2020 17:13:17 +0200
|
||||
|
||||
ngircd (25-0ab1) unstable; urgency=low
|
||||
|
||||
* New "upstream" release: ngIRCd 25.
|
||||
|
||||
-- Alexander Barton <alex@barton.de> Wed, 23 Jan 2019 23:13:03 +0100
|
||||
|
||||
ngircd (25~rc1-0ab1) unstable; urgency=low
|
||||
|
||||
* New "upstream" release candidate 1 for ngIRCd Release 25.
|
||||
|
||||
-- Alexander Barton <alex@barton.de> Sat, 11 Aug 2018 21:35:08 +0200
|
||||
|
||||
ngircd (24-0ab1) unstable; urgency=low
|
||||
|
||||
* New "upstream" release: ngIRCd 24.
|
||||
|
||||
-- Alexander Barton <alex@barton.de> Fri, 20 Jan 2017 16:43:09 +0100
|
||||
|
||||
ngircd (24~rc1-0ab2) unstable; urgency=low
|
||||
|
||||
* Use OpenSSL instead of GnuTLS for SSL-enabled packages.
|
||||
|
||||
-- Alexander Barton <alex@barton.de> Fri, 20 Jan 2017 15:20:07 +0100
|
||||
|
||||
ngircd (24~rc1-0ab1) unstable; urgency=low
|
||||
|
||||
* New "upstream" release candidate 1 for ngIRCd Release 24.
|
||||
|
||||
-- Alexander Barton <alex@barton.de> Sat, 07 Jan 2017 18:58:02 +0100
|
||||
|
||||
ngircd (23-0ab1) unstable; urgency=low
|
||||
|
||||
* New "upstream" release: ngIRCd 23.
|
||||
|
||||
-- Alexander Barton <alex@barton.de> Mon, 16 Nov 2015 21:27:03 +0100
|
||||
|
||||
ngircd (23~rc1-0ab1) unstable; urgency=low
|
||||
|
||||
* New "upstream" release candidate 1 for ngIRCd Release 23.
|
||||
|
||||
-- Alexander Barton <alex@barton.de> Sun, 06 Sep 2015 16:55:23 +0200
|
||||
|
||||
ngircd (22.1-0ab1) unstable; urgency=low
|
||||
|
||||
* New "upstream" release: ngIRCd 22.1.
|
||||
|
||||
-- Alexander Barton <alex@barton.de> Mon, 06 Apr 2015 14:34:50 +0200
|
||||
|
||||
ngircd (22-0ab1) unstable; urgency=low
|
||||
|
||||
* New "upstream" release: ngIRCd 22.
|
||||
|
||||
-- Alexander Barton <alex@barton.de> Sat, 11 Oct 2014 20:29:03 +0200
|
||||
|
||||
ngircd (22~rc1-0ab1) unstable; urgency=low
|
||||
|
||||
* New "upstream" release candidate 1 for ngIRCd Release 22.
|
||||
|
||||
-- Alexander Barton <alex@barton.de> Mon, 29 Sep 2014 17:07:55 +0200
|
||||
|
||||
ngircd (21.1-0ab2) unstable; urgency=low
|
||||
|
||||
* Use correct package name in pathname to "HelpFile" (Command.txt)
|
||||
in "ngircd-full" and "ngircd-full-dbg" packages.
|
||||
* Don't adjust path names that are correct by default.
|
||||
|
||||
-- Alexander Barton <alex@barton.de> Mon, 14 Jul 2014 11:20:17 +0200
|
||||
|
||||
ngircd (21.1-0ab1) unstable; urgency=low
|
||||
|
||||
* New "upstream" release: ngIRCd 21.1.
|
||||
|
||||
-- Alexander Barton <alex@barton.de> Tue, 25 Mar 2014 14:44:59 +0100
|
||||
|
||||
ngircd (21-0ab1) unstable; urgency=low
|
||||
|
||||
* New "upstream" release: ngIRCd 21.
|
||||
|
@@ -1 +1 @@
|
||||
4
|
||||
9
|
||||
|
@@ -2,14 +2,15 @@ Source: ngircd
|
||||
Section: net
|
||||
Priority: optional
|
||||
Maintainer: Alexander Barton <alex@barton.de>
|
||||
Build-Depends: debhelper (>> 4.0.0),
|
||||
Build-Depends: debhelper (>> 9.0.0),
|
||||
autotools-dev,
|
||||
dh-systemd (>= 1.5),
|
||||
expect,
|
||||
libz-dev,
|
||||
libwrap0-dev,
|
||||
libident-dev,
|
||||
libgnutls-dev,
|
||||
libpam0g-dev,
|
||||
libssl-dev,
|
||||
libwrap0-dev,
|
||||
libz-dev,
|
||||
telnet | telnet-ssl,
|
||||
Standards-Version: 3.9.1
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# ngIRCd start and stop script for Debian-based systems
|
||||
# Copyright 2008-2013 Alexander Barton <alex@barton.de>
|
||||
# Copyright 2008-2015 Alexander Barton <alex@barton.de>
|
||||
#
|
||||
|
||||
### BEGIN INIT INFO
|
||||
@@ -37,7 +37,7 @@ log_daemon_msg() {
|
||||
echo -n "$*"
|
||||
}
|
||||
log_end_msg() {
|
||||
[ "$1" == "0" ] && echo "." || echo " failed!"
|
||||
[ "$1" = "0" ] && echo "." || echo " failed!"
|
||||
}
|
||||
log_failure_msg() {
|
||||
echo "$*"
|
||||
|
@@ -1,7 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Debian post-installation script
|
||||
# $Id: ngircd.postinst,v 1.2 2006/12/26 14:44:40 alex Exp $
|
||||
#
|
||||
|
||||
set -e
|
||||
@@ -12,6 +11,7 @@ case "$1" in
|
||||
# make sure that the configuration file is not
|
||||
# world-readable, it contains passwords!
|
||||
chmod o= /etc/ngircd/ngircd.conf
|
||||
chgrp irc /etc/ngircd/ngircd.conf
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/make -f
|
||||
#
|
||||
# ngIRCd -- The Next Generation IRC Daemon
|
||||
# Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors
|
||||
# Copyright (c)2001-2016 Alexander Barton (alex@barton.de) and Contributors
|
||||
#
|
||||
# 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
|
||||
@@ -42,6 +42,7 @@ configure-ngircd: configure
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc/ngircd \
|
||||
--mandir=\$${prefix}/share/man \
|
||||
--docdir=\$${prefix}/share/doc/ngircd \
|
||||
--with-syslog --with-zlib
|
||||
|
||||
configure-ngircd-full: configure
|
||||
@@ -52,8 +53,9 @@ configure-ngircd-full: configure
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc/ngircd \
|
||||
--mandir=\$${prefix}/share/man \
|
||||
--docdir=\$${prefix}/share/doc/ngircd-full \
|
||||
--with-syslog --with-zlib \
|
||||
--with-gnutls --with-iconv --with-ident --with-tcp-wrappers \
|
||||
--with-openssl --with-iconv --with-ident --with-tcp-wrappers \
|
||||
--with-pam \
|
||||
--enable-ipv6
|
||||
|
||||
@@ -65,14 +67,15 @@ configure-ngircd-full-dbg: configure
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc/ngircd \
|
||||
--mandir=\$${prefix}/share/man \
|
||||
--docdir=\$${prefix}/share/doc/ngircd-full-dbg \
|
||||
--enable-debug --enable-sniffer \
|
||||
--with-syslog --with-zlib \
|
||||
--with-gnutls --with-iconv --with-ident --with-tcp-wrappers \
|
||||
--with-openssl --with-iconv --with-ident --with-tcp-wrappers \
|
||||
--with-pam \
|
||||
--enable-ipv6
|
||||
|
||||
build:
|
||||
dh_clean -k
|
||||
dh_prep
|
||||
|
||||
build-ngircd: build-stamp-ngircd
|
||||
build-stamp-ngircd: configure-ngircd
|
||||
@@ -108,12 +111,15 @@ clean:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
rm -f build-stamp*
|
||||
rm -f $(CURDIR)/debian/ngircd.service
|
||||
rm -f $(CURDIR)/debian/ngircd-full.default
|
||||
rm -f $(CURDIR)/debian/ngircd-full.init
|
||||
rm -f $(CURDIR)/debian/ngircd-full.postinst
|
||||
rm -f $(CURDIR)/debian/ngircd-full.service
|
||||
rm -f $(CURDIR)/debian/ngircd-full-dbg.default
|
||||
rm -f $(CURDIR)/debian/ngircd-full-dbg.postinst
|
||||
rm -f $(CURDIR)/debian/ngircd-full-dbg.init
|
||||
rm -f $(CURDIR)/debian/ngircd-full-dbg.service
|
||||
|
||||
# Add here commands to clean up after the build process:
|
||||
[ ! -f Makefile ] || $(MAKE) distclean
|
||||
@@ -137,11 +143,9 @@ install-ngircd: build-ngircd
|
||||
$(MAKE) install DESTDIR=$(CURDIR)/debian/ngircd
|
||||
rm $(CURDIR)/debian/ngircd/usr/share/doc/ngircd/INSTALL*
|
||||
rm $(CURDIR)/debian/ngircd/usr/share/doc/ngircd/COPYING*
|
||||
mkdir -p $(CURDIR)/debian/ngircd/var/run/ircd
|
||||
cat $(CURDIR)/debian/ngircd/usr/share/doc/ngircd/sample-ngircd.conf | \
|
||||
sed -e "s|;ServerUID = 65534|ServerUID = irc|g" | \
|
||||
sed -e "s|;ServerGID = 65534|ServerGID = irc|g" | \
|
||||
sed -e "s|;MotdFile = /usr/local/etc/ngircd.motd|MotdFile = |/etc/ngircd/ngircd.motd|g" | \
|
||||
sed -e "s|;PidFile = /var/run/ngircd/ngircd.pid|PidFile = /var/run/ircd/ngircd.pid|g" \
|
||||
>$(CURDIR)/debian/ngircd/etc/ngircd/ngircd.conf
|
||||
touch $(CURDIR)/debian/ngircd/etc/ngircd/ngircd.motd
|
||||
@@ -153,16 +157,11 @@ install-ngircd-full: build-ngircd-full
|
||||
|
||||
# Add here commands to install the "full" package into debian/ngircd-full:
|
||||
$(MAKE) install DESTDIR=$(CURDIR)/debian/ngircd-full
|
||||
rm $(CURDIR)/debian/ngircd-full/usr/share/doc/ngircd/INSTALL*
|
||||
rm $(CURDIR)/debian/ngircd-full/usr/share/doc/ngircd/COPYING*
|
||||
mv $(CURDIR)/debian/ngircd-full/usr/share/doc/ngircd \
|
||||
$(CURDIR)/debian/ngircd-full/usr/share/doc/ngircd-full
|
||||
mkdir -p $(CURDIR)/debian/ngircd-full/var/run/ircd
|
||||
rm $(CURDIR)/debian/ngircd-full/usr/share/doc/ngircd-full/INSTALL*
|
||||
rm $(CURDIR)/debian/ngircd-full/usr/share/doc/ngircd-full/COPYING*
|
||||
cat $(CURDIR)/debian/ngircd-full/usr/share/doc/ngircd-full/sample-ngircd.conf | \
|
||||
sed -e "s|;ServerUID = 65534|ServerUID = irc|g" | \
|
||||
sed -e "s|;ServerGID = 65534|ServerGID = irc|g" | \
|
||||
sed -e "s|;MotdFile = /usr/local/etc/ngircd.motd|MotdFile = /etc/ngircd/ngircd.motd|g" | \
|
||||
sed -e "s|;HelpFile = /usr/share/doc/ngircd/Commands.txt|HelpFile = /usr/share/doc/ngircd-full/Commands.txt|g" | \
|
||||
sed -e "s|;PidFile = /var/run/ngircd/ngircd.pid|PidFile = /var/run/ircd/ngircd.pid|g" \
|
||||
>$(CURDIR)/debian/ngircd-full/etc/ngircd/ngircd.conf
|
||||
touch $(CURDIR)/debian/ngircd-full/etc/ngircd/ngircd.motd
|
||||
@@ -176,16 +175,11 @@ install-ngircd-full-dbg: build-ngircd-full-dbg
|
||||
|
||||
# Add here commands to install the "full" package into debian/ngircd-full:
|
||||
$(MAKE) install DESTDIR=$(CURDIR)/debian/ngircd-full-dbg
|
||||
rm $(CURDIR)/debian/ngircd-full-dbg/usr/share/doc/ngircd/INSTALL*
|
||||
rm $(CURDIR)/debian/ngircd-full-dbg/usr/share/doc/ngircd/COPYING*
|
||||
mv $(CURDIR)/debian/ngircd-full-dbg/usr/share/doc/ngircd \
|
||||
$(CURDIR)/debian/ngircd-full-dbg/usr/share/doc/ngircd-full-dbg
|
||||
mkdir -p $(CURDIR)/debian/ngircd-full-dbg/var/run/ircd
|
||||
rm $(CURDIR)/debian/ngircd-full-dbg/usr/share/doc/ngircd-full-dbg/INSTALL*
|
||||
rm $(CURDIR)/debian/ngircd-full-dbg/usr/share/doc/ngircd-full-dbg/COPYING*
|
||||
cat $(CURDIR)/debian/ngircd-full-dbg/usr/share/doc/ngircd-full-dbg/sample-ngircd.conf | \
|
||||
sed -e "s|;ServerUID = 65534|ServerUID = irc|g" | \
|
||||
sed -e "s|;ServerGID = 65534|ServerGID = irc|g" | \
|
||||
sed -e "s|;MotdFile = /usr/local/etc/ngircd.motd|MotdFile = /etc/ngircd/ngircd.motd|g" | \
|
||||
sed -e "s|;HelpFile = /usr/share/doc/ngircd/Commands.txt|HelpFile = /usr/share/doc/ngircd-full-dbg/Commands.txt|g" | \
|
||||
sed -e "s|;PidFile = /var/run/ngircd/ngircd.pid|PidFile = /var/run/ircd/ngircd.pid|g" \
|
||||
>$(CURDIR)/debian/ngircd-full-dbg/etc/ngircd/ngircd.conf
|
||||
touch $(CURDIR)/debian/ngircd-full-dbg/etc/ngircd/ngircd.motd
|
||||
@@ -198,12 +192,18 @@ binary-indep:
|
||||
|
||||
# Build architecture-dependent files here.
|
||||
binary-arch: build install
|
||||
ln -s $(CURDIR)/contrib/ngircd.service \
|
||||
$(CURDIR)/debian/ngircd.service
|
||||
|
||||
ln -s $(CURDIR)/debian/ngircd.default \
|
||||
$(CURDIR)/debian/ngircd-full.default
|
||||
ln -s $(CURDIR)/debian/ngircd.init \
|
||||
$(CURDIR)/debian/ngircd-full.init
|
||||
ln -s $(CURDIR)/debian/ngircd.postinst \
|
||||
$(CURDIR)/debian/ngircd-full.postinst
|
||||
cp $(CURDIR)/contrib/ngircd.service \
|
||||
$(CURDIR)/debian/ngircd-full.service
|
||||
echo "Alias=ngircd.service" >>$(CURDIR)/debian/ngircd-full.service
|
||||
|
||||
ln -s $(CURDIR)/debian/ngircd.default \
|
||||
$(CURDIR)/debian/ngircd-full-dbg.default
|
||||
@@ -211,12 +211,17 @@ binary-arch: build install
|
||||
$(CURDIR)/debian/ngircd-full-dbg.init
|
||||
ln -s $(CURDIR)/debian/ngircd.postinst \
|
||||
$(CURDIR)/debian/ngircd-full-dbg.postinst
|
||||
cp $(CURDIR)/contrib/ngircd.service \
|
||||
$(CURDIR)/debian/ngircd-full-dbg.service
|
||||
echo "Alias=ngircd.service" >>$(CURDIR)/debian/ngircd-full-dbg.service
|
||||
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_installchangelogs -a -A ChangeLog
|
||||
dh_installdocs -a
|
||||
dh_systemd_enable -a
|
||||
dh_installinit -a
|
||||
dh_systemd_start -a
|
||||
dh_strip -a --no-package=ngircd-full-dbg
|
||||
dh_compress -a -XCommands.txt
|
||||
dh_fixperms -a
|
||||
@@ -228,6 +233,6 @@ binary-arch: build install
|
||||
|
||||
binary: binary-indep binary-arch
|
||||
|
||||
.PHONY: build clean binary-indep binary-arch binary install
|
||||
.PHONY: build clean binary-indep binary-arch binary install
|
||||
|
||||
# -eof-
|
||||
|
1
contrib/Debian/source/format
Normal file
1
contrib/Debian/source/format
Normal file
@@ -0,0 +1 @@
|
||||
1.0
|
@@ -105,12 +105,16 @@
|
||||
#define HAVE_INET_ATON 1
|
||||
/* Define to 1 if you have the `getaddrinfo' function. */
|
||||
#define HAVE_GETADDRINFO 1
|
||||
/* getaddrinfo(0) */
|
||||
#define HAVE_WORKING_GETADDRINFO 1
|
||||
/* Define to 1 if you have the `getnameinfo' function. */
|
||||
#define HAVE_GETNAMEINFO 1
|
||||
/* Define to 1 if you have the `sigaction' function. */
|
||||
#define HAVE_SIGACTION 1
|
||||
/* Define to 1 if you have the `setsid' function. */
|
||||
#define HAVE_SETSID 1
|
||||
/* Define to 1 if you have the `strsignal' function. */
|
||||
#define HAVE_STRSIGNAL 1
|
||||
|
||||
/* Define if socklen_t exists */
|
||||
#define HAVE_socklen_t 1
|
||||
|
@@ -5,7 +5,7 @@
|
||||
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\qc\pardirnatural
|
||||
|
||||
\f0\i\fs24 \cf0 ngIRCd -- The Next Generation IRC Daemon\
|
||||
Copyright (c)2001-2013 Alexander Barton and Contributors.\
|
||||
Copyright (c)2001-2014 Alexander Barton and Contributors.\
|
||||
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural\pardirnatural
|
||||
|
||||
\i0 \cf0 \
|
||||
|
@@ -51,18 +51,6 @@
|
||||
FAE5CC2E0CF2308A007D69B6 /* numeric.c in Sources */ = {isa = PBXBuildFile; fileRef = FAE5CC2D0CF2308A007D69B6 /* numeric.c */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
8DD76FAF0486AB0100D96B5E /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 8;
|
||||
dstPath = /usr/share/man/man1/;
|
||||
dstSubfolderSpec = 0;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 1;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
FA18A63E16CEDDCE00132F66 /* configure.ng */ = {isa = PBXFileReference; lastKnownFileType = text; name = configure.ng; path = ../../configure.ng; sourceTree = "<group>"; };
|
||||
FA18A63F16CEDE2300132F66 /* ngircd.service */ = {isa = PBXFileReference; lastKnownFileType = text; path = ngircd.service; sourceTree = "<group>"; };
|
||||
@@ -84,7 +72,7 @@
|
||||
FA2D564811EA158B00D37A35 /* pam.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pam.h; sourceTree = "<group>"; };
|
||||
FA2D564911EA158B00D37A35 /* pam.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pam.c; sourceTree = "<group>"; };
|
||||
FA2D567A11EA1AB300D37A35 /* libpam.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libpam.dylib; path = usr/lib/libpam.dylib; sourceTree = SDKROOT; };
|
||||
FA322BBA0CEF72E4001761B3 /* ngIRCd */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; name = ngIRCd; path = ngircd; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
FA322BBA0CEF72E4001761B3 /* ngircd */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = ngircd; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
FA322CD60CEF74B1001761B3 /* Makefile.am */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = Makefile.am; sourceTree = "<group>"; };
|
||||
FA322CD90CEF74B1001761B3 /* array.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = array.c; sourceTree = "<group>"; };
|
||||
FA322CDA0CEF74B1001761B3 /* array.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = array.h; sourceTree = "<group>"; };
|
||||
@@ -138,8 +126,6 @@
|
||||
FA322D0D0CEF74B1001761B3 /* resolve.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = resolve.h; sourceTree = "<group>"; };
|
||||
FA322D100CEF74B1001761B3 /* ansi2knr.1 */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.man; path = ansi2knr.1; sourceTree = "<group>"; };
|
||||
FA322D110CEF74B1001761B3 /* ansi2knr.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = ansi2knr.c; sourceTree = "<group>"; };
|
||||
FA322D120CEF74B1001761B3 /* exp.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = exp.h; sourceTree = "<group>"; };
|
||||
FA322D130CEF74B1001761B3 /* imp.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = imp.h; sourceTree = "<group>"; };
|
||||
FA322D150CEF74B1001761B3 /* portab.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = portab.h; sourceTree = "<group>"; };
|
||||
FA322D160CEF74B1001761B3 /* portabtest.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = portabtest.c; sourceTree = "<group>"; };
|
||||
FA322D170CEF74B1001761B3 /* splint.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = splint.h; sourceTree = "<group>"; };
|
||||
@@ -168,10 +154,10 @@
|
||||
FA322D5E0CEF750F001761B3 /* config.guess */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.script.sh; name = config.guess; path = ../../config.guess; sourceTree = SOURCE_ROOT; };
|
||||
FA322D5F0CEF750F001761B3 /* config.sub */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.script.sh; name = config.sub; path = ../../config.sub; sourceTree = SOURCE_ROOT; };
|
||||
FA322D610CEF750F001761B3 /* COPYING */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; name = COPYING; path = ../../COPYING; sourceTree = SOURCE_ROOT; };
|
||||
FA322D620CEF750F001761B3 /* INSTALL */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; name = INSTALL; path = ../../INSTALL; sourceTree = SOURCE_ROOT; };
|
||||
FA322D620CEF750F001761B3 /* INSTALL.md */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = net.daringfireball.markdown; name = INSTALL.md; path = ../../INSTALL.md; sourceTree = SOURCE_ROOT; };
|
||||
FA322D630CEF750F001761B3 /* Makefile.am */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; name = Makefile.am; path = ../../Makefile.am; sourceTree = SOURCE_ROOT; };
|
||||
FA322D640CEF750F001761B3 /* NEWS */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; name = NEWS; path = ../../NEWS; sourceTree = SOURCE_ROOT; };
|
||||
FA322D650CEF750F001761B3 /* README */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; name = README; path = ../../README; sourceTree = SOURCE_ROOT; };
|
||||
FA322D650CEF750F001761B3 /* README.md */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../../README.md; sourceTree = SOURCE_ROOT; };
|
||||
FA322D6A0CEF7523001761B3 /* changelog */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = changelog; sourceTree = "<group>"; };
|
||||
FA322D6B0CEF7523001761B3 /* compat */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = compat; sourceTree = "<group>"; };
|
||||
FA322D6C0CEF7523001761B3 /* control */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = control; sourceTree = "<group>"; };
|
||||
@@ -181,12 +167,10 @@
|
||||
FA322D700CEF7523001761B3 /* ngircd.init */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.script.sh; path = ngircd.init; sourceTree = "<group>"; };
|
||||
FA322D710CEF7523001761B3 /* ngircd.postinst */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.script.sh; path = ngircd.postinst; sourceTree = "<group>"; };
|
||||
FA322D720CEF7523001761B3 /* rules */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = rules; sourceTree = "<group>"; };
|
||||
FA322D8D0CEF7523001761B3 /* Makefile.am */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; name = Makefile.am; path = MacOSX/Makefile.am; sourceTree = "<group>"; };
|
||||
FA322D8E0CEF7523001761B3 /* ngIRCd.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = ngIRCd.xcodeproj; sourceTree = "<group>"; };
|
||||
FA322D920CEF7523001761B3 /* ngindent */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = ngindent; sourceTree = "<group>"; };
|
||||
FA322D920CEF7523001761B3 /* ngindent.sh */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.script.sh; path = ngindent.sh; sourceTree = "<group>"; };
|
||||
FA322D940CEF7523001761B3 /* ngircd.spec */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = ngircd.spec; sourceTree = "<group>"; };
|
||||
FA322D950CEF7523001761B3 /* README */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = README; sourceTree = "<group>"; };
|
||||
FA322D960CEF7523001761B3 /* systrace.policy */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = systrace.policy; sourceTree = "<group>"; };
|
||||
FA322D9A0CEF752C001761B3 /* FAQ.txt */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = FAQ.txt; sourceTree = "<group>"; };
|
||||
FA322D9B0CEF752C001761B3 /* Makefile.am */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = Makefile.am; sourceTree = "<group>"; };
|
||||
FA322D9C0CEF752C001761B3 /* Platforms.txt */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = Platforms.txt; sourceTree = "<group>"; };
|
||||
@@ -205,11 +189,12 @@
|
||||
FA322DC00CEF77CB001761B3 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = /usr/lib/libz.dylib; sourceTree = "<absolute>"; };
|
||||
FA407F2C0DB159F400271AF1 /* ng_ipaddr.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; name = ng_ipaddr.c; path = ipaddr/ng_ipaddr.c; sourceTree = "<group>"; };
|
||||
FA407F2D0DB159F400271AF1 /* ng_ipaddr.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; name = ng_ipaddr.h; path = ipaddr/ng_ipaddr.h; sourceTree = "<group>"; };
|
||||
FA407F380DB15AC700271AF1 /* GIT.txt */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = GIT.txt; sourceTree = "<group>"; };
|
||||
FA4B08E513E7F8FB00765BA3 /* ngircd-bsd.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "ngircd-bsd.sh"; sourceTree = "<group>"; };
|
||||
FA4B08E613E7F91700765BA3 /* ngIRCd-Logo.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = "ngIRCd-Logo.gif"; sourceTree = "<group>"; };
|
||||
FA4B08E713E7F91700765BA3 /* ngircd-redhat.init */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "ngircd-redhat.init"; sourceTree = "<group>"; };
|
||||
FA4B08E813E7F91C00765BA3 /* platformtest.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = platformtest.sh; sourceTree = "<group>"; };
|
||||
FA4B4F542055B47C00A04296 /* ngircd.logcheck */ = {isa = PBXFileReference; lastKnownFileType = text; path = ngircd.logcheck; sourceTree = "<group>"; };
|
||||
FA4B4F552055B4C800A04296 /* source */ = {isa = PBXFileReference; lastKnownFileType = folder; path = source; sourceTree = "<group>"; };
|
||||
FA4F1659164836B100DBD011 /* irc-metadata.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "irc-metadata.c"; sourceTree = "<group>"; };
|
||||
FA4F165C164836BF00DBD011 /* irc-metadata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "irc-metadata.h"; sourceTree = "<group>"; };
|
||||
FA6BBC5F1605F0AB0004247A /* conn-encoding.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "conn-encoding.c"; sourceTree = "<group>"; };
|
||||
@@ -218,6 +203,8 @@
|
||||
FA6BBC621605F0AC0004247A /* irc-encoding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "irc-encoding.h"; sourceTree = "<group>"; };
|
||||
FA6BBC651605F6D60004247A /* libiconv.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libiconv.dylib; path = ../../../../../../../usr/lib/libiconv.dylib; sourceTree = "<group>"; };
|
||||
FA77849A133FB9FF00740057 /* sample-ngircd.conf.tmpl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "sample-ngircd.conf.tmpl"; sourceTree = "<group>"; };
|
||||
FA7E9FEE242FFC4500A04296 /* server-link-test.e */ = {isa = PBXFileReference; lastKnownFileType = text; path = "server-link-test.e"; sourceTree = "<group>"; };
|
||||
FA7E9FF0242FFC6C00A04296 /* server-login-test.e */ = {isa = PBXFileReference; lastKnownFileType = text; path = "server-login-test.e"; sourceTree = "<group>"; };
|
||||
FA85178A0FA061EC006A1F5A /* op.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = op.h; sourceTree = "<group>"; };
|
||||
FA85178B0FA061EC006A1F5A /* op.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = op.c; sourceTree = "<group>"; };
|
||||
FA99428A10E82A27007F27ED /* proc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = proc.h; sourceTree = "<group>"; };
|
||||
@@ -246,8 +233,10 @@
|
||||
FAA3D28B0F139D2E00B2447E /* preinstall.sh */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.script.sh; path = preinstall.sh; sourceTree = "<group>"; };
|
||||
FAA97C55124A271400D5BBA9 /* sighandlers.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = sighandlers.c; sourceTree = "<group>"; };
|
||||
FAA97C56124A271400D5BBA9 /* sighandlers.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = sighandlers.h; sourceTree = "<group>"; };
|
||||
FAA9C8162377186900A04296 /* nglog.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = nglog.sh; sourceTree = "<group>"; };
|
||||
FAACD5F314A6099C006ED74F /* class.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = class.c; sourceTree = "<group>"; };
|
||||
FAACD5F414A6099C006ED74F /* class.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = class.h; sourceTree = "<group>"; };
|
||||
FAC4E5CD23A7DE2400A04296 /* Makefile.am */ = {isa = PBXFileReference; lastKnownFileType = text; path = Makefile.am; sourceTree = "<group>"; };
|
||||
FAD5852F15271A7800328741 /* Capabilities.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = Capabilities.txt; sourceTree = "<group>"; };
|
||||
FAD5853015271AAB00328741 /* client-cap.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "client-cap.c"; sourceTree = "<group>"; };
|
||||
FAD5853115271AAB00328741 /* client-cap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "client-cap.h"; sourceTree = "<group>"; };
|
||||
@@ -290,9 +279,9 @@
|
||||
FA322D5A0CEF750F001761B3 /* AUTHORS */,
|
||||
FA322D5C0CEF750F001761B3 /* ChangeLog */,
|
||||
FA322D610CEF750F001761B3 /* COPYING */,
|
||||
FA322D620CEF750F001761B3 /* INSTALL */,
|
||||
FA322D620CEF750F001761B3 /* INSTALL.md */,
|
||||
FA322D640CEF750F001761B3 /* NEWS */,
|
||||
FA322D650CEF750F001761B3 /* README */,
|
||||
FA322D650CEF750F001761B3 /* README.md */,
|
||||
FA322D5B0CEF750F001761B3 /* autogen.sh */,
|
||||
FA322D5E0CEF750F001761B3 /* config.guess */,
|
||||
FA322D5F0CEF750F001761B3 /* config.sub */,
|
||||
@@ -312,7 +301,7 @@
|
||||
1AB674ADFE9D54B511CA2CBB /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
FA322BBA0CEF72E4001761B3 /* ngIRCd */,
|
||||
FA322BBA0CEF72E4001761B3 /* ngircd */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
@@ -423,8 +412,6 @@
|
||||
FA18A64716CEE14900132F66 /* Makefile.ng */,
|
||||
FA322D100CEF74B1001761B3 /* ansi2knr.1 */,
|
||||
FA322D110CEF74B1001761B3 /* ansi2knr.c */,
|
||||
FA322D120CEF74B1001761B3 /* exp.h */,
|
||||
FA322D130CEF74B1001761B3 /* imp.h */,
|
||||
FA322D150CEF74B1001761B3 /* portab.h */,
|
||||
FA322D160CEF74B1001761B3 /* portabtest.c */,
|
||||
FA322D170CEF74B1001761B3 /* splint.h */,
|
||||
@@ -441,32 +428,34 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
FA18A64A16CEE18100132F66 /* Makefile.ng */,
|
||||
FA322D250CEF74B1001761B3 /* README */,
|
||||
FA322D1D0CEF74B1001761B3 /* channel-test.e */,
|
||||
FA322D1E0CEF74B1001761B3 /* check-idle.e */,
|
||||
FA322D1F0CEF74B1001761B3 /* connect-test.e */,
|
||||
FA322D200CEF74B1001761B3 /* functions.inc */,
|
||||
FA322D210CEF74B1001761B3 /* getpid.sh */,
|
||||
FAA3D2700F139CB300B2447E /* invite-test.e */,
|
||||
FAA3D2710F139CB300B2447E /* join-test.e */,
|
||||
FAA3D2720F139CB300B2447E /* kick-test.e */,
|
||||
FAA3D2730F139CB300B2447E /* message-test.e */,
|
||||
FA18A64E16CEE24B00132F66 /* misc-test.e */,
|
||||
FA18A64C16CEE1AC00132F66 /* mode-test.e */,
|
||||
FAA3D2760F139CB300B2447E /* opless-channel-test.e */,
|
||||
FAA3D2770F139CB300B2447E /* server-link-test.e */,
|
||||
FA322D280CEF74B1001761B3 /* stress-A.e */,
|
||||
FA322D290CEF74B1001761B3 /* stress-B.e */,
|
||||
FA1A6BBD0D6857D900AA8F71 /* who-test.e */,
|
||||
FA18A64D16CEE1D900132F66 /* whois-test.e */,
|
||||
FA322D200CEF74B1001761B3 /* functions.inc */,
|
||||
FAA3D2740F139CB300B2447E /* ngircd-test1.conf */,
|
||||
FAA3D2750F139CB300B2447E /* ngircd-test2.conf */,
|
||||
FA322D210CEF74B1001761B3 /* getpid.sh */,
|
||||
FAA3D2760F139CB300B2447E /* opless-channel-test.e */,
|
||||
FA322D250CEF74B1001761B3 /* README */,
|
||||
FAA3D2770F139CB300B2447E /* server-link-test.e */,
|
||||
FA322D260CEF74B1001761B3 /* start-server.sh */,
|
||||
FA322D270CEF74B1001761B3 /* stop-server.sh */,
|
||||
FA322D280CEF74B1001761B3 /* stress-A.e */,
|
||||
FA322D290CEF74B1001761B3 /* stress-B.e */,
|
||||
FA7E9FEE242FFC4500A04296 /* server-link-test.e */,
|
||||
FA7E9FF0242FFC6C00A04296 /* server-login-test.e */,
|
||||
FA322D2A0CEF74B1001761B3 /* stress-server.sh */,
|
||||
FA322D2B0CEF74B1001761B3 /* test-loop.sh */,
|
||||
FA322D2C0CEF74B1001761B3 /* tests.sh */,
|
||||
FA322D2D0CEF74B1001761B3 /* wait-tests.sh */,
|
||||
FA1A6BBD0D6857D900AA8F71 /* who-test.e */,
|
||||
FA18A64D16CEE1D900132F66 /* whois-test.e */,
|
||||
);
|
||||
path = testsuite;
|
||||
sourceTree = "<group>";
|
||||
@@ -484,19 +473,20 @@
|
||||
FA322D660CEF7523001761B3 /* contrib */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
FA322D8D0CEF7523001761B3 /* Makefile.am */,
|
||||
FAC4E5CD23A7DE2400A04296 /* Makefile.am */,
|
||||
FA322D680CEF7523001761B3 /* Debian */,
|
||||
FA322D730CEF7523001761B3 /* MacOSX */,
|
||||
FA322D950CEF7523001761B3 /* README */,
|
||||
FA322D920CEF7523001761B3 /* ngindent */,
|
||||
FA322D920CEF7523001761B3 /* ngindent.sh */,
|
||||
FA4B08E513E7F8FB00765BA3 /* ngircd-bsd.sh */,
|
||||
FA4B08E613E7F91700765BA3 /* ngIRCd-Logo.gif */,
|
||||
FA4B08E713E7F91700765BA3 /* ngircd-redhat.init */,
|
||||
FA4B4F542055B47C00A04296 /* ngircd.logcheck */,
|
||||
FA18A63F16CEDE2300132F66 /* ngircd.service */,
|
||||
FA18A64016CEDE2300132F66 /* ngircd.socket */,
|
||||
FA322D940CEF7523001761B3 /* ngircd.spec */,
|
||||
FAA9C8162377186900A04296 /* nglog.sh */,
|
||||
FA4B08E813E7F91C00765BA3 /* platformtest.sh */,
|
||||
FA322D960CEF7523001761B3 /* systrace.policy */,
|
||||
);
|
||||
name = contrib;
|
||||
path = ..;
|
||||
@@ -515,6 +505,7 @@
|
||||
FA18A64116CEDE3500132F66 /* ngircd.pam */,
|
||||
FA322D710CEF7523001761B3 /* ngircd.postinst */,
|
||||
FA322D720CEF7523001761B3 /* rules */,
|
||||
FA4B4F552055B4C800A04296 /* source */,
|
||||
);
|
||||
path = Debian;
|
||||
sourceTree = "<group>";
|
||||
@@ -550,7 +541,6 @@
|
||||
FA18A64416CEDFCE00132F66 /* Commands.txt */,
|
||||
FAE22BD415270EA300F1A5AB /* Contributing.txt */,
|
||||
FA322D9A0CEF752C001761B3 /* FAQ.txt */,
|
||||
FA407F380DB15AC700271AF1 /* GIT.txt */,
|
||||
FAE22BD515270EB500F1A5AB /* HowToRelease.txt */,
|
||||
FAE22BD615270EB500F1A5AB /* Modes.txt */,
|
||||
FAE22BD715270EB500F1A5AB /* PAM.txt */,
|
||||
@@ -621,7 +611,6 @@
|
||||
buildPhases = (
|
||||
8DD76FAB0486AB0100D96B5E /* Sources */,
|
||||
8DD76FAD0486AB0100D96B5E /* Frameworks */,
|
||||
8DD76FAF0486AB0100D96B5E /* CopyFiles */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@@ -630,7 +619,7 @@
|
||||
name = ngIRCd;
|
||||
productInstallPath = "$(HOME)/bin";
|
||||
productName = ngIRCd;
|
||||
productReference = FA322BBA0CEF72E4001761B3 /* ngIRCd */;
|
||||
productReference = FA322BBA0CEF72E4001761B3 /* ngircd */;
|
||||
productType = "com.apple.product-type.tool";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
@@ -639,17 +628,16 @@
|
||||
08FB7793FE84155DC02AAC07 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0430;
|
||||
LastUpgradeCheck = 1140;
|
||||
ORGANIZATIONNAME = "ngIRCd Development Team";
|
||||
};
|
||||
buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "ngIRCd" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 1;
|
||||
knownRegions = (
|
||||
English,
|
||||
Japanese,
|
||||
French,
|
||||
German,
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = 08FB7794FE84155DC02AAC07 /* ngIRCd */;
|
||||
projectDirPath = "";
|
||||
@@ -719,82 +707,102 @@
|
||||
1DEB928708733DD80010E9CD /* Default */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
|
||||
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
|
||||
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
|
||||
GCC_WARN_CHECK_SWITCH_STATEMENTS = YES;
|
||||
GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES;
|
||||
GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES;
|
||||
GCC_WARN_MISSING_PARENTHESES = YES;
|
||||
GCC_WARN_PEDANTIC = YES;
|
||||
GCC_WARN_SHADOW = YES;
|
||||
GCC_WARN_SIGN_COMPARE = YES;
|
||||
GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNKNOWN_PRAGMAS = YES;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_LABEL = YES;
|
||||
GCC_WARN_UNUSED_PARAMETER = YES;
|
||||
GCC_WARN_UNUSED_VALUE = YES;
|
||||
INSTALL_PATH = /usr/local/bin;
|
||||
PRODUCT_NAME = ngircd;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
};
|
||||
name = Default;
|
||||
};
|
||||
1DEB928B08733DD80010E9CD /* Default */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
GCC_VERSION = "";
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_WARN_ASSIGN_ENUM = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_SEMICOLON_BEFORE_METHOD_BODY = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES;
|
||||
GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
|
||||
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES;
|
||||
GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES;
|
||||
GCC_WARN_PEDANTIC = YES;
|
||||
GCC_WARN_SHADOW = YES;
|
||||
GCC_WARN_SIGN_COMPARE = YES;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_LABEL = YES;
|
||||
GCC_WARN_UNUSED_PARAMETER = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
||||
SDKROOT = "";
|
||||
PRODUCT_NAME = ngircd;
|
||||
};
|
||||
name = Default;
|
||||
};
|
||||
FAB0570C105D917F006AF9E2 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
||||
GCC_DEBUGGING_SYMBOLS = full;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_VERSION = "";
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_WARN_ASSIGN_ENUM = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_SEMICOLON_BEFORE_METHOD_BODY = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES;
|
||||
GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
|
||||
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES;
|
||||
GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES;
|
||||
GCC_WARN_PEDANTIC = YES;
|
||||
GCC_WARN_SHADOW = YES;
|
||||
GCC_WARN_SIGN_COMPARE = YES;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_LABEL = YES;
|
||||
GCC_WARN_UNUSED_PARAMETER = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
PRODUCT_NAME = ngircd;
|
||||
SDKROOT = "";
|
||||
STRIP_INSTALLED_PRODUCT = NO;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
FAB0570D105D917F006AF9E2 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
|
||||
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
|
||||
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
|
||||
GCC_WARN_CHECK_SWITCH_STATEMENTS = YES;
|
||||
GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES;
|
||||
GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES;
|
||||
GCC_WARN_MISSING_PARENTHESES = YES;
|
||||
GCC_WARN_PEDANTIC = YES;
|
||||
GCC_WARN_SHADOW = YES;
|
||||
GCC_WARN_SIGN_COMPARE = YES;
|
||||
GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = NO;
|
||||
GCC_WARN_UNKNOWN_PRAGMAS = YES;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_LABEL = YES;
|
||||
GCC_WARN_UNUSED_PARAMETER = YES;
|
||||
GCC_WARN_UNUSED_VALUE = YES;
|
||||
INSTALL_PATH = /usr/local/bin;
|
||||
PRODUCT_NAME = ngircd;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#
|
||||
# ngIRCd -- The Next Generation IRC Daemon
|
||||
# Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors
|
||||
# Copyright (c)2001-2020 Alexander Barton (alex@barton.de) and Contributors
|
||||
#
|
||||
# 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
|
||||
@@ -12,15 +12,16 @@
|
||||
SUBDIRS = Debian MacOSX
|
||||
|
||||
EXTRA_DIST = README \
|
||||
ngindent \
|
||||
ngindent.sh \
|
||||
ngircd-bsd.sh \
|
||||
ngIRCd-Logo.gif \
|
||||
ngircd-redhat.init \
|
||||
ngircd.logcheck \
|
||||
ngircd.service \
|
||||
ngircd.socket \
|
||||
ngircd.spec \
|
||||
platformtest.sh \
|
||||
systrace.policy
|
||||
nglog.sh \
|
||||
platformtest.sh
|
||||
|
||||
maintainer-clean-local:
|
||||
rm -f Makefile Makefile.in
|
||||
|
@@ -2,7 +2,7 @@
|
||||
ngIRCd - Next Generation IRC Server
|
||||
http://ngircd.barton.de/
|
||||
|
||||
(c)2001-2013 Alexander Barton and Contributors.
|
||||
(c)2001-2020 Alexander Barton and Contributors.
|
||||
ngIRCd is free software and published under the
|
||||
terms of the GNU General Public License.
|
||||
|
||||
@@ -12,13 +12,13 @@
|
||||
Debian/
|
||||
- Various files for building Debian GNU/Linux packages (".deb's").
|
||||
- ngircd.init; ngircd.default: init script for Debian-based systems.
|
||||
- ngircd.pam: example PAM configuraton.
|
||||
- ngircd.pam: example PAM configuration.
|
||||
|
||||
MacOSX/
|
||||
- Project files for XCode, the "project builder" of Apple Mac OS X.
|
||||
- de.barton.ngircd.plist[.tmpl]: launchd(8) property list.
|
||||
|
||||
ngindent
|
||||
ngindent.sh
|
||||
- Script to indent the code of ngIRCd in the "standard way".
|
||||
|
||||
ngircd-bsd.sh
|
||||
@@ -27,6 +27,9 @@ ngircd-bsd.sh
|
||||
ngircd-redhat.init
|
||||
- Start/stop script for RedHat-based distributions (like CentOS).
|
||||
|
||||
ngircd.logcheck
|
||||
- Sample rules for logcheck(8) to ignore "normal" log messages of ngIRCd.
|
||||
|
||||
ngircd.service
|
||||
- systemd(8) service unit configuration file.
|
||||
|
||||
@@ -36,8 +39,8 @@ ngircd.socket
|
||||
ngircd.spec
|
||||
- RPM "spec" file.
|
||||
|
||||
nglog.sh
|
||||
- Colorizes the log messages of ngircd(8) accoring to their log level.
|
||||
|
||||
platformtest.sh
|
||||
- Build ngIRCd and output a "result line" suitable for doc/Platforms.txt.
|
||||
|
||||
systrace.policy
|
||||
- Systrace policy file for OpenBSD (and probably NetBSD).
|
||||
|
@@ -1,17 +0,0 @@
|
||||
#/bin/sh
|
||||
|
||||
INDENTARGS="-kr -i8 -ts8 -l80 -c3 -cd41 -ss -ncs -psl"
|
||||
|
||||
# check if indent(1) is available
|
||||
type indent >/dev/null 2>&1 && INDENT="indent"
|
||||
type gindent >/dev/null 2>&1 && INDENT="gindent"
|
||||
type gnuindent >/dev/null 2>&1 && INDENT="gnuindent"
|
||||
|
||||
if [ -z "$INDENT" ]; then
|
||||
echo "Error: GNU \"indent\" not found!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
$INDENT -v $INDENTARGS $*
|
||||
|
||||
# -eof-
|
46
contrib/ngindent.sh
Executable file
46
contrib/ngindent.sh
Executable file
@@ -0,0 +1,46 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# ngIRCd -- The Next Generation IRC Daemon
|
||||
# Copyright (c)2001-2019 Alexander Barton (alex@barton.de) and Contributors
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# This script uses GNU indent(1) to format C source code files of ngIRCd.
|
||||
# Usage:
|
||||
# - ./contrib/ngindent.sh [<file> [<file> [...]]]
|
||||
# - cat ./src/ngircd/<c_file> | ./contrib/ngindent.sh
|
||||
|
||||
# Use a coding-style based on "Kernighan & Ritchie" (-kr):
|
||||
INDENTARGS="-kr
|
||||
-bad
|
||||
-c3
|
||||
-cd41
|
||||
-i8
|
||||
-l80
|
||||
-ncs
|
||||
-psl
|
||||
-sob
|
||||
-ss
|
||||
-ts8
|
||||
-blf
|
||||
-il0
|
||||
"
|
||||
|
||||
# check if indent(1) is available
|
||||
command -v indent >/dev/null 2>&1 && INDENT="indent"
|
||||
command -v gindent >/dev/null 2>&1 && INDENT="gindent"
|
||||
command -v gnuindent >/dev/null 2>&1 && INDENT="gnuindent"
|
||||
|
||||
if [ -z "$INDENT" ]; then
|
||||
echo "Error: GNU \"indent\" not found!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
$INDENT -v $INDENTARGS "$@"
|
||||
|
||||
# -eof-
|
0
contrib/ngircd-bsd.sh
Normal file → Executable file
0
contrib/ngircd-bsd.sh
Normal file → Executable file
0
contrib/ngircd-redhat.init
Normal file → Executable file
0
contrib/ngircd-redhat.init
Normal file → Executable file
61
contrib/ngircd.logcheck
Normal file
61
contrib/ngircd.logcheck
Normal file
@@ -0,0 +1,61 @@
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Accepted connection [0-9]+ from ".*:[0-9]+" on socket [0-9]+\.$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Can't resolve address ".*": Name or service not known \[.*\]\.$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Can't resolve ".*": host not found$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Can't resolve ".*": Name or service not known$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Can't resolve ".*": No address associated with hostname$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Client unregistered \(connection [0-9]+\): Can't connect\.$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Client unregistered \(connection [0-9]+\): Client closed connection\.$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Client unregistered \(connection [0-9]+\): Got QUIT command\.$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Client unregistered \(connection [0-9]+\): Read error\.$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Client unregistered \(connection [0-9]+\): SSL accept error, closing socket\.$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Client ".*" unregistered (connection [0-9]+): Timeout\.$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Client unregistered \(connection [0-9]+\): Timeout\.$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Client unregistered \(connection [0-9]+\): Write error\.$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Connection [0-9]+: initialized SSL3\.0 using cipher .*\.$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Connection [0-9]+: initialized TLS1\.[012] using cipher .*\.$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Connection [0-9]+: initialized TLSv1\.[012] using cipher .*\.$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Connection [0-9]+: initialized TLSv1 using cipher .*\.$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Connection [0-9]+ \(socket [0-9]+\) with ".*:[0-9]+" established\. Now logging in \.\.\.$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Connection [0-9]+ with ".*:[0-9]+" closed \(in: .*, out: .*\)\.$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Enabled link compression \(zlib\) on connection [0-9]+\.$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Establishing connection for ".*" to ".*:[0-9]+" \(.*\), socket [0-9]+ \.\.\.$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: IDENT lookup for connection [0-9]+: ".*"\.$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: IDENT lookup for connection [0-9]+: no result\.$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Now listening on .*:[0-9]+ \(socket [0-9]+\)\.$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: OpenSSL .* initialized\.$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Possible forgery: .* resolved to ".*", which has no IP address!$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Preparing to establish a new server link for ".*" \.\.\.$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Read error on connection [0-9]+ \(socket [0-9]+\): Connection reset by peer!$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Server ".*" registered \(via .*, connected to .*, [0-9]+ hops\)\.$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Server ".*" unregistered: .* .*\.$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Server ".*" unregistered: ".*" \(SQUIT from .*\)\.$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Shutting down all listening sockets \([0-9]+ total\) \.\.\.$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Shutting down connection [0-9]+ \(Can't connect\) with ".*:[0-9]+" \.\.\.$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Shutting down connection [0-9]+ \(Client closed connection\) with ".*:[0-9]+" \.\.\.$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Shutting down connection [0-9]+ \(Got QUIT command\) with ".*:[0-9]+" \.\.\.$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Shutting down connection [0-9]+ \(Ping timeout: [0-9]+ seconds\) with ".*:[0-9]+" \.\.\.$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Shutting down connection [0-9]+ \(Read error\) with ".*:[0-9]+" \.\.\.$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Shutting down connection [0-9]+ \(Server going down\) with ".*:[0-9]+" \.\.\.$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Shutting down connection [0-9]+ \(SSL accept error, closing socket\) with ".*:[0-9]+" \.\.\.$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Shutting down connection [0-9]+ \(Timeout\) with ".*:[0-9]+" \.\.\.$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Shutting down connection [0-9]+ \(Write error\) with ".*:[0-9]+" \.\.\.$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: SSL connection [0-9]+ shutting down \.\.\.$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: SSL connection [0-9]+ with ".*:[0-9]+" established\.$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: SSL connection on socket [0-9]+ failed!$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: SSL error: A TLS packet with unexpected length was received\. \[ConnSSL_Read\]\.$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: SSL error: A TLS packet with unexpected length was received\. \[gnutls_handshake\]\.$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: SSL error: Broken pipe \[in ConnSSL_Write\(\)\]!$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: SSL error: Connection reset by peer \[in ConnSSL_Read\(\)\]!$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: SSL error: Connection reset by peer \[in SSL_connect\(\)\]!$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: SSL protocol error: SSL_accept \(.*\)$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: User ".*!.*@.*" changed nick \(connection [0-9]+\): ".*" -> ".*"\.$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: User ".*!.*@.*" registered \(connection [0-9]+\)\.$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: User ".*!.*@.*" unregistered \(connection [0-9]+\): Client closed connection\.$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: User ".*!.*@.*" unregistered \(connection [0-9]+\): Got QUIT command\.$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: User ".*!.*@.*" unregistered \(connection [0-9]+\): Ping timeout: [0-9]+ seconds\.$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: User ".*!.*@.*" unregistered \(connection [0-9]+\): Read error\.$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: User ".*!.*@.*" unregistered \(connection [0-9]+\): Server going down\.$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: warning: can't get client address: Connection reset by peer$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: warning: /etc/hosts\.allow, line [0-9]+: can't verify hostname: getaddrinfo\(.*, AF_INET\) failed$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Write error on connection [0-9]+ \(socket [0-9]+\): Broken pipe!$
|
||||
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ ngircd\[[0-9]+\]: Write error on connection [0-9]+ \(socket [0-9]+\): Connection reset by peer!$
|
@@ -1,11 +1,43 @@
|
||||
# ngIRCd systemd service unit.
|
||||
# See systemd(1), systemd.unit(5), systemd.service(5), systemd.exec(5).
|
||||
|
||||
[Unit]
|
||||
Description=Next Generation IRC Daemon
|
||||
Documentation=man:ngircd(8) man:ngircd.conf(5) https://ngircd.barton.de
|
||||
After=network.target
|
||||
Wants=anope.service atheme.service irc-services.service
|
||||
Wants=bopm.service
|
||||
Before=anope.service atheme.service irc-services.service
|
||||
Before=bopm.service
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=/usr/sbin/ngircd
|
||||
User=irc
|
||||
Group=irc
|
||||
# Settings & limits:
|
||||
CapabilityBoundingSet=CAP_SYS_CHROOT CAP_NET_BIND_SERVICE
|
||||
MemoryDenyWriteExecute=yes
|
||||
NoNewPrivileges=yes
|
||||
PrivateDevices=yes
|
||||
PrivateTmp=yes
|
||||
ProtectControlGroups=yes
|
||||
ProtectHome=yes
|
||||
ProtectKernelModules=yes
|
||||
ProtectKernelTunables=yes
|
||||
ProtectSystem=full
|
||||
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
|
||||
RestrictRealtime=yes
|
||||
RuntimeDirectory=ircd
|
||||
RuntimeDirectoryMode=750
|
||||
# Try to load "default files" from any Debian package variant to keep this
|
||||
# unit generic.
|
||||
EnvironmentFile=-/etc/default/ngircd
|
||||
EnvironmentFile=-/etc/default/ngircd-full
|
||||
EnvironmentFile=-/etc/default/ngircd-full-dbg
|
||||
# Start ngIRCd. Note: systemd doesn't allow to use $DAEMON here!
|
||||
ExecStart=/usr/sbin/ngircd $PARAMS
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
@@ -1,5 +1,6 @@
|
||||
[Unit]
|
||||
Description=Next Generation IRC Daemon (Socket)
|
||||
Documentation=man:ngircd(8) man:ngircd.conf(5)
|
||||
|
||||
[Socket]
|
||||
BindIPv6Only=ipv6-only
|
||||
|
@@ -1,5 +1,5 @@
|
||||
%define name ngircd
|
||||
%define version 21
|
||||
%define version 26~rc1
|
||||
%define release 1
|
||||
%define prefix %{_prefix}
|
||||
|
||||
@@ -27,7 +27,7 @@ Advantages:
|
||||
- supports IPv6 and SSL
|
||||
- no problems with servers that have dynamic IP addresses
|
||||
- freely available, modern, portable and tidy C-source
|
||||
- ngIRCd is being actively developed since 11 years.
|
||||
- ngIRCd is being actively developed since 2001
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
28
contrib/nglog.sh
Executable file
28
contrib/nglog.sh
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# ngIRCd -- The Next Generation IRC Daemon
|
||||
# Copyright (c)2001-2020 Alexander Barton (alex@barton.de) and Contributors
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# This script parses the log output of ngircd(8), and colorizes the messages
|
||||
# accoring to their log level. Example usage:
|
||||
# ./src/ngircd/ngircd -f $PWD/doc/sample-ngircd.conf -np | ./contrib/nglog.sh
|
||||
#
|
||||
|
||||
gawk '
|
||||
/^\[[[:digit:]]+:0 / {print "\033[1;95m" $0 "\033[0m"}
|
||||
/^\[[[:digit:]]+:1 / {print "\033[1;35m" $0 "\033[0m"}
|
||||
/^\[[[:digit:]]+:2 / {print "\033[1;91m" $0 "\033[0m"}
|
||||
/^\[[[:digit:]]+:3 / {print "\033[1;31m" $0 "\033[0m"}
|
||||
/^\[[[:digit:]]+:4 / {print "\033[1;33m" $0 "\033[0m"}
|
||||
/^\[[[:digit:]]+:5 / {print "\033[1m" $0 "\033[0m"}
|
||||
/^\[[[:digit:]]+:6 / {print $0}
|
||||
/^\[[[:digit:]]+:7 / {print "\033[90m" $0 "\033[0m"}
|
||||
' </dev/stdin &
|
||||
|
||||
wait
|
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# ngIRCd -- The Next Generation IRC Daemon
|
||||
# Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors
|
||||
# Copyright (c)2001-2016 Alexander Barton (alex@barton.de) and Contributors
|
||||
#
|
||||
# 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,20 +14,25 @@
|
||||
# suitable for inclusion in doc/Platforms.txt -- please send reports
|
||||
# to the ngIRCd mailing list: <ngircd-ml@ngircd.barton.de>.
|
||||
|
||||
NAME=`basename "$0"`
|
||||
NAME=$(basename "$0")
|
||||
VERBOSE=
|
||||
CLEAN=1
|
||||
|
||||
PLATFORM=
|
||||
COMPILER="unknown"
|
||||
VERSION="unknown"
|
||||
DATE=`date "+%y-%m-%d"`
|
||||
DATE=$(date "+%y-%m-%d")
|
||||
COMMENT=
|
||||
|
||||
R_CONFIGURE=
|
||||
R_MAKE=
|
||||
R_CHECK=
|
||||
R_CHECK_Y="?"
|
||||
R_RUN=
|
||||
|
||||
SRC_D=$(dirname "$0")
|
||||
MY_D="$PWD"
|
||||
|
||||
[ -n "$MAKE" ] || MAKE="make"
|
||||
export MAKE CC
|
||||
|
||||
@@ -36,54 +41,99 @@ while [ $# -gt 0 ]; do
|
||||
"-v")
|
||||
VERBOSE=1
|
||||
;;
|
||||
"-x")
|
||||
CLEAN=
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $NAME [-v]"
|
||||
echo "Usage: $NAME [-v] [-x]"
|
||||
echo
|
||||
echo " -v Verbose output"
|
||||
echo " -x Don't regenerate build system, even when possible"
|
||||
echo
|
||||
exit 2
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
for cmd in telnet expect; do
|
||||
command -v "$cmd" >/dev/null 2>&1 \
|
||||
|| echo "$NAME: WARNING: $cmd(1) not found, \"make check\" won't run all tests!"
|
||||
done
|
||||
|
||||
echo "$NAME: Checking ngIRCd base source directory ..."
|
||||
grep "ngIRCd" ./ChangeLog >/dev/null 2>&1
|
||||
grep "ngIRCd" "$SRC_D/ChangeLog" >/dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
grep "ngIRCd" ../ChangeLog >/dev/null 2>&1
|
||||
grep "ngIRCd" "$SRC_D/../ChangeLog" >/dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "$NAME: ngIRCd base source directory not found!?"
|
||||
exit 1
|
||||
fi
|
||||
cd ..
|
||||
SRC_D="$SRC_D/.."
|
||||
fi
|
||||
echo "$NAME: - source directory: $SRC_D"
|
||||
echo "$NAME: - working directory: $MY_D"
|
||||
|
||||
echo "$NAME: Checking for GIT tree ..."
|
||||
if [ -d .git ]; then
|
||||
if [ -d "$SRC_D/.git" ]; then
|
||||
echo "$NAME: Checking for \"git\" command ..."
|
||||
git version >/dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
if [ $? -eq 0 ] && [ -n "$CLEAN" ]; then
|
||||
echo "$NAME: Running \"git clean\" ..."
|
||||
[ -n "$VERBOSE" ] && git clean -dxf || git clean -dxf >/dev/null
|
||||
cd "$SRC_D" || exit 1
|
||||
if [ -n "$VERBOSE" ]; then
|
||||
git clean -dxf
|
||||
else
|
||||
git clean -dxf >/dev/null
|
||||
fi
|
||||
cd "$MY_D" || exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "$NAME: Checking for \"./configure\" script ..."
|
||||
if [ ! -e ./configure ]; then
|
||||
echo "$NAME: Running \"./autogen.sh\" ..."
|
||||
[ -n "$VERBOSE" ] && ./autogen.sh || ./autogen.sh >/dev/null
|
||||
echo "$NAME: Checking for \"$SRC_D/configure\" script ..."
|
||||
if [ ! -r "$SRC_D/configure" ]; then
|
||||
echo "$NAME: Running \"$SRC_D/autogen.sh\" ..."
|
||||
cd "$SRC_D" || exit 1
|
||||
if [ -n "$VERBOSE" ]; then
|
||||
./autogen.sh
|
||||
else
|
||||
./autogen.sh >/dev/null
|
||||
fi
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "$NAME: \"$SRC_D/autogen.sh\" script failed, aborting!"
|
||||
exit 1
|
||||
fi
|
||||
cd "$MY_D" || exit 1
|
||||
fi
|
||||
|
||||
if [ -r ./configure ]; then
|
||||
echo "$NAME: Running \"./configure\" script ..."
|
||||
[ -n "$VERBOSE" ] && ./configure || ./configure >/dev/null
|
||||
if [ $? -eq 0 -a -r ./Makefile ]; then
|
||||
if [ -r "$SRC_D/configure" ]; then
|
||||
echo "$NAME: Running \"$SRC_D/configure\" script ..."
|
||||
if [ -n "$VERBOSE" ]; then
|
||||
"$SRC_D/configure" -C
|
||||
else
|
||||
"$SRC_D/configure" -C >/dev/null
|
||||
fi
|
||||
if [ $? -eq 0 ] && [ -r ./Makefile ]; then
|
||||
R_CONFIGURE=1
|
||||
rm -f "src/ngircd/ngircd"
|
||||
echo "$NAME: Running \"$MAKE\" ..."
|
||||
[ -n "$VERBOSE" ] && "$MAKE" || "$MAKE" >/dev/null
|
||||
if [ $? -eq 0 -a -x src/ngircd/ngircd ]; then
|
||||
if [ -n "$VERBOSE" ]; then
|
||||
"$MAKE"
|
||||
else
|
||||
"$MAKE" >/dev/null
|
||||
fi
|
||||
if [ $? -eq 0 ] && [ -x src/ngircd/ngircd ]; then
|
||||
R_MAKE=1
|
||||
echo "$NAME: Running \"$MAKE check\" ..."
|
||||
[ -n "$VERBOSE" ] && "$MAKE" check || "$MAKE" check >/dev/null
|
||||
if [ -n "$VERBOSE" ]; then
|
||||
"$MAKE" check
|
||||
else
|
||||
"$MAKE" check >/dev/null
|
||||
fi
|
||||
if [ $? -eq 0 ]; then
|
||||
R_CHECK=1
|
||||
R_RUN=$R_CHECK
|
||||
[ -r ./src/testsuite/tests-skipped.lst ] \
|
||||
&& R_CHECK_Y="y" || R_CHECK_Y="Y"
|
||||
else
|
||||
./src/ngircd/ngircd --help 2>/dev/null \
|
||||
| grep "^ngIRCd" >/dev/null
|
||||
@@ -95,13 +145,13 @@ fi
|
||||
|
||||
# Get target platform information
|
||||
if [ -r "src/config.h" ]; then
|
||||
CPU=`grep "HOST_CPU" "src/config.h" | cut -d'"' -f2`
|
||||
OS=`grep "HOST_OS" "src/config.h" | cut -d'"' -f2`
|
||||
VENDOR=`grep "HOST_VENDOR" "src/config.h" | cut -d'"' -f2`
|
||||
CPU=$(grep "HOST_CPU" "src/config.h" | cut -d'"' -f2)
|
||||
OS=$(grep "HOST_OS" "src/config.h" | cut -d'"' -f2)
|
||||
VENDOR=$(grep "HOST_VENDOR" "src/config.h" | cut -d'"' -f2)
|
||||
PLATFORM="$CPU/$VENDOR/$OS"
|
||||
fi
|
||||
if [ -z "$PLATFORM" ]; then
|
||||
PLATFORM="`uname 2>/dev/null` `uname -r 2>/dev/null`, `uname -m 2>/dev/null`"
|
||||
PLATFORM="$(uname 2>/dev/null) $(uname -r 2>/dev/null), $(uname -m 2>/dev/null)"
|
||||
fi
|
||||
|
||||
# Get compiler information
|
||||
@@ -133,18 +183,18 @@ if [ -r "Makefile" ]; then
|
||||
| cut -d'(' -f1 | sed -e 's/version //g')
|
||||
fi
|
||||
if [ "$COMPILER" = "unknown" ]; then
|
||||
v="`$CC --version 2>/dev/null | head -1`"
|
||||
[ -z "$v" ] && v="`$CC -version 2>/dev/null | head -1`"
|
||||
v="$($CC --version 2>/dev/null | head -1)"
|
||||
[ -z "$v" ] && v="$($CC -version 2>/dev/null | head -1)"
|
||||
[ -n "$v" ] && COMPILER="$v"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Get ngIRCd version information
|
||||
eval $(grep "^VERSION = " Makefile | sed -e 's/ //g')
|
||||
eval "$(grep "^VERSION = " Makefile | sed -e 's/ //g')"
|
||||
case "$VERSION" in
|
||||
*-*-*)
|
||||
VERSION=`echo "$VERSION" | cut -d'-' -f3 | cut -b2-`
|
||||
*~*-*)
|
||||
VERSION=$(echo "$VERSION" | cut -b1-10)
|
||||
;;
|
||||
esac
|
||||
[ -n "$VERSION" ] || VERSION="unknown"
|
||||
@@ -163,8 +213,13 @@ fi
|
||||
|
||||
[ -n "$R_CONFIGURE" ] && C="Y" || C="N"
|
||||
[ -n "$R_MAKE" ] && M="Y" || M="N"
|
||||
[ -n "$R_CHECK" ] && T="Y" || T="N"
|
||||
[ -n "$R_RUN" ] && R="Y" || R="N"
|
||||
[ -n "$R_CHECK" ] && T="$R_CHECK_Y" || T="N"
|
||||
if [ -n "$R_RUN" ]; then
|
||||
# Mark "runs" with "Y" only when the test suite succeeded:
|
||||
[ "$T" = "N" ] && R="?" || R="Y"
|
||||
else
|
||||
R="N"
|
||||
fi
|
||||
[ -n "$COMMENT" ] && COMMENT=" $COMMENT"
|
||||
|
||||
echo
|
||||
@@ -175,13 +230,29 @@ echo " ./configure works --+ |
|
||||
echo " | | | |"
|
||||
echo "Platform Compiler ngIRCd Date Tester C M T R *"
|
||||
echo "--------------------------- ------------ ---------- -------- -------- - - - - -"
|
||||
type printf >/dev/null 2>&1
|
||||
command -v printf >/dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
printf "%-27s %-12s %-10s %s %-8s %s %s %s %s%s" \
|
||||
"$PLATFORM" "$COMPILER" "$VERSION" "$DATE" "$USER" \
|
||||
printf "%-27s %-12s %-10s %s %-8s %s %s %s %s%s\n" \
|
||||
"$PLATFORM" "$COMPILER" "$VERSION" "$DATE" "$LOGNAME" \
|
||||
"$C" "$M" "$T" "$R" "$COMMENT"
|
||||
else
|
||||
echo "$PLATFORM $COMPILER $VERSION $DATE $USER" \
|
||||
echo "$PLATFORM $COMPILER $VERSION $DATE $LOGNAME" \
|
||||
"$C" "$M" "$T" "$R" "$COMMENT"
|
||||
fi
|
||||
echo; echo
|
||||
echo
|
||||
|
||||
double_check() {
|
||||
echo "Please double check that the ngIRCd daemon starts up, runs and handles IRC"
|
||||
echo "connections successfully!"
|
||||
}
|
||||
|
||||
if [ "$R_CHECK_Y" = "y" ]; then
|
||||
echo "WARNING: Some tests have been skipped!"
|
||||
double_check
|
||||
echo
|
||||
fi
|
||||
if [ "$R" = "?" ]; then
|
||||
echo "WARNING: The resulting binary passed simple tests, but the test suite failed!"
|
||||
double_check
|
||||
echo
|
||||
fi
|
||||
|
@@ -1,77 +0,0 @@
|
||||
#
|
||||
# Sample systrace policy for ngIRCd on OpenBSD
|
||||
# Author: Benjamin Pineau <ben@zouh.org>
|
||||
#
|
||||
# $Id: systrace.policy,v 1.1 2004/04/28 12:16:59 alex Exp $
|
||||
#
|
||||
# Tune me, put me in /etc/systrace/usr_local_bin_ngircd and start ngIRCd
|
||||
# (with root privileges) as:
|
||||
#
|
||||
# systrace -a /usr/local/bin/ngircd
|
||||
#
|
||||
# I didn't tried this on NetBSD, but it should work as is.
|
||||
#
|
||||
# On systems with pf, it can be supplemented by strict firewall rules:
|
||||
# for a ngircd running as '$ircuser', binding on '$ircport' and accepting
|
||||
# 30 connections:
|
||||
#
|
||||
# block out log quick proto tcp from any port $ircport to any \
|
||||
# user != $ircuser
|
||||
# pass in inet proto tcp from any to any port $ircport user $ircuser \
|
||||
# keep state (max 30) flags S/SA
|
||||
#
|
||||
|
||||
Policy: /usr/local/bin/ngircd, Emulation: native
|
||||
native-__sysctl: permit
|
||||
native-fsread: filename eq "/etc/malloc.conf" then permit
|
||||
native-fsread: filename sub "/usr/share/zoneinfo/" then permit
|
||||
native-fsread: filename eq "/usr/local/etc/ngircd.conf" then permit
|
||||
native-fsread: filename eq "/usr/local/etc/ngircd.motd" then permit
|
||||
native-fsread: filename eq "/etc/ngircd.conf" then permit
|
||||
native-fsread: filename eq "/etc/ngircd.motd" then permit
|
||||
native-fsread: filename eq "/etc/spwd.db" then deny[eperm]
|
||||
native-fsread: filename eq "/etc/group" then permit
|
||||
native-fsread: filename eq "/etc/resolv.conf" then permit
|
||||
native-fsread: filename eq "/etc/localtime" then permit
|
||||
native-fsread: filename eq "/etc/hosts" then permit
|
||||
native-fsread: filename sub "<non-existent filename>" then deny[enoent]
|
||||
native-socket: sockdom eq "AF_UNIX" and socktype eq "SOCK_DGRAM" then permit
|
||||
native-socket: sockdom eq "AF_INET" and socktype eq "SOCK_STREAM" then permit
|
||||
native-bind: sockaddr match "inet-*:6667" then permit, if user != root
|
||||
native-connect: sockaddr eq "/dev/log" then permit, if user != root
|
||||
native-connect: sockaddr match "inet-*:53" then permit, if user != root
|
||||
native-setsockopt: permit, if user != root
|
||||
native-listen: permit, if user != root
|
||||
native-accept: permit, if user != root
|
||||
native-sendto: true then permit, if user != root
|
||||
native-recvfrom: permit, if user != root
|
||||
native-read: permit
|
||||
native-pread: permit
|
||||
native-write: permit, if user != root
|
||||
native-mmap: permit
|
||||
native-munmap: permit
|
||||
native-mprotect: permit
|
||||
native-break: permit
|
||||
native-umask: permit
|
||||
native-fork: permit
|
||||
native-setsid: permit
|
||||
native-chdir: permit
|
||||
native-chroot: permit
|
||||
native-setgid: gid neq "0" then permit
|
||||
native-setuid: uid neq "0" and uname neq "root" then permit
|
||||
native-getuid: permit
|
||||
native-getgid: permit
|
||||
native-gettimeofday: permit
|
||||
native-getpid: permit
|
||||
native-select: permit
|
||||
native-fcntl: permit
|
||||
native-fstat: permit
|
||||
native-issetugid: permit
|
||||
native-sigaction: permit
|
||||
native-pipe: permit
|
||||
native-sigreturn: permit
|
||||
native-close: permit
|
||||
native-exit: permit
|
||||
native-fswrite: deny[eperm]
|
||||
|
||||
# -eof-
|
1
doc/.gitignore
vendored
1
doc/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
sample-ngircd.conf
|
16
doc/Bopm.txt
16
doc/Bopm.txt
@@ -1,9 +1,8 @@
|
||||
|
||||
ngIRCd - Next Generation IRC Server
|
||||
http://ngircd.barton.de/
|
||||
|
||||
(c)2001-2010 Alexander Barton,
|
||||
alex@barton.de, http://www.barton.de/
|
||||
|
||||
(c)2001-2014 Alexander Barton and Contributors.
|
||||
ngIRCd is free software and published under the
|
||||
terms of the GNU General Public License.
|
||||
|
||||
@@ -18,7 +17,7 @@ monitor, designed for use with hybrid-based ircds, although it can be used
|
||||
with slight modification on any server which has the ability to show connects
|
||||
to opers and that supports KLINEs."
|
||||
|
||||
And starting with Release 17, ngIRCd supports all required log messages that
|
||||
Starting with Release 17, ngIRCd supports all required log messages that
|
||||
BOPM requires to be useful.
|
||||
|
||||
II. Installation
|
||||
@@ -37,11 +36,12 @@ a) BOPM "IRC" section:
|
||||
3) change "mode" to "+ci" or "+c".
|
||||
|
||||
4) Set "connregex" to the following string, everything in one line(!):
|
||||
"\\*\\*\\* Notice -- Client connecting: ([^ ]+) \\(([^@]+)@([^\\)]+)\\) \\[([0-9\\.]+)\\].*";
|
||||
and comment all the other "connregex" examples (prepend a "#" character).
|
||||
"Client connecting: ([^ ]+) \\(([^@]+)@([^\\)]+)\\) \\[([0-9\\.]+)\\].*";
|
||||
and comment out all the other "connregex" examples (that is, prepend a
|
||||
"#" character).
|
||||
|
||||
5) Set "kline" to "KILL %n :Open proxy found on your host!"; for example,
|
||||
and comment all the other "kline" examples.
|
||||
5) Set "kline" to "GLINE *@%h :Open proxy found on your host!";
|
||||
and comment out all the other "kline" examples.
|
||||
|
||||
b) BOPM "scanner" section:
|
||||
|
||||
|
@@ -13,7 +13,7 @@ This document lists and describes the "IRC capabilities" that ngIRCd supports
|
||||
and can be requested by a IRC/IRCv3 client that supports the "CAP" command.
|
||||
|
||||
ngIRCd implements the "IRC Client Capabilities Extension" as described here:
|
||||
<http://www.leeh.co.uk/draft-mitchell-irc-capabilities-02.html>
|
||||
<http://ircv3.net/specs/core/capability-negotiation-3.1.html>
|
||||
|
||||
|
||||
I. Supported Capabilities
|
||||
@@ -25,4 +25,4 @@ I. Supported Capabilities
|
||||
server to send all possible prefixes which apply to a user in NAMES and
|
||||
WHO output.
|
||||
|
||||
See <http://ircv3.atheme.org/extensions/multi-prefix-3.1>.
|
||||
See <http://ircv3.net/specs/extensions/multi-prefix-3.1.html>.
|
||||
|
@@ -2,7 +2,7 @@
|
||||
ngIRCd - Next Generation IRC Server
|
||||
http://ngircd.barton.de/
|
||||
|
||||
(c)2001-2013 Alexander Barton and Contributors.
|
||||
(c)2001-2019 Alexander Barton and Contributors.
|
||||
ngIRCd is free software and published under the
|
||||
terms of the GNU General Public License.
|
||||
|
||||
@@ -78,7 +78,7 @@ Connection Handling Commands
|
||||
like this: "CAP REQ :capability1 capability2 capability3" for example.
|
||||
|
||||
References:
|
||||
- <http://ircv3.atheme.org/specification/capability-negotiation-3.1>
|
||||
- <http://ircv3.net/specs/core/capability-negotiation-3.1.html>
|
||||
- <http://ngircd.barton.de/doc/Capabilities.txt>
|
||||
- doc/Capabilities.txt
|
||||
|
||||
@@ -324,7 +324,7 @@ General Commands
|
||||
In addition, IRC Ops can use these two forms to specify the <target>:
|
||||
.
|
||||
- #<hostmask>
|
||||
- #<servermask>
|
||||
- $<servermask>
|
||||
.
|
||||
The <mask> can contain the wildcard characters "*" and "?", but must
|
||||
contain at least one dot (".") and no wildcard after the last one.
|
||||
@@ -380,13 +380,13 @@ Status and Informational Commands
|
||||
|
||||
Please note that "all" IRC daemons even parse separate nicknames in
|
||||
a single parameter (like ":nick1 nick2"), and therefore ngIRCd
|
||||
implements this behaviour, too.
|
||||
implements this behavior, too.
|
||||
|
||||
References:
|
||||
- RFC 2812, 4.9 "Ison message"
|
||||
|
||||
- LINKS
|
||||
LINKS [[<target>] [<mask>]
|
||||
LINKS [[<target>] <mask>]
|
||||
.
|
||||
List all servers currently registered in the network matching <mask>,
|
||||
or all servers if <mask> has been omitted, as seen by the server
|
||||
@@ -617,9 +617,10 @@ Channel Commands
|
||||
- RFC 2812, 3.2.8 "Kick command"
|
||||
|
||||
- LIST
|
||||
LIST [<channel>[,<channel>[,...]] [<server>]]
|
||||
LIST [<mask>[,<mask>[,...]] [<server>]]
|
||||
.
|
||||
List all visible <channels> (comma-separated list).
|
||||
List all visible channels matching the <mask> (comma-separated list),
|
||||
or all channels when no <mask> was specified.
|
||||
.
|
||||
If <server> is given, the command will be forwarded to <server> for
|
||||
evaluation.
|
||||
@@ -882,7 +883,7 @@ Server Protocol Commands
|
||||
- ERROR
|
||||
ERROR [<message> [<> [...]]]
|
||||
.
|
||||
Inform a client or a server about an error condition. The first
|
||||
Inform a client or a server about an error condition. The first
|
||||
parameter, if given, is logged by the server receiving the message,
|
||||
all other parameters are silently ignored.
|
||||
.
|
||||
|
@@ -2,7 +2,7 @@
|
||||
ngIRCd - Next Generation IRC Server
|
||||
http://ngircd.barton.de/
|
||||
|
||||
(c)2001-2011 Alexander Barton and Contributors.
|
||||
(c)2001-2015 Alexander Barton and Contributors.
|
||||
ngIRCd is free software and published under the
|
||||
terms of the GNU General Public License.
|
||||
|
||||
@@ -15,7 +15,7 @@ get an idea of how to do it the best :-)
|
||||
- Use GIT
|
||||
|
||||
The source code of ngIRCd is maintained using GIT, see doc/GIT.txt. So if
|
||||
remotely possible, use GIT for your work, too. It makes your and our lifes
|
||||
remotely possible, use GIT for your work, too. It makes your and our lives
|
||||
much easier ;-)
|
||||
|
||||
- Don't forget to include documentation
|
||||
@@ -52,3 +52,9 @@ get an idea of how to do it the best :-)
|
||||
|
||||
And this is open source, your work must not be 100% finished and perfect,
|
||||
work in progress is interesting, too: "release early, release often"!
|
||||
|
||||
- Use GitHub to create "Pull Requests"
|
||||
|
||||
ngIRCd is hosted on GitHub (<https://github.com/ngircd>), so please use the
|
||||
tools available there and open issues (comment!) and create pull requests!
|
||||
See <https://help.github.com/articles/using-pull-requests/> for details.
|
||||
|
13
doc/FAQ.txt
13
doc/FAQ.txt
@@ -89,16 +89,21 @@ A: You need to set 'OperCanUseMode = yes' in ngircd.conf, then IRC operators
|
||||
can use the MODE command for changing modes even when they are not joined
|
||||
to the specific channel.
|
||||
|
||||
Q: How can I "auto-op" users in channels?
|
||||
A: ngIRCd can't do this: you would have to use some "IRC Services", like
|
||||
Atheme (<http://atheme.net/atheme.html>) or Anope (<http://www.anope.org>).
|
||||
See "doc/Services.txt" for setup instructions.
|
||||
|
||||
|
||||
IV. Bugs!?
|
||||
~~~~~~~~~~
|
||||
|
||||
Q: Is there a list of known bugs and desired feature enhancements?
|
||||
A: Yes. Have a look at the bug tracking system (Bugzilla) for ngIRCd located
|
||||
at <http://ngircd.barton.de/bugzilla/index.cgi>. There you can file bug
|
||||
A: Yes. Have a look at the bug tracking system (GitHub issues) for ngIRCd located
|
||||
at <https://github.com/ngircd/ngircd/issues>. There you can file bug
|
||||
reports and feature requests as well as search the bug database.
|
||||
|
||||
Q: What should I do if I found a bug?
|
||||
A: Please file a bug report at <http://ngircd.barton.de/bugzilla/index.cgi>!
|
||||
The author of the particular component will be notified automagically :-)
|
||||
A: Please file a bug report at <https://github.com/ngircd/ngircd/issues/new>!
|
||||
The author will be notified automagically :-)
|
||||
|
||||
|
65
doc/GIT.txt
65
doc/GIT.txt
@@ -1,65 +0,0 @@
|
||||
|
||||
ngIRCd - Next Generation IRC Server
|
||||
http://ngircd.barton.de/
|
||||
|
||||
(c)2001-2011 Alexander Barton and Contributors.
|
||||
ngIRCd is free software and published under the
|
||||
terms of the GNU General Public License.
|
||||
|
||||
-- GIT.txt --
|
||||
|
||||
|
||||
The source code of ngIRCd is maintained using GIT, an distributed version
|
||||
control system. Homepage including documentation: <http://git-scm.com/>.
|
||||
|
||||
|
||||
I. Viewing the source code online
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The ngIRCd "GITweb" interface allows you to browse the GIT repository and
|
||||
to see all individual files, tags, branches, commits etc.:
|
||||
|
||||
<http://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git>
|
||||
|
||||
|
||||
II. Getting the source code
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
To access (copy, clone) the source tree repository anonymously, run:
|
||||
|
||||
$ git clone git://ngircd.barton.de/ngircd.git
|
||||
|
||||
Thereby a new folder "ngircd" will be created containing all the individual
|
||||
source files.
|
||||
|
||||
The newly created directory ("ngircd") is the "working directory", all
|
||||
GIT commands will be executed from within this directory in the future.
|
||||
|
||||
Please note: When checking out a fresh copy of ngIRCd using GIT, the
|
||||
configure script doesn't exist; you have to run the autogen.sh shell script
|
||||
(which is included in the source tree) to generate it. This requires you to
|
||||
have GNU automake and GNU autoconf installed on your system. Please see the
|
||||
file INSTALL for details!
|
||||
|
||||
To update the local GIT repository:
|
||||
|
||||
$ git pull
|
||||
|
||||
This retrieves all changes and merges them into the current branch.
|
||||
|
||||
|
||||
III. Contributing
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
Patches should be sent to the ngircd mailing list. List homepage:
|
||||
http://arthur.barton.de/mailman/listinfo/ngircd-ml
|
||||
|
||||
If you do not want to send them to the list, you can also mail them
|
||||
to Alex Barton, <alex@barton.de>.
|
||||
|
||||
|
||||
IV. Write Access
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
If you want to contribute a couple of patches and write access to the GIT
|
||||
repository would be handy, please contact Alex Barton, <alex@barton.de>.
|
@@ -1,9 +1,8 @@
|
||||
|
||||
ngIRCd - Next Generation IRC Server
|
||||
http://ngircd.barton.de/
|
||||
|
||||
(c)2001-2010 Alexander Barton,
|
||||
alex@barton.de, http://www.barton.de/
|
||||
|
||||
(c)2001-2020 Alexander Barton and Contributors.
|
||||
ngIRCd is free software and published under the
|
||||
terms of the GNU General Public License.
|
||||
|
||||
@@ -36,12 +35,20 @@ up-to-date (e.g. using ./autogen.sh) before generating the archives!
|
||||
II. How to prepare a new ngIRCd release?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
a) Make sure the source tree is in a releasable state ;-)
|
||||
|
||||
b) Make sure you have working versions of GNU autoconf and GNU automake
|
||||
a) Make sure you have working versions of GNU autoconf and GNU automake
|
||||
installed on the system you use for generating the release:
|
||||
as of October 2010 we are using GNU autoconf 2.67 and GNU automake 1.11.1
|
||||
as of May 2020 we are using GNU autoconf 2.69 and GNU automake 1.11.6
|
||||
which seem to work just fine.
|
||||
NOTE: new releases of GNU automake DO NOT work, as they lack support for
|
||||
the "ansi2knr" wrapper and "de-ANSI-fication" support!
|
||||
|
||||
b) Make sure the source tree is in a releasable state ;-)
|
||||
- Are all branches & patches merged? Check GitHub issues, pull requests
|
||||
and milestones!
|
||||
- Run as many tests as you can!
|
||||
- Is the AUTHORS file up to date? This command may be helpful:
|
||||
"( grep '>$' AUTHORS; git shortlog -se | cut -c8- ) | grep -Ev \
|
||||
'(alex@barton.de|fw@strlen.de)' | LC_ALL=de_DE.UTF-8 sort -u"
|
||||
|
||||
c) Update the files describing the new release:
|
||||
- ChangeLog
|
||||
@@ -65,13 +72,16 @@ h) Run "./autogen.sh" to update the ./configure script with the correct
|
||||
|
||||
i) Run "./configure" to rebuild all generated Makefiles.
|
||||
|
||||
j) Run "make distcheck" to generate the distribution archives.
|
||||
j) Run "make distcheck" (and "make dist-tarZ dist-xz") to generate all of the
|
||||
distribution archives.
|
||||
|
||||
k) Sign the distribution archive(s) using GnuPG: "gpg -b <archivefile>"
|
||||
|
||||
l) Upload and distribute the newly generated ngIRCd release archive(s)
|
||||
and GnuPG signatures.
|
||||
and GnuPG signatures (to the website, its mirrors, and GitHub).
|
||||
|
||||
m) Write an announcement to the mailing list, freshmeat, Twitter, ...
|
||||
m) Update the ngIRCd website and its mirrors!
|
||||
|
||||
n) Relax :-)
|
||||
n) Write an announcement to the mailing list, Twitter, ...
|
||||
|
||||
o) Relax :-)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#
|
||||
# ngIRCd -- The Next Generation IRC Daemon
|
||||
# Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors
|
||||
# Copyright (c)2001-2020 Alexander Barton (alex@barton.de) and Contributors
|
||||
#
|
||||
# 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
|
||||
@@ -23,7 +23,6 @@ static_docs = \
|
||||
Commands.txt \
|
||||
Contributing.txt \
|
||||
FAQ.txt \
|
||||
GIT.txt \
|
||||
HowToRelease.txt \
|
||||
Modes.txt \
|
||||
PAM.txt \
|
||||
@@ -40,7 +39,7 @@ doc_templates = sample-ngircd.conf.tmpl
|
||||
|
||||
generated_docs = sample-ngircd.conf
|
||||
|
||||
toplevel_docs = ../AUTHORS ../COPYING ../ChangeLog ../INSTALL ../NEWS ../README
|
||||
toplevel_docs = ../AUTHORS ../COPYING ../ChangeLog ../INSTALL.md ../NEWS ../README.md
|
||||
|
||||
SUBDIRS = src
|
||||
|
||||
@@ -54,11 +53,11 @@ maintainer-clean-local:
|
||||
all: $(generated_docs)
|
||||
|
||||
install-data-hook: $(static_docs) $(toplevel_docs) $(generated_docs)
|
||||
$(mkinstalldirs) $(DESTDIR)$(sysconfdir)
|
||||
$(MKDIR_P) -m 755 $(DESTDIR)$(sysconfdir)
|
||||
@if [ ! -f $(DESTDIR)$(sysconfdir)/ngircd.conf ]; then \
|
||||
make install-config; \
|
||||
${MAKE} install-config; \
|
||||
fi
|
||||
$(mkinstalldirs) $(DESTDIR)$(docdir)
|
||||
$(MKDIR_P) -m 755 $(DESTDIR)$(docdir)
|
||||
for f in $(static_docs) $(toplevel_docs); do \
|
||||
$(INSTALL) -m 644 -c $(srcdir)/$$f $(DESTDIR)$(docdir)/; \
|
||||
done
|
||||
@@ -76,7 +75,7 @@ install-config:
|
||||
uninstall-hook:
|
||||
rm -rf $(DESTDIR)$(docdir)
|
||||
@if cmp --silent sample-ngircd.conf $(DESTDIR)$(sysconfdir)/ngircd.conf; then \
|
||||
make uninstall-config; \
|
||||
${MAKE} uninstall-config; \
|
||||
else \
|
||||
echo; \
|
||||
echo " ** NOTE: Not uninstalling changed configuration file:"; \
|
||||
@@ -88,7 +87,7 @@ uninstall-config:
|
||||
rm -f $(DESTDIR)$(sysconfdir)/ngircd.conf
|
||||
|
||||
srcdoc:
|
||||
make -C src srcdoc
|
||||
${MAKE} -C src srcdoc
|
||||
|
||||
.PHONY: install-config uninstall-config srcdoc
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
ngIRCd - Next Generation IRC Server
|
||||
http://ngircd.barton.de/
|
||||
|
||||
(c)2001-2012 Alexander Barton and Contributors.
|
||||
(c)2001-2015 Alexander Barton and Contributors.
|
||||
ngIRCd is free software and published under the
|
||||
terms of the GNU General Public License.
|
||||
|
||||
@@ -26,7 +26,9 @@ channels he is using at the moment.
|
||||
B 20 User is flagged as a "bot".
|
||||
c 17 IRC operator wants to receive connect/disconnect NOTICEs.
|
||||
C 19 Only users that share a channel are allowed to send messages.
|
||||
F 22 Relaxed flood protection (only settable by IRC Operators).
|
||||
i 0.0.1 User is "invisible".
|
||||
I 23 No channels are shown on WHOIS (IRC Ops can always see those).
|
||||
o 0.0.1 User is IRC operator.
|
||||
q 20 User is protected, can not be kicked from a channel.
|
||||
r 0.0.1 User is restricted.
|
||||
@@ -54,6 +56,7 @@ users to lists (e.g. "invite list", "ban list"), others have parameters
|
||||
m 0.3.0 Channel is moderated, only "voiced" users can send messages.
|
||||
M 20 Only registered users (and IRC Ops) can send messages.
|
||||
n 0.3.0 Channel doesn't allow messages of users not being members.
|
||||
N 23 Users can't change their nickname while on this channel.
|
||||
O 18 Only IRC operators are allowed to join this channel.
|
||||
P 0.5.0 Channel is "persistent".
|
||||
Q 20 Nobody can be kicked from the channel.
|
||||
@@ -72,17 +75,21 @@ channel of which he is a member.
|
||||
|
||||
mode since description
|
||||
|
||||
q 20 User is channel owner can only be set by a service, other
|
||||
owner and irc op. Can promote other users to q, a, o, h, v.
|
||||
a 20 User is channel admin and can promote other users to v, h, o
|
||||
q 20 User is channel owner. This mode can only be set by an IRC
|
||||
service, other owner or IRC operator. Channel owners can
|
||||
promote other users to all levels: q, a, o, h, v. Prefix: "~".
|
||||
a 20 User is channel admin and can promote other users to v, h, o.
|
||||
Prefix: "&".
|
||||
o 0.2.0 User is channel operator and can op/kick/... other members.
|
||||
Prefix: "@".
|
||||
h 20 User is half op and can set channel modes imntvIbek and kick
|
||||
voiced and normal users.
|
||||
voiced and normal users. Prefix: "%".
|
||||
v 0.2.0 User is "voiced" and can speak even if channel is moderated.
|
||||
Prefix: "+".
|
||||
|
||||
|
||||
Notes
|
||||
~~~~~
|
||||
|
||||
(1) This mode is not set by ngIRCd itself but by services. ngIRCd handles
|
||||
the mode transparently and possibly adjusts its behaviour.
|
||||
the mode transparently and possibly adjusts its behavior.
|
||||
|
@@ -26,6 +26,10 @@ A very simple -- and quite useless ;-) -- example would be:
|
||||
Here the "pam_debug" module will be called each time a client connects to
|
||||
the ngIRCd and has sent its PASS, NICK, and USER commands.
|
||||
|
||||
The PAM library used by the ngIRCd daemon must be able to access its
|
||||
configuration file, so don't forget to check permissions and run something
|
||||
like this: "chmod 644 /etc/pam.d/ngircd".
|
||||
|
||||
Please note ONE VERY IMPORTANT THING:
|
||||
|
||||
All the PAM modules are executed with the privileges of the user ngIRCd
|
||||
|
@@ -2,7 +2,7 @@
|
||||
ngIRCd - Next Generation IRC Server
|
||||
http://ngircd.barton.de/
|
||||
|
||||
(c)2001-2013 Alexander Barton and Contributors.
|
||||
(c)2001-2019 Alexander Barton and Contributors.
|
||||
ngIRCd is free software and published under the
|
||||
terms of the GNU General Public License.
|
||||
|
||||
@@ -30,80 +30,118 @@ alpha/unknown/netbsd3.0 gcc 3.3.3 CVSHEAD 06-05-07 fw Y Y Y Y 3
|
||||
armv6l/unk./linux-gnueabi gcc 4.7.2 20.2 13-03-08 goetz Y Y Y Y 5
|
||||
armv6l/unk./linux-gnueabihf gcc 4.6.3 21~rc2 13-10-26 pi Y Y Y Y 5
|
||||
armv7l/unk./linux-gnueabi gcc 4.4.3 19.1 12-04-29 goetz Y Y Y Y 5
|
||||
armv7l/unk./linux-gnueabihf gcc 4.6.3 22~rc1-3 14-10-10 alex Y Y Y Y 5
|
||||
armv7l/unk./linux-gnueabihf gcc 4.8.2 21.1 14-07-15 goetz Y Y Y Y 5
|
||||
armv7l/unk./linux-gnueabihf gcc 4.9.2 23 16-01-10 alex Y Y Y Y 5
|
||||
hppa/unknown/openbsd3.5 gcc 2.95.3 CVSHEAD 04-05-25 alex Y Y Y Y
|
||||
hppa/unknown/openbsd5.4 gcc 4.2.1 22~rc1-3 14-10-10 alex Y Y y Y 3
|
||||
hppa1.1/unknown/linux-gnu gcc 3.3.3 0.8.0 04-05-30 alex Y Y Y Y
|
||||
hppa2.0/unknown/linux-gnu gcc 3.3.5 13~rc1 08-12-02 alex Y Y Y Y
|
||||
hppa2.0w-hp-hpux11.11 gcc 4.2.3 14.1 09-07-22 goetz Y Y Y Y
|
||||
i386/apple/darwin9.7.0 gcc 4.0.1 14.1 09-08-04 alex Y Y Y Y 3
|
||||
i386/apple/darwin10.8.0 gcc 4.2.1 19 12-02-26 alex Y Y Y Y 3
|
||||
i386/apple/darwin11.3.0 gcc 4.2.1 19 12-02-26 alex Y Y Y Y 3
|
||||
i386/pc/linux-gnu gcc 4.1.2 13~rc1 08-12-05 alex Y Y Y Y 1
|
||||
i386/pc/linux-gnu gcc 4.4.5 22~rc1-3 14-10-10 alex Y Y Y Y 1
|
||||
i386/pc/minix clang 3.4 23 16-01-06 goetz Y Y N Y
|
||||
i386/pc/solaris2.9 gcc 3.2.2 CVSHEAD 04-02-24 alex Y Y Y Y
|
||||
i386/pc/solaris2.11 gcc 4.5.2 21~rc2 13-10-27 alex Y Y N Y 4
|
||||
i386/pc/solaris2.11 gcc 4.8.2 24 17-01-21 goetz Y Y Y Y 4
|
||||
i386/unknown/freebsd5.2.1 gcc 3.3.3 0.8.0 04-05-30 alex Y Y Y Y
|
||||
i386/unknown/freebsd6.2 gcc 3.4.6 20~rc1 12-11-13 alex Y Y Y Y 3
|
||||
i386/unknown/freebsd7.3 gcc 4.2.1 20~rc1 12-11-13 alex Y Y Y Y 3
|
||||
i686/pc/minix gcc 4.4.6 21~rc2 13-10-27 alex Y Y N N
|
||||
i686/unknown/gnu0.3 gcc 4.4.5 19 12-02-29 alex Y Y Y Y
|
||||
i686/unknown/gnu0.5 gcc 4.8.1 21~rc2 13-10-27 alex Y Y Y Y
|
||||
i686/unkn./kfreebsd7.2-gnu gcc 4.3.4 15 09-12-02 alex Y Y Y Y 3
|
||||
i386/unknown/freebsd7.3 gcc 4.2.1 24~rc1-7 17-01-20 alex Y Y Y Y 3
|
||||
i386/unknown/netbsdelf1.5.2 egcs-1.1.2 21 13-11-25 goetz Y Y N Y
|
||||
i386/unknown/netbsdelf1.6.2 gcc 2.95.3 18 11-07-10 goetz Y Y Y Y
|
||||
i386/unknown/netbsdelf3.0.1 gcc 3.3.3 0.10.0-p1 06-08-30 alex Y Y Y Y 3
|
||||
i386/unknown/netbsdelf4.0 gcc 4.1.2 19 12-02-29 alex Y Y Y Y 3
|
||||
i386/unknown/netbsdelf4.0 gcc 4.1.2 24~rc1-7 17-01-20 alex Y Y Y Y 3
|
||||
i386/unknown/netbsdelf5.0.2 gcc 4.1.3 19 12-02-26 alex Y Y Y Y 3
|
||||
i386/unknown/openbsd3.5 gcc 2.95.3 23 15-11-27 goetz Y Y y Y 3
|
||||
i386/unknown/openbsd3.9 gcc 3.3.5 0.10.0-p1 06-08-30 alex Y Y Y Y 3
|
||||
i386/unknown/openbsd4.1 gcc 3.3.5 16 10-04-11 alex Y Y Y Y 3
|
||||
i386/unknown/openbsd5.3 gcc 4.2.1 21~rc2 13-10-21 dspruell Y Y Y Y 3
|
||||
i386/unknown/openbsd5.3 gcc 4.2.1 21 13-11-28 goetz Y Y Y Y 3
|
||||
i386/unknown/openbsd5.4 gcc 4.2.1 21 13-11-28 goetz Y Y Y Y 3
|
||||
i586/pc/haiku gcc 2.95.3 19.2~138 12-10-11 user Y Y N N
|
||||
i586/pc/interix3.5 gcc 3.3 19 12-02-29 alex Y Y N Y
|
||||
i686/pc/cygwin gcc 3.3.1 0.8.0 04-05-30 alex Y Y N Y
|
||||
i686/pc/linux-gnu gcc 2.7.2 19.1 12-05-30 goetz Y Y Y Y 1
|
||||
i586/pc/interix3.5 gcc 3.3 23 16-01-29 alex Y Y N Y
|
||||
i686/pc/cygwin gcc 4.9.3 23 16-01-06 alex Y Y Y Y
|
||||
i686/pc/linux-gnu gcc 2.6.3 23 16-01-06 goetz Y Y y Y 1
|
||||
i686/pc/linux-gnu gcc 2.7.2.1 23 15-11-30 goetz Y Y N Y 1
|
||||
i686/pc/linux-gnu gcc 2.95.2 23 15-12-23 goetz Y Y Y Y 1
|
||||
i686/pc/linux-gnu gcc 2.95.4 0.8.0 04-05-30 alex Y Y Y Y 1
|
||||
i686/pc/linux-gnu gcc 3.3.5 14.1 09-08-04 alex Y Y Y Y 1
|
||||
i386/pc/linux-gnu gcc 4.1.2 13~rc1 08-12-05 alex Y Y Y Y 1
|
||||
i686/pc/linux-gnu gcc 4.3.2 14.1 09-08-04 alex Y Y Y Y 1
|
||||
i686/pc/minix gcc 4.4.6 21~rc2 13-10-27 alex Y Y N N
|
||||
i686/unknown/gnu0.3 gcc 4.4.5 19 12-02-29 alex Y Y Y Y
|
||||
i686/unknown/gnu0.5 gcc 4.9.1 22~rc1-3 14-10-11 alex Y Y Y Y
|
||||
i686/unkn./kfreebsd7.2-gnu gcc 4.3.4 15 09-12-02 alex Y Y Y Y 3
|
||||
m68k/apple/aux3.0.1 gcc 2.7.2 17 10-11-07 alex Y Y N Y
|
||||
m68k/apple/aux3.0.1 Orig. A/UX 17 10-11-07 alex Y Y N Y 2
|
||||
m68k/apple/aux3.1.1 gcc 2.7.2 19 12-02-26 alex Y Y N Y
|
||||
m68k/apple/aux3.1.1 Orig. A/UX 19 12-02-26 alex Y Y N Y 2
|
||||
m68k/hp/hp-ux9.10 Orig. HPUX 0.7.x-CVS 03-04-30 goetz Y Y Y Y
|
||||
m88k/dg/dgux5.4R3.10 gcc 2.5.8 CVSHEAD 04-03-15 alex Y Y ? ?
|
||||
mips/sgi/irix6.5 SGI 25 19-12-29 goetz Y Y ? ?
|
||||
mipsel/openwrt/linux-uclibc gcc 4.8 24~9-g619a 18-01-28 goetz - - - Y 6
|
||||
mipsel/unknown/linux-gnu gcc 4.1.2 18 11-07-05 goetz Y Y N Y 1
|
||||
mipsel/unknown/linux-gnu gcc 4.4.5 18 11-07-30 goetz Y Y Y Y 1
|
||||
powerpc/apple/darwin6.5 gcc 3.1 0.7.x-CVS 03-04-23 alex Y Y Y Y
|
||||
powerpc/apple/darwin7.9.0 gcc 3.3 19.1 12-05-22 goetz Y Y Y Y 3
|
||||
powerpc/apple/darwin8.11.0 gcc 4.0.1 18 11-07-02 goetz Y Y Y Y 3
|
||||
mipsel/unknown/linux-gnu gcc 4.4.5 21 13-11-24 goetz Y Y Y Y 1
|
||||
mipsel/unknown/netbsd8.0 gcc 5.5.0 25 19-08-09 root Y Y y Y 3
|
||||
powerpc/apple/darwin6.8 gcc 3.1 21 14-01-03 goetz Y Y Y Y
|
||||
powerpc/apple/darwin7.9.0 gcc 3.3 22 15-03-22 goetz Y Y Y Y 3
|
||||
powerpc/apple/darwin8.11.0 gcc 4.0.1 25 19-11-24 goetz Y Y Y Y 3
|
||||
powerpc/apple/darwin9.8.0 gcc 4.0.1 21 14-01-04 goetz Y Y Y Y 3
|
||||
powerpc/unknown/linux-gnu gcc 3.3.3 0.8.0 04-05-30 alex Y Y Y Y
|
||||
powerpc/unknown/openbsd3.6 gcc 2.95.3 0.10.0 06-10-08 alex Y Y N Y
|
||||
sparc/sun/solaris2.6 gcc 2.95.3 0.7.x-CVS 03-04-22 alex Y Y Y Y
|
||||
sparc/sun/solaris2.7 gcc 3.3 0.8.0 04-05-30 alex Y Y Y Y
|
||||
sparc/unkn./netbsdelf1.6.1 gcc 2.95.3 0.8.0 04-05-30 alex Y Y Y Y
|
||||
sparc/unknown/openbsd5.5 gcc 4.2.1 21.1 14-05-03 goetz Y Y Y Y 3
|
||||
x86_64/apple/darwin10.8.0 gcc 4.2.1 21~rc2 13-10-30 alex Y Y Y Y 3
|
||||
x86_64/apple/darwin12.3.0 gcc 4.2.1 20.2 13-04-01 alex Y Y Y Y 3
|
||||
x86_64/apple/darwin13.0.0 A-clang 5.0 21~rc2 13-10-20 alex Y Y Y Y 3
|
||||
x86_64/unknown/freebsd8.4 gcc 4.2.1 21~rc2 13-10-27 alex Y Y Y Y 3
|
||||
x86_64/unknown/freebsd9.1 gcc 4.2.1 21~rc2 13-10-27 alex Y Y Y Y 3
|
||||
x86_64/apple/darwin13.0.0 A-clang 5.0 21 14-01-02 alex Y Y Y Y 3
|
||||
x86_64/apple/darwin14.5.0 A-clang 6.1 23~rc1 15-09-06 alex Y Y Y Y 3
|
||||
x86_64/apple/darwin15.6.0 A-clang 8.0 23~38-g455 16-11-04 alex Y Y Y Y 3
|
||||
x86_64/apple/darwin16.5.0 A-clang 8.1 25~rc1-7-g 18-11-04 alex Y Y Y Y 3
|
||||
x86_64/apple/darwin17.7.0 A-clang 10.0 25~rc1 18-11-04 alex Y Y Y Y 3
|
||||
x86_64/apple/darwin18.2.0 A-clang 10.0 25~rc1-11 19-01-23 alex Y Y Y Y 3
|
||||
x86_64/apple/darwin19.0.0 A-clang 11.0 25~19-g928 19-12-07 alex Y Y Y Y 3
|
||||
x86_64/unknown/dragonfly3.4 gcc 4.7.2 21 13-11-12 goetz Y Y N Y 3
|
||||
x86_64/unkn./freebsd8.1-gnu gcc 4.4.5 19 12-02-26 alex Y Y Y Y 3
|
||||
x86_64/unknown/linux-gnu clang 3.2 21~rc2 13-10-20 alex Y Y Y Y 1
|
||||
x86_64/unknown/linux-gnu gcc 4.8.1 21~rc2 13-10-20 alex Y Y Y Y 1
|
||||
x86_64/unknown/linux-gnu Open64 20.3 13-10-16 goetz Y Y Y Y 1
|
||||
x86_64/unknown/linux-gnu tcc 0.9.25 20.3 13-10-16 goetz Y Y Y Y 1
|
||||
x86_64/unknown/freebsd8.4 gcc 4.2.1 24~rc1-7 17-01-20 alex Y Y Y Y 3
|
||||
x86_64/unknown/freebsd9.2 gcc 4.2.1 22~rc1-3 14-10-10 alex Y Y Y Y 3
|
||||
x86_64/unknown/freebsd10.3 F-clang 3.4 24 17-01-20 goetz Y Y Y Y 3
|
||||
x86_64/unknown/freebsd11.0 F-clang 3.8 24 17-01-21 goetz Y Y Y Y 3
|
||||
x86_64/unknown/haiku gcc 7.3.0 25~rc1-11 19-01-06 alex Y Y N Y
|
||||
x86_64/unknown/linux-gnu clang 3.3 21 14-01-07 alex Y Y Y Y 1
|
||||
x86_64/unknown/linux-gnu clang 3.4 22~rc1-3 14-10-11 alex Y Y Y Y 1
|
||||
x86_64/pc/linux-gnu gcc 4.4.5 24~rc1-7 17-01-20 alex Y Y Y Y 1
|
||||
x86_64/unknown/linux-gnu gcc 4.7.2 23~rc1-3 15-11-15 alex Y Y Y Y 1
|
||||
x86_64/pc/linux-gnu gcc 4.8.4 24~rc1-7 17-01-20 alex Y Y Y Y 1
|
||||
x86_64/pc/linux-gnu gcc 4.9.2 24~rc1-7 17-01-20 alex Y Y Y Y 1
|
||||
x86_64/unknown/linux-gnu gcc 5.3.0 23 15-12-14 goetz Y Y Y Y 1
|
||||
x86_64/pc/linux-gnu [WSL] gcc 5.4.0 24 18-03-07 goetz Y Y y Y 7
|
||||
x86_64/pc/linux-gnu gcc 6.2.1 24~rc1-7 17-01-20 alex Y Y Y Y 1
|
||||
x86_64/pc/linux-gnu gcc 6.3.0 25~rc1-11 19-01-23 alex Y Y Y Y 1
|
||||
x86_64/unknown/linux-gnu icc 16 23 16-01-13 goetz Y Y Y Y 1
|
||||
x86_64/unknown/linux-gnu nwcc 0.8.2 21 13-12-01 goetz Y Y Y Y 1
|
||||
x86_64/unknown/linux-gnu Open64 21.1 14-03-27 goetz Y Y Y Y 1
|
||||
x86_64/unknown/linux-gnu Sun C 5.12 21.1 14-03-27 goetz Y Y Y Y 1
|
||||
x86_64/unknown/openbsd4.7 gcc 3.3.5 20~rc1 12-02-26 alex Y Y Y Y 3
|
||||
x86_64/unknown/openbsd4.8 gcc 4.2.1 21~rc2 13-10-27 alex Y Y Y Y 3
|
||||
x86_64/unknown/openbsd5.1 gcc 4.2.1 21~rc2 13-10-27 alex Y Y Y Y 3
|
||||
x86_64/unknown/openbsd4.8 gcc 4.2.1 22~rc1-3 14-10-10 alex Y Y y Y 3
|
||||
x86_64/unknown/openbsd5.1 gcc 4.2.1 21 13-12-28 alex Y Y Y Y 3
|
||||
x86_64/unknown/openbsd5.5 gcc 4.2.1 22~rc1-3 14-10-10 alex Y Y Y Y 3
|
||||
|
||||
|
||||
* Notes
|
||||
~~~~~~~
|
||||
|
||||
(1) */*/linux-gnu (Linux platforms):
|
||||
ngIRCd has been tested with various Linux distributions, such as SuSE,
|
||||
RedHat, Debian, and Gentoo using Kernels 2.2.x, 2.4.x and 2.6.x with
|
||||
various versions of the GNU C compiler (starting with 2.95.x and up to
|
||||
version 4.3.x). The eldest glibc used was glibc-2.0.7. ngIRCd compiled
|
||||
and run on all these systems without problems.
|
||||
Actual Linux kernels (2.6.x) and glibc's support the epoll() IO interface.
|
||||
ngIRCd has been tested with various Linux distributions, such as ArchLinux,
|
||||
Debian, Gentoo, Red Hat (Fedora) and SuSE using Linux kernels 2.2.x, 2.4.x,
|
||||
2.6.x, 3.x, and 4.x, with various versions of the GNU C compiler (starting
|
||||
with 2.95.x) and Clang. The eldest glibc used was glibc-2.0.7.
|
||||
ngIRCd compiled and ran on all of these systems successfully.
|
||||
Current Linux kernels (starting with 2.6.x) and glibc's support the more
|
||||
efficient epoll() IO interface, see (5) below.
|
||||
|
||||
(2) This compiler is an pre-ANSI C compiler, therefore the source code is
|
||||
(2) This compiler is a pre-ANSI C compiler (K&R), therefore the source code is
|
||||
automatically converted using the included ansi2knr tool while building.
|
||||
|
||||
(3) Using the kqueue() IO interface.
|
||||
@@ -111,3 +149,9 @@ x86_64/unknown/openbsd5.1 gcc 4.2.1 21~rc2 13-10-27 alex Y Y Y Y 3
|
||||
(4) Using the /dev/poll IO interface.
|
||||
|
||||
(5) Using the epoll() IO interface.
|
||||
|
||||
(6) ngIRCd has been cross-compiled with gcc 4.8 on Ubuntu x86-64 for
|
||||
MIPSEL Linux OpenWRT distribution (uclibc), for the target computer
|
||||
Vocore2, where the created binary ran well.
|
||||
|
||||
(7) This actually is Windows 10 running Windows Subsystem for Linux (WSL).
|
||||
|
@@ -2,7 +2,7 @@
|
||||
ngIRCd - Next Generation IRC Server
|
||||
http://ngircd.barton.de/
|
||||
|
||||
(c)2001-2012 Alexander Barton and Contributors.
|
||||
(c)2001-2019 Alexander Barton and Contributors.
|
||||
ngIRCd is free software and published under the
|
||||
terms of the GNU General Public License.
|
||||
|
||||
@@ -26,6 +26,12 @@ 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".
|
||||
|
||||
In addition, ngIRCd implements some "IRCv3" features. This includes:
|
||||
- IRCv3 Client Capability Negotiation
|
||||
- IRCv3.1 multi-prefix Extension
|
||||
- IRCv3.2 userhost-in-names Extension
|
||||
Please see the IRCv3 homepage for more information: <https://ircv3.net>.
|
||||
|
||||
|
||||
II. The IRC+ Protocol
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
@@ -176,7 +182,7 @@ channel mode). In this case <limit> should be "0".
|
||||
II.4 Update webchat/proxy client information
|
||||
|
||||
Command: WEBIRC
|
||||
Parameters: <password> <username> <hostname> <ip-address>
|
||||
Parameters: <password> <username> <hostname> <ip-address> [<ignored>]
|
||||
Used by: unregistered clients only
|
||||
|
||||
The WEBIRC command is used by some Web-to-IRC gateways to set the correct
|
||||
@@ -186,6 +192,9 @@ first command sent to the server, even before USER and NICK commands!
|
||||
The <password> must be set in the server configuration file to prevent
|
||||
unauthorized clients to fake their identity; it is an arbitrary string.
|
||||
|
||||
Optionally, a 5th parameter is accepted to comply with an IRCv3 extension,
|
||||
see <https://github.com/ircv3/ircv3-ideas/issues/12>, but ignored.
|
||||
|
||||
|
||||
II.5 Client character encoding conversion
|
||||
|
||||
|
@@ -22,7 +22,7 @@ The following software packages are needed:
|
||||
- GNU sed
|
||||
Source:
|
||||
http://www.rezepte-im-web.de/appleux/sed-3.02.tar.gz
|
||||
ftp://arthur.barton.de/pub/unix/aux/tools/sed-3.02.tar.gz
|
||||
http://arthur.barton.de/pub/unix/aux/tools/sed-3.02.tar.gz
|
||||
|
||||
A/UX comes with /bin/sed which isn't supporting all functions needed
|
||||
by GNU automake/autoconf.
|
||||
@@ -34,7 +34,7 @@ The following software packages are needed:
|
||||
- libUTIL.a
|
||||
Source:
|
||||
ftp://ftp.mayn.de/pub/really_old_stuff/apple/apple_unix/Sys_stuff/libUTIL-2.1.tar.gz>
|
||||
ftp://arthur.barton.de/pub/unix/aux/libraries/libUTIL-2.1.tar.gz
|
||||
http://arthur.barton.de/pub/unix/aux/libraries/libUTIL-2.1.tar.gz
|
||||
|
||||
This library contains functions that are common on other UNIX
|
||||
systems but not on A/UX e.g. memmove(), strerror() and strdup().
|
||||
@@ -50,7 +50,7 @@ A few hints in case of errors:
|
||||
(so 'configure' uses its own shell script) or use a fully functionable one.
|
||||
There's at least one binary "out there" causing problems. The one
|
||||
of the GNU fileutils works fine:
|
||||
ftp://arthur.barton.de/pub/unix/aux/tools/fileutils-4.0.tar.gz
|
||||
http://arthur.barton.de/pub/unix/aux/tools/fileutils-4.0.tar.gz
|
||||
|
||||
- The precompiled binary of the old 'bash' shouldn't be installed within
|
||||
/bin (better do this in /usr/local/bin) because 'configure' would
|
||||
|
13
doc/RFC.txt
13
doc/RFC.txt
@@ -1,9 +1,8 @@
|
||||
|
||||
ngIRCd - Next Generation IRC Server
|
||||
http://ngircd.barton.de/
|
||||
|
||||
(c)2001-2003 by Alexander Barton,
|
||||
alex@barton.de, http://www.barton.de/
|
||||
|
||||
(c)2001-2017 Alexander Barton and Contributors.
|
||||
ngIRCd is free software and published under the
|
||||
terms of the GNU General Public License.
|
||||
|
||||
@@ -11,7 +10,8 @@
|
||||
|
||||
|
||||
The Internet Relay Chat (IRC) protocol is documented in these Request for
|
||||
Comments (RFC), which you can get e.g. via <http://www.faqs.org/>:
|
||||
Comments (RFCs), which you can get via <http://www.faqs.org/rfcs/> or
|
||||
<https://www.ietf.org/rfc.html> for example.
|
||||
|
||||
1459 Oikarinen, J. & D. Reed, "Internet Relay Chat Protocol",
|
||||
May 1993, [IRC].
|
||||
@@ -28,6 +28,5 @@ Comments (RFC), which you can get e.g. via <http://www.faqs.org/>:
|
||||
2813 Kalt, C., "Internet Relay Chat: Server Protocol",
|
||||
April 2000, [IRC-SERVER].
|
||||
|
||||
|
||||
--
|
||||
$Id: RFC.txt,v 1.6 2003/03/07 20:42:20 alex Exp $
|
||||
7194 Hartmann, R., "Default Port for Internet Relay Chat (IRC) via TLS/SSL",
|
||||
August 2014.
|
||||
|
@@ -34,6 +34,10 @@ services instead of regular IRC users.
|
||||
|
||||
Example:
|
||||
|
||||
[GLOBAL]
|
||||
Name = server.irc.net
|
||||
Ports = 6667
|
||||
|
||||
[SERVER]
|
||||
Name = services.irc.net
|
||||
MyPassword = 123abc
|
||||
@@ -41,8 +45,8 @@ Example:
|
||||
ServiceMask = *Serv
|
||||
|
||||
|
||||
Setting up Anope 1.9.x
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
Setting up Anope 1.9.x & 2.x
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Anope 1.9.8 or later (<http://www.anope.org/>) can be used with ngIRCd using
|
||||
the "ngircd" protocol module.
|
||||
@@ -66,20 +70,28 @@ In conf/services.conf:
|
||||
}
|
||||
|
||||
# Load ngIRCd protocol module
|
||||
module { name = "ngircd" }
|
||||
module
|
||||
{
|
||||
name = "ngircd"
|
||||
}
|
||||
|
||||
networkinfo
|
||||
{
|
||||
# Must be set to the "MaxNickLength" setting of ngIRCd!
|
||||
nicklen = 9
|
||||
|
||||
# When not using "strict mode", which is the default:
|
||||
userlen = 20
|
||||
|
||||
chanlen = 50
|
||||
}
|
||||
|
||||
In conf/nickserv.conf:
|
||||
|
||||
nickserv
|
||||
module
|
||||
{
|
||||
name = "nickserv"
|
||||
|
||||
# not required if you are running ngIRCd with a higher nickname limit
|
||||
# ("MaxNickLength") than 11 characters, but REQUIRED by default!
|
||||
guestnickprefix = "G-"
|
||||
@@ -96,6 +108,10 @@ The following settings need to be in atheme.conf:
|
||||
|
||||
loadmodule "modules/protocol/ngircd";
|
||||
|
||||
serverinfo {
|
||||
name = "services.irc.net";
|
||||
}
|
||||
|
||||
uplink "server.irc.net" {
|
||||
password = "123abc";
|
||||
port = 6667;
|
||||
@@ -115,7 +131,7 @@ Please note that versions up to and including 5.1.3 contain a bug that
|
||||
sometimes causes IRC Services to hang on startup. There are two workarounds:
|
||||
a) send the services process a HUP signal ("killall -HUP ircservices")
|
||||
b) apply this patch to the IRC Services source tree:
|
||||
<ftp://ngircd.barton.de/ngircd/contrib/IRCServices513-FlushBuffer.patch>
|
||||
<http://arthur.barton.de/pub/ngircd/contrib/IRCServices513-FlushBuffer.patch>
|
||||
|
||||
At least the following settings have to be tweaked, in addition to all the
|
||||
settings marked as required by IRC Services:
|
||||
|
@@ -51,9 +51,15 @@
|
||||
# be shown to all users connecting to the server:
|
||||
;MotdFile = :ETCDIR:/ngircd.motd
|
||||
|
||||
# A simple Phrase (<256 chars) if you don't want to use a motd file.
|
||||
# A simple Phrase (<127 chars) if you don't want to use a motd file.
|
||||
;MotdPhrase = "Hello world!"
|
||||
|
||||
# The name of the IRC network to which this server belongs. This name
|
||||
# is optional, should only contain ASCII characters, and can't contain
|
||||
# spaces. It is only used to inform clients. The default is empty,
|
||||
# so no network name is announced to clients.
|
||||
;Network = aIRCnetwork
|
||||
|
||||
# Global password for all users needed to connect to the server.
|
||||
# (Default: not set)
|
||||
;Password = abc
|
||||
@@ -111,6 +117,12 @@
|
||||
# maximum nickname length!
|
||||
;MaxNickLength = 9
|
||||
|
||||
# Maximum penalty time increase in seconds, per penalty event. Set to -1
|
||||
# for no limit (the default), 0 to disable penalties altogether. The
|
||||
# daemon doesn't use penalty increases higher than 2 seconds during
|
||||
# normal operation, so values greater than 1 rarely make sense.
|
||||
;MaxPenaltyTime = -1
|
||||
|
||||
# Maximum number of channels returned in response to a /list
|
||||
# command (0: unlimited):
|
||||
;MaxListSize = 100
|
||||
@@ -166,8 +178,8 @@
|
||||
;ConnectIPv4 = yes
|
||||
|
||||
# Default user mode(s) to set on new local clients. Please note that
|
||||
# only modes can be set that the client could set on itself, you can't
|
||||
# set "a" (away) or "o" (IRC Op), for example! Default: none.
|
||||
# only modes can be set that the client could set using regular MODE
|
||||
# commands, you can't set "a" (away) for example! Default: none.
|
||||
;DefaultUserModes = i
|
||||
|
||||
# Do DNS lookups when a client connects to the server.
|
||||
@@ -187,9 +199,9 @@
|
||||
;MorePrivacy = no
|
||||
|
||||
# Normally ngIRCd doesn't send any messages to a client until it is
|
||||
# registered. Enable this option to let the daemon send "NOTICE AUTH"
|
||||
# registered. Enable this option to let the daemon send "NOTICE *"
|
||||
# messages to clients while connecting.
|
||||
;NoticeAuth = no
|
||||
;NoticeBeforeRegistration = no
|
||||
|
||||
# Should IRC Operators be allowed to use the MODE command even if
|
||||
# they are not(!) channel-operators?
|
||||
@@ -220,6 +232,15 @@
|
||||
# character prepended to their respective user names!
|
||||
;PAMIsOptional = no
|
||||
|
||||
# When PAM is enabled, this value determines the used PAM
|
||||
# configuration.
|
||||
# This setting allows to run multiple ngIRCd instances with
|
||||
# different PAM configurations on each instance.
|
||||
# If you set it to "ngircd-foo", PAM will use
|
||||
# /etc/pam.d/ngircd-foo instead of the default
|
||||
# /etc/pam.d/ngircd.
|
||||
;PAMServiceName = ngircd
|
||||
|
||||
# Let ngIRCd send an "authentication PING" when a new client connects,
|
||||
# and register this client only after receiving the corresponding
|
||||
# "PONG" reply.
|
||||
@@ -253,9 +274,9 @@
|
||||
# See 'man 1ssl ciphers' (OpenSSL) or 'man 3 gnutls_priority_init'
|
||||
# (GnuTLS) for details.
|
||||
# For OpenSSL:
|
||||
;CipherList = HIGH:!aNULL:@STRENGTH
|
||||
;CipherList = HIGH:!aNULL:@STRENGTH:!SSLv3
|
||||
# For GnuTLS:
|
||||
;CipherList = SECURE128
|
||||
;CipherList = SECURE128:-VERS-SSL3.0
|
||||
|
||||
# Diffie-Hellman parameters
|
||||
;DHFile = :ETCDIR:/ssl/dhparams.pem
|
||||
@@ -288,7 +309,7 @@
|
||||
[Server]
|
||||
# Other servers are configured in [Server] sections. If you
|
||||
# configure a port for the connection, then this ngircd tries to
|
||||
# connect to to the other server on the given port; if not it waits
|
||||
# connect to the other server on the given port; if not it waits
|
||||
# for the other server to connect.
|
||||
# There may be more than one server block, one for each server.
|
||||
#
|
||||
@@ -364,19 +385,16 @@
|
||||
# Topic for this channel
|
||||
;Topic = a great topic
|
||||
|
||||
# Initial channel modes
|
||||
;Modes = tnk
|
||||
|
||||
# initial channel password (mode k)
|
||||
;Key = Secret
|
||||
# Initial channel modes, as used in "MODE" commands. Modifying lists
|
||||
# (ban list, invite list, exception list) is supported.
|
||||
# This option can be specified multiple times, evaluated top to bottom.
|
||||
;Modes = +tnk mykey +l 5
|
||||
;Modes = +b nick!~user@bad.host.example.com
|
||||
|
||||
# Key file, syntax for each line: "<user>:<nick>:<key>".
|
||||
# Default: none.
|
||||
;KeyFile = :ETCDIR:/#chan.key
|
||||
|
||||
# maximum users per channel (mode l)
|
||||
;MaxUsers = 23
|
||||
|
||||
[Channel]
|
||||
# More [Channel] sections, if you like ...
|
||||
|
||||
|
1
doc/src/.gitignore
vendored
1
doc/src/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
html
|
2
man/.gitignore
vendored
2
man/.gitignore
vendored
@@ -1,2 +0,0 @@
|
||||
ngircd.8
|
||||
ngircd.conf.5
|
@@ -1,7 +1,7 @@
|
||||
.\"
|
||||
.\" ngircd(8) manual page template
|
||||
.\"
|
||||
.TH ngircd 8 "Oct 2013" ngIRCd "ngIRCd Manual"
|
||||
.TH ngircd 8 "May 2020" ngIRCd "ngIRCd Manual"
|
||||
.SH NAME
|
||||
ngIRCd \- the "next generation" IRC daemon
|
||||
.SH SYNOPSIS
|
||||
|
@@ -1,7 +1,7 @@
|
||||
.\"
|
||||
.\" ngircd.conf(5) manual page template
|
||||
.\"
|
||||
.TH ngircd.conf 5 "Oct 2013" ngIRCd "ngIRCd Manual"
|
||||
.TH ngircd.conf 5 "May 2020" ngIRCd "ngIRCd Manual"
|
||||
.SH NAME
|
||||
ngircd.conf \- configuration file of ngIRCd
|
||||
.SH SYNOPSIS
|
||||
@@ -60,7 +60,7 @@ The main configuration of the server is stored in the
|
||||
section, like the server name, administrative information and the ports on
|
||||
which the server should be listening. The variables in this section have to be
|
||||
adjusted to the local requirements most of the time, whereas all the variables
|
||||
in the other sections can be left on there defaults very often.
|
||||
in the other sections can be left on their defaults very often.
|
||||
.PP
|
||||
Options in the
|
||||
.I [Limits]
|
||||
@@ -82,12 +82,13 @@ sections. And
|
||||
blocks are used to configure pre-defined ("persistent") IRC channels.
|
||||
.PP
|
||||
There can be more than one [Operator], [Server] and [Channel] section per
|
||||
configuration file (one for each operator, server, and channel), but only
|
||||
exactly one [Global], one [Limits], one [Options], and one [SSL] section.
|
||||
configuration file, one for each operator, server, and channel. [Global],
|
||||
[Limits], [Options], and [SSL] sections can occur multiple times, too, but
|
||||
each variable overwrites itself, only the last assignment is relevant.
|
||||
.SH [GLOBAL]
|
||||
The
|
||||
.I [Global]
|
||||
section of this file is used to define the main configuration of the server,
|
||||
section is used to define the main configuration of the server,
|
||||
like the server name and the ports on which the server should be listening.
|
||||
These settings depend on your personal preferences, so you should make sure
|
||||
that they correspond to your installation and setup!
|
||||
@@ -124,7 +125,13 @@ take effect when ngircd starts up or is instructed to re-read its
|
||||
configuration file.
|
||||
.TP
|
||||
\fBMotdPhrase\fR (string)
|
||||
A simple Phrase (<256 chars) if you don't want to use a MOTD file.
|
||||
A simple Phrase (<127 chars) if you don't want to use a MOTD file.
|
||||
.TP
|
||||
\fBNetwork\fR (string)
|
||||
The name of the IRC network to which this server belongs. This name is
|
||||
optional, should only contain ASCII characters, and can't contain spaces.
|
||||
It is only used to inform clients. The default is empty, so no network
|
||||
name is announced to clients.
|
||||
.TP
|
||||
\fBPassword\fR (string)
|
||||
Global password for all users needed to connect to the server. The default is
|
||||
@@ -133,16 +140,16 @@ if ngIRCd is using PAM!
|
||||
.TP
|
||||
\fBPidFile\fR (string)
|
||||
This tells ngIRCd to write its current process ID to a file. Note that the
|
||||
"PID file" is written AFTER chroot and switching the user ID, e.g. the directory
|
||||
the file resides in must be writable by the ngIRCd user and exist in the
|
||||
chroot directory (if configured, see above).
|
||||
"PID file" is written AFTER chroot and switching the user ID, therefore the
|
||||
directory the file resides in must be writable by the ngIRCd user and exist
|
||||
in the chroot directory (if configured, see above).
|
||||
.TP
|
||||
\fBPorts\fR (list of numbers)
|
||||
Ports on which the server should listen for unencrypted connections. There
|
||||
may be more than one port, separated with commas (","). Default: 6667.
|
||||
Port number(s) on which the server should listen for unencrypted connections.
|
||||
There may be more than one port, separated with commas (","). Default: 6667.
|
||||
.TP
|
||||
\fBServerGID\fR (string or number)
|
||||
Group ID under which the ngIRCd should run; you can use the name of the
|
||||
Group ID under which the ngIRCd daemon should run; you can use the name of the
|
||||
group or the numerical ID.
|
||||
.PP
|
||||
.RS
|
||||
@@ -152,8 +159,8 @@ For this to work the server must have been started with root privileges!
|
||||
.RE
|
||||
.TP
|
||||
\fBServerUID\fR (string or number)
|
||||
User ID under which the server should run; you can use the name of the user
|
||||
or the numerical ID.
|
||||
User ID under which the ngIRCd daemon should run; you can use the name of the
|
||||
user or the numerical ID.
|
||||
.PP
|
||||
.RS
|
||||
.B Attention:
|
||||
@@ -163,8 +170,8 @@ addition, the configuration and MOTD files must be readable by this user,
|
||||
otherwise RESTART and REHASH won't work!
|
||||
.RE
|
||||
.SH [LIMITS]
|
||||
Define some limits and timeouts for this ngIRCd instance. Default values
|
||||
should be safe, but it is wise to double-check :-)
|
||||
This section is used to define some limits and timeouts for this ngIRCd
|
||||
instance. Default values should be safe, but it is wise to double-check :-)
|
||||
.TP
|
||||
\fBConnectRetry\fR (number)
|
||||
The server tries every <ConnectRetry> seconds to establish a link to not yet
|
||||
@@ -194,6 +201,12 @@ Maximum length of an user nickname (Default: 9, as in RFC 2812). Please
|
||||
note that all servers in an IRC network MUST use the same maximum nickname
|
||||
length!
|
||||
.TP
|
||||
\fBMaxPenaltyTime\fR (number)
|
||||
Maximum penalty time increase in seconds, per penalty event. Set to -1 for no
|
||||
limit (the default), 0 to disable penalties altogether. ngIRCd doesn't use
|
||||
penalty increases higher than 2 seconds during normal operation, so values
|
||||
greater than 1 rarely make sense.
|
||||
.TP
|
||||
\fBMaxListSize\fR (number)
|
||||
Maximum number of channels returned in response to a LIST command. Default: 100.
|
||||
.TP
|
||||
@@ -206,8 +219,8 @@ If a client fails to answer a PING with a PONG within <PongTimeout>
|
||||
seconds, it will be disconnected by the server. Default: 20.
|
||||
.SH [OPTIONS]
|
||||
Optional features and configuration options to further tweak the behavior of
|
||||
ngIRCd. If you want to get started quickly, you most probably don't have to
|
||||
make changes here -- they are all optional.
|
||||
ngIRCd are configured in this section. If you want to get started quickly, you
|
||||
most probably don't have to make changes here -- they are all optional.
|
||||
.TP
|
||||
\fBAllowedChannelTypes\fR (string)
|
||||
List of allowed channel types (channel prefixes) for newly created channels
|
||||
@@ -216,9 +229,9 @@ Set this variable to the empty string to disallow creation of new channels
|
||||
by local clients at all. Default: #&+
|
||||
.TP
|
||||
\fBAllowRemoteOper\fR (boolean)
|
||||
Are IRC operators connected to remote servers allowed to control this server,
|
||||
e.g. are they allowed to use administrative commands like CONNECT, DIE,
|
||||
SQUIT, ... that affect this server? Default: no.
|
||||
If this option is active, IRC operators connected to remote servers are allowed
|
||||
to control this local server using administrative commands, for example like
|
||||
CONNECT, DIE, SQUIT etc. Default: no.
|
||||
.TP
|
||||
\fBChrootDir\fR (string)
|
||||
A directory to chroot in when everything is initialized. It doesn't need
|
||||
@@ -245,8 +258,8 @@ The Salt for cloaked hostname hashing. When undefined a random hash is
|
||||
generated after each server start.
|
||||
.TP
|
||||
\fBCloakUserToNick\fR (boolean)
|
||||
Set every clients' user name to their nickname and hide the one supplied
|
||||
by the IRC client. Default: no.
|
||||
Set every clients' user name and real name to their nickname and hide the one
|
||||
supplied by the IRC client. Default: no.
|
||||
.TP
|
||||
\fBConnectIPv4\fR (boolean)
|
||||
Set this to no if you do not want ngIRCd to connect to other IRC servers using
|
||||
@@ -260,8 +273,8 @@ Default: yes.
|
||||
.TP
|
||||
\fBDefaultUserModes\fR (string)
|
||||
Default user mode(s) to set on new local clients. Please note that only modes
|
||||
can be set that the client could set on itself, you can't set "a" (away) or
|
||||
"o" (IRC Op), for example!
|
||||
can be set that the client could set using regular MODE commands, you can't
|
||||
set "a" (away) for example!
|
||||
Default: none.
|
||||
.TP
|
||||
\fBDNS\fR (boolean)
|
||||
@@ -277,23 +290,24 @@ Users identified using IDENT are registered without the "~" character
|
||||
prepended to their user name.
|
||||
Default: yes.
|
||||
.TP
|
||||
.TP
|
||||
\fBIncludeDir\fR (string)
|
||||
Directory containing configuration snippets (*.conf), that should be read in
|
||||
after parsing the current configuration file.
|
||||
Default: none.
|
||||
.TP
|
||||
\fBMorePrivacy\fR (boolean)
|
||||
This will cause ngIRCd to censor user idle time, logon time as well as the
|
||||
part/quit messages (that are sometimes used to inform everyone about which
|
||||
client software is being used). WHOWAS requests are also silently ignored.
|
||||
PART/QUIT messages (that are sometimes used to inform everyone about which
|
||||
client software is being used). WHOWAS requests are also silently ignored,
|
||||
and NAMES output doesn't list any clients for non-members.
|
||||
This option is most useful when ngIRCd is being used together with
|
||||
anonymizing software such as TOR or I2P and one does not wish to make it
|
||||
too easy to collect statistics on the users.
|
||||
Default: no.
|
||||
.TP
|
||||
\fBNoticeAuth\fR (boolean)
|
||||
\fBNoticeBeforeRegistration\fR (boolean)
|
||||
Normally ngIRCd doesn't send any messages to a client until it is registered.
|
||||
Enable this option to let the daemon send "NOTICE AUTH" messages to clients
|
||||
Enable this option to let the daemon send "NOTICE *" messages to clients
|
||||
while connecting. Default: no.
|
||||
.TP
|
||||
\fBOperCanUseMode\fR (boolean)
|
||||
@@ -331,6 +345,14 @@ able to distinguish between Ident'ified and PAM-authenticated users: both
|
||||
don't have a "~" character prepended to their respective user names!
|
||||
Default: no.
|
||||
.TP
|
||||
\fBPAMServiceName\fR (string)
|
||||
When PAM is enabled, this value determines the used PAM configuration.
|
||||
This setting allows running multiple ngIRCd instances with different
|
||||
PAM configurations on each instance. If you set it to "ngircd-foo",
|
||||
PAM will use /etc/pam.d/ngircd-foo instead of the default
|
||||
/etc/pam.d/ngircd.
|
||||
Default: ngircd.
|
||||
.TP
|
||||
\fBRequireAuthPing\fR (boolean)
|
||||
Let ngIRCd send an "authentication PING" when a new client connects, and
|
||||
register this client only after receiving the corresponding "PONG" reply.
|
||||
@@ -368,7 +390,7 @@ SSL Certificate file of the private server key.
|
||||
.TP
|
||||
\fBCipherList\fR (string)
|
||||
Select cipher suites allowed for SSL/TLS connections. This defaults to
|
||||
"HIGH:!aNULL:@STRENGTH" (OpenSSL) or "SECURE128" (GnuTLS).
|
||||
"HIGH:!aNULL:@STRENGTH:!SSLv3" (OpenSSL) or "SECURE128:-VERS-SSL3.0" (GnuTLS).
|
||||
Please see 'man 1ssl ciphers' (OpenSSL) and 'man 3 gnutls_priority_init'
|
||||
(GnuTLS) for details.
|
||||
.TP
|
||||
@@ -410,7 +432,7 @@ Example: nick!ident@*.example.com
|
||||
Other servers are configured in
|
||||
.I [Server]
|
||||
sections. If you configure a port for the connection, then this ngIRCd
|
||||
tries to connect to to the other server on the given port (active);
|
||||
tries to connect to the other server on the given port (active);
|
||||
if not, it waits for the other server to connect (passive).
|
||||
.PP
|
||||
ngIRCd supports "server groups": You can assign an "ID" to every server
|
||||
@@ -488,10 +510,12 @@ Name of the channel, including channel prefix ("#" or "&").
|
||||
Topic for this channel.
|
||||
.TP
|
||||
\fBModes\fR (string)
|
||||
Initial channel modes.
|
||||
.TP
|
||||
\fBKey\fR (string)
|
||||
Sets initial channel key (only relevant if channel mode "k" is set).
|
||||
Initial channel modes, as used in "MODE" commands. Modifying lists (ban list,
|
||||
invite list, exception list) is supported.
|
||||
.PP
|
||||
.RS
|
||||
This option can be specified multiple times, evaluated top to bottom.
|
||||
.RE
|
||||
.TP
|
||||
\fBKeyFile\fR (string)
|
||||
Path and file name of a "key file" containing individual channel keys for
|
||||
@@ -535,10 +559,6 @@ The file is not reopened on each access, so you can modify and overwrite it
|
||||
without problems, but moving or deleting the file will have not effect until
|
||||
the daemon re-reads its configuration!
|
||||
.RE
|
||||
.TP
|
||||
\fBMaxUsers\fR (number)
|
||||
Set maximum user limit for this channel (only relevant if channel mode "l"
|
||||
is set).
|
||||
.SH HINTS
|
||||
It's wise to use "ngircd \-\-configtest" to validate the configuration file
|
||||
after changing it. See
|
||||
|
4
src/.gitignore
vendored
4
src/.gitignore
vendored
@@ -1,4 +0,0 @@
|
||||
config.h
|
||||
config.h.in
|
||||
config.h.in~
|
||||
stamp-h1
|
1
src/ipaddr/.gitignore
vendored
1
src/ipaddr/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
Makefile.am
|
@@ -23,7 +23,7 @@
|
||||
GLOBAL bool
|
||||
ng_ipaddr_init(ng_ipaddr_t *addr, const char *ip_str, UINT16 port)
|
||||
{
|
||||
#ifdef HAVE_GETADDRINFO
|
||||
#ifdef HAVE_WORKING_GETADDRINFO
|
||||
int ret;
|
||||
char portstr[64];
|
||||
struct addrinfo *res0;
|
||||
|
@@ -4,6 +4,7 @@
|
||||
|
||||
#ifndef NG_IPADDR_HDR
|
||||
#define NG_IPADDR_HDR
|
||||
|
||||
#include "portab.h"
|
||||
|
||||
/**
|
||||
@@ -12,6 +13,7 @@
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
|
||||
|
5
src/ngircd/.gitignore
vendored
5
src/ngircd/.gitignore
vendored
@@ -1,5 +0,0 @@
|
||||
Makefile.am
|
||||
check-help
|
||||
check-version
|
||||
ngircd
|
||||
ngircd.exe
|
@@ -14,16 +14,19 @@
|
||||
* Functions to dynamically allocate arrays.
|
||||
*/
|
||||
|
||||
/* Additionan debug messages related to array handling: 0=off / 1=on */
|
||||
#define DEBUG_ARRAY 0
|
||||
|
||||
#include "array.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "log.h"
|
||||
|
||||
/* Enable more Debug messages in alloc / append / memmove code. */
|
||||
/* #define DEBUG_ARRAY */
|
||||
#if DEBUG_ARRAY
|
||||
# include "log.h"
|
||||
#endif
|
||||
|
||||
#define array_UNUSABLE(x) ( !(x)->mem )
|
||||
|
||||
@@ -64,7 +67,7 @@ array_alloc(array * a, size_t size, size_t pos)
|
||||
return NULL;
|
||||
|
||||
if (a->allocated < alloc) {
|
||||
#ifdef DEBUG_ARRAY
|
||||
#if DEBUG_ARRAY
|
||||
Log(LOG_DEBUG, "array_alloc(): changing size from %u to %u bytes.",
|
||||
a->allocated, alloc);
|
||||
#endif
|
||||
@@ -165,7 +168,7 @@ array_catb(array * dest, const char *src, size_t len)
|
||||
|
||||
assert(ptr != NULL);
|
||||
|
||||
#ifdef DEBUG_ARRAY
|
||||
#if DEBUG_ARRAY
|
||||
Log(LOG_DEBUG,
|
||||
"array_catb(): appending %u bytes to array (now %u bytes in array).",
|
||||
len, tmp);
|
||||
@@ -245,7 +248,7 @@ void
|
||||
array_free(array * a)
|
||||
{
|
||||
assert(a != NULL);
|
||||
#ifdef DEBUG_ARRAY
|
||||
#if DEBUG_ARRAY
|
||||
Log(LOG_DEBUG,
|
||||
"array_free(): %u bytes free'd (%u bytes still used at time of free()).",
|
||||
a->allocated, a->used);
|
||||
@@ -311,7 +314,7 @@ array_moveleft(array * a, size_t membersize, size_t pos)
|
||||
if (!bytepos)
|
||||
return; /* nothing to do */
|
||||
|
||||
#ifdef DEBUG_ARRAY
|
||||
#if DEBUG_ARRAY
|
||||
Log(LOG_DEBUG,
|
||||
"array_moveleft(): %u bytes used in array, starting at position %u.",
|
||||
a->used, bytepos);
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* ngIRCd -- The Next Generation IRC Daemon
|
||||
* Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors.
|
||||
* Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors.
|
||||
*
|
||||
* 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
|
||||
@@ -18,41 +18,34 @@
|
||||
* Channel management
|
||||
*/
|
||||
|
||||
#include "imp.h"
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <strings.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "defines.h"
|
||||
#include "conn-func.h"
|
||||
|
||||
#include "exp.h"
|
||||
#include "channel.h"
|
||||
|
||||
#include "imp.h"
|
||||
#include "irc-write.h"
|
||||
#include "conf.h"
|
||||
#include "hash.h"
|
||||
#include "lists.h"
|
||||
#include "log.h"
|
||||
#include "messages.h"
|
||||
#include "match.h"
|
||||
|
||||
#include "exp.h"
|
||||
|
||||
#include "parse.h"
|
||||
#include "irc-mode.h"
|
||||
|
||||
#define REMOVE_PART 0
|
||||
#define REMOVE_QUIT 1
|
||||
#define REMOVE_KICK 2
|
||||
|
||||
|
||||
static CHANNEL *My_Channels;
|
||||
static CL2CHAN *My_Cl2Chan;
|
||||
|
||||
|
||||
static CL2CHAN *Get_Cl2Chan PARAMS(( CHANNEL *Chan, CLIENT *Client ));
|
||||
static CL2CHAN *Add_Client PARAMS(( CHANNEL *Chan, CLIENT *Client ));
|
||||
static bool Remove_Client PARAMS(( int Type, CHANNEL *Chan, CLIENT *Client, CLIENT *Origin, const char *Reason, bool InformServer ));
|
||||
@@ -102,9 +95,11 @@ GLOBAL void
|
||||
Channel_InitPredefined( void )
|
||||
{
|
||||
CHANNEL *new_chan;
|
||||
REQUEST Req;
|
||||
const struct Conf_Channel *conf_chan;
|
||||
const char *c;
|
||||
size_t i, channel_count = array_length(&Conf_Channels, sizeof(*conf_chan));
|
||||
char *c;
|
||||
char modes[COMMAND_LEN], name[CHANNEL_NAME_LEN];
|
||||
size_t i, n, channel_count = array_length(&Conf_Channels, sizeof(*conf_chan));
|
||||
|
||||
conf_chan = array_start(&Conf_Channels);
|
||||
|
||||
@@ -135,21 +130,61 @@ Channel_InitPredefined( void )
|
||||
conf_chan->name);
|
||||
continue;
|
||||
}
|
||||
Log(LOG_INFO, "Created pre-defined channel \"%s\".",
|
||||
conf_chan->name);
|
||||
|
||||
Channel_ModeAdd(new_chan, 'P');
|
||||
|
||||
if (conf_chan->topic[0])
|
||||
Channel_SetTopic(new_chan, NULL, conf_chan->topic);
|
||||
|
||||
c = conf_chan->modes;
|
||||
while (*c)
|
||||
Channel_ModeAdd(new_chan, *c++);
|
||||
/* Evaluate modes strings with fake requests */
|
||||
if (conf_chan->modes_num) {
|
||||
/* Prepare fake request structure */
|
||||
strlcpy(name, conf_chan->name, sizeof(name));
|
||||
Log(LOG_INFO, "Evaluating predefined channel modes for \"%s\".", name);
|
||||
Req.argv[0] = name;
|
||||
Req.prefix = Client_ID(Client_ThisServer());
|
||||
Req.command = "MODE";
|
||||
|
||||
/* Iterate over channel modes strings */
|
||||
for (n = 0; n < conf_chan->modes_num; n++) {
|
||||
Req.argc = 1;
|
||||
strlcpy(modes, conf_chan->modes[n], sizeof(modes));
|
||||
Log(LOG_DEBUG, "Evaluate \"MODE %s %s\".", name, modes);
|
||||
c = strtok(modes, " ");
|
||||
while (c && Req.argc < 15) {
|
||||
Req.argv[Req.argc++] = c;
|
||||
c = strtok(0, " ");
|
||||
}
|
||||
|
||||
if (Req.argc > 1) {
|
||||
/* Handling of legacy "Key" and "MaxUsers" settings:
|
||||
* Enforce setting the respective mode(s), to support
|
||||
* the legacy "Mode = kl" notation, which was valid but
|
||||
* is an invalid MODE string: key and limit are missing!
|
||||
* So set them manually when "k" or "l" are detected in
|
||||
* the first MODE parameter ... */
|
||||
if (Req.argc > 1 && strchr(Req.argv[1], 'k')) {
|
||||
Channel_SetKey(new_chan, conf_chan->key);
|
||||
Channel_ModeAdd(new_chan, 'k');
|
||||
}
|
||||
if (strchr(Req.argv[1], 'l')) {
|
||||
Channel_SetMaxUsers(new_chan, conf_chan->maxusers);
|
||||
Channel_ModeAdd(new_chan, 'l');
|
||||
}
|
||||
|
||||
IRC_MODE(Client_ThisServer(), &Req);
|
||||
}
|
||||
|
||||
/* Original channel modes srings are no longer needed */
|
||||
free(conf_chan->modes[n]);
|
||||
}
|
||||
}
|
||||
|
||||
Channel_SetKey(new_chan, conf_chan->key);
|
||||
Channel_SetMaxUsers(new_chan, conf_chan->maxusers);
|
||||
Set_KeyFile(new_chan, conf_chan->keyfile);
|
||||
|
||||
Log(LOG_INFO,
|
||||
"Created pre-defined channel \"%s\", mode \"%s\" (key \"%s\", limit %d).",
|
||||
new_chan->name, new_chan->modes, new_chan->key,
|
||||
new_chan->maxusers);
|
||||
}
|
||||
if (channel_count)
|
||||
array_free(&Conf_Channels);
|
||||
@@ -361,14 +396,19 @@ Channel_Kick(CLIENT *Peer, CLIENT *Target, CLIENT *Origin, const char *Name,
|
||||
!Channel_UserHasMode(chan, Target, 'q') &&
|
||||
!Channel_UserHasMode(chan, Target, 'a'))
|
||||
can_kick = true;
|
||||
|
||||
/* Half Op can't kick owner | admin | op */
|
||||
|
||||
/* Half Op can't kick owner | admin | op */
|
||||
else if (Channel_UserHasMode(chan, Peer, 'h') &&
|
||||
!Channel_UserHasMode(chan, Target, 'q') &&
|
||||
!Channel_UserHasMode(chan, Target, 'a') &&
|
||||
!Channel_UserHasMode(chan, Target, 'o'))
|
||||
can_kick = true;
|
||||
|
||||
/* IRC operators & IRCd with OperCanMode enabled
|
||||
* can kick anyways regardless of privilege */
|
||||
else if(Client_HasMode(Origin, 'o') && Conf_OperCanMode)
|
||||
can_kick = true;
|
||||
|
||||
if(!can_kick) {
|
||||
IRC_WriteErrClient(Origin, ERR_CHANOPPRIVTOOLOW_MSG,
|
||||
Client_ID(Origin), Name);
|
||||
@@ -1048,7 +1088,7 @@ Remove_Client( int Type, CHANNEL *Chan, CLIENT *Client, CLIENT *Origin, const ch
|
||||
switch( Type )
|
||||
{
|
||||
case REMOVE_QUIT:
|
||||
/* QUIT: other servers have already been notified,
|
||||
/* QUIT: other servers have already been notified,
|
||||
* see Client_Destroy(); so only inform other clients
|
||||
* in same channel. */
|
||||
assert( InformServer == false );
|
||||
@@ -1102,29 +1142,29 @@ Remove_Client( int Type, CHANNEL *Chan, CLIENT *Client, CLIENT *Origin, const ch
|
||||
|
||||
|
||||
GLOBAL bool
|
||||
Channel_AddBan(CHANNEL *c, const char *mask )
|
||||
Channel_AddBan(CHANNEL *c, const char *mask, const char *who )
|
||||
{
|
||||
struct list_head *h = Channel_GetListBans(c);
|
||||
LogDebug("Adding \"%s\" to \"%s\" ban list", mask, Channel_Name(c));
|
||||
return Lists_Add(h, mask, false, NULL);
|
||||
return Lists_Add(h, mask, time(NULL), who, false);
|
||||
}
|
||||
|
||||
|
||||
GLOBAL bool
|
||||
Channel_AddExcept(CHANNEL *c, const char *mask )
|
||||
Channel_AddExcept(CHANNEL *c, const char *mask, const char *who )
|
||||
{
|
||||
struct list_head *h = Channel_GetListExcepts(c);
|
||||
LogDebug("Adding \"%s\" to \"%s\" exception list", mask, Channel_Name(c));
|
||||
return Lists_Add(h, mask, false, NULL);
|
||||
return Lists_Add(h, mask, time(NULL), who, false);
|
||||
}
|
||||
|
||||
|
||||
GLOBAL bool
|
||||
Channel_AddInvite(CHANNEL *c, const char *mask, bool onlyonce)
|
||||
Channel_AddInvite(CHANNEL *c, const char *mask, bool onlyonce, const char *who )
|
||||
{
|
||||
struct list_head *h = Channel_GetListInvites(c);
|
||||
LogDebug("Adding \"%s\" to \"%s\" invite list", mask, Channel_Name(c));
|
||||
return Lists_Add(h, mask, onlyonce, NULL);
|
||||
return Lists_Add(h, mask, time(NULL), who, onlyonce);
|
||||
}
|
||||
|
||||
|
||||
@@ -1141,7 +1181,9 @@ ShowChannelList(struct list_head *head, CLIENT *Client, CHANNEL *Channel,
|
||||
while (e) {
|
||||
if (!IRC_WriteStrClient(Client, msg, Client_ID(Client),
|
||||
Channel_Name(Channel),
|
||||
Lists_GetMask(e)))
|
||||
Lists_GetMask(e),
|
||||
Lists_GetReason(e),
|
||||
Lists_GetValidity(e)))
|
||||
return DISCONNECTED;
|
||||
e = Lists_GetNext(e);
|
||||
}
|
||||
|
@@ -127,10 +127,10 @@ GLOBAL char *Channel_TopicWho PARAMS(( CHANNEL *Chan ));
|
||||
GLOBAL unsigned int Channel_CreationTime PARAMS(( CHANNEL *Chan ));
|
||||
#endif
|
||||
|
||||
GLOBAL bool Channel_AddBan PARAMS((CHANNEL *c, const char *Mask));
|
||||
GLOBAL bool Channel_AddExcept PARAMS((CHANNEL *c, const char *Mask));
|
||||
GLOBAL bool Channel_AddBan PARAMS((CHANNEL *c, const char *Mask, const char *who));
|
||||
GLOBAL bool Channel_AddExcept PARAMS((CHANNEL *c, const char *Mask, const char *who));
|
||||
GLOBAL bool Channel_AddInvite PARAMS((CHANNEL *c, const char *Mask,
|
||||
bool OnlyOnce));
|
||||
bool OnlyOnce, const char *who));
|
||||
|
||||
GLOBAL bool Channel_ShowBans PARAMS((CLIENT *client, CHANNEL *c));
|
||||
GLOBAL bool Channel_ShowExcepts PARAMS((CLIENT *client, CHANNEL *c));
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* ngIRCd -- The Next Generation IRC Daemon
|
||||
* Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors.
|
||||
* Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors.
|
||||
*
|
||||
* 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
|
||||
@@ -16,19 +16,13 @@
|
||||
* User class management.
|
||||
*/
|
||||
|
||||
#include "imp.h"
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "defines.h"
|
||||
#include "array.h"
|
||||
#include "conn.h"
|
||||
#include "client.h"
|
||||
#include "lists.h"
|
||||
#include "match.h"
|
||||
#include "stdio.h"
|
||||
|
||||
#include "exp.h"
|
||||
#include "class.h"
|
||||
|
||||
struct list_head My_Classes[CLASS_COUNT];
|
||||
@@ -50,11 +44,13 @@ Class_Exit(void)
|
||||
GLOBAL bool
|
||||
Class_GetMemberReason(const int Class, CLIENT *Client, char *reason, size_t len)
|
||||
{
|
||||
char str[COMMAND_LEN] = "listed";
|
||||
char str[COMMAND_LEN];
|
||||
|
||||
assert(Class < CLASS_COUNT);
|
||||
assert(Client != NULL);
|
||||
|
||||
strlcpy(str, "listed", sizeof(str));
|
||||
|
||||
if (!Lists_CheckReason(&My_Classes[Class], Client, str, sizeof(str)))
|
||||
return false;
|
||||
|
||||
@@ -109,7 +105,7 @@ Class_AddMask(const int Class, const char *Pattern, time_t ValidUntil,
|
||||
|
||||
Lists_MakeMask(Pattern, mask, sizeof(mask));
|
||||
return Lists_Add(&My_Classes[Class], mask,
|
||||
ValidUntil, Reason);
|
||||
ValidUntil, Reason, false);
|
||||
}
|
||||
|
||||
GLOBAL void
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* ngIRCd -- The Next Generation IRC Daemon
|
||||
* Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors.
|
||||
* Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors.
|
||||
*
|
||||
* 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
|
||||
@@ -18,15 +18,11 @@
|
||||
* Functions to deal with IRC Capabilities
|
||||
*/
|
||||
|
||||
#include "imp.h"
|
||||
#include <assert.h>
|
||||
|
||||
#include "defines.h"
|
||||
#include "conn.h"
|
||||
#include "client.h"
|
||||
#include "log.h"
|
||||
|
||||
#include "exp.h"
|
||||
#include "client-cap.h"
|
||||
|
||||
GLOBAL int
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* ngIRCd -- The Next Generation IRC Daemon
|
||||
* Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors.
|
||||
* Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors.
|
||||
*
|
||||
* 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
|
||||
@@ -18,22 +18,16 @@
|
||||
* Client management.
|
||||
*/
|
||||
|
||||
#include "imp.h"
|
||||
#include <assert.h>
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
#include <time.h>
|
||||
#include <netdb.h>
|
||||
|
||||
#include "defines.h"
|
||||
#include "conn.h"
|
||||
|
||||
#include "exp.h"
|
||||
#include "client.h"
|
||||
|
||||
#include <imp.h>
|
||||
#include "ngircd.h"
|
||||
#include "channel.h"
|
||||
#include "conf.h"
|
||||
@@ -44,8 +38,6 @@
|
||||
#include "match.h"
|
||||
#include "messages.h"
|
||||
|
||||
#include <exp.h>
|
||||
|
||||
#define GETID_LEN (CLIENT_NICK_LEN-1) + 1 + (CLIENT_USER_LEN-1) + 1 + (CLIENT_HOST_LEN-1) + 1
|
||||
|
||||
static CLIENT *This_Server, *My_Clients;
|
||||
@@ -80,7 +72,7 @@ GLOBAL void
|
||||
Client_Init( void )
|
||||
{
|
||||
struct hostent *h;
|
||||
|
||||
|
||||
This_Server = New_Client_Struct( );
|
||||
if( ! This_Server )
|
||||
{
|
||||
@@ -106,7 +98,7 @@ Client_Init( void )
|
||||
Client_SetInfo( This_Server, Conf_ServerInfo );
|
||||
|
||||
My_Clients = This_Server;
|
||||
|
||||
|
||||
memset( &My_Whowas, 0, sizeof( My_Whowas ));
|
||||
} /* Client_Init */
|
||||
|
||||
@@ -119,7 +111,7 @@ Client_Exit( void )
|
||||
|
||||
if( NGIRCd_SignalRestart ) Client_Destroy( This_Server, "Server going down (restarting).", NULL, false );
|
||||
else Client_Destroy( This_Server, "Server going down.", NULL, false );
|
||||
|
||||
|
||||
cnt = 0;
|
||||
c = My_Clients;
|
||||
while(c) {
|
||||
@@ -236,7 +228,7 @@ GLOBAL void
|
||||
Client_Destroy( CLIENT *Client, const char *LogMsg, const char *FwdMsg, bool SendQuit )
|
||||
{
|
||||
/* remove a client */
|
||||
|
||||
|
||||
CLIENT *last, *c;
|
||||
char msg[COMMAND_LEN];
|
||||
const char *txt;
|
||||
@@ -345,7 +337,11 @@ Client_SetHostname( CLIENT *Client, const char *Hostname )
|
||||
assert(Client != NULL);
|
||||
assert(Hostname != NULL);
|
||||
|
||||
if (strlen(Conf_CloakHost)) {
|
||||
/* Only cloak the hostmask if it has not yet been cloaked.
|
||||
* The period or colon indicates it's still an IP address.
|
||||
* An empty string means a rDNS lookup did not happen (yet). */
|
||||
if (Conf_CloakHost[0] && (!Client->host[0] || strchr(Client->host, '.')
|
||||
|| strchr(Client->host, ':'))) {
|
||||
char cloak[GETID_LEN];
|
||||
|
||||
strlcpy(cloak, Hostname, GETID_LEN);
|
||||
@@ -389,7 +385,7 @@ Client_SetID( CLIENT *Client, const char *ID )
|
||||
{
|
||||
assert( Client != NULL );
|
||||
assert( ID != NULL );
|
||||
|
||||
|
||||
strlcpy( Client->id, ID, sizeof( Client->id ));
|
||||
|
||||
if (Conf_CloakUserToNick) {
|
||||
@@ -435,7 +431,7 @@ Client_SetOrigUser(CLIENT UNUSED *Client, const char UNUSED *User)
|
||||
assert(Client != NULL);
|
||||
assert(User != NULL);
|
||||
|
||||
#if defined(PAM) && defined(IDENTAUTH)
|
||||
#if defined(PAM)
|
||||
strlcpy(Client->orig_user, User, sizeof(Client->orig_user));
|
||||
#endif
|
||||
} /* Client_SetOrigUser */
|
||||
@@ -706,7 +702,7 @@ Client_ID( CLIENT *Client )
|
||||
if(Client->type == CLIENT_USER)
|
||||
assert(strlen(Client->id) < Conf_MaxNickLength);
|
||||
#endif
|
||||
|
||||
|
||||
if( Client->id[0] ) return Client->id;
|
||||
else return "*";
|
||||
} /* Client_ID */
|
||||
@@ -739,15 +735,7 @@ Client_User( CLIENT *Client )
|
||||
*/
|
||||
GLOBAL char *
|
||||
Client_OrigUser(CLIENT *Client) {
|
||||
#ifndef IDENTAUTH
|
||||
char *user = Client->user;
|
||||
|
||||
if (user[0] == '~')
|
||||
user++;
|
||||
return user;
|
||||
#else
|
||||
return Client->orig_user;
|
||||
#endif
|
||||
} /* Client_OrigUser */
|
||||
|
||||
#endif
|
||||
|
@@ -52,8 +52,9 @@ typedef struct _CLIENT
|
||||
char *cloaked; /* cloaked hostname of the client */
|
||||
char *ipa_text; /* textual representaton of IP address */
|
||||
char user[CLIENT_USER_LEN]; /* user name ("login") */
|
||||
#if defined(PAM) && defined(IDENTAUTH)
|
||||
char orig_user[CLIENT_USER_LEN];/* user name supplied by USER command */
|
||||
#if defined(PAM)
|
||||
char orig_user[CLIENT_AUTHUSER_LEN];
|
||||
/* original user name supplied by USER command */
|
||||
#endif
|
||||
char info[CLIENT_INFO_LEN]; /* long user name (user) / info text (server) */
|
||||
char modes[CLIENT_MODE_LEN]; /* client modes */
|
||||
|
@@ -13,6 +13,10 @@
|
||||
#ifdef HAVE_LIBSSL
|
||||
#define SSL_SUPPORT
|
||||
#include <openssl/ssl.h>
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
#define OpenSSL_version SSLeay_version
|
||||
#define OPENSSL_VERSION SSLEAY_VERSION
|
||||
#endif
|
||||
#endif
|
||||
#ifdef HAVE_LIBGNUTLS
|
||||
#define SSL_SUPPORT
|
||||
@@ -36,13 +40,14 @@ struct ConnSSL_State {
|
||||
gnutls_session_t gnutls_session;
|
||||
void *cookie; /* pointer to server configuration structure
|
||||
(for outgoing connections), or NULL. */
|
||||
size_t x509_cred_idx; /* index of active x509 credential record */
|
||||
#endif
|
||||
char *fingerprint;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
bool ConnSSL_InitLibrary(void);
|
||||
GLOBAL bool ConnSSL_InitLibrary PARAMS((void));
|
||||
|
||||
#endif /* conf_ssl_h */
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* ngIRCd -- The Next Generation IRC Daemon
|
||||
* Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors.
|
||||
* Copyright (c)2001-2019 Alexander Barton (alex@barton.de) and Contributors.
|
||||
*
|
||||
* 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
|
||||
@@ -16,9 +16,7 @@
|
||||
* Configuration management (reading, parsing & validation)
|
||||
*/
|
||||
|
||||
#include "imp.h"
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#ifdef PROTOTYPES
|
||||
# include <stdarg.h>
|
||||
@@ -29,23 +27,19 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
#include <pwd.h>
|
||||
#include <grp.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <dirent.h>
|
||||
|
||||
#include "array.h"
|
||||
#include "ngircd.h"
|
||||
#include "conn.h"
|
||||
#include "channel.h"
|
||||
#include "defines.h"
|
||||
#include "log.h"
|
||||
#include "match.h"
|
||||
#include "tool.h"
|
||||
|
||||
#include "exp.h"
|
||||
#include "conf.h"
|
||||
|
||||
|
||||
@@ -94,10 +88,10 @@ static void Init_Server_Struct PARAMS(( CONF_SERVER *Server ));
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBSSL
|
||||
#define DEFAULT_CIPHERS "HIGH:!aNULL:@STRENGTH"
|
||||
#define DEFAULT_CIPHERS "HIGH:!aNULL:@STRENGTH:!SSLv3"
|
||||
#endif
|
||||
#ifdef HAVE_LIBGNUTLS
|
||||
#define DEFAULT_CIPHERS "SECURE128"
|
||||
#define DEFAULT_CIPHERS "SECURE128:-VERS-SSL3.0"
|
||||
#endif
|
||||
|
||||
#ifdef SSL_SUPPORT
|
||||
@@ -334,7 +328,7 @@ Conf_Test( void )
|
||||
{
|
||||
struct passwd *pwd;
|
||||
struct group *grp;
|
||||
unsigned int i;
|
||||
unsigned int i, j;
|
||||
bool config_valid;
|
||||
size_t predef_channel_count;
|
||||
struct Conf_Channel *predef_chan;
|
||||
@@ -369,9 +363,9 @@ Conf_Test( void )
|
||||
printf(" MotdPhrase = %s\n", array_bytes(&Conf_Motd)
|
||||
? (const char*) array_start(&Conf_Motd) : "");
|
||||
}
|
||||
#ifndef PAM
|
||||
printf(" Password = %s\n", Conf_ServerPwd);
|
||||
#endif
|
||||
printf(" Network = %s\n", Conf_Network);
|
||||
if (!Conf_PAM)
|
||||
printf(" Password = %s\n", Conf_ServerPwd);
|
||||
printf(" PidFile = %s\n", Conf_PidFile);
|
||||
printf(" Ports = ");
|
||||
ports_puts(&Conf_ListenPorts);
|
||||
@@ -394,6 +388,7 @@ Conf_Test( void )
|
||||
printf(" MaxConnectionsIP = %d\n", Conf_MaxConnectionsIP);
|
||||
printf(" MaxJoins = %d\n", Conf_MaxJoins > 0 ? Conf_MaxJoins : -1);
|
||||
printf(" MaxNickLength = %u\n", Conf_MaxNickLength - 1);
|
||||
printf(" MaxPenaltyTime = %ld\n", Conf_MaxPenaltyTime);
|
||||
printf(" MaxListSize = %d\n", Conf_MaxListSize);
|
||||
printf(" PingTimeout = %d\n", Conf_PingTimeout);
|
||||
printf(" PongTimeout = %d\n", Conf_PongTimeout);
|
||||
@@ -418,13 +413,14 @@ Conf_Test( void )
|
||||
#endif
|
||||
printf(" IncludeDir = %s\n", Conf_IncludeDir);
|
||||
printf(" MorePrivacy = %s\n", yesno_to_str(Conf_MorePrivacy));
|
||||
printf(" NoticeAuth = %s\n", yesno_to_str(Conf_NoticeAuth));
|
||||
printf(" NoticeBeforeRegistration = %s\n", yesno_to_str(Conf_NoticeBeforeRegistration));
|
||||
printf(" OperCanUseMode = %s\n", yesno_to_str(Conf_OperCanMode));
|
||||
printf(" OperChanPAutoOp = %s\n", yesno_to_str(Conf_OperChanPAutoOp));
|
||||
printf(" OperServerMode = %s\n", yesno_to_str(Conf_OperServerMode));
|
||||
#ifdef PAM
|
||||
printf(" PAM = %s\n", yesno_to_str(Conf_PAM));
|
||||
printf(" PAMIsOptional = %s\n", yesno_to_str(Conf_PAMIsOptional));
|
||||
printf(" PAMServiceName = %s\n", Conf_PAMServiceName);
|
||||
#endif
|
||||
#ifndef STRICT_RFC
|
||||
printf(" RequireAuthPing = %s\n", yesno_to_str(Conf_AuthPing));
|
||||
@@ -487,7 +483,8 @@ Conf_Test( void )
|
||||
/* Valid "Channel" section */
|
||||
puts( "[CHANNEL]" );
|
||||
printf(" Name = %s\n", predef_chan->name);
|
||||
printf(" Modes = %s\n", predef_chan->modes);
|
||||
for(j = 0; j < predef_chan->modes_num; j++)
|
||||
printf(" Modes = %s\n", predef_chan->modes[j]);
|
||||
printf(" Key = %s\n", predef_chan->key);
|
||||
printf(" MaxUsers = %lu\n", predef_chan->maxusers);
|
||||
printf(" Topic = %s\n", predef_chan->topic);
|
||||
@@ -624,6 +621,7 @@ Conf_EnablePassiveServer(const char *Name)
|
||||
&& (Conf_Server[i].port > 0)) {
|
||||
/* BINGO! Enable server */
|
||||
Conf_Server[i].flags &= ~CONF_SFLAG_DISABLED;
|
||||
Conf_Server[i].lasttry = 0;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -715,7 +713,6 @@ Conf_NickIsService(int ConfServer, const char *Nick)
|
||||
/**
|
||||
* Check if the given nickname is blocked for "normal client" use.
|
||||
*
|
||||
* @param ConfServer The server index or NONE to check all configured servers.
|
||||
* @param Nick The nickname to check.
|
||||
* @returns true if the given nickname belongs to an "IRC service".
|
||||
*/
|
||||
@@ -749,6 +746,7 @@ Set_Defaults(bool InitServers)
|
||||
strcpy(Conf_ServerAdminMail, "");
|
||||
snprintf(Conf_ServerInfo, sizeof Conf_ServerInfo, "%s %s",
|
||||
PACKAGE_NAME, PACKAGE_VERSION);
|
||||
strcpy(Conf_Network, "");
|
||||
free(Conf_ListenAddress);
|
||||
Conf_ListenAddress = NULL;
|
||||
array_free(&Conf_ListenPorts);
|
||||
@@ -769,6 +767,7 @@ Set_Defaults(bool InitServers)
|
||||
Conf_MaxConnectionsIP = 5;
|
||||
Conf_MaxJoins = 10;
|
||||
Conf_MaxNickLength = CLIENT_NICK_LEN_DEFAULT;
|
||||
Conf_MaxPenaltyTime = -1;
|
||||
Conf_MaxListSize = 100;
|
||||
Conf_PingTimeout = 120;
|
||||
Conf_PongTimeout = 20;
|
||||
@@ -801,7 +800,7 @@ Set_Defaults(bool InitServers)
|
||||
#endif
|
||||
strcpy(Conf_IncludeDir, "");
|
||||
Conf_MorePrivacy = false;
|
||||
Conf_NoticeAuth = false;
|
||||
Conf_NoticeBeforeRegistration = false;
|
||||
Conf_OperCanMode = false;
|
||||
Conf_OperChanPAutoOp = true;
|
||||
Conf_OperServerMode = false;
|
||||
@@ -811,8 +810,9 @@ Set_Defaults(bool InitServers)
|
||||
Conf_PAM = false;
|
||||
#endif
|
||||
Conf_PAMIsOptional = false;
|
||||
#ifdef SYSLOG
|
||||
strcpy(Conf_PAMServiceName, "ngircd");
|
||||
Conf_ScrubCTCP = false;
|
||||
#ifdef SYSLOG
|
||||
#ifdef LOG_LOCAL5
|
||||
Conf_SyslogFacility = LOG_LOCAL5;
|
||||
#else
|
||||
@@ -847,13 +847,13 @@ no_listenports(void)
|
||||
*
|
||||
* This function is used to read the MOTD and help text file, for example.
|
||||
*
|
||||
* @param filename Name of the file to read.
|
||||
* @param Filename Name of the file to read.
|
||||
* @return true, when the file has been read in.
|
||||
*/
|
||||
static bool
|
||||
Read_TextFile(const char *Filename, const char *Name, array *Destination)
|
||||
{
|
||||
char line[127];
|
||||
char line[COMMAND_LEN];
|
||||
FILE *fp;
|
||||
int line_no = 1;
|
||||
|
||||
@@ -889,9 +889,9 @@ Read_TextFile(const char *Filename, const char *Name, array *Destination)
|
||||
* Please note that this function uses exit(1) on fatal errors and therefore
|
||||
* can result in ngIRCd terminating!
|
||||
*
|
||||
* @param ngircd_starting Flag indicating if ngIRCd is starting or not.
|
||||
* @returns true when the configuration file has been read
|
||||
* successfully; false otherwise.
|
||||
* @param IsStarting Flag indicating if ngIRCd is starting or not.
|
||||
* @returns true when the configuration file has been read
|
||||
* successfully; false otherwise.
|
||||
*/
|
||||
static bool
|
||||
Read_Config(bool TestOnly, bool IsStarting)
|
||||
@@ -903,6 +903,8 @@ Read_Config(bool TestOnly, bool IsStarting)
|
||||
FILE *fd;
|
||||
DIR *dh;
|
||||
|
||||
Config_Error(LOG_INFO, "Using configuration file \"%s\" ...", NGIRCd_ConfFile);
|
||||
|
||||
/* Open configuration file */
|
||||
fd = fopen( NGIRCd_ConfFile, "r" );
|
||||
if( ! fd ) {
|
||||
@@ -1052,9 +1054,13 @@ Read_Config(bool TestOnly, bool IsStarting)
|
||||
}
|
||||
|
||||
/**
|
||||
* ...
|
||||
* Read in and handle a configuration file.
|
||||
*
|
||||
* @param File Name of the configuration file.
|
||||
* @param fd File descriptor already opened for reading.
|
||||
*/
|
||||
static void Read_Config_File(const char *File, FILE *fd)
|
||||
static void
|
||||
Read_Config_File(const char *File, FILE *fd)
|
||||
{
|
||||
char section[LINE_LEN], str[LINE_LEN], *var, *arg, *ptr;
|
||||
int i, line = 0;
|
||||
@@ -1284,116 +1290,6 @@ WarnPAM(const char UNUSED *File, int UNUSED Line)
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle legacy "NoXXX" options in [GLOBAL] section.
|
||||
*
|
||||
* TODO: This function and support for "NoXXX" could be removed starting
|
||||
* with ngIRCd release 19 (one release after marking it "deprecated").
|
||||
*
|
||||
* @param Var Variable name.
|
||||
* @param Arg Argument string.
|
||||
* @returns true if a NoXXX option has been processed; false otherwise.
|
||||
*/
|
||||
static bool
|
||||
CheckLegacyNoOption(const char *Var, const char *Arg)
|
||||
{
|
||||
if(strcasecmp(Var, "NoDNS") == 0) {
|
||||
Conf_DNS = !Check_ArgIsTrue( Arg );
|
||||
return true;
|
||||
}
|
||||
if (strcasecmp(Var, "NoIdent") == 0) {
|
||||
Conf_Ident = !Check_ArgIsTrue(Arg);
|
||||
return true;
|
||||
}
|
||||
if(strcasecmp(Var, "NoPAM") == 0) {
|
||||
Conf_PAM = !Check_ArgIsTrue(Arg);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle deprecated legacy options in [GLOBAL] section.
|
||||
*
|
||||
* TODO: This function and support for these options in the [Global] section
|
||||
* could be removed starting with ngIRCd release 19 (one release after
|
||||
* marking it "deprecated").
|
||||
*
|
||||
* @param Var Variable name.
|
||||
* @param Arg Argument string.
|
||||
* @returns true if a legacy option has been processed; false otherwise.
|
||||
*/
|
||||
static const char*
|
||||
CheckLegacyGlobalOption(const char *File, int Line, char *Var, char *Arg)
|
||||
{
|
||||
if (strcasecmp(Var, "AllowRemoteOper") == 0
|
||||
|| strcasecmp(Var, "ChrootDir") == 0
|
||||
|| strcasecmp(Var, "ConnectIPv4") == 0
|
||||
|| strcasecmp(Var, "ConnectIPv6") == 0
|
||||
|| strcasecmp(Var, "OperCanUseMode") == 0
|
||||
|| strcasecmp(Var, "OperChanPAutoOp") == 0
|
||||
|| strcasecmp(Var, "OperServerMode") == 0
|
||||
|| strcasecmp(Var, "PredefChannelsOnly") == 0
|
||||
|| strcasecmp(Var, "SyslogFacility") == 0
|
||||
|| strcasecmp(Var, "WebircPassword") == 0) {
|
||||
Handle_OPTIONS(File, Line, Var, Arg);
|
||||
return "[Options]";
|
||||
}
|
||||
if (strcasecmp(Var, "ConnectRetry") == 0
|
||||
|| strcasecmp(Var, "IdleTimeout") == 0
|
||||
|| strcasecmp(Var, "MaxConnections") == 0
|
||||
|| strcasecmp(Var, "MaxConnectionsIP") == 0
|
||||
|| strcasecmp(Var, "MaxJoins") == 0
|
||||
|| strcasecmp(Var, "MaxNickLength") == 0
|
||||
|| strcasecmp(Var, "PingTimeout") == 0
|
||||
|| strcasecmp(Var, "PongTimeout") == 0) {
|
||||
Handle_LIMITS(File, Line, Var, Arg);
|
||||
return "[Limits]";
|
||||
}
|
||||
#ifdef SSL_SUPPORT
|
||||
if (strcasecmp(Var, "SSLCertFile") == 0
|
||||
|| strcasecmp(Var, "SSLDHFile") == 0
|
||||
|| strcasecmp(Var, "SSLKeyFile") == 0
|
||||
|| strcasecmp(Var, "SSLKeyFilePassword") == 0
|
||||
|| strcasecmp(Var, "SSLPorts") == 0) {
|
||||
Handle_SSL(File, Line, Var + 3, Arg);
|
||||
return "[SSL]";
|
||||
}
|
||||
#endif
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Strip "no" prefix of a string.
|
||||
*
|
||||
* TODO: This function and support for "NoXXX" should be removed starting
|
||||
* with ngIRCd release 19! (One release after marking it "deprecated").
|
||||
*
|
||||
* @param str Pointer to input string starting with "no".
|
||||
* @returns New pointer to string without "no" prefix.
|
||||
*/
|
||||
static const char *
|
||||
NoNo(const char *str)
|
||||
{
|
||||
assert(strncasecmp("no", str, 2) == 0 && str[2]);
|
||||
return str + 2;
|
||||
}
|
||||
|
||||
/**
|
||||
* Invert "boolean" string.
|
||||
*
|
||||
* TODO: This function and support for "NoXXX" should be removed starting
|
||||
* with ngIRCd release 19! (One release after marking it "deprecated").
|
||||
*
|
||||
* @param arg "Boolean" input string.
|
||||
* @returns Pointer to inverted "boolean string".
|
||||
*/
|
||||
static const char *
|
||||
InvertArg(const char *arg)
|
||||
{
|
||||
return yesno_to_str(!Check_ArgIsTrue(arg));
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle variable in [Global] configuration section.
|
||||
@@ -1408,7 +1304,7 @@ Handle_GLOBAL(const char *File, int Line, char *Var, char *Arg )
|
||||
struct passwd *pwd;
|
||||
struct group *grp;
|
||||
size_t len;
|
||||
const char *section;
|
||||
char *ptr;
|
||||
|
||||
assert(File != NULL);
|
||||
assert(Line > 0);
|
||||
@@ -1491,6 +1387,19 @@ Handle_GLOBAL(const char *File, int Line, char *Var, char *Arg )
|
||||
Using_MotdFile = false;
|
||||
return;
|
||||
}
|
||||
if (strcasecmp(Var, "Network") == 0) {
|
||||
len = strlcpy(Conf_Network, Arg, sizeof(Conf_Network));
|
||||
if (len >= sizeof(Conf_Network))
|
||||
Config_Error_TooLong(File, Line, Var);
|
||||
ptr = strchr(Conf_Network, ' ');
|
||||
if (ptr) {
|
||||
Config_Error(LOG_WARNING,
|
||||
"%s, line %d: \"Network\" can't contain spaces!",
|
||||
File, Line);
|
||||
*ptr = '\0';
|
||||
}
|
||||
return;
|
||||
}
|
||||
if(strcasecmp(Var, "Password") == 0) {
|
||||
len = strlcpy(Conf_ServerPwd, Arg, sizeof(Conf_ServerPwd));
|
||||
if (len >= sizeof(Conf_ServerPwd))
|
||||
@@ -1534,36 +1443,6 @@ Handle_GLOBAL(const char *File, int Line, char *Var, char *Arg )
|
||||
return;
|
||||
}
|
||||
|
||||
if (CheckLegacyNoOption(Var, Arg)) {
|
||||
/* TODO: This function and support for "NoXXX" could be
|
||||
* be removed starting with ngIRCd release 19 (one release
|
||||
* after marking it "deprecated"). */
|
||||
Config_Error(LOG_WARNING,
|
||||
"%s, line %d (section \"Global\"): \"No\"-Prefix is deprecated, use \"%s = %s\" in [Options] section!",
|
||||
File, Line, NoNo(Var), InvertArg(Arg));
|
||||
if (strcasecmp(Var, "NoIdent") == 0)
|
||||
WarnIdent(File, Line);
|
||||
else if (strcasecmp(Var, "NoPam") == 0)
|
||||
WarnPAM(File, Line);
|
||||
return;
|
||||
}
|
||||
if ((section = CheckLegacyGlobalOption(File, Line, Var, Arg))) {
|
||||
/** TODO: This function and support for these options in the
|
||||
* [Global] section could be removed starting with ngIRCd
|
||||
* release 19 (one release after marking it "deprecated"). */
|
||||
if (strncasecmp(Var, "SSL", 3) == 0) {
|
||||
Config_Error(LOG_WARNING,
|
||||
"%s, line %d (section \"Global\"): \"%s\" is deprecated here, move it to %s and rename to \"%s\"!",
|
||||
File, Line, Var, section,
|
||||
Var + 3);
|
||||
} else {
|
||||
Config_Error(LOG_WARNING,
|
||||
"%s, line %d (section \"Global\"): \"%s\" is deprecated here, move it to %s!",
|
||||
File, Line, Var, section);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Config_Error_Section(File, Line, Var, "Global");
|
||||
}
|
||||
|
||||
@@ -1626,6 +1505,12 @@ Handle_LIMITS(const char *File, int Line, char *Var, char *Arg)
|
||||
Config_Error_NaN(File, Line, Var);
|
||||
return;
|
||||
}
|
||||
if (strcasecmp(Var, "MaxPenaltyTime") == 0) {
|
||||
Conf_MaxPenaltyTime = atol(Arg);
|
||||
if (Conf_MaxPenaltyTime < -1)
|
||||
Conf_MaxPenaltyTime = -1; /* "unlimited" */
|
||||
return;
|
||||
}
|
||||
if (strcasecmp(Var, "PingTimeout") == 0) {
|
||||
Conf_PingTimeout = atoi(Arg);
|
||||
if (Conf_PingTimeout < 5) {
|
||||
@@ -1782,8 +1667,8 @@ Handle_OPTIONS(const char *File, int Line, char *Var, char *Arg)
|
||||
Conf_MorePrivacy = Check_ArgIsTrue(Arg);
|
||||
return;
|
||||
}
|
||||
if (strcasecmp(Var, "NoticeAuth") == 0) {
|
||||
Conf_NoticeAuth = Check_ArgIsTrue(Arg);
|
||||
if (strcasecmp(Var, "NoticeBeforeRegistration") == 0) {
|
||||
Conf_NoticeBeforeRegistration = Check_ArgIsTrue(Arg);
|
||||
return;
|
||||
}
|
||||
if (strcasecmp(Var, "OperCanUseMode") == 0) {
|
||||
@@ -1807,20 +1692,10 @@ Handle_OPTIONS(const char *File, int Line, char *Var, char *Arg)
|
||||
Conf_PAMIsOptional = Check_ArgIsTrue(Arg);
|
||||
return;
|
||||
}
|
||||
if (strcasecmp(Var, "PredefChannelsOnly") == 0) {
|
||||
/*
|
||||
* TODO: This section and support for "PredefChannelsOnly"
|
||||
* could be removed starting with ngIRCd release 22 (one
|
||||
* release after marking it "deprecated") ...
|
||||
*/
|
||||
Config_Error(LOG_WARNING,
|
||||
"%s, line %d (section \"Options\"): \"%s\" is deprecated, please use \"AllowedChannelTypes\"!",
|
||||
File, Line, Var);
|
||||
if (Check_ArgIsTrue(Arg))
|
||||
Conf_AllowedChannelTypes[0] = '\0';
|
||||
else
|
||||
strlcpy(Conf_AllowedChannelTypes, CHANTYPES,
|
||||
sizeof(Conf_AllowedChannelTypes));
|
||||
if (strcasecmp(Var, "PAMServiceName") == 0) {
|
||||
len = strlcpy(Conf_PAMServiceName, Arg, sizeof(Conf_PAMServiceName));
|
||||
if (len >= sizeof(Conf_PAMServiceName))
|
||||
Config_Error_TooLong(File, Line, Var);
|
||||
return;
|
||||
}
|
||||
#ifndef STRICT_RFC
|
||||
@@ -2112,8 +1987,12 @@ Handle_CHANNEL(const char *File, int Line, char *Var, char *Arg)
|
||||
}
|
||||
if (strcasecmp(Var, "Modes") == 0) {
|
||||
/* Initial modes */
|
||||
len = strlcpy(chan->modes, Arg, sizeof(chan->modes));
|
||||
if (len >= sizeof(chan->modes))
|
||||
if(chan->modes_num >= sizeof(chan->modes)) {
|
||||
Config_Error(LOG_ERR, "Too many Modes, option ignored.");
|
||||
return;
|
||||
}
|
||||
chan->modes[chan->modes_num++] = strndup(Arg, COMMAND_LEN);
|
||||
if(strlen(Arg) >= COMMAND_LEN)
|
||||
Config_Error_TooLong(File, Line, Var);
|
||||
return;
|
||||
}
|
||||
@@ -2129,6 +2008,9 @@ Handle_CHANNEL(const char *File, int Line, char *Var, char *Arg)
|
||||
len = strlcpy(chan->key, Arg, sizeof(chan->key));
|
||||
if (len >= sizeof(chan->key))
|
||||
Config_Error_TooLong(File, Line, Var);
|
||||
Config_Error(LOG_WARNING,
|
||||
"%s, line %d (section \"Channel\"): \"%s\" is deprecated here, use \"Modes = +k <key>\"!",
|
||||
File, Line, Var);
|
||||
return;
|
||||
}
|
||||
if( strcasecmp( Var, "MaxUsers" ) == 0 ) {
|
||||
@@ -2136,6 +2018,9 @@ Handle_CHANNEL(const char *File, int Line, char *Var, char *Arg)
|
||||
chan->maxusers = (unsigned long) atol(Arg);
|
||||
if (!chan->maxusers && strcmp(Arg, "0"))
|
||||
Config_Error_NaN(File, Line, Var);
|
||||
Config_Error(LOG_WARNING,
|
||||
"%s, line %d (section \"Channel\"): \"%s\" is deprecated here, use \"Modes = +l <limit>\"!",
|
||||
File, Line, Var);
|
||||
return;
|
||||
}
|
||||
if (strcasecmp(Var, "KeyFile") == 0) {
|
||||
@@ -2191,7 +2076,8 @@ Validate_Config(bool Configtest, bool Rehash)
|
||||
break;
|
||||
} while (*(++ptr));
|
||||
|
||||
if (!Conf_ServerName[0]) {
|
||||
if (!Conf_ServerName[0] || !strchr(Conf_ServerName, '.'))
|
||||
{
|
||||
/* No server name configured! */
|
||||
config_valid = false;
|
||||
Config_Error(LOG_ALERT,
|
||||
@@ -2205,20 +2091,6 @@ Validate_Config(bool Configtest, bool Rehash)
|
||||
}
|
||||
}
|
||||
|
||||
if (Conf_ServerName[0] && !strchr(Conf_ServerName, '.')) {
|
||||
/* No dot in server name! */
|
||||
config_valid = false;
|
||||
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);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef STRICT_RFC
|
||||
if (!Conf_ServerAdminMail[0]) {
|
||||
/* No administrative contact configured! */
|
||||
@@ -2243,11 +2115,16 @@ Validate_Config(bool Configtest, bool Rehash)
|
||||
}
|
||||
|
||||
#ifdef PAM
|
||||
if (Conf_ServerPwd[0])
|
||||
if (Conf_PAM && Conf_ServerPwd[0])
|
||||
Config_Error(LOG_ERR,
|
||||
"This server uses PAM, \"Password\" in [Global] section will be ignored!");
|
||||
#endif
|
||||
|
||||
if (Conf_MaxPenaltyTime != -1)
|
||||
Config_Error(LOG_WARNING,
|
||||
"Maximum penalty increase ('MaxPenaltyTime') is set to %ld, this is not recommended!",
|
||||
Conf_MaxPenaltyTime);
|
||||
|
||||
#ifdef DEBUG
|
||||
servers = servers_once = 0;
|
||||
for (i = 0; i < MAX_SERVERS; i++) {
|
||||
|
@@ -29,7 +29,7 @@
|
||||
|
||||
/**
|
||||
* Configured IRC operator.
|
||||
* Please note the the name of the IRC operaor and his nick have nothing to
|
||||
* Please note that the name of the IRC operaor and his nick have nothing to
|
||||
* do with each other! The IRC operator is only identified by the name and
|
||||
* password configured in this structure.
|
||||
*/
|
||||
@@ -83,11 +83,12 @@ struct SSLOptions {
|
||||
/** Pre-defined channels */
|
||||
struct Conf_Channel {
|
||||
char name[CHANNEL_NAME_LEN]; /**< Name of the channel */
|
||||
char modes[CHANNEL_MODE_LEN]; /**< Initial channel modes */
|
||||
char *modes[512]; /**< Initial channel modes to evaluate */
|
||||
char key[CLIENT_PASS_LEN]; /**< Channel key ("password", mode "k" ) */
|
||||
char topic[COMMAND_LEN]; /**< Initial topic */
|
||||
char keyfile[512]; /**< Path and name of channel key file */
|
||||
unsigned long maxusers; /**< User limit for this channel, mode "l" */
|
||||
unsigned int modes_num; /**< Number of channel modes to evaluate */
|
||||
};
|
||||
|
||||
|
||||
@@ -109,6 +110,9 @@ GLOBAL char Conf_ServerAdmin1[CLIENT_INFO_LEN];
|
||||
GLOBAL char Conf_ServerAdmin2[CLIENT_INFO_LEN];
|
||||
GLOBAL char Conf_ServerAdminMail[CLIENT_INFO_LEN];
|
||||
|
||||
/** Network name (optional, no spaces allowed) */
|
||||
GLOBAL char Conf_Network[CLIENT_INFO_LEN];
|
||||
|
||||
/** Message of the day (MOTD) of this server */
|
||||
GLOBAL array Conf_Motd;
|
||||
|
||||
@@ -191,8 +195,8 @@ GLOBAL bool Conf_Ident;
|
||||
/** Enable "more privacy" mode and "censor" some user-related information */
|
||||
GLOBAL bool Conf_MorePrivacy;
|
||||
|
||||
/** Enable NOTICE AUTH messages on connect */
|
||||
GLOBAL bool Conf_NoticeAuth;
|
||||
/** Enable "NOTICE *" messages on connect */
|
||||
GLOBAL bool Conf_NoticeBeforeRegistration;
|
||||
|
||||
/** Enable all usage of PAM, even when compiled with support for it */
|
||||
GLOBAL bool Conf_PAM;
|
||||
@@ -200,6 +204,9 @@ GLOBAL bool Conf_PAM;
|
||||
/** Don't require all clients to send a password an to be PAM authenticated */
|
||||
GLOBAL bool Conf_PAMIsOptional;
|
||||
|
||||
/** The service name to use for PAM */
|
||||
GLOBAL char Conf_PAMServiceName[MAX_PAM_SERVICE_NAME_LEN];
|
||||
|
||||
/** Disable all CTCP commands except for /me ? */
|
||||
GLOBAL bool Conf_ScrubCTCP;
|
||||
|
||||
@@ -233,6 +240,9 @@ GLOBAL unsigned int Conf_MaxNickLength;
|
||||
/** Maximum number of channels returned to /list */
|
||||
GLOBAL int Conf_MaxListSize;
|
||||
|
||||
/** Maximium seconds to add per "penalty". -1 = unlimited. */
|
||||
GLOBAL time_t Conf_MaxPenaltyTime;
|
||||
|
||||
#ifndef STRICT_RFC
|
||||
|
||||
/** Require "AUTH PING-PONG" on login */
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* ngIRCd -- The Next Generation IRC Daemon
|
||||
* Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors.
|
||||
* Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors.
|
||||
*
|
||||
* 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
|
||||
@@ -20,25 +20,21 @@
|
||||
* Functions to deal with character encodings and conversions
|
||||
*/
|
||||
|
||||
#include "imp.h"
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
|
||||
#include "defines.h"
|
||||
#include "conn.h"
|
||||
#include "log.h"
|
||||
|
||||
#include "exp.h"
|
||||
#include "conn-encoding.h"
|
||||
|
||||
#ifdef ICONV
|
||||
|
||||
#include "log.h"
|
||||
#include "conn-encoding.h"
|
||||
|
||||
char Encoding_Buffer[COMMAND_LEN];
|
||||
|
||||
char *Convert_Message PARAMS((iconv_t Handle, char *Message));
|
||||
|
||||
|
||||
/**
|
||||
* Set client character encoding on a connection.
|
||||
*
|
||||
@@ -125,7 +121,7 @@ Convert_Message(iconv_t Handle, char *Message)
|
||||
if (iconv(Handle, &Message, &in_left, &out, &out_left) == (size_t)(-1)) {
|
||||
/* An error occurred! */
|
||||
LogDebug("Error converting message encoding!");
|
||||
strlcpy(Encoding_Buffer, Message, sizeof(Encoding_Buffer));
|
||||
strlcpy(out, Message, sizeof(Encoding_Buffer));
|
||||
iconv(Handle, NULL, NULL, NULL, NULL);
|
||||
} else
|
||||
*out = '\0';
|
||||
@@ -133,7 +129,7 @@ Convert_Message(iconv_t Handle, char *Message)
|
||||
return Encoding_Buffer;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* ICONV */
|
||||
|
||||
/**
|
||||
* Convert encoding of a message received from a connection.
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* ngIRCd -- The Next Generation IRC Daemon
|
||||
* Copyright (c)2001-2008 Alexander Barton (alex@barton.de)
|
||||
* Copyright (c)2001-2018 Alexander Barton (alex@barton.de) and Contributors.
|
||||
*
|
||||
* 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
|
||||
@@ -18,18 +18,17 @@
|
||||
* Connection management: Global functions
|
||||
*/
|
||||
|
||||
#include "imp.h"
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include "log.h"
|
||||
#include <time.h>
|
||||
|
||||
#ifdef DEBUG
|
||||
# include "log.h"
|
||||
#endif
|
||||
#include "conn.h"
|
||||
#include "client.h"
|
||||
|
||||
#include "exp.h"
|
||||
#include "conf.h"
|
||||
#include "conn-func.h"
|
||||
|
||||
|
||||
/**
|
||||
* Update "idle timestamp", the time of the last visible user action
|
||||
* (e. g. like sending messages, joining or leaving channels).
|
||||
@@ -52,7 +51,7 @@ GLOBAL void
|
||||
Conn_UpdatePing(CONN_ID Idx)
|
||||
{
|
||||
assert(Idx > NONE);
|
||||
My_Connections[Idx].lastping = time(NULL);
|
||||
My_Connections[Idx].lastping = My_Connections[Idx].lastdata = time(NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -73,7 +72,6 @@ Conn_GetIdle( CONN_ID Idx )
|
||||
return time( NULL ) - My_Connections[Idx].lastprivmsg;
|
||||
} /* Conn_GetIdle */
|
||||
|
||||
|
||||
GLOBAL time_t
|
||||
Conn_LastPing( CONN_ID Idx )
|
||||
{
|
||||
@@ -81,7 +79,6 @@ Conn_LastPing( CONN_ID Idx )
|
||||
return My_Connections[Idx].lastping;
|
||||
} /* Conn_LastPing */
|
||||
|
||||
|
||||
/**
|
||||
* Add "penalty time" for a connection.
|
||||
*
|
||||
@@ -89,7 +86,7 @@ Conn_LastPing( CONN_ID Idx )
|
||||
* is read. This function only increases the penalty, it is not possible to
|
||||
* decrease the penalty time.
|
||||
*
|
||||
* @param Idex Connection index.
|
||||
* @param Idx Connection index.
|
||||
* @param Seconds Seconds to add.
|
||||
* @see Conn_ResetPenalty
|
||||
*/
|
||||
@@ -101,6 +98,14 @@ Conn_SetPenalty(CONN_ID Idx, time_t Seconds)
|
||||
assert(Idx > NONE);
|
||||
assert(Seconds >= 0);
|
||||
|
||||
/* Limit new penalty to maximum configured, when less than 10 seconds. *
|
||||
The latter is used to limit brute force attacks, therefore we don't *
|
||||
want to limit that! */
|
||||
if (Conf_MaxPenaltyTime >= 0
|
||||
&& Seconds > Conf_MaxPenaltyTime
|
||||
&& Seconds < 10)
|
||||
Seconds = Conf_MaxPenaltyTime;
|
||||
|
||||
t = time(NULL);
|
||||
if (My_Connections[Idx].delaytime < t)
|
||||
My_Connections[Idx].delaytime = t;
|
||||
@@ -116,7 +121,6 @@ Conn_SetPenalty(CONN_ID Idx, time_t Seconds)
|
||||
#endif
|
||||
} /* Conn_SetPenalty */
|
||||
|
||||
|
||||
GLOBAL void
|
||||
Conn_ClearFlags( void )
|
||||
{
|
||||
@@ -125,7 +129,6 @@ Conn_ClearFlags( void )
|
||||
for( i = 0; i < Pool_Size; i++ ) My_Connections[i].flag = 0;
|
||||
} /* Conn_ClearFlags */
|
||||
|
||||
|
||||
GLOBAL int
|
||||
Conn_Flag( CONN_ID Idx )
|
||||
{
|
||||
@@ -133,7 +136,6 @@ Conn_Flag( CONN_ID Idx )
|
||||
return My_Connections[Idx].flag;
|
||||
} /* Conn_Flag */
|
||||
|
||||
|
||||
GLOBAL void
|
||||
Conn_SetFlag( CONN_ID Idx, int Flag )
|
||||
{
|
||||
@@ -141,12 +143,11 @@ Conn_SetFlag( CONN_ID Idx, int Flag )
|
||||
My_Connections[Idx].flag = Flag;
|
||||
} /* Conn_SetFlag */
|
||||
|
||||
|
||||
GLOBAL CONN_ID
|
||||
Conn_First( void )
|
||||
{
|
||||
CONN_ID i;
|
||||
|
||||
|
||||
for( i = 0; i < Pool_Size; i++ )
|
||||
{
|
||||
if( My_Connections[i].sock != NONE ) return i;
|
||||
@@ -154,14 +155,13 @@ Conn_First( void )
|
||||
return NONE;
|
||||
} /* Conn_First */
|
||||
|
||||
|
||||
GLOBAL CONN_ID
|
||||
Conn_Next( CONN_ID Idx )
|
||||
{
|
||||
CONN_ID i = NONE;
|
||||
|
||||
assert( Idx > NONE );
|
||||
|
||||
|
||||
for( i = Idx + 1; i < Pool_Size; i++ )
|
||||
{
|
||||
if( My_Connections[i].sock != NONE ) return i;
|
||||
@@ -169,7 +169,6 @@ Conn_Next( CONN_ID Idx )
|
||||
return NONE;
|
||||
} /* Conn_Next */
|
||||
|
||||
|
||||
GLOBAL UINT16
|
||||
Conn_Options( CONN_ID Idx )
|
||||
{
|
||||
@@ -177,7 +176,6 @@ Conn_Options( CONN_ID Idx )
|
||||
return My_Connections[Idx].options;
|
||||
} /* Conn_Options */
|
||||
|
||||
|
||||
/**
|
||||
* Set connection option.
|
||||
*/
|
||||
@@ -188,7 +186,6 @@ Conn_SetOption(CONN_ID Idx, int Option)
|
||||
Conn_OPTION_ADD(&My_Connections[Idx], Option);
|
||||
} /* Conn_SetOption */
|
||||
|
||||
|
||||
/**
|
||||
* Get the start time of the connection.
|
||||
* The result is the start time in seconds since 1970-01-01, as reported
|
||||
@@ -224,7 +221,6 @@ Conn_SendQ( CONN_ID Idx )
|
||||
return array_bytes(&My_Connections[Idx].wbuf);
|
||||
} /* Conn_SendQ */
|
||||
|
||||
|
||||
/**
|
||||
* return number of messages sent on this connection so far
|
||||
*/
|
||||
@@ -236,7 +232,6 @@ Conn_SendMsg( CONN_ID Idx )
|
||||
return My_Connections[Idx].msg_out;
|
||||
} /* Conn_SendMsg */
|
||||
|
||||
|
||||
/**
|
||||
* return number of (uncompressed) bytes sent
|
||||
* on this connection so far
|
||||
@@ -248,7 +243,6 @@ Conn_SendBytes( CONN_ID Idx )
|
||||
return My_Connections[Idx].bytes_out;
|
||||
} /* Conn_SendBytes */
|
||||
|
||||
|
||||
/**
|
||||
* return number of bytes pending in read buffer
|
||||
*/
|
||||
@@ -264,7 +258,6 @@ Conn_RecvQ( CONN_ID Idx )
|
||||
return array_bytes(&My_Connections[Idx].rbuf);
|
||||
} /* Conn_RecvQ */
|
||||
|
||||
|
||||
/**
|
||||
* return number of messages received on this connection so far
|
||||
*/
|
||||
@@ -275,7 +268,6 @@ Conn_RecvMsg( CONN_ID Idx )
|
||||
return My_Connections[Idx].msg_in;
|
||||
} /* Conn_RecvMsg */
|
||||
|
||||
|
||||
/**
|
||||
* return number of (uncompressed) bytes received on this
|
||||
* connection so far
|
||||
@@ -297,19 +289,16 @@ Conn_IPA(CONN_ID Idx)
|
||||
return ng_ipaddr_tostr(&My_Connections[Idx].addr);
|
||||
}
|
||||
|
||||
|
||||
GLOBAL void
|
||||
Conn_ResetWCounter( void )
|
||||
{
|
||||
WCounter = 0;
|
||||
} /* Conn_ResetWCounter */
|
||||
|
||||
|
||||
GLOBAL long
|
||||
Conn_WCounter( void )
|
||||
{
|
||||
return WCounter;
|
||||
} /* Conn_WCounter */
|
||||
|
||||
|
||||
/* -eof- */
|
||||
|
@@ -1,6 +1,13 @@
|
||||
/*
|
||||
* ngIRCd -- The Next Generation IRC Daemon
|
||||
* Copyright (c) 2005-2008 Florian Westphal <fw@strlen.de>
|
||||
* Copyright (c)2005-2008 Florian Westphal (fw@strlen.de).
|
||||
* Copyright (c)2008-2014 Alexander Barton (alex@barton.de) and Contributors.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include "portab.h"
|
||||
@@ -10,7 +17,6 @@
|
||||
* SSL wrapper functions
|
||||
*/
|
||||
|
||||
#include "imp.h"
|
||||
#include "conf-ssl.h"
|
||||
|
||||
#ifdef SSL_SUPPORT
|
||||
@@ -29,7 +35,6 @@
|
||||
#include "conn-ssl.h"
|
||||
#include "log.h"
|
||||
|
||||
#include "exp.h"
|
||||
#include "defines.h"
|
||||
|
||||
extern struct SSLOptions Conf_SSLOptions;
|
||||
@@ -37,6 +42,7 @@ extern struct SSLOptions Conf_SSLOptions;
|
||||
#ifdef HAVE_LIBSSL
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/rand.h>
|
||||
#include <openssl/dh.h>
|
||||
|
||||
static SSL_CTX * ssl_ctx;
|
||||
static DH *dh_params;
|
||||
@@ -56,9 +62,17 @@ static bool ConnSSL_LoadServerKey_openssl PARAMS(( SSL_CTX *c ));
|
||||
|
||||
#define MAX_HASH_SIZE 64 /* from gnutls-int.h */
|
||||
|
||||
static gnutls_certificate_credentials_t x509_cred;
|
||||
typedef struct {
|
||||
int refcnt;
|
||||
gnutls_certificate_credentials_t x509_cred;
|
||||
gnutls_dh_params_t dh_params;
|
||||
} x509_cred_slot;
|
||||
|
||||
static array x509_creds = INIT_ARRAY;
|
||||
static size_t x509_cred_idx;
|
||||
|
||||
static gnutls_dh_params_t dh_params;
|
||||
static gnutls_priority_t priorities_cache;
|
||||
static gnutls_priority_t priorities_cache = NULL;
|
||||
static bool ConnSSL_LoadServerKey_gnutls PARAMS(( void ));
|
||||
#endif
|
||||
|
||||
@@ -260,6 +274,21 @@ void ConnSSL_Free(CONNECTION *c)
|
||||
gnutls_bye(sess, GNUTLS_SHUT_RDWR);
|
||||
gnutls_deinit(sess);
|
||||
}
|
||||
x509_cred_slot *slot = array_get(&x509_creds, sizeof(x509_cred_slot), c->ssl_state.x509_cred_idx);
|
||||
assert(slot != NULL);
|
||||
assert(slot->refcnt > 0);
|
||||
assert(slot->x509_cred != NULL);
|
||||
slot->refcnt--;
|
||||
if ((c->ssl_state.x509_cred_idx != x509_cred_idx) && (slot->refcnt <= 0)) {
|
||||
Log(LOG_INFO, "Discarding X509 certificate credentials from slot %zd.",
|
||||
c->ssl_state.x509_cred_idx);
|
||||
gnutls_certificate_free_keys(slot->x509_cred);
|
||||
gnutls_certificate_free_credentials(slot->x509_cred);
|
||||
slot->x509_cred = NULL;
|
||||
gnutls_dh_params_deinit(slot->dh_params);
|
||||
slot->dh_params = NULL;
|
||||
slot->refcnt = 0;
|
||||
}
|
||||
#endif
|
||||
assert(Conn_OPTION_ISSET(c, CONN_SSL));
|
||||
/* can't just set bitmask to 0 -- there are other, non-ssl related flags, e.g. CONN_ZIP. */
|
||||
@@ -278,10 +307,12 @@ ConnSSL_InitLibrary( void )
|
||||
#ifdef HAVE_LIBSSL
|
||||
SSL_CTX *newctx;
|
||||
|
||||
#if OPENSSL_API_COMPAT < 0x10100000L
|
||||
if (!ssl_ctx) {
|
||||
SSL_library_init();
|
||||
SSL_load_error_strings();
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!RAND_status()) {
|
||||
Log(LOG_ERR, "OpenSSL PRNG not seeded: /dev/urandom missing?");
|
||||
@@ -303,8 +334,18 @@ ConnSSL_InitLibrary( void )
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!ConnSSL_LoadServerKey_openssl(newctx))
|
||||
if (!ConnSSL_LoadServerKey_openssl(newctx)) {
|
||||
/* Failed to read new key but an old ssl context
|
||||
* already exists -> reuse old context */
|
||||
if (ssl_ctx) {
|
||||
SSL_CTX_free(newctx);
|
||||
Log(LOG_WARNING,
|
||||
"Re-Initializing of SSL failed, using old keys!");
|
||||
return true;
|
||||
}
|
||||
/* No preexisting old context -> error. */
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (SSL_CTX_set_cipher_list(newctx, Conf_SSLOptions.CipherList) == 0) {
|
||||
Log(LOG_ERR, "Failed to apply OpenSSL cipher list \"%s\"!",
|
||||
@@ -312,13 +353,14 @@ ConnSSL_InitLibrary( void )
|
||||
goto out;
|
||||
}
|
||||
|
||||
SSL_CTX_set_session_id_context(newctx, (unsigned char *)"ngircd", 6);
|
||||
SSL_CTX_set_options(newctx, SSL_OP_SINGLE_DH_USE|SSL_OP_NO_SSLv2);
|
||||
SSL_CTX_set_mode(newctx, SSL_MODE_ENABLE_PARTIAL_WRITE);
|
||||
SSL_CTX_set_verify(newctx, SSL_VERIFY_PEER|SSL_VERIFY_CLIENT_ONCE,
|
||||
Verify_openssl);
|
||||
SSL_CTX_free(ssl_ctx);
|
||||
ssl_ctx = newctx;
|
||||
Log(LOG_INFO, "%s initialized.", SSLeay_version(SSLEAY_VERSION));
|
||||
Log(LOG_INFO, "%s initialized.", OpenSSL_version(OPENSSL_VERSION));
|
||||
return true;
|
||||
out:
|
||||
SSL_CTX_free(newctx);
|
||||
@@ -329,22 +371,21 @@ out:
|
||||
int err;
|
||||
static bool initialized;
|
||||
|
||||
if (initialized) {
|
||||
/* TODO: cannot reload gnutls keys: can't simply free x509
|
||||
* context -- it may still be in use */
|
||||
return false;
|
||||
}
|
||||
|
||||
err = gnutls_global_init();
|
||||
if (err) {
|
||||
Log(LOG_ERR, "Failed to initialize GnuTLS: %s",
|
||||
gnutls_strerror(err));
|
||||
goto out;
|
||||
if (!initialized) {
|
||||
err = gnutls_global_init();
|
||||
if (err) {
|
||||
Log(LOG_ERR, "Failed to initialize GnuTLS: %s",
|
||||
gnutls_strerror(err));
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
if (!ConnSSL_LoadServerKey_gnutls())
|
||||
goto out;
|
||||
|
||||
if (priorities_cache != NULL) {
|
||||
gnutls_priority_deinit(priorities_cache);
|
||||
}
|
||||
if (gnutls_priority_init(&priorities_cache, Conf_SSLOptions.CipherList,
|
||||
NULL) != GNUTLS_E_SUCCESS) {
|
||||
Log(LOG_ERR,
|
||||
@@ -370,6 +411,9 @@ ConnSSL_LoadServerKey_gnutls(void)
|
||||
int err;
|
||||
const char *cert_file;
|
||||
|
||||
x509_cred_slot *slot = NULL;
|
||||
gnutls_certificate_credentials_t x509_cred;
|
||||
|
||||
err = gnutls_certificate_allocate_credentials(&x509_cred);
|
||||
if (err < 0) {
|
||||
Log(LOG_ERR, "Failed to allocate certificate credentials: %s",
|
||||
@@ -400,6 +444,43 @@ ConnSSL_LoadServerKey_gnutls(void)
|
||||
gnutls_strerror(err));
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Free currently active x509 context (if any) unless it is still in use */
|
||||
slot = array_get(&x509_creds, sizeof(x509_cred_slot), x509_cred_idx);
|
||||
if ((slot != NULL) && (slot->refcnt <= 0) && (slot->x509_cred != NULL)) {
|
||||
Log(LOG_INFO, "Discarding X509 certificate credentials from slot %zd.", x509_cred_idx);
|
||||
gnutls_certificate_free_keys(slot->x509_cred);
|
||||
gnutls_certificate_free_credentials(slot->x509_cred);
|
||||
slot->x509_cred = NULL;
|
||||
gnutls_dh_params_deinit(slot->dh_params);
|
||||
slot->dh_params = NULL;
|
||||
slot->refcnt = 0;
|
||||
}
|
||||
|
||||
/* Find free slot */
|
||||
x509_cred_idx = (size_t) -1;
|
||||
size_t i;
|
||||
for (slot = array_start(&x509_creds), i = 0;
|
||||
i < array_length(&x509_creds, sizeof(x509_cred_slot));
|
||||
slot++, i++) {
|
||||
if (slot->refcnt <= 0) {
|
||||
x509_cred_idx = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* ... allocate new slot otherwise. */
|
||||
if (x509_cred_idx == (size_t) -1) {
|
||||
x509_cred_idx = array_length(&x509_creds, sizeof(x509_cred_slot));
|
||||
slot = array_alloc(&x509_creds, sizeof(x509_cred_slot), x509_cred_idx);
|
||||
if (slot == NULL) {
|
||||
Log(LOG_ERR, "Failed to allocate new slot for certificate credentials");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Log(LOG_INFO, "Storing new X509 certificate credentials in slot %zd.", x509_cred_idx);
|
||||
slot->x509_cred = x509_cred;
|
||||
slot->refcnt = 0;
|
||||
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
@@ -501,8 +582,13 @@ ConnSSL_Init_SSL(CONNECTION *c)
|
||||
(gnutls_transport_ptr_t) (long) c->sock);
|
||||
gnutls_certificate_server_set_request(c->ssl_state.gnutls_session,
|
||||
GNUTLS_CERT_REQUEST);
|
||||
|
||||
Log(LOG_INFO, "Using X509 credentials from slot %zd", x509_cred_idx);
|
||||
c->ssl_state.x509_cred_idx = x509_cred_idx;
|
||||
x509_cred_slot *slot = array_get(&x509_creds, sizeof(x509_cred_slot), x509_cred_idx);
|
||||
slot->refcnt++;
|
||||
ret = gnutls_credentials_set(c->ssl_state.gnutls_session,
|
||||
GNUTLS_CRD_CERTIFICATE, x509_cred);
|
||||
GNUTLS_CRD_CERTIFICATE, slot->x509_cred);
|
||||
if (ret != 0) {
|
||||
Log(LOG_ERR, "Failed to set SSL credentials: %s",
|
||||
gnutls_strerror(ret));
|
||||
@@ -739,7 +825,7 @@ ConnSSL_InitCertFp( CONNECTION *c )
|
||||
gnutls_x509_crt_deinit(cert);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (gnutls_x509_crt_import(cert, &cert_list[0],
|
||||
GNUTLS_X509_FMT_DER) != GNUTLS_E_SUCCESS) {
|
||||
gnutls_x509_crt_deinit(cert);
|
||||
@@ -906,5 +992,3 @@ ConnSSL_InitLibrary(void)
|
||||
|
||||
#endif /* SSL_SUPPORT */
|
||||
/* -eof- */
|
||||
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* ngIRCd -- The Next Generation IRC Daemon
|
||||
* Copyright (c)2001-2007 Alexander Barton (alex@barton.de)
|
||||
* Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors.
|
||||
*
|
||||
* 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
|
||||
@@ -9,6 +9,8 @@
|
||||
* Please read the file COPYING, README and AUTHORS for more information.
|
||||
*/
|
||||
|
||||
#define CONN_MODULE
|
||||
|
||||
#include "portab.h"
|
||||
|
||||
/**
|
||||
@@ -16,14 +18,11 @@
|
||||
* Connection compression using ZLIB
|
||||
*/
|
||||
|
||||
#define CONN_MODULE
|
||||
/* Additionan debug messages related to ZIP compression: 0=off / 1=on */
|
||||
#define DEBUG_ZIP 0
|
||||
|
||||
#ifdef ZLIB
|
||||
|
||||
/* enable more zlib related debug messages: */
|
||||
/* #define DEBUG_ZLIB */
|
||||
|
||||
#include "imp.h"
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <zlib.h>
|
||||
@@ -31,9 +30,8 @@
|
||||
#include "conn.h"
|
||||
#include "conn-func.h"
|
||||
#include "log.h"
|
||||
|
||||
#include "array.h"
|
||||
#include "exp.h"
|
||||
|
||||
#include "conn-zip.h"
|
||||
|
||||
|
||||
@@ -143,7 +141,7 @@ Zip_Flush( CONN_ID Idx )
|
||||
out->next_out = zipbuf;
|
||||
out->avail_out = (uInt)sizeof zipbuf;
|
||||
|
||||
#ifdef DEBUG_ZIP
|
||||
#if DEBUG_ZIP
|
||||
Log(LOG_DEBUG, "out->avail_in %d, out->avail_out %d",
|
||||
out->avail_in, out->avail_out);
|
||||
#endif
|
||||
@@ -166,7 +164,7 @@ Zip_Flush( CONN_ID Idx )
|
||||
assert(out->avail_out <= WRITEBUFFER_SLINK_LEN);
|
||||
|
||||
zipbuf_used = WRITEBUFFER_SLINK_LEN - out->avail_out;
|
||||
#ifdef DEBUG_ZIP
|
||||
#if DEBUG_ZIP
|
||||
Log(LOG_DEBUG, "zipbuf_used: %d", zipbuf_used);
|
||||
#endif
|
||||
if (!array_catb(&My_Connections[Idx].wbuf,
|
||||
@@ -177,7 +175,7 @@ Zip_Flush( CONN_ID Idx )
|
||||
}
|
||||
|
||||
My_Connections[Idx].bytes_out += zipbuf_used;
|
||||
My_Connections[Idx].zip.bytes_out += array_bytes(&My_Connections[Idx].zip.wbuf);
|
||||
My_Connections[Idx].zip.bytes_out += array_bytes(&My_Connections[Idx].zip.wbuf);
|
||||
array_trunc(&My_Connections[Idx].zip.wbuf);
|
||||
|
||||
return true;
|
||||
@@ -200,7 +198,7 @@ Unzip_Buffer( CONN_ID Idx )
|
||||
int unzipbuf_used = 0;
|
||||
unsigned int z_rdatalen;
|
||||
unsigned int in_len;
|
||||
|
||||
|
||||
z_stream *in;
|
||||
|
||||
assert( Idx > NONE );
|
||||
@@ -218,7 +216,7 @@ Unzip_Buffer( CONN_ID Idx )
|
||||
in->next_out = unzipbuf;
|
||||
in->avail_out = (uInt)sizeof unzipbuf;
|
||||
|
||||
#ifdef DEBUG_ZIP
|
||||
#if DEBUG_ZIP
|
||||
Log(LOG_DEBUG, "in->avail_in %d, in->avail_out %d",
|
||||
in->avail_in, in->avail_out);
|
||||
#endif
|
||||
@@ -233,7 +231,7 @@ Unzip_Buffer( CONN_ID Idx )
|
||||
assert(z_rdatalen >= in->avail_in);
|
||||
in_len = z_rdatalen - in->avail_in;
|
||||
unzipbuf_used = READBUFFER_LEN - in->avail_out;
|
||||
#ifdef DEBUG_ZIP
|
||||
#if DEBUG_ZIP
|
||||
Log(LOG_DEBUG, "unzipbuf_used: %d - %d = %d", READBUFFER_LEN,
|
||||
in->avail_out, unzipbuf_used);
|
||||
#endif
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -105,9 +105,17 @@ typedef struct _Connection
|
||||
#endif
|
||||
} CONNECTION;
|
||||
|
||||
GLOBAL CONNECTION *My_Connections;
|
||||
GLOBAL CONN_ID Pool_Size;
|
||||
GLOBAL long WCounter;
|
||||
|
||||
#ifdef CONN_MODULE_GLOBAL_INIT
|
||||
CONNECTION *My_Connections;
|
||||
CONN_ID Pool_Size;
|
||||
long WCounter;
|
||||
#else
|
||||
extern CONNECTION *My_Connections;
|
||||
extern CONN_ID Pool_Size;
|
||||
extern long WCounter;
|
||||
#endif
|
||||
|
||||
|
||||
#define CONNECTION2ID(x) (long)(x - My_Connections)
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* ngIRCd -- The Next Generation IRC Daemon
|
||||
* Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors.
|
||||
* Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors.
|
||||
*
|
||||
* 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
|
||||
@@ -53,7 +53,7 @@
|
||||
/* Size of structures */
|
||||
|
||||
/** Max. count of configurable servers. */
|
||||
#define MAX_SERVERS 16
|
||||
#define MAX_SERVERS 64
|
||||
|
||||
/** Max. number of WHOWAS list items that can be stored. */
|
||||
#define MAX_WHOWAS 64
|
||||
@@ -61,6 +61,9 @@
|
||||
/** Size of default connection pool. */
|
||||
#define CONNECTION_POOL 100
|
||||
|
||||
/** Size of buffer for PAM service name. */
|
||||
#define MAX_PAM_SERVICE_NAME_LEN 64
|
||||
|
||||
|
||||
/* Hard-coded (default) options */
|
||||
|
||||
@@ -109,6 +112,10 @@
|
||||
#else
|
||||
# define CLIENT_USER_LEN 10
|
||||
#endif
|
||||
/** Max. length of user names saved for authentication (used by PAM) */
|
||||
#ifdef PAM
|
||||
# define CLIENT_AUTHUSER_LEN 64
|
||||
#endif
|
||||
|
||||
/** Max. length of "real names" (including NULL). */
|
||||
#define CLIENT_NAME_LEN 32
|
||||
@@ -123,7 +130,7 @@
|
||||
#define CLIENT_MODE_LEN 21
|
||||
|
||||
/** Max. length of server info texts (including NULL). */
|
||||
#define CLIENT_INFO_LEN 64
|
||||
#define CLIENT_INFO_LEN 128
|
||||
|
||||
/** Max. length of away messages (including NULL). */
|
||||
#define CLIENT_AWAY_LEN 128
|
||||
@@ -173,7 +180,7 @@
|
||||
#endif
|
||||
|
||||
/** Supported user modes. */
|
||||
#define USERMODES "abBcCioqrRswx"
|
||||
#define USERMODES "abBcCFiIoqrRswx"
|
||||
|
||||
/** Supported channel modes. */
|
||||
#define CHANMODES "abehiIklmMnoOPqQrRstvVz"
|
||||
@@ -202,6 +209,9 @@
|
||||
/** Max. number of channel modes with arguments per MODE command. */
|
||||
#define MAX_HNDL_MODES_ARG 5
|
||||
|
||||
/** Max. number of targets per PRIVMSG/NOTICE/... command. */
|
||||
#define MAX_HNDL_TARGETS 25
|
||||
|
||||
/** Max. number of WHO replies. */
|
||||
#define MAX_RPL_WHO 25
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* ngIRCd -- The Next Generation IRC Daemon
|
||||
* Copyright (c)2001-2010 Alexander Barton (alex@barton.de)
|
||||
* Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors.
|
||||
*
|
||||
* 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
|
||||
@@ -16,14 +16,12 @@
|
||||
* Hash calculation
|
||||
*/
|
||||
|
||||
#include "imp.h"
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "defines.h"
|
||||
#include "tool.h"
|
||||
|
||||
#include "exp.h"
|
||||
#include "hash.h"
|
||||
|
||||
static UINT32 jenkins_hash PARAMS((UINT8 *k, UINT32 length, UINT32 initval));
|
||||
|
@@ -1,11 +1,13 @@
|
||||
/*
|
||||
* ngIRCd -- The Next Generation IRC Daemon
|
||||
* Copyright (c)2005-2006 Florian Westphal (westphal@foo.fh-furtwangen.de)
|
||||
* Copyright (c)2006-2014 Alexander Barton (alex@barton.de) and Contributors.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Copyright (c) 2005 Florian Westphal (westphal@foo.fh-furtwangen.de)
|
||||
*/
|
||||
|
||||
#include "portab.h"
|
||||
@@ -15,21 +17,20 @@
|
||||
* I/O abstraction interface.
|
||||
*/
|
||||
|
||||
/* Extra debug messages in event add/delete/callback code: 0=off / 1=on */
|
||||
#define DEBUG_IO 0
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "array.h"
|
||||
#include "io.h"
|
||||
#include "log.h"
|
||||
|
||||
/* Enables extra debug messages in event add/delete/callback code. */
|
||||
/* #define DEBUG_IO */
|
||||
|
||||
typedef struct {
|
||||
#ifdef PROTOTYPES
|
||||
void (*callback)(int, short);
|
||||
@@ -119,6 +120,7 @@ static bool io_event_change_devpoll(int fd, short what);
|
||||
#endif
|
||||
|
||||
#ifdef IO_USE_SELECT
|
||||
#include <sys/time.h>
|
||||
#include "defines.h" /* for conn.h */
|
||||
#include "proc.h" /* for PROC_STAT (needed by conf.h) */
|
||||
#include "conn.h" /* for CONN_ID (needed by conf.h) */
|
||||
@@ -142,7 +144,7 @@ static array io_events;
|
||||
|
||||
static void io_docallback PARAMS((int fd, short what));
|
||||
|
||||
#ifdef DEBUG_IO
|
||||
#if DEBUG_IO
|
||||
static void
|
||||
io_debug(const char *s, int fd, int what)
|
||||
{
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* ngIRCd -- The Next Generation IRC Daemon
|
||||
* Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors.
|
||||
* Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors.
|
||||
*
|
||||
* 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
|
||||
@@ -16,22 +16,19 @@
|
||||
* Handler for IRC capability ("CAP") commands
|
||||
*/
|
||||
|
||||
#include "imp.h"
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
|
||||
#include "defines.h"
|
||||
#include "conn.h"
|
||||
#include "channel.h"
|
||||
#include "client-cap.h"
|
||||
#include "irc-macros.h"
|
||||
#include "irc-write.h"
|
||||
#include "log.h"
|
||||
#include "login.h"
|
||||
#include "messages.h"
|
||||
#include "parse.h"
|
||||
|
||||
#include "exp.h"
|
||||
#include "irc-cap.h"
|
||||
|
||||
/* Local functions */
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* ngIRCd -- The Next Generation IRC Daemon
|
||||
* Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors.
|
||||
* Copyright (c)2001-2018 Alexander Barton (alex@barton.de) and Contributors.
|
||||
*
|
||||
* 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
|
||||
@@ -16,13 +16,11 @@
|
||||
* IRC channel commands
|
||||
*/
|
||||
|
||||
#include "imp.h"
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "defines.h"
|
||||
#include "conn.h"
|
||||
#include "channel.h"
|
||||
#include "conn-func.h"
|
||||
@@ -37,7 +35,6 @@
|
||||
#include "irc-write.h"
|
||||
#include "conf.h"
|
||||
|
||||
#include "exp.h"
|
||||
#include "irc-channel.h"
|
||||
|
||||
/**
|
||||
@@ -323,11 +320,9 @@ IRC_JOIN( CLIENT *Client, REQUEST *Req )
|
||||
channame = strtok_r(channame, ",", &lastchan);
|
||||
|
||||
/* Make sure that "channame" is not the empty string ("JOIN :") */
|
||||
if (!channame) {
|
||||
IRC_SetPenalty(Client, 2);
|
||||
if (!channame)
|
||||
return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG,
|
||||
Client_ID(Client), Req->command);
|
||||
}
|
||||
|
||||
while (channame) {
|
||||
flags = NULL;
|
||||
@@ -447,15 +442,13 @@ IRC_PART(CLIENT * Client, REQUEST * Req)
|
||||
chan = strtok(Req->argv[0], ",");
|
||||
|
||||
/* Make sure that "chan" is not the empty string ("PART :") */
|
||||
if (!chan) {
|
||||
IRC_SetPenalty(Client, 2);
|
||||
if (!chan)
|
||||
return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG,
|
||||
Client_ID(Client), Req->command);
|
||||
}
|
||||
|
||||
while (chan) {
|
||||
Channel_Part(target, Client, chan,
|
||||
Req->argc > 1 ? Req->argv[1] : Client_ID(target));
|
||||
Req->argc > 1 ? Req->argv[1] : "");
|
||||
chan = strtok(NULL, ",");
|
||||
}
|
||||
|
||||
@@ -484,8 +477,6 @@ IRC_TOPIC( CLIENT *Client, REQUEST *Req )
|
||||
assert( Client != NULL );
|
||||
assert( Req != NULL );
|
||||
|
||||
IRC_SetPenalty(Client, 1);
|
||||
|
||||
_IRC_GET_SENDER_OR_RETURN_(from, Req, Client)
|
||||
|
||||
chan = Channel_Search(Req->argv[0]);
|
||||
@@ -506,7 +497,7 @@ IRC_TOPIC( CLIENT *Client, REQUEST *Req )
|
||||
topic_power = true;
|
||||
|
||||
if (Req->argc == 1) {
|
||||
/* Request actual topic */
|
||||
/* Request current topic */
|
||||
topic = Channel_Topic(chan);
|
||||
if (*topic) {
|
||||
r = IRC_WriteStrClient(from, RPL_TOPIC_MSG,
|
||||
@@ -541,8 +532,6 @@ IRC_TOPIC( CLIENT *Client, REQUEST *Req )
|
||||
Channel_Name(chan));
|
||||
}
|
||||
|
||||
/* Set new topic */
|
||||
Channel_SetTopic(chan, from, Req->argv[1]);
|
||||
LogDebug("%s \"%s\" set topic on \"%s\": %s",
|
||||
Client_TypeText(from), Client_Mask(from), Channel_Name(chan),
|
||||
Req->argv[1][0] ? Req->argv[1] : "<none>");
|
||||
@@ -554,9 +543,17 @@ IRC_TOPIC( CLIENT *Client, REQUEST *Req )
|
||||
if (!Channel_IsLocal(chan))
|
||||
IRC_WriteStrServersPrefix(Client, from, "TOPIC %s :%s",
|
||||
Req->argv[0], Req->argv[1]);
|
||||
IRC_WriteStrChannelPrefix(Client, chan, from, false, "TOPIC %s :%s",
|
||||
Req->argv[0], Req->argv[1]);
|
||||
|
||||
/* Infrom local clients, but only when the topic really changed. */
|
||||
if (strcmp(Req->argv[1], Channel_Topic(chan)) != 0)
|
||||
IRC_WriteStrChannelPrefix(Client, chan, from, false,
|
||||
"TOPIC %s :%s", Req->argv[0],
|
||||
Req->argv[1]);
|
||||
|
||||
/* Update topic, setter, and timestamp. */
|
||||
Channel_SetTopic(chan, from, Req->argv[1]);
|
||||
|
||||
/* Send confirmation when the local client is a user. */
|
||||
if (Client_Type(Client) == CLIENT_USER)
|
||||
return IRC_WriteStrClientPrefix(Client, Client, "TOPIC %s :%s",
|
||||
Req->argv[0], Req->argv[1]);
|
||||
@@ -582,8 +579,6 @@ IRC_LIST( CLIENT *Client, REQUEST *Req )
|
||||
assert(Client != NULL);
|
||||
assert(Req != NULL);
|
||||
|
||||
IRC_SetPenalty(Client, 2);
|
||||
|
||||
_IRC_GET_SENDER_OR_RETURN_(from, Req, Client)
|
||||
|
||||
if (Req->argc > 0)
|
||||
@@ -608,6 +603,10 @@ IRC_LIST( CLIENT *Client, REQUEST *Req )
|
||||
}
|
||||
}
|
||||
|
||||
/* Send list head */
|
||||
if (!IRC_WriteStrClient(from, RPL_LISTSTART_MSG, Client_ID(from)))
|
||||
return DISCONNECTED;
|
||||
|
||||
while (pattern) {
|
||||
/* Loop through all the channels */
|
||||
if (Req->argc > 0)
|
||||
@@ -619,9 +618,7 @@ IRC_LIST( CLIENT *Client, REQUEST *Req )
|
||||
/* Gotcha! */
|
||||
if (!Channel_HasMode(chan, 's')
|
||||
|| Channel_IsMemberOf(chan, from)
|
||||
|| (!Conf_MorePrivacy
|
||||
&& Client_HasMode(Client, 'o')
|
||||
&& Client_Conn(Client) > NONE))
|
||||
|| Client_HasMode(from, 'o'))
|
||||
{
|
||||
if ((Conf_MaxListSize > 0)
|
||||
&& IRC_CheckListTooBig(from, count,
|
||||
@@ -669,11 +666,9 @@ IRC_CHANINFO( CLIENT *Client, REQUEST *Req )
|
||||
assert( Req != NULL );
|
||||
|
||||
/* Bad number of parameters? */
|
||||
if (Req->argc < 2 || Req->argc == 4 || Req->argc > 5) {
|
||||
IRC_SetPenalty(Client, 2);
|
||||
if (Req->argc < 2 || Req->argc == 4 || Req->argc > 5)
|
||||
return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG,
|
||||
Client_ID(Client), Req->command);
|
||||
}
|
||||
|
||||
/* Compatibility kludge */
|
||||
if (Req->argc == 5)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* ngIRCd -- The Next Generation IRC Daemon
|
||||
* Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors.
|
||||
* Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors.
|
||||
*
|
||||
* 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
|
||||
@@ -16,7 +16,8 @@
|
||||
* IRC encoding commands
|
||||
*/
|
||||
|
||||
#include "imp.h"
|
||||
#ifdef ICONV
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -28,11 +29,8 @@
|
||||
#include "parse.h"
|
||||
#include "tool.h"
|
||||
|
||||
#include "exp.h"
|
||||
#include "irc-encoding.h"
|
||||
|
||||
#ifdef ICONV
|
||||
|
||||
/**
|
||||
* Handler for the IRC+ "CHARCONV" command.
|
||||
*
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* ngIRCd -- The Next Generation IRC Daemon
|
||||
* Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors.
|
||||
* Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors.
|
||||
*
|
||||
* 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
|
||||
@@ -16,13 +16,12 @@
|
||||
* IRC info commands
|
||||
*/
|
||||
|
||||
#include "imp.h"
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "ngircd.h"
|
||||
#include "conn-func.h"
|
||||
@@ -30,12 +29,9 @@
|
||||
#include "channel.h"
|
||||
#include "class.h"
|
||||
#include "conf.h"
|
||||
#include "defines.h"
|
||||
#include "lists.h"
|
||||
#include "log.h"
|
||||
#include "messages.h"
|
||||
#include "match.h"
|
||||
#include "tool.h"
|
||||
#include "parse.h"
|
||||
#include "irc.h"
|
||||
#include "irc-macros.h"
|
||||
@@ -43,7 +39,6 @@
|
||||
#include "client-cap.h"
|
||||
#include "op.h"
|
||||
|
||||
#include "exp.h"
|
||||
#include "irc-info.h"
|
||||
|
||||
/* Local functions */
|
||||
@@ -152,8 +147,6 @@ IRC_WHO_Channel(CLIENT *Client, CHANNEL *Chan, bool OnlyOps)
|
||||
assert( Client != NULL );
|
||||
assert( Chan != NULL );
|
||||
|
||||
IRC_SetPenalty(Client, 1);
|
||||
|
||||
is_member = Channel_IsMemberOf(Chan, Client);
|
||||
|
||||
/* Secret channel? */
|
||||
@@ -169,7 +162,7 @@ IRC_WHO_Channel(CLIENT *Client, CHANNEL *Chan, bool OnlyOps)
|
||||
if (OnlyOps && !is_ircop)
|
||||
continue;
|
||||
|
||||
is_visible = Client_HasMode(c, 'i');
|
||||
is_visible = !Client_HasMode(c, 'i');
|
||||
if (is_member || is_visible) {
|
||||
memset(flags, 0, sizeof(flags));
|
||||
|
||||
@@ -191,7 +184,7 @@ IRC_WHO_Channel(CLIENT *Client, CHANNEL *Chan, bool OnlyOps)
|
||||
}
|
||||
}
|
||||
|
||||
/* If there are a lot of clients, augment penalty a bit */
|
||||
/* If there are a lot of clients, increase the penalty a bit */
|
||||
if (count > MAX_RPL_WHO)
|
||||
IRC_SetPenalty(Client, 1);
|
||||
|
||||
@@ -320,48 +313,50 @@ IRC_WHOIS_SendReply(CLIENT *Client, CLIENT *from, CLIENT *c)
|
||||
Client_Info(Client_Introducer(c))))
|
||||
return DISCONNECTED;
|
||||
|
||||
/* Channels */
|
||||
snprintf(str, sizeof(str), RPL_WHOISCHANNELS_MSG,
|
||||
Client_ID(from), Client_ID(c));
|
||||
cl2chan = Channel_FirstChannelOf(c);
|
||||
while (cl2chan) {
|
||||
chan = Channel_GetChannel(cl2chan);
|
||||
assert(chan != NULL);
|
||||
/* Channels, show only if client has no +I or if from is oper */
|
||||
if(!(Client_HasMode(c, 'I')) || Client_HasMode(from, 'o')) {
|
||||
snprintf(str, sizeof(str), RPL_WHOISCHANNELS_MSG,
|
||||
Client_ID(from), Client_ID(c));
|
||||
cl2chan = Channel_FirstChannelOf(c);
|
||||
while (cl2chan) {
|
||||
chan = Channel_GetChannel(cl2chan);
|
||||
assert(chan != NULL);
|
||||
|
||||
/* next */
|
||||
cl2chan = Channel_NextChannelOf(c, cl2chan);
|
||||
/* next */
|
||||
cl2chan = Channel_NextChannelOf(c, cl2chan);
|
||||
|
||||
/* Secret channel? */
|
||||
if (Channel_HasMode(chan, 's')
|
||||
&& !Channel_IsMemberOf(chan, Client))
|
||||
continue;
|
||||
/* Secret channel? */
|
||||
if (Channel_HasMode(chan, 's')
|
||||
&& !Channel_IsMemberOf(chan, Client))
|
||||
continue;
|
||||
|
||||
/* Local channel and request is not from a user? */
|
||||
if (Client_Type(Client) == CLIENT_SERVER
|
||||
&& Channel_IsLocal(chan))
|
||||
continue;
|
||||
/* Local channel and request is not from a user? */
|
||||
if (Client_Type(Client) == CLIENT_SERVER
|
||||
&& Channel_IsLocal(chan))
|
||||
continue;
|
||||
|
||||
/* Concatenate channel names */
|
||||
if (str[strlen(str) - 1] != ':')
|
||||
strlcat(str, " ", sizeof(str));
|
||||
/* Concatenate channel names */
|
||||
if (str[strlen(str) - 1] != ':')
|
||||
strlcat(str, " ", sizeof(str));
|
||||
|
||||
who_flags_qualifier(Client, Channel_UserModes(chan, c),
|
||||
str, sizeof(str));
|
||||
strlcat(str, Channel_Name(chan), sizeof(str));
|
||||
who_flags_qualifier(Client, Channel_UserModes(chan, c),
|
||||
str, sizeof(str));
|
||||
strlcat(str, Channel_Name(chan), sizeof(str));
|
||||
|
||||
if (strlen(str) > (COMMAND_LEN - CHANNEL_NAME_LEN - 4)) {
|
||||
/* Line becomes too long: send it! */
|
||||
if (strlen(str) > (COMMAND_LEN - CHANNEL_NAME_LEN - 4)) {
|
||||
/* Line becomes too long: send it! */
|
||||
if (!IRC_WriteStrClient(Client, "%s", str))
|
||||
return DISCONNECTED;
|
||||
snprintf(str, sizeof(str), RPL_WHOISCHANNELS_MSG,
|
||||
Client_ID(from), Client_ID(c));
|
||||
}
|
||||
}
|
||||
if(str[strlen(str) - 1] != ':') {
|
||||
/* There is data left to send: */
|
||||
if (!IRC_WriteStrClient(Client, "%s", str))
|
||||
return DISCONNECTED;
|
||||
snprintf(str, sizeof(str), RPL_WHOISCHANNELS_MSG,
|
||||
Client_ID(from), Client_ID(c));
|
||||
}
|
||||
}
|
||||
if(str[strlen(str) - 1] != ':') {
|
||||
/* There is data left to send: */
|
||||
if (!IRC_WriteStrClient(Client, "%s", str))
|
||||
return DISCONNECTED;
|
||||
}
|
||||
|
||||
/* IRC-Services? */
|
||||
if (Client_Type(c) == CLIENT_SERVICE &&
|
||||
@@ -403,9 +398,16 @@ IRC_WHOIS_SendReply(CLIENT *Client, CLIENT *from, CLIENT *c)
|
||||
Client_ID(from), Client_ID(c)))
|
||||
return DISCONNECTED;
|
||||
|
||||
/* Account name metadata? */
|
||||
if (Client_AccountName(c) &&
|
||||
!IRC_WriteStrClient(from, RPL_WHOISLOGGEDIN_MSG,
|
||||
Client_ID(from), Client_ID(c),
|
||||
Client_AccountName(c)))
|
||||
return DISCONNECTED;
|
||||
|
||||
/* Local client and requester is the user itself or an IRC Op? */
|
||||
if (Client_Conn(c) > NONE &&
|
||||
(from == c || (!Conf_MorePrivacy && Client_HasMode(from, 'o')))) {
|
||||
(from == c || Client_HasMode(from, 'o'))) {
|
||||
/* Client hostname */
|
||||
if (!IRC_WriteStrClient(from, RPL_WHOISHOST_MSG,
|
||||
Client_ID(from), Client_ID(c),
|
||||
@@ -500,8 +502,6 @@ IRC_ADMIN(CLIENT *Client, REQUEST *Req )
|
||||
assert( Client != NULL );
|
||||
assert( Req != NULL );
|
||||
|
||||
IRC_SetPenalty(Client, 1);
|
||||
|
||||
_IRC_GET_SENDER_OR_RETURN_(prefix, Req, Client)
|
||||
_IRC_GET_TARGET_SERVER_OR_RETURN_(target, Req, 0, prefix)
|
||||
|
||||
@@ -544,8 +544,6 @@ IRC_INFO(CLIENT * Client, REQUEST * Req)
|
||||
assert(Client != NULL);
|
||||
assert(Req != NULL);
|
||||
|
||||
IRC_SetPenalty(Client, 2);
|
||||
|
||||
_IRC_GET_SENDER_OR_RETURN_(prefix, Req, Client)
|
||||
_IRC_GET_TARGET_SERVER_OR_RETURN_(target, Req, 0, prefix)
|
||||
|
||||
@@ -560,7 +558,15 @@ IRC_INFO(CLIENT * Client, REQUEST * Req)
|
||||
NGIRCd_Version))
|
||||
return DISCONNECTED;
|
||||
|
||||
#if defined(__DATE__) && defined(__TIME__)
|
||||
#if defined(BIRTHDATE)
|
||||
char t_str[60];
|
||||
time_t t = BIRTHDATE;
|
||||
(void)strftime(t_str, sizeof(t_str), "%a %b %d %Y at %H:%M:%S (%Z)",
|
||||
localtime(&t));
|
||||
snprintf(msg, sizeof(msg), "Birth Date: %s", t_str);
|
||||
if (!IRC_WriteStrClient(Client, RPL_INFO_MSG, Client_ID(prefix), msg))
|
||||
return DISCONNECTED;
|
||||
#elif defined(__DATE__) && defined(__TIME__)
|
||||
snprintf(msg, sizeof(msg), "Birth Date: %s at %s", __DATE__, __TIME__);
|
||||
if (!IRC_WriteStrClient(Client, RPL_INFO_MSG, Client_ID(prefix), msg))
|
||||
return DISCONNECTED;
|
||||
@@ -631,8 +637,6 @@ IRC_LINKS(CLIENT *Client, REQUEST *Req)
|
||||
assert(Client != NULL);
|
||||
assert(Req != NULL);
|
||||
|
||||
IRC_SetPenalty(Client, 1);
|
||||
|
||||
_IRC_GET_SENDER_OR_RETURN_(from, Req, Client)
|
||||
|
||||
/* Get pointer to server mask or "*", if none given */
|
||||
@@ -685,8 +689,6 @@ IRC_LUSERS( CLIENT *Client, REQUEST *Req )
|
||||
assert( Client != NULL );
|
||||
assert( Req != NULL );
|
||||
|
||||
IRC_SetPenalty(Client, 1);
|
||||
|
||||
_IRC_GET_SENDER_OR_RETURN_(from, Req, Client)
|
||||
_IRC_GET_TARGET_SERVER_OR_RETURN_(target, Req, 1, from)
|
||||
|
||||
@@ -716,8 +718,6 @@ IRC_SERVLIST(CLIENT *Client, REQUEST *Req)
|
||||
assert(Client != NULL);
|
||||
assert(Req != NULL);
|
||||
|
||||
IRC_SetPenalty(Client, 1);
|
||||
|
||||
if (Req->argc < 2 || strcmp(Req->argv[1], "0") == 0) {
|
||||
for (c = Client_First(); c!= NULL; c = Client_Next(c)) {
|
||||
if (Client_Type(c) != CLIENT_SERVICE)
|
||||
@@ -753,8 +753,6 @@ IRC_MOTD( CLIENT *Client, REQUEST *Req )
|
||||
assert( Client != NULL );
|
||||
assert( Req != NULL );
|
||||
|
||||
IRC_SetPenalty(Client, 3);
|
||||
|
||||
_IRC_GET_SENDER_OR_RETURN_(from, Req, Client)
|
||||
_IRC_GET_TARGET_SERVER_OR_RETURN_(target, Req, 0, from)
|
||||
|
||||
@@ -785,8 +783,6 @@ IRC_NAMES( CLIENT *Client, REQUEST *Req )
|
||||
assert( Client != NULL );
|
||||
assert( Req != NULL );
|
||||
|
||||
IRC_SetPenalty(Client, 1);
|
||||
|
||||
_IRC_GET_SENDER_OR_RETURN_(from, Req, Client)
|
||||
_IRC_GET_TARGET_SERVER_OR_RETURN_(target, Req, 1, from)
|
||||
|
||||
@@ -871,8 +867,6 @@ IRC_STATS( CLIENT *Client, REQUEST *Req )
|
||||
assert(Client != NULL);
|
||||
assert(Req != NULL);
|
||||
|
||||
IRC_SetPenalty(Client, 2);
|
||||
|
||||
_IRC_GET_SENDER_OR_RETURN_(from, Req, Client)
|
||||
_IRC_GET_TARGET_SERVER_OR_RETURN_(target, Req, 1, from)
|
||||
|
||||
@@ -900,16 +894,16 @@ IRC_STATS( CLIENT *Client, REQUEST *Req )
|
||||
list = Class_GetList(CLASS_GLINE);
|
||||
else
|
||||
list = Class_GetList(CLASS_KLINE);
|
||||
list_item = Lists_GetFirst(list);
|
||||
while (list_item) {
|
||||
if (!IRC_WriteStrClient(from, RPL_STATSXLINE_MSG,
|
||||
list_item = Lists_GetFirst(list);
|
||||
while (list_item) {
|
||||
if (!IRC_WriteStrClient(from, RPL_STATSXLINE_MSG,
|
||||
Client_ID(from), query,
|
||||
Lists_GetMask(list_item),
|
||||
Lists_GetValidity(list_item),
|
||||
Lists_GetReason(list_item)))
|
||||
return DISCONNECTED;
|
||||
list_item = Lists_GetNext(list_item);
|
||||
}
|
||||
return DISCONNECTED;
|
||||
list_item = Lists_GetNext(list_item);
|
||||
}
|
||||
break;
|
||||
case 'L': /* Link status (servers and user links) */
|
||||
if (!Op_Check(from, Req))
|
||||
@@ -1013,8 +1007,6 @@ IRC_TIME( CLIENT *Client, REQUEST *Req )
|
||||
assert(Client != NULL);
|
||||
assert(Req != NULL);
|
||||
|
||||
IRC_SetPenalty(Client, 1);
|
||||
|
||||
_IRC_GET_SENDER_OR_RETURN_(from, Req, Client)
|
||||
_IRC_GET_TARGET_SERVER_OR_RETURN_(target, Req, 0, from)
|
||||
|
||||
@@ -1048,8 +1040,6 @@ IRC_USERHOST(CLIENT *Client, REQUEST *Req)
|
||||
assert(Client != NULL);
|
||||
assert(Req != NULL);
|
||||
|
||||
IRC_SetPenalty(Client, 1);
|
||||
|
||||
if (Req->argc > 5)
|
||||
max = 5;
|
||||
else
|
||||
@@ -1110,8 +1100,6 @@ IRC_VERSION( CLIENT *Client, REQUEST *Req )
|
||||
assert( Client != NULL );
|
||||
assert( Req != NULL );
|
||||
|
||||
IRC_SetPenalty(Client, 1);
|
||||
|
||||
_IRC_GET_SENDER_OR_RETURN_(prefix, Req, Client)
|
||||
_IRC_GET_TARGET_SERVER_OR_RETURN_(target, Req, 0, prefix)
|
||||
|
||||
@@ -1123,10 +1111,19 @@ IRC_VERSION( CLIENT *Client, REQUEST *Req )
|
||||
}
|
||||
|
||||
/* send version information */
|
||||
return IRC_WriteStrClient(Client, RPL_VERSION_MSG, Client_ID(prefix),
|
||||
PACKAGE_NAME, PACKAGE_VERSION,
|
||||
NGIRCd_DebugLevel, Conf_ServerName,
|
||||
NGIRCd_VersionAddition);
|
||||
if (!IRC_WriteStrClient(Client, RPL_VERSION_MSG, Client_ID(prefix),
|
||||
PACKAGE_NAME, PACKAGE_VERSION,
|
||||
NGIRCd_DebugLevel, Conf_ServerName,
|
||||
NGIRCd_VersionAddition))
|
||||
return DISCONNECTED;
|
||||
|
||||
#ifndef STRICT_RFC
|
||||
/* send RPL_ISUPPORT(005) numerics */
|
||||
if (!IRC_Send_ISUPPORT(prefix))
|
||||
return DISCONNECTED;
|
||||
#endif
|
||||
|
||||
return CONNECTED;
|
||||
} /* IRC_VERSION */
|
||||
|
||||
/**
|
||||
@@ -1145,15 +1142,12 @@ IRC_WHO(CLIENT *Client, REQUEST *Req)
|
||||
assert (Client != NULL);
|
||||
assert (Req != NULL);
|
||||
|
||||
IRC_SetPenalty(Client, 1);
|
||||
|
||||
only_ops = false;
|
||||
if (Req->argc == 2) {
|
||||
if (strcmp(Req->argv[1], "o") == 0)
|
||||
only_ops = true;
|
||||
#ifdef STRICT_RFC
|
||||
else {
|
||||
IRC_SetPenalty(Client, 2);
|
||||
return IRC_WriteErrClient(Client,
|
||||
ERR_NEEDMOREPARAMS_MSG,
|
||||
Client_ID(Client),
|
||||
@@ -1177,7 +1171,6 @@ IRC_WHO(CLIENT *Client, REQUEST *Req)
|
||||
}
|
||||
|
||||
/* No channel or (valid) mask given */
|
||||
IRC_SetPenalty(Client, 2);
|
||||
return IRC_WHO_Mask(Client, NULL, only_ops);
|
||||
} /* IRC_WHO */
|
||||
|
||||
@@ -1200,8 +1193,6 @@ IRC_WHOIS( CLIENT *Client, REQUEST *Req )
|
||||
assert( Client != NULL );
|
||||
assert( Req != NULL );
|
||||
|
||||
IRC_SetPenalty(Client, 1);
|
||||
|
||||
/* Wrong number of parameters? */
|
||||
if (Req->argc < 1)
|
||||
return IRC_WriteErrClient(Client, ERR_NONICKNAMEGIVEN_MSG,
|
||||
@@ -1263,6 +1254,7 @@ IRC_WHOIS( CLIENT *Client, REQUEST *Req )
|
||||
continue;
|
||||
}
|
||||
got_wildcard = true;
|
||||
/* Increase penalty for wildcard queries */
|
||||
IRC_SetPenalty(Client, 3);
|
||||
|
||||
for (c = Client_First(); c; c = Client_Next(c)) {
|
||||
@@ -1568,8 +1560,13 @@ IRC_Send_NAMES(CLIENT * Client, CHANNEL * Chan)
|
||||
GLOBAL bool
|
||||
IRC_Send_ISUPPORT(CLIENT * Client)
|
||||
{
|
||||
if (Conf_Network[0] && !IRC_WriteStrClient(Client, RPL_ISUPPORTNET_MSG,
|
||||
Client_ID(Client),
|
||||
Conf_Network))
|
||||
return DISCONNECTED;
|
||||
if (!IRC_WriteStrClient(Client, RPL_ISUPPORT1_MSG, Client_ID(Client),
|
||||
CHANTYPES, CHANTYPES, Conf_MaxJoins))
|
||||
Conf_AllowedChannelTypes, Conf_AllowedChannelTypes,
|
||||
Conf_MaxJoins))
|
||||
return DISCONNECTED;
|
||||
return IRC_WriteStrClient(Client, RPL_ISUPPORT2_MSG, Client_ID(Client),
|
||||
CHANNEL_NAME_LEN - 1, Conf_MaxNickLength - 1,
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* ngIRCd -- The Next Generation IRC Daemon
|
||||
* Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors.
|
||||
* Copyright (c)2001-2018 Alexander Barton (alex@barton.de) and Contributors.
|
||||
*
|
||||
* 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
|
||||
@@ -16,15 +16,14 @@
|
||||
* Login and logout
|
||||
*/
|
||||
|
||||
#include "imp.h"
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "conn-func.h"
|
||||
#include "class.h"
|
||||
#include "conf.h"
|
||||
#include "channel.h"
|
||||
#include "log.h"
|
||||
@@ -32,11 +31,9 @@
|
||||
#include "messages.h"
|
||||
#include "parse.h"
|
||||
#include "irc.h"
|
||||
#include "irc-info.h"
|
||||
#include "irc-macros.h"
|
||||
#include "irc-write.h"
|
||||
|
||||
#include "exp.h"
|
||||
#include "irc-login.h"
|
||||
|
||||
static void Change_Nick PARAMS((CLIENT * Origin, CLIENT * Target, char *NewNick,
|
||||
@@ -80,7 +77,6 @@ IRC_PASS( CLIENT *Client, REQUEST *Req )
|
||||
} else if (Client_Type(Client) == CLIENT_UNKNOWN ||
|
||||
Client_Type(Client) == CLIENT_UNKNOWNSERVER) {
|
||||
/* Unregistered connection, but wrong number of arguments: */
|
||||
IRC_SetPenalty(Client, 2);
|
||||
return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG,
|
||||
Client_ID(Client), Req->command);
|
||||
} else {
|
||||
@@ -93,7 +89,7 @@ IRC_PASS( CLIENT *Client, REQUEST *Req )
|
||||
|
||||
/* Protocol version */
|
||||
if (Req->argc >= 2 && strlen(Req->argv[1]) >= 4) {
|
||||
int c2, c4;
|
||||
char c2, c4;
|
||||
|
||||
c2 = Req->argv[1][2];
|
||||
c4 = Req->argv[1][4];
|
||||
@@ -176,6 +172,7 @@ GLOBAL bool
|
||||
IRC_NICK( CLIENT *Client, REQUEST *Req )
|
||||
{
|
||||
CLIENT *intr_c, *target, *c;
|
||||
CHANNEL *chan;
|
||||
char *nick, *user, *hostname, *modes, *info;
|
||||
int token, hops;
|
||||
|
||||
@@ -199,6 +196,7 @@ IRC_NICK( CLIENT *Client, REQUEST *Req )
|
||||
|
||||
/* Search "target" client */
|
||||
if (Client_Type(Client) == CLIENT_SERVER) {
|
||||
_IRC_REQUIRE_PREFIX_OR_RETURN_(Client, Req)
|
||||
target = Client_Search(Req->prefix);
|
||||
if (!target)
|
||||
return IRC_WriteErrClient(Client,
|
||||
@@ -247,7 +245,7 @@ IRC_NICK( CLIENT *Client, REQUEST *Req )
|
||||
#else
|
||||
Conn_SetAuthPing(Client_Conn(Client), rand());
|
||||
#endif
|
||||
IRC_WriteStrClient(Client, "PING :%ld",
|
||||
Conn_WriteStr(Client_Conn(Client), "PING :%ld",
|
||||
Conn_GetAuthPing(Client_Conn(Client)));
|
||||
LogDebug("Connection %d: sent AUTH PING %ld ...",
|
||||
Client_Conn(Client),
|
||||
@@ -263,6 +261,22 @@ IRC_NICK( CLIENT *Client, REQUEST *Req )
|
||||
Client_SetType( Client, CLIENT_GOTNICK );
|
||||
} else {
|
||||
/* Nickname change */
|
||||
|
||||
/* Check that the user isn't on any channels set +N */
|
||||
if(Client_Type(Client) == CLIENT_USER &&
|
||||
!Client_HasMode(Client, 'o')) {
|
||||
chan = Channel_First();
|
||||
while (chan) {
|
||||
if(Channel_HasMode(chan, 'N') &&
|
||||
Channel_IsMemberOf(chan, Client))
|
||||
return IRC_WriteErrClient(Client,
|
||||
ERR_NONICKCHANGE_MSG,
|
||||
Client_ID(Client),
|
||||
Channel_Name(chan));
|
||||
chan = Channel_Next(chan);
|
||||
}
|
||||
}
|
||||
|
||||
Change_Nick(Client, target, Req->argv[0],
|
||||
Client_Type(Client) == CLIENT_USER ? true : false);
|
||||
IRC_SetPenalty(target, 2);
|
||||
@@ -274,11 +288,9 @@ IRC_NICK( CLIENT *Client, REQUEST *Req )
|
||||
/* Server or service introduces new client */
|
||||
|
||||
/* Bad number of parameters? */
|
||||
if (Req->argc != 2 && Req->argc != 7) {
|
||||
IRC_SetPenalty(Client, 2);
|
||||
if (Req->argc != 2 && Req->argc != 7)
|
||||
return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG,
|
||||
Client_ID(Client), Req->command);
|
||||
}
|
||||
|
||||
if (Req->argc >= 7) {
|
||||
/* RFC 2813 compatible syntax */
|
||||
@@ -368,6 +380,8 @@ IRC_SVSNICK(CLIENT *Client, REQUEST *Req)
|
||||
assert(Client != NULL);
|
||||
assert(Req != NULL);
|
||||
|
||||
_IRC_REQUIRE_PREFIX_OR_RETURN_(Client, Req)
|
||||
|
||||
/* Search the originator */
|
||||
from = Client_Search(Req->prefix);
|
||||
if (!from)
|
||||
@@ -375,10 +389,9 @@ IRC_SVSNICK(CLIENT *Client, REQUEST *Req)
|
||||
|
||||
/* Search the target */
|
||||
target = Client_Search(Req->argv[0]);
|
||||
if (!target || Client_Type(target) != CLIENT_USER) {
|
||||
if (!target || Client_Type(target) != CLIENT_USER)
|
||||
return IRC_WriteErrClient(Client, ERR_NOSUCHNICK_MSG,
|
||||
Client_ID(Client), Req->argv[0]);
|
||||
}
|
||||
|
||||
if (Client_Conn(target) <= NONE) {
|
||||
/* We have to forward the message to the server handling
|
||||
@@ -471,6 +484,7 @@ IRC_USER(CLIENT * Client, REQUEST * Req)
|
||||
Client_Type(Client) == CLIENT_SERVICE) {
|
||||
/* Server/service updating an user */
|
||||
_IRC_ARGC_EQ_OR_RETURN_(Client, Req, 4)
|
||||
_IRC_REQUIRE_PREFIX_OR_RETURN_(Client, Req)
|
||||
|
||||
c = Client_Search(Req->prefix);
|
||||
if (!c)
|
||||
@@ -613,7 +627,10 @@ IRC_WEBIRC(CLIENT *Client, REQUEST *Req)
|
||||
|
||||
Client_SetUser(Client, Req->argv[1], true);
|
||||
Client_SetOrigUser(Client, Req->argv[1]);
|
||||
Client_SetHostname(Client, Req->argv[2]);
|
||||
if (Conf_DNS)
|
||||
Client_SetHostname(Client, Req->argv[2]);
|
||||
else
|
||||
Client_SetHostname(Client, Req->argv[3]);
|
||||
Client_SetIPAText(Client, Req->argv[3]);
|
||||
|
||||
return CONNECTED;
|
||||
@@ -640,6 +657,8 @@ IRC_QUIT( CLIENT *Client, REQUEST *Req )
|
||||
|
||||
if (Client_Type(Client) == CLIENT_SERVER) {
|
||||
/* Server */
|
||||
_IRC_REQUIRE_PREFIX_OR_RETURN_(Client, Req)
|
||||
|
||||
target = Client_Search(Req->prefix);
|
||||
if (!target) {
|
||||
Log(LOG_WARNING,
|
||||
@@ -728,9 +747,10 @@ IRC_PING(CLIENT *Client, REQUEST *Req)
|
||||
|
||||
if (target != Client_ThisServer()) {
|
||||
/* Ok, we have to forward the PING */
|
||||
if (Client_Type(Client) == CLIENT_SERVER)
|
||||
if (Client_Type(Client) == CLIENT_SERVER) {
|
||||
_IRC_REQUIRE_PREFIX_OR_RETURN_(Client, Req)
|
||||
from = Client_Search(Req->prefix);
|
||||
else
|
||||
} else
|
||||
from = Client;
|
||||
if (!from)
|
||||
return IRC_WriteErrClient(Client,
|
||||
@@ -802,6 +822,8 @@ IRC_PONG(CLIENT *Client, REQUEST *Req)
|
||||
|
||||
/* Forward? */
|
||||
if (Req->argc == 2 && Client_Type(Client) == CLIENT_SERVER) {
|
||||
_IRC_REQUIRE_PREFIX_OR_RETURN_(Client, Req)
|
||||
|
||||
target = Client_Search(Req->argv[0]);
|
||||
if (!target)
|
||||
return IRC_WriteErrClient(Client, ERR_NOSUCHSERVER_MSG,
|
||||
@@ -836,14 +858,14 @@ IRC_PONG(CLIENT *Client, REQUEST *Req)
|
||||
if (auth_ping) {
|
||||
LogDebug("AUTH PONG: waiting for token \"%ld\", got \"%s\" ...",
|
||||
auth_ping, Req->argv[0]);
|
||||
if (auth_ping == atoi(Req->argv[0])) {
|
||||
if (auth_ping == atol(Req->argv[0])) {
|
||||
Conn_SetAuthPing(conn, 0);
|
||||
if (Client_Type(Client) == CLIENT_WAITAUTHPING)
|
||||
Login_User(Client);
|
||||
} else
|
||||
if (!IRC_WriteStrClient(Client,
|
||||
"To connect, type /QUOTE PONG %ld",
|
||||
auth_ping))
|
||||
"NOTICE %s :To connect, type /QUOTE PONG %ld",
|
||||
Client_ID(Client), auth_ping))
|
||||
return DISCONNECTED;
|
||||
}
|
||||
#endif
|
||||
@@ -851,13 +873,14 @@ IRC_PONG(CLIENT *Client, REQUEST *Req)
|
||||
if (Client_Type(Client) == CLIENT_SERVER && Conn_LastPing(conn) == 0) {
|
||||
Log(LOG_INFO,
|
||||
"Synchronization with \"%s\" done (connection %d): %ld second%s [%ld users, %ld channels].",
|
||||
Client_ID(Client), conn, time(NULL) - Conn_GetSignon(conn),
|
||||
Client_ID(Client), conn,
|
||||
(long)(time(NULL) - Conn_GetSignon(conn)),
|
||||
time(NULL) - Conn_GetSignon(conn) == 1 ? "" : "s",
|
||||
Client_UserCount(), Channel_CountVisible(NULL));
|
||||
Conn_UpdatePing(conn);
|
||||
} else
|
||||
LogDebug("Connection %d: received PONG. Lag: %ld seconds.",
|
||||
conn, time(NULL) - Conn_LastPing(conn));
|
||||
conn, (long)(time(NULL) - Conn_LastPing(conn)));
|
||||
|
||||
return CONNECTED;
|
||||
} /* IRC_PONG */
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* ngIRCd -- The Next Generation IRC Daemon
|
||||
* Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors.
|
||||
* Copyright (c)2001-2015 Alexander Barton (alex@barton.de) and Contributors.
|
||||
*
|
||||
* 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
|
||||
@@ -25,8 +25,7 @@
|
||||
*/
|
||||
#define _IRC_ARGC_EQ_OR_RETURN_(Client, Req, Count) \
|
||||
if (Req->argc != Count) { \
|
||||
IRC_SetPenalty(Client, 2); \
|
||||
return IRC_WriteStrClient(Client, ERR_NEEDMOREPARAMS_MSG, \
|
||||
return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG, \
|
||||
Client_ID(Client), Req->command); \
|
||||
}
|
||||
|
||||
@@ -38,8 +37,7 @@ if (Req->argc != Count) { \
|
||||
*/
|
||||
#define _IRC_ARGC_LE_OR_RETURN_(Client, Req, Max) \
|
||||
if (Req->argc > Max) { \
|
||||
IRC_SetPenalty(Client, 2); \
|
||||
return IRC_WriteStrClient(Client, ERR_NEEDMOREPARAMS_MSG, \
|
||||
return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG, \
|
||||
Client_ID(Client), Req->command); \
|
||||
}
|
||||
|
||||
@@ -51,8 +49,7 @@ if (Req->argc > Max) { \
|
||||
*/
|
||||
#define _IRC_ARGC_GE_OR_RETURN_(Client, Req, Min) \
|
||||
if (Req->argc < Min) { \
|
||||
IRC_SetPenalty(Client, 2); \
|
||||
return IRC_WriteStrClient(Client, ERR_NEEDMOREPARAMS_MSG, \
|
||||
return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG, \
|
||||
Client_ID(Client), Req->command); \
|
||||
}
|
||||
|
||||
@@ -64,8 +61,19 @@ if (Req->argc < Min) { \
|
||||
*/
|
||||
#define _IRC_ARGC_BETWEEN_OR_RETURN_(Client, Req, Min, Max) \
|
||||
if (Req->argc < Min || Req->argc > Max) { \
|
||||
IRC_SetPenalty(Client, 2); \
|
||||
return IRC_WriteStrClient(Client, ERR_NEEDMOREPARAMS_MSG, \
|
||||
return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG, \
|
||||
Client_ID(Client), Req->command); \
|
||||
}
|
||||
|
||||
/**
|
||||
* Make sure that the command has a prefix.
|
||||
*
|
||||
* If there is no prefix, send an error to the client and return from
|
||||
* the function.
|
||||
*/
|
||||
#define _IRC_REQUIRE_PREFIX_OR_RETURN_(Client, Req) \
|
||||
if (!Req->prefix) { \
|
||||
return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG, \
|
||||
Client_ID(Client), Req->command); \
|
||||
}
|
||||
|
||||
@@ -77,13 +85,17 @@ if (Req->argc < Min || Req->argc > Max) { \
|
||||
* send an error to the client and return from the function.
|
||||
*/
|
||||
#define _IRC_GET_SENDER_OR_RETURN_(Sender, Req, Client) \
|
||||
if (Client_Type(Client) == CLIENT_SERVER) \
|
||||
if (Client_Type(Client) == CLIENT_SERVER) { \
|
||||
if (!Req->prefix) \
|
||||
return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG, \
|
||||
Client_ID(Client), Req->command); \
|
||||
Sender = Client_Search(Req->prefix); \
|
||||
else \
|
||||
} else \
|
||||
Sender = Client; \
|
||||
if (!Sender) \
|
||||
return IRC_WriteStrClient(Client, ERR_NOSUCHNICK_MSG, \
|
||||
Client_ID(Client), Req->prefix);
|
||||
return IRC_WriteErrClient(Client, ERR_NOSUCHNICK_MSG, \
|
||||
Client_ID(Client), \
|
||||
Req->prefix ? Req->prefix : "(none)");
|
||||
|
||||
/**
|
||||
* Get target of an IRC command and make sure that it is a server.
|
||||
@@ -101,7 +113,7 @@ if (Req->argc < Min || Req->argc > Max) { \
|
||||
if (!Target) \
|
||||
Target = Client_SearchServer(Req->argv[Argc]); \
|
||||
if (!Target) \
|
||||
return IRC_WriteStrClient(From, ERR_NOSUCHSERVER_MSG, \
|
||||
return IRC_WriteErrClient(From, ERR_NOSUCHSERVER_MSG, \
|
||||
Client_ID(From), Req->argv[Argc]); \
|
||||
if (Client_Type(Target) != CLIENT_SERVER) \
|
||||
Target = Client_Introducer(Target); \
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* ngIRCd -- The Next Generation IRC Daemon
|
||||
* Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors.
|
||||
* Copyright (c)2001-2015 Alexander Barton (alex@barton.de) and Contributors.
|
||||
*
|
||||
* 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
|
||||
@@ -18,21 +18,18 @@
|
||||
* IRC metadata commands
|
||||
*/
|
||||
|
||||
#include "imp.h"
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "conn-func.h"
|
||||
#include "channel.h"
|
||||
#include "conn-encoding.h"
|
||||
#include "irc-macros.h"
|
||||
#include "irc-write.h"
|
||||
#include "log.h"
|
||||
#include "messages.h"
|
||||
#include "parse.h"
|
||||
#include "tool.h"
|
||||
|
||||
#include "exp.h"
|
||||
#include "irc-metadata.h"
|
||||
|
||||
/**
|
||||
@@ -51,6 +48,8 @@ IRC_METADATA(CLIENT *Client, REQUEST *Req)
|
||||
assert(Client != NULL);
|
||||
assert(Req != NULL);
|
||||
|
||||
_IRC_REQUIRE_PREFIX_OR_RETURN_(Client, Req)
|
||||
|
||||
prefix = Client_Search(Req->prefix);
|
||||
if (!prefix)
|
||||
return IRC_WriteErrClient(Client, ERR_NOSUCHNICK_MSG,
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* ngIRCd -- The Next Generation IRC Daemon
|
||||
* Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors.
|
||||
* Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors.
|
||||
*
|
||||
* 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
|
||||
@@ -16,13 +16,11 @@
|
||||
* IRC commands for mode changes (like MODE, AWAY, etc.)
|
||||
*/
|
||||
|
||||
#include "imp.h"
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "defines.h"
|
||||
#include "conn.h"
|
||||
#include "channel.h"
|
||||
#include "irc-macros.h"
|
||||
@@ -33,7 +31,6 @@
|
||||
#include "messages.h"
|
||||
#include "conf.h"
|
||||
|
||||
#include "exp.h"
|
||||
#include "irc-mode.h"
|
||||
|
||||
static bool Client_Mode PARAMS((CLIENT *Client, REQUEST *Req, CLIENT *Origin,
|
||||
@@ -71,6 +68,13 @@ IRC_MODE( CLIENT *Client, REQUEST *Req )
|
||||
|
||||
_IRC_GET_SENDER_OR_RETURN_(origin, Req, Client)
|
||||
|
||||
/* Test for "fake" MODE commands injected by this local instance,
|
||||
* for example when handling the "DefaultUserModes" settings.
|
||||
* This doesn't harm real commands, because prefixes of regular
|
||||
* clients are checked in Validate_Prefix() and can't be faked. */
|
||||
if (Req->prefix && Client_Search(Req->prefix) == Client_ThisServer())
|
||||
Client = Client_Search(Req->prefix);
|
||||
|
||||
/* Channel or user mode? */
|
||||
cl = NULL; chan = NULL;
|
||||
if (Client_IsValidNick(Req->argv[0]))
|
||||
@@ -202,6 +206,7 @@ Client_Mode( CLIENT *Client, REQUEST *Req, CLIENT *Origin, CLIENT *Target )
|
||||
case 'b': /* Block private msgs */
|
||||
case 'C': /* Only messages from clients sharing a channel */
|
||||
case 'i': /* Invisible */
|
||||
case 'I': /* Hide channel list from WHOIS */
|
||||
case 's': /* Server messages */
|
||||
case 'w': /* Wallops messages */
|
||||
x[0] = *mode_ptr;
|
||||
@@ -225,6 +230,7 @@ Client_Mode( CLIENT *Client, REQUEST *Req, CLIENT *Origin, CLIENT *Target )
|
||||
break;
|
||||
case 'c': /* Receive connect notices */
|
||||
case 'q': /* KICK-protected user */
|
||||
case 'F': /* disable flood protection */
|
||||
/* (only settable by IRC operators!) */
|
||||
if (!set || Client_Type(Client) == CLIENT_SERVER
|
||||
|| Client_HasMode(Origin, 'o'))
|
||||
@@ -357,7 +363,6 @@ Client_Mode( CLIENT *Client, REQUEST *Req, CLIENT *Origin, CLIENT *Target )
|
||||
Client_Modes(Target));
|
||||
}
|
||||
|
||||
IRC_SetPenalty(Client, 1);
|
||||
return ok;
|
||||
} /* Client_Mode */
|
||||
|
||||
@@ -374,37 +379,44 @@ Channel_Mode_Answer_Request(CLIENT *Origin, CHANNEL *Channel)
|
||||
char the_modes[COMMAND_LEN], the_args[COMMAND_LEN], argadd[CLIENT_PASS_LEN];
|
||||
const char *mode_ptr;
|
||||
|
||||
/* Member or not? -- That's the question! */
|
||||
if (!Channel_IsMemberOf(Channel, Origin))
|
||||
return IRC_WriteStrClient(Origin, RPL_CHANNELMODEIS_MSG,
|
||||
Client_ID(Origin), Channel_Name(Channel), Channel_Modes(Channel));
|
||||
if (!Channel_IsMemberOf(Channel, Origin)) {
|
||||
/* Not a member: "simple" mode reply */
|
||||
if (!IRC_WriteStrClient(Origin, RPL_CHANNELMODEIS_MSG,
|
||||
Client_ID(Origin), Channel_Name(Channel),
|
||||
Channel_Modes(Channel)))
|
||||
return DISCONNECTED;
|
||||
} else {
|
||||
/* The sender is a member: generate extended reply */
|
||||
strlcpy(the_modes, Channel_Modes(Channel), sizeof(the_modes));
|
||||
mode_ptr = the_modes;
|
||||
the_args[0] = '\0';
|
||||
|
||||
/* The sender is a member: generate extended reply */
|
||||
strlcpy(the_modes, Channel_Modes(Channel), sizeof(the_modes));
|
||||
mode_ptr = the_modes;
|
||||
the_args[0] = '\0';
|
||||
|
||||
while(*mode_ptr) {
|
||||
switch(*mode_ptr) {
|
||||
case 'l':
|
||||
snprintf(argadd, sizeof(argadd), " %lu", Channel_MaxUsers(Channel));
|
||||
strlcat(the_args, argadd, sizeof(the_args));
|
||||
break;
|
||||
case 'k':
|
||||
strlcat(the_args, " ", sizeof(the_args));
|
||||
strlcat(the_args, Channel_Key(Channel), sizeof(the_args));
|
||||
break;
|
||||
while(*mode_ptr) {
|
||||
switch(*mode_ptr) {
|
||||
case 'l':
|
||||
snprintf(argadd, sizeof(argadd), " %lu",
|
||||
Channel_MaxUsers(Channel));
|
||||
strlcat(the_args, argadd, sizeof(the_args));
|
||||
break;
|
||||
case 'k':
|
||||
strlcat(the_args, " ", sizeof(the_args));
|
||||
strlcat(the_args, Channel_Key(Channel),
|
||||
sizeof(the_args));
|
||||
break;
|
||||
}
|
||||
mode_ptr++;
|
||||
}
|
||||
mode_ptr++;
|
||||
}
|
||||
if (the_args[0])
|
||||
strlcat(the_modes, the_args, sizeof(the_modes));
|
||||
if (the_args[0])
|
||||
strlcat(the_modes, the_args, sizeof(the_modes));
|
||||
|
||||
if (!IRC_WriteStrClient(Origin, RPL_CHANNELMODEIS_MSG,
|
||||
Client_ID(Origin), Channel_Name(Channel),
|
||||
the_modes))
|
||||
return DISCONNECTED;
|
||||
}
|
||||
|
||||
if (!IRC_WriteStrClient(Origin, RPL_CHANNELMODEIS_MSG,
|
||||
Client_ID(Origin), Channel_Name(Channel),
|
||||
the_modes))
|
||||
return DISCONNECTED;
|
||||
#ifndef STRICT_RFC
|
||||
/* Channel creation time */
|
||||
if (!IRC_WriteStrClient(Origin, RPL_CREATIONTIME_MSG,
|
||||
Client_ID(Origin), Channel_Name(Channel),
|
||||
Channel_CreationTime(Channel)))
|
||||
@@ -568,6 +580,7 @@ Channel_Mode(CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel)
|
||||
case 'M': /* Only identified nicks can write */
|
||||
case 'm': /* Moderated */
|
||||
case 'n': /* Only members can write */
|
||||
case 'N': /* Can't change nick while on this channel */
|
||||
case 'Q': /* No kicks */
|
||||
case 't': /* Topic locked */
|
||||
if(is_oper || is_machine || is_owner ||
|
||||
@@ -583,9 +596,13 @@ Channel_Mode(CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel)
|
||||
goto chan_exit;
|
||||
if (!set) {
|
||||
if (is_oper || is_machine || is_owner ||
|
||||
is_admin || is_op || is_halfop)
|
||||
is_admin || is_op || is_halfop) {
|
||||
x[0] = *mode_ptr;
|
||||
else
|
||||
if (Channel_HasMode(Channel, 'k'))
|
||||
strlcpy(argadd, "*", sizeof(argadd));
|
||||
if (arg_arg > mode_arg)
|
||||
arg_arg++;
|
||||
} else
|
||||
connected = IRC_WriteErrClient(Origin,
|
||||
ERR_CHANOPRIVSNEEDED_MSG,
|
||||
Client_ID(Origin),
|
||||
@@ -613,7 +630,6 @@ Channel_Mode(CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel)
|
||||
#ifdef STRICT_RFC
|
||||
/* Only send error message in "strict" mode,
|
||||
* this is how ircd2.11 and others behave ... */
|
||||
IRC_SetPenalty(Origin, 2);
|
||||
connected = IRC_WriteErrClient(Origin,
|
||||
ERR_NEEDMOREPARAMS_MSG,
|
||||
Client_ID(Origin), Req->command);
|
||||
@@ -658,7 +674,6 @@ Channel_Mode(CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel)
|
||||
#ifdef STRICT_RFC
|
||||
/* Only send error message in "strict" mode,
|
||||
* this is how ircd2.11 and others behave ... */
|
||||
IRC_SetPenalty(Origin, 2);
|
||||
connected = IRC_WriteErrClient(Origin,
|
||||
ERR_NEEDMOREPARAMS_MSG,
|
||||
Client_ID(Origin), Req->command);
|
||||
@@ -760,7 +775,6 @@ Channel_Mode(CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel)
|
||||
* mode, because most other servers don't do
|
||||
* it as well and some clients send "wired"
|
||||
* MODE commands like "MODE #chan -ooo nick". */
|
||||
IRC_SetPenalty(Origin, 2);
|
||||
connected = IRC_WriteErrClient(Origin,
|
||||
ERR_NEEDMOREPARAMS_MSG,
|
||||
Client_ID(Origin), Req->command);
|
||||
@@ -921,7 +935,6 @@ Channel_Mode(CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel)
|
||||
}
|
||||
}
|
||||
|
||||
IRC_SetPenalty(Client, 1);
|
||||
return connected;
|
||||
} /* Channel_Mode */
|
||||
|
||||
@@ -1005,15 +1018,15 @@ Add_To_List(char what, CLIENT *Prefix, CLIENT *Client, CHANNEL *Channel,
|
||||
|
||||
switch (what) {
|
||||
case 'I':
|
||||
if (!Channel_AddInvite(Channel, mask, false))
|
||||
if (!Channel_AddInvite(Channel, mask, false, Client_ID(Client)))
|
||||
return CONNECTED;
|
||||
break;
|
||||
case 'b':
|
||||
if (!Channel_AddBan(Channel, mask))
|
||||
if (!Channel_AddBan(Channel, mask, Client_ID(Client)))
|
||||
return CONNECTED;
|
||||
break;
|
||||
case 'e':
|
||||
if (!Channel_AddExcept(Channel, mask))
|
||||
if (!Channel_AddExcept(Channel, mask, Client_ID(Client)))
|
||||
return CONNECTED;
|
||||
break;
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* ngIRCd -- The Next Generation IRC Daemon
|
||||
* Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors.
|
||||
* Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors.
|
||||
*
|
||||
* 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
|
||||
@@ -16,12 +16,9 @@
|
||||
* Channel operator commands
|
||||
*/
|
||||
|
||||
#include "imp.h"
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "defines.h"
|
||||
#include "conn.h"
|
||||
#include "channel.h"
|
||||
#include "irc-macros.h"
|
||||
@@ -31,7 +28,6 @@
|
||||
#include "messages.h"
|
||||
#include "parse.h"
|
||||
|
||||
#include "exp.h"
|
||||
#include "irc-op.h"
|
||||
|
||||
/* Local functions */
|
||||
@@ -122,7 +118,6 @@ IRC_KICK(CLIENT *Client, REQUEST *Req)
|
||||
nickCount--;
|
||||
}
|
||||
} else {
|
||||
IRC_SetPenalty(Client, 2);
|
||||
return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG,
|
||||
Client_ID(Client), Req->command);
|
||||
}
|
||||
@@ -155,6 +150,14 @@ IRC_INVITE(CLIENT *Client, REQUEST *Req)
|
||||
return IRC_WriteErrClient(from, ERR_NOSUCHNICK_MSG,
|
||||
Client_ID(Client), Req->argv[0]);
|
||||
|
||||
if (Req->argv[1][0] == '&') {
|
||||
/* Local channel. Make sure the target user is on this server! */
|
||||
if (Client_Conn(target) == NONE)
|
||||
return IRC_WriteErrClient(from, ERR_USERNOTONSERV_MSG,
|
||||
Client_ID(Client),
|
||||
Req->argv[0]);
|
||||
}
|
||||
|
||||
chan = Channel_Search(Req->argv[1]);
|
||||
if (chan) {
|
||||
/* Channel exists. Is the user a valid member of the channel? */
|
||||
@@ -171,7 +174,8 @@ IRC_INVITE(CLIENT *Client, REQUEST *Req)
|
||||
|
||||
/* Is the channel "invite-only"? */
|
||||
if (Channel_HasMode(chan, 'i')) {
|
||||
/* Yes. The user must be channel owner/admin/operator/halfop! */
|
||||
/* Yes. The user issuing the INVITE command must be
|
||||
* channel owner/admin/operator/halfop! */
|
||||
if (!Channel_UserHasMode(chan, from, 'q') &&
|
||||
!Channel_UserHasMode(chan, from, 'a') &&
|
||||
!Channel_UserHasMode(chan, from, 'o') &&
|
||||
@@ -195,7 +199,8 @@ IRC_INVITE(CLIENT *Client, REQUEST *Req)
|
||||
|
||||
if (remember) {
|
||||
/* We must remember this invite */
|
||||
if (!Channel_AddInvite(chan, Client_Mask(target), true))
|
||||
if (!Channel_AddInvite(chan, Client_MaskCloaked(target),
|
||||
true, Client_ID(from)))
|
||||
return CONNECTED;
|
||||
}
|
||||
}
|
||||
@@ -204,21 +209,22 @@ IRC_INVITE(CLIENT *Client, REQUEST *Req)
|
||||
Req->argv[0], Req->argv[1]);
|
||||
|
||||
/*
|
||||
* RFC 2812 says:
|
||||
* 'There is no requirement that the channel [..] must exist or be a valid channel'
|
||||
* The problem with this is that this allows the "channel" to contain spaces,
|
||||
* in which case we must prefix its name with a colon to make it clear that
|
||||
* it is only a single argument.
|
||||
* RFC 2812 states:
|
||||
* 'There is no requirement that the channel [..] must exist or be a
|
||||
* valid channel'. The problem with this is that this allows the
|
||||
* "channel" to contain spaces, in which case we must prefix its name
|
||||
* with a colon to make it clear that it is only a single argument.
|
||||
*/
|
||||
colon_if_necessary = strchr(Req->argv[1], ' ') ? ":":"";
|
||||
/* Inform target client */
|
||||
IRC_WriteStrClientPrefix(target, from, "INVITE %s %s%s", Req->argv[0],
|
||||
colon_if_necessary, Req->argv[1]);
|
||||
colon_if_necessary, Req->argv[1]);
|
||||
|
||||
if (Client_Conn(target) > NONE) {
|
||||
/* 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], colon_if_necessary, Req->argv[1]))
|
||||
Client_ID(from), Req->argv[0],
|
||||
colon_if_necessary, Req->argv[1]))
|
||||
return DISCONNECTED;
|
||||
|
||||
if (Client_HasMode(target, 'a') &&
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* ngIRCd -- The Next Generation IRC Daemon
|
||||
* Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors.
|
||||
* Copyright (c)2001-2015 Alexander Barton (alex@barton.de) and Contributors.
|
||||
*
|
||||
* 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
|
||||
@@ -16,12 +16,12 @@
|
||||
* IRC operator commands
|
||||
*/
|
||||
|
||||
#include "imp.h"
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "ngircd.h"
|
||||
#include "conn-func.h"
|
||||
@@ -38,7 +38,6 @@
|
||||
#include "messages.h"
|
||||
#include "op.h"
|
||||
|
||||
#include <exp.h>
|
||||
#include "irc-oper.h"
|
||||
|
||||
/**
|
||||
@@ -48,9 +47,11 @@
|
||||
static bool
|
||||
Bad_OperPass(CLIENT *Client, char *errtoken, char *errmsg)
|
||||
{
|
||||
Log(LOG_WARNING, "Got invalid OPER from \"%s\": \"%s\" -- %s",
|
||||
Log(LOG_ERR|LOG_snotice, "Got invalid OPER from \"%s\": \"%s\" -- %s!",
|
||||
Client_Mask(Client), errtoken, errmsg);
|
||||
return IRC_WriteErrClient(Client, ERR_PASSWDMISMATCH_MSG,
|
||||
/* Increase penalty to slow down possible brute force attacks */
|
||||
IRC_SetPenalty(Client, 10);
|
||||
return IRC_WriteStrClient(Client, ERR_PASSWDMISMATCH_MSG,
|
||||
Client_ID(Client));
|
||||
} /* Bad_OperPass */
|
||||
|
||||
@@ -208,18 +209,14 @@ IRC_CONNECT(CLIENT * Client, REQUEST * Req)
|
||||
|
||||
/* Bad number of parameters? */
|
||||
if (Req->argc != 1 && Req->argc != 2 && Req->argc != 3 &&
|
||||
Req->argc != 5 && Req->argc != 6) {
|
||||
IRC_SetPenalty(Client, 2);
|
||||
Req->argc != 5 && Req->argc != 6)
|
||||
return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG,
|
||||
Client_ID(Client), Req->command);
|
||||
}
|
||||
|
||||
/* Invalid port number? */
|
||||
if ((Req->argc > 1) && atoi(Req->argv[1]) < 1) {
|
||||
IRC_SetPenalty(Client, 2);
|
||||
if ((Req->argc > 1) && atoi(Req->argv[1]) < 1)
|
||||
return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG,
|
||||
Client_ID(Client), Req->command);
|
||||
}
|
||||
|
||||
if (Client_Type(Client) != CLIENT_SERVER
|
||||
&& !Client_HasMode(Client, 'o'))
|
||||
@@ -362,6 +359,7 @@ IRC_WALLOPS( CLIENT *Client, REQUEST *Req )
|
||||
from = Client;
|
||||
break;
|
||||
case CLIENT_SERVER:
|
||||
_IRC_REQUIRE_PREFIX_OR_RETURN_(Client, Req)
|
||||
from = Client_Search(Req->prefix);
|
||||
break;
|
||||
default:
|
||||
@@ -389,19 +387,27 @@ IRC_xLINE(CLIENT *Client, REQUEST *Req)
|
||||
CLIENT *from, *c, *c_next;
|
||||
char reason[COMMAND_LEN], class_c;
|
||||
struct list_head *list;
|
||||
time_t timeout;
|
||||
int class;
|
||||
|
||||
assert(Client != NULL);
|
||||
assert(Req != NULL);
|
||||
|
||||
/* Bad number of parameters? */
|
||||
if (Req->argc != 1 && Req->argc != 3) {
|
||||
IRC_SetPenalty(Client, 2);
|
||||
if (Req->argc != 1 && Req->argc != 3)
|
||||
return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG,
|
||||
Client_ID(Client), Req->command);
|
||||
}
|
||||
|
||||
from = Op_Check(Client, Req);
|
||||
if (!Conf_AllowRemoteOper && Client_Type(Client) == CLIENT_SERVER) {
|
||||
/* Explicitely forbid remote servers to modify "x-lines" when
|
||||
* the "AllowRemoteOper" configuration option isn't set, even
|
||||
* when the command seems to originate from the remote server
|
||||
* itself: this prevents GLINE's to become set during server
|
||||
* handshake in this case (what wouldn't be possible during
|
||||
* regular runtime when a remote IRC Op sends the command). */
|
||||
from = NULL;
|
||||
} else
|
||||
from = Op_Check(Client, Req);
|
||||
if (!from)
|
||||
return Op_NoPrivileges(Client, Req);
|
||||
|
||||
@@ -435,13 +441,17 @@ IRC_xLINE(CLIENT *Client, REQUEST *Req)
|
||||
}
|
||||
} else {
|
||||
/* Add new mask to list */
|
||||
timeout = atol(Req->argv[1]);
|
||||
if (timeout > 0)
|
||||
timeout += time(NULL);
|
||||
if (Class_AddMask(class, Req->argv[0],
|
||||
time(NULL) + atol(Req->argv[1]),
|
||||
timeout,
|
||||
Req->argv[2])) {
|
||||
Log(LOG_NOTICE|LOG_snotice,
|
||||
"\"%s\" added \"%s\" to %c-Line list: \"%s\" (%ld seconds).",
|
||||
Client_Mask(from), Req->argv[0], class_c,
|
||||
Req->argv[2], atol(Req->argv[1]));
|
||||
if (Client_Type(from) != CLIENT_SERVER)
|
||||
Log(LOG_NOTICE|LOG_snotice,
|
||||
"\"%s\" added \"%s\" to %c-Line list: \"%s\" (%ld seconds).",
|
||||
Client_Mask(from), Req->argv[0], class_c,
|
||||
Req->argv[2], atol(Req->argv[1]));
|
||||
if (class == CLASS_GLINE) {
|
||||
/* Inform other servers */
|
||||
IRC_WriteStrServersPrefix(Client, from,
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* ngIRCd -- The Next Generation IRC Daemon
|
||||
* Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors.
|
||||
* Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors.
|
||||
*
|
||||
* 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
|
||||
@@ -16,31 +16,26 @@
|
||||
* IRC commands for server links
|
||||
*/
|
||||
|
||||
#include "imp.h"
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
|
||||
#include "defines.h"
|
||||
#include "conn.h"
|
||||
#include "conn-func.h"
|
||||
#include "conn-zip.h"
|
||||
#include "conf.h"
|
||||
#include "channel.h"
|
||||
#include "lists.h"
|
||||
#include "log.h"
|
||||
#include "messages.h"
|
||||
#include "parse.h"
|
||||
#include "numeric.h"
|
||||
#include "ngircd.h"
|
||||
#include "irc.h"
|
||||
#include "irc-info.h"
|
||||
#include "irc-macros.h"
|
||||
#include "irc-write.h"
|
||||
#include "op.h"
|
||||
|
||||
#include "exp.h"
|
||||
#include "irc-server.h"
|
||||
|
||||
/**
|
||||
@@ -72,12 +67,10 @@ IRC_SERVER( CLIENT *Client, REQUEST *Req )
|
||||
LogDebug("Connection %d: got SERVER command (new server link) ...",
|
||||
Client_Conn(Client));
|
||||
|
||||
if (Req->argc != 2 && Req->argc != 3) {
|
||||
IRC_SetPenalty(Client, 2);
|
||||
if (Req->argc != 2 && Req->argc != 3)
|
||||
return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG,
|
||||
Client_ID(Client),
|
||||
Req->command);
|
||||
}
|
||||
|
||||
/* Get configuration index of new remote server ... */
|
||||
for (i = 0; i < MAX_SERVERS; i++)
|
||||
@@ -185,11 +178,9 @@ IRC_SERVER( CLIENT *Client, REQUEST *Req )
|
||||
{
|
||||
/* New server is being introduced to the network */
|
||||
|
||||
if (Req->argc != 4) {
|
||||
IRC_SetPenalty(Client, 2);
|
||||
if (Req->argc != 4)
|
||||
return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG,
|
||||
Client_ID(Client), Req->command);
|
||||
}
|
||||
|
||||
/* check for existing server with same ID */
|
||||
if (!Client_CheckID(Client, Req->argv[0]))
|
||||
@@ -235,11 +226,9 @@ IRC_SERVER( CLIENT *Client, REQUEST *Req )
|
||||
Client_MyToken(c), Client_Info(c));
|
||||
|
||||
return CONNECTED;
|
||||
} else {
|
||||
IRC_SetPenalty(Client, 2);
|
||||
} else
|
||||
return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG,
|
||||
Client_ID(Client), Req->command);
|
||||
}
|
||||
} /* IRC_SERVER */
|
||||
|
||||
/*
|
||||
@@ -257,66 +246,96 @@ IRC_NJOIN( CLIENT *Client, REQUEST *Req )
|
||||
CHANNEL *chan;
|
||||
CLIENT *c;
|
||||
|
||||
assert( Client != NULL );
|
||||
assert( Req != NULL );
|
||||
assert(Client != NULL);
|
||||
assert(Req != NULL);
|
||||
|
||||
strlcpy( nick_in, Req->argv[1], sizeof( nick_in ));
|
||||
strcpy( nick_out, "" );
|
||||
strlcpy(nick_in, Req->argv[1], sizeof(nick_in));
|
||||
strcpy(nick_out, "");
|
||||
|
||||
channame = Req->argv[0];
|
||||
ptr = strtok( nick_in, "," );
|
||||
while( ptr )
|
||||
{
|
||||
|
||||
ptr = strtok(nick_in, ",");
|
||||
while (ptr) {
|
||||
is_owner = is_chanadmin = is_op = is_halfop = is_voiced = false;
|
||||
|
||||
/* cut off prefixes */
|
||||
while(( *ptr == '~') || ( *ptr == '&' ) || ( *ptr == '@' ) ||
|
||||
( *ptr == '%') || ( *ptr == '+' ))
|
||||
{
|
||||
if( *ptr == '~' ) is_owner = true;
|
||||
if( *ptr == '&' ) is_chanadmin = true;
|
||||
if( *ptr == '@' ) is_op = true;
|
||||
if( *ptr == 'h' ) is_halfop = true;
|
||||
if( *ptr == '+' ) is_voiced = true;
|
||||
while ((*ptr == '~') || (*ptr == '&') || (*ptr == '@') ||
|
||||
(*ptr == '%') || (*ptr == '+')) {
|
||||
if (*ptr == '~')
|
||||
is_owner = true;
|
||||
if (*ptr == '&')
|
||||
is_chanadmin = true;
|
||||
if (*ptr == '@')
|
||||
is_op = true;
|
||||
if (*ptr == '%')
|
||||
is_halfop = true;
|
||||
if (*ptr == '+')
|
||||
is_voiced = true;
|
||||
ptr++;
|
||||
}
|
||||
|
||||
c = Client_Search( ptr );
|
||||
if( c )
|
||||
{
|
||||
Channel_Join( c, channame );
|
||||
chan = Channel_Search( channame );
|
||||
assert( chan != NULL );
|
||||
|
||||
if( is_owner ) Channel_UserModeAdd( chan, c, 'q' );
|
||||
if( is_chanadmin ) Channel_UserModeAdd( chan, c, 'a' );
|
||||
if( is_op ) Channel_UserModeAdd( chan, c, 'o' );
|
||||
if( is_halfop ) Channel_UserModeAdd( chan, c, 'h' );
|
||||
if( is_voiced ) Channel_UserModeAdd( chan, c, 'v' );
|
||||
|
||||
/* announce to channel... */
|
||||
IRC_WriteStrChannelPrefix( Client, chan, c, false, "JOIN :%s", channame );
|
||||
|
||||
/* set Channel-User-Modes */
|
||||
strlcpy( modes, Channel_UserModes( chan, c ), sizeof( modes ));
|
||||
if( modes[0] )
|
||||
{
|
||||
/* send modes to channel */
|
||||
IRC_WriteStrChannelPrefix( Client, chan, Client, false, "MODE %s +%s %s", channame, modes, Client_ID( c ));
|
||||
}
|
||||
|
||||
if( nick_out[0] != '\0' ) strlcat( nick_out, ",", sizeof( nick_out ));
|
||||
if( is_owner ) strlcat( nick_out, "~", sizeof( nick_out ));
|
||||
if( is_chanadmin ) strlcat( nick_out, "&", sizeof( nick_out ));
|
||||
if( is_op ) strlcat( nick_out, "@", sizeof( nick_out ));
|
||||
if( is_halfop ) strlcat( nick_out, "%", sizeof( nick_out ));
|
||||
if( is_voiced ) strlcat( nick_out, "+", sizeof( nick_out ));
|
||||
strlcat( nick_out, ptr, sizeof( nick_out ));
|
||||
c = Client_Search(ptr);
|
||||
if (!c) {
|
||||
/* Client not found? */
|
||||
Log(LOG_ERR,
|
||||
"Got NJOIN for unknown nick \"%s\" for channel \"%s\"!",
|
||||
ptr, channame);
|
||||
goto skip_njoin;
|
||||
}
|
||||
else Log( LOG_ERR, "Got NJOIN for unknown nick \"%s\" for channel \"%s\"!", ptr, channame );
|
||||
|
||||
/* search for next Nick */
|
||||
ptr = strtok( NULL, "," );
|
||||
if (!Channel_Join(c, channame)) {
|
||||
/* Failed to join channel. Ooops!? */
|
||||
Log(LOG_ALERT,
|
||||
"Failed to join client \"%s\" to channel \"%s\" (NJOIN): killing it!",
|
||||
ptr, channame);
|
||||
IRC_KillClient(NULL, NULL, ptr, "Internal NJOIN error!");
|
||||
Log(LOG_DEBUG, "... done.");
|
||||
goto skip_njoin;
|
||||
}
|
||||
|
||||
chan = Channel_Search(channame);
|
||||
assert(chan != NULL);
|
||||
|
||||
if (is_owner)
|
||||
Channel_UserModeAdd(chan, c, 'q');
|
||||
if (is_chanadmin)
|
||||
Channel_UserModeAdd(chan, c, 'a');
|
||||
if (is_op)
|
||||
Channel_UserModeAdd(chan, c, 'o');
|
||||
if (is_halfop)
|
||||
Channel_UserModeAdd(chan, c, 'h');
|
||||
if (is_voiced)
|
||||
Channel_UserModeAdd(chan, c, 'v');
|
||||
|
||||
/* Announce client to the channel */
|
||||
IRC_WriteStrChannelPrefix(Client, chan, c, false,
|
||||
"JOIN :%s", channame);
|
||||
|
||||
/* Announce "channel user modes" to the channel, if any */
|
||||
strlcpy(modes, Channel_UserModes(chan, c), sizeof(modes));
|
||||
if (modes[0])
|
||||
IRC_WriteStrChannelPrefix(Client, chan, Client, false,
|
||||
"MODE %s +%s %s", channame,
|
||||
modes, Client_ID(c));
|
||||
|
||||
/* Build nick list for forwarding command */
|
||||
if (nick_out[0] != '\0')
|
||||
strlcat(nick_out, ",", sizeof(nick_out));
|
||||
if (is_owner)
|
||||
strlcat(nick_out, "~", sizeof(nick_out));
|
||||
if (is_chanadmin)
|
||||
strlcat(nick_out, "&", sizeof(nick_out));
|
||||
if (is_op)
|
||||
strlcat(nick_out, "@", sizeof(nick_out));
|
||||
if (is_halfop)
|
||||
strlcat(nick_out, "%", sizeof(nick_out));
|
||||
if (is_voiced)
|
||||
strlcat(nick_out, "+", sizeof(nick_out));
|
||||
strlcat(nick_out, ptr, sizeof(nick_out));
|
||||
|
||||
skip_njoin:
|
||||
/* Get next nick, if any ... */
|
||||
ptr = strtok(NULL, ",");
|
||||
}
|
||||
|
||||
/* forward to other servers */
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* ngIRCd -- The Next Generation IRC Daemon
|
||||
* Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors.
|
||||
* Copyright (c)2001-2018 Alexander Barton (alex@barton.de) and Contributors.
|
||||
*
|
||||
* 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
|
||||
@@ -16,7 +16,6 @@
|
||||
* Sending IRC commands over the network
|
||||
*/
|
||||
|
||||
#include "imp.h"
|
||||
#include <assert.h>
|
||||
#ifdef PROTOTYPES
|
||||
# include <stdarg.h>
|
||||
@@ -24,13 +23,10 @@
|
||||
# include <varargs.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "defines.h"
|
||||
#include "conn-func.h"
|
||||
#include "channel.h"
|
||||
|
||||
#include "exp.h"
|
||||
#include "irc-write.h"
|
||||
|
||||
#define SEND_TO_USER 1
|
||||
@@ -70,7 +66,7 @@ va_dcl
|
||||
#else
|
||||
va_start(ap);
|
||||
#endif
|
||||
vsnprintf(buffer, 1000, Format, ap);
|
||||
vsnprintf(buffer, sizeof(buffer), Format, ap);
|
||||
va_end(ap);
|
||||
|
||||
IRC_SetPenalty(Client, 2);
|
||||
@@ -107,7 +103,7 @@ va_dcl
|
||||
#else
|
||||
va_start(ap);
|
||||
#endif
|
||||
vsnprintf(buffer, 1000, Format, ap);
|
||||
vsnprintf(buffer, sizeof(buffer), Format, ap);
|
||||
va_end(ap);
|
||||
|
||||
return IRC_WriteStrClientPrefix(Client, Client_ThisServer(),
|
||||
@@ -148,7 +144,7 @@ va_dcl
|
||||
#else
|
||||
va_start( ap );
|
||||
#endif
|
||||
vsnprintf( buffer, 1000, Format, ap );
|
||||
vsnprintf(buffer, sizeof(buffer), Format, ap);
|
||||
va_end( ap );
|
||||
|
||||
return Conn_WriteStr(Client_Conn(Client_NextHop(Client)), ":%s %s",
|
||||
@@ -190,7 +186,7 @@ va_dcl
|
||||
#else
|
||||
va_start( ap );
|
||||
#endif
|
||||
vsnprintf( buffer, 1000, Format, ap );
|
||||
vsnprintf(buffer, sizeof(buffer), Format, ap);
|
||||
va_end( ap );
|
||||
|
||||
IRC_WriteStrChannelPrefix(Client, Chan, Client_ThisServer(),
|
||||
@@ -239,7 +235,7 @@ va_dcl
|
||||
#else
|
||||
va_start( ap );
|
||||
#endif
|
||||
vsnprintf( buffer, 1000, Format, ap );
|
||||
vsnprintf(buffer, sizeof(buffer), Format, ap);
|
||||
va_end( ap );
|
||||
|
||||
Conn_ClearFlags( );
|
||||
@@ -296,7 +292,7 @@ va_dcl
|
||||
#else
|
||||
va_start( ap );
|
||||
#endif
|
||||
vsnprintf( buffer, 1000, Format, ap );
|
||||
vsnprintf(buffer, sizeof(buffer), Format, ap);
|
||||
va_end( ap );
|
||||
|
||||
IRC_WriteStrServersPrefix(ExceptOf, Client_ThisServer(), "%s", buffer);
|
||||
@@ -333,7 +329,7 @@ va_dcl
|
||||
#else
|
||||
va_start( ap );
|
||||
#endif
|
||||
vsnprintf( buffer, 1000, Format, ap );
|
||||
vsnprintf(buffer, sizeof(buffer), Format, ap);
|
||||
va_end( ap );
|
||||
|
||||
IRC_WriteStrServersPrefixFlag( ExceptOf, Prefix, '\0', "%s", buffer );
|
||||
@@ -373,7 +369,7 @@ va_dcl
|
||||
#else
|
||||
va_start( ap );
|
||||
#endif
|
||||
vsnprintf( buffer, 1000, Format, ap );
|
||||
vsnprintf(buffer, sizeof(buffer), Format, ap);
|
||||
va_end( ap );
|
||||
|
||||
IRC_WriteStrServersPrefixFlag_CB(ExceptOf, Prefix, Flag,
|
||||
@@ -384,11 +380,10 @@ va_dcl
|
||||
* Send a message to all the servers in the network using a specific prefix
|
||||
* and matching a "client flag" using a callback function.
|
||||
*
|
||||
* @param Client The sending client, excluded while forwarding the message.
|
||||
* @param ExceptOf The sending client, excluded while forwarding the message.
|
||||
* @param Prefix The prefix to use.
|
||||
* @param Flag Client flag that must be set on the target.
|
||||
* @param callback Callback function.
|
||||
* @param Format Format string.
|
||||
*/
|
||||
GLOBAL void
|
||||
IRC_WriteStrServersPrefixFlag_CB(CLIENT *ExceptOf, CLIENT *Prefix, char Flag,
|
||||
@@ -451,7 +446,7 @@ va_dcl
|
||||
#else
|
||||
va_start( ap );
|
||||
#endif
|
||||
vsnprintf( buffer, 1000, Format, ap );
|
||||
vsnprintf(buffer, sizeof(buffer), Format, ap);
|
||||
va_end( ap );
|
||||
|
||||
Conn_ClearFlags( );
|
||||
@@ -513,7 +508,7 @@ va_dcl
|
||||
#else
|
||||
va_start(ap);
|
||||
#endif
|
||||
vsnprintf(msg, 1000, Format, ap);
|
||||
vsnprintf(msg, sizeof(msg), Format, ap);
|
||||
va_end(ap);
|
||||
|
||||
for (to=Client_First(); to != NULL; to=Client_Next(to)) {
|
||||
@@ -525,12 +520,12 @@ va_dcl
|
||||
if (Client_HasMode(to, 'w'))
|
||||
IRC_WriteStrClientPrefix(to, From,
|
||||
"WALLOPS :%s", msg);
|
||||
break;
|
||||
break;
|
||||
case CLIENT_SERVER:
|
||||
if (to != Client)
|
||||
IRC_WriteStrClientPrefix(to, From,
|
||||
"WALLOPS :%s", msg);
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} /* IRC_SendWallops */
|
||||
|
150
src/ngircd/irc.c
150
src/ngircd/irc.c
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* ngIRCd -- The Next Generation IRC Daemon
|
||||
* Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors.
|
||||
* Copyright (c)2001-2018 Alexander Barton (alex@barton.de) and Contributors.
|
||||
*
|
||||
* 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
|
||||
@@ -16,17 +16,19 @@
|
||||
* IRC commands
|
||||
*/
|
||||
|
||||
#include "imp.h"
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "ngircd.h"
|
||||
#include "conn-func.h"
|
||||
#include "conf.h"
|
||||
#include "channel.h"
|
||||
#include "conn-encoding.h"
|
||||
#include "defines.h"
|
||||
#ifdef ICONV
|
||||
# include "conn-encoding.h"
|
||||
#endif
|
||||
#include "irc-macros.h"
|
||||
#include "irc-write.h"
|
||||
#include "log.h"
|
||||
@@ -34,9 +36,7 @@
|
||||
#include "messages.h"
|
||||
#include "parse.h"
|
||||
#include "op.h"
|
||||
#include "tool.h"
|
||||
|
||||
#include "exp.h"
|
||||
#include "irc.h"
|
||||
|
||||
static char *Option_String PARAMS((CONN_ID Idx));
|
||||
@@ -85,6 +85,8 @@ IRC_CheckListTooBig(CLIENT *From, const int Count, const int Limit,
|
||||
GLOBAL bool
|
||||
IRC_ERROR(CLIENT *Client, REQUEST *Req)
|
||||
{
|
||||
char *msg;
|
||||
|
||||
assert( Client != NULL );
|
||||
assert( Req != NULL );
|
||||
|
||||
@@ -99,12 +101,20 @@ IRC_ERROR(CLIENT *Client, REQUEST *Req)
|
||||
return CONNECTED;
|
||||
}
|
||||
|
||||
if (Req->argc < 1)
|
||||
if (Req->argc < 1) {
|
||||
msg = "Got ERROR command";
|
||||
Log(LOG_NOTICE, "Got ERROR from \"%s\"!",
|
||||
Client_Mask(Client));
|
||||
else
|
||||
} else {
|
||||
msg = Req->argv[0];
|
||||
Log(LOG_NOTICE, "Got ERROR from \"%s\": \"%s\"!",
|
||||
Client_Mask(Client), Req->argv[0]);
|
||||
Client_Mask(Client), msg);
|
||||
}
|
||||
|
||||
if (Client_Conn(Client) != NONE) {
|
||||
Conn_Close(Client_Conn(Client), NULL, msg, false);
|
||||
return DISCONNECTED;
|
||||
}
|
||||
|
||||
return CONNECTED;
|
||||
} /* IRC_ERROR */
|
||||
@@ -224,8 +234,6 @@ IRC_TRACE(CLIENT *Client, REQUEST *Req)
|
||||
assert(Client != NULL);
|
||||
assert(Req != NULL);
|
||||
|
||||
IRC_SetPenalty(Client, 3);
|
||||
|
||||
_IRC_GET_SENDER_OR_RETURN_(from, Req, Client)
|
||||
_IRC_GET_TARGET_SERVER_OR_RETURN_(target, Req, 0, from)
|
||||
|
||||
@@ -242,7 +250,7 @@ IRC_TRACE(CLIENT *Client, REQUEST *Req)
|
||||
PACKAGE_VERSION, Client_ID(target),
|
||||
Client_ID(Client_NextHop(target)),
|
||||
Option_String(idx2),
|
||||
time(NULL) - Conn_StartTime(idx2),
|
||||
(long)(time(NULL) - Conn_StartTime(idx2)),
|
||||
Conn_SendQ(idx), Conn_SendQ(idx2)))
|
||||
return DISCONNECTED;
|
||||
|
||||
@@ -301,8 +309,6 @@ IRC_HELP(CLIENT *Client, REQUEST *Req)
|
||||
assert(Client != NULL);
|
||||
assert(Req != NULL);
|
||||
|
||||
IRC_SetPenalty(Client, 2);
|
||||
|
||||
if ((Req->argc == 0 && array_bytes(&Conf_Helptext) > 0)
|
||||
|| (Req->argc >= 1 && strcasecmp(Req->argv[0], "Commands") != 0)) {
|
||||
/* Help text available and requested */
|
||||
@@ -343,9 +349,12 @@ GLOBAL bool
|
||||
IRC_KillClient(CLIENT *Client, CLIENT *From, const char *Nick, const char *Reason)
|
||||
{
|
||||
const char *msg;
|
||||
CONN_ID my_conn, conn;
|
||||
CONN_ID my_conn = NONE, conn;
|
||||
CLIENT *c;
|
||||
|
||||
assert(Nick != NULL);
|
||||
assert(Reason != NULL);
|
||||
|
||||
/* Do we know such a client in the network? */
|
||||
c = Client_Search(Nick);
|
||||
if (!c) {
|
||||
@@ -353,12 +362,8 @@ IRC_KillClient(CLIENT *Client, CLIENT *From, const char *Nick, const char *Reaso
|
||||
return CONNECTED;
|
||||
}
|
||||
|
||||
/* Inform other servers */
|
||||
IRC_WriteStrServersPrefix(From ? Client : NULL,
|
||||
From ? From : Client_ThisServer(),
|
||||
"KILL %s :%s", Nick, Reason);
|
||||
|
||||
if (Client_Type(c) != CLIENT_USER && Client_Type(c) != CLIENT_GOTNICK) {
|
||||
if (Client_Type(c) != CLIENT_USER && Client_Type(c) != CLIENT_GOTNICK
|
||||
&& Client_Type(c) != CLIENT_SERVICE) {
|
||||
/* Target of this KILL is not a regular user, this is
|
||||
* invalid! So we ignore this case if we received a
|
||||
* regular KILL from the network and try to kill the
|
||||
@@ -379,8 +384,15 @@ IRC_KillClient(CLIENT *Client, CLIENT *From, const char *Nick, const char *Reaso
|
||||
Client_Type(c), Nick);
|
||||
}
|
||||
|
||||
/* Inform other servers */
|
||||
IRC_WriteStrServersPrefix(From ? Client : NULL,
|
||||
From ? From : Client_ThisServer(),
|
||||
"KILL %s :%s", Nick, Reason);
|
||||
|
||||
|
||||
/* Save ID of this connection */
|
||||
my_conn = Client_Conn(Client);
|
||||
if (Client)
|
||||
my_conn = Client_Conn(Client);
|
||||
|
||||
/* Kill the client NOW:
|
||||
* - Close the local connection (if there is one),
|
||||
@@ -403,7 +415,7 @@ IRC_KillClient(CLIENT *Client, CLIENT *From, const char *Nick, const char *Reaso
|
||||
* Send help for a given topic to the client.
|
||||
*
|
||||
* @param Client The client requesting help.
|
||||
* @param Topoc The help topic requested.
|
||||
* @param Topic The help topic requested.
|
||||
* @return CONNECTED or DISCONNECTED.
|
||||
*/
|
||||
static bool
|
||||
@@ -471,16 +483,11 @@ Help(CLIENT *Client, const char *Topic)
|
||||
* @return Pointer to static (global) string buffer.
|
||||
*/
|
||||
static char *
|
||||
#ifdef ZLIB
|
||||
#if defined(SSL_SUPPORT) || defined(ZLIB)
|
||||
Option_String(CONN_ID Idx)
|
||||
#else
|
||||
Option_String(UNUSED CONN_ID Idx)
|
||||
#endif
|
||||
{
|
||||
static char option_txt[8];
|
||||
#ifdef ZLIB
|
||||
UINT16 options;
|
||||
#endif
|
||||
|
||||
assert(Idx != NONE);
|
||||
|
||||
@@ -495,11 +502,27 @@ Option_String(UNUSED CONN_ID Idx)
|
||||
if(options & CONN_ZIP) /* zlib compression enabled */
|
||||
strlcat(option_txt, "z", sizeof(option_txt));
|
||||
#endif
|
||||
LogDebug(" *** %d: %d = %s", Idx, options, option_txt);
|
||||
|
||||
return option_txt;
|
||||
#else
|
||||
Option_String(UNUSED CONN_ID Idx)
|
||||
{
|
||||
return "";
|
||||
#endif
|
||||
} /* Option_String */
|
||||
|
||||
/**
|
||||
* Send a message to target(s).
|
||||
*
|
||||
* This function is used by IRC_{PRIVMSG|NOTICE|SQUERY} to actualy
|
||||
* send the message(s).
|
||||
*
|
||||
* @param Client The client from which this command has been received.
|
||||
* @param Req Request structure with prefix and all parameters.
|
||||
* @param ForceType Required type of the destination of the message(s).
|
||||
* @param SendErrors Whether to report errors back to the client or not.
|
||||
* @return CONNECTED or DISCONNECTED.
|
||||
*/
|
||||
static bool
|
||||
Send_Message(CLIENT * Client, REQUEST * Req, int ForceType, bool SendErrors)
|
||||
{
|
||||
@@ -507,8 +530,10 @@ Send_Message(CLIENT * Client, REQUEST * Req, int ForceType, bool SendErrors)
|
||||
CL2CHAN *cl2chan;
|
||||
CHANNEL *chan;
|
||||
char *currentTarget = Req->argv[0];
|
||||
char *lastCurrentTarget = NULL;
|
||||
char *strtok_last = NULL;
|
||||
char *message = NULL;
|
||||
char *targets[MAX_HNDL_TARGETS];
|
||||
int i, target_nr = 0;
|
||||
|
||||
assert(Client != NULL);
|
||||
assert(Req != NULL);
|
||||
@@ -528,12 +553,11 @@ Send_Message(CLIENT * Client, REQUEST * Req, int ForceType, bool SendErrors)
|
||||
if (Req->argc > 2) {
|
||||
if (!SendErrors)
|
||||
return CONNECTED;
|
||||
IRC_SetPenalty(Client, 2);
|
||||
return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG,
|
||||
Client_ID(Client), Req->command);
|
||||
}
|
||||
|
||||
if (Client_Type(Client) == CLIENT_SERVER)
|
||||
if (Client_Type(Client) == CLIENT_SERVER && Req->prefix)
|
||||
from = Client_Search(Req->prefix);
|
||||
else
|
||||
from = Client;
|
||||
@@ -549,10 +573,19 @@ Send_Message(CLIENT * Client, REQUEST * Req, int ForceType, bool SendErrors)
|
||||
message = Req->argv[1];
|
||||
|
||||
/* handle msgtarget = msgto *("," msgto) */
|
||||
currentTarget = strtok_r(currentTarget, ",", &lastCurrentTarget);
|
||||
currentTarget = strtok_r(currentTarget, ",", &strtok_last);
|
||||
ngt_UpperStr(Req->command);
|
||||
|
||||
/* Please note that "currentTarget" is NULL when the target contains
|
||||
* the separator character only, e. g. "," or ",,,," etc.! */
|
||||
while (currentTarget) {
|
||||
/* Make sure that there hasn't been such a target already: */
|
||||
targets[target_nr++] = currentTarget;
|
||||
for(i = 0; i < target_nr - 1; i++) {
|
||||
if (strcasecmp(currentTarget, targets[i]) == 0)
|
||||
goto send_next_target;
|
||||
}
|
||||
|
||||
/* Check for and handle valid <msgto> of form:
|
||||
* RFC 2812 2.3.1:
|
||||
* msgto = channel / ( user [ "%" host ] "@" servername )
|
||||
@@ -661,7 +694,10 @@ Send_Message(CLIENT * Client, REQUEST * Req, int ForceType, bool SendErrors)
|
||||
goto send_next_target;
|
||||
}
|
||||
|
||||
if (Client_HasMode(cl, 'C')) {
|
||||
if (Client_HasMode(cl, 'C') &&
|
||||
!Client_HasMode(from, 'o') &&
|
||||
!(Client_Type(from) == CLIENT_SERVER) &&
|
||||
!(Client_Type(from) == CLIENT_SERVICE)) {
|
||||
cl2chan = Channel_FirstChannelOf(cl);
|
||||
while (cl2chan) {
|
||||
chan = Channel_GetChannel(cl2chan);
|
||||
@@ -696,14 +732,14 @@ Send_Message(CLIENT * Client, REQUEST * Req, int ForceType, bool SendErrors)
|
||||
return DISCONNECTED;
|
||||
} else if (ForceType != CLIENT_SERVICE
|
||||
&& (chan = Channel_Search(currentTarget))) {
|
||||
/* Target is a channel */
|
||||
if (!Channel_Write(chan, from, Client, Req->command,
|
||||
SendErrors, message))
|
||||
return DISCONNECTED;
|
||||
} else if (ForceType != CLIENT_SERVICE
|
||||
/* $#: server/target mask, RFC 2812, sec. 3.3.1 */
|
||||
&& strchr("$#", currentTarget[0])
|
||||
&& strchr(currentTarget, '.')) {
|
||||
/* targetmask */
|
||||
/* $#: server/host mask, RFC 2812, sec. 3.3.1 */
|
||||
if (!Send_Message_Mask(from, Req->command, currentTarget,
|
||||
message, SendErrors))
|
||||
return DISCONNECTED;
|
||||
@@ -716,14 +752,35 @@ Send_Message(CLIENT * Client, REQUEST * Req, int ForceType, bool SendErrors)
|
||||
}
|
||||
|
||||
send_next_target:
|
||||
currentTarget = strtok_r(NULL, ",", &lastCurrentTarget);
|
||||
if (currentTarget)
|
||||
Conn_SetPenalty(Client_Conn(Client), 1);
|
||||
currentTarget = strtok_r(NULL, ",", &strtok_last);
|
||||
if (!currentTarget)
|
||||
break;
|
||||
|
||||
Conn_SetPenalty(Client_Conn(Client), 1);
|
||||
|
||||
if (target_nr >= MAX_HNDL_TARGETS) {
|
||||
/* Too many targets given! */
|
||||
return IRC_WriteErrClient(Client,
|
||||
ERR_TOOMANYTARGETS_MSG,
|
||||
currentTarget);
|
||||
}
|
||||
}
|
||||
|
||||
return CONNECTED;
|
||||
} /* Send_Message */
|
||||
|
||||
/**
|
||||
* Send a message to "target mask" target(s).
|
||||
*
|
||||
* See RFC 2812, sec. 3.3.1 for details.
|
||||
*
|
||||
* @param from The client from which this command has been received.
|
||||
* @param command The command to use (PRIVMSG, NOTICE, ...).
|
||||
* @param targetMask The "target mask" (will be verified by this function).
|
||||
* @param message The message to send.
|
||||
* @param SendErrors Whether to report errors back to the client or not.
|
||||
* @return CONNECTED or DISCONNECTED.
|
||||
*/
|
||||
static bool
|
||||
Send_Message_Mask(CLIENT * from, char * command, char * targetMask,
|
||||
char * message, bool SendErrors)
|
||||
@@ -747,17 +804,15 @@ Send_Message_Mask(CLIENT * from, char * command, char * targetMask,
|
||||
* dot (".") and no wildcards ("*", "?") following the last one.
|
||||
*/
|
||||
check_wildcards = strrchr(targetMask, '.');
|
||||
assert(check_wildcards != NULL);
|
||||
if (check_wildcards &&
|
||||
check_wildcards[strcspn(check_wildcards, "*?")])
|
||||
{
|
||||
if (!check_wildcards || check_wildcards[strcspn(check_wildcards, "*?")]) {
|
||||
if (!SendErrors)
|
||||
return true;
|
||||
return IRC_WriteErrClient(from, ERR_WILDTOPLEVEL, targetMask);
|
||||
return IRC_WriteErrClient(from, ERR_WILDTOPLEVEL_MSG,
|
||||
targetMask);
|
||||
}
|
||||
|
||||
/* #: hostmask, see RFC 2812, sec. 3.3.1 */
|
||||
if (targetMask[0] == '#') {
|
||||
/* #: hostmask, see RFC 2812, sec. 3.3.1 */
|
||||
for (cl = Client_First(); cl != NULL; cl = Client_Next(cl)) {
|
||||
if (Client_Type(cl) != CLIENT_USER)
|
||||
continue;
|
||||
@@ -768,7 +823,8 @@ Send_Message_Mask(CLIENT * from, char * command, char * targetMask,
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
assert(targetMask[0] == '$'); /* $: server mask, see RFC 2812, sec. 3.3.1 */
|
||||
/* $: server mask, see RFC 2812, sec. 3.3.1 */
|
||||
assert(targetMask[0] == '$');
|
||||
for (cl = Client_First(); cl != NULL; cl = Client_Next(cl)) {
|
||||
if (Client_Type(cl) != CLIENT_USER)
|
||||
continue;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user