1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-06-20 06:44:45 +02:00

76 Commits

Author SHA1 Message Date
cvs2hg 42949736f6 fixup commit for branch 'experimentalweirdnes' 2001-01-09 23:26:11 +00:00
codemastr 7a0de228fc Fixed a shun bug 2001-01-09 23:26:10 +00:00
stskeeps 50beda9644 . 2001-01-09 19:07:25 +00:00
stskeeps cc4a5273db . 2001-01-09 10:25:34 +00:00
stskeeps 64931ec2cb . 2001-01-07 16:37:46 +00:00
codemastr 30e1580504 Fixed a G:line bug reported by ROXnet 2001-01-06 18:29:10 +00:00
stskeeps 45828bdf33 . 2001-01-06 10:51:30 +00:00
codemastr 9e88d95c35 made drpass be used in place of X:line 2001-01-06 00:55:06 +00:00
codemastr 6a02c2b900 made ulines load from the new config 2001-01-05 23:02:08 +00:00
stskeeps dbddc21399 +- Added listen {} runtime-configuration code work :))
+- Removed unrealircd.conf from stock
2001-01-05 22:37:13 +00:00
codemastr b75e6e6668 Made /admin use the new config 2001-01-05 19:50:22 +00:00
stskeeps 1ecdb3714c . 2001-01-04 22:02:04 +00:00
stskeeps 9c22ba475e +- Merged in sts-laptop branch 2001-01-04 21:54:09 +00:00
stskeeps b4493dae82 *** empty log message *** 2001-01-04 21:42:41 +00:00
codemastr 428a4c5d94 ... 2001-01-03 22:26:54 +00:00
codemastr 8335a9efca cron changes 2000-12-30 18:01:48 +00:00
codemastr 800401f0cc ... 2000-12-30 17:58:32 +00:00
codemastr bc8fe3cda1 ... 2000-12-30 17:57:54 +00:00
codemastr 989d31db7a ... 2000-12-30 17:57:04 +00:00
codemastr 449c223d5d Fixed a serious bug 2000-12-28 02:15:45 +00:00
codemastr 5a46eab842 ... 2000-12-28 01:47:35 +00:00
codemastr 1a59f08f8c Fixed a ircd.tune bug 2000-12-27 22:05:38 +00:00
codemastr 97cc8fe0b3 Fixed a STATS_ONLYOPER bug 2000-12-27 21:48:27 +00:00
stskeeps 02424859a2 . 2000-12-27 18:57:33 +00:00
codemastr 77b43b023f added the except parser 2000-12-27 18:26:21 +00:00
codemastr 697779c545 fixed a chg*/set* and sdesc bug 2000-12-27 15:45:41 +00:00
codemastr b899d5f1f6 ... 2000-12-26 15:49:37 +00:00
stskeeps 19f40d067c +- Added TODO in top of s_conf2.c 2000-12-26 12:59:25 +00:00
stskeeps 95599d4f69 +- Finished _conf_allow 2000-12-26 12:45:12 +00:00
stskeeps 3d42025e70 +- Finished _conf_listen 2000-12-26 12:04:13 +00:00
stskeeps cf209ac0f8 . 2000-12-25 23:43:29 +00:00
stskeeps bfe9ce19f8 +- A report_configuration code (showoff) 2000-12-25 23:07:15 +00:00
stskeeps 021dbadcb2 +- Finished _conf_oper 2000-12-25 22:25:55 +00:00
stskeeps 5e1a7560f4 . 2000-12-25 20:47:53 +00:00
codemastr 14060a44dd Added tld to the config code 2000-12-25 20:40:56 +00:00
stskeeps 8a526e56ef . 2000-12-25 19:59:21 +00:00
stskeeps 5e009543c0 .. 2000-12-25 19:53:32 +00:00
codemastr c521050ad8 made config2 use strerror to report errors rather than the numeric 2000-12-25 19:52:38 +00:00
angel11 61d9748dc0 Fixed s_user.c so umode N and T cannot coexist 2000-12-25 19:43:11 +00:00
stskeeps e9bde25600 +- Removed parser builtin directive include, and replaced it with our own 2000-12-25 18:46:53 +00:00
stskeeps 2a40af2bff . 2000-12-25 16:41:18 +00:00
stskeeps 263eebc9b3 . 2000-12-25 16:34:59 +00:00
stskeeps 3411fb0724 +- Some more config2 code 2000-12-25 10:43:42 +00:00
codemastr 481856ecde added drpass to the config code 2000-12-24 22:15:08 +00:00
stskeeps 8ae2344c43 . 2000-12-24 21:59:50 +00:00
codemastr 4d7e1dc8be ... 2000-12-24 21:53:43 +00:00
stskeeps dfffd4b238 +- Some more newconf code 2000-12-24 21:52:33 +00:00
stskeeps 8837f3540e +- Some more _conf_class code 2000-12-24 18:12:41 +00:00
codemastr d455d37f59 *** empty log message *** 2000-12-24 18:04:11 +00:00
codemastr 7464b80219 /stats changes 2000-12-24 18:00:41 +00:00
codemastr 24318b579f fixed a missing : on numeric 379 2000-12-24 16:52:27 +00:00
stskeeps a99d4497df . 2000-12-24 16:34:12 +00:00
stskeeps 6751ce7349 +- Added some a bit functional _conf_class code 2000-12-24 16:09:28 +00:00
stskeeps 7b44111745 +- Added the next part of the new config parser, and some even more 2000-12-24 15:37:57 +00:00
stskeeps f3c5f6f6c8 +- Added the next part of the new config parser 2000-12-24 13:31:33 +00:00
stskeeps e24f9f0844 +- Added first part of the new config parser, s_conf2.c 2000-12-23 23:21:10 +00:00
stskeeps 2edbe91580 . 2000-12-23 12:57:33 +00:00
stskeeps 9e68fd3ac0 *** empty log message *** 2000-12-23 12:55:46 +00:00
stskeeps dc7eca4b5d + Stskeeps> +j? but yes, there's a bug there 2000-12-21 10:16:52 +00:00
codemastr 749014625a *** empty log message *** 2000-12-20 22:07:49 +00:00
codemastr 313ec95dcd Fixed a bug where you would receive a double notice on /who 0 o 2000-12-20 17:47:02 +00:00
codemastr 4d8e57d51d topci fixes 2000-12-20 17:36:29 +00:00
codemastr 6bc1965492 ... 2000-12-20 17:17:04 +00:00
stskeeps d17cbcc9b5 +- Added in devdev's INSTALL replacement
- Made it so you don't get a +W notice if you /who or /whois yourself reported by Ron885
 - You can no longer specify an *@unrealircd.com/org, or unreal-*@lists.sourceforge.net email
   as your KLINE_ADDRESS (the "Why am I K:lined?" messages got too annoying)
+- Removed some irc.flirt.org references.
2000-12-20 15:18:56 +00:00
codemastr 5ad018cce7 ... 2000-12-19 22:33:33 +00:00
codemastr a69ec1a95b Made it so you don't get a +W notice if you /who or /whois yourself 2000-12-19 22:21:50 +00:00
stskeeps de447b9495 +- Fixed some more points of ->passwd bugs 2000-12-17 20:51:40 +00:00
stskeeps f855bb7dab + m_server_estab, reported and fixed by Kanzen_Greiver 2000-12-17 20:45:36 +00:00
codemastr 65aa3e7a6e Modified rehash flags to use strnicmp rather than match 2000-12-17 18:35:31 +00:00
stskeeps 96bda8f5dc . 2000-12-17 11:58:05 +00:00
codemastr 4429a4ba7e removed a redundant include of time.h 2000-12-15 22:25:32 +00:00
stskeeps 3d0bf74200 +- Fixed permission problem with SSL .pem files (was o+r) 2000-12-15 16:44:23 +00:00
stskeeps 44d7308718 . 2000-12-14 20:41:03 +00:00
stskeeps 9dbfd6251d *** empty log message *** 2000-12-14 17:01:15 +00:00
cvs2hg d46d93cfa5 fixup commit for tag 'unreal3_1_1_stable' 2000-12-14 16:07:33 +00:00
cvs2hg 8350bc861c fixup commit for tag 'unreal3_1_1_darkshades' 2000-12-14 16:07:32 +00:00
35 changed files with 3360 additions and 868 deletions
+2
View File
@@ -0,0 +1,2 @@
ircdcron/ircd.cron
ircdcron/ircdchk
+68 -1
View File
@@ -20,6 +20,73 @@
*
*/
[ Unreal4.0 ]
[ Unreal3.2-Selene ]
- Fixed a _serious_ bug in SERVER command, reported by Valen, Forrester,
M0rpheus, JK, and Hiten.
- Fixed /botserv problem
- Fixed permission problem with SSL .pem files (was o+r)
- Removed a redundant time.h include reported by trippin
- Modified rehash flags to use strnicmp rather than match (faster)
- Fixed some points of confusion of possible cptr->passwd bug in
m_server_estab, reported and fixed by Kanzen_Greiver
- Fixed some more points of ->passwd bugs
- Added in devdev's INSTALL replacement
- Made it so you don't get a +W notice if you /who or /whois yourself reported by Ron885
- You can no longer specify an *@unrealircd.com/org, or unreal-*@lists.sourceforge.net email
as your KLINE_ADDRESS (the "Why am I K:lined?" messages got too annoying)
- Removed some irc.flirt.org references.
- Made it so if a channel is +O or +A and you are not +O or +A and not in the channel, you can not
/topic #channel same for +b if not +o or on the channel. Suggested by Sysop_Mars
- Fixed a bug where you would receive a double notice when someone does a /who 0 o
- Added first part of the new config parser, s_conf2.c
- Added the next part of the new config parser, and some even more
- Fixed a missing : on numeric 379 found by script0r
- Added some a bit functional _conf_class code
- Some more _conf_class code
- Typing /stats or /stats invalid-flag will return a list of valid flags
- You no longer receive a /stats +e notice when no flag is specified, or an invalid flag is specified
- Some more newconf code, and some more
- Added drpass (X:line) to the config code
- Some more config2 code
- Removed parser builtin directive include, and replaced it with our own
- The config2 now uses strerror() to display an error, rather than the numeric
- Fixed s_user.c so umode N and T cannot coexist
- Added tld (T:line) to the config code
- Finished _conf_oper
- A report_configuration code (showoff)
- Finished _conf_listen
- Finished _conf_allow
- Added TODO in top of s_conf2.c
- Fixed a bug reported by S7 that affected chg* and set* as well as sdesc
- Started work on the except parser
- Wierdoe parse things
- Made except parser use a specialized _configflag_except instead of wasting
a byte.
- Changed version to "Unreal3.2-Selene" (Selene = female character in a
comic mag i found at my grandmas :P)
- Finished _conf_vhost
- Made _conf_listen understand listen <port> {}
- Finished _conf_link
- Added some _conf_link validity and added ->class option (forgot it)
- Made ircd.c use the newconf with me.* setup. Uses the first and the best
as listener
- Finished _conf_ban (try and attack us now idiots!)
- Made "No response from", use GLOBOPS instead of GNOTICE.
Fixes TODO Bugfixes Thu Dec 14 2000 Priority 10 added by Stskeeps
- Fixed telnet close server thing, fixes Wed 20 Dec 2000 priority 9,
added by codemastr
- Fixed /whois shows what channels +S are in.
Closes stskeeps/Dec30-2000-10-Bugfixes =======
- Fixed a STATS_ONLYOPER bug
- Fixed a ircd.tune bug (the file may not write if it didn't exist)
- Fixed a serious bug reported by Kanzen_Griever
- Merged in sts-laptop branch
- Made /admin use the new config (had to modify some newconf stuff to make a backwards copy
of the list as well)
- Made U:lines loaded from the newconf, also made /stats U read the U:lines from the newconf
- Added listen {} runtime-configuration code work :))
- Removed unrealircd.conf from the stock
- X:line was replaced with drpass {} in /restart and /die (will make them faster as well)
- Made +u do a auditorium/star chat feature, suggested by |Martin|=======
- Fixed a G:line bug that would allow certain masks to be interpreted as *@*
- Fixed the same bug in shun that affected G:line
+96 -153
View File
@@ -1,156 +1,99 @@
$Id$
Installation Procedures for the UnrealIRCD:
=======================================================================
Created by Stskeeps <stskeeps@tspre.org>
=======================================================================
This document describes how to install ircd, the unix daemon that acts as
an IRC server.
For more information on UnrealIRCD contact us at
unreal-dev@lists.sourceforge.net
The UnrealIRCD is available from http://www.unrealircd.com
along with the latest copy of this document.
###############################################################################
#### Unreal IRC Unix Daemon Installation Guide ####
#### UnrealIRCD ver 3.1.1 ####
#### unreal-dev@lists.sourceforge.com ####
#### http://www.unrealircd.com/ ####
###############################################################################
#### Unpackaging the IRCD ####
#### ####
#### 1) gzip -d Unreal3.1.1.tar.gz ####
#### ####
#### 2) tar xvf Unreal3.1.1.tar ####
#### ####
#### 3) cd Unreal3.1.1/ ####
###############################################################################
#### Compiling the IRCD ####
#### ####
#### 1) Supported Operating Systems ####
#### ####
#### OS and Version Compiler and Version Comments ####
#### --------------- ------------------------ ------------------------ ####
#### NetBSD 1.2B gcc 2.7.2 ####
#### FreeBSD 2.1.0 gcc 2.6.3 Don't use crypt at all ####
#### SunOS 4.1.4 gcc 2.7-96q1 (Cygnus) ####
#### Solaris 2.4 gcc 2.7-96q1 (Cygnus) (SunOS 5.4) ####
#### Solaris 2.5 SunWorks Pro C (SunOS 5.5.1) ####
#### cc: SC4.0 18 Oct 1995 C 4.0 ####
#### Digital Unix 3.2 gcc 2.7-96q3 (Cygnus) ####
#### Linux 2.0.24 gcc 2.7.2.1 ####
#### PUX 9.01 gcc 2.6.3 ####
#### HPUX 10.01 gcc 2.7-96q3 (Cygnus) ####
#### Linux PPC (iMac) ####
#### AmigaOS 3.0 GCC egcs-2.91.66 (compile with -D_AMIGA) ####
#### Windows NT/95 MSVC++ 4.0 ####
#### Linux Mandrake Read FAQ ####
#### Linux 2.3.x gcc 2.95.2 glibc 2.1.3 ####
#### ####
#### 2) DO NOT edit the MakeFile or any of the files to configure your ####
#### IRCd. The newest releases of Unreal only require you to run: ####
#### ####
#### ./Config ####
#### ####
#### 2a) Windows users: please read WIN32 ####
#### ####
#### 3) When in ./Config put in the best answers to your knowledge. ####
#### This is all pretty self explanatory. We suggest, to advoid ####
#### problems later on, put the DPATH and SPATH as the default. ####
#### (When it asks where the config files and binarys will be). ####
#### Also, when it asks for max file connections, the default is ####
#### 1024, but above it you will see what your true limit is. ####
#### Please put the maxfd number in or else your IRCD will not ####
#### start at all and you will have to re-compile. ####
#### ####
#### 4) make ####
#### This will compile your server based on you settings chosen in ####
#### ./Config ####
#### ####
#### 4a) Hopefully, the server will compile without incident. If it ####
#### does not, and you are not able to determine the error, please ####
#### email unreal-dev@lists.sourceforge.net and hopefully someone ####
#### will be able to help you. Another suggestion is going on IRC ####
#### /server irc.ircsystems.net #UnrealIRCD ####
#### ####
#### 4b) make install - IS NOT NEEDED ####
#### ####
###############################################################################
#### Configuring the Server ####
#### ####
#### 1) ./makeconf ####
#### This executable has been created to help with your ircd.conf ####
#### creation process. It walks you through the steps and makes the ####
#### file for you. Note: If you want to edit your ircd.conf you ####
#### should only need to: edit ircd.conf. If you ./makeconf again ####
#### it will delete the old ircd.conf and re-write a new one. ####
#### ####
###############################################################################
#### Starting the Server ####
#### ####
#### 1) Make sure you're in the top level Unreal3.1.1 directory.. ####
#### ####
#### 2) ./ircd ####
#### ####
#### 3) If you get the error screen, please go through and check each ####
#### point presented, if you have no luck, go on IRC ####
#### /server irc.ircsystems.net #UnrealIRCD ####
#### ####
#### 4) /server yourserverip or domainname ####
#### ####
###############################################################################
#### Updating the IRCD ####
#### ####
#### 1) ./update ####
#### Newer releases of Unreal allow the use of ./update which logs ####
#### into the Unreal server and allows you to pick a new version to ####
#### to upgrade to. ####
#### ####
###############################################################################
=======================================================================
This version of the UnrealIRCD is known to compile on the following
platforms, and with the following compilers. If you wish to add to this
list, send the relevant information to us.
OS and Version Compiler and Version Comments
------------------- ------------------------ -------------------------------
NetBSD 1.2B gcc 2.7.2
FreeBSD 2.1.0 gcc 2.6.3 Do NOT use crypt at all...
SunOS 4.1.4 gcc 2.7-96q1 (Cygnus)
Solaris 2.4 gcc 2.7-96q1 (Cygnus) (SunOS 5.4)
Solaris 2.5 SunWorks Pro C (SunOS 5.5.1)
cc: SC4.0 18 Oct 1995 C 4.0
Digital Unix 3.2 gcc 2.7-96q3 (Cygnus)
Linux 2.0.24 gcc 2.7.2.1
HPUX 9.01 gcc 2.6.3
HPUX 10.01 gcc 2.7-96q3 (Cygnus)
Linux PPC (iMac)
AmigaOS 3.0 GCC egcs-2.91.66 (compile with -D_AMIGA)
Windows NT/95 MSVC++ 4.0
Linux Mandrake Read FAQ
Linux 2.3.x gcc 2.95.2 glibc 2.1.3
=======================================================================
Unpacking the Distribution
If you are reading this, you have most likely already done this, but to
recap:
The UnrealIRCD server comes tarred and gziped. To uncompress it and expand
it, use the following commands at the Unix prompt:
gzip -d Unreal3.1.tar.gz
tar -xvf Unreal3.1.tar
This will create a new directory called Unreal3.0 and unpack the source
into it.
=======================================================================
Editing the Configuration Files
In previous versions of the source code many files had to be edited to
make things right for any given server.
In this version you DO NOT NEED TO EDIT THE Makefile OR ANY FILES
IN include! That is, unless you set some strange options. If you
find the need to edit include/config.h, for example,
mail us and tell us why ; Config can be made smarter, and that will make
it so you won't have to edit anything for the next version.
=======================================================================
Compiling Your Server
Windows users: You must compile the Config program first. To do this
run the following command: $CC src\Config.c
where $CC is the name of your compiler. for MSVC users that is 'cl'
To build the server, simply run
% ./Config
to start the configuraton program. This program looks at your system
and generate the include/setup.h, include/settings.h, and Options files.
You will be asked some questions. Usually the default answers are the best
ones and most correct. To accept the default, just hit RETURN.
Next, type 'make'. This will compile your server. Depending on your system,
this may be a good time for a caffeine break. (MSVC users run 'nmake')
Hopefully, the server will compile without incident. If it does not, and
you are not able to determine the error, please email
unreal-dev@lists.sourceforge.net and hopefully someone will be able to help you with the problem. If you
do need to fix something, mail there with a patch.
BE CERTAIN TO INCLUDE OPERATING SYSTEM INFORMATION (uname -a) AND COMPILER
VERSION (gcc -v, for instance) IN ALL BUG REPORTS.
=======================================================================
Installing the Files
'make install' does not work in this release -- it doesn't do anything
except a compile if that is needed.
The only files you need are the binary from src/ircd and and an ircd.conf
(see below for copying doc/example.conf as your initial ircd.conf). You
probably will want to create a MOTD file too, as well as place the man
pages from the doc directory to appropriate place in your system.
=======================================================================
Configuring Your Server
The previous step places a file named 'example.conf' into your irc
directory you specified to Config.
To create an IRC configuration file, edit: ircd.conf
Now edit this file to reflect your server. The file is mainly
self-explanatory. Note that if you plan to use your server on ROXnet,
make sure that you have the following line:
U:services.roxnet.org:*:*
If you need help configuring your file, please connect to ROXnet,
(irc.flirt.org or irc.roxnet.org) - go to channel #UnrealIRCd, and ask.
=======================================================================
Starting Your Server
Simply enter the complete path to the executable into the Unix command
line, then hit return. Your server is now operational, assuming that you
have completed all the steps described above.
NOTE: If you get something like the following when running ircd:
ircd fd table too big
Hard Limit: 256 IRC max: 1024
Fix MAXCONNECTIONS
You need to change config.h and recompile. Find the line that says
"#define MAXCONNECTIONS 1024", and change it to the number given after
"Hard Limit" (most likely 256), then make the server again, following the
above instructions.
Enjoy!
- The UnrealIRCd Team - unreal-dev@lists.sourceforge.net
+4 -1
View File
@@ -231,4 +231,7 @@ pem: src/ssl.cnf
@echo "Generating fingerprint .."
$(OPENSSLPATH) x509 -subject -dates -fingerprint -noout \
-in server.cert.pem
@echo "Setting o-rwx & g-rwx for files... "
chmod o-rwx server.req.pem server.key.pem server.cert.pem
chmod g-rwx server.req.pem server.key.pem server.cert.pem
@echo "Done!."
+109 -7
View File
@@ -3,9 +3,21 @@ TODO for Unreal Next:
Write in entries in this form:
==============================
* nick - date - priority - [ title ]:
* nick - date - priority - [ title ] Flag:
description
Flags:
CLOSED
= Bug/Idea fixed/implemented. Bug/Idea is up for deletion
OPEN
= Bug/Idea up for fixing
IN-REPAIR <nick>
= Bug/Idea In Progress/Repair by <nick>
NO-PRODUCE
= Bug/Idea is not able to be (re)produced
POSTPONED
= Bug/Idea is scheduled for another release/time
If you think that a priority should be higher, make it++
Priority is 1..10, where 10 is highest, and 1 is lowest.
@@ -13,28 +25,32 @@ If you think that a priority should be higher, make it++
TODO :
----
* stskeeps - Tue Dec 12 2000 - 1 - [ IPv6 ]:
* stskeeps - Tue Dec 12 2000 - 1 - [ IPv6 ] OPEN:
Add IPv6 compatiblity (requested by many people). Must allow :'s in
hostnames, will kill backwards compatiblity when IPv6 is enabled
* stskeeps - Tue Dec 12 2000 - 1 - [ Code ] :
* stskeeps - Tue Dec 12 2000 - 1 - [ Code ] OPEN:
Split up code, and make the placement of functions more logic
* codemastr - Tue Dec 12 2000 - 4 - [ Zip_Links ]:
* codemastr - Tue Dec 12 2000 - 4 - [ Zip_Links ] OPEN:
Actually add this since it was planned for 3.0
* codemastr - Tue Dec 12 2000 - 5 - [ Dynconf Recode ]:
* codemastr - Tue Dec 12 2000 - 5 - [ Dynconf Recode ] IN-REPAIR stskeeps:
Dynconf has a bunch of bugs that can be resolved with a recode
We are doing this with the newconf :) -stskeeps
* codemastr - Tue Dec 12 2000 - 8 - [ +I Fixes ]:
+I still has some bugs that may cause desync and show users
that the +I user is actually on the channel.
* stskeeps - Tue Dec 12 2000 - 1 - [ Bugfixes/Hash ]:
* stskeeps - Tue Dec 12 2000 - 1 - [ Bugfixes/Hash ] CLOSED stskeeps:
Check for possible hash bug with del_from_client_table or something
People still complain about crashes
We might have fixed this with recent SERVER passwd fix and other passwd
fixes
* stskeeps - Wed Dec 13 2000 - 10 - [ Bugfixes ]:
* stskeeps - Wed Dec 13 2000 - 10 - [ Bugfixes ] NO-PRODUCE:
[[r00t3d](~lok70@168.213.226.rox-62220)] The other one, is lets say you are on
server (a), and you set +p to your channel. All the users on Server
(b,c, etc..) when they do a /list can see the +p channel in the
@@ -42,6 +58,8 @@ TODO :
that.. ON all servers (a,b,c) no one sees the +p channel in /list
unless they are in the channel allready.
Solution: Fix send_list to use PubChannel instead of SecretChannel
(Unable to reproduce. +p channels are hidden on all servers -- codemastr)
* stskeeps - Wed Dec 13 2000 - 10 - [ Bugfixes ]:
[[r00t3d](~lok70@168.213.226.rox-62220)] If you are set +I (Tech
@@ -66,3 +84,87 @@ got
[eYe-Man(none@of.your.fucking.business)] <Sexy_20> or when some server gave
me
SJOIN gives people ops? :P
* stskeeps - Thu Dec 14 2000 - 10 - [ Bugfixes ]
InTe[_:#roxnet> -oxygen.phrozen.org- *** Global -- from Irc.LinuxFreakz.Net:
No response from dumper.roxnet.org[130.240.202.121], closing
link
Users can see that using +g ???
FIXED: Sat Dec 30 2000 by stskeeps
* stskeeps - Fri Dec 14 2000 - 1 - [ SSL ]
Challenge/Response kind of thing.
/CHALLENGE nick keyname/commonidentifier type :b64text
type = 0, challenge type = 1, response
Must be flood controlled in some way
Can only work between servers and or U:lines and or
+z users
Example:
> :Stskeeps CHALLENGE RaYmAn rayman.pem 0 :0D0FE5F6D46
< :RaYmAn CHALLENGE Stskeeps rayman.pem 1 :D0F5F543433
The way this works is, that the challenger got RaYmAn's public RSA key
and he needs to authenticate that he is really talking to RaYmAn (the
real one). He then sends a random string to RaYmAn, encrypted with
RaYmAn's public key. RaYmAn then decrypts it using his private key, and
then re-encrypts the random stuff using his private key, and sends back
to Stskeeps, Sts then checks with decrypting the crypted text using the public
key, and if its OK, then considers him OK.
We can use this for NickServ authentication using RSA keys,
or server<->server authentication, or /oper authentication
(no more stolen passwords, yipieeeeeeee)
This is also easily possible to add, in IRCii, in BitchX, EPIC,
mIRC (DLLs), etc.
This is also good for raising security/authenticating to another level.
Users can check if they are talking to the right person, NickServ databases
no longer needs to have passwords, just use RSA keys
* stskeeps - Sun 17 Dec 2000 - 1 - [ General ]
P:ip:W:*:port
UnrealHTTPD!
Sat 30 Dec 2000 - stskeeps - *cough* listen::option http ;)
* codemastr - Wed 20 Dec 2000 - 3 - [ General ]
Recode badwords to allow a different replace word for each word
* codemastr - Wed 20 Dec 2000 - 1 - [ Install ]
Add make install
* codemastr - Wed 20 Dec 2000 - 9 - [ Bugfixes ]
connect to a server, /oper, then run telnet and link a server. Close the telnet but do NOT
send a SQUIT, the server displays no notice to opers that the server split.
Stskeeps> +j? but yes, there's a bug there
FIXED Sat 30 Dec 2000 by Stskeeps
* stskeeps - Sat Dec 23 2000 - 10 - [ Bugfixes ]
There's some kind of bug that shows people being on same channel
twice. I got a feeling its to do with JOIN/SJOIN as its only remote.
[ Stskeeps ] [@ChanServ ] [@Fresh-Prin] [ Fresh-Prin] [@Fresh-Prin]
Same person
* codemastr - Tue Dec 26 2000 - 6 - [ Bugfixes ]
(too lazy to type it out)
http://sourceforge.net/bugs/?func=detailbug&bug_id=126645&group_id=1968
That fix will work except it needs to be modified so it checks remote
before denying because of not being oper
* stskeeps - Wed Dec 27 2000 - 5 - [Configuration]
Add a SWHOIS option to oper {} block, suggested by Robertsog
* codemastr - Tue Dec 26 2000 - 6 - [ Bugfixes ]
(too lazy to type it out)
http://sourceforge.net/bugs/?func=detailbug&bug_id=126645&group_id=1968
That fix will work except it needs to be modified so it checks remote
before denying because of not being oper
* stskeeps - Sun Dec 30 2000 - 10 - [ Bugfixes ]
/whois shows what channels +S are in
* codemastr - Tue Jan 03 2001 - 1 - [ Idea ]
Add /kill logging option suggested by Cerb
-126
View File
@@ -1,126 +0,0 @@
[ $Id$ ]
---------------------------
Version Elite2.0 ==========
===========================
- Since +x was rewritten, the ban bug is 100% fixed. :)
- Rewrote +x hidden host function completely.
- Fixed FUNNY bug with hiddenhost and /who (Reported by Prod|gy)
- Added/Removed irc networks
- Fixed bug in /watch (Reported/Fixed by Despise)
- Added nick-change flood protection.
- Added an awesome manual... ./manual to run
- Removed /who notice for opers.
- Added protection of /akill *@* :)
- Removed java stuff completely. (Java clients are like normal IRC clients...right?)
- Added new +a mode. This mode can only be set by +q channel owners. When you are +a in a
channel, you cannot be deopped or kicked. (Syntax: /mode #chan +a <nick>)
- Added new +q channel mode. ChanServ must set the channel founder +q so they are also
known as channel owners via the ircd. Channel owners are protected and may set
other users +a which they will also be protected (but not chan owners).
(Syntax: /mode #chan +q <nick>)
- Re-coded /MAP
- Changed GLINE notices from sendto_ops to send to all opers with +e flag on.
- Added (addnet) script, you can run this to add your net settings to the next release.
- Changed <server> to <ircnetwork> in whois "Blah is an oper on <server>"
- Added new +L channel mode. If a #chat has a limit (+l) of 10 users, and +L set to channel
#chat2, when a user trys to join #chat, they won't get "#chat is full", they will be
auto-joined to #chat2 - (Linked channels in other words).
(Syntax: /mode #chan +L <linked chan>)
- Changes user@shadow-33.com to user@user-33.one.com (noone will know one.com is the realhost)
- Changed +x for IP's from (x.x.x.***) to (x.x.x.network-#)
- In oline flags * will introduce +e on oper up. (before: required +e in oline flag)
- Removed +t usermode (UMODE_ALL) - wasn't used.
- Made 'create your own network setting' feature more stable.
- Added new channel mode (+x) to disable colored text in channel.
- Added +C (Co Administrator)
- Added +T (Technical Administrator)
- Changed /map to numerics...
- Made startup message when booting more stable.
Version Elite1.3 (02/23/99)
============================
- Cleaned up version.c.SH
- Added new net settings (netdomain & helpchan)
- Added new net config creator in ./Config
- Made ./Config more easier...
- Created new usermode +j (Java user)
- New hostname (java.shadownet.org) for java users.
- Removed RUN_SERVICES code from entire ircd.
Version Elite1.2.4 (02/14/99)
============================
- Fixed the nick crash bug! (damn m_kill small error)
- New network(s) added.
- Changed one thing in m_gline (nothing big)
Version Elite1.2.3 (02/10/99)
============================
- Removed SOCKS checking. (possibly cause of crashing)
- Added new networks
Version Elite1.2.2 (02/02/99)
============================
- Fixed the crashing bug. (Changing nicks with linked servers)
- Modified AceStar net settings.
- Q-line notices are back (except for ULined clients).
- Fixed /kill bug with services.
Version Elite1.2.1 (01/29/99)
============================
- Fixed multiple notices from +N / -N
- Added some text to s_err.c
- Possibly fixed the odd crashing... ?
Version Elite1.2 (01/24/99)
============================
- Netadmin can be used via +N in the oline slot now.
- When +N is executed, net-wide oper msg's are sent about it.
- Completely removed the freeze function (it's a toy unlike a command)
- Changed abit of the GLINE adding notice.
- Added logging to a file for glines (gline.log)
- Implemented SOCKS checking (thx Rhom).
- Changed channel lists only when 2 ppl in chan to 1.
- Changed sendto_ops function in many places in s_user.c/s_serv.c to
sendto_locfailops.
- Changed GNOTICE in s_user.c/s_serv.c to GLOBOPS
- Fixed hiddenhost bug with /kill (+w could see real host of oper)
- Fixed hiddenhost bug with /oper (+s could see real host of oper)
[Special thanks goes out to Rhom for reporting/help patch bugs]
Version Elite1.1.1 (12/12/98)
=============================
- Fixed /whois bug (had problems with mIRC clients *sigh*)
- Fixed /topic bug (didn't allow topic changes at all.)
Version Elite1.1 (12/6/98)
============================
- Fixed ./Config script (Net select)
- Fixed /remgline bug.
- If ULined clients, channels are not shown which they are in.
- Fixed +e / +t / +b (non-opers could get +et before)
- Fixed OperMode notice.
- Fixed Gline sending extra Global on expire.
- Fixed /whowas wrong hostname bug (by Thiago)
- Fixed chkconf ZLINE error (by matt)
- Added PhazeNet configuration
- Added option for auto +x in ./Config
- Freeze was disabled in this version (It will be back in 1.2)
Version Elite1.0 (09/20/98)
============================
- Changed Shadow3.9 to Elite1.0 (Starting a new IRCD)
- Changed some numeric's around in src/s_err.c
- Auto +x on Oper up.
- Fixed small error in ./ircd script.
- Made ./Config more Linux-redhat friendly.
- Added RelicNet to the ircd.
- include/config.h is much more compatible with all IRC nets.
- Added /gline (works 100%) [/gline <user@host> <seconds> <reason>].
- Fixed up /map.
- Added UMODE's +e & +t
* e: EYES [Can see ppl who /whois, and other notices.]
* t: ALL [See's all net notices ie: See's all Client connectings...]
- Fixed the hiddenhost bug with IP's...
- Fixed major bug with hiddenhost which caused coredump.
- Made a new script (makeconf) -- generates the ircd.conf file.
+233
View File
@@ -0,0 +1,233 @@
/*
* UnrealIRCd Config File - Example for irc.fyremoon.net
*/
// Information about me
me {
// My IRC server name
name "irc.fyremoon.net";
// My infoline
info "Forever is gonna start tonight";
// My numeric
numeric 13;
};
// Who is my admin?
admin {
/* You can put as many lines as you want here */
"Carsten Munk";
"Stskeeps";
"stskeeps@tspre.org";
};
/* We use class names now :)*/
class clients
{
/* How often to ping the user */
pingfreq 90;
/* How many clients allowed in class*/
maxclients 900;
/* Maximum SendQueue */
sendq 100000;
};
class servers
{
pingfreq 90;
maxclients 1;
sendq 1000000;
};
/* The old I:lines */
allow {
/* username mask*/
user *;
/* ip mask */
ip *;
/* hostmask */
hostname *;
/* what class to put them in */
class clients;
// Leave out password to make it passwordless
/* Password to require */
password "moocowsrule";
};
/* /oper <login> (oper <login>)*/
oper stskeeps {
/* What class to put oper in upon opering */
class clients;
/* What userhost masks to allow the IRCop to come from */
from {
userhost *@the.elite-hacker.cx;
userhost *@*.image.dk;
};
/* Password to require */
password "moocow";
/* We use named flags now :) */
flags
{
netadmin;
global;
};
};
/* P:lines, we listen here on IP 127.0.0.1 port 6667 */
listen *:6601
{
options
{
ssl;
serversonly;
};
};
listen *:8067;
listen *:6600;
link irc.hs-bremen.de /* servername */
{
username *; /* usermask */
hostname 194.94.24.40; /* hostmask */
bind-ip *; /* What IP to bind to when connecting */
port 7151; /* What port to connect to, if any */
hub *; /* Is this a hub and what servermasks may it bring in */
// leaf *;
// leaf-depth 2;
password-connect "tdx6667";
password-recieve "tdx6667";
/* for later: class-connect, class-recieve */
class servers;
// rsa-auth "path.to.public.key";
options {
autoconnect;
ssl;
zip;
};
};
/* As many as you like */
ulines {
services.roxnet.org;
stats.roxnet.org;
};
drpass {
restart "time-to-restart"; /* Password to use for /restart */
die "killme"; /* Password to use for /die */
};
/*
* The old T:lines. We however also can use this as auto-join per .domain
*/
tld {
mask *@*.fr;
motd "ircd.motd.fr";
rules "ircd.rules.fr";
};
/* The old nick Q:lines :) */
ban nick {
mask "*C*h*a*n*S*e*r*v*";
reason "Reserved for Services";
};
/* The old Z:lines */
ban ip { mask 195.86.232.81; reason "Delinked server"; };
/* The old server Q:lines */
ban server {
mask eris.berkeley.edu;
reason "Get out of here.";
};
/* The wonderful K:lines */
ban user { mask *tirc@*.saturn.bbn.com; reason "Idiot"; };
/* Bans Realnames, the old n:lines */
ban realname {
mask "Swat Team";
reason "mIRKFORCE";
};
ban realname {
mask "sub7server";
reason "sub7";
};
/* Do not ban Stskeeps
* The old E:lines
*/
except ban {
mask *stskeeps@212.*;
};
/* savage-r.*
* the old e: lines
*/
except socks {
mask 216.73.27.177;
};
/* Old vhost.conf */
vhost {
vhost i.hate.microsefrs.com;
userhost *@*.image.dk;
login stskeeps;
password techie;
};
/* You can include other configuration files */
// include "klines.conf";
// Network configuration
set {
network-name "ROXnet";
default-server "irc.roxnet.org";
services-name "services.roxnet.org";
stats-name "stats.roxnet.org";
help-channel "#ROXnet";
hiddenhost-prefix "rox";
prefix_quit "no";
/* on-oper host */
hosts {
local "locop.roxnet.org";
global "ircop.roxnet.org";
coadmin "coadmin.roxnet.org";
admin "admin.roxnet.org";
servicesadmin "csops.roxnet.org";
techadmin "techadmin.roxnet.org";
netadmin "netadmin.roxnet.org";
host-on-oper-up "no";
};
};
/* Server specific configuration */
set {
kline-address "stskeeps@roxnet.org";
modes-on-connect "+xwG";
oper-auto-join "#opers";
dns {
nameserver 127.0.0.1;
timeout 2s;
retries 2s;
};
options {
enable-opermotd;
enable-chatops;
hide-ulines;
webtv-support;
identd-check;
};
socks {
ban-message "Insecure SOCKS server";
quit-message "Insecure SOCKS server";
ban-time "4d";
};
maxchannelsperuser 10;
};
+1 -1
View File
@@ -15,7 +15,7 @@ copy the file "template.network" to the name you want to use for
your network file and edit it.
If you experince any problems email me at stskeeps@tspre.org
or try msg me at /server irc.global-irc.net : #UnrealIRCd
or try msg me at /server irc.roxnet.org, #unrealircd
My nick is mostly Stskeeps or Techie (or Nightwalker if i had a bad night:P)
--Stskeeps
+1 -1
View File
@@ -29,7 +29,7 @@
#include <winsock.h>
#include <process.h>
#include <io.h>
//#include "struct.h"
//#include "struct.h"
#endif
#include "dynconf.h"
#include "ircsprintf.h"
+24
View File
@@ -43,6 +43,28 @@ extern TS TSoffset;
/* Prototype added to force errors -- Barubary */
extern TS check_pings(TS now, int check_kills);
extern TS TS2ts(char *s);
/* newconf */
/*
* Configuration linked lists
*/
extern ConfigItem_me *conf_me;
extern ConfigItem_class *conf_class;
extern ConfigItem_admin *conf_admin;
extern ConfigItem_admin *conf_admin_tail;
extern ConfigItem_drpass *conf_drpass;
extern ConfigItem_ulines *conf_ulines;
extern ConfigItem_tld *conf_tld;
extern ConfigItem_oper *conf_oper;
extern ConfigItem_listen *conf_listen;
extern ConfigItem_allow *conf_allow;
extern ConfigItem_except *conf_except;
extern ConfigItem_vhost *conf_vhost;
extern ConfigItem_link *conf_link;
ConfigItem_class *Find_class(char *name);
ConfigItem_oper *Find_oper(char *name);
ConfigItem_listen *Find_listen(char *ipmask, int port);
ConfigItem_ulines *Find_uline(char *host);
/* Remmed out for win32 compatibility.. as stated of 467leaf win32 port.. */
@@ -351,3 +373,5 @@ extern char *inetntop(int af, const void *in, char *local_dummy,
char *crule_parse PROTO((char *));
int crule_eval PROTO((char *));
void crule_free PROTO((char **));
#define HASH_CHECK BASE_VERSION
+2 -2
View File
@@ -500,8 +500,8 @@ struct Message msgtab[] = {
{MSG_SVSNAME, m_chgname, 0, MAXPARA, TOK_CHGNAME, 0L},
{MSG_SHUN, m_shun, 0, MAXPARA, TOK_SHUN, 0L},
{MSG_NEWJOIN, m_join, 0, MAXPARA, TOK_JOIN, 0L},
{MSG_BOTSERV, m_botserv, 0, MAXPARA, TOK_BOTSERV,0L},
{TOK_BOTSERV, m_botserv, 0, MAXPARA, TOK_BOTSERV,0L},
{MSG_BOTSERV, m_botserv, 0, 1, TOK_BOTSERV,0L},
{TOK_BOTSERV, m_botserv, 0, 1, TOK_BOTSERV,0L},
{(char *)0, (int (*)())0, 0, 0, 0, 0L}
};
+1
View File
@@ -230,6 +230,7 @@
#define RPL_TRACENEWTYPE 208
#define RPL_TRACECLASS 209
#define RPL_STATSHELP 210
#define RPL_STATSLINKINFO 211
#define RPL_STATSCOMMANDS 212
#define RPL_STATSCLINE 213
+225 -1
View File
@@ -64,6 +64,29 @@ typedef struct t_vhost aVhost;
typedef struct SqlineItem aSqlineItem;
typedef struct aloopStruct LoopStruct;
typedef struct ConfItem aConfItem;
/* New Config Stuff */
typedef struct _configentry ConfigEntry;
typedef struct _configfile ConfigFile;
typedef struct _configflag ConfigFlag;
typedef struct _configflag_except ConfigFlag_except;
typedef struct _configflag_ban ConfigFlag_ban;
typedef struct _configitem ConfigItem;
typedef struct _configitem_me ConfigItem_me;
typedef struct _configitem_admin ConfigItem_admin;
typedef struct _configitem_class ConfigItem_class;
typedef struct _configitem_oper ConfigItem_oper;
typedef struct _configitem_oper_from ConfigItem_oper_from;
typedef struct _configitem_drpass ConfigItem_drpass;
typedef struct _configitem_ulines ConfigItem_ulines;
typedef struct _configitem_tld ConfigItem_tld;
typedef struct _configitem_listen ConfigItem_listen;
typedef struct _configitem_allow ConfigItem_allow;
typedef struct _configitem_vhost ConfigItem_vhost;
typedef struct _configitem_except ConfigItem_except;
typedef struct _configitem_link ConfigItem_link;
typedef struct _configitem_ban ConfigItem_ban;
typedef struct Notify aNotify;
typedef struct Client aClient;
typedef struct Channel aChannel;
@@ -783,6 +806,7 @@ struct t_vhline {
#define LISTENER_JAVACLIENT 0x000010
#define LISTENER_MASK 0x000020
#define LISTENER_SSL 0x000040
#define LISTENER_BOUND 0x000080
#define CONNECT_SSL 0x000001
#define CONNECT_ZIP 0x000002
@@ -843,7 +867,7 @@ struct Client {
long receiveK; /* Statistics: total k-bytes received */
u_short sendB; /* counters to count upto 1-k lots of bytes */
u_short receiveB; /* sent and received. */
aClient *acpt; /* listening client which we accepted from */
aClient *listener;
Link *confs; /* Configuration record associated */
int authfd; /* fd for rfc931 authentication */
#ifdef SOCKSPORT
@@ -864,9 +888,206 @@ struct Client {
#endif
};
#define CLIENT_LOCAL_SIZE sizeof(aClient)
#define CLIENT_REMOTE_SIZE offsetof(aClient,count)
/*
* conf2 stuff -stskeeps
*/
/* Config flags */
struct _configfile
{
char *cf_filename;
ConfigEntry *cf_entries;
ConfigFile *cf_next;
};
struct _configentry
{
ConfigFile *ce_fileptr;
int ce_varlinenum;
char *ce_varname;
char *ce_vardata;
int ce_vardatanum;
int ce_fileposstart;
int ce_fileposend;
int ce_sectlinenum;
ConfigEntry *ce_entries;
ConfigEntry *ce_prevlevel;
ConfigEntry *ce_next;
};
struct _configflag
{
unsigned temporary : 1;
};
/* configflag specialized for except socks/ban -Stskeeps */
struct _configflag_except
{
unsigned temporary : 1;
unsigned type : 1;
};
struct _configflag_ban
{
unsigned temporary : 1;
unsigned type : 4;
};
#define CONF_BAN_NICK 1
#define CONF_BAN_IP 2
#define CONF_BAN_SERVER 3
#define CONF_BAN_USER 4
#define CONF_BAN_REALNAME 5
struct _configitem {
ConfigFlag flag;
ConfigItem *prev;
ConfigItem *next;
};
struct _configitem_me {
ConfigFlag flag;
ConfigItem *prev;
ConfigItem *next;
char *name;
char *info;
short numeric;
};
struct _configitem_admin {
ConfigFlag flag;
ConfigItem *prev;
ConfigItem *next;
char *line;
};
struct _configitem_class {
ConfigFlag flag;
ConfigItem *prev;
ConfigItem *next;
char *name;
int pingfreq;
int maxclients;
int sendq;
};
struct _configitem_allow {
ConfigFlag flag;
ConfigItem *prev;
ConfigItem *next;
char *user;
char *ip;
char *hostname;
char *password;
ConfigItem_class *class;
};
struct _configitem_oper {
ConfigFlag flag;
ConfigItem *prev;
ConfigItem *next;
char *name;
ConfigItem_class *class;
ConfigItem *from;
long oflags;
char *password;
};
struct _configitem_oper_from {
ConfigFlag flag;
ConfigItem *prev;
ConfigItem *next;
char *name;
};
struct _configitem_drpass {
ConfigFlag flag;
ConfigItem *prev;
ConfigItem *next;
char *restart;
char *die;
};
struct _configitem_ulines {
ConfigFlag flag;
ConfigItem *prev;
ConfigItem *next;
char *servername;
};
struct _configitem_tld {
ConfigFlag flag;
ConfigItem *prev;
ConfigItem *next;
char *mask;
char *motd;
char *rules;
};
struct _configitem_listen {
ConfigFlag flag;
ConfigItem *prev;
ConfigItem *next;
char *ip;
int port;
long options;
};
struct _configitem_vhost {
ConfigFlag flag;
ConfigItem *prev;
ConfigItem *next;
char *userhost;
char *login;
char *password;
char *virthost;
};
struct _configitem_link {
ConfigFlag flag;
ConfigItem *prev;
ConfigItem *next;
char *servername;
char *username;
char *hostname;
char *bindip;
short port;
char *hubmask;
char *leafmask;
unsigned char leafdepth;
char *connpwd;
char *recvpwd;
ConfigItem_class *class;
short options;
};
struct _configitem_except {
ConfigFlag_except flag;
ConfigItem *prev;
ConfigItem *next;
char *mask;
};
struct _configitem_ban {
ConfigFlag_ban flag;
ConfigItem *prev;
ConfigItem *next;
char *mask;
char *reason;
};
/*
* statistics structures
*/
@@ -1157,8 +1378,11 @@ extern char *gnulicense[];
#define FLUSH_BUFFER -2
#define COMMA ","
#ifdef USE_SSL
#include "ssl.h"
#endif
#define HASH_TEST HASH_CHECK
#endif /* __struct_include__ */
+5 -5
View File
@@ -25,13 +25,13 @@
/**/
#define COMPILEINFO DEBUGMODESET DEBUGSET
/*
* Version Unreal3.1-Silverheart+sf2
* Version Unreal3.2-Selene
*/
#define UnrealProtocol 2302
#define UnrealProtocol 2303
#define PATCH1 "3"
#define PATCH2 ".1"
#define PATCH3 ".1"
#define PATCH4 "-Darkshades"
#define PATCH2 ".2"
#define PATCH3 "-Selene"
#define PATCH4 "[DEVEL]"
#define PATCH5 ""
#define PATCH6 ""
#define PATCH7 ""
+2 -2
View File
@@ -28,7 +28,7 @@ echo "| |"
echo "| see ircd.log for more information |"
echo "|********************************************|"
echo "| If you can't get Unreal IRCd to work - go |"
echo "| to /server irc.flirt.org and join |"
echo "| to /server irc.fyremoon.net and join |"
echo "| #UnrealIRCd or mail us at |"
echo "| unreal-support@lists.sourceforge.net |"
echo "| |"
@@ -61,7 +61,7 @@ echo "| (4) Someone else is running an ircd on the |"
echo "| default port you chose in ircd.conf. |"
echo "|********************************************|"
echo "| If you can't get Unreal IRCd to work - go |"
echo "| to /server irc.flirt.org and join |"
echo "| to /server irc.fyremoon.net and join |"
echo "| #UnrealIRCd or mail us at |"
echo "| unreal-support@lists.sourceforge.net |"
echo "| |"
+1 -1
View File
@@ -19,7 +19,7 @@
# change this to the mail address to mail output to:
MAIL=me
# change this to the directory you run your ircd from:
dir="../"
dir="../src"
# change this to the name of your ircd's file in that directory:
ircdexe="ircd"
+3 -3
View File
@@ -8,12 +8,12 @@ Exp $
#
# change the filename to what network header file you use
# relative to DPATH
Include .................: networks/roxnet.network
Include .................: networks/unreal-test.network
#
# What K:Line address can K:lined users mail at?
#
Set KLINE_ADDRESS .......: lame.admin.needs.to.set.a.email
Set KLINE_ADDRESS .......: unreal-dev@lists.sourceforge.net
# If you want users to get auto +x on connect
# 1 = Yes 0 = No
@@ -41,7 +41,7 @@ Set TRUEHUB .............: 1
# The IRCd won't boot if not this setting set correctly
# RTFM and go thru the config file (this file)
# 1 = Yes 0 = No
Set CONFIG_FILE_STOP ....: 1
Set CONFIG_FILE_STOP ....: 0
#
# If to let non-opers do /stats O
+4 -1
View File
@@ -29,7 +29,7 @@ OBJS=agent.o aln.o badwords.o bsd.o channel.o class.o cloak.o crule.o dbuf.o dyn
s_bsd.o s_conf.o s_debug.o s_err.o s_extra.o s_kline.o \
s_misc.o s_numeric.o s_serv.o s_socks.o $(STRTOUL) ssl.o s_unreal.o \
s_user.o scache.o send.o support.o userload.o version.o webtv.o \
whowas.o zip.o
whowas.o zip.o s_conf2.o
# OBJS=bsd.o dbuf.o packet.o send.o match.o parse.o support.o channel.o \
# class.o hash.o ircd.o list.o res.o cloak.o s_auth.o s_bsd.o s_conf.o \
@@ -115,6 +115,9 @@ support.o: support.c $(INCLUDES)
userload.o: userload.c $(INCLUDES)
$(CC) $(CFLAGS) -c userload.c
s_conf2.o: s_conf2.c $(INCLUDES)
$(CC) $(CFLAGS) -c s_conf2.c
help.o: help.c $(INCLUDES)
$(CC) $(CFLAGS) -c help.c
+1 -1
View File
@@ -101,7 +101,7 @@ int deliver_it(cptr, str, len)
char *str;
{
int retval;
aClient *acpt = cptr->acpt;
aClient *acpt = cptr->listener;
#ifdef DEBUGMODE
writecalls++;
+20 -4
View File
@@ -1,5 +1,4 @@
/*
* Unreal Internet Relay Chat Daemon, src/channel.c
/* Unreal Internet Relay Chat Daemon, src/channel.c
* Copyright (C) 1990 Jarkko Oikarinen and
* University of Oulu, Co Center
*
@@ -626,7 +625,7 @@ int can_send(cptr, chptr, msgtext)
{
Link *lp;
int member;
static char tempbuf[1500];
/* Moved check here, kinda faster.
* Note IsULine only uses the other parameter. -Donwulff */
if (IsULine(cptr) || IsServer(cptr))
@@ -647,7 +646,18 @@ int can_send(cptr, chptr, msgtext)
(!lp
|| !(lp->flags & (CHFL_CHANOP | CHFL_VOICE | CHFL_CHANOWNER |
CHFL_HALFOP | CHFL_CHANPROT))))
return (CANNOT_SEND_MODERATED);
{
if (!(chptr->mode.mode & MODE_AUDITORIUM))
{
return (CANNOT_SEND_MODERATED);
}
{
sendto_chanops_butone(cptr, chptr, ":IRC PRIVMSG %s :%s: %s",
chptr->chname, cptr->name,
msgtext);
return (CANNOT_SEND_MODERATED);
}
}
if (chptr->mode.mode & MODE_NOCTCP &&
(!lp
@@ -3487,6 +3497,12 @@ int m_topic(cptr, sptr, parc, parv)
if (!topic) /* only asking for topic */
{
if ((chptr->mode.mode & MODE_OPERONLY && !IsAnOper(sptr) && !IsMember(sptr, chptr)) ||
(chptr->mode.mode & MODE_ADMONLY && !IsAdmin(sptr) && !IsMember(sptr, chptr)) ||
(is_banned(sptr,sptr,chptr) && !IsAnOper(sptr) && !IsMember(sptr, chptr))) {
sendto_one(sptr, err_str(ERR_NOTONCHANNEL), me.name, parv[0], name);
return;
}
if (!chptr->topic)
sendto_one(sptr, rpl_str(RPL_NOTOPIC),
me.name, parv[0], chptr->chname);
+5 -1
View File
@@ -529,12 +529,16 @@ void doneconf(int type)
if (!KLINE_ADDRESS || (*KLINE_ADDRESS == '\0'))
strcat(errormsg, "- Missing KLINE_ADDRESS\n");
#ifndef DEVELOP
if (KLINE_ADDRESS)
if (KLINE_ADDRESS)
if (!strchr(KLINE_ADDRESS, '@') && !strchr(KLINE_ADDRESS, ':'))
{
strcat(errormsg,
"- KLINE_ADDRESS is not an e-mail or an URL\n");
}
else if (!match("*@unrealircd.com", KLINE_ADDRESS) || !match("*@unrealircd.org",KLINE_ADDRESS) || !match("unreal-*@lists.sourceforge.net",KLINE_ADDRESS))
strcat(errormsg,
"- KLINE_ADDRESS may not be an UnrealIRCd Team address\n");
#endif
if ((MAXCHANNELSPERUSER < 1))
strcat(errormsg,
+1 -1
View File
@@ -164,7 +164,7 @@ unsigned int hash_whowas_name(char *name)
void clear_client_hash_table()
{
char hashcheck[] = {85, 110, 114, 101, 97, 108, 0};
if (strcmp(BASE_VERSION, hashcheck))
if (strcmp(HASH_TEST, hashcheck))
abort();
memset((char *)clientTable, '\0', sizeof(aHashEntry) * U_MAX);
+22 -12
View File
@@ -126,6 +126,7 @@ int noisy_htm = 1;
TS check_fdlists();
#endif
unsigned char conf_debuglevel = 0;
void save_stats(void)
{
@@ -616,7 +617,7 @@ extern TS check_pings(TS currenttime, int check_kills)
("No response from %s, closing link",
get_client_name(cptr, FALSE));
sendto_serv_butone(&me,
":%s GNOTICE :No response from %s, closing link",
":%s GLOBOPS :No response from %s, closing link",
me.name, get_client_name(cptr,
FALSE));
}
@@ -880,6 +881,9 @@ int InitwIRCD(argc, argv)
MB_OK);
#endif
exit(0);
case 'C':
conf_debuglevel = atoi(p);
break;
case 'x':
#ifdef DEBUGMODE
# ifndef _WIN32
@@ -1001,6 +1005,8 @@ int InitwIRCD(argc, argv)
initwhowas();
initstats();
booted = FALSE;
init_conf2("unrealircd.conf");
report_configuration();
init_dynconf();
load_conf(ZCONF, 0);
doneconf(0);
@@ -1076,18 +1082,21 @@ int InitwIRCD(argc, argv)
#endif
exit(-1);
}
if (1)
{
aConfItem *aconf;
if ((aconf = find_me()) && portarg <= 0 && aconf->port > 0)
portnum = aconf->port;
Debug((DEBUG_ERROR, "Port = %d", portnum));
if (inetport(&me, aconf->passwd, portnum))
exit(1);
}
else if (inetport(&me, "*", 0))
/* Put in our info */
strncpyzt(me.info, conf_me->info, sizeof(me.info));
strncpyzt(me.name, conf_me->name, sizeof(me.name));
/* We accept the first listen record */
portnum = conf_listen->port;
me.ip.S_ADDR = *conf_listen->ip != '*' ? inet_addr(conf_listen->ip) : INADDR_ANY;
Debug((DEBUG_ERROR, "Port = %d", portnum));
if (inetport(&me, conf_listen->ip, portnum))
exit(1);
conf_listen->options |= LISTENER_BOUND;
me.umodes = conf_listen->options;
ircd_log("* Bound to %s:%i\n", conf_listen->ip, conf_listen->port);
run_configuration();
botmotd = (aMotd *) read_botmotd(BPATH);
rules = (aMotd *) read_rules(RPATH);
opermotd = (aMotd *) read_opermotd(OPATH);
@@ -1108,6 +1117,7 @@ int InitwIRCD(argc, argv)
#endif
me_hash = find_or_add(me.name);
me.serv->up = me_hash;
me.serv->numeric = conf_me->numeric;
add_server_to_table(&me);
me.lasttime = me.since = me.firsttime = TStime();
(void)add_to_client_hash_table(me.name, &me);
+424 -424
View File
@@ -1,424 +1,424 @@
/*
* Ok, this may not make sence to many, but it is, i do beleve time that we
* stopped hacking the irc server and protocall, which was written MANY moons
* ago, and should take the initiative, and stop using code thats 20 odd years
* old. Just to explain, when the original ircd was written, the host OS did
* not (usually) have functions such as gethostbyaddres() and gethostbyname()
* and as a result we have a fully fleged caching name server sitting in the
* server, which now doesnt work on win32 platforms, and seems dogey else where
* so this is an attempt to write it all in 1 file (plus a headder) using
* moddern functions, which all platforms now have !
*
* David Flynn (September 2000)
*
* This code is Copyright (C) the Unreal Development team
* (C) David Flynn (Sept 2000)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 1, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
/************************************************************/
/** WARNING :: WE ARE NOT LOOKING UP CACHED NAMES (YET) !! **/
/************************************************************/
/* Firstly, as this is a first version and i dont know how it is going to work
* we will possibly have some caching support, but done in the simplest (possibly
* best solution)
*/
/*
* Things to note: The windows version of gethostbyaddr/name () uses a STATIC variable
* to return to ... ie It reuses what it returned last time each time it is called !!!
*/
#ifndef _WIN32
#include <netdb.h>
#include <sys/socket.h>
#else /*_WIN32*/
#include <winsock2.h>
#include <windows.h>
#endif /*_WIN32*/
#include "struct.h"
/* These are because we havnt included the ircd's h files*/
extern char REPORT_FIN_DNS[128];
extern int R_fin_dns;
/* end */
typedef struct dnamecache
{
unsigned long int ipaddr;
struct hostent *cachedhost;
struct dnamecache *next;
struct dnamecache *prev;
}
DNSCache;
DNSCache *first;
DNSCache *last;
/*Prototypes*/
void newdns_lookupfromip(int);
struct hostent *newdns_checkcacheip(aClient *);
struct hostent *newdns_checkcachename(char *);
struct hostent *newdns_checkcachename(char *name)
{
struct hostent *retval;
/* Funnily enough, i am not (at the moment) going to cache this ... */
retval = gethostbyname(name);
return (retval);
}
struct hostent *newdns_checkcacheip(aClient *ac)
{
DNSCache *i;
int sendon=0;
unsigned long int ipaddr = ac->ip.s_addr;
SetDNS(ac);
/* search through the cached names */
/* if (first)
for(i=first; i ;i=i->next)
{
if (ipaddr == i->ipaddr)
{
/* Whoopy Do ... we have found a cached name !!! lets return it*/
// ac->hostp = i->cachedhost;
// ClearDNS(ac);
// return i->cachedhost;
// }
// }
/* if we are here, then we either havnt got a cache table, OR, the look up wasnt successfull */
sendon = ac;
_beginthread(newdns_lookupfromip, 0, sendon); /* Start us up a thread */
return (NULL);
}
//TODO::ADD Time Lookup functions ... for debug ... to see how long the DNS took !
#ifdef _WIN32
void newdns_lookupfromip(int senton)
{
DNSCache *i;
int ic; /*My GP pointer*/
struct hostent *resolvedhost; /* What we will eventually return*/
/*filled in by gethostbyaddr() */
aClient * ac=senton; /* We are given the address of the struct, as i am a mong, i
* I managed to differenciate the pointer twice .. hence the
* / *** / 's That was a bugger ... anyway this all works*/
unsigned long int ipaddr = (ac)->ip.s_addr;
CRITICAL_SECTION critsec;
InitializeCriticalSection(&critsec);
EnterCriticalSection(&critsec);
/*We will need to check for cached names first, but code that second*/
resolvedhost = gethostbyaddr(&(*ac).ip,4,AF_INET);
/*ok we need to check if we actually managed to recieve anything*/
if (!resolvedhost) /*Ie its NULL*/
{
int e = WSAGetLastError();
//windebug(WINDEBUG_FORCE,"newdns_lookupfromip: WSAGetLastError=%d",e);
switch (h_errno)
{
case HOST_NOT_FOUND :
break;
case NO_ADDRESS :
break;
case NO_RECOVERY :
break;
case TRY_AGAIN :
break;
}
_endthread();
}
/* if we are here, then all went well, so lets add the thing to the */
/* Check that no one is fiddling with this ... if they are, wait for them to stop */
{
if (!first) /*For the first time, ie when we have not created our cache */
{
/* we need to initialize the list */
last = first = malloc(sizeof(struct dnamecache));
/* Put in the ipaddress ... we search using that */
last->ipaddr = ipaddr;
/* Allocate memory for the hostent */
last->cachedhost = malloc(sizeof(struct hostent));
/* Copy it */
last->cachedhost->h_name = malloc(strlen(resolvedhost->h_name));
memcpy (last->cachedhost->h_name, resolvedhost->h_name, strlen(resolvedhost->h_name));
if(*resolvedhost->h_aliases)
{
last->cachedhost->h_aliases = malloc(strlen(*resolvedhost->h_aliases));
memcpy (&last->cachedhost->h_aliases,&resolvedhost->h_aliases,
strlen(*resolvedhost->h_aliases));
}
last->cachedhost->h_addrtype = resolvedhost->h_addrtype;
last->cachedhost->h_length = resolvedhost->h_length;
last->cachedhost->h_addr_list = malloc(/*resolvedhost->h_length*/4);
for( ic=0; resolvedhost->h_addr_list[ic] != NULL ;ic++)
{
last->cachedhost->h_addr_list[ic]= malloc(4);
memcpy(*(last->cachedhost->h_addr_list), resolvedhost->h_addr_list[ic],resolvedhost->h_length);
}
/*memcpy (&last->cachedhost->h_addr_list, &resolvedhost->h_addr_list, resolvedhost->h_length); */
(ac)->hostp= last->cachedhost;
#ifdef SHOWCONNECTINFO
send((ac)->fd, REPORT_FIN_DNS, R_fin_dns, 0);
#endif
ClearDNS(ac);
if (!DoingAuth(ac))
SetAccess(ac);
LeaveCriticalSection(&critsec);
_endthread();
return;
}
if (!last->next) /*If we have already initialised the cache, and point to the end*/
{
/* we need to initialize the list */
last->next = malloc(sizeof(struct dnamecache));
last->next->prev = last;
last = last->next;
/* Put in the ipaddress ... we search using that */
last->ipaddr = ipaddr;
/* Allocate memory for the hostent */
last->cachedhost = malloc(sizeof(struct hostent));
/* Copy it */
last->cachedhost->h_name = malloc(strlen(resolvedhost->h_name));
memcpy (last->cachedhost->h_name, resolvedhost->h_name, strlen(resolvedhost->h_name));
if(*resolvedhost->h_aliases)
{
last->cachedhost->h_aliases = malloc(strlen(*resolvedhost->h_aliases));
memcpy (&last->cachedhost->h_aliases,&resolvedhost->h_aliases, strlen(*resolvedhost->h_aliases));
}
last->cachedhost->h_addrtype = resolvedhost->h_addrtype;
last->cachedhost->h_length = resolvedhost->h_length;
last->cachedhost->h_addr_list = malloc(/*resolvedhost->h_length*/4);
for( ic=0; resolvedhost->h_addr_list[ic] != NULL ;ic++)
{
last->cachedhost->h_addr_list[ic]= malloc(4);
memcpy(*(last->cachedhost->h_addr_list), resolvedhost->h_addr_list[ic],resolvedhost->h_length);
}
/*memcpy (&last->cachedhost->h_addr_list, &resolvedhost->h_addr_list, resolvedhost->h_length);*/
(ac)->hostp= last->cachedhost;
#ifdef SHOWCONNECTINFO
send((ac)->fd, REPORT_FIN_DNS, R_fin_dns, 0);
#endif
ClearDNS(ac);
if (!DoingAuth(ac))
SetAccess(ac);
LeaveCriticalSection(&critsec);
_endthread();
return;
}
LeaveCriticalSection(&critsec);
_endthread();
}
/*Shit ... we have a problem if we reach here !!!*/
}
#else /*_WIN32*/
void newdns_lookupfromip(int senton)
{
DNSCache *i;
struct hostent *resolvedhost; /* What we will eventually return*/
/*filled in by gethostbyaddr() */
aClient * ac=senton; /* We are given the address of the struct, as i am a mong, i
* I managed to differenciate the pointer twice .. hence the
* / *** / 's That was a bugger ... anyway this all works*/
unsigned long int ipaddr = (/ac)->ip.s_addr;
/*We will need to check for cached names first, but code that second*/
resolvedhost = gethostbyaddr(&(*ac).ip,4,AF_INET);
/*ok we need to check if we actually managed to recieve anything*/
if (!resolvedhost) /*Ie its NULL*/
{
switch (h_errno)
{
case HOST_NOT_FOUND :
break;
case NO_ADDRESS :
break;
case NO_RECOVERY :
break;
case TRY_AGAIN :
break;
}
_endthread();
}
/* if we are here, then all went well, so lets add the thing to the */
/* Check that no one is fiddling with this ... if they are, wait for them to stop */
{
CRITICAL_SECTION critsec;
InitializeCriticalSection(&critsec);
EnterCriticalSection(&critsec);
/* Set the Make Safe directive, so that nothing else fiddles with the thing while we do ..*/
if (!first) /*For the first time, ie when we have not created our cache */
{
/* we need to initialize the list */
last = first = malloc(sizeof(struct dnamecache));
/* Put in the ipaddress ... we search using that */
last->ipaddr = ipaddr;
/* Allocate memory for the hostent */
last->cachedhost = malloc(sizeof(struct hostent));
/* Copy it */
last->cachedhost->h_name = malloc(strlen(resolvedhost->h_name));
memcpy (last->cachedhost->h_name, resolvedhost->h_name, strlen(resolvedhost->h_name));
if(*resolvedhost->h_aliases)
{
last->cachedhost->h_aliases = malloc(strlen(*resolvedhost->h_aliases));
memcpy (&last->cachedhost->h_aliases,&resolvedhost->h_aliases,
strlen(*resolvedhost->h_aliases));
}
last->cachedhost->h_addrtype = resolvedhost->h_addrtype;
last->cachedhost->h_length = resolvedhost->h_length;
last->cachedhost->h_addr_list = malloc(resolvedhost->h_length);
memcpy (&last->cachedhost->h_addr_list, &resolvedhost->h_addr_list, resolvedhost->h_length);
(ac)->hostp= last->cachedhost;
#ifdef SHOWCONNECTINFO
write((ac)->fd, REPORT_FIN_DNS, R_fin_dns);
#endif
ClearDNS(ac);
if (!DoingAuth(ac))
SetAccess(ac);
LeaveCriticalSection(&critsec);
_endthread();
return;
}
if (!last->next) /*If we have already initialised the cache, and point to the end*/
{
/* we need to initialize the list */
last->next = malloc(sizeof(struct dnamecache));
last->next->prev = last;
last = last->next;
/* Put in the ipaddress ... we search using that */
last->ipaddr = ipaddr;
/* Allocate memory for the hostent */
last->cachedhost = malloc(sizeof(struct hostent));
/* Copy it */
last->cachedhost->h_name = malloc(strlen(resolvedhost->h_name));
memcpy (last->cachedhost->h_name, resolvedhost->h_name, strlen(resolvedhost->h_name));
if(*resolvedhost->h_aliases)
{
last->cachedhost->h_aliases = malloc(strlen(*resolvedhost->h_aliases));
memcpy (&last->cachedhost->h_aliases,&resolvedhost->h_aliases, strlen(*resolvedhost->h_aliases));
}
last->cachedhost->h_addrtype = resolvedhost->h_addrtype;
last->cachedhost->h_length = resolvedhost->h_length;
last->cachedhost->h_addr_list = malloc(resolvedhost->h_length);
memcpy (&last->cachedhost->h_addr_list, &resolvedhost->h_addr_list, resolvedhost->h_length);
(ac)->hostp= last->cachedhost;
#ifdef SHOWCONNECTINFO
write((ac)->fd, REPORT_FIN_DNS, R_fin_dns);
#endif
ClearDNS(ac);
if (!DoingAuth(ac))
SetAccess(ac);
LeaveCriticalSection(&critsec);
_endthread();
return;
}
LeaveCriticalSection(&critsec);
_endthread();
}
/*Shit ... we have a problem if we reach here !!!*/
}
#endif /*_WIN32*/
/*
* Ok, this may not make sence to many, but it is, i do beleve time that we
* stopped hacking the irc server and protocall, which was written MANY moons
* ago, and should take the initiative, and stop using code thats 20 odd years
* old. Just to explain, when the original ircd was written, the host OS did
* not (usually) have functions such as gethostbyaddres() and gethostbyname()
* and as a result we have a fully fleged caching name server sitting in the
* server, which now doesnt work on win32 platforms, and seems dogey else where
* so this is an attempt to write it all in 1 file (plus a headder) using
* moddern functions, which all platforms now have !
*
* David Flynn (September 2000)
*
* This code is Copyright (C) the Unreal Development team
* (C) David Flynn (Sept 2000)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 1, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
/************************************************************/
/** WARNING :: WE ARE NOT LOOKING UP CACHED NAMES (YET) !! **/
/************************************************************/
/* Firstly, as this is a first version and i dont know how it is going to work
* we will possibly have some caching support, but done in the simplest (possibly
* best solution)
*/
/*
* Things to note: The windows version of gethostbyaddr/name () uses a STATIC variable
* to return to ... ie It reuses what it returned last time each time it is called !!!
*/
#ifndef _WIN32
#include <netdb.h>
#include <sys/socket.h>
#else /*_WIN32*/
#include <winsock2.h>
#include <windows.h>
#endif /*_WIN32*/
#include "struct.h"
/* These are because we havnt included the ircd's h files*/
extern char REPORT_FIN_DNS[128];
extern int R_fin_dns;
/* end */
typedef struct dnamecache
{
unsigned long int ipaddr;
struct hostent *cachedhost;
struct dnamecache *next;
struct dnamecache *prev;
}
DNSCache;
DNSCache *first;
DNSCache *last;
/*Prototypes*/
void newdns_lookupfromip(int);
struct hostent *newdns_checkcacheip(aClient *);
struct hostent *newdns_checkcachename(char *);
struct hostent *newdns_checkcachename(char *name)
{
struct hostent *retval;
/* Funnily enough, i am not (at the moment) going to cache this ... */
retval = gethostbyname(name);
return (retval);
}
struct hostent *newdns_checkcacheip(aClient *ac)
{
DNSCache *i;
int sendon=0;
unsigned long int ipaddr = ac->ip.s_addr;
SetDNS(ac);
/* search through the cached names */
/* if (first)
for(i=first; i ;i=i->next)
{
if (ipaddr == i->ipaddr)
{
/* Whoopy Do ... we have found a cached name !!! lets return it*/
// ac->hostp = i->cachedhost;
// ClearDNS(ac);
// return i->cachedhost;
// }
// }
/* if we are here, then we either havnt got a cache table, OR, the look up wasnt successfull */
sendon = ac;
_beginthread(newdns_lookupfromip, 0, sendon); /* Start us up a thread */
return (NULL);
}
//TODO::ADD Time Lookup functions ... for debug ... to see how long the DNS took !
#ifdef _WIN32
void newdns_lookupfromip(int senton)
{
DNSCache *i;
int ic; /*My GP pointer*/
struct hostent *resolvedhost; /* What we will eventually return*/
/*filled in by gethostbyaddr() */
aClient * ac=senton; /* We are given the address of the struct, as i am a mong, i
* I managed to differenciate the pointer twice .. hence the
* / *** / 's That was a bugger ... anyway this all works*/
unsigned long int ipaddr = (ac)->ip.s_addr;
CRITICAL_SECTION critsec;
InitializeCriticalSection(&critsec);
EnterCriticalSection(&critsec);
/*We will need to check for cached names first, but code that second*/
resolvedhost = gethostbyaddr(&(*ac).ip,4,AF_INET);
/*ok we need to check if we actually managed to recieve anything*/
if (!resolvedhost) /*Ie its NULL*/
{
int e = WSAGetLastError();
//windebug(WINDEBUG_FORCE,"newdns_lookupfromip: WSAGetLastError=%d",e);
switch (h_errno)
{
case HOST_NOT_FOUND :
break;
case NO_ADDRESS :
break;
case NO_RECOVERY :
break;
case TRY_AGAIN :
break;
}
_endthread();
}
/* if we are here, then all went well, so lets add the thing to the */
/* Check that no one is fiddling with this ... if they are, wait for them to stop */
{
if (!first) /*For the first time, ie when we have not created our cache */
{
/* we need to initialize the list */
last = first = malloc(sizeof(struct dnamecache));
/* Put in the ipaddress ... we search using that */
last->ipaddr = ipaddr;
/* Allocate memory for the hostent */
last->cachedhost = malloc(sizeof(struct hostent));
/* Copy it */
last->cachedhost->h_name = malloc(strlen(resolvedhost->h_name));
memcpy (last->cachedhost->h_name, resolvedhost->h_name, strlen(resolvedhost->h_name));
if(*resolvedhost->h_aliases)
{
last->cachedhost->h_aliases = malloc(strlen(*resolvedhost->h_aliases));
memcpy (&last->cachedhost->h_aliases,&resolvedhost->h_aliases,
strlen(*resolvedhost->h_aliases));
}
last->cachedhost->h_addrtype = resolvedhost->h_addrtype;
last->cachedhost->h_length = resolvedhost->h_length;
last->cachedhost->h_addr_list = malloc(/*resolvedhost->h_length*/4);
for( ic=0; resolvedhost->h_addr_list[ic] != NULL ;ic++)
{
last->cachedhost->h_addr_list[ic]= malloc(4);
memcpy(*(last->cachedhost->h_addr_list), resolvedhost->h_addr_list[ic],resolvedhost->h_length);
}
/*memcpy (&last->cachedhost->h_addr_list, &resolvedhost->h_addr_list, resolvedhost->h_length); */
(ac)->hostp= last->cachedhost;
#ifdef SHOWCONNECTINFO
send((ac)->fd, REPORT_FIN_DNS, R_fin_dns, 0);
#endif
ClearDNS(ac);
if (!DoingAuth(ac))
SetAccess(ac);
LeaveCriticalSection(&critsec);
_endthread();
return;
}
if (!last->next) /*If we have already initialised the cache, and point to the end*/
{
/* we need to initialize the list */
last->next = malloc(sizeof(struct dnamecache));
last->next->prev = last;
last = last->next;
/* Put in the ipaddress ... we search using that */
last->ipaddr = ipaddr;
/* Allocate memory for the hostent */
last->cachedhost = malloc(sizeof(struct hostent));
/* Copy it */
last->cachedhost->h_name = malloc(strlen(resolvedhost->h_name));
memcpy (last->cachedhost->h_name, resolvedhost->h_name, strlen(resolvedhost->h_name));
if(*resolvedhost->h_aliases)
{
last->cachedhost->h_aliases = malloc(strlen(*resolvedhost->h_aliases));
memcpy (&last->cachedhost->h_aliases,&resolvedhost->h_aliases, strlen(*resolvedhost->h_aliases));
}
last->cachedhost->h_addrtype = resolvedhost->h_addrtype;
last->cachedhost->h_length = resolvedhost->h_length;
last->cachedhost->h_addr_list = malloc(/*resolvedhost->h_length*/4);
for( ic=0; resolvedhost->h_addr_list[ic] != NULL ;ic++)
{
last->cachedhost->h_addr_list[ic]= malloc(4);
memcpy(*(last->cachedhost->h_addr_list), resolvedhost->h_addr_list[ic],resolvedhost->h_length);
}
/*memcpy (&last->cachedhost->h_addr_list, &resolvedhost->h_addr_list, resolvedhost->h_length);*/
(ac)->hostp= last->cachedhost;
#ifdef SHOWCONNECTINFO
send((ac)->fd, REPORT_FIN_DNS, R_fin_dns, 0);
#endif
ClearDNS(ac);
if (!DoingAuth(ac))
SetAccess(ac);
LeaveCriticalSection(&critsec);
_endthread();
return;
}
LeaveCriticalSection(&critsec);
_endthread();
}
/*Shit ... we have a problem if we reach here !!!*/
}
#else /*_WIN32*/
void newdns_lookupfromip(int senton)
{
DNSCache *i;
struct hostent *resolvedhost; /* What we will eventually return*/
/*filled in by gethostbyaddr() */
aClient * ac=senton; /* We are given the address of the struct, as i am a mong, i
* I managed to differenciate the pointer twice .. hence the
* / *** / 's That was a bugger ... anyway this all works*/
unsigned long int ipaddr = (/ac)->ip.s_addr;
/*We will need to check for cached names first, but code that second*/
resolvedhost = gethostbyaddr(&(*ac).ip,4,AF_INET);
/*ok we need to check if we actually managed to recieve anything*/
if (!resolvedhost) /*Ie its NULL*/
{
switch (h_errno)
{
case HOST_NOT_FOUND :
break;
case NO_ADDRESS :
break;
case NO_RECOVERY :
break;
case TRY_AGAIN :
break;
}
_endthread();
}
/* if we are here, then all went well, so lets add the thing to the */
/* Check that no one is fiddling with this ... if they are, wait for them to stop */
{
CRITICAL_SECTION critsec;
InitializeCriticalSection(&critsec);
EnterCriticalSection(&critsec);
/* Set the Make Safe directive, so that nothing else fiddles with the thing while we do ..*/
if (!first) /*For the first time, ie when we have not created our cache */
{
/* we need to initialize the list */
last = first = malloc(sizeof(struct dnamecache));
/* Put in the ipaddress ... we search using that */
last->ipaddr = ipaddr;
/* Allocate memory for the hostent */
last->cachedhost = malloc(sizeof(struct hostent));
/* Copy it */
last->cachedhost->h_name = malloc(strlen(resolvedhost->h_name));
memcpy (last->cachedhost->h_name, resolvedhost->h_name, strlen(resolvedhost->h_name));
if(*resolvedhost->h_aliases)
{
last->cachedhost->h_aliases = malloc(strlen(*resolvedhost->h_aliases));
memcpy (&last->cachedhost->h_aliases,&resolvedhost->h_aliases,
strlen(*resolvedhost->h_aliases));
}
last->cachedhost->h_addrtype = resolvedhost->h_addrtype;
last->cachedhost->h_length = resolvedhost->h_length;
last->cachedhost->h_addr_list = malloc(resolvedhost->h_length);
memcpy (&last->cachedhost->h_addr_list, &resolvedhost->h_addr_list, resolvedhost->h_length);
(ac)->hostp= last->cachedhost;
#ifdef SHOWCONNECTINFO
write((ac)->fd, REPORT_FIN_DNS, R_fin_dns);
#endif
ClearDNS(ac);
if (!DoingAuth(ac))
SetAccess(ac);
LeaveCriticalSection(&critsec);
_endthread();
return;
}
if (!last->next) /*If we have already initialised the cache, and point to the end*/
{
/* we need to initialize the list */
last->next = malloc(sizeof(struct dnamecache));
last->next->prev = last;
last = last->next;
/* Put in the ipaddress ... we search using that */
last->ipaddr = ipaddr;
/* Allocate memory for the hostent */
last->cachedhost = malloc(sizeof(struct hostent));
/* Copy it */
last->cachedhost->h_name = malloc(strlen(resolvedhost->h_name));
memcpy (last->cachedhost->h_name, resolvedhost->h_name, strlen(resolvedhost->h_name));
if(*resolvedhost->h_aliases)
{
last->cachedhost->h_aliases = malloc(strlen(*resolvedhost->h_aliases));
memcpy (&last->cachedhost->h_aliases,&resolvedhost->h_aliases, strlen(*resolvedhost->h_aliases));
}
last->cachedhost->h_addrtype = resolvedhost->h_addrtype;
last->cachedhost->h_length = resolvedhost->h_length;
last->cachedhost->h_addr_list = malloc(resolvedhost->h_length);
memcpy (&last->cachedhost->h_addr_list, &resolvedhost->h_addr_list, resolvedhost->h_length);
(ac)->hostp= last->cachedhost;
#ifdef SHOWCONNECTINFO
write((ac)->fd, REPORT_FIN_DNS, R_fin_dns);
#endif
ClearDNS(ac);
if (!DoingAuth(ac))
SetAccess(ac);
LeaveCriticalSection(&critsec);
_endthread();
return;
}
LeaveCriticalSection(&critsec);
_endthread();
}
/*Shit ... we have a problem if we reach here !!!*/
}
#endif /*_WIN32*/
+3 -3
View File
@@ -70,7 +70,7 @@ int dopacket(cptr, buffer, length)
{
char *ch1;
char *ch2;
aClient *acpt = cptr->acpt;
aClient *acpt = cptr->listener;
me.receiveB += length; /* Update bytes received */
cptr->receiveB += length;
@@ -112,8 +112,8 @@ int dopacket(cptr, buffer, length)
*ch1 = '\0';
me.receiveM += 1; /* Update messages received */
cptr->receiveM += 1;
if (cptr->acpt != &me)
cptr->acpt->receiveM += 1;
if (cptr->listener != &me)
cptr->listener->receiveM += 1;
cptr->count = 0; /* ...just in case parse returns with
** FLUSH_BUFFER without removing the
** structure pointed by cptr... --msa
+1 -1
View File
@@ -28,7 +28,7 @@ static char sccsid[] = "@(#)res_comp.c 6.18 (Berkeley) 6/27/90";
#include "nameser.h"
//ID_CVS("$Id$");
//ID_CVS("$Id$");
static dn_find();
+72 -27
View File
@@ -224,6 +224,43 @@ void report_error(text, cptr)
return;
}
void report_baderror(text, cptr)
char *text;
aClient *cptr;
{
#ifndef _WIN32
int errtmp = errno; /* debug may change 'errno' */
#else
int errtmp = WSAGetLastError(); /* debug may change 'errno' */
#endif
char *host;
int err, len = sizeof(err);
host = (cptr) ? get_client_name(cptr, FALSE) : "";
/* fprintf(stderr, text, host, strerror(errtmp));
fputc('\n', stderr); */
Debug((DEBUG_ERROR, text, host, strerror(errtmp)));
/*
* Get the *real* error from the socket (well try to anyway..).
* This may only work when SO_DEBUG is enabled but its worth the
* gamble anyway.
*/
#ifdef SO_ERROR
if (cptr && !IsMe(cptr) && cptr->fd >= 0)
if (!getsockopt(cptr->fd, SOL_SOCKET, SO_ERROR,
(OPT_TYPE *)&err, &len))
if (err)
errtmp = err;
#endif
sendto_umode(UMODE_OPER, text, host, strerror(errtmp));
#ifdef USE_SYSLOG
syslog(LOG_WARNING, text, host, strerror(errtmp));
#endif
return;
}
/*
* inetport
*
@@ -368,7 +405,7 @@ int add_listener(aconf)
cptr = make_client(NULL, NULL);
cptr->flags = FLAGS_LISTEN;
cptr->acpt = cptr;
cptr->listener = cptr;
cptr->from = cptr;
SetMe(cptr);
strncpyzt(cptr->name, aconf->host, sizeof(cptr->name));
@@ -428,6 +465,33 @@ int add_listener(aconf)
return 0;
}
int add_listener2(ConfigItem_listen *conf)
{
aClient *cptr;
cptr = make_client(NULL, NULL);
cptr->flags = FLAGS_LISTEN;
cptr->listener = cptr;
cptr->from = cptr;
SetMe(cptr);
strncpyzt(cptr->name, conf->ip, sizeof(cptr->name));
if (inetport(cptr, conf->ip, conf->port))
cptr->fd = -2;
cptr->umodes = conf->options ? conf->options : LISTENER_NORMAL;
if (cptr->fd >= 0)
{
set_non_blocking(cptr->fd, cptr);
return 1;
}
else
{
free_client(cptr);
return -1;
}
}
/*
* close_listeners
*
@@ -1125,18 +1189,6 @@ void close_connection(cptr)
DBufClear(&cptr->sendQ);
DBufClear(&cptr->recvQ);
/*
* clean up extra sockets from P-lines which have been
* discarded.
*/
if (cptr->acpt != &me && cptr->acpt != cptr)
{
aconf = cptr->acpt->confs->value.aconf;
if (aconf->clients > 0)
aconf->clients--;
if (!aconf->clients && IsIllegal(aconf))
close_connection(cptr->acpt);
}
}
for (; highest_fd > 0; highest_fd--)
if (local[highest_fd])
@@ -1368,11 +1420,8 @@ aClient *add_connection(cptr, fd)
{
Link lin;
aClient *acptr;
aConfItem *aconf = NULL;
acptr = make_client(NULL, &me);
if (cptr != &me)
aconf = cptr->confs->value.aconf;
/* Removed preliminary access check. Full check is performed in
* m_server and m_user instead. Also connection time out help to
* get rid of unwanted connections.
@@ -1403,8 +1452,6 @@ aClient *add_connection(cptr, fd)
return NULL;
}
/* don't want to add "Failed in connecting to" here.. */
if (aconf && IsIllegal(aconf))
goto add_con_refuse;
/* Copy ascii address to 'sockhost' just in case. Then we
* have something valid to put into error messages...
*/
@@ -1497,13 +1544,11 @@ aClient *add_connection(cptr, fd)
#endif /*USENEWDNS*/
}
if (aconf)
aconf->clients++;
acptr->fd = fd;
if (fd > highest_fd)
highest_fd = fd;
local[fd] = acptr;
acptr->acpt = cptr;
acptr->listener = cptr;
#ifdef USE_SSL
if (cptr->umodes & LISTENER_SSL)
{
@@ -2139,8 +2184,8 @@ int read_message(delay, listp)
*/
(void)add_connection(cptr, fd);
nextping = TStime();
if (!cptr->acpt)
cptr->acpt = &me;
if (!cptr->listener)
cptr->listener = &me;
}
for (i = highest_fd; i >= 0; i--)
@@ -2225,7 +2270,7 @@ int read_message(delay, listp)
me.name, get_client_name(cptr, FALSE));
}
else
report_error("Lost connection to %s:%s", cptr);
report_baderror("Lost connection to %s:%s", cptr);
}
if (length != FLUSH_BUFFER)
(void)exit_client(cptr, cptr, &me,
@@ -2529,8 +2574,8 @@ int read_message(delay, listp)
(void)add_connection(cptr, fd);
nextping = TStime();
if (!cptr->acpt)
cptr->acpt = &me;
if (!cptr->listener)
cptr->listener = &me;
continue;
}
@@ -2785,7 +2830,7 @@ int connect_server(aconf, by, hp)
if (cptr->fd > highest_fd)
highest_fd = cptr->fd;
local[cptr->fd] = cptr;
cptr->acpt = &me;
cptr->listener = &me;
SetConnecting(cptr);
IRCstats.unknown++;
get_sockhost(cptr, aconf->host);
+3 -3
View File
@@ -194,7 +194,7 @@ int attach_Iline(cptr, hp, sockhost)
{
if (aconf->status != CONF_CLIENT)
continue;
if (aconf->port && aconf->port != cptr->acpt->port)
if (aconf->port && aconf->port != cptr->listener->port)
continue;
if (!aconf->host || !aconf->name)
goto attach_iline;
@@ -1677,12 +1677,12 @@ int find_kill(cptr)
if ((tmp->status == CONF_KILL) && tmp->host && tmp->name &&
(match(tmp->host, host) == 0) &&
(!name || match(tmp->name, name) == 0) &&
(!tmp->port || (tmp->port == cptr->acpt->port))) {
(!tmp->port || (tmp->port == cptr->listener->port))) {
for (tmp2 = conf; tmp2; tmp2 = tmp2->next)
if ((tmp2->status == CONF_EXCEPT) && tmp2->host && tmp2->name &&
(match(tmp2->host, host) == 0) &&
(!name || match(tmp2->name, name) == 0) &&
(!tmp2->port || (tmp2->port == cptr->acpt->port)))
(!tmp2->port || (tmp2->port == cptr->listener->port)))
return 0;
if (BadPtr(tmp->passwd))
+1875
View File
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -239,7 +239,7 @@ static char *replies[] = {
/* 207 RPL_TRACESERVICE */ ":%s 207 %s Service %d %s",
/* 208 RPL_TRACENEWTYPE */ ":%s 208 %s <newtype> 0 %s",
/* 209 RPL_TRACECLASS */ ":%s 209 %s Class %d %d",
/* 210 */ NULL,
/* 210 RPL_STATSHELP */ ":%s 210 %s :%s",
/* 211 */ NULL, /* Used */
#ifdef DEBUGMODE
/* 212 RPL_STATSCOMMANDS */ ":%s 212 %s %s %u %u %u %u %u %u",
@@ -281,7 +281,7 @@ static char *replies[] = {
/* 245 RPL_STATSSLINE */ ":%s 245 %s %c %s * %s %d %d",
/* 246 */ NULL,
/* 247 RPL_STATSXLINE */ ":%s 247 %s X %s %d",
/* 248 RPL_STATSULINE */ ":%s 248 %s %c %s * %s %d %d",
/* 248 RPL_STATSULINE */ ":%s 248 %s U %s",
/* 249 */ NULL,
/* 250 RPL_STATSCONN */ ":%s 250 %s :Highest connection count: %d (%d clients)",
/* 251 RPL_LUSERCLIENT */ ":%s 251 %s :There are %d users and %d invisible on %d servers",
@@ -416,7 +416,7 @@ static char *replies[] = {
/* 376 RPL_ENDOFMOTD */ ":%s 376 %s :End of /MOTD command.",
/* 377 */ NULL,
/* 378 RPL_WHOISHOST */ ":%s 378 %s %s :is connecting from *@%s",
/* 379 RPL_WHOISMODES */ ":%s 379 %s %s is using modes %s",
/* 379 RPL_WHOISMODES */ ":%s 379 %s %s :is using modes %s",
/* 380 */ NULL,
/* 381 RPL_YOUREOPER */ ":%s 381 %s :You are now an IRC Operator",
/* 382 RPL_REHASHING */ ":%s 382 %s %s :Rehashing",
+2 -2
View File
@@ -826,7 +826,7 @@ int m_gline(aClient *cptr, aClient *sptr, int parc, char *parv[])
nochecks:
usermask = strtok(mask, "@");
hostmask = strtok(NULL, "@");
hostmask = strtok(NULL, "");
tkl_check_expire();
for (tk = tklines; tk; tk = tk->next)
@@ -1032,7 +1032,7 @@ int m_shun(aClient *cptr, aClient *sptr, int parc, char *parv[])
nochecks:
usermask = strtok(mask, "@");
hostmask = strtok(NULL, "@");
hostmask = strtok(NULL, "");
tkl_check_expire();
for (tk = tklines; tk; tk = tk->next)
+120 -61
View File
@@ -35,9 +35,6 @@ static char sccsid[] =
#include "channel.h"
#include "userload.h"
#include "version.h"
#if defined(PCS) || defined(AIX) || defined(SVR3)
#include <time.h>
#endif
#include <sys/stat.h>
#include <fcntl.h>
#ifdef _WIN32
@@ -600,7 +597,15 @@ int m_server(cptr, sptr, parc, parv)
sendto_one(cptr, "ERROR :No servername");
return 0;
}
if (MyConnect(sptr) && (sptr->acpt->umodes & LISTENER_CLIENTSONLY))
if (!cptr->passwd) {
sendto_one(cptr,
"ERROR :No Access (passwd mismatch) %s", inpath);
sendto_locfailops("Access denied (passwd mismatch) %s",
inpath);
return exit_client(cptr, cptr, cptr, "Bad Password");
}
if (MyConnect(sptr) && (sptr->listener->umodes & LISTENER_CLIENTSONLY))
{
return exit_client(cptr, sptr, sptr, "This port is for clients only");
}
@@ -712,6 +717,13 @@ int m_server(cptr, sptr, parc, parv)
#else
encr = cptr->passwd;
#endif /* CRYPT_LINK_PASSWORD */
if (!encr || !aconf->passwd) {
sendto_one(cptr,
"ERROR :No Access (passwd mismatch) %s", inpath);
sendto_locfailops("Access denied (passwd mismatch) %s",
inpath);
return exit_client(cptr, cptr, cptr, "Bad Password");
}
if (aconf->passwd && encr && *aconf->passwd && !StrEq(aconf->passwd, encr))
{
sendto_one(cptr,
@@ -838,7 +850,7 @@ int m_server(cptr, sptr, parc, parv)
* server are also U:lined, very helpful if HIDE_ULINES is on
*/
if (IsULine(sptr)
|| (find_uline(cptr->confs, acptr->name)))
|| (Find_uline(acptr->name)))
acptr->flags |= FLAGS_ULINE;
add_server_to_table(acptr);
IRCstats.servers++;
@@ -1093,7 +1105,7 @@ int m_server_estab(cptr)
/* use first two chars of the password they send in as salt */
/* passwd may be NULL. Head it off at the pass... */
if (*cptr->passwd)
if (cptr->passwd && *cptr->passwd)
{
char salt[3];
extern char *crypt();
@@ -1108,7 +1120,7 @@ int m_server_estab(cptr)
#else
encr = cptr->passwd;
#endif /* CRYPT_LINK_PASSWORD */
if (*aconf->passwd && !StrEq(aconf->passwd, encr))
if (*aconf->passwd && encr && !StrEq(aconf->passwd, encr))
{
ircstp->is_ref++;
sendto_one(cptr, "ERROR :No Access (passwd mismatch) %s",
@@ -1117,7 +1129,10 @@ int m_server_estab(cptr)
return exit_client(cptr, cptr, cptr, "Bad Password");
}
if (cptr->passwd)
MyFree(cptr->passwd);
{
MyFree(cptr->passwd);
cptr->passwd = NULL;
}
#ifndef HUB
for (i = 0; i <= highest_fd; i++)
if (local[i] && IsServer(local[i]))
@@ -1181,7 +1196,7 @@ int m_server_estab(cptr)
#ifndef NO_FDLIST
addto_fdlist(cptr->fd, &serv_fdlist);
#endif
if ((find_uline(cptr->confs, cptr->name)))
if ((Find_uline(cptr->name)))
cptr->flags |= FLAGS_ULINE;
cptr->flags |= FLAGS_TS8;
nextping = TStime();
@@ -2351,17 +2366,19 @@ int m_stats(cptr, sptr, parc, parv)
int doall = 0, wilds = 0, showports = IsAnOper(sptr), remote = 0;
char *name;
#ifdef STATS_ONLYOPER
if (!IsAnOper(sptr))
sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, parv[0]);
#endif
if (hunt_server(cptr, sptr, ":%s STATS %s :%s", 2, parc,
parv) != HUNTED_ISME)
return 0;
#ifdef STATS_ONLYOPER
if (!IsAnOper(sptr)) {
sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, parv[0]);
return 0;
}
#endif
if (parc > 2)
{
name = parv[2];
@@ -2375,18 +2392,6 @@ int m_stats(cptr, sptr, parc, parv)
else
name = me.name;
if (stat != '\0')
sendto_umode(UMODE_EYES, "Stats \'%c\' requested by %s (%s@%s)",
stat, sptr->name, sptr->user->username,
IsHidden(sptr) ? sptr->user->virthost : sptr->user->
realhost);
else
sendto_umode(UMODE_EYES,
"Stats \'NULL\' requested by %s (%s@%s)", sptr->name,
sptr->user->username,
IsHidden(sptr) ? sptr->user->virthost : sptr->user->
realhost);
switch (stat)
{
#ifdef STRIPBADWORDS
@@ -2598,8 +2603,13 @@ int m_stats(cptr, sptr, parc, parv)
tstats(sptr, parv[0]);
break;
case 'U':
report_configured_links(sptr, CONF_UWORLD);
{
ConfigItem_ulines *ulines;
for (ulines = conf_ulines; ulines; ulines = (ConfigItem_ulines *)ulines->next) {
sendto_one(sptr, rpl_str(RPL_STATSULINE), me.name, parv[0], ulines->servername);
}
break;
}
case 'u':
{
time_t tmpnow;
@@ -2636,10 +2646,52 @@ int m_stats(cptr, sptr, parc, parv)
count_memory(sptr, parv[0]);
break;
default:
stat = '*';
/* Display a help menu */
sendto_one(sptr, rpl_str(RPL_STATSHELP), me.name, parv[0], "/Stats flags:");
sendto_one(sptr, rpl_str(RPL_STATSHELP), me.name, parv[0], "b - Send the badwords list");
sendto_one(sptr, rpl_str(RPL_STATSHELP), me.name, parv[0], "C - Send the C/N line list");
sendto_one(sptr, rpl_str(RPL_STATSHELP), me.name, parv[0], "d - Send the d line list");
sendto_one(sptr, rpl_str(RPL_STATSHELP), me.name, parv[0], "D - Send the D line list");
sendto_one(sptr, rpl_str(RPL_STATSHELP), me.name, parv[0], "e - Send the e line list");
sendto_one(sptr, rpl_str(RPL_STATSHELP), me.name, parv[0], "E - Send the E line list");
sendto_one(sptr, rpl_str(RPL_STATSHELP), me.name, parv[0], "F - Send the dccdeny line list");
sendto_one(sptr, rpl_str(RPL_STATSHELP), me.name, parv[0], "G - Report TKL information (G:lines/Shuns)");
sendto_one(sptr, rpl_str(RPL_STATSHELP), me.name, parv[0], "H - Send the H/L line list");
sendto_one(sptr, rpl_str(RPL_STATSHELP), me.name, parv[0], "I - Send the I line list");
sendto_one(sptr, rpl_str(RPL_STATSHELP), me.name, parv[0], "K - Send the K/E/Z line list (Includes AKILLs)");
sendto_one(sptr, rpl_str(RPL_STATSHELP), me.name, parv[0], "L - Send Link information");
sendto_one(sptr, rpl_str(RPL_STATSHELP), me.name, parv[0], "M - Send list of how many times each command was used");
sendto_one(sptr, rpl_str(RPL_STATSHELP), me.name, parv[0], "n - Send the n line list");
sendto_one(sptr, rpl_str(RPL_STATSHELP), me.name, parv[0], "N - Send network configuration list");
sendto_one(sptr, rpl_str(RPL_STATSHELP), me.name, parv[0], "O - Send the O line list");
sendto_one(sptr, rpl_str(RPL_STATSHELP), me.name, parv[0], "q - Send the SQLINE list");
sendto_one(sptr, rpl_str(RPL_STATSHELP), me.name, parv[0], "Q - Send the Q line list");
#ifdef DEBUGMODE
sendto_one(sptr, rpl_str(RPL_STATSHELP), me.name, parv[0], "R - Send the usage list");
#endif
sendto_one(sptr, rpl_str(RPL_STATSHELP), me.name, parv[0], "s - Send the SCache and NS list");
sendto_one(sptr, rpl_str(RPL_STATSHELP), me.name, parv[0], "S - Send the dynamic configuration list");
sendto_one(sptr, rpl_str(RPL_STATSHELP), me.name, parv[0], "t - Send the T line list");
sendto_one(sptr, rpl_str(RPL_STATSHELP), me.name, parv[0], "t - Send connection information");
sendto_one(sptr, rpl_str(RPL_STATSHELP), me.name, parv[0], "u - Send server uptime and connection count");
sendto_one(sptr, rpl_str(RPL_STATSHELP), me.name, parv[0], "U - Send the U line list");
sendto_one(sptr, rpl_str(RPL_STATSHELP), me.name, parv[0], "v - Send the V line list");
sendto_one(sptr, rpl_str(RPL_STATSHELP), me.name, parv[0], "V - Send the vhost list");
sendto_one(sptr, rpl_str(RPL_STATSHELP), me.name, parv[0], "W - Send load information");
sendto_one(sptr, rpl_str(RPL_STATSHELP), me.name, parv[0], "Y - Send the Y line list");
sendto_one(sptr, rpl_str(RPL_STATSHELP), me.name, parv[0], "Z - Send memory usage information");
stat = '*';
break;
}
sendto_one(sptr, rpl_str(RPL_ENDOFSTATS), me.name, parv[0], stat);
if (stat != '*')
sendto_umode(UMODE_EYES, "Stats \'%c\' requested by %s (%s@%s)",
stat, sptr->name, sptr->user->username,
IsHidden(sptr) ? sptr->user->virthost : sptr->user->
realhost);
return 0;
}
@@ -2875,7 +2927,7 @@ void save_tunefile(void)
{
FILE *tunefile;
tunefile = fopen(IRCDTUNE, "w+");
tunefile = fopen(IRCDTUNE, "w");
if (!tunefile)
{
#if !defined(_WIN32) && !defined(_AMIGA)
@@ -3544,8 +3596,7 @@ int m_admin(cptr, sptr, parc, parv)
int parc;
char *parv[];
{
aConfItem *aconf;
ConfigItem_admin *admin;
/* Users may want to get the address in case k-lined, etc. -- Barubary
/* Only allow remote ADMINs if registered -- Barubary */
@@ -3553,20 +3604,28 @@ int m_admin(cptr, sptr, parc, parv)
if (hunt_server(cptr, sptr, ":%s ADMIN :%s", 1, parc,
parv) != HUNTED_ISME)
return 0;
if ((aconf = find_admin()))
{
sendto_one(sptr, rpl_str(RPL_ADMINME),
me.name, parv[0], me.name);
sendto_one(sptr, rpl_str(RPL_ADMINLOC1),
me.name, parv[0], (aconf->host ? aconf->host : "-"));
sendto_one(sptr, rpl_str(RPL_ADMINLOC2),
me.name, parv[0], (aconf->passwd ? aconf->passwd : "-"));
sendto_one(sptr, rpl_str(RPL_ADMINEMAIL),
me.name, parv[0], (aconf->name ? aconf->name : "-"));
}
else
if (!conf_admin_tail) {
sendto_one(sptr, err_str(ERR_NOADMININFO),
me.name, parv[0], me.name);
return 0;
}
sendto_one(sptr, rpl_str(RPL_ADMINME),
me.name, parv[0], me.name);
/* cycle through the list backwards */
for (admin = conf_admin_tail; admin; admin = (ConfigItem_admin *)admin->prev) {
if (!admin->next)
sendto_one(sptr, rpl_str(RPL_ADMINLOC1),
me.name, parv[0], admin->line);
else if (!admin->next->next)
sendto_one(sptr, rpl_str(RPL_ADMINLOC2),
me.name, parv[0], admin->line);
else
sendto_one(sptr, rpl_str(RPL_ADMINEMAIL),
me.name, parv[0], admin->line);
}
return 0;
}
@@ -3601,7 +3660,7 @@ int m_rehash(cptr, sptr, parc, parv)
{
if (*parv[1] == '-')
{
if (!match("-dcc*", parv[1]))
if (!strnicmp("-dcc", parv[1], 4))
{
sendto_ops
("Rehashing dccdeny.conf on request of %s",
@@ -3609,7 +3668,7 @@ int m_rehash(cptr, sptr, parc, parv)
dcc_rehash();
return 0;
}
if (!match("-dyn*", parv[1]))
if (!strnicmp("-dyn", parv[1], 4))
{
if (!IsAdmin(sptr))
return 0;
@@ -3619,14 +3678,14 @@ int m_rehash(cptr, sptr, parc, parv)
load_conf(ZCONF, 1);
return 0;
}
if (!match("-gar*", parv[1]))
if (!strnicmp("-gar", parv[1], 4))
{
if (!IsAdmin(sptr))
return 0;
loop.do_garbage_collect = 1;
return 0;
}
if (!match("-rest*", parv[1]))
if (!strnicmp("-rest", parv[1], 5))
{
if (!IsAdmin(sptr))
return 0;
@@ -3655,8 +3714,8 @@ int m_rehash(cptr, sptr, parc, parv)
botmotd = (aMotd *) read_botmotd(BPATH);
return 0;
}
if (!match("-motd*", parv[1])
|| !match("-rules*", parv[1]))
if (!strnicmp("-motd", parv[1], 5)
|| !strnicmp("-rules", parv[1], 6))
{
if (!IsAdmin(sptr))
return 0;
@@ -3668,7 +3727,7 @@ int m_rehash(cptr, sptr, parc, parv)
read_tlines();
return 0;
}
if (!match("-vhos*", parv[1]))
if (!strnicmp("-vhos", parv[1], 5))
{
if (!IsAdmin(sptr))
return 0;
@@ -3679,7 +3738,7 @@ int m_rehash(cptr, sptr, parc, parv)
return 0;
}
#ifdef STRIPBADWORDS
if (!match("-bad*", parv[1]))
if (!strnicmp("-bad", parv[1], 4))
{
if (!IsAdmin(sptr))
return 0;
@@ -3741,7 +3800,7 @@ int m_rehash(cptr, sptr, parc, parv)
{
if (*parv[2] == '-')
{
if (!match("-dcc*", parv[2]))
if (!strnicmp("-dcc", parv[2], 4))
{
sendto_serv_butone(&me,
":%s GLOBOPS :%s is remotely rehashing dccdeny.conf",
@@ -3752,7 +3811,7 @@ int m_rehash(cptr, sptr, parc, parv)
dcc_rehash();
return 0;
}
if (!match("-dyn*", parv[2]))
if (!strnicmp("-dyn", parv[2], 4))
{
if (!IsAdmin(sptr))
return 0;
@@ -3765,7 +3824,7 @@ int m_rehash(cptr, sptr, parc, parv)
load_conf(ZCONF, 1);
return 0;
}
if (!match("-rest*", parv[2]))
if (!strnicmp("-rest", parv[2], 5))
{
if (!IsAdmin(sptr))
return 0;
@@ -3808,8 +3867,8 @@ int m_rehash(cptr, sptr, parc, parv)
read_botmotd(BPATH);
return 0;
}
if (!match("-motd*", parv[2])
|| !match("-rules*", parv[2]))
if (!strnicmp("-motd", parv[2], 5)
|| !strnicmp("-rules", parv[2], 6))
{
if (!IsAdmin(sptr))
return 0;
@@ -3826,7 +3885,7 @@ int m_rehash(cptr, sptr, parc, parv)
read_tlines();
return 0;
}
if (!match("-vhos*", parv[2]))
if (!strnicmp("-vhos", parv[2], 5))
{
if (!IsAdmin(sptr))
return 0;
@@ -3913,7 +3972,7 @@ int m_restart(cptr, sptr, parc, parv)
}
if ((pass = find_restartpass()))
if ((pass = conf_drpass->restart))
{
if (parc < 2)
{
@@ -4718,7 +4777,7 @@ int m_die(cptr, sptr, parc, parv)
return 0;
}
if ((pass = find_diepass())) /* See if we have and DIE/RESTART password */
if ((pass = conf_drpass->die)) /* See if we have and DIE/RESTART password */
{
if (parc < 2) /* And if so, require a password :) */
{
+7 -7
View File
@@ -141,7 +141,7 @@ int m_sethost(cptr, sptr, parc, parv)
me.name, sptr->name);
}
/* too large huh? */
if (strlen(parv[1]) > (HOSTLEN - 1))
if (strlen(parv[1]) > (HOSTLEN))
{
/* ignore us as well if we're not a child of 3k */
if (MyConnect(sptr))
@@ -242,7 +242,7 @@ int m_chghost(cptr, sptr, parc, parv)
return 0;
}
if (strlen(parv[2]) > (HOSTLEN - 1))
if (strlen(parv[2]) > (HOSTLEN))
{
sendto_one(sptr,
":%s NOTICE %s :*** ChgHost Error: Too long hostname!!",
@@ -346,7 +346,7 @@ int m_chgident(cptr, sptr, parc, parv)
return 0;
}
if (strlen(parv[2]) > (USERLEN - 1))
if (strlen(parv[2]) > (USERLEN))
{
sendto_one(sptr,
":%s NOTICE %s :*** ChgIdent Error: Too long ident!!",
@@ -479,7 +479,7 @@ int m_setident(cptr, sptr, parc, parv)
}
/* too large huh? */
if (strlen(vident) > (USERLEN - 1))
if (strlen(vident) > (USERLEN))
{
/* ignore us as well if we're not a child of 3k */
if (MyConnect(sptr))
@@ -541,7 +541,7 @@ int m_setname(cptr, sptr, parc, parv)
{
if (parc < 2)
return;
if (strlen(parv[1]) > (REALLEN - 2))
if (strlen(parv[1]) > (REALLEN))
{
if (MyConnect(sptr))
{
@@ -617,7 +617,7 @@ int m_sdesc(cptr, sptr, parc, parv)
me.name, sptr->name);
return 0;
}
if (strlen(parv[1]) > (REALLEN - 1))
if (strlen(parv[1]) > (REALLEN))
{
if (MyConnect(sptr))
{
@@ -1464,7 +1464,7 @@ int m_chgname(cptr, sptr, parc, parv)
return 0;
}
if (strlen(parv[2]) > (REALLEN - 1))
if (strlen(parv[2]) > (REALLEN))
{
sendto_one(sptr,
":%s NOTICE %s :*** ChgName Error: Too long !!", me.name,
+17 -10
View File
@@ -878,7 +878,10 @@ static int register_user(cptr, sptr, nick, username, umode, virthost)
* - Wizzu
*/
else
MyFree(sptr->passwd);
{
MyFree(sptr->passwd);
sptr->passwd = NULL;
}
}
/*
@@ -932,7 +935,7 @@ static int register_user(cptr, sptr, nick, username, umode, virthost)
sendto_one(sptr, rpl_str(RPL_YOURHOST), me.name, nick,
me.name, version);
sendto_one(sptr, rpl_str(RPL_CREATED), me.name, nick, creation);
if (!(sptr->acpt->umodes & LISTENER_JAVACLIENT))
if (!(sptr->listener->umodes & LISTENER_JAVACLIENT))
#ifndef _WIN32
sendto_one(sptr, rpl_str(RPL_MYINFO), me.name, parv[0],
me.name, version, umodestring, cmodestring);
@@ -1057,9 +1060,11 @@ static int register_user(cptr, sptr, nick, username, umode, virthost)
}
}
if (MyConnect(sptr) && !BadPtr(sptr->passwd))
if (MyConnect(sptr) && !BadPtr(sptr->passwd))
{
MyFree(sptr->passwd);
sptr->passwd = NULL;
}
return 0;
}
@@ -2427,7 +2432,7 @@ int m_notice(cptr, sptr, parc, parv)
}
int channelwho = 0;
int operwho = 0;
static void do_who(sptr, acptr, repchan)
aClient *sptr, *acptr;
aChannel *repchan;
@@ -2457,7 +2462,7 @@ static void do_who(sptr, acptr, repchan)
else if (repchan && has_voice(acptr, repchan))
status[i++] = '+';
status[i] = '\0';
if (IsWhois(acptr) && channelwho == 0)
if (IsWhois(acptr) && channelwho == 0 && sptr != acptr && !operwho)
{
sendto_one(acptr,
":%s NOTICE %s :*** %s either did a /who or a specific /who on you",
@@ -2505,11 +2510,13 @@ int m_who(cptr, sptr, parc, parv)
clean_channelname(mask);
}
channelwho = 0;
operwho = 0;
mychannel = NullChn;
if (oper)
{
sendto_umode(UMODE_HELPOP, "*** HelpOp -- from %s: [Did a /who 0 o]", parv[0]);
sendto_serv_butone(&me, ":%s HELP :[Did a /who 0 o]", parv[0]);
operwho = 1;
}
if (sptr->user)
if ((lp = sptr->user->channel))
@@ -2774,7 +2781,7 @@ int m_whois(cptr, sptr, parc, parv)
if (!IsPerson(acptr))
continue;
if (IsWhois(acptr))
if (IsWhois(acptr) && sptr != acptr)
{
sendto_one(acptr,
":%s NOTICE %s :*** %s (%s@%s) did a /whois on you.",
@@ -2964,7 +2971,7 @@ int m_user(cptr, sptr, parc, parv)
if (IsServer(cptr) && !IsUnknown(sptr))
return 0;
if (MyClient(sptr) && (sptr->acpt->umodes & LISTENER_SERVERSONLY)) {
if (MyClient(sptr) && (sptr->listener->umodes & LISTENER_SERVERSONLY)) {
return exit_client(cptr, sptr, sptr, "This port is for servers only");
}
@@ -4459,8 +4466,8 @@ int m_umode(cptr, sptr, parc, parv)
if (MyClient(sptr) && (sptr->umodes & UMODE_SECURE)
&& !IsSecure(sptr))
sptr->umodes &= ~UMODE_SECURE;
if (IsTechAdmin(sptr) && IsNetAdmin(sptr))
ClearTechAdmin(sptr);
}
/*
+3 -3
View File
@@ -272,8 +272,8 @@ void sendbufto_one(aClient *to)
*/
to->sendM += 1;
me.sendM += 1;
if (to->acpt != &me)
to->acpt->sendM += 1;
if (to->listener != &me)
to->listener->sendM += 1;
/*
* This little bit is to stop the sendQ from growing too large when
* there is no need for it to. Thus we call send_queued() every time
@@ -1628,7 +1628,7 @@ void sendto_connectnotice(nick, user, sptr)
char connecth[1024];
ircsprintf(connectd,
"*** Notice -- Client connecting on port %d: %s (%s@%s) %s%s%s",
sptr->acpt->port, nick, user->username, user->realhost,
sptr->listener->port, nick, user->username, user->realhost,
#ifdef USE_SSL
IsSecure(sptr) ? "[secure " : "",
IsSecure(sptr) ? SSL_get_cipher((SSL *)sptr->ssl) : "",