mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-03 03:53:12 +02:00
stable merge with beta (unreal3.1.1-darkshades-stable)
This commit is contained in:
+1
-12
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
Welcome to the UnrealIRCd configuration program. This program
|
||||
will help you to compile your IRC server, and ask you questions
|
||||
regarding the setup of it, during the process.
|
||||
@@ -9,7 +7,7 @@ unreal-support@lists.sourceforge.net or ask at IRC:
|
||||
/server irc.ircsystems.net, /join #unrealircd
|
||||
|
||||
For any sake, read Unreal.nfo and read doc/faq before asking questions
|
||||
|
||||
|
||||
NOTE: If the code is changed in any way, or the version string is changed,
|
||||
we do _NOT_ support the product, except if you got explicit permission
|
||||
from one of the UnrealIRCd coders. If it fails and you messed with it,
|
||||
@@ -17,13 +15,4 @@ NOTE: If the code is changed in any way, or the version string is changed,
|
||||
builds (if it doesn't say "geniune" in the display) are _NOT_
|
||||
supported.
|
||||
|
||||
It has been a year since I made the first UnrealIRCd release, Unreal2.1.
|
||||
A lot of things have happened since. I started Unreal as a hobby project,
|
||||
but it has turned into a community, where people ask for help, and give help
|
||||
too - people like the program (as the first I've made actually :>). So I
|
||||
am happy you have followed all this way - Thanks to Shmad, Nutcais,
|
||||
Sporty_McFly, DjBoxy, zero9000, and all the people following the product
|
||||
for the time it has existed. So - enjoy this release - we have tried to do
|
||||
our best, and if its not - we'll make the next our best. So - Seeya in 2001
|
||||
|
||||
-Stskeeps (Head coder of UnrealIRCd)
|
||||
|
||||
+10
-16
@@ -1,11 +1,10 @@
|
||||
|
||||
Unreal3.1-Silverheart Release Notes
|
||||
Unreal3.1.1-Darkshades Release Notes
|
||||
===================================
|
||||
|
||||
* It is most wise to have a Unreal3.1 (FINAL) -only network whenever possible. Do not
|
||||
link this to 2.1.7 or alike (might have unexpected problems). Unreal3.0
|
||||
linking might at times cause channel desynchs because of 3.0 broken SJOIN
|
||||
code.
|
||||
* It is REALLY RECOMMENDED that you run only Unreal3.1.1<->Unreal3.1.1,
|
||||
as Unreal3.1+sf got some funny SJOIN bugs that causes the network to
|
||||
desynch
|
||||
|
||||
* It is ADVISABLE that you allocate numerics to each server on your network.
|
||||
You simply in the M: line, just after the port, add :numeric, like:
|
||||
@@ -15,15 +14,10 @@ Unreal3.1-Silverheart Release Notes
|
||||
Where 20 is the numeric. Numerics are 1-255, 0 means no numeric (bad),
|
||||
and no server must have same numeric
|
||||
|
||||
* We have introduced encrypted irc connections, and we will soon have a
|
||||
client out for it (this is not SSL). Stay tuned in #UnrealIRCd for more
|
||||
information
|
||||
* We have introduced encrypted irc connections, using SSL
|
||||
You need to set up a SSL port, P:IP:s:*:port
|
||||
To connect securely to another server, add :S at the end of the C:line
|
||||
and make sure it autoconnect/connects to a SSL port
|
||||
|
||||
* NOTE, in #UnrealIRCD we don't help with Services etc.
|
||||
|
||||
* Documentation will show up on the website sooner or later,
|
||||
http://unreal.tspre.org
|
||||
|
||||
* Read Unreal.nfo for any sake. To update your IRCd, please run the ./update
|
||||
script. This requires "wget" and "cvs" on the box to function
|
||||
|
||||
* Read Unreal.nfo for any sake AND THE DOCS IN doc/. To update/upgrade your IRCd,
|
||||
please run the ./update script. This requires "wget" and "cvs" on the box to function
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
|-------------------------------------------------------------------------|
|
||||
| Congratulations on your new SSL self-signed certificate for your IRCd. |
|
||||
| However, wouldn't it be better that you get your certifcate signed by |
|
||||
| some kind of Certification Authority (CA), so your users can check that |
|
||||
| they are really connected to the real server, so they feel secure? |
|
||||
| |
|
||||
| A initiative have been started, to help this problem, as more and more |
|
||||
| SSL-enabled IRC servers will be started in the future, and people will |
|
||||
| have trouble authenticating that they are really at the right server. |
|
||||
| This initiative is called SICI (Secure IRC Certification Initiative. We |
|
||||
| sign your certificates for free, using the simple way of authenticating |
|
||||
| you by going to your IRC server and testing if it's really you. |
|
||||
| |
|
||||
| You can send in your "server.req.pem" file to us at our email |
|
||||
| certs@sici.ircsystems.net, with contact info on you (IRC network, nick, |
|
||||
| status). We will then contact you, and check if you have provided true |
|
||||
| information. If you need more information about SICI, visit our website |
|
||||
| http://sici.ircsystems.net, where you can download our root certificate,|
|
||||
| and read even more about this project. | Press enter to continue |
|
||||
---------------------------------------------------------------------------
|
||||
@@ -1,6 +1,17 @@
|
||||
*
|
||||
*
|
||||
* UnrealIRCd Upgrade Script
|
||||
*
|
||||
|
||||
*** Downloading upgrade script from unreal.tspre.org
|
||||
_ _ _ ___________ _____ _
|
||||
| | | | | |_ _| ___ \/ __ \ | |
|
||||
| | | |_ __ _ __ ___ __ _| | | | | |_/ /| / \/ __| |
|
||||
| | | | '_ \| '__/ _ \/ _` | | | | | / | | / _` |
|
||||
| |_| | | | | | | __/ (_| | |_| |_| |\ \ | \__/\ (_| |
|
||||
\___/|_| |_|_| \___|\__,_|_|\___/\_| \_| \____/\__,_|
|
||||
|
||||
Update Script v2.0
|
||||
|
||||
What download program do you want to use?
|
||||
-----------------------------------------
|
||||
|
||||
Type "wget" for wget
|
||||
Type "lynx" for lynx
|
||||
|
||||
>
|
||||
|
||||
@@ -1,573 +1,252 @@
|
||||
/*
|
||||
/*
|
||||
* UnrealIRCd Changes File - (C) Carsten Munk 1999-2000 &
|
||||
* The UnrealIRCd Team
|
||||
*
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
*** Unreal3.1 *** (final)
|
||||
- Moved REMOVE_ADVERTISE a little
|
||||
- Fixed bug where you could /mode #test +L #test (link a channel to
|
||||
itself)
|
||||
- Fixed a bug where a +L channel didn't have to be valid ex /mode #test
|
||||
+L blah would work, dangerous if 0 is used
|
||||
- Fixed /map showing U:lines even if HIDE_ULINES was set oops :)
|
||||
- Fixed a bug where opers couldn't walk through +l
|
||||
- Fixed a bug where /mode #test +f *N:N was recognized the same as +f N:N
|
||||
(if *2:3 was set then /mode #chan +f 2:3 it wouldn't set, thought it was the same)
|
||||
- Removed src/cio_init.c src/cio_main.c src/win32.c src/win32.rc as we don't
|
||||
use that anymore
|
||||
- Added ircsprintf() (ircsprintf.c and ircsprintf.h)
|
||||
- Converted to use ircsprintf
|
||||
- Now using sprintf_irc from ircu, as %li would screw up the hybrid variant
|
||||
- Some fdlist updates from bahamut
|
||||
- Header change
|
||||
- Some more Header change
|
||||
- Added agent.c for IRCd Agents (remote control etc)
|
||||
- Fixed up some make misalignments
|
||||
- Fixed +I /names
|
||||
- Removed TESTNET defines
|
||||
- Added poll() engine from bahamut (hard!)
|
||||
- Made /vhost send failed login's to +e
|
||||
- Made /stats V/R/F use raw rather than NOTICE
|
||||
- Fixed some poll() engine problems
|
||||
- Some more problems with poll()
|
||||
- Removed the \2's from the is a Coder msg, whywere they there, no one
|
||||
knows (codemastr) Because i was the only one using it =P (Stskeeps)
|
||||
- Fixed /names problem..
|
||||
- Made /mode <nick> use get_mode_str() to list the modes
|
||||
- Made /lusers info be pre-calculated :) Saves hell of a lot CPU time
|
||||
- Made /stats z/Z oper only
|
||||
- Fixed SJOIN bug only totally fixed when all servers upgraded
|
||||
- Moving old 3.0 stuff to Changes.old
|
||||
- Re-added README.ALPHA
|
||||
- Fixed some more SJOIN bugs
|
||||
- Fixed NICKv2 bugs with non NICKv2
|
||||
- Fixed up /info, there will be a better layout for this
|
||||
- Fixed up some poll() engine bugs (i hope)
|
||||
- Start of telnet proxy scan code
|
||||
- Took telnet proxy scan code out again =/ It really fux0red up
|
||||
- Added networks/treklink.network
|
||||
- Added options to /HTM, ON/OFF TO (what load do we auto start at) NOISY/QUIET (toggle whether HTM should
|
||||
announce when it starts)
|
||||
- Fixed a little bug where /part didn't show the correct channel case
|
||||
- Made unresolved host connections go faster, idea from PTLink IRCd v3.5.4 great job :)
|
||||
- Removed support for & and + channels (i hope) and made m_message more
|
||||
handy and support for /notice +#channel, %#channel etc etc
|
||||
- Topic fix?
|
||||
- Incorperated the bahamut m_list and send_list, it's faster and smaller :P
|
||||
- When /HTM is active /list is disabled to non-opers
|
||||
- OperMOTD is now loaded into memory (faster, saves memory, and CPU)
|
||||
- Added /rehash -omotd to rehash the OperMOTD
|
||||
- Added unrealircd.conf option for SETUID and SETGID if ircd started as root. And you can turn that off/on
|
||||
by defining/undefining BIG_SECURITY_HOLE in config.h
|
||||
- Fixed small bug in ircd.c and dynconf.c (not using #ifndef BIG_SECURITY_HOLE)
|
||||
- Removed & and + channels for sure..
|
||||
- All MOTDs, RULES are read into memory (including T:lines)
|
||||
- Added /rehash -bmotd (BotMOTD) /rehash -motd/-rules (MOTDs/RULES)
|
||||
- Fixed memory leak in dynconf.c, allocated 2048 on each /rehash -dynconf
|
||||
- Fixed _serious_ memory leak in cloak.c, abused 128 bytes every time
|
||||
someone went +x
|
||||
- Alphabeticalized making..
|
||||
- flush_connections more better
|
||||
- Fixed calls to check_registered*, more CPU spare:)
|
||||
- Fixed a bug in /tsctl svstime
|
||||
- Fixed a bug in the cached MOTDs
|
||||
- Added support for remote /htm
|
||||
- Even more tokensation
|
||||
- Removed IRCII_KLUDGE
|
||||
- Fixed /lusers wrong reply
|
||||
- Removed V28PlusOnly define
|
||||
- Fixed a bug in channel_modes()
|
||||
- More and more and more tokenzation >:)
|
||||
- Fixed a bug in m_user
|
||||
- Removed have_ops() and is_deopped(), they weren't used
|
||||
- Reorganized can_send() to make it faster
|
||||
- More tokenzation >:)
|
||||
- Fixed ircsprintf() %lu error when %lu == 0
|
||||
- Added devel/ directory, put ideas/specifications in here
|
||||
- Added devel/new.plines to describe new upcoming P:lines
|
||||
- Added NO_IDENT_CHECKING in config.h
|
||||
- Fixed bugs in get_version() and also made it a bit faster
|
||||
- Fixed RPL_MYINFO problem with UnrealIRCd/32 version and ircII
|
||||
misunderstanding it, prob other clients too
|
||||
- Updated msg.h hashtable to get most used commands more close
|
||||
- Removed some unused defines in msg.h
|
||||
- Removed dusers (not in use)
|
||||
- m_user stuff
|
||||
- Made use of : 's in between ircd.conf field working, using this format:
|
||||
A:"Test test:Moo":Moo:moo
|
||||
- Fixed some /lusers miscalculations
|
||||
- Added INET6 patch, now for making it work :P
|
||||
- More INET6 patching (not working atm)
|
||||
- INET6 compiles now, works? :P
|
||||
- Fixed some WebTV stuff
|
||||
- Made the m_message routine not do a user hash lookup if it starts with #
|
||||
- Removed some fields in structures like aClient etc that was unused
|
||||
- Removed Client->iown and the OWNLOGON code
|
||||
- Removed Channel->blist
|
||||
- Removed heaps of unused variables in functions
|
||||
- Fixed THE G:line bug, missing parameter
|
||||
- Hopefully fixed some calculation bugs
|
||||
- +F bugfix
|
||||
- In TKL a gline shows reason in quit message now
|
||||
- Fixed the SVSMOTD OPERMOTD and BOTMOTD bug, suggest parantheses problem
|
||||
- In K:Line it shows reason in quit message now, not sure about AKILL
|
||||
- Experimental NOTE in register_user added
|
||||
- Implemented hybrid scache.c, created by orabidoo and Dianora
|
||||
- Fixed /connect scache problem, and actually fixed the OPERMOTD bug
|
||||
- The hopefully last calculation bug..
|
||||
- Made bans and exceptions actually sync *ducks*, done in old fashion MODE
|
||||
manner, better than making BS (bansync) or incorporating it in SJOIN
|
||||
- Made /opermotd oper-only, bug reported by Bagge@ROXnet
|
||||
- Made TOPICs be dynamically allocated - saves heaps memory
|
||||
- Added hybrids/+cs'es /whowas system. Improved so it doesn't use static
|
||||
character arrays, and uses dynamically allocated strings instead
|
||||
- Added UMODE2 PROTOCTL and command, when a usermode change it uses :nick
|
||||
UMODE2 +-umodes. token = '|'
|
||||
- Made CONNECTFAST default, will ensure faster connecting
|
||||
- Updated /helpop to list more commands and new modes
|
||||
- the 1-message-per-2-sec not applied to opers
|
||||
- Topic fix with dynamic allocation
|
||||
- 1-message-per-2-sec now 1-message-per-1.5-sec
|
||||
- Removed TS fix notice
|
||||
- Removed User %s tries to become server notice
|
||||
- Made MAXCHANNELSPERUSER an unrealircd.conf option
|
||||
- Changed unrealircd.conf version to 1.2
|
||||
- Credit changes..
|
||||
- Uses dgets() from hybrid now, should be a minor CPU fix
|
||||
- Moved WebTV support, and +I disabling to an unrealircd.conf option
|
||||
- Updated doc/conf.doc, removed references to DALnet, and fixed typos
|
||||
- Moved doc/Elite.Changes to doc/History/Elite.Changes, away away away with
|
||||
that one
|
||||
- Tokenized SQLINE
|
||||
- Recoded dynconf, validates data too now
|
||||
- Fixed a /list bug that crashed the server
|
||||
- Fixed a minor bug in the new dynconf
|
||||
- Fixed a bug in vhost.conf and dccdeny.conf where if the line was not valid it would crash, now it just
|
||||
ignores that line
|
||||
- Added comment support to vhost.conf, dccdeny.conf, and chrestrict.conf (makes loading faster)
|
||||
- Fixed one of those "code, what the fuck were you smoking" bugs in m_svsmode etc
|
||||
(what = MODE_DEL - eh?)
|
||||
- Added AUTO_JOIN_CHANS to unrealircd.conf to force a user to join 1 or
|
||||
more channels on connect, read networks/unrealircd.conf for more info
|
||||
- Added networks/axenet.network
|
||||
- Possible change in the -1 operator bug
|
||||
- /info changes
|
||||
- Unreal3.1-beta1 release
|
||||
- Added a bunch of networks
|
||||
- Updated doc/conf.doc
|
||||
- Updated networks/networks.ndx cause someone *cough* sts *cough* forgot
|
||||
- Updated m_svso to -H the user
|
||||
- Added Solaris2.5 support and cleaned up Solaris2.x support
|
||||
- A little /list fix
|
||||
- Changed the unrealircd.conf version to 1.3
|
||||
- Fixed a bug in the AUTO_JOIN_CHANS
|
||||
- Added OPER_AUTO_JOIN_CHANS to unrealircd.conf, same as AUTO_JOIN_CHANS
|
||||
but is called on /oper
|
||||
- Readded /ns, /cs, etc but this time they point to /nickserv, /chanserv,
|
||||
etc
|
||||
- Removed IRCd Agents and made it so all opers can join unlimited channels
|
||||
- Updated src/chkconf.c to recognize new lines
|
||||
- Added "/mode #chan qa" support to send a list of +q users / +a users in a chan
|
||||
- Fixed "/mode #chan qa" ... see channel.c m_join for the problem ... sts you owe me a tenner =P ..
|
||||
- Removed Reg1, Reg2 etc etc and register. Modern compilers optimize better
|
||||
that way
|
||||
- Sidenote: /msg nick@ bug can easily be caused in m_message
|
||||
- Unreal3.1-beta1(build2)
|
||||
- Disabled ID_* stuff but is still there, saves memory
|
||||
- Made user->virthost a dynamic string now
|
||||
- Fixed a virthost bug again, and starting to wreck in meow's badword patch,
|
||||
gonna be a swearword filter and new version of REMOVE_ADVERTISING
|
||||
- Added meow's badword patch
|
||||
- Moved the badword patch chmode to +G (G Rated Channel) cause thats what some other ircd's use so lets try
|
||||
and keep cross compatibility :P
|
||||
- Added networks/interturk.network
|
||||
- Fixed a bug in /names thanks to lucas for reporting it and fixing it :)
|
||||
- Changed the badword umode to +G also
|
||||
- Removed some unused variables from dynconf.h
|
||||
- Cleaned up the dynconf and network file code to use less memory
|
||||
- Fixed the kill bug in NICKv2, caused by codemastr(TM) code
|
||||
(was calling m_join before sending NICK info to other servers)
|
||||
- SO NO IT WAS NOT MY FAULT *slap* (Stskeeps) -
|
||||
- Did an attempt on fixing the /msg nick@ bug
|
||||
- /stats s in DEVELOP mode will show cached scache hosts
|
||||
- Added src/aln.c, for the new ALN system, read doc/aln.doc
|
||||
- Minor ALN fix
|
||||
- Introduced ALN system, look at send.c::sendto_serv_butone_nickcmd, a
|
||||
little better, we can scrape some functions now
|
||||
- Some more ALN stuff, the server now understands |<aln> prefixes,
|
||||
find_client too
|
||||
- Added the "IRC Operators Message Of The Day" to /opermotd
|
||||
- Made Y:1 class in makeconf max 250 (we might get some complaints here,
|
||||
but people can change to their limit, but we have to make it this low
|
||||
because else the program rj had can flood/crash the server
|
||||
- Fixed a ALN problem with |nick persons getting killed off
|
||||
- Removed an OLD EliteIRCD reference in ./Config, thanks to Linus
|
||||
- Moved the ALN prefix to @ instead of |, as | would conflict with
|
||||
clients
|
||||
- Fixed ALN problem with it masskilling everyone :P
|
||||
- ** RELEASE OF UNREAL3.1-BETA2 **
|
||||
- Small Linux-ALPHA fix
|
||||
- A small vsendto_prefix bugfix(?)
|
||||
- Added /stats e to list e:lines
|
||||
- Fixed a small /list problem
|
||||
- Added #define USE_LOCALE, uses locale stuff in *nix versions
|
||||
to make better toupper() tolower(). might help some chinese nick
|
||||
things too
|
||||
- Fixed a few minor NOSPOOF things
|
||||
- Changed ircsprintf() to work with %lu with 0-5
|
||||
- Added unreal-test.network, for the upcoming Unreal TESTnet (for beta
|
||||
testers and developers only)
|
||||
- Using MyFree/MyMalloc now instead of MyRealloc.. lets hope it fixes
|
||||
something
|
||||
- Fixed the virthost (possible), need extensive testing
|
||||
- Possible fix of some server_estab problems
|
||||
- Added networks/cc2.network, networks/kissland.network, and networks/digital-irc.network
|
||||
- Changed unrealircd.conf version to 1.5
|
||||
- Added HOST_TIMEOUT and HOST_RETRIES to unrealircd.conf to customize host resolving times
|
||||
- Added Freelinks garbage collector (by Stskeeps :)), saves a lot of memory.
|
||||
Check include/config.h on configuring it (default values should do)
|
||||
- Fixed a /chghost and /chgident buffer overflow problem reported
|
||||
by Gravitron.
|
||||
- Added Solaris2.6 and 2.7 support
|
||||
- Added /dccdeny to add a temporary dccdeny, erased on /rehash -dccdeny
|
||||
- Added /undccdeny, if the EXACT file you type is found it is removed, else it uses wildcards to search
|
||||
- Made it so you can't add duplicate dccdenys
|
||||
- IRCstats.operators count fix. It MUST work now.
|
||||
- Fixed a bug in dccdeny
|
||||
- Added a logo to the IRCd startup and made it work a little bit better
|
||||
- Made version.c update when .c.SH is changed
|
||||
- Made sendto_serv_butone_token work with ALN prefixes too
|
||||
- Fixed an SQLINE bug
|
||||
- SVSFLINEs now sync when a server links
|
||||
- SVSFLINEs are now tokenized
|
||||
- Fixed the /nick othernick thing failing (ALN fault, lets hope it doesnt
|
||||
break other stuff)
|
||||
- Implemented DOUGH_HASH from hybrid IRCd
|
||||
- Ran Unreal thru another memory leak check
|
||||
- Fixed a whowas.c memory leak
|
||||
- Added /rehash -garbage which will clean up freelinks
|
||||
- NOTE on PTlinks so called make yourself oper bug.. cannot see how it
|
||||
can trigger at all.
|
||||
- Fixed up some E:line code
|
||||
- Added n:lines banning based on real names (E:lines override n:lines)
|
||||
- Fixed a minor bug in m_message
|
||||
- Fixed up and ALNized SERVER commands like @E8 SERVER name
|
||||
for instance.. sts tends to severely drool over this
|
||||
- Hopefully fixed the /msg unknownnick missing ERR_NOSUCHNICK bug
|
||||
- Fixed the cannot change to lowercase nick thing, and made
|
||||
find_server() call hash_find_server instead of hash_find_client
|
||||
*slaps* to stskeeps :P
|
||||
- Fixed a bug caused by sts's '/msg unknownnick missing ERR_NOSUCHNICK bug' fix :)
|
||||
- n:lines now checked on /setname (not checked for opers)
|
||||
- Fixed a bug caused by a line of code I forgot to remove ;P
|
||||
- Fixed the pesky \r bug caused by windows editors. Unreal ignores \r now
|
||||
in ircd.conf
|
||||
- For any sake, included the PTlink bugfix.., had some reports from
|
||||
zurna.net of it
|
||||
- Fixed an n:line bug(nice bug really? :P)
|
||||
- Removed behavoir of co-admins able to set +q in #channels
|
||||
(i think this was cos i was co-admin long time ago -sts)
|
||||
- Made IRCops able to talk through +b, suggested by The_Cat
|
||||
- Added /chgname nick :new realname and /svsname as an alias for it
|
||||
(suggested by ^Tux^)
|
||||
- Fixed Sts's favorite mistake
|
||||
- Indented Unreal .c files
|
||||
- PROTOCTL's can be said more than once now
|
||||
- Fixed a /dccdeny - /undccdeny bug reported by auspice
|
||||
- Fixed the negative oper count bug. Was caused by codemastr-coding(TM)
|
||||
- Removed the old non-caching motd functions
|
||||
- Some IRCstats.unknown fixes..
|
||||
- Took out compatibility for "Pyramid OS", is ancient and let them
|
||||
fix their fscked up os
|
||||
- If a user (unknown connection) floods 2K (2048 byte) the user is
|
||||
disconnected and tkl z:lined for 600 secs (10 mins). Idea by GZ
|
||||
from StarChat IRCd, code recoded by Stskeeps
|
||||
- A ircd.conf Y:Line class is not added if it contains max clients
|
||||
> (MAXCONNECTIONS - 15)
|
||||
- Flood activates only at unknown connections and only at 4K now ..
|
||||
- Fixed a bug in m_setname with n:lines
|
||||
- Added n:line support to m_chgname
|
||||
- n:lines are now checked after a rehash
|
||||
- Did a bugfix on ALN and non-ALN servers
|
||||
- Fixed a bug with /chgname with incorrect parameters to other servers
|
||||
- "Fixed" the /stats u bug?
|
||||
- Fixed +f not working (?)
|
||||
- Made the Own-protection just reduce the class maxli instead of bitching..
|
||||
- Did a dirty hack on ALN problem with colliding hash (will deny linking in
|
||||
wrong servers)
|
||||
- Fixed /stats C not showing N:lines, reported by auspice
|
||||
- Fixed codemastr (possible) fucked up the shell ircd script with
|
||||
overwriting it ...
|
||||
- Created /shun, /gline style. /shun +user@host time reason /shun -user@host
|
||||
will extend it so you can /shun +nick later
|
||||
- A little anti-0 fix in channel.c
|
||||
- Made MODE_X, MODE_I etc show mode change to user
|
||||
- Added channel mode +C to disallow channel CTCPs, /me (CTCP ACTION) is still allowed
|
||||
- Fixed a bunch of +H bugs
|
||||
- Fixed a bug where the channel was still shown in /who for +I users
|
||||
- First part of ZIP_LINKS
|
||||
- Fixed a typo in ./newnet
|
||||
- Made /close reset IRCstats.unknown ..
|
||||
- Made SVSO (ofcourse) IRCstats.operators--;
|
||||
- Another IRCstats.unknown fix. Hope this works (hacked from undernet code)
|
||||
- NETINFO protocol 0 is accepted as valid protocool (for services etc)
|
||||
- /stats s is now avail only for opers in mainstream
|
||||
- Took out "nick did a /userhost on you"
|
||||
- Reduced hashtable size
|
||||
- Took out sequent/dynix support
|
||||
- Fixed a bug that prolly was fixed by Potvin, but was "not fixed correctly"
|
||||
- Fixed a crash problem in register_user and most likely fixed the "strange
|
||||
vhost" thing, (was a dumb bug, mising ircsprintf)
|
||||
- Fixed the *** NickServ sets mode +creep SVS2MODE bug..
|
||||
- sendto_serv_butone_token_opt ()..
|
||||
- Small testing stuff
|
||||
- In ./Config it runs a quick test to see how many socket()s you can do
|
||||
- Fixed the double +cF notice on local connections exiting, ugly hack
|
||||
- Removed the last traces of unix sockets, flag 0x10 free now
|
||||
- Made all ircops able to use +F (totally this time)
|
||||
- /quote close do not show realhost of caller anymore
|
||||
- /shun accepts nick in add mode now (adds *@host)
|
||||
- Allowed /shunned users to use /pong now
|
||||
- Fixed (by DrBin) Shun and Gline bug, where they replaced eachothers ->type
|
||||
.... Learn that (= != ==) /me looks at Sts
|
||||
- You can now specify 0 as the time for any TKL (ex Glines, Shun) for it to be perm
|
||||
- Fixed a +L bug, (3.1 only) where any op could set +L
|
||||
- Added channel mode +u, "Auditorium". Makes /names and /who #channel only
|
||||
show @'s
|
||||
- Added config.h setting to disable oper overrides, NO_OPEROVERRIDE
|
||||
- Added Debug support to win32 makefile ... compile with syntax
|
||||
NMAKE -f makefile.win32 DEBUG=1
|
||||
inorder to have debug support ... leave the DEBUG=1 out for normal builds
|
||||
- Fixed ircsprintf.h ... we do want it to compile in debug mode yes ?
|
||||
- Made /addline write to correct place when you use -f
|
||||
- Made /zline not memory corrupt/crash, bad df bug
|
||||
- Fixed a counting bug with unknown connections, very hopefully
|
||||
- Fixed /htm giving wrong response when /htm to 1
|
||||
- Fixed /shun showing "1970" to permanently shunned users
|
||||
- Fixed ./Config showing freebsd 3.0 in freebsd 4
|
||||
- Made so badwords.*.conf accepts # comments
|
||||
- Added some default default badwords.message.conf and badwords.channel.conf
|
||||
- Made so auditorium mode shows users to @'s
|
||||
- Fixed a bug where /chgident would overflow into the *real* host if it where greater than USERLEN
|
||||
because _someone_ aka sts told it to check against HOSTLEN rather than USERLEN... reported by wshs
|
||||
- Fixed a bug in badwords not loading words correctly, and upped word limit
|
||||
to 50
|
||||
- Small fix with ./Config showing incorrect path of stddef.h
|
||||
- Made operkick be part of NO_OPEROVERRIDE
|
||||
- Made admins unable to be shunned
|
||||
- Made some socket errors which normally only showed up in DEBUGMODE, show
|
||||
up in ircd.log as well
|
||||
- Fixed a wrongly outputted message (in hash collision detect)
|
||||
- Removed aHush, not in use
|
||||
- Removed DISALLOW_MIXED_CASE and IGNORE_FIRST_CHAR, waste of space
|
||||
- Made IDLE_FROM_MSG stock define
|
||||
- Made IRCII_KLUDGE disappear :P
|
||||
- Fixed SENDQ_ALWAYS to be mainstream define (as always)
|
||||
- Removed s_gline, not in use, removed some modeless channel checks (not needed), removed an old zombie
|
||||
code, and removed a line from aHush that was missed
|
||||
- Added networks/seveneagle.network
|
||||
- /msg irc <command> now works whether or not WEBTV_SUPPORT is on
|
||||
- Moved /mode #channel ^ and ListBits() to #ifdef DEVELOP
|
||||
- Made it so servers behind a U:lined server (ex Juped Server) are U:lined too, helpful if HIDE_ULINES is
|
||||
on (from bahamut)
|
||||
- Added find_uline (from bahamut) for the new U:line code
|
||||
- Modified /map to work with the new U:line code
|
||||
- Redid s_err.c to be ALOT faster, based on bahamut's s_err.c (ALOT of
|
||||
work)
|
||||
- Fixed last R_LINE stuff (check_time_interval)
|
||||
- Fixed /setname desynch
|
||||
- Removed IsService(), and some wierd stuff
|
||||
- Broken INETD support removed
|
||||
- Removed some odd Clone stuff(?)
|
||||
- Added Blowfish encryption ability (SetSecure()), will extend to more
|
||||
better encryption
|
||||
- Fixed a typo in /stats z
|
||||
- Some more crypto stuff, will work on the new engine tommorow
|
||||
- You can now encrypt the I:line passwords using mkpasswd (must have CRYPT_ILINE_PASSWORD defined)
|
||||
- Editted Config to ask if you want encrypted I:line passwords
|
||||
- Made it so you can encrypt restart/die passwords (same as I:line passwords)
|
||||
- Editted Config to ask about encrypted restart/die passwords
|
||||
- Made it so you can *view* a channel topic using /topic #channel without being a member
|
||||
- Removed , support from /topic (not needed)
|
||||
- Removed count_channels (not in use)
|
||||
- Made a major is_banned speed up
|
||||
- Redid K:line and n:line checking to be alot faster
|
||||
- Fixed crypto stuff 100% :))
|
||||
- Added CRYPTOIRCd ('r') to version string
|
||||
- Added some more crypto stuff
|
||||
- /crypto <algoritm> <keyfile laying in keys/> <parameters>
|
||||
- Fixed a ->passwd bug caused by codemastr..
|
||||
- Added fclose() calls to the vhost, dccdeny, and chrestrict confs
|
||||
- Some V:line stuff (added VL protoctl, and parsing of the SERVER command for the proto and flags)
|
||||
- Fixed so that in +c it shows if a user is connected securely
|
||||
- Backported the passwd stuff, not needed.
|
||||
- Fixed a crash problem on /quit or /squit
|
||||
- Fixed some aligning in the VL PROTOCTL
|
||||
- Fixed some fucked up passwd stuff again ..
|
||||
- Fixed a little Client Protoctl problem
|
||||
- Fixed a crypto problem (forgot an #ifdef bad sts!)
|
||||
- Fully added V:lines (doesn't really do much till the next version, since old versions don't support it)
|
||||
- Added /stats v to list V:lines (/stats V still does vhost.conf)
|
||||
- Added OpenBSD 2.x support, thanks to noriko for donating the development shell
|
||||
- Added so stuff like Lost connection to, (report_error) only goes to realops
|
||||
- Added some more descriptive error messages
|
||||
- Added doc/crypto.doc describing the encrypted irc protocol
|
||||
- Fixed a sendto_serv_butone_token problem
|
||||
- Removed any trace of MD5, we use random() for nospoof now, this fixed a
|
||||
license problem too
|
||||
- Removed NOSPOOF_SEED01 and 02
|
||||
- Added VHP protoctl, (not in use in the synch). This makes virthost field
|
||||
in NICKv2 use the real virthost even if its +t. (Thanks to SL7)
|
||||
- Added support for the CR Java Chat auto join feature
|
||||
- Fixed a msg.h location problem ..
|
||||
- Added secure connections and openssl tracing to Config
|
||||
- Added regex portablity and checks in Config
|
||||
- Added a #define capability to config.h (DISABLE_USERMOD),
|
||||
disables /sethost, /setident, /chgname, /chghost, /chgident
|
||||
- Fixed a /rehash -garbage bug reported by Curt|s
|
||||
- Added networks/makenet (generates a network configuration file)
|
||||
- Added networks/staticedge.network
|
||||
- Fixed some host revealing nick collision stuff
|
||||
- Tokenized nick->nick PRIVMSG and NOTICE
|
||||
- Made it so you can remove a protoctl by putting a - in front
|
||||
- Fixed a bug in summon
|
||||
- Added protection against webproxies
|
||||
- Fixed TKL?
|
||||
- Added SJ3, removed the old
|
||||
- SJ3 bugfix, and another
|
||||
- Hopefully a res.c fix.
|
||||
- Fixed a +I bug
|
||||
- Fixed a more SJ3 bug
|
||||
- Updated networks/networks.ndx (bad sts!)
|
||||
- Added networks/linuxsquare.network
|
||||
- Added networks/chatstation.network
|
||||
[recall]
|
||||
- Fixed the pesky hostname bug
|
||||
- Fixed a NO_OPEROVERDIE bug reported by Taz
|
||||
- Fixed a +L bug
|
||||
- Fixed a typo in Config
|
||||
- SJ3 fixes. Let's hope this works (f*cken hell..)
|
||||
- Fixed a V:line bug
|
||||
- Added /infoserv (you can stop bugging us now skold ;P)
|
||||
- Removed ALN, and the ALN system.
|
||||
- Added base64 encoding instead, for ALN v2 (NS)
|
||||
- Removed a SJ3 debug msg
|
||||
- Removed SVSMODE +l support, and fixed servicestamp and +d support
|
||||
- Changed to ircu/hybrid6/unreal mix of numeric 005
|
||||
- Fixed a SJ3 Fake Direction loopbug (kills on nick collisions)
|
||||
- SJ3 fixes, loop fix
|
||||
- Added NS, new generation ALN.
|
||||
- Added llthangel's whoisfix.patch, Makes sure +hv users show up as
|
||||
%#channel instead of +#channel. Bug report by ^Fanta.
|
||||
- Changed find_server_quick to work with masks too ..
|
||||
- Removed UPING UDP socket. Only resfd opens a udp fd now
|
||||
- Small memory cleanup
|
||||
- NS introduction in sendto_serv_butone_token
|
||||
- Fixed Q:lined nick NickServ from <unregistered> on Nickname Server message
|
||||
- Fixed a problem in synch using acptr->name as info line
|
||||
- Introduced NS in SQLINE..
|
||||
- Fixed a problem in SVS2MODE not displaying mode changes, and well known
|
||||
why
|
||||
- Recoded SVSNOOP, but the IRCd doesn't get it at all??
|
||||
- added llthangel to credits
|
||||
- Changed channel.c so when you kick someone as halfop it doesn't show as an
|
||||
OperKick (unless you kick an op) (reported by ^Fanta, patch by llthangel)
|
||||
(rc2)
|
||||
- Fixed SVS2MODE bug with illegal modes
|
||||
- Fixed /notice @%+ bug, where it didnt work at all
|
||||
- Fixed a small chmode +u bug
|
||||
- Added sendto_chanops_butone because of codemastr's laziness
|
||||
- Fixed a few +u bugs
|
||||
- Fixed a +I bug (yes another one)
|
||||
- Changed channel.c so that when an opped non +q/+a Oper kicks a user who
|
||||
is +q/+a it invokes an OperKick (patch by llthangel)
|
||||
- Fixed the +lL (+Ll) bug, will first be fixed 100% when all is 3.1
|
||||
- Possible fixed the lopts bug
|
||||
- Fixed a egcs problem in Config, the strtok bug
|
||||
- Fixed the 'ulimit core size failed' bug (now checks whether it should
|
||||
set the core size to unlimited in ./Config
|
||||
- Changed s_user.c so that Opers will see +s channels in /whois
|
||||
(patch by llthangel)
|
||||
- +u now lists +a and +q people, and sends JOINs/PARTs to +a and +q people
|
||||
- Fixed a /mode (umode) typo where it said no such channel rather than no such nick,
|
||||
reported by llthangel
|
||||
- Disabled anything with time in /list options temporary, causes bugs
|
||||
- Fixed a little /chghost bug
|
||||
- Fixed a SJ3 bug with ban syncing to SJ2 servers
|
||||
- Fixed some cloak bugs(???)
|
||||
- Made it so you can /knock without a reason, and a few /knock cleanups
|
||||
- Made it so if the server name specified in the M:line does not contain a "."
|
||||
the ircd logs it to ircd.log and dies
|
||||
- Updated ./ircd to also say to look at ircd.log
|
||||
- Fixed a SQLINE synch bug
|
||||
- Added command line option -F to prevent the ircd to fork out
|
||||
- Fixed the f*cken TKL bug
|
||||
- Fixed a netsplit bug
|
||||
- Changed some find_server(name, NULL) to find_server_quick to speed up
|
||||
lookup of servers
|
||||
- Made find_server_quick a prototype, and made some work more quicker as
|
||||
well
|
||||
- Removed the : in :nick NICK newnick :timestamp
|
||||
- Added script ./update to help update, uses pull technology (wget, cvs)
|
||||
- Added script ./Setup which makes the user forced through Unreal.nfo, FAQ,
|
||||
Config, and all the things we want them to read/do to compile the IRCd
|
||||
- Updated PREFIX Client Protoctl
|
||||
- Added ^MrMike^'s command list, this one will be updated
|
||||
- Removed ID_CVS, hopefully fixing some bastard stuff
|
||||
- Fixed a last minute SJOIN bug
|
||||
[ last fixes ]
|
||||
- Re-added res_comp.c and win32.c and res_mkquery.c, which was damaged by
|
||||
the ID_CVS remove
|
||||
- Fixed a SHOWCONNECTINFO bug
|
||||
- Fixed a MODE_STRIPWORDS bug
|
||||
- Fixed a PART bug
|
||||
- Fixed a STRIPBADWORDS bug
|
||||
- Fixed a BotMOTD bug
|
||||
- Added Dianora's /userhost
|
||||
- Recoded /links using NS
|
||||
- Recoded /map a bit using NS, and added usercounts to Server struct
|
||||
- Some crazy time_t -> TS stuff, will save us some time in 2038
|
||||
- Fixed the "/mode #blah +Cplkf 1 moo 5:5" ( mode/#blah [+pClkf 1moo 5:5]
|
||||
problem
|
||||
- Hopefully fixed the +x problem
|
||||
- Fixed a bug with mkpasswd on OpenBSD
|
||||
- Added desynch +e warning, and updated ./update enough ...
|
||||
- Updated update to work better, and that you can use lynx instead of wget
|
||||
- Added #undef SHUN_NOTICES, to add notices for users who are shunned
|
||||
- Fixed bug with U:Lines should be able to privmsg/notice and recieve
|
||||
badwords :P, does not work in channels
|
||||
- Removed the old GLINE system, TKL is now standard.
|
||||
- Added INV_TRACK define, we want people testing this.
|
||||
- Fixed the -1 usercount bug, found by codemastr, fixed by Stskeeps
|
||||
- Fixed a +h bug reported by Dukemaster
|
||||
- Added IRIX support (does it work?)
|
||||
- Fixed crypter so it actually functions (Makefile now sets mode 700) and
|
||||
it encrypts X and N lines too.
|
||||
- Fixed empty mode sends in register_user, reported by Bagge
|
||||
- Added some portability stuff
|
||||
- Fixed some empty-line/missing parameter stuff in dccdeny, vhost,
|
||||
and dynconf, chrestrict
|
||||
- Made vhost strip too long vhosts
|
||||
- Removed INV_TRACK
|
||||
- Fixed a typo in /vhost
|
||||
- Fixed some problems/typos/notlookingsogood (TM) bugs, in the tkl code
|
||||
- Fixed ban merging/similar bug in SJOIN
|
||||
- Made /kick for opers only be possible for netadmin/techadmin
|
||||
- Fixed /server so it doesnt support SERVER name :info anymore..
|
||||
[Unreal3.1.1-Darkshades]
|
||||
- Fixed /userhost showing "unknown" as username for a lot of people
|
||||
- Fixed ./update error
|
||||
- Fixed a NO_FDLIST define problem in send.c and channel.c
|
||||
- Added define PROPER_COREDUMP, will not launch s_segv when done and make
|
||||
proper coredumps
|
||||
- Fixed the G:line bugs, i hope - moved tkl_sweep into a loopstruct
|
||||
- Removed the ERR_NOTONCHANNEL message =P
|
||||
- Made some memory cleanups on the command list (saved 268 bytes)
|
||||
- More memory cleanups, changed aClient->refcnt to a signed char,
|
||||
aClient->hopcount to unsigned char
|
||||
- Changed aChannel->mode.msgs & .per to unsigned short, and changed
|
||||
.kmode to unsigned char
|
||||
- Changed aChannel->users to unsigned short (max 65536 users per channel)
|
||||
and FloodOpt->nmsg to an unsigned short
|
||||
- Removed SUMMON totally
|
||||
- Fixed another SJOIN problem, but not the exact one i was looking for
|
||||
- Added IRCd bot (raw commands) and the IRC bot, webtv.c
|
||||
- Added WHOIS command (working) to IRCbot-
|
||||
- Fixed a fun doublechar token problem (the AA unknown command)
|
||||
- Removed _alot_ of unused variables
|
||||
- Fixed *some* -Wall warnings (still alot left to fix)
|
||||
- Fixed some more -Wall warnings
|
||||
- ./update now checks when you specify wget if it exists, if not it tries lynx
|
||||
- Cached MOTDs are now dynamically allocated (saves alot of memory)
|
||||
- Made aClient->passwd dynamically allocated (saves 32bytes per user/server)
|
||||
- Fixed a NOTICE crash bug, reported by EJ
|
||||
- Removed a excessive va_end in send.c
|
||||
- Fixed a bug when running the ircd with -h
|
||||
- Readded /summon to return ERR_SUMMONDISABLED (required by RFC1459)
|
||||
- Made /users return ERR_USERSDISABLED (required by RFC1459)
|
||||
- Removed all utmp calls
|
||||
- Fixed Something ... cant remember what ... oh yes, fixed if (sptr->passwd[0]) to if (sptr->passwd)
|
||||
it stopped the server crashing !
|
||||
- Made Code revisions so that we can compile on Win32, and fixed some of sts's late nite
|
||||
coding sessions(dbin)
|
||||
- Fixed some REAL dumb find_server_quick bugs
|
||||
- Fixed a wierd NOTICE bug
|
||||
- Modified and fixed the NOTICE bug totally, with some waste of the nospoof
|
||||
system
|
||||
- Fixed a bug where +K could be set when +i was not (reported by rapta)
|
||||
- Made it so if you set -i on a channel that is +K it sets -iK
|
||||
- Fixed whowas so it no longer reports away messages
|
||||
- Made major changes to +I (may need debugging)
|
||||
- When you set +I while on a chan it sends a PART to the rest of the channel
|
||||
- When you set -I which on a chan it sends a JOIN to the rest of the channel
|
||||
- Net/TechAdmins now receive a JOIN/PART when you JOIN/PART a channel
|
||||
- Net/TechAdmins can now see +I users in /names
|
||||
- Fixed a typo in s_err.c reported by TRON
|
||||
- Fixed more -Wall warnings
|
||||
- Added #define LIST_SHOW_MODES to show channel modes in a /list (NOTE: only shows modes, not params)
|
||||
- Fixed /mode # + bug reported by PhatNet/Mind
|
||||
- Possible fixed the SJOIN kick bug (mode +Q), servers can now always kick
|
||||
- Added NEW DNS resolver (Win32 Only atm) ... use by defining NEWDNS
|
||||
- FIXED "BUG" caused by NEWDNS *shrug*
|
||||
- Fixed the passwd NICK problem
|
||||
- Fixed the problem with NewDNS (ive always known about it but never known how it happens) [a pointer prob]
|
||||
- Redhat 7 (broken string.h problem), ./Config
|
||||
- Added SSL connections, open ports with P:ip:s:*:port to make them SSL
|
||||
ports, made after hq.alert.sk's implementation
|
||||
- Added P:line flags C - client only, S - server only, J - java clients (replaces CONFROOM_JAVA_PORT)
|
||||
- Fixed up a few various things
|
||||
- Made SHOWCONNECTNOTICES work properly again, also with SSL
|
||||
- Changed ./Config to detect SSL better, and generate certificates properly
|
||||
- Removed some annoying logging in ssl.c
|
||||
- Merged in changes from TEMPcvs branch
|
||||
- Fixed a /UNSQLINE para problem, found by Joe
|
||||
- #define SHOW_SECRET now allows all ircops to see +s channels in /whois. If not defined, only net/tech admins can.
|
||||
- Added #define CENSOR_QUIT, for WaveRide
|
||||
- Fixed hashing bug that caused the server to crash on exit
|
||||
- Made find_server_b64_or_real be a little faster, possible fixing bug
|
||||
- Made /stats s checking check for sanity or insanity (ignore them for 0
|
||||
numerics)
|
||||
- Fixed SJOIN (mp2parv) bug, that caused insane desynchs
|
||||
- Changed Cannot find server message to be to sendto_realops
|
||||
- Fixed a warning in CENSOR_QUIT
|
||||
- Fixed the G:Line user wrongly matching (ip-alike addys didnt check user)
|
||||
- Added protoctl SJB64, which adds B64-9 timestamps to many timestamping
|
||||
operations
|
||||
- Added ircsprintf %B (base64-9^10) with ! as prefix, and %b (no prefix)
|
||||
- Fixed a few places where for some reason sprintf() was used rather than ircsprintf()
|
||||
- Tokenized ADCHAT, TECHAT, NACHAT, SWHOIS, and SVSKILL
|
||||
- Fixed a bug in opermode that would make it display a notice on invalid modes
|
||||
- Fixed a bug where the Found your hostname (cached) message was messed up
|
||||
- Fixed a memory leak in the new password code
|
||||
- Fixed a sptr->passwd bug
|
||||
- Removed the unnecessary param from IsULine() it is now just IsULine(sptr)
|
||||
- ircsprintf() is now used everywhere
|
||||
- Fixed the SJB64 bugs that misplaced users
|
||||
- Removed sendto_helpops and replaced it with sendto_umode
|
||||
- Added is_chanownprotop() checks if +q +a or +o with 1 loop
|
||||
- Added chmode +N (no nick changes) (opers, ulines, +o +q or +a can override)
|
||||
- Added some fixes on the SJB64 crashing bug, and added tokenization in
|
||||
channel messsages (yahooooo!)
|
||||
- Fixed the /list bug, reported by many people
|
||||
- Fixed a linking bug (where did that come from)
|
||||
- Fixed bug where duplicate numerics could occur
|
||||
- Fixed the hashing bug (thank you ROXnet ...)
|
||||
- Fixed a wierd channel message bug ||
|
||||
- Fixed a bug where non-NS servers would crash when linking
|
||||
- Added TS2ts (supporting the SJB64 stuff), and fixed the !0 timestamp bug
|
||||
- Fixed the /list only showing 64 channels bug! Also sped /list up in the process
|
||||
- Probably fixed the hash bug, again.
|
||||
- Possible fixed some b64 bugs
|
||||
- Autodetects /usr/sbin/openssl now, thanks trinity
|
||||
- Tokenized PING and PONG
|
||||
- Fixes a missing : in SJOIN
|
||||
- Possible fixed a internal server list bug
|
||||
- When IRC WebTV bot cannot find a command, it sends it to parse() instead,
|
||||
thanks [Real]
|
||||
- Added burst.c in extras/
|
||||
- Moved lopt and whowas to anUser (saves 8 bytes for every server)
|
||||
- Removed aClient->history, not used (saves 4 bytes for every user/server)
|
||||
- Fixed compile error with SSL
|
||||
- Fixed a /list and /quit bug
|
||||
- Fixed the masskill bug with replacing "Server Exists" code.. i removed it
|
||||
accidentialy last time
|
||||
- Added /botserv /bs command, patch by ATHnet.de
|
||||
- /who's now show +i users for opers in channels, idea by Strider@ChatCircuit
|
||||
- Fixed NO_OPEROVERRIDE bug reported by otherguy
|
||||
- #define STATSWRITING will make ircd write ircd.stats every 4 seconds,
|
||||
idea/sortof by WaveRide
|
||||
Format of ircd.stats:
|
||||
<global users>
|
||||
<global invisible users>
|
||||
<global servers>
|
||||
<irc operators>
|
||||
<unknown connections>
|
||||
<local clients>
|
||||
<local servers>
|
||||
<local max clients>
|
||||
<global max clients>
|
||||
- Fixed +d (deaf) so it works again
|
||||
- Removed some leftovers from the &channel code (which fixed a minor bug as well)
|
||||
- Fixed a SJOIN3<->services problem
|
||||
- Fixed a typo where it still said +I instead of +V in an error message
|
||||
- Fixed the "Bad file descriptor" bug in SSL. This bugfix may be a bit risky
|
||||
as it is manipulating BIO fds. The reason openssl freaked at this, was
|
||||
that when a fd is closed, we change fds from 4 to 3 etc, in other words,
|
||||
we renumber fds. SSL didn't know this and if you would call SSL_set_fd it
|
||||
would close the connection/crash. Added SSL_change_fd() to change the FD
|
||||
directly through BIO_set_fd.
|
||||
- Fixed the masskill bug, hopefully. Was a delimiter/number array bug in
|
||||
find_server_b64_or_real, causing negative base64 to be accepted (bad).
|
||||
value 1-256 will never be able to be in two letters (a server name)
|
||||
- Fixed \r\n bug, hopefully
|
||||
- made SSL use same cert client/server
|
||||
- Fixed help.c bug reported by Curt|s
|
||||
- Different fixes, unreal.tspre.org -> unrealircd.com
|
||||
- Fixed-fixed-fixed the \r\n bug and removed some useless cpu wasting code
|
||||
- Removed remapping fds, and did a severe select() speedup, suggested by
|
||||
Demiurgus. Should speed CPU a lot
|
||||
- Updated some messages
|
||||
- Fixed-fixed-fixed the U:line branching thing made by codemastr
|
||||
- Fixed a G: line-turn-into Z:line problem, reported by eYe-Man
|
||||
- Added SJOIN (SJ3 only) instead of JOIN/MODE in /join and discovered a bug in
|
||||
SJOIN code, that if the line doesnt have a " " appeneded, it wont take the
|
||||
last users or first for that sake. Hopefully patched SJ3 code for it
|
||||
- Added OPT target OPT_SJB64 and OPT_NOT_SJB64
|
||||
- Made SSL server<->server work, using __blocking__ sockets (this is only
|
||||
in connect moment thou) -stskeeps
|
||||
- Removed 1.0 msg/s when not in HTM
|
||||
- Fixed cutoff server infos in synch
|
||||
- Added so /gline and /shun accepts time periods in 1d2h3s etc. a recode of
|
||||
some potvin stuff
|
||||
- Added so blocking is only effective when SSL_connect()'ing
|
||||
- Fixed a couple of SJOIN/Link problems detected by Curt|s
|
||||
- Changed some stuff with SSL, you may want to seperate server.pem into
|
||||
server.key.pem and server.cert.pem (or "rm Makefile" and "./Config")
|
||||
- Fixed a couple of SJOIN/Link problems detected by Curt|s
|
||||
- Made /stats C show SSL/Zip flags
|
||||
- Fixed the Stskeeps "mass G:line on /rehash" (tm) bug
|
||||
- Removed last point of confusion in ALN/NS
|
||||
- Removed CRYPTOIRCD (replaced by SSL)
|
||||
- Added support for some more SJB64 stuff
|
||||
- Added some more support for some even more SJB64 stuff
|
||||
- Added some network files and even more network files
|
||||
- Fixed some copyright stuff in ssl.c
|
||||
- Fixed a /map problem
|
||||
- Updated doc/conf.doc and doc/example.conf
|
||||
- Fixed a bug where /map showed U:lines while HIDE_ULINES was set
|
||||
- Removed "on network" in /whois oper
|
||||
- Added code to makenet to stop fake submissions
|
||||
- Fixed some /whois channels code, which may break +I /whois
|
||||
- Fixed overflow in SJOIN
|
||||
- Added SMO *, all users
|
||||
- If a +r user is /who'ed, it shows a "r" in flags field. Suggested by
|
||||
Mirar.
|
||||
- Fixed a typo in ssl.c
|
||||
- Added SICI information, Donation information, fixed a ./Config problem
|
||||
overwriting certs ..
|
||||
- Added hatblade's files
|
||||
- Added some credits
|
||||
- Fixed a real bad /whois bug, reported by BiGi
|
||||
- Fixed a problem with /sajoin .. atleast possible
|
||||
- Added infofield in /stats L for clients/listeners
|
||||
- Fixed a blocking socket thing
|
||||
- Fixed up /stats L bug
|
||||
- Changed CONNECTTIMEOUT to 30sec
|
||||
- Changed some _more_ credits
|
||||
- Fixed compile error found by Headbang
|
||||
- #define CHINESE_NICK will make you able to use chinese nicks
|
||||
thanks to RexHsu and Aim
|
||||
- Fixed up CHINESE_NICK and JAPANESE_NICK, suggested by Aim, see
|
||||
include/config.h
|
||||
- Config change in SSL.h detection part
|
||||
- SSL error change to sendto_umode(UMODE_JUNK)
|
||||
- Fixed a hash error, topic problem
|
||||
|
||||
[fixes]
|
||||
- Fixed a +d bug (it didnt send ` prefixes)
|
||||
- Fixed a SJOIN bug, i think, thanks to Web
|
||||
- Fixed a chinese nick thing, thanks to miCro and RexHsu
|
||||
- Fixed a typo in config.h
|
||||
- Fixed a bug in sendto_channel_prefix_tok reported by Strider@ChatCircuit
|
||||
- Fixed P:line bug, caused by codemastr(tm) coding, (masskills), reported by
|
||||
sidv@sid-kitty-land.org
|
||||
- Some few fixes from CodeM and Barubary:
|
||||
- Fixed /whois to show users for opers when not in the channel.
|
||||
- Fixed /whois to allow only global eyes opers to see user modes.
|
||||
- Fixed /whois to not show idle times of global opers to anyone except
|
||||
another global oper or services.
|
||||
- Fixed /who to show users for opers when not in the channel.
|
||||
- Fixed restart bug, reported by RaYmAn
|
||||
- Fix-fixed " Fixed /whois to not show idle times of global opers to
|
||||
anyone" patch
|
||||
- Fixed a recently found exploit involving reverse DNS (fix from bahamut)
|
||||
- Made more openssl binary detection using 'which'
|
||||
- Added message when trying to join a +z channel
|
||||
+555
@@ -1,3 +1,558 @@
|
||||
OLD CHANGES:
|
||||
|
||||
*** Unreal3.1 *** (final)
|
||||
- Moved REMOVE_ADVERTISE a little
|
||||
- Fixed bug where you could /mode #test +L #test (link a channel to
|
||||
itself)
|
||||
- Fixed a bug where a +L channel didn't have to be valid ex /mode #test
|
||||
+L blah would work, dangerous if 0 is used
|
||||
- Fixed /map showing U:lines even if HIDE_ULINES was set oops :)
|
||||
- Fixed a bug where opers couldn't walk through +l
|
||||
- Fixed a bug where /mode #test +f *N:N was recognized the same as +f N:N
|
||||
(if *2:3 was set then /mode #chan +f 2:3 it wouldn't set, thought it was the same)
|
||||
- Removed src/cio_init.c src/cio_main.c src/win32.c src/win32.rc as we don't
|
||||
use that anymore
|
||||
- Added ircsprintf() (ircsprintf.c and ircsprintf.h)
|
||||
- Converted to use ircsprintf
|
||||
- Now using sprintf_irc from ircu, as %li would screw up the hybrid variant
|
||||
- Some fdlist updates from bahamut
|
||||
- Header change
|
||||
- Some more Header change
|
||||
- Added agent.c for IRCd Agents (remote control etc)
|
||||
- Fixed up some make misalignments
|
||||
- Fixed +I /names
|
||||
- Removed TESTNET defines
|
||||
- Added poll() engine from bahamut (hard!)
|
||||
- Made /vhost send failed login's to +e
|
||||
- Made /stats V/R/F use raw rather than NOTICE
|
||||
- Fixed some poll() engine problems
|
||||
- Some more problems with poll()
|
||||
- Removed the \2's from the is a Coder msg, whywere they there, no one
|
||||
knows (codemastr) Because i was the only one using it =P (Stskeeps)
|
||||
- Fixed /names problem..
|
||||
- Made /mode <nick> use get_mode_str() to list the modes
|
||||
- Made /lusers info be pre-calculated :) Saves hell of a lot CPU time
|
||||
- Made /stats z/Z oper only
|
||||
- Fixed SJOIN bug only totally fixed when all servers upgraded
|
||||
- Moving old 3.0 stuff to Changes.old
|
||||
- Re-added README.ALPHA
|
||||
- Fixed some more SJOIN bugs
|
||||
- Fixed NICKv2 bugs with non NICKv2
|
||||
- Fixed up /info, there will be a better layout for this
|
||||
- Fixed up some poll() engine bugs (i hope)
|
||||
- Start of telnet proxy scan code
|
||||
- Took telnet proxy scan code out again =/ It really fux0red up
|
||||
- Added networks/treklink.network
|
||||
- Added options to /HTM, ON/OFF TO (what load do we auto start at) NOISY/QUIET (toggle whether HTM should
|
||||
announce when it starts)
|
||||
- Fixed a little bug where /part didn't show the correct channel case
|
||||
- Made unresolved host connections go faster, idea from PTLink IRCd v3.5.4 great job :)
|
||||
- Removed support for & and + channels (i hope) and made m_message more
|
||||
handy and support for /notice +#channel, %#channel etc etc
|
||||
- Topic fix?
|
||||
- Incorperated the bahamut m_list and send_list, it's faster and smaller :P
|
||||
- When /HTM is active /list is disabled to non-opers
|
||||
- OperMOTD is now loaded into memory (faster, saves memory, and CPU)
|
||||
- Added /rehash -omotd to rehash the OperMOTD
|
||||
- Added unrealircd.conf option for SETUID and SETGID if ircd started as root. And you can turn that off/on
|
||||
by defining/undefining BIG_SECURITY_HOLE in config.h
|
||||
- Fixed small bug in ircd.c and dynconf.c (not using #ifndef BIG_SECURITY_HOLE)
|
||||
- Removed & and + channels for sure..
|
||||
- All MOTDs, RULES are read into memory (including T:lines)
|
||||
- Added /rehash -bmotd (BotMOTD) /rehash -motd/-rules (MOTDs/RULES)
|
||||
- Fixed memory leak in dynconf.c, allocated 2048 on each /rehash -dynconf
|
||||
- Fixed _serious_ memory leak in cloak.c, abused 128 bytes every time
|
||||
someone went +x
|
||||
- Alphabeticalized making..
|
||||
- flush_connections more better
|
||||
- Fixed calls to check_registered*, more CPU spare:)
|
||||
- Fixed a bug in /tsctl svstime
|
||||
- Fixed a bug in the cached MOTDs
|
||||
- Added support for remote /htm
|
||||
- Even more tokensation
|
||||
- Removed IRCII_KLUDGE
|
||||
- Fixed /lusers wrong reply
|
||||
- Removed V28PlusOnly define
|
||||
- Fixed a bug in channel_modes()
|
||||
- More and more and more tokenzation >:)
|
||||
- Fixed a bug in m_user
|
||||
- Removed have_ops() and is_deopped(), they weren't used
|
||||
- Reorganized can_send() to make it faster
|
||||
- More tokenzation >:)
|
||||
- Fixed ircsprintf() %lu error when %lu == 0
|
||||
- Added devel/ directory, put ideas/specifications in here
|
||||
- Added devel/new.plines to describe new upcoming P:lines
|
||||
- Added NO_IDENT_CHECKING in config.h
|
||||
- Fixed bugs in get_version() and also made it a bit faster
|
||||
- Fixed RPL_MYINFO problem with UnrealIRCd/32 version and ircII
|
||||
misunderstanding it, prob other clients too
|
||||
- Updated msg.h hashtable to get most used commands more close
|
||||
- Removed some unused defines in msg.h
|
||||
- Removed dusers (not in use)
|
||||
- m_user stuff
|
||||
- Made use of : 's in between ircd.conf field working, using this format:
|
||||
A:"Test test:Moo":Moo:moo
|
||||
- Fixed some /lusers miscalculations
|
||||
- Added INET6 patch, now for making it work :P
|
||||
- More INET6 patching (not working atm)
|
||||
- INET6 compiles now, works? :P
|
||||
- Fixed some WebTV stuff
|
||||
- Made the m_message routine not do a user hash lookup if it starts with #
|
||||
- Removed some fields in structures like aClient etc that was unused
|
||||
- Removed Client->iown and the OWNLOGON code
|
||||
- Removed Channel->blist
|
||||
- Removed heaps of unused variables in functions
|
||||
- Fixed THE G:line bug, missing parameter
|
||||
- Hopefully fixed some calculation bugs
|
||||
- +F bugfix
|
||||
- In TKL a gline shows reason in quit message now
|
||||
- Fixed the SVSMOTD OPERMOTD and BOTMOTD bug, suggest parantheses problem
|
||||
- In K:Line it shows reason in quit message now, not sure about AKILL
|
||||
- Experimental NOTE in register_user added
|
||||
- Implemented hybrid scache.c, created by orabidoo and Dianora
|
||||
- Fixed /connect scache problem, and actually fixed the OPERMOTD bug
|
||||
- The hopefully last calculation bug..
|
||||
- Made bans and exceptions actually sync *ducks*, done in old fashion MODE
|
||||
manner, better than making BS (bansync) or incorporating it in SJOIN
|
||||
- Made /opermotd oper-only, bug reported by Bagge@ROXnet
|
||||
- Made TOPICs be dynamically allocated - saves heaps memory
|
||||
- Added hybrids/+cs'es /whowas system. Improved so it doesn't use static
|
||||
character arrays, and uses dynamically allocated strings instead
|
||||
- Added UMODE2 PROTOCTL and command, when a usermode change it uses :nick
|
||||
UMODE2 +-umodes. token = '|'
|
||||
- Made CONNECTFAST default, will ensure faster connecting
|
||||
- Updated /helpop to list more commands and new modes
|
||||
- the 1-message-per-2-sec not applied to opers
|
||||
- Topic fix with dynamic allocation
|
||||
- 1-message-per-2-sec now 1-message-per-1.5-sec
|
||||
- Removed TS fix notice
|
||||
- Removed User %s tries to become server notice
|
||||
- Made MAXCHANNELSPERUSER an unrealircd.conf option
|
||||
- Changed unrealircd.conf version to 1.2
|
||||
- Credit changes..
|
||||
- Uses dgets() from hybrid now, should be a minor CPU fix
|
||||
- Moved WebTV support, and +I disabling to an unrealircd.conf option
|
||||
- Updated doc/conf.doc, removed references to DALnet, and fixed typos
|
||||
- Moved doc/Elite.Changes to doc/History/Elite.Changes, away away away with
|
||||
that one
|
||||
- Tokenized SQLINE
|
||||
- Recoded dynconf, validates data too now
|
||||
- Fixed a /list bug that crashed the server
|
||||
- Fixed a minor bug in the new dynconf
|
||||
- Fixed a bug in vhost.conf and dccdeny.conf where if the line was not valid it would crash, now it just
|
||||
ignores that line
|
||||
- Added comment support to vhost.conf, dccdeny.conf, and chrestrict.conf (makes loading faster)
|
||||
- Fixed one of those "code, what the fuck were you smoking" bugs in m_svsmode etc
|
||||
(what = MODE_DEL - eh?)
|
||||
- Added AUTO_JOIN_CHANS to unrealircd.conf to force a user to join 1 or
|
||||
more channels on connect, read networks/unrealircd.conf for more info
|
||||
- Added networks/axenet.network
|
||||
- Possible change in the -1 operator bug
|
||||
- /info changes
|
||||
- Unreal3.1-beta1 release
|
||||
- Added a bunch of networks
|
||||
- Updated doc/conf.doc
|
||||
- Updated networks/networks.ndx cause someone *cough* sts *cough* forgot
|
||||
- Updated m_svso to -H the user
|
||||
- Added Solaris2.5 support and cleaned up Solaris2.x support
|
||||
- A little /list fix
|
||||
- Changed the unrealircd.conf version to 1.3
|
||||
- Fixed a bug in the AUTO_JOIN_CHANS
|
||||
- Added OPER_AUTO_JOIN_CHANS to unrealircd.conf, same as AUTO_JOIN_CHANS
|
||||
but is called on /oper
|
||||
- Readded /ns, /cs, etc but this time they point to /nickserv, /chanserv,
|
||||
etc
|
||||
- Removed IRCd Agents and made it so all opers can join unlimited channels
|
||||
- Updated src/chkconf.c to recognize new lines
|
||||
- Added "/mode #chan qa" support to send a list of +q users / +a users in a chan
|
||||
- Fixed "/mode #chan qa" ... see channel.c m_join for the problem ... sts you owe me a tenner =P ..
|
||||
- Removed Reg1, Reg2 etc etc and register. Modern compilers optimize better
|
||||
that way
|
||||
- Sidenote: /msg nick@ bug can easily be caused in m_message
|
||||
- Unreal3.1-beta1(build2)
|
||||
- Disabled ID_* stuff but is still there, saves memory
|
||||
- Made user->virthost a dynamic string now
|
||||
- Fixed a virthost bug again, and starting to wreck in meow's badword patch,
|
||||
gonna be a swearword filter and new version of REMOVE_ADVERTISING
|
||||
- Added meow's badword patch
|
||||
- Moved the badword patch chmode to +G (G Rated Channel) cause thats what some other ircd's use so lets try
|
||||
and keep cross compatibility :P
|
||||
- Added networks/interturk.network
|
||||
- Fixed a bug in /names thanks to lucas for reporting it and fixing it :)
|
||||
- Changed the badword umode to +G also
|
||||
- Removed some unused variables from dynconf.h
|
||||
- Cleaned up the dynconf and network file code to use less memory
|
||||
- Fixed the kill bug in NICKv2, caused by codemastr(TM) code
|
||||
(was calling m_join before sending NICK info to other servers)
|
||||
- SO NO IT WAS NOT MY FAULT *slap* (Stskeeps) -
|
||||
- Did an attempt on fixing the /msg nick@ bug
|
||||
- /stats s in DEVELOP mode will show cached scache hosts
|
||||
- Added src/aln.c, for the new ALN system, read doc/aln.doc
|
||||
- Minor ALN fix
|
||||
- Introduced ALN system, look at send.c::sendto_serv_butone_nickcmd, a
|
||||
little better, we can scrape some functions now
|
||||
- Some more ALN stuff, the server now understands |<aln> prefixes,
|
||||
find_client too
|
||||
- Added the "IRC Operators Message Of The Day" to /opermotd
|
||||
- Made Y:1 class in makeconf max 250 (we might get some complaints here,
|
||||
but people can change to their limit, but we have to make it this low
|
||||
because else the program rj had can flood/crash the server
|
||||
- Fixed a ALN problem with |nick persons getting killed off
|
||||
- Removed an OLD EliteIRCD reference in ./Config, thanks to Linus
|
||||
- Moved the ALN prefix to @ instead of |, as | would conflict with
|
||||
clients
|
||||
- Fixed ALN problem with it masskilling everyone :P
|
||||
- ** RELEASE OF UNREAL3.1-BETA2 **
|
||||
- Small Linux-ALPHA fix
|
||||
- A small vsendto_prefix bugfix(?)
|
||||
- Added /stats e to list e:lines
|
||||
- Fixed a small /list problem
|
||||
- Added #define USE_LOCALE, uses locale stuff in *nix versions
|
||||
to make better toupper() tolower(). might help some chinese nick
|
||||
things too
|
||||
- Fixed a few minor NOSPOOF things
|
||||
- Changed ircsprintf() to work with %lu with 0-5
|
||||
- Added unreal-test.network, for the upcoming Unreal TESTnet (for beta
|
||||
testers and developers only)
|
||||
- Using MyFree/MyMalloc now instead of MyRealloc.. lets hope it fixes
|
||||
something
|
||||
- Fixed the virthost (possible), need extensive testing
|
||||
- Possible fix of some server_estab problems
|
||||
- Added networks/cc2.network, networks/kissland.network, and networks/digital-irc.network
|
||||
- Changed unrealircd.conf version to 1.5
|
||||
- Added HOST_TIMEOUT and HOST_RETRIES to unrealircd.conf to customize host resolving times
|
||||
- Added Freelinks garbage collector (by Stskeeps :)), saves a lot of memory.
|
||||
Check include/config.h on configuring it (default values should do)
|
||||
- Fixed a /chghost and /chgident buffer overflow problem reported
|
||||
by Gravitron.
|
||||
- Added Solaris2.6 and 2.7 support
|
||||
- Added /dccdeny to add a temporary dccdeny, erased on /rehash -dccdeny
|
||||
- Added /undccdeny, if the EXACT file you type is found it is removed, else it uses wildcards to search
|
||||
- Made it so you can't add duplicate dccdenys
|
||||
- IRCstats.operators count fix. It MUST work now.
|
||||
- Fixed a bug in dccdeny
|
||||
- Added a logo to the IRCd startup and made it work a little bit better
|
||||
- Made version.c update when .c.SH is changed
|
||||
- Made sendto_serv_butone_token work with ALN prefixes too
|
||||
- Fixed an SQLINE bug
|
||||
- SVSFLINEs now sync when a server links
|
||||
- SVSFLINEs are now tokenized
|
||||
- Fixed the /nick othernick thing failing (ALN fault, lets hope it doesnt
|
||||
break other stuff)
|
||||
- Implemented DOUGH_HASH from hybrid IRCd
|
||||
- Ran Unreal thru another memory leak check
|
||||
- Fixed a whowas.c memory leak
|
||||
- Added /rehash -garbage which will clean up freelinks
|
||||
- NOTE on PTlinks so called make yourself oper bug.. cannot see how it
|
||||
can trigger at all.
|
||||
- Fixed up some E:line code
|
||||
- Added n:lines banning based on real names (E:lines override n:lines)
|
||||
- Fixed a minor bug in m_message
|
||||
- Fixed up and ALNized SERVER commands like @E8 SERVER name
|
||||
for instance.. sts tends to severely drool over this
|
||||
- Hopefully fixed the /msg unknownnick missing ERR_NOSUCHNICK bug
|
||||
- Fixed the cannot change to lowercase nick thing, and made
|
||||
find_server() call hash_find_server instead of hash_find_client
|
||||
*slaps* to stskeeps :P
|
||||
- Fixed a bug caused by sts's '/msg unknownnick missing ERR_NOSUCHNICK bug' fix :)
|
||||
- n:lines now checked on /setname (not checked for opers)
|
||||
- Fixed a bug caused by a line of code I forgot to remove ;P
|
||||
- Fixed the pesky \r bug caused by windows editors. Unreal ignores \r now
|
||||
in ircd.conf
|
||||
- For any sake, included the PTlink bugfix.., had some reports from
|
||||
zurna.net of it
|
||||
- Fixed an n:line bug(nice bug really? :P)
|
||||
- Removed behavoir of co-admins able to set +q in #channels
|
||||
(i think this was cos i was co-admin long time ago -sts)
|
||||
- Made IRCops able to talk through +b, suggested by The_Cat
|
||||
- Added /chgname nick :new realname and /svsname as an alias for it
|
||||
(suggested by ^Tux^)
|
||||
- Fixed Sts's favorite mistake
|
||||
- Indented Unreal .c files
|
||||
- PROTOCTL's can be said more than once now
|
||||
- Fixed a /dccdeny - /undccdeny bug reported by auspice
|
||||
- Fixed the negative oper count bug. Was caused by codemastr-coding(TM)
|
||||
- Removed the old non-caching motd functions
|
||||
- Some IRCstats.unknown fixes..
|
||||
- Took out compatibility for "Pyramid OS", is ancient and let them
|
||||
fix their fscked up os
|
||||
- If a user (unknown connection) floods 2K (2048 byte) the user is
|
||||
disconnected and tkl z:lined for 600 secs (10 mins). Idea by GZ
|
||||
from StarChat IRCd, code recoded by Stskeeps
|
||||
- A ircd.conf Y:Line class is not added if it contains max clients
|
||||
> (MAXCONNECTIONS - 15)
|
||||
- Flood activates only at unknown connections and only at 4K now ..
|
||||
- Fixed a bug in m_setname with n:lines
|
||||
- Added n:line support to m_chgname
|
||||
- n:lines are now checked after a rehash
|
||||
- Did a bugfix on ALN and non-ALN servers
|
||||
- Fixed a bug with /chgname with incorrect parameters to other servers
|
||||
- "Fixed" the /stats u bug?
|
||||
- Fixed +f not working (?)
|
||||
- Made the Own-protection just reduce the class maxli instead of bitching..
|
||||
- Did a dirty hack on ALN problem with colliding hash (will deny linking in
|
||||
wrong servers)
|
||||
- Fixed /stats C not showing N:lines, reported by auspice
|
||||
- Fixed codemastr (possible) fucked up the shell ircd script with
|
||||
overwriting it ...
|
||||
- Created /shun, /gline style. /shun +user@host time reason /shun -user@host
|
||||
will extend it so you can /shun +nick later
|
||||
- A little anti-0 fix in channel.c
|
||||
- Made MODE_X, MODE_I etc show mode change to user
|
||||
- Added channel mode +C to disallow channel CTCPs, /me (CTCP ACTION) is still allowed
|
||||
- Fixed a bunch of +H bugs
|
||||
- Fixed a bug where the channel was still shown in /who for +I users
|
||||
- First part of ZIP_LINKS
|
||||
- Fixed a typo in ./newnet
|
||||
- Made /close reset IRCstats.unknown ..
|
||||
- Made SVSO (ofcourse) IRCstats.operators--;
|
||||
- Another IRCstats.unknown fix. Hope this works (hacked from undernet code)
|
||||
- NETINFO protocol 0 is accepted as valid protocool (for services etc)
|
||||
- /stats s is now avail only for opers in mainstream
|
||||
- Took out "nick did a /userhost on you"
|
||||
- Reduced hashtable size
|
||||
- Took out sequent/dynix support
|
||||
- Fixed a bug that prolly was fixed by Potvin, but was "not fixed correctly"
|
||||
- Fixed a crash problem in register_user and most likely fixed the "strange
|
||||
vhost" thing, (was a dumb bug, mising ircsprintf)
|
||||
- Fixed the *** NickServ sets mode +creep SVS2MODE bug..
|
||||
- sendto_serv_butone_token_opt ()..
|
||||
- Small testing stuff
|
||||
- In ./Config it runs a quick test to see how many socket()s you can do
|
||||
- Fixed the double +cF notice on local connections exiting, ugly hack
|
||||
- Removed the last traces of unix sockets, flag 0x10 free now
|
||||
- Made all ircops able to use +F (totally this time)
|
||||
- /quote close do not show realhost of caller anymore
|
||||
- /shun accepts nick in add mode now (adds *@host)
|
||||
- Allowed /shunned users to use /pong now
|
||||
- Fixed (by DrBin) Shun and Gline bug, where they replaced eachothers ->type
|
||||
.... Learn that (= != ==) /me looks at Sts
|
||||
- You can now specify 0 as the time for any TKL (ex Glines, Shun) for it to be perm
|
||||
- Fixed a +L bug, (3.1 only) where any op could set +L
|
||||
- Added channel mode +u, "Auditorium". Makes /names and /who #channel only
|
||||
show @'s
|
||||
- Added config.h setting to disable oper overrides, NO_OPEROVERRIDE
|
||||
- Added Debug support to win32 makefile ... compile with syntax
|
||||
NMAKE -f makefile.win32 DEBUG=1
|
||||
inorder to have debug support ... leave the DEBUG=1 out for normal builds
|
||||
- Fixed ircsprintf.h ... we do want it to compile in debug mode yes ?
|
||||
- Made /addline write to correct place when you use -f
|
||||
- Made /zline not memory corrupt/crash, bad df bug
|
||||
- Fixed a counting bug with unknown connections, very hopefully
|
||||
- Fixed /htm giving wrong response when /htm to 1
|
||||
- Fixed /shun showing "1970" to permanently shunned users
|
||||
- Fixed ./Config showing freebsd 3.0 in freebsd 4
|
||||
- Made so badwords.*.conf accepts # comments
|
||||
- Added some default default badwords.message.conf and badwords.channel.conf
|
||||
- Made so auditorium mode shows users to @'s
|
||||
- Fixed a bug where /chgident would overflow into the *real* host if it where greater than USERLEN
|
||||
because _someone_ aka sts told it to check against HOSTLEN rather than USERLEN... reported by wshs
|
||||
- Fixed a bug in badwords not loading words correctly, and upped word limit
|
||||
to 50
|
||||
- Small fix with ./Config showing incorrect path of stddef.h
|
||||
- Made operkick be part of NO_OPEROVERRIDE
|
||||
- Made admins unable to be shunned
|
||||
- Made some socket errors which normally only showed up in DEBUGMODE, show
|
||||
up in ircd.log as well
|
||||
- Fixed a wrongly outputted message (in hash collision detect)
|
||||
- Removed aHush, not in use
|
||||
- Removed DISALLOW_MIXED_CASE and IGNORE_FIRST_CHAR, waste of space
|
||||
- Made IDLE_FROM_MSG stock define
|
||||
- Made IRCII_KLUDGE disappear :P
|
||||
- Fixed SENDQ_ALWAYS to be mainstream define (as always)
|
||||
- Removed s_gline, not in use, removed some modeless channel checks (not needed), removed an old zombie
|
||||
code, and removed a line from aHush that was missed
|
||||
- Added networks/seveneagle.network
|
||||
- /msg irc <command> now works whether or not WEBTV_SUPPORT is on
|
||||
- Moved /mode #channel ^ and ListBits() to #ifdef DEVELOP
|
||||
- Made it so servers behind a U:lined server (ex Juped Server) are U:lined too, helpful if HIDE_ULINES is
|
||||
on (from bahamut)
|
||||
- Added find_uline (from bahamut) for the new U:line code
|
||||
- Modified /map to work with the new U:line code
|
||||
- Redid s_err.c to be ALOT faster, based on bahamut's s_err.c (ALOT of
|
||||
work)
|
||||
- Fixed last R_LINE stuff (check_time_interval)
|
||||
- Fixed /setname desynch
|
||||
- Removed IsService(), and some wierd stuff
|
||||
- Broken INETD support removed
|
||||
- Removed some odd Clone stuff(?)
|
||||
- Added Blowfish encryption ability (SetSecure()), will extend to more
|
||||
better encryption
|
||||
- Fixed a typo in /stats z
|
||||
- Some more crypto stuff, will work on the new engine tommorow
|
||||
- You can now encrypt the I:line passwords using mkpasswd (must have CRYPT_ILINE_PASSWORD defined)
|
||||
- Editted Config to ask if you want encrypted I:line passwords
|
||||
- Made it so you can encrypt restart/die passwords (same as I:line passwords)
|
||||
- Editted Config to ask about encrypted restart/die passwords
|
||||
- Made it so you can *view* a channel topic using /topic #channel without being a member
|
||||
- Removed , support from /topic (not needed)
|
||||
- Removed count_channels (not in use)
|
||||
- Made a major is_banned speed up
|
||||
- Redid K:line and n:line checking to be alot faster
|
||||
- Fixed crypto stuff 100% :))
|
||||
- Added CRYPTOIRCd ('r') to version string
|
||||
- Added some more crypto stuff
|
||||
- /crypto <algoritm> <keyfile laying in keys/> <parameters>
|
||||
- Fixed a ->passwd bug caused by codemastr..
|
||||
- Added fclose() calls to the vhost, dccdeny, and chrestrict confs
|
||||
- Some V:line stuff (added VL protoctl, and parsing of the SERVER command for the proto and flags)
|
||||
- Fixed so that in +c it shows if a user is connected securely
|
||||
- Backported the passwd stuff, not needed.
|
||||
- Fixed a crash problem on /quit or /squit
|
||||
- Fixed some aligning in the VL PROTOCTL
|
||||
- Fixed some fucked up passwd stuff again ..
|
||||
- Fixed a little Client Protoctl problem
|
||||
- Fixed a crypto problem (forgot an #ifdef bad sts!)
|
||||
- Fully added V:lines (doesn't really do much till the next version, since old versions don't support it)
|
||||
- Added /stats v to list V:lines (/stats V still does vhost.conf)
|
||||
- Added OpenBSD 2.x support, thanks to noriko for donating the development shell
|
||||
- Added so stuff like Lost connection to, (report_error) only goes to realops
|
||||
- Added some more descriptive error messages
|
||||
- Added doc/crypto.doc describing the encrypted irc protocol
|
||||
- Fixed a sendto_serv_butone_token problem
|
||||
- Removed any trace of MD5, we use random() for nospoof now, this fixed a
|
||||
license problem too
|
||||
- Removed NOSPOOF_SEED01 and 02
|
||||
- Added VHP protoctl, (not in use in the synch). This makes virthost field
|
||||
in NICKv2 use the real virthost even if its +t. (Thanks to SL7)
|
||||
- Added support for the CR Java Chat auto join feature
|
||||
- Fixed a msg.h location problem ..
|
||||
- Added secure connections and openssl tracing to Config
|
||||
- Added regex portablity and checks in Config
|
||||
- Added a #define capability to config.h (DISABLE_USERMOD),
|
||||
disables /sethost, /setident, /chgname, /chghost, /chgident
|
||||
- Fixed a /rehash -garbage bug reported by Curt|s
|
||||
- Added networks/makenet (generates a network configuration file)
|
||||
- Added networks/staticedge.network
|
||||
- Fixed some host revealing nick collision stuff
|
||||
- Tokenized nick->nick PRIVMSG and NOTICE
|
||||
- Made it so you can remove a protoctl by putting a - in front
|
||||
- Fixed a bug in summon
|
||||
- Added protection against webproxies
|
||||
- Fixed TKL?
|
||||
- Added SJ3, removed the old
|
||||
- SJ3 bugfix, and another
|
||||
- Hopefully a res.c fix.
|
||||
- Fixed a +I bug
|
||||
- Fixed a more SJ3 bug
|
||||
- Updated networks/networks.ndx (bad sts!)
|
||||
- Added networks/linuxsquare.network
|
||||
- Added networks/chatstation.network
|
||||
[recall]
|
||||
- Fixed the pesky hostname bug
|
||||
- Fixed a NO_OPEROVERDIE bug reported by Taz
|
||||
- Fixed a +L bug
|
||||
- Fixed a typo in Config
|
||||
- SJ3 fixes. Let's hope this works (f*cken hell..)
|
||||
- Fixed a V:line bug
|
||||
- Added /infoserv (you can stop bugging us now skold ;P)
|
||||
- Removed ALN, and the ALN system.
|
||||
- Added base64 encoding instead, for ALN v2 (NS)
|
||||
- Removed a SJ3 debug msg
|
||||
- Removed SVSMODE +l support, and fixed servicestamp and +d support
|
||||
- Changed to ircu/hybrid6/unreal mix of numeric 005
|
||||
- Fixed a SJ3 Fake Direction loopbug (kills on nick collisions)
|
||||
- SJ3 fixes, loop fix
|
||||
- Added NS, new generation ALN.
|
||||
- Added llthangel's whoisfix.patch, Makes sure +hv users show up as
|
||||
%#channel instead of +#channel. Bug report by ^Fanta.
|
||||
- Changed find_server_quick to work with masks too ..
|
||||
- Removed UPING UDP socket. Only resfd opens a udp fd now
|
||||
- Small memory cleanup
|
||||
- NS introduction in sendto_serv_butone_token
|
||||
- Fixed Q:lined nick NickServ from <unregistered> on Nickname Server message
|
||||
- Fixed a problem in synch using acptr->name as info line
|
||||
- Introduced NS in SQLINE..
|
||||
- Fixed a problem in SVS2MODE not displaying mode changes, and well known
|
||||
why
|
||||
- Recoded SVSNOOP, but the IRCd doesn't get it at all??
|
||||
- added llthangel to credits
|
||||
- Changed channel.c so when you kick someone as halfop it doesn't show as an
|
||||
OperKick (unless you kick an op) (reported by ^Fanta, patch by llthangel)
|
||||
(rc2)
|
||||
- Fixed SVS2MODE bug with illegal modes
|
||||
- Fixed /notice @%+ bug, where it didnt work at all
|
||||
- Fixed a small chmode +u bug
|
||||
- Added sendto_chanops_butone because of codemastr's laziness
|
||||
- Fixed a few +u bugs
|
||||
- Fixed a +I bug (yes another one)
|
||||
- Changed channel.c so that when an opped non +q/+a Oper kicks a user who
|
||||
is +q/+a it invokes an OperKick (patch by llthangel)
|
||||
- Fixed the +lL (+Ll) bug, will first be fixed 100% when all is 3.1
|
||||
- Possible fixed the lopts bug
|
||||
- Fixed a egcs problem in Config, the strtok bug
|
||||
- Fixed the 'ulimit core size failed' bug (now checks whether it should
|
||||
set the core size to unlimited in ./Config
|
||||
- Changed s_user.c so that Opers will see +s channels in /whois
|
||||
(patch by llthangel)
|
||||
- +u now lists +a and +q people, and sends JOINs/PARTs to +a and +q people
|
||||
- Fixed a /mode (umode) typo where it said no such channel rather than no such nick,
|
||||
reported by llthangel
|
||||
- Disabled anything with time in /list options temporary, causes bugs
|
||||
- Fixed a little /chghost bug
|
||||
- Fixed a SJ3 bug with ban syncing to SJ2 servers
|
||||
- Fixed some cloak bugs(???)
|
||||
- Made it so you can /knock without a reason, and a few /knock cleanups
|
||||
- Made it so if the server name specified in the M:line does not contain a "."
|
||||
the ircd logs it to ircd.log and dies
|
||||
- Updated ./ircd to also say to look at ircd.log
|
||||
- Fixed a SQLINE synch bug
|
||||
- Added command line option -F to prevent the ircd to fork out
|
||||
- Fixed the f*cken TKL bug
|
||||
- Fixed a netsplit bug
|
||||
- Changed some find_server(name, NULL) to find_server_quick to speed up
|
||||
lookup of servers
|
||||
- Made find_server_quick a prototype, and made some work more quicker as
|
||||
well
|
||||
- Removed the : in :nick NICK newnick :timestamp
|
||||
- Added script ./update to help update, uses pull technology (wget, cvs)
|
||||
- Added script ./Setup which makes the user forced through Unreal.nfo, FAQ,
|
||||
Config, and all the things we want them to read/do to compile the IRCd
|
||||
- Updated PREFIX Client Protoctl
|
||||
- Added ^MrMike^'s command list, this one will be updated
|
||||
- Removed ID_CVS, hopefully fixing some bastard stuff
|
||||
- Fixed a last minute SJOIN bug
|
||||
[ last fixes ]
|
||||
- Re-added res_comp.c and win32.c and res_mkquery.c, which was damaged by
|
||||
the ID_CVS remove
|
||||
- Fixed a SHOWCONNECTINFO bug
|
||||
- Fixed a MODE_STRIPWORDS bug
|
||||
- Fixed a PART bug
|
||||
- Fixed a STRIPBADWORDS bug
|
||||
- Fixed a BotMOTD bug
|
||||
- Added Dianora's /userhost
|
||||
- Recoded /links using NS
|
||||
- Recoded /map a bit using NS, and added usercounts to Server struct
|
||||
- Some crazy time_t -> TS stuff, will save us some time in 2038
|
||||
- Fixed the "/mode #blah +Cplkf 1 moo 5:5" ( mode/#blah [+pClkf 1moo 5:5]
|
||||
problem
|
||||
- Hopefully fixed the +x problem
|
||||
- Fixed a bug with mkpasswd on OpenBSD
|
||||
- Added desynch +e warning, and updated ./update enough ...
|
||||
- Updated update to work better, and that you can use lynx instead of wget
|
||||
- Added #undef SHUN_NOTICES, to add notices for users who are shunned
|
||||
- Fixed bug with U:Lines should be able to privmsg/notice and recieve
|
||||
badwords :P, does not work in channels
|
||||
- Removed the old GLINE system, TKL is now standard.
|
||||
- Added INV_TRACK define, we want people testing this.
|
||||
- Fixed the -1 usercount bug, found by codemastr, fixed by Stskeeps
|
||||
- Fixed a +h bug reported by Dukemaster
|
||||
- Added IRIX support (does it work?)
|
||||
- Fixed crypter so it actually functions (Makefile now sets mode 700) and
|
||||
it encrypts X and N lines too.
|
||||
- Fixed empty mode sends in register_user, reported by Bagge
|
||||
- Added some portability stuff
|
||||
- Fixed some empty-line/missing parameter stuff in dccdeny, vhost,
|
||||
and dynconf, chrestrict
|
||||
- Made vhost strip too long vhosts
|
||||
- Removed INV_TRACK
|
||||
- Fixed a typo in /vhost
|
||||
- Fixed some problems/typos/notlookingsogood (TM) bugs, in the tkl code
|
||||
- Fixed ban merging/similar bug in SJOIN
|
||||
- Made /kick for opers only be possible for netadmin/techadmin
|
||||
- Fixed /server so it doesnt support SERVER name :info anymore..
|
||||
|
||||
|
||||
|
||||
*** Unreal3.0-Morrigan(fix) ***
|
||||
* NOTE: If your system clock is wrong you will have problems with TOPICs
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
# distribution without the author's prior consent.
|
||||
#
|
||||
# $Id$
|
||||
IRCD_VERSION="Unreal3.1"
|
||||
IRCD_VERSION="Unreal3.1.1-Darkshades"
|
||||
CONF_DATE=`date`
|
||||
LAST_VERSION="very very old"
|
||||
#
|
||||
@@ -44,11 +44,14 @@ GETTIMEOFDAY=undef
|
||||
LRAND48=undef
|
||||
STRTOUL=undef
|
||||
OPENSSL=""
|
||||
OPENSSL_OTHERPLACE=""
|
||||
REGEXP=""
|
||||
NEEDSKIPNAME=""
|
||||
CRYPTOLIB=""
|
||||
CRYPTOIRCD=""
|
||||
OPENSSLPATH=""
|
||||
CCPATH=''
|
||||
STRCASECMP=undef
|
||||
SIGNAL=''
|
||||
BLOCKING=''
|
||||
TMP=/tmp/.Configtmp$$.c
|
||||
@@ -503,12 +506,13 @@ else
|
||||
echo 'not found (good!)'
|
||||
fi
|
||||
|
||||
echo $n "...Looking for /usr/include/openssl/blowfish.h...$c"
|
||||
if [ -r /usr/include/openssl/blowfish.h ] ; then
|
||||
echo $n "...Looking for /usr/include/openssl/ssl.h...$c"
|
||||
if [ -r /usr/include/openssl/ssl.h ] ; then
|
||||
OPENSSL=define
|
||||
echo 'found!'
|
||||
else
|
||||
echo 'not found (you will not be able to do secure connections)'
|
||||
echo 'not found (you will not be able to do secure connections'
|
||||
echo 'If you do have it, please type in ln -s <openssl include dir> /usr/include/openssl'
|
||||
fi
|
||||
|
||||
echo $n "...Looking for /usr/include/regex.h...$c"
|
||||
@@ -524,6 +528,33 @@ else
|
||||
cd ../..
|
||||
fi
|
||||
|
||||
if [ -r /usr/include/openssl/ssl.h ] ; then
|
||||
echo $n "...Looking where you got the openssl binary...$c"
|
||||
if [ -r /bin/openssl ] ; then
|
||||
OPENSSLPATH=/bin/openssl
|
||||
echo $OPENSSLPATH
|
||||
elif [ -r /usr/bin/openssl ] ; then
|
||||
OPENSSLPATH=/usr/bin/openssl
|
||||
echo $OPENSSLPATH
|
||||
elif [ -r /usr/sbin/openssl ] ; then
|
||||
OPENSSLPATH=/usr/sbin/openssl
|
||||
echo $OPENSSLPATH
|
||||
elif [ -r /usr/local/bin/openssl ] ; then
|
||||
OPENSSLPATH=/usr/local/bin/openssl
|
||||
echo $OPENSSLPATH
|
||||
elif [ -r /usr/local/ssl/bin/openssl ] ; then
|
||||
OPENSSLPATH=/usr/local/ssl/bin/openssl
|
||||
echo $OPENSSLPATH
|
||||
elif [ -r `which openssl` ] ; then
|
||||
OPENSSLPATH=`which openssl`
|
||||
echo $OPENSSLPATH
|
||||
else
|
||||
echo "Couldn't find it! (bad)"
|
||||
OPENSSLPATH=/bin/false
|
||||
OPENSSLPATH=/bin/false
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
# to b or not to b
|
||||
#
|
||||
@@ -792,7 +823,6 @@ else
|
||||
fi
|
||||
fi
|
||||
$RM -f $EXEC $TMP
|
||||
|
||||
#
|
||||
# what do we need that isn't here already ?
|
||||
#
|
||||
@@ -993,8 +1023,25 @@ if [ $? -ne 0 ] ; then
|
||||
echo $n " inet_netof$c"
|
||||
NINETNETOF=define
|
||||
fi
|
||||
$RM -f $EXEC $TMP
|
||||
echo " "
|
||||
$RM -f $EXEC $TMP
|
||||
cat > $TMP << __EOF__
|
||||
#include <string.h>
|
||||
main()
|
||||
{
|
||||
strcasecmp("moo", "moo");
|
||||
}
|
||||
__EOF__
|
||||
$COMP
|
||||
# >/dev/null 2>&1
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo $n " strcasecmp $c "
|
||||
STRCASECMP=undef
|
||||
else
|
||||
STRCASECMP=define
|
||||
fi
|
||||
$RM -f $EXEC $TMP
|
||||
|
||||
#
|
||||
#
|
||||
#
|
||||
@@ -1074,6 +1121,7 @@ cat > $SETUP <<__EOF__
|
||||
#$NINETNETOF NEED_INET_NETOF
|
||||
#$GETTIMEOFDAY GETTIMEOFDAY
|
||||
#$LRAND48 LRAND48
|
||||
#$STRCASECMP GOT_STRCASECMP
|
||||
__EOF__
|
||||
if [ "$MALLOCH" = "undef" ] ; then
|
||||
echo "#undef MALLOCH" >> $SETUP
|
||||
@@ -1281,7 +1329,7 @@ while [ -z "$FOO" ] ; do
|
||||
FOO="No"
|
||||
fi
|
||||
echo ""
|
||||
echo "Do you want to support encrypted connections"
|
||||
echo "Do you want to support SSL (Secure Sockets Layer) connections"
|
||||
echo $n "[$FOO] -> $c"
|
||||
if [ -z "$AUTO_CONFIG" -o -n "$runonce" ] ; then
|
||||
read cc
|
||||
@@ -1295,7 +1343,7 @@ while [ -z "$FOO" ] ; do
|
||||
case "$cc" in
|
||||
[Yy]*)
|
||||
CRYPTOIRCD="1"
|
||||
CRYPTOLIB="-lcrypto"
|
||||
CRYPTOLIB="-lssl -lcrypto"
|
||||
;;
|
||||
[Nn]*)
|
||||
CRYPTOIRCD=""
|
||||
@@ -1709,6 +1757,30 @@ else
|
||||
|
||||
fi
|
||||
|
||||
if [ -n "$CRYPTOIRCD" ] ; then
|
||||
$RM -f Makefile.tmp
|
||||
sed -e "s@^OPENSSLPATH=\(.*\)@OPENSSLPATH=$OPENSSLPATH@" Makefile > Makefile.tmp
|
||||
cp Makefile.tmp Makefile
|
||||
$RM -f Makefile.tmp
|
||||
else
|
||||
$RM -f Makefile.tmp
|
||||
sed -e "s@^OPENSSLPATH=\(.*\)@OPENSSLPATH=@" Makefile > Makefile.tmp
|
||||
cp Makefile.tmp Makefile
|
||||
$RM -f Makefile.tmp
|
||||
fi
|
||||
|
||||
if [ -n "$OPENSSL_OTHERPLACE" ] ; then
|
||||
$RM -f Makefile.tmp
|
||||
sed -e "s@^OPENSSLINCLUDE=\(.*\)@OPENSSLINCLUDES=-I/usr/local/ssl/include/openssl@" Makefile > Makefile.tmp
|
||||
cp Makefile.tmp Makefile
|
||||
$RM -f Makefile.tmp
|
||||
else
|
||||
$RM -f Makefile.tmp
|
||||
sed -e "s@^OPENSSLINCLUDE=\(.*\)@OPENSSLINCLUDES=@" Makefile > Makefile.tmp
|
||||
cp Makefile.tmp Makefile
|
||||
$RM -f Makefile.tmp
|
||||
fi
|
||||
|
||||
if [ -n "$REGEX" ] ; then
|
||||
$RM -f Makefile.tmp
|
||||
sed -e "s@^REGEX=\(.*\)@REGEX=@" Makefile > Makefile.tmp
|
||||
@@ -1756,9 +1828,9 @@ else
|
||||
echo "#undef CRYPT_OPER_PASSWORD" >> $OPTIONS_H
|
||||
fi
|
||||
if [ -n "$CRYPTOIRCD" ] ; then
|
||||
echo "#define CRYPTOIRCD 1" >> $OPTIONS_H
|
||||
echo "#define USE_SSL 1" >> $OPTIONS_H
|
||||
else
|
||||
echo "#undef CRYPTOIRCD" >> $OPTIONS_H
|
||||
echo "#undef USE_SSL" >> $OPTIONS_H
|
||||
fi
|
||||
if [ -n "$CRYPT_LINK_PASSWORD" ] ; then
|
||||
echo "#define CRYPT_LINK_PASSWORD 1" >> $OPTIONS_H
|
||||
@@ -1834,6 +1906,16 @@ if [ "$OSNAME" = "Linux (with GLIBC 2.x or greater)" ]; then
|
||||
echo ""
|
||||
fi
|
||||
|
||||
if [ -n "$CRYPTOIRCD" ] ; then
|
||||
if [ ! -f server.req.pem ]; then
|
||||
echo "Using openssl in $OPENSSLPATH .."
|
||||
export OPENSSLPATH
|
||||
make pem
|
||||
cat .SICI
|
||||
read cc
|
||||
fi
|
||||
fi
|
||||
|
||||
cat << __EOF__
|
||||
|
||||
_____________________________________________________________________
|
||||
@@ -1852,8 +1934,8 @@ cat << __EOF__
|
||||
|_____________________________________________________________________|
|
||||
|_____________________________________________________________________|
|
||||
| - The UnrealIRCd Team - |
|
||||
| * Stskeeps stskeeps@tspre.org |
|
||||
| * codemastr codemastr@tspre.org |
|
||||
| * DrBin drbin@tspre.org |
|
||||
| * Stskeeps stskeeps@unrealircd.com |
|
||||
| * codemastr codemastr@unrealircd.com |
|
||||
| * DrBin drbin@unrealircd.com |
|
||||
|_____________________________________________________________________|
|
||||
__EOF__
|
||||
|
||||
@@ -7,6 +7,9 @@ P.O.Box 52
|
||||
7400 Herning
|
||||
Denmark
|
||||
|
||||
(if you want to that is .. it will just make us a little more able to code
|
||||
even more on this project. You will get in /credits if you do so).
|
||||
|
||||
-- Stskeeps
|
||||
|
||||
[ $Id$ ]
|
||||
|
||||
@@ -11,7 +11,7 @@ an IRC server.
|
||||
For more information on UnrealIRCD contact us at
|
||||
unreal-dev@lists.sourceforge.net
|
||||
|
||||
The UnrealIRCD is available from http://unreal.tspre.org
|
||||
The UnrealIRCD is available from http://www.unrealircd.com
|
||||
along with the latest copy of this document.
|
||||
|
||||
|
||||
|
||||
+23
-1
@@ -34,6 +34,7 @@ FROMDOS=/home/cmunk/bin/4dos
|
||||
XCFLAGS=
|
||||
IRCDLIBS=
|
||||
CRYPTOLIB=
|
||||
OPENSSLINCLUDES=
|
||||
#
|
||||
# use the following on MIPS:
|
||||
#CFLAGS= -systype bsd43 -DSYSTYPE_BSD43 -I$(INCLUDEDIR)
|
||||
@@ -121,6 +122,9 @@ STRTOUL=
|
||||
# override it here and see what happens.
|
||||
FD_SETSIZE=
|
||||
|
||||
# Where is your openssl binary
|
||||
OPENSSLPATH=
|
||||
|
||||
CFLAGS=-I$(INCLUDEDIR) $(XCFLAGS) $(NEED_U_INT32_T) $(FD_SETSIZE)
|
||||
|
||||
SHELL=/bin/sh
|
||||
@@ -140,7 +144,8 @@ MAKEARGS = 'CFLAGS=${CFLAGS}' 'CC=${CC}' 'IRCDLIBS=${IRCDLIBS}' \
|
||||
'INCLUDEDIR=${INCLUDEDIR}' 'IRCDDIR=${IRCDDIR}' \
|
||||
'MANDIR=${MANDIR}' 'RM=${RM}' 'CP=${CP}' 'TOUCH=${TOUCH}' \
|
||||
'RES=${RES}' 'SHELL=${SHELL}' 'STRTOUL=${STRTOUL}' \
|
||||
'CRYPTOLIB=${CRYPTOLIB}' 'REGEX=${REGEX}'
|
||||
'CRYPTOLIB=${CRYPTOLIB}' 'REGEX=${REGEX}' \
|
||||
'CRYPTOINCLUDES=${CRYPTOINCLUDES}'
|
||||
|
||||
server:
|
||||
build:
|
||||
@@ -159,6 +164,12 @@ build:
|
||||
@echo '| file "dynconf" using your favourite viewer or |'
|
||||
@echo '| editor. The file will contain instructions on how|'
|
||||
@echo '| to do the dynamic configuration :) |'
|
||||
@echo '| You might want to see include/config.h to adjust |'
|
||||
@echo '| some settings |'
|
||||
@echo '| |'
|
||||
@echo '| If you really like UnrealIRCd, and would like to |'
|
||||
@echo '| make a donation, please read the Donation file in|'
|
||||
@echo '| this archive. :) |'
|
||||
@echo '| |'
|
||||
@echo '| Thanks for using Unreal IRCd! If you are in need |'
|
||||
@echo '| for any kind of help regarding the IRCd please |'
|
||||
@@ -210,3 +221,14 @@ depend:
|
||||
install: all
|
||||
@echo "Now install by hand; make install is broken."
|
||||
|
||||
pem: src/ssl.cnf
|
||||
@echo "Generating certificate request .. "
|
||||
$(OPENSSLPATH) req -new -config src/ssl.cnf -out server.req.pem \
|
||||
-keyout server.key.pem -nodes
|
||||
@echo "Generating self-signed certificate .. "
|
||||
$(OPENSSLPATH) req -x509 -days 365 -in server.req.pem \
|
||||
-key server.key.pem -out server.cert.pem
|
||||
@echo "Generating fingerprint .."
|
||||
$(OPENSSLPATH) x509 -subject -dates -fingerprint -noout \
|
||||
-in server.cert.pem
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
Unreal IRCD Win32 Version
|
||||
-=-=-=-=-=-=-=-=-=-=-=-=-
|
||||
|
||||
Ok, in order to save time, and my nerves i am writing this short readme, and eventually an FAQ (after people ask questions) =)
|
||||
|
||||
This is information on how to run the win32 version, it does not say, and WILL not say how to use an ircd, as that is sufficiently docuimented in the docs !!!!
|
||||
|
||||
you will NEED to modify/create an ircd.conf, follow the documentation for that.
|
||||
|
||||
|
||||
Right, thats almost it( that i can think of), but what happens if the server Crashes ???
|
||||
----------------------------------------------------------------------------------------
|
||||
ok i Have now coded the first bit of usefull (for me) code that dumps the stack to a dialog box, WHAT EVER YOU DO you must do the following:
|
||||
1. Copy and paste EVERYTHING in that dialog box, and send it to me in an e-mail
|
||||
2. Include in that e-mail EVERYTHING that happened in the lead up to the crash
|
||||
|
||||
i hope thats SIMPLE to follow, but it will help me soo much !!!!!
|
||||
|
||||
|
||||
DrBin (Dave)
|
||||
drbin@tspre.org
|
||||
|
||||
|
||||
@@ -10,16 +10,9 @@ Scheduled for 4.0:
|
||||
----------------
|
||||
|
||||
* B:Lines or ircu i:lines
|
||||
* Raising PING bug
|
||||
* Config Remote access
|
||||
|
||||
-----------------------------------------------------------
|
||||
* Add svsvline for global vlines
|
||||
---------------
|
||||
Assigned to codemastr:
|
||||
* Remove some of the _little_ config.h defines and replace with
|
||||
unrealircd.conf lines, ex ADMINCHAT, REMOTE_REHASH
|
||||
* Documentation documentation AND DOCUMENTATION
|
||||
|
||||
Assigned to DrBin:
|
||||
------------------
|
||||
@@ -39,18 +32,16 @@ Assigned to DrBin:
|
||||
(from irc2.10.3)
|
||||
* CTCP flood protection(?)
|
||||
* A /who flag system, like bahamut's
|
||||
* Something like bahamut/hybrids P:line system where you can specify
|
||||
which IPs can you a specific port, maybe port specific passwords too?
|
||||
* add -SIGTERM support, /restarts on SIGTERM
|
||||
* Recode dynconf and all the other new confs
|
||||
* Make proxy scanner scan port 23 also (postponed)
|
||||
* #define for auto oflag +H
|
||||
* Port to MacOS 7-9, 68k architecture and PPC
|
||||
* Port to BeOS
|
||||
* +N (no nickname changes chmode)
|
||||
* Chmodes in /list possbility
|
||||
* Make cached MOTDs more memory friendly (dynamic allocation)
|
||||
* Fix up the flag and proto system
|
||||
* Make a is_chan_op, is_chanprot, is_chanowner all-in-one function
|
||||
* Split up Link (SLink)
|
||||
* Add Dlink (DSLink)
|
||||
* Option to allow color striping of QUIT/PART msgs in +S channels
|
||||
* Option to hide QUIT/PART msgs in +c channels (if it has color) or in +m channels (if not +v)
|
||||
|
||||
|
||||
-----------------------------------------------------
|
||||
|
||||
+4
-5
@@ -1,14 +1,13 @@
|
||||
===============================================
|
||||
= UnrealIRCd v3.1 =
|
||||
= UnrealIRCd v3.1.1 =
|
||||
===============================================
|
||||
Was brought to you by:
|
||||
* Stskeeps <stskeeps@tspre.org>
|
||||
* codemastr <codemastr@tspre.org>
|
||||
* DrBin <drbin@tspre.org>
|
||||
* codemastr <codemastr@unrealircd.com>
|
||||
* DrBin <drbin@unrealircd.com>
|
||||
|
||||
Precenses on the Internet:
|
||||
* http://unreal.tspre.org or http://unreal.sourceforge.net
|
||||
* ftp://unreal.sourceforge.net/pub/unreal
|
||||
* http://www.unrealircd.com
|
||||
|
||||
CVS:
|
||||
To get anonymous access: (read only)
|
||||
|
||||
@@ -21,7 +21,9 @@ P:ip:flags:password1,password2,password3:port
|
||||
| R = ONLY allow our remote admin connections
|
||||
| (may only be on a P:line of its own)
|
||||
| J = Clients that connect here are counted as Java(Confroomhack)
|
||||
| s = Makes this a SSL port
|
||||
| * = CS
|
||||
|
|
||||
|
|
||||
\--- IP to bind to, * = INADDR_ANY (all interfaces)
|
||||
|
||||
|
||||
+522
-481
File diff suppressed because it is too large
Load Diff
@@ -61,7 +61,7 @@ A: T:Lines is a new Unreal feature that makes it able to show different
|
||||
7) Where can i download updates to Unreal?
|
||||
|
||||
A: Mostly you can download the newest version at
|
||||
http://unreal.tspre.org
|
||||
http://www.unrealircd.com
|
||||
|
||||
Versions may be spewed out regulary due to new features and bugs..
|
||||
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
|
||||
RPL_PROTOCTL (RPL_ISUPPORT):
|
||||
version: 2.1+ (new version: 3.1+)
|
||||
|
||||
This sends a numeric during client signon that lists various features that
|
||||
Unreal supports. This allows client and script writers to know what features
|
||||
they can use, and various parameters about the irc server. The numeric
|
||||
used is '005' to try and maintain some semblance of compatibility with
|
||||
DALnet which has a similar feature. The 005 numeric may be split across
|
||||
multiple lines if the length exceeds 512 characters.
|
||||
|
||||
The format is:
|
||||
:servername 005 target feature1 feature2... :are supported by this server.
|
||||
:servername 005 target feature200... :are supported by this server.
|
||||
|
||||
features are either a word describing the feature eg: 'SILENCE', or a word
|
||||
describing the feature and an equals and a list of parameters.
|
||||
eg: SILENCE=15 (says that we support silence, and we support up to 15 of
|
||||
them per user), or FOO=12,3 (says we support FOO with parameters 12 and 3)
|
||||
for example ircu2.10.08 lists:
|
||||
|
||||
:test.undernet.org 005 test SILENCE=15 WHOX WALLCHOPS USERIP CPRIVMSG
|
||||
CNOTICE MODES=6 MAXCHANNELS=10 MAXBANS=30 NICKLEN=9 TOPICLEN=160
|
||||
KICKLEN=160
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
UnrealIRCd Supports:
|
||||
|
||||
:unreal.server 005 nick MAP KNOCK SAFELIST HCN WATCH=%i SILENCE=%i MODES=%i
|
||||
MAXCHANNELS=%i MAXBANS=%i NICKLEN=%i TOPICLEN=%i
|
||||
KICKLEN=%i CHANTYPES=# PREFIX=%s :are supported by this server
|
||||
|
||||
Feature "MAP"
|
||||
-------------
|
||||
|
||||
/map shows the servers as the server percieves them, who's connected
|
||||
to who in a pretty display, with number of users attached to each server
|
||||
|
||||
Numerics used:
|
||||
|
||||
RPL_MAP (006)
|
||||
RPL_MAPEND (007)
|
||||
|
||||
Feature "KNOCK"
|
||||
---------------
|
||||
|
||||
Command: /KNOCK #Channel :<Reason>
|
||||
|
||||
This command will only work if you are not a member of the channel and the
|
||||
+K (No knocks) mode is not on, and the channel is not +i (and you are not
|
||||
banned). This will send a notice to ops in the channel, about that the user
|
||||
"knocked".
|
||||
|
||||
Feature "SAFELIST"
|
||||
------------------
|
||||
|
||||
|
||||
This note means that the user will not get disconnected when doing a /list,
|
||||
as some IRC networks do
|
||||
|
||||
Feature "HCN"
|
||||
-------------
|
||||
|
||||
This is a special feature that you activate using /protoctl +HCN,
|
||||
that will cause +c notices when being oper, being in the Hybrid IRCd style
|
||||
|
||||
Feature "WATCH"
|
||||
---------------
|
||||
|
||||
Parameters: How many watch entries are possible
|
||||
|
||||
This will ensure the server is able to do the DALnet WATCH command
|
||||
|
||||
|
||||
Feature "SILENCE"
|
||||
-----------------
|
||||
Parameters: How many silence entries you can have
|
||||
Version: unknown, ircu2.9.32 at least.
|
||||
|
||||
Silence is a server side ignore. You can /silence +hostmask or
|
||||
/silence +nick, to add someone to your silence list, or use /silence
|
||||
-hostmask to remove it. /silence will list your 'silence list'.
|
||||
you can /silence nick, to see someone elses silence list (useful for
|
||||
helping someone). Silence is preferably used as a last resort as it
|
||||
tends to use server CPU time.
|
||||
|
||||
Syntax:
|
||||
SILENCE +hostmask
|
||||
SILENCE +nick
|
||||
SILENCE -hostmask
|
||||
SILENCE -nick
|
||||
SILENCE nick
|
||||
|
||||
reply:
|
||||
RPL_SILELIST 217
|
||||
RPL_ENDOFSILELIST 218
|
||||
|
||||
|
||||
Feature/Modifier "MODES"
|
||||
------------------------
|
||||
Parameters: How many modes with parameters you can use in one /mode buffer
|
||||
|
||||
|
||||
Feature/Modifier "MAXCHANNELS"
|
||||
------------------------------
|
||||
Parameters: How many channels a normal user can join (opers may have
|
||||
unlimited)
|
||||
|
||||
Feature/Modifier "MAXBANS"
|
||||
+1041
-378
File diff suppressed because it is too large
Load Diff
+308
@@ -0,0 +1,308 @@
|
||||
/*
|
||||
** burst.c
|
||||
**
|
||||
** Nicolas Pioch, Dec 93
|
||||
** <Nicolas.Pioch@enst.fr>
|
||||
** Carsten V. Munk Nov 2000
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/signal.h>
|
||||
#include <netinet/in.h>
|
||||
#include <sys/un.h>
|
||||
#include <netdb.h>
|
||||
#include <errno.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef POSIX
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
|
||||
#define MYBUFSIZE 2048
|
||||
|
||||
char *jupedservername, *uplinkservername, *jupereason;
|
||||
int options;
|
||||
char *password;
|
||||
typedef struct aClient {
|
||||
int socket;
|
||||
char buffer[MYBUFSIZE+1];
|
||||
int read;
|
||||
int write;
|
||||
} aClient;
|
||||
|
||||
void fatalrestart(aClient *robotptr, const char *s);
|
||||
|
||||
void fatal(const char *s) {
|
||||
perror(s);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
typedef void (*signalhandler)(int);
|
||||
static void signal_catcher(int sig, int code, struct sigcontext *scp) {
|
||||
fprintf(stderr, "Caught signal %d with code %d\n", sig, code);
|
||||
|
||||
switch(sig) {
|
||||
case SIGFPE: /* Floating point exception */
|
||||
case SIGILL: /* Illegal instruction */
|
||||
case SIGSEGV: /* Segmentation violation */
|
||||
case SIGBUS: /* Bus error */
|
||||
case SIGSYS: /* Bad argument to system call */
|
||||
fatal("Fatal signal received, aborting...");
|
||||
break;
|
||||
|
||||
case SIGQUIT:
|
||||
case SIGINT:
|
||||
case SIGTERM: /* On se barre */
|
||||
fatal("AAAAAAAAArrrrrrrrgh!");
|
||||
break;
|
||||
}
|
||||
|
||||
signal(sig, (signalhandler)signal_catcher);
|
||||
}
|
||||
|
||||
|
||||
typedef union socket_address {
|
||||
struct sockaddr_un unixx;
|
||||
struct sockaddr_in inet;
|
||||
} socket_address;
|
||||
|
||||
void name_to_number(int address_family, const char *hostname, int port,
|
||||
socket_address *addr, int *len2) {
|
||||
u_long iaddr;
|
||||
int len;
|
||||
struct hostent *host;
|
||||
char *inaddr;
|
||||
bzero ((char *) addr, sizeof (socket_address) );
|
||||
|
||||
if ( address_family == AF_UNIX ) {
|
||||
strcpy(addr->unixx.sun_path,hostname);
|
||||
*len2=sizeof( struct sockaddr_un );
|
||||
} else {
|
||||
if ((hostname) && (hostname[0])) {
|
||||
if (hostname[0] >= '0' && hostname[0] <= '9') {
|
||||
iaddr = inet_addr(hostname);
|
||||
inaddr = (char *) &iaddr;
|
||||
len=sizeof(iaddr);
|
||||
} else {
|
||||
host=gethostbyname (hostname);
|
||||
if (!host)
|
||||
fatal("Unknown host");
|
||||
inaddr=host->h_addr_list[0];
|
||||
len=host->h_length;
|
||||
}
|
||||
bcopy(inaddr, (char *)&addr->inet.sin_addr, len);
|
||||
}
|
||||
addr->inet.sin_port=htons((u_short) port);
|
||||
*len2=sizeof(struct sockaddr_in);
|
||||
}
|
||||
addr->inet.sin_family = address_family;
|
||||
}
|
||||
|
||||
int read_data(aClient *robotptr) {
|
||||
int nbytes;
|
||||
|
||||
if ((nbytes=read(robotptr->socket, &(robotptr->buffer[robotptr->write]),
|
||||
(sizeof(robotptr->buffer) - robotptr->write - 1))) < 0)
|
||||
fatalrestart(robotptr, "read on socket");
|
||||
|
||||
if (nbytes == 0) {
|
||||
close(robotptr->socket);
|
||||
fatalrestart(robotptr, "Connection Closed");
|
||||
}
|
||||
|
||||
robotptr->write+=nbytes;
|
||||
robotptr->buffer[robotptr->write]=0;
|
||||
|
||||
return(nbytes);
|
||||
}
|
||||
|
||||
void send_data(int socketfd, const char *data, int length) {
|
||||
int length2;
|
||||
length2=write(socketfd, data, length);
|
||||
if (length2 != length)
|
||||
fprintf(stderr, "*** write truncated to %d chars...\n", length2);
|
||||
}
|
||||
|
||||
int create_client(const char *hostname, const int hostport) {
|
||||
int descript;
|
||||
socket_address hostaddr;
|
||||
int adlen;
|
||||
|
||||
if ((descript=socket(PF_INET, SOCK_STREAM, 0)) < 0)
|
||||
fatal("socket");
|
||||
|
||||
name_to_number(AF_INET, hostname, hostport, &hostaddr, &adlen);
|
||||
|
||||
if (connect(descript, &hostaddr.inet, adlen) < 0)
|
||||
fatal("connect");
|
||||
|
||||
return(descript);
|
||||
}
|
||||
|
||||
void parse_line(aClient *robotptr) {
|
||||
char *toparse;
|
||||
|
||||
toparse=(robotptr->buffer + robotptr->read);
|
||||
|
||||
printf("%s\n",toparse);
|
||||
/* Special handling for PING messages */
|
||||
if (!strncasecmp(toparse, "PING ", 5) || !strncasecmp(toparse, "8 ", 2)){
|
||||
toparse=strtok(toparse, "\r\n");
|
||||
toparse[1]='\0';
|
||||
send_data(robotptr->socket, toparse, strlen(toparse));
|
||||
return;
|
||||
}
|
||||
if (!strncasecmp(toparse, "AO", 2) || !strncasecmp(toparse, "NETINFO", 7))
|
||||
{
|
||||
if (!(options & 0x80))
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
void parse_data(aClient *robotptr) {
|
||||
int next;
|
||||
|
||||
while((robotptr->read < robotptr->write)
|
||||
&& ((robotptr->buffer[robotptr->read] == '\r')
|
||||
|| (robotptr->buffer[robotptr->read] == '\n')))
|
||||
robotptr->read++;
|
||||
|
||||
for(next=robotptr->read; next<=robotptr->write; next++) {
|
||||
if ((robotptr->buffer[next] == '\r')
|
||||
|| (robotptr->buffer[next] == '\n'))
|
||||
break;
|
||||
}
|
||||
|
||||
if (next<robotptr->write) {
|
||||
robotptr->buffer[next]=0;
|
||||
next++;
|
||||
parse_line(robotptr);
|
||||
robotptr->read=next;
|
||||
parse_data(robotptr);
|
||||
}
|
||||
|
||||
if (robotptr->read == robotptr->write) {
|
||||
robotptr->read=robotptr->write=0;
|
||||
} else {
|
||||
bcopy((robotptr->buffer + robotptr->read),
|
||||
(robotptr->buffer), (robotptr->write-robotptr->read));
|
||||
robotptr->write-=robotptr->read;
|
||||
robotptr->read=0;
|
||||
}
|
||||
}
|
||||
|
||||
void run_client(aClient *robotptr) {
|
||||
fd_set mask, returnmask[3];
|
||||
int selectval;
|
||||
|
||||
FD_ZERO(&mask);
|
||||
FD_SET(robotptr->socket, &mask);
|
||||
|
||||
while (1) {
|
||||
bcopy((char *)&mask,(char *)returnmask,sizeof(fd_set));
|
||||
FD_ZERO(returnmask+1);
|
||||
bcopy((char *)&mask,(char *)(returnmask+2),sizeof(fd_set));
|
||||
|
||||
selectval=select(FD_SETSIZE,
|
||||
returnmask, returnmask+1, returnmask+2, NULL);
|
||||
|
||||
if (selectval) {
|
||||
read_data(robotptr);
|
||||
parse_data(robotptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void initialize(aClient *robotptr) {
|
||||
char passphrase[MYBUFSIZE];
|
||||
robotptr->socket=create_client(uplinkservername, atol(jupereason));
|
||||
sprintf(passphrase,
|
||||
"PROTOCTL %s %s %s %s %s %s %s %s %s\r\n",
|
||||
(options & 0x1) ? "NOQUIT" : "",
|
||||
(options & 0x2) ? "TOKEN" : "",
|
||||
(options & 0x4) ? "NICKv2" : "",
|
||||
(options & 0x8) ? "SJOIN" : "",
|
||||
(options & 0x10) ? "SJOIN2" : "",
|
||||
(options & 0x20) ? "UMODE2" : "",
|
||||
(options & 0x40) ? "NS" : "",
|
||||
(options & 0x100) ? "SJ3" : "",
|
||||
(options & 0x200) ? "SJB64" : "");
|
||||
write(robotptr->socket, passphrase, strlen(passphrase));
|
||||
sprintf(passphrase, "PASS %s\r\nSERVER %s 1 :[Burst analysis].\r\n",
|
||||
password,jupedservername);
|
||||
write(robotptr->socket, passphrase, strlen(passphrase));
|
||||
}
|
||||
|
||||
void fatalrestart(aClient *robotptr, const char *s) {
|
||||
perror(s);
|
||||
close(robotptr->socket);
|
||||
sleep(10);
|
||||
initialize(robotptr);
|
||||
run_client(robotptr);
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
aClient robot;
|
||||
char *p;
|
||||
|
||||
if (argc != 6) {
|
||||
fprintf(stderr, "IRCd burst generator, by Carsten V. Munk 2000, based off jupe.c by Nicolas Pioch\n");
|
||||
fprintf(stderr,
|
||||
"Usage: %s <burstservername> <uplink> <port> <options> <password>\n", argv[0]);
|
||||
fprintf(stderr, "Options can be a combination of these:\n");
|
||||
fprintf(stderr, "1 = Enable NOQUIT 2 = Enable TOKEN\n");
|
||||
fprintf(stderr, "3 = Enable NICKv2 4 = Enable SJOIN\n");
|
||||
fprintf(stderr, "5 = Enable SJOIN2 6 = Enable UMODE2\n");
|
||||
fprintf(stderr, "7 = Enable NS 8 = Ignore end of burst\n");
|
||||
fprintf(stderr, "9 = Enable SJ3 a = Enable SJB64\n");
|
||||
fatal("incorrect argument count");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
jupedservername=argv[1];
|
||||
uplinkservername=argv[2];
|
||||
jupereason=argv[3];
|
||||
password = argv[5];
|
||||
p = argv[4];
|
||||
for (; *p; p++)
|
||||
{
|
||||
if (*p == '1')
|
||||
options |= 0x1;
|
||||
if (*p == '2')
|
||||
options |= 0x2;
|
||||
if (*p == '3')
|
||||
options |= 0x4;
|
||||
if (*p == '4')
|
||||
options |= 0x8;
|
||||
if (*p == '5')
|
||||
options |= 0x10;
|
||||
if (*p == '6')
|
||||
options |= 0x20;
|
||||
if (*p == '7')
|
||||
options |= 0x40;
|
||||
if (*p == '8')
|
||||
options |= 0x80;
|
||||
if (*p == '9')
|
||||
options |= 0x100;
|
||||
if (*p == 'a')
|
||||
options |= 0x200;
|
||||
}
|
||||
/* installe le signal_catcher */
|
||||
signal(SIGTERM,(signalhandler)signal_catcher);
|
||||
|
||||
robot.read=robot.write=0;
|
||||
|
||||
initialize(&robot);
|
||||
run_client(&robot);
|
||||
|
||||
exit(0);
|
||||
}
|
||||
+1
-1
@@ -30,7 +30,7 @@
|
||||
|
||||
#define ChannelExists(n) (find_channel(n, NullChn) != NullChn)
|
||||
|
||||
#define IsULine(cptr,sptr) (sptr->flags & FLAGS_ULINE)
|
||||
#define IsULine(sptr) (sptr->flags & FLAGS_ULINE)
|
||||
|
||||
/* NOTE: Timestamps will be added to MODE-commands, so never make
|
||||
* RESYNCMODES and MODEPARAMS higher than MAXPARA-3. DALnet servers
|
||||
|
||||
+23
-9
@@ -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"
|
||||
@@ -57,7 +57,11 @@
|
||||
#define BMAGIC 0x4675636B596F754661736369737473
|
||||
|
||||
#define BASE_VERSION "Unreal"
|
||||
|
||||
#ifndef _WIN32
|
||||
#define FDwrite(x,y,z) write(x, y, z)
|
||||
#else
|
||||
#define FDwrite(x,y,z) send(x, y, z, 0)
|
||||
#endif
|
||||
#ifndef NULL
|
||||
#define NULL 0
|
||||
#endif
|
||||
@@ -189,13 +193,13 @@ extern unsigned char char_atribs[];
|
||||
#define ispunct(c) (!(char_atribs[(u_char)(c)]&(CNTRL|ALPHA|DIGIT)))
|
||||
#endif
|
||||
|
||||
// #ifndef DMALLOC
|
||||
#ifndef DMALLOC
|
||||
extern char *MyMalloc();
|
||||
// #else
|
||||
// #define MyMalloc malloc
|
||||
// #define MyRealloc realloc
|
||||
// #define MyFree free
|
||||
// #endif
|
||||
#else
|
||||
#define MyMalloc malloc
|
||||
#define MyRealloc realloc
|
||||
#define MyFree free
|
||||
#endif
|
||||
extern void flush_connections();
|
||||
extern struct SLink *find_user_link( /* struct SLink *, struct Client * */ );
|
||||
|
||||
@@ -242,7 +246,17 @@ extern struct SLink *find_user_link( /* struct SLink *, struct Client * */ );
|
||||
"(ohv)@%+"
|
||||
|
||||
/* Server-Server PROTOCTL -Stskeeps */
|
||||
#define PROTOCTL_SERVER "NOQUIT TOKEN NICKv2 SJOIN SJOIN2 UMODE2 VL SJ3 NS" ZIPSTUFF
|
||||
#define PROTOCTL_SERVER "NOQUIT" \
|
||||
" TOKEN" \
|
||||
" NICKv2" \
|
||||
" SJOIN" \
|
||||
" SJOIN2" \
|
||||
" UMODE2" \
|
||||
" VL" \
|
||||
" SJ3" \
|
||||
" NS" \
|
||||
" SJB64" \
|
||||
ZIPSTUFF
|
||||
|
||||
#ifdef _WIN32
|
||||
/*
|
||||
|
||||
+33
-25
@@ -52,34 +52,27 @@
|
||||
* Define this if you're testing/debugging/programming.
|
||||
*/
|
||||
#undef DEBUG
|
||||
|
||||
/* Type of host. These should be made redundant somehow. -avalon */
|
||||
|
||||
/* BSD Nothing Needed 4.{2,3} BSD, SunOS 3.x, 4.x */
|
||||
/* HPUX Nothing needed (A.08/A.09) */
|
||||
/* ULTRIX Nothing needed (4.2) */
|
||||
/* OSF Nothing needed (1.2) */
|
||||
/* #undef AIX /* IBM ugly so-called Unix, AIX */
|
||||
/* #undef MIPS /* MIPS Unix */
|
||||
/* #undef AIX IBM ugly so-called Unix, AIX */
|
||||
/* #undef MIPS MIPS Unix */
|
||||
/* SGI Nothing needed (IRIX 4.0.4) */
|
||||
/* #undef SVR3 /* SVR3 stuff - being worked on where poss. */
|
||||
/* #undef DYNIXPTX /* Sequents Brain-dead Posix implement. */
|
||||
/* #undef SOL20 /* Solaris2 */
|
||||
/* #undef ESIX /* ESIX */
|
||||
/* #undef NEXT /* NeXTStep */
|
||||
/* #undef SVR4 /* */
|
||||
/* #undef SVR3 SVR3 stuff - being worked on where poss. */
|
||||
/* #undef DYNIXPTX Sequents Brain-dead Posix implement. */
|
||||
/* #undef SOL20 Solaris2 */
|
||||
/* #undef ESIX ESIX */
|
||||
/* #undef NEXT NeXTStep */
|
||||
/* #undef SVR4 */
|
||||
|
||||
/* Additional flags to give FreeBSD's malloc, only play with this if you
|
||||
* know what you're doing.
|
||||
*/
|
||||
|
||||
#define MALLOC_FLAGS_EXTRA ""
|
||||
/*
|
||||
ConferenceRoom Java Client Hack -Fish
|
||||
if you want it to work #define CONFROOM_JAVA_PORT <port>
|
||||
where port MUST be a seperate port java clients connects on ..
|
||||
*/
|
||||
#undef CONFROOM_JAVA_PORT
|
||||
|
||||
/*
|
||||
dog3/comstud ircd fdlists
|
||||
@@ -88,6 +81,17 @@
|
||||
|
||||
#undef NO_FDLIST
|
||||
|
||||
/*
|
||||
* Defining this will allow all ircops to see people in +s channels
|
||||
* By default, only net/tech admins can see this
|
||||
*/
|
||||
#undef SEE_SECRET
|
||||
|
||||
/*
|
||||
* This allows you to see modes in /list
|
||||
*/
|
||||
#define LIST_SHOW_MODES
|
||||
|
||||
/*
|
||||
* Admin's chat...
|
||||
*/
|
||||
@@ -98,6 +102,12 @@
|
||||
*/
|
||||
#undef SHUN_NOTICES
|
||||
|
||||
/*
|
||||
If you want to support chinese and/or japanese nicks
|
||||
*/
|
||||
#undef CHINESE_NICK
|
||||
#undef JAPANESE_NICK
|
||||
|
||||
/*
|
||||
Remote rehash
|
||||
*/
|
||||
@@ -130,7 +140,7 @@
|
||||
*
|
||||
* This enables the spoof protection.
|
||||
*/
|
||||
/* #define NOSPOOF 1 /* */
|
||||
/* #define NOSPOOF 1 */
|
||||
|
||||
/*
|
||||
* HOSTILENAME - Define this if you want the hostile username patch included,
|
||||
@@ -169,9 +179,9 @@
|
||||
|
||||
/* Do these work? I dunno... */
|
||||
|
||||
/* #undef VMS /* Should work for IRC client, not server */
|
||||
/* #undef MAIL50 /* If you're running VMS 5.0 */
|
||||
/* #undef PCS /* PCS Cadmus MUNIX, use with BSD flag! */
|
||||
/* #undef VMS Should work for IRC client, not server */
|
||||
/* #undef MAIL50 If you're running VMS 5.0 */
|
||||
/* #undef PCS PCS Cadmus MUNIX, use with BSD flag! */
|
||||
|
||||
/*
|
||||
* NOTE: On some systems, valloc() causes many problems.
|
||||
@@ -199,7 +209,7 @@
|
||||
* the maintainer.
|
||||
*/
|
||||
|
||||
/* #undef DEBUGMODE /* define DEBUGMODE to enable debugging mode.*/
|
||||
/* #undef DEBUGMODE define DEBUGMODE to enable debugging mode.*/
|
||||
|
||||
/* We not check whether this is ok at compile time -- codemastr */
|
||||
/*
|
||||
@@ -253,7 +263,7 @@
|
||||
*
|
||||
* You may want to define IRC_UID and IRC_GID
|
||||
*/
|
||||
/* #define CHROOTDIR /* */
|
||||
/* #define CHROOTDIR */
|
||||
|
||||
/* SHOW_INVISIBLE_LUSERS
|
||||
*
|
||||
@@ -405,7 +415,7 @@
|
||||
#define HelpServ "HelpServ"
|
||||
#define StatServ "StatServ"
|
||||
#define InfoServ "InfoServ"
|
||||
|
||||
#define BotServ "BotServ"
|
||||
/*
|
||||
* How many seconds in between simultaneous nick changes?
|
||||
*/
|
||||
@@ -538,7 +548,7 @@
|
||||
* CONNECTTIMEOUT - 10 seconds for its host to respond to an ident lookup
|
||||
* query and for a DNS answer to be retrieved.
|
||||
*/
|
||||
#define CONNECTTIMEOUT 60 /* Recommended value: 60 */
|
||||
#define CONNECTTIMEOUT 30 /* Recommended value: 60 */
|
||||
|
||||
/*
|
||||
* Max time from the nickname change that still causes KILL
|
||||
@@ -597,9 +607,7 @@ extern void debug();
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef ENABLE_SUMMON
|
||||
# undef LEAST_IDLE
|
||||
#endif
|
||||
|
||||
#if defined(mips) || defined(PCS)
|
||||
#undef SYSV
|
||||
|
||||
+14
-14
@@ -42,12 +42,11 @@ extern int bootopt;
|
||||
extern TS TSoffset;
|
||||
/* Prototype added to force errors -- Barubary */
|
||||
extern TS check_pings(TS now, int check_kills);
|
||||
extern TS TS2ts(char *s);
|
||||
|
||||
/* Remmed out for win32 compatibility.. as stated of 467leaf win32 port.. */
|
||||
|
||||
#ifdef _WIN32
|
||||
// extern void *hCio;
|
||||
#endif
|
||||
extern LoopStruct loop;
|
||||
|
||||
#ifdef SHOWCONNECTINFO
|
||||
|
||||
@@ -81,8 +80,8 @@ extern int R_do_socks, R_good_socks, R_no_socks;
|
||||
#endif
|
||||
extern aChannel *find_channel PROTO((char *, aChannel *));
|
||||
extern void remove_user_from_channel PROTO((aClient *, aChannel *));
|
||||
extern char *base64enc PROTO((unsigned long));
|
||||
extern unsigned long base64dec PROTO((char *));
|
||||
extern char *base64enc PROTO((long));
|
||||
extern long base64dec PROTO((char *));
|
||||
extern void add_server_to_table PROTO((aClient *));
|
||||
extern void remove_server_from_tabel PROTO((aClient *));
|
||||
|
||||
@@ -105,8 +104,9 @@ extern aClient *find_name PROTO((char *, aClient *));
|
||||
extern aClient *find_nickserv PROTO((char *, aClient *));
|
||||
extern aClient *find_person PROTO((char *, aClient *));
|
||||
extern aClient *find_server PROTO((char *, aClient *));
|
||||
extern aClient *find_server_quickx PROTO((char *, aClient *));
|
||||
extern aClient *find_service PROTO((char *, aClient *));
|
||||
extern aClient *find_server_quick PROTO((char *));
|
||||
#define find_server_quick(x) find_server_quickx(x, NULL)
|
||||
extern char *find_or_add PROTO((char *));
|
||||
extern int attach_conf PROTO((aClient *, aConfItem *));
|
||||
extern aConfItem *attach_confs PROTO((aClient *, char *, int));
|
||||
@@ -139,8 +139,9 @@ extern void inittoken PROTO(());
|
||||
extern void reset_help PROTO(());
|
||||
extern int find_exception(char *); /* hidden host */
|
||||
|
||||
#ifndef DMALLOC
|
||||
extern char *MyMalloc PROTO((int)), *MyRealloc PROTO((char *, int));
|
||||
|
||||
#endif
|
||||
extern char *debugmode, *configfile, *sbrk0;
|
||||
extern char *getfield PROTO((char *));
|
||||
extern void get_sockhost PROTO((aClient *, char *));
|
||||
@@ -179,10 +180,6 @@ extern int read_message PROTO((TS, fdlist *));
|
||||
extern void report_error PROTO((char *, aClient *));
|
||||
extern void set_non_blocking PROTO((int, aClient *));
|
||||
extern int setup_ping PROTO(());
|
||||
extern void summon PROTO((aClient *, char *, char *, char *));
|
||||
extern int utmp_open PROTO(());
|
||||
extern int utmp_read PROTO((int, char *, char *, char *, int));
|
||||
extern int utmp_close PROTO((int));
|
||||
|
||||
extern void start_auth PROTO((aClient *));
|
||||
extern void read_authports PROTO((aClient *));
|
||||
@@ -267,8 +264,8 @@ extern aClient *next_client PROTO((aClient *, char *));
|
||||
extern int m_umode PROTO((aClient *, aClient *, int, char **));
|
||||
extern int m_names PROTO((aClient *, aClient *, int, char **));
|
||||
extern int m_server_estab PROTO((aClient *));
|
||||
extern void send_umode PROTO((aClient *, aClient *, int, int, char *));
|
||||
extern void send_umode_out PROTO((aClient *, aClient *, int));
|
||||
extern void send_umode PROTO((aClient *, aClient *, long, long, char *));
|
||||
extern void send_umode_out PROTO((aClient *, aClient *, long));
|
||||
|
||||
extern void free_client PROTO((aClient *));
|
||||
extern void free_link PROTO((Link *));
|
||||
@@ -276,7 +273,7 @@ extern void free_ban PROTO((Ban *));
|
||||
extern void free_conf PROTO((aConfItem *));
|
||||
extern void free_class PROTO((aClass *));
|
||||
extern void free_user PROTO((anUser *, aClient *));
|
||||
extern int find_str_match_link PROTO((Link **, char *));
|
||||
extern int find_str_match_link PROTO((Link *, char *));
|
||||
extern void free_str_list PROTO((Link *));
|
||||
extern Link *make_link PROTO(());
|
||||
extern Ban *make_ban PROTO(());
|
||||
@@ -333,6 +330,9 @@ extern char *find_by_aln PROTO((char *));
|
||||
extern char *convert2aln PROTO((int));
|
||||
extern int convertfromaln PROTO((char *));
|
||||
extern char *find_server_aln PROTO((char *));
|
||||
extern atime(char *xtime);
|
||||
|
||||
|
||||
extern int dopacket PROTO((aClient *, char *, int));
|
||||
|
||||
/*VARARGS2*/
|
||||
|
||||
@@ -16,14 +16,8 @@
|
||||
|
||||
/* You do want it to work in debug mode yes ? --DrBin */
|
||||
|
||||
#ifndef DEBUGMODE
|
||||
extern char *ircvsprintf(char *str, const char *format, va_list);
|
||||
extern char *ircsprintf(char *str, const char *format, ...);
|
||||
#else
|
||||
#define ircsprintf sprintf
|
||||
#define ircvsprintf vsprintf
|
||||
#endif
|
||||
|
||||
|
||||
extern const char atoi_tab[4000];
|
||||
|
||||
|
||||
+143
-148
@@ -309,16 +309,16 @@
|
||||
#define TOK_CHGNAME "BK"
|
||||
#define MSG_SHUN "SHUN"
|
||||
#define TOK_SHUN "BL"
|
||||
#ifdef CRYPTOIRCD
|
||||
#define MSG_CRYPTO "CRYPTO"
|
||||
#define TOK_CRYPTO "BM"
|
||||
#endif
|
||||
#define MSG_NEWJOIN "NEWJOIN" /* For CR Java Chat */
|
||||
#define MSG_POST "POST"
|
||||
#define TOK_POST "BN"
|
||||
#define MSG_INFOSERV "INFOSERV"
|
||||
#define MSG_IS "IS"
|
||||
#define TOK_INFOSERV "BO"
|
||||
|
||||
#define MSG_BOTSERV "BOTSERV"
|
||||
#define TOK_BOTSERV "BS"
|
||||
|
||||
#define MAXPARA 15
|
||||
|
||||
extern int m_private(), m_topic(), m_join(), m_part(), m_mode(), m_svsmode();
|
||||
@@ -333,8 +333,8 @@ extern int m_protoctl();
|
||||
extern int m_motd(), m_who(), m_whois(), m_user(), m_list();
|
||||
extern int m_server(), m_info(), m_links(), m_summon(), m_stats();
|
||||
extern int m_users(), m_version(), m_help();
|
||||
extern int m_nickserv(), m_operserv(), m_chanserv(), m_memoserv(),
|
||||
m_infoserv(), m_helpserv(), m_services(), m_identify();
|
||||
extern int m_nickserv(), m_operserv(), m_chanserv(), m_memoserv();
|
||||
extern int m_infoserv(), m_helpserv(), m_botserv(), m_services(), m_identify();
|
||||
extern int m_statserv();
|
||||
extern int m_squit(), m_away(), m_connect();
|
||||
extern int m_oper(), m_pass(), m_trace();
|
||||
@@ -359,155 +359,150 @@ extern int m_chgident(), m_swhois(), m_svso(), m_svsfline();
|
||||
extern int m_tkl(), m_vhost(), m_botmotd(), m_sjoin(), m_htm();
|
||||
extern int m_umode2(), m_dccdeny(), m_undccdeny();
|
||||
extern int m_chgname(), m_shun(), m_post();
|
||||
#ifdef CRYPTOIRCD
|
||||
extern int m_crypto();
|
||||
#endif
|
||||
#ifdef GUEST
|
||||
extern int m_guest();
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef MSGTAB
|
||||
struct Message *msgmap[256];
|
||||
struct Message msgtab[] = {
|
||||
{MSG_PRIVATE, m_private, 0, MAXPARA, 1, TOK_PRIVATE, 0L},
|
||||
{MSG_NOTICE, m_notice, 0, MAXPARA, 1, TOK_NOTICE, 0L},
|
||||
{MSG_MODE, m_mode, 0, MAXPARA, 1, TOK_MODE, 0L},
|
||||
{MSG_NICK, m_nick, 0, MAXPARA, 1, TOK_NICK, 0L},
|
||||
{MSG_JOIN, m_join, 0, MAXPARA, 1, TOK_JOIN, 0L},
|
||||
{MSG_PING, m_ping, 0, MAXPARA, 1, TOK_PING, 0L},
|
||||
{MSG_WHOIS, m_whois, 0, MAXPARA, 1, TOK_WHOIS, 0L},
|
||||
{MSG_ISON, m_ison, 0, 1, 1, TOK_ISON, 0L},
|
||||
{MSG_USER, m_user, 0, MAXPARA, 1, TOK_USER, 0L},
|
||||
{MSG_PONG, m_pong, 0, MAXPARA, 1, TOK_PONG, 0L},
|
||||
{MSG_PART, m_part, 0, MAXPARA, 1, TOK_PART, 0L},
|
||||
{MSG_QUIT, m_quit, 0, MAXPARA, 1, TOK_QUIT, 0L},
|
||||
{MSG_WATCH, m_watch, 0, 1, 1, TOK_WATCH, 0L},
|
||||
{MSG_USERHOST, m_userhost, 0, 1, 1, TOK_USERHOST, 0L},
|
||||
{MSG_SVSNICK, m_svsnick, 0, MAXPARA, 1, TOK_SVSNICK, 0L},
|
||||
{MSG_SVSMODE, m_svsmode, 0, MAXPARA, 1, TOK_SVSMODE, 0L},
|
||||
{MSG_LUSERS, m_lusers, 0, MAXPARA, 1, TOK_LUSERS, 0L},
|
||||
{MSG_IDENTIFY, m_identify, 0, 1, 1, TOK_IDENTIFY, 0L},
|
||||
{MSG_CHANSERV, m_chanserv, 0, 1, 1, TOK_CHANSERV, 0L},
|
||||
{MSG_TOPIC, m_topic, 0, MAXPARA, 1, TOK_TOPIC, 0L},
|
||||
{MSG_INVITE, m_invite, 0, MAXPARA, 1, TOK_INVITE, 0L},
|
||||
{MSG_KICK, m_kick, 0, MAXPARA, 1, TOK_KICK, 0L},
|
||||
{MSG_WALLOPS, m_wallops, 0, 1, 1, TOK_WALLOPS, 0L},
|
||||
{MSG_ERROR, m_error, 0, MAXPARA, 1, TOK_ERROR, 0L},
|
||||
{MSG_KILL, m_kill, 0, MAXPARA, 1, TOK_KILL, 0L},
|
||||
{MSG_PROTOCTL, m_protoctl, 0, MAXPARA, 1, TOK_PROTOCTL, 0L},
|
||||
{MSG_AWAY, m_away, 0, MAXPARA, 1, TOK_AWAY, 0L},
|
||||
{MSG_SERVER, m_server, 0, MAXPARA, 1, TOK_SERVER, 0L},
|
||||
{MSG_SQUIT, m_squit, 0, MAXPARA, 1, TOK_SQUIT, 0L},
|
||||
{MSG_WHO, m_who, 0, MAXPARA, 1, TOK_WHO, 0L},
|
||||
{MSG_WHOWAS, m_whowas, 0, MAXPARA, 1, TOK_WHOWAS, 0L},
|
||||
{MSG_LIST, m_list, 0, MAXPARA, 1, TOK_LIST, 0L},
|
||||
{MSG_NAMES, m_names, 0, MAXPARA, 1, TOK_NAMES, 0L},
|
||||
{MSG_TRACE, m_trace, 0, MAXPARA, 1, TOK_TRACE, 0L},
|
||||
{MSG_PASS, m_pass, 0, MAXPARA, 1, TOK_PASS, 0L},
|
||||
{MSG_TIME, m_time, 0, MAXPARA, 1, TOK_TIME, 0L},
|
||||
{MSG_OPER, m_oper, 0, MAXPARA, 1, TOK_OPER, 0L},
|
||||
{MSG_CONNECT, m_connect, 0, MAXPARA, 1, TOK_CONNECT, 0L},
|
||||
{MSG_VERSION, m_version, 0, MAXPARA, 1, TOK_VERSION, 0L},
|
||||
{MSG_STATS, m_stats, 0, MAXPARA, 1, TOK_STATS, 0L},
|
||||
{MSG_LINKS, m_links, 0, MAXPARA, 1, TOK_LINKS, 0L},
|
||||
{MSG_ADMIN, m_admin, 0, MAXPARA, 1, TOK_ADMIN, 0L},
|
||||
{MSG_USERS, m_users, 0, MAXPARA, 1, TOK_USERS, 0L},
|
||||
{MSG_SAMODE, m_samode, 0, MAXPARA, 1, TOK_SAMODE, 0L},
|
||||
{MSG_SVSKILL, m_svskill, 0, MAXPARA, 1, TOK_SVSKILL, 0L},
|
||||
{MSG_SVSNOOP, m_svsnoop, 0, MAXPARA, 1, TOK_SVSNOOP, 0L},
|
||||
{MSG_CS, m_chanserv, 0, 1, 1, TOK_CHANSERV, 0L},
|
||||
{MSG_NICKSERV, m_nickserv, 0, 1, 1, TOK_NICKSERV, 0L},
|
||||
{MSG_NS, m_nickserv, 0, 1, 1, TOK_NICKSERV, 0L},
|
||||
{MSG_INFOSERV, m_infoserv, 0, 1, 1, TOK_INFOSERV, 0L},
|
||||
{MSG_IS, m_infoserv, 0, 1, 1, TOK_INFOSERV, 0L},
|
||||
{MSG_OPERSERV, m_operserv, 0, 1, 1, TOK_OPERSERV, 0L},
|
||||
{MSG_OS, m_operserv, 0, 1, 1, TOK_OPERSERV, 0L},
|
||||
{MSG_MEMOSERV, m_memoserv, 0, 1, 1, TOK_MEMOSERV, 0L},
|
||||
{MSG_MS, m_memoserv, 0, 1, 1, TOK_MEMOSERV, 0L},
|
||||
{MSG_HELPSERV, m_helpserv, 0, 1, 1, TOK_HELPSERV, 0L},
|
||||
{MSG_HS, m_helpserv, 0, 1, 1, TOK_HELPSERV, 0L},
|
||||
{MSG_SERVICES, m_services, 0, 1, 1, TOK_SERVICES, 0L},
|
||||
{MSG_SUMMON, m_summon, 0, MAXPARA, 1, TOK_SUMMON, 0L},
|
||||
{MSG_HELP, m_help, 0, 1, 1, TOK_HELP, 0L},
|
||||
{MSG_HELPOP, m_help, 0, 1, 1, TOK_HELP, 0L},
|
||||
{MSG_INFO, m_info, 0, MAXPARA, 1, TOK_INFO, 0L},
|
||||
{MSG_MOTD, m_motd, 0, MAXPARA, 1, TOK_MOTD, 0L},
|
||||
{MSG_CLOSE, m_close, 0, MAXPARA, 1, TOK_CLOSE, 0L},
|
||||
{MSG_SILENCE, m_silence, 0, MAXPARA, 1, TOK_SILENCE, 0L},
|
||||
{MSG_AKILL, m_akill, 0, MAXPARA, 1, TOK_AKILL, 0L},
|
||||
{MSG_SQLINE, m_sqline, 0, MAXPARA, 1, TOK_SQLINE, 0L},
|
||||
{MSG_UNSQLINE, m_unsqline, 0, MAXPARA, 1, TOK_UNSQLINE, 0L},
|
||||
{MSG_KLINE, m_kline, 0, MAXPARA, 1, TOK_KLINE, 0L},
|
||||
{MSG_UNKLINE, m_unkline, 0, MAXPARA, 1, TOK_UNKLINE, 0L},
|
||||
{MSG_ZLINE, m_zline, 0, MAXPARA, 1, TOK_ZLINE, 0L},
|
||||
{MSG_UNZLINE, m_unzline, 0, MAXPARA, 1, TOK_UNZLINE, 0L},
|
||||
{MSG_RAKILL, m_rakill, 0, MAXPARA, 1, TOK_RAKILL, 0L},
|
||||
{MSG_GNOTICE, m_gnotice, 0, MAXPARA, 1, TOK_GNOTICE, 0L},
|
||||
{MSG_GOPER, m_goper, 0, MAXPARA, 1, TOK_GOPER, 0L},
|
||||
{MSG_GLOBOPS, m_globops, 0, MAXPARA, 1, TOK_GLOBOPS, 0L},
|
||||
{MSG_CHATOPS, m_chatops, 0, 1, 1, TOK_CHATOPS, 0L},
|
||||
{MSG_LOCOPS, m_locops, 0, 1, 1, TOK_LOCOPS, 0L},
|
||||
{MSG_HASH, m_hash, 0, MAXPARA, 1, TOK_HASH, 0L},
|
||||
{MSG_DNS, m_dns, 0, MAXPARA, 1, TOK_DNS, 0L},
|
||||
{MSG_REHASH, m_rehash, 0, MAXPARA, 1, TOK_REHASH, 0L},
|
||||
{MSG_RESTART, m_restart, 0, MAXPARA, 1, TOK_RESTART, 0L},
|
||||
{MSG_DIE, m_die, 0, MAXPARA, 1, TOK_DIE, 0L},
|
||||
{MSG_RULES, m_rules, 0, MAXPARA, 1, TOK_RULES, 0L},
|
||||
{MSG_MAP, m_map, 0, MAXPARA, 1, TOK_MAP, 0L},
|
||||
{MSG_GLINE, m_gline, 0, MAXPARA, 1, TOK_GLINE, 0L},
|
||||
{MSG_REMGLINE, m_remgline, 0, MAXPARA, 1, TOK_REMGLINE, 0L},
|
||||
{MSG_DALINFO, m_dalinfo, 0, MAXPARA, 1, TOK_DALINFO, 0L},
|
||||
{MSG_SVS2MODE, m_svs2mode, 0, MAXPARA, 1, TOK_SVS2MODE, 0L},
|
||||
{MSG_MKPASSWD, m_mkpasswd, 0, MAXPARA, 1, TOK_MKPASSWD, 0L},
|
||||
{MSG_ADDLINE, m_addline, 0, 1, 1, TOK_ADDLINE, 0L},
|
||||
{MSG_ADMINCHAT, m_admins, 0, 1, 1, TOK_ADMINCHAT, 0L},
|
||||
{MSG_SETHOST, m_sethost, 0, MAXPARA, 1, TOK_SETHOST, 0L},
|
||||
{MSG_TECHAT, m_techat, 0, 1, 1, TOK_TECHAT, 0L},
|
||||
{MSG_NACHAT, m_nachat, 0, 1, 1, TOK_NACHAT, 0L},
|
||||
{MSG_SETIDENT, m_setident, 0, MAXPARA, 1, TOK_SETIDENT, 0L},
|
||||
{MSG_SETNAME, m_setname, 0, 1, 1, TOK_SETNAME, 0L},
|
||||
{MSG_LAG, m_lag, 0, MAXPARA, 1, TOK_LAG, 0L},
|
||||
{MSG_SDESC, m_sdesc, 0, 1, 1, TOK_SDESC, 0L},
|
||||
{MSG_STATSERV, m_statserv, 0, 1, 1, TOK_STATSERV, 0L},
|
||||
{MSG_KNOCK, m_knock, 0, 2, 1, TOK_KNOCK, 0L},
|
||||
{MSG_CREDITS, m_credits, 0, MAXPARA, 1, TOK_CREDITS, 0L},
|
||||
{MSG_LICENSE, m_license, 0, MAXPARA, 1, TOK_LICENSE, 0L},
|
||||
{MSG_CHGHOST, m_chghost, 0, MAXPARA, 1, TOK_CHGHOST, 0L},
|
||||
{MSG_RPING, m_rping, 0, MAXPARA, 1, TOK_RPING, 0L},
|
||||
{MSG_RPONG, m_rpong, 0, MAXPARA, 1, TOK_RPONG, 0L},
|
||||
{MSG_NETINFO, m_netinfo, 0, MAXPARA, 1, TOK_NETINFO, 0L},
|
||||
{MSG_SENDUMODE, m_sendumode, 0, MAXPARA, 1, TOK_SENDUMODE, 0L},
|
||||
{MSG_SMO, m_sendumode, 0, MAXPARA, 1, TOK_SMO, 0L},
|
||||
{MSG_ADDMOTD, m_addmotd, 0, 1, 1, TOK_ADDMOTD, 0L},
|
||||
{MSG_ADDOMOTD, m_addomotd, 0, 1, 1, TOK_ADDOMOTD, 0L},
|
||||
{MSG_SVSMOTD, m_svsmotd, 0, MAXPARA, 1, TOK_SVSMOTD, 0L},
|
||||
{MSG_OPERMOTD, m_opermotd, 0, MAXPARA, 1, TOK_OPERMOTD, 0L},
|
||||
{MSG_TSCTL, m_tsctl, 0, MAXPARA, 1, TOK_TSCTL, 0L},
|
||||
{MSG_SVSJOIN, m_svsjoin, 0, MAXPARA, 1, TOK_SVSJOIN, 0L},
|
||||
{MSG_SAJOIN, m_sajoin, 0, MAXPARA, 1, TOK_SAJOIN, 0L},
|
||||
{MSG_SVSPART, m_svspart, 0, MAXPARA, 1, TOK_SVSPART, 0L},
|
||||
{MSG_SAPART, m_sapart, 0, MAXPARA, 1, TOK_SAPART, 0L},
|
||||
{MSG_CHGIDENT, m_chgident, 0, MAXPARA, 1, TOK_CHGIDENT, 0L},
|
||||
{MSG_SWHOIS, m_swhois, 0, MAXPARA, 1, TOK_SWHOIS, 0L},
|
||||
{MSG_SVSO, m_svso, 0, MAXPARA, 1, TOK_SVSO, 0L},
|
||||
{MSG_SVSFLINE, m_svsfline, 0, MAXPARA, 1, TOK_SVSFLINE, 0L},
|
||||
{MSG_TKL, m_tkl, 0, MAXPARA, 1, TOK_TKL, 0L},
|
||||
{MSG_VHOST, m_vhost, 0, MAXPARA, 1, TOK_VHOST, 0L},
|
||||
{MSG_BOTMOTD, m_botmotd, 0, MAXPARA, 1, TOK_BOTMOTD, 0L},
|
||||
{MSG_SJOIN, m_sjoin, 0, MAXPARA, 1, TOK_SJOIN, 0L},
|
||||
{MSG_HTM, m_htm, 0, MAXPARA, 1, TOK_HTM, 0L},
|
||||
{MSG_UMODE2, m_umode2, 0, MAXPARA, 1, TOK_UMODE2, 0L},
|
||||
{MSG_DCCDENY, m_dccdeny, 0, 2, 1, TOK_DCCDENY, 0L},
|
||||
{MSG_UNDCCDENY, m_undccdeny, 0, MAXPARA, 1, TOK_UNDCCDENY, 0L},
|
||||
{MSG_CHGNAME, m_chgname, 0, MAXPARA, 1, TOK_CHGNAME, 0L},
|
||||
{MSG_SVSNAME, m_chgname, 0, MAXPARA, 1, TOK_CHGNAME, 0L},
|
||||
{MSG_SHUN, m_shun, 0, MAXPARA, 1, TOK_SHUN, 0L},
|
||||
#ifdef CRYPTOIRCD
|
||||
{MSG_CRYPTO, m_crypto, 0, MAXPARA, 1, TOK_CRYPTO, 0L},
|
||||
#endif
|
||||
{MSG_NEWJOIN, m_join, 0, MAXPARA, 1, TOK_JOIN, 0L},
|
||||
{(char *)0, (int (*)())0, 0, 0, 0, 0, 0L}
|
||||
{MSG_PRIVATE, m_private, 0, MAXPARA, TOK_PRIVATE, 0L},
|
||||
{MSG_NOTICE, m_notice, 0, MAXPARA, TOK_NOTICE, 0L},
|
||||
{MSG_MODE, m_mode, 0, MAXPARA, TOK_MODE, 0L},
|
||||
{MSG_NICK, m_nick, 0, MAXPARA, TOK_NICK, 0L},
|
||||
{MSG_JOIN, m_join, 0, MAXPARA, TOK_JOIN, 0L},
|
||||
{MSG_PING, m_ping, 0, MAXPARA, TOK_PING, 0L},
|
||||
{MSG_WHOIS, m_whois, 0, MAXPARA, TOK_WHOIS, 0L},
|
||||
{MSG_ISON, m_ison, 0, 1, TOK_ISON, 0L},
|
||||
{MSG_USER, m_user, 0, MAXPARA, TOK_USER, 0L},
|
||||
{MSG_PONG, m_pong, 0, MAXPARA, TOK_PONG, 0L},
|
||||
{MSG_PART, m_part, 0, MAXPARA, TOK_PART, 0L},
|
||||
{MSG_QUIT, m_quit, 0, MAXPARA, TOK_QUIT, 0L},
|
||||
{MSG_WATCH, m_watch, 0, 1, TOK_WATCH, 0L},
|
||||
{MSG_USERHOST, m_userhost, 0, 1, TOK_USERHOST, 0L},
|
||||
{MSG_SVSNICK, m_svsnick, 0, MAXPARA, TOK_SVSNICK, 0L},
|
||||
{MSG_SVSMODE, m_svsmode, 0, MAXPARA, TOK_SVSMODE, 0L},
|
||||
{MSG_LUSERS, m_lusers, 0, MAXPARA, TOK_LUSERS, 0L},
|
||||
{MSG_IDENTIFY, m_identify, 0, 1, TOK_IDENTIFY, 0L},
|
||||
{MSG_CHANSERV, m_chanserv, 0, 1, TOK_CHANSERV, 0L},
|
||||
{MSG_TOPIC, m_topic, 0, MAXPARA, TOK_TOPIC, 0L},
|
||||
{MSG_INVITE, m_invite, 0, MAXPARA, TOK_INVITE, 0L},
|
||||
{MSG_KICK, m_kick, 0, MAXPARA, TOK_KICK, 0L},
|
||||
{MSG_WALLOPS, m_wallops, 0, 1, TOK_WALLOPS, 0L},
|
||||
{MSG_ERROR, m_error, 0, MAXPARA, TOK_ERROR, 0L},
|
||||
{MSG_KILL, m_kill, 0, MAXPARA, TOK_KILL, 0L},
|
||||
{MSG_PROTOCTL, m_protoctl, 0, MAXPARA, TOK_PROTOCTL, 0L},
|
||||
{MSG_AWAY, m_away, 0, MAXPARA, TOK_AWAY, 0L},
|
||||
{MSG_SERVER, m_server, 0, MAXPARA, TOK_SERVER, 0L},
|
||||
{MSG_SQUIT, m_squit, 0, MAXPARA, TOK_SQUIT, 0L},
|
||||
{MSG_WHO, m_who, 0, MAXPARA, TOK_WHO, 0L},
|
||||
{MSG_WHOWAS, m_whowas, 0, MAXPARA, TOK_WHOWAS, 0L},
|
||||
{MSG_LIST, m_list, 0, MAXPARA, TOK_LIST, 0L},
|
||||
{MSG_NAMES, m_names, 0, MAXPARA, TOK_NAMES, 0L},
|
||||
{MSG_TRACE, m_trace, 0, MAXPARA, TOK_TRACE, 0L},
|
||||
{MSG_PASS, m_pass, 0, MAXPARA, TOK_PASS, 0L},
|
||||
{MSG_TIME, m_time, 0, MAXPARA, TOK_TIME, 0L},
|
||||
{MSG_OPER, m_oper, 0, MAXPARA, TOK_OPER, 0L},
|
||||
{MSG_CONNECT, m_connect, 0, MAXPARA, TOK_CONNECT, 0L},
|
||||
{MSG_VERSION, m_version, 0, MAXPARA, TOK_VERSION, 0L},
|
||||
{MSG_STATS, m_stats, 0, MAXPARA, TOK_STATS, 0L},
|
||||
{MSG_LINKS, m_links, 0, MAXPARA, TOK_LINKS, 0L},
|
||||
{MSG_ADMIN, m_admin, 0, MAXPARA, TOK_ADMIN, 0L},
|
||||
{MSG_SUMMON, m_summon, 0, 1, TOK_SUMMON, 0L},
|
||||
{MSG_USERS, m_users, 0, MAXPARA, TOK_USERS, 0L},
|
||||
{MSG_SAMODE, m_samode, 0, MAXPARA, TOK_SAMODE, 0L},
|
||||
{MSG_SVSKILL, m_svskill, 0, MAXPARA, TOK_SVSKILL, 0L},
|
||||
{MSG_SVSNOOP, m_svsnoop, 0, MAXPARA, TOK_SVSNOOP, 0L},
|
||||
{MSG_CS, m_chanserv, 0, 1, TOK_CHANSERV, 0L},
|
||||
{MSG_NICKSERV, m_nickserv, 0, 1, TOK_NICKSERV, 0L},
|
||||
{MSG_NS, m_nickserv, 0, 1, TOK_NICKSERV, 0L},
|
||||
{MSG_INFOSERV, m_infoserv, 0, 1, TOK_INFOSERV, 0L},
|
||||
{MSG_IS, m_infoserv, 0, 1, TOK_INFOSERV, 0L},
|
||||
{MSG_OPERSERV, m_operserv, 0, 1, TOK_OPERSERV, 0L},
|
||||
{MSG_OS, m_operserv, 0, 1, TOK_OPERSERV, 0L},
|
||||
{MSG_MEMOSERV, m_memoserv, 0, 1, TOK_MEMOSERV, 0L},
|
||||
{MSG_MS, m_memoserv, 0, 1, TOK_MEMOSERV, 0L},
|
||||
{MSG_HELPSERV, m_helpserv, 0, 1, TOK_HELPSERV, 0L},
|
||||
{MSG_HS, m_helpserv, 0, 1, TOK_HELPSERV, 0L},
|
||||
{MSG_SERVICES, m_services, 0, 1, TOK_SERVICES, 0L},
|
||||
{MSG_HELP, m_help, 0, 1, TOK_HELP, 0L},
|
||||
{MSG_HELPOP, m_help, 0, 1, TOK_HELP, 0L},
|
||||
{MSG_INFO, m_info, 0, MAXPARA, TOK_INFO, 0L},
|
||||
{MSG_MOTD, m_motd, 0, MAXPARA, TOK_MOTD, 0L},
|
||||
{MSG_CLOSE, m_close, 0, MAXPARA, TOK_CLOSE, 0L},
|
||||
{MSG_SILENCE, m_silence, 0, MAXPARA, TOK_SILENCE, 0L},
|
||||
{MSG_AKILL, m_akill, 0, MAXPARA, TOK_AKILL, 0L},
|
||||
{MSG_SQLINE, m_sqline, 0, MAXPARA, TOK_SQLINE, 0L},
|
||||
{MSG_UNSQLINE, m_unsqline, 0, MAXPARA, TOK_UNSQLINE, 0L},
|
||||
{MSG_KLINE, m_kline, 0, MAXPARA, TOK_KLINE, 0L},
|
||||
{MSG_UNKLINE, m_unkline, 0, MAXPARA, TOK_UNKLINE, 0L},
|
||||
{MSG_ZLINE, m_zline, 0, MAXPARA, TOK_ZLINE, 0L},
|
||||
{MSG_UNZLINE, m_unzline, 0, MAXPARA, TOK_UNZLINE, 0L},
|
||||
{MSG_RAKILL, m_rakill, 0, MAXPARA, TOK_RAKILL, 0L},
|
||||
{MSG_GNOTICE, m_gnotice, 0, MAXPARA, TOK_GNOTICE, 0L},
|
||||
{MSG_GOPER, m_goper, 0, MAXPARA, TOK_GOPER, 0L},
|
||||
{MSG_GLOBOPS, m_globops, 0, MAXPARA, TOK_GLOBOPS, 0L},
|
||||
{MSG_CHATOPS, m_chatops, 0, 1, TOK_CHATOPS, 0L},
|
||||
{MSG_LOCOPS, m_locops, 0, 1, TOK_LOCOPS, 0L},
|
||||
{MSG_HASH, m_hash, 0, MAXPARA, TOK_HASH, 0L},
|
||||
{MSG_DNS, m_dns, 0, MAXPARA, TOK_DNS, 0L},
|
||||
{MSG_REHASH, m_rehash, 0, MAXPARA, TOK_REHASH, 0L},
|
||||
{MSG_RESTART, m_restart, 0, MAXPARA, TOK_RESTART, 0L},
|
||||
{MSG_DIE, m_die, 0, MAXPARA, TOK_DIE, 0L},
|
||||
{MSG_RULES, m_rules, 0, MAXPARA, TOK_RULES, 0L},
|
||||
{MSG_MAP, m_map, 0, MAXPARA, TOK_MAP, 0L},
|
||||
{MSG_GLINE, m_gline, 0, MAXPARA, TOK_GLINE, 0L},
|
||||
{MSG_REMGLINE, m_remgline, 0, MAXPARA, TOK_REMGLINE, 0L},
|
||||
{MSG_DALINFO, m_dalinfo, 0, MAXPARA, TOK_DALINFO, 0L},
|
||||
{MSG_SVS2MODE, m_svs2mode, 0, MAXPARA, TOK_SVS2MODE, 0L},
|
||||
{MSG_MKPASSWD, m_mkpasswd, 0, MAXPARA, TOK_MKPASSWD, 0L},
|
||||
{MSG_ADDLINE, m_addline, 0, 1, TOK_ADDLINE, 0L},
|
||||
{MSG_ADMINCHAT, m_admins, 0, 1, TOK_ADMINCHAT, 0L},
|
||||
{MSG_SETHOST, m_sethost, 0, MAXPARA, TOK_SETHOST, 0L},
|
||||
{MSG_TECHAT, m_techat, 0, 1, TOK_TECHAT, 0L},
|
||||
{MSG_NACHAT, m_nachat, 0, 1, TOK_NACHAT, 0L},
|
||||
{MSG_SETIDENT, m_setident, 0, MAXPARA, TOK_SETIDENT, 0L},
|
||||
{MSG_SETNAME, m_setname, 0, 1, TOK_SETNAME, 0L},
|
||||
{MSG_LAG, m_lag, 0, MAXPARA, TOK_LAG, 0L},
|
||||
{MSG_SDESC, m_sdesc, 0, 1, TOK_SDESC, 0L},
|
||||
{MSG_STATSERV, m_statserv, 0, 1, TOK_STATSERV, 0L},
|
||||
{MSG_KNOCK, m_knock, 0, 2, TOK_KNOCK, 0L},
|
||||
{MSG_CREDITS, m_credits, 0, MAXPARA, TOK_CREDITS, 0L},
|
||||
{MSG_LICENSE, m_license, 0, MAXPARA, TOK_LICENSE, 0L},
|
||||
{MSG_CHGHOST, m_chghost, 0, MAXPARA, TOK_CHGHOST, 0L},
|
||||
{MSG_RPING, m_rping, 0, MAXPARA, TOK_RPING, 0L},
|
||||
{MSG_RPONG, m_rpong, 0, MAXPARA, TOK_RPONG, 0L},
|
||||
{MSG_NETINFO, m_netinfo, 0, MAXPARA, TOK_NETINFO, 0L},
|
||||
{MSG_SENDUMODE, m_sendumode, 0, MAXPARA, TOK_SENDUMODE, 0L},
|
||||
{MSG_SMO, m_sendumode, 0, MAXPARA, TOK_SMO, 0L},
|
||||
{MSG_ADDMOTD, m_addmotd, 0, 1, TOK_ADDMOTD, 0L},
|
||||
{MSG_ADDOMOTD, m_addomotd, 0, 1, TOK_ADDOMOTD, 0L},
|
||||
{MSG_SVSMOTD, m_svsmotd, 0, MAXPARA, TOK_SVSMOTD, 0L},
|
||||
{MSG_OPERMOTD, m_opermotd, 0, MAXPARA, TOK_OPERMOTD, 0L},
|
||||
{MSG_TSCTL, m_tsctl, 0, MAXPARA, TOK_TSCTL, 0L},
|
||||
{MSG_SVSJOIN, m_svsjoin, 0, MAXPARA, TOK_SVSJOIN, 0L},
|
||||
{MSG_SAJOIN, m_sajoin, 0, MAXPARA, TOK_SAJOIN, 0L},
|
||||
{MSG_SVSPART, m_svspart, 0, MAXPARA, TOK_SVSPART, 0L},
|
||||
{MSG_SAPART, m_sapart, 0, MAXPARA, TOK_SAPART, 0L},
|
||||
{MSG_CHGIDENT, m_chgident, 0, MAXPARA, TOK_CHGIDENT, 0L},
|
||||
{MSG_SWHOIS, m_swhois, 0, MAXPARA, TOK_SWHOIS, 0L},
|
||||
{MSG_SVSO, m_svso, 0, MAXPARA, TOK_SVSO, 0L},
|
||||
{MSG_SVSFLINE, m_svsfline, 0, MAXPARA, TOK_SVSFLINE, 0L},
|
||||
{MSG_TKL, m_tkl, 0, MAXPARA, TOK_TKL, 0L},
|
||||
{MSG_VHOST, m_vhost, 0, MAXPARA, TOK_VHOST, 0L},
|
||||
{MSG_BOTMOTD, m_botmotd, 0, MAXPARA, TOK_BOTMOTD, 0L},
|
||||
{MSG_SJOIN, m_sjoin, 0, MAXPARA, TOK_SJOIN, 0L},
|
||||
{MSG_HTM, m_htm, 0, MAXPARA, TOK_HTM, 0L},
|
||||
{MSG_UMODE2, m_umode2, 0, MAXPARA, TOK_UMODE2, 0L},
|
||||
{MSG_DCCDENY, m_dccdeny, 0, 2, TOK_DCCDENY, 0L},
|
||||
{MSG_UNDCCDENY, m_undccdeny, 0, MAXPARA, TOK_UNDCCDENY, 0L},
|
||||
{MSG_CHGNAME, m_chgname, 0, MAXPARA, TOK_CHGNAME, 0L},
|
||||
{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},
|
||||
{(char *)0, (int (*)())0, 0, 0, 0, 0L}
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
@@ -76,6 +76,7 @@
|
||||
#define ERR_NOLOGIN 444
|
||||
#define ERR_SUMMONDISABLED 445
|
||||
#define ERR_USERSDISABLED 446
|
||||
#define ERR_NONICKCHANGE 447
|
||||
|
||||
#define ERR_NOTREGISTERED 451
|
||||
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
/************************************************************************
|
||||
* Unreal Internet Relay Chat Daemon, include/proto.h
|
||||
* (C) Dominick Meglio <codemastr@unrealircd.com> 2000
|
||||
*
|
||||
* See file AUTHORS in IRC package for additional names of
|
||||
* the programmers.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 1, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef proto_h
|
||||
#define proto_h
|
||||
/* badwords.c */
|
||||
int loadbadwords_message PROTO((char *wordfile));
|
||||
int loadbadwords_channel PROTO((char *wordfile));
|
||||
|
||||
/* channel.c */
|
||||
int sendmodeto_one PROTO((aClient *cptr, char *from, char *name, char *mode, char *param, TS creationtime));
|
||||
void make_cmodestr PROTO((void));
|
||||
|
||||
/* dynconf.c */
|
||||
int load_conf PROTO((char *filename, int type));
|
||||
int load_conf2 PROTO((FILE * conf, char *filename, int type));
|
||||
int load_conf3 PROTO((FILE * conf, char *filename, int type));
|
||||
void init_dynconf PROTO((void));
|
||||
void doneconf PROTO((int type));
|
||||
|
||||
/* lusers.c */
|
||||
void init_ircstats PROTO((void));
|
||||
|
||||
/* match.c */
|
||||
char *collapse PROTO((char *pattern));
|
||||
|
||||
/* scache.c */
|
||||
void clear_scache_hash_table PROTO((void));
|
||||
|
||||
/* send.c */
|
||||
void sendto_one PROTO((aClient *, char *, ...));
|
||||
void sendto_chanops_butone PROTO((aClient *one, aChannel *chptr, char *pattern, ...));
|
||||
void sendto_realops PROTO((char *pattern, ...));
|
||||
void sendto_serv_butone_token PROTO((aClient *one, char *prefix, char *command, char *token, char *pattern, ...));
|
||||
void sendto_serv_butone_token_opt PROTO((aClient *one, int opt, char *prefix, char *command, char *token, char *pattern, ...));
|
||||
void sendto_channel_ntadmins PROTO((aClient *from, aChannel *chptr, char *pattern, ...));
|
||||
|
||||
/* support.c */
|
||||
char *my_itoa PROTO((int i));
|
||||
|
||||
/* s_conf.c */
|
||||
int find_nline PROTO((aClient *cptr));
|
||||
|
||||
/* s_extra.c */
|
||||
int channel_canjoin PROTO((aClient *sptr, char *name));
|
||||
int dcc_loadconf PROTO((void));
|
||||
int cr_loadconf PROTO((void));
|
||||
int vhost_loadconf PROTO((void));
|
||||
|
||||
/* s_kline.c */
|
||||
int find_tkline_match PROTO((aClient *cptr, int xx));
|
||||
void tkl_check_expire PROTO((void));
|
||||
int tkl_sweep PROTO((void));
|
||||
|
||||
/* s_serv.c */
|
||||
void load_tunefile PROTO((void));
|
||||
void save_tunefile PROTO((void));
|
||||
aMotd *read_botmotd PROTO((char *filename));
|
||||
aMotd *read_rules PROTO((char *filename));
|
||||
aMotd *read_opermotd PROTO((char *filename));
|
||||
aMotd *read_motd PROTO((char *filename));
|
||||
aMotd *read_svsmotd PROTO((char *filename));
|
||||
void read_tlines PROTO((void));
|
||||
|
||||
/* s_unreal.c */
|
||||
void unrealmanual PROTO((void));
|
||||
|
||||
/* s_user.c */
|
||||
int check_for_target_limit PROTO((aClient *sptr, void *target, const char *name));
|
||||
void make_umodestr PROTO((void));
|
||||
|
||||
/* webtv.c */
|
||||
int is_halfop PROTO((aClient *cptr, aChannel *chptr));
|
||||
int is_chanprot PROTO((aClient *cptr, aChannel *chptr));
|
||||
char *convert_time PROTO((time_t ltime));
|
||||
char *get_mode_str PROTO((aClient *acptr));
|
||||
|
||||
/* whowas.c */
|
||||
void initwhowas PROTO((void));
|
||||
#endif /* proto_h */
|
||||
+2
-2
@@ -23,8 +23,8 @@
|
||||
* $Id$
|
||||
*
|
||||
* $Log$
|
||||
* Revision 1.1.1.1.6.7 2000/08/20 12:00:43 stskeeps
|
||||
* .
|
||||
* Revision 1.1.1.1.6.8 2000/12/10 21:23:47 stskeeps
|
||||
* Merge beta with unreal3_1_1_darkshades
|
||||
*
|
||||
* Revision 1.1.1.1.6.1.2.1 2000/07/14 20:22:57 stskeeps
|
||||
* +- Indentation and more SJ3 fixes
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
/* Make these what you want for cert & key files */
|
||||
#define CERTF "server.cert.pem"
|
||||
#define KEYF "server.key.pem"
|
||||
|
||||
|
||||
extern SSL_CTX * ctx;
|
||||
extern SSL_METHOD *meth;
|
||||
extern void init_ssl();
|
||||
extern int ssl_handshake(aClient *); /* Handshake the accpeted con.*/
|
||||
extern int ssl_client_handshake(aClient *); /* and the initiated con.*/
|
||||
+60
-62
@@ -1,3 +1,4 @@
|
||||
|
||||
/************************************************************************
|
||||
* Unreal Internet Relay Chat Daemon, include/struct.h
|
||||
* Copyright (C) 1990 Jarkko Oikarinen and
|
||||
@@ -46,10 +47,14 @@
|
||||
# include <sys/syslog.h>
|
||||
# endif
|
||||
#endif
|
||||
#ifdef CRYPTOIRCD
|
||||
#include <openssl/blowfish.h>
|
||||
#if defined(USE_SSL)
|
||||
#include <openssl/rsa.h> /* SSL stuff */
|
||||
#include <openssl/crypto.h>
|
||||
#include <openssl/x509.h>
|
||||
#include <openssl/pem.h>
|
||||
#include <openssl/ssl.h>
|
||||
#include <openssl/err.h>
|
||||
#endif
|
||||
|
||||
typedef struct t_fline aFline;
|
||||
typedef struct t_crline aCRline;
|
||||
typedef struct t_vhline aVHline;
|
||||
@@ -57,6 +62,7 @@ typedef struct t_kline aTKline;
|
||||
typedef struct t_vhost aVhost;
|
||||
|
||||
typedef struct SqlineItem aSqlineItem;
|
||||
typedef struct aloopStruct LoopStruct;
|
||||
typedef struct ConfItem aConfItem;
|
||||
typedef struct Notify aNotify;
|
||||
typedef struct Client aClient;
|
||||
@@ -123,13 +129,6 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
|
||||
|
||||
#define elementsof(x) (sizeof(x)/sizeof(x[0]))
|
||||
|
||||
/*
|
||||
** Flags for encryption
|
||||
*/
|
||||
#ifdef CRYPTOIRCD
|
||||
#define METHOD_BLOWFISH 1
|
||||
#endif
|
||||
|
||||
/*
|
||||
** flags for bootup options (command line flags)
|
||||
*/
|
||||
@@ -182,6 +181,8 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
|
||||
#define OPT_NOT_UMODE2 0x0080
|
||||
#define OPT_SJ3 0x0100
|
||||
#define OPT_NOT_SJ3 0x0200
|
||||
#define OPT_SJB64 0x0400
|
||||
#define OPT_NOT_SJB64 0x0800
|
||||
|
||||
#define FLAGS_PINGSENT 0x0001 /* Unreplied ping sent */
|
||||
#define FLAGS_DEADSOCKET 0x0002 /* Local socket is dead--Exiting soon */
|
||||
@@ -212,14 +213,13 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
|
||||
#define FLAGS_GOTSOCKS 0x2000000
|
||||
#endif
|
||||
#define FLAGS_SHUNNED 0x4000000
|
||||
|
||||
#ifdef CRYPTOIRCD
|
||||
#define FLAGS_SECURE 0x8000000
|
||||
#ifdef USE_SSL
|
||||
#define FLAGS_SSL 0x10000000
|
||||
#define FLAGS_SSL_HSHAKE 0x20000000
|
||||
#endif
|
||||
|
||||
#define FLAGS_MAP 0x80000000 /* Show this entry in /map */
|
||||
|
||||
/* Dec 26th, 1997 - added flags2 when I ran out of room in flags -DuffJ
|
||||
/* Dec 26th, 1997 - added flags2 when I ran out of room in flags -DuffJ */
|
||||
|
||||
/* Dec 26th, 1997 - having a go at
|
||||
* splitting flags into flags and umodes
|
||||
@@ -239,7 +239,7 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
|
||||
#define UMODE_KILLS 0x0400 /* Show server-kills... */
|
||||
#define UMODE_CLIENT 0x0800 /* Show client information */
|
||||
#define UMODE_FLOOD 0x1000 /* Receive flood warnings */
|
||||
#define UMODE_CHATOP 0x2000 /* can receive chatops */
|
||||
#define UMODE_JUNK 0x2000 /* can junk */
|
||||
#define UMODE_SERVICES 0x4000 /* services */
|
||||
#define UMODE_HIDE 0x8000 /* Hide from Nukes */
|
||||
#define UMODE_NETADMIN 0x10000 /* Network Admin */
|
||||
@@ -249,17 +249,17 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
|
||||
#define UMODE_WHOIS 0x100000 /* gets notice on /whois */
|
||||
#define UMODE_KIX 0x200000 /* usermode +q */
|
||||
#define UMODE_BOT 0x400000 /* User is a bot */
|
||||
#define UMODE_CODER 0x800000 /* User is a network coder */
|
||||
#define UMODE_SECURE 0x800000 /* User is a secure connect */
|
||||
#define UMODE_FCLIENT 0x1000000 /* recieve client on far connects.. */
|
||||
#define UMODE_HIDING 0x2000000 /* Totally invisible .. */
|
||||
#define UMODE_VICTIM 0x8000000 /* Intentional Victim */
|
||||
#define UMODE_DEAF 0x10000000
|
||||
#define UMODE_HIDEOPER 0x20000000 /* Hide oper mode */
|
||||
#define UMODE_SETHOST 0x40000000 /* used sethost */
|
||||
#define UMODE_SETHOST 0x40000000 /* used sethost */
|
||||
#define UMODE_STRIPBADWORDS 0x80000000 /* */
|
||||
|
||||
#define SEND_UMODES (UMODE_INVISIBLE|UMODE_OPER|UMODE_WALLOP|UMODE_FAILOP|UMODE_HELPOP|UMODE_REGNICK|UMODE_SADMIN|UMODE_NETADMIN|UMODE_TECHADMIN|UMODE_COADMIN|UMODE_ADMIN|UMODE_SERVICES|UMODE_HIDE|UMODE_EYES|UMODE_WHOIS|UMODE_KIX|UMODE_BOT|UMODE_CODER|UMODE_FCLIENT|UMODE_HIDING|UMODE_DEAF|UMODE_VICTIM|UMODE_HIDEOPER|UMODE_SETHOST|UMODE_STRIPBADWORDS)
|
||||
#define ALL_UMODES (SEND_UMODES|UMODE_SERVNOTICE|UMODE_LOCOP|UMODE_KILLS|UMODE_CLIENT|UMODE_FLOOD|UMODE_CHATOP|UMODE_SERVICES|UMODE_EYES)
|
||||
#define SEND_UMODES (UMODE_INVISIBLE|UMODE_OPER|UMODE_WALLOP|UMODE_FAILOP|UMODE_HELPOP|UMODE_REGNICK|UMODE_SADMIN|UMODE_NETADMIN|UMODE_TECHADMIN|UMODE_COADMIN|UMODE_ADMIN|UMODE_SERVICES|UMODE_HIDE|UMODE_EYES|UMODE_WHOIS|UMODE_KIX|UMODE_BOT|UMODE_SECURE|UMODE_FCLIENT|UMODE_HIDING|UMODE_DEAF|UMODE_VICTIM|UMODE_HIDEOPER|UMODE_SETHOST|UMODE_STRIPBADWORDS|UMODE_JUNK)
|
||||
#define ALL_UMODES (SEND_UMODES|UMODE_SERVNOTICE|UMODE_LOCOP|UMODE_KILLS|UMODE_CLIENT|UMODE_FLOOD|UMODE_SERVICES|UMODE_EYES)
|
||||
#define FLAGS_ID (FLAGS_DOID|FLAGS_GOTID)
|
||||
|
||||
#define PROTO_NOQUIT 0x1 /* Negotiated NOQUIT protocol */
|
||||
@@ -274,6 +274,7 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
|
||||
#define PROTO_SJ3 0x200 /* Negotiated SJ3 protocol */
|
||||
#define PROTO_VHP 0x400 /* Send hostnames in NICKv2 even if not
|
||||
sethosted */
|
||||
#define PROTO_SJB64 0x800
|
||||
/*
|
||||
* flags macros.
|
||||
*/
|
||||
@@ -298,7 +299,6 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
|
||||
#define IsCoAdmin(x) ((x)->umodes & UMODE_COADMIN)
|
||||
#define IsSAdmin(x) ((x)->umodes & UMODE_SADMIN)
|
||||
#define SendFailops(x) ((x)->umodes & UMODE_FAILOP)
|
||||
#define SendChatops(x) ((x)->umodes & UMODE_CHATOP)
|
||||
#define IsOper(x) ((x)->umodes & UMODE_OPER)
|
||||
#define IsLocOp(x) ((x)->umodes & UMODE_LOCOP)
|
||||
#define IsInvisible(x) ((x)->umodes & UMODE_INVISIBLE)
|
||||
@@ -307,7 +307,6 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
|
||||
#define IsARegNick(x) ((x)->umodes & (UMODE_REGNICK))
|
||||
#define IsRegNick(x) ((x)->umodes & UMODE_REGNICK)
|
||||
#define IsPerson(x) ((x)->user && IsClient(x))
|
||||
#define IsPasser(x) ((x)->user & UMODE_PASSER)
|
||||
#define IsPrivileged(x) (IsAnOper(x) || IsServer(x))
|
||||
#define SendWallops(x) ((x)->umodes & UMODE_WALLOP)
|
||||
#define SendServNotice(x) ((x)->umodes & UMODE_SERVNOTICE)
|
||||
@@ -324,13 +323,12 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
|
||||
#define SetShunned(x) ((x)->flags |= FLAGS_SHUNNED)
|
||||
#define ClearShunned(x) ((x)->flags &= ~FLAGS_SHUNNED)
|
||||
|
||||
#ifdef CRYPTOIRCD
|
||||
#define IsSecure(x) ((x)->flags & FLAGS_SECURE)
|
||||
#define SetSecure(x) ((x)->flags |= FLAGS_SECURE)
|
||||
#define ClearSecure(x) ((x)->flags &= ~FLAGS_SECURE)
|
||||
#ifdef USE_SSL
|
||||
#define IsSecure(x) ((x)->flags & FLAGS_SSL)
|
||||
#else
|
||||
#define IsSecure(x) (0)
|
||||
#endif
|
||||
|
||||
|
||||
#define IsHybNotice(x) ((x)->flags & FLAGS_HYBNOTICE)
|
||||
#define SetHybNotice(x) ((x)->flags |= FLAGS_HYBNOTICE)
|
||||
#define ClearHybNotice(x) ((x)->flags &= ~FLAGS_HYBNOTICE)
|
||||
@@ -381,7 +379,6 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
|
||||
#define ClearEyes(x) ((x)->umodes &= ~UMODE_EYES)
|
||||
#define ClearHelpOp(x) ((x)->umodes &= ~UMODE_HELPOP)
|
||||
#define ClearFailops(x) ((x)->umodes &= ~UMODE_FAILOP)
|
||||
#define ClearChatops(x) ((x)->umodes &= ~UMODE_CHATOP)
|
||||
#define ClearOper(x) ((x)->umodes &= ~UMODE_OPER)
|
||||
#define ClearInvisible(x) ((x)->umodes &= ~UMODE_INVISIBLE)
|
||||
#define ClearServices(x) ((x)->umodes &= ~UMODE_SERVICES)
|
||||
@@ -520,7 +517,6 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
|
||||
#define OPSetEyes(x) ((x)->oflag |= OFLAG_EYES)
|
||||
#define OPSetZLine(x) ((x)->oflag |= OFLAG_ZLINE)
|
||||
#define OPSetWhois(x) ((x)->oflag |= OFLAG_WHOIS)
|
||||
#define OPSetPasser(x) ((x)->oflag |= OFLAG_ISPASSER)
|
||||
#define OPClearRehash(x) ((x)->oflag &= ~OFLAG_REHASH)
|
||||
#define OPClearDie(x) ((x)->oflag &= ~OFLAG_DIE)
|
||||
#define OPClearRestart(x) ((x)->oflag &= ~OFLAG_RESTART)
|
||||
@@ -536,7 +532,6 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
|
||||
#define OPClearUnKline(x) ((x)->oflag &= ~OFLAG_UNKLINE)
|
||||
#define OPClearLNotice(x) ((x)->oflag &= ~OFLAG_LNOTICE)
|
||||
#define OPClearGNotice(x) ((x)->oflag &= ~OFLAG_GNOTICE)
|
||||
#define OPClearPasser(x) ((x)->oflag &= ~OFLAG_PASSER)
|
||||
#define OPClearAdmin(x) ((x)->oflag &= ~OFLAG_ADMIN)
|
||||
#define OPClearSAdmin(x) ((x)->oflag &= ~OFLAG_SADMIN)
|
||||
#define OPClearNetAdmin(x) ((x)->oflag &= ~OFLAG_NETADMIN)
|
||||
@@ -569,7 +564,7 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
|
||||
#define TERMCAP_TERM 2
|
||||
|
||||
struct MotdItem {
|
||||
char line[82];
|
||||
char *line;
|
||||
struct MotdItem *next;
|
||||
};
|
||||
|
||||
@@ -582,6 +577,10 @@ struct trecord {
|
||||
struct trecord *next;
|
||||
};
|
||||
|
||||
struct aloopStruct {
|
||||
unsigned do_garbage_collect : 1;
|
||||
unsigned do_tkl_sweep : 1;
|
||||
};
|
||||
|
||||
typedef struct Whowas {
|
||||
int hashv;
|
||||
@@ -591,7 +590,6 @@ typedef struct Whowas {
|
||||
char *virthost;
|
||||
char *servername;
|
||||
char *realname;
|
||||
char *away;
|
||||
long umodes;
|
||||
TS logoff;
|
||||
struct Client *online; /* Pointer to new nickname for chasing or NULL */
|
||||
@@ -601,12 +599,6 @@ typedef struct Whowas {
|
||||
struct Whowas *cprev; /* for client struct linked list */
|
||||
} aWhowas;
|
||||
|
||||
#ifdef CRYPTOIRCD
|
||||
typedef struct CryptInfo {
|
||||
short method;
|
||||
void *key;
|
||||
} aCryptInfo;
|
||||
#endif
|
||||
|
||||
struct SqlineItem {
|
||||
unsigned int status;
|
||||
@@ -628,6 +620,7 @@ struct ConfItem {
|
||||
#ifndef VMSP
|
||||
aClass *class; /* Class of connection */
|
||||
#endif
|
||||
short options;
|
||||
struct ConfItem *next;
|
||||
};
|
||||
|
||||
@@ -685,15 +678,16 @@ struct User {
|
||||
char *away; /* pointer to away message */
|
||||
TS last;
|
||||
u_int32_t servicestamp; /* Services' time stamp variable */
|
||||
int refcnt; /* Number of times this block is referenced */
|
||||
int joined; /* number of channels joined */
|
||||
signed char refcnt; /* Number of times this block is referenced */
|
||||
unsigned short joined; /* number of channels joined */
|
||||
char username[USERLEN + 1];
|
||||
char realhost[HOSTLEN + 1];
|
||||
char *virthost;
|
||||
char *server;
|
||||
char *swhois; /* special whois thing */
|
||||
aClient *serv;
|
||||
|
||||
LOpts *lopt; /* Saved /list options */
|
||||
aWhowas *whowas;
|
||||
#ifdef LIST_DEBUG
|
||||
aClient *bcptr;
|
||||
#endif
|
||||
@@ -750,12 +744,12 @@ struct t_kline {
|
||||
struct ircstatsx {
|
||||
int clients; /* total */
|
||||
int invisible; /* invisible */
|
||||
int servers; /* servers */
|
||||
unsigned short servers; /* servers */
|
||||
int operators; /* operators */
|
||||
int unknown; /* unknown local connections */
|
||||
int channels; /* channels */
|
||||
int me_clients; /* my clients */
|
||||
int me_servers; /* my servers */
|
||||
unsigned short me_servers; /* my servers */
|
||||
int me_max; /* local max */
|
||||
int global_max; /* global max */
|
||||
};
|
||||
@@ -788,6 +782,11 @@ struct t_vhline {
|
||||
#define LISTENER_REMOTEADMIN 0x000008
|
||||
#define LISTENER_JAVACLIENT 0x000010
|
||||
#define LISTENER_MASK 0x000020
|
||||
#define LISTENER_SSL 0x000040
|
||||
|
||||
#define CONNECT_SSL 0x000001
|
||||
#define CONNECT_ZIP 0x000002
|
||||
|
||||
|
||||
struct Client {
|
||||
struct Client *next, *prev, *hnext;
|
||||
@@ -800,18 +799,16 @@ struct Client {
|
||||
TS nextnick; /* Time the next nick change will be allowed */
|
||||
TS nexttarget; /* Time until a change in targets is allowed */
|
||||
u_char targets[MAXTARGETS]; /* Hash values of current targets */
|
||||
aWhowas *whowas;
|
||||
long flags; /* client flags */
|
||||
long umodes; /* client usermodes */
|
||||
aClient *from; /* == self, if Local Client, *NEVER* NULL! */
|
||||
int fd; /* >= 0, for local clients */
|
||||
int hopcount; /* number of servers to this 0 = local */
|
||||
unsigned char hopcount; /* number of servers to this 0 = local */
|
||||
short status; /* Client type */
|
||||
char name[HOSTLEN + 1]; /* Unique name of the client, nick or host */
|
||||
char username[USERLEN + 1]; /* username here now for auth stuff */
|
||||
char info[REALLEN + 1]; /* Free form additional client information */
|
||||
aClient *srvptr; /* Server introducing this. May be &me */
|
||||
Link *history; /* Whowas linked list */
|
||||
/*
|
||||
** The following fields are allocated only for local clients
|
||||
** (directly connected to *this* server with a socket.
|
||||
@@ -835,8 +832,9 @@ struct Client {
|
||||
#ifdef ZIP_LINKS
|
||||
struct Zdata *zip; /* zip data */
|
||||
#endif
|
||||
#ifdef CRYPTOIRCD
|
||||
aCryptInfo *cryptinfo; /* crypt */
|
||||
#ifdef USE_SSL
|
||||
struct SSL *ssl;
|
||||
struct X509 *client_cert;
|
||||
#endif
|
||||
#ifndef NO_FDLIST
|
||||
long lastrecvM; /* to check for activity --Mika */
|
||||
@@ -856,12 +854,11 @@ struct Client {
|
||||
struct hostent *hostp;
|
||||
u_short notifies; /* Keep track of count of notifies */
|
||||
Link *notify; /* Links to clients notify-structures */
|
||||
LOpts *lopt; /* Saved /list options */
|
||||
char sockhost[HOSTLEN + 1]; /* This is the host name from the socket
|
||||
** and after which the connection was
|
||||
** accepted.
|
||||
*/
|
||||
char passwd[PASSWDLEN + 1];
|
||||
char *passwd;
|
||||
#ifdef DEBUGMODE
|
||||
TS cputime;
|
||||
#endif
|
||||
@@ -927,9 +924,9 @@ struct SMode {
|
||||
char key[KEYLEN + 1];
|
||||
char link[LINKLEN + 1];
|
||||
/* x:y */
|
||||
int msgs; /* x */
|
||||
int per; /* y */
|
||||
unsigned short kmode; /* mode 0 = kick 1 = ban */
|
||||
unsigned short msgs; /* x */
|
||||
unsigned short per; /* y */
|
||||
unsigned char kmode; /* mode 0 = kick 1 = ban */
|
||||
};
|
||||
|
||||
/* Message table structure */
|
||||
@@ -938,11 +935,8 @@ struct Message {
|
||||
char *cmd;
|
||||
int (*func) ();
|
||||
unsigned int count;
|
||||
int parameters;
|
||||
char flags;
|
||||
/* bit 0 set means that this command is allowed to be used
|
||||
* only on the average of once per 2 seconds -SRB */
|
||||
u_char token[2]; /* Cheat for tokenized value */
|
||||
unsigned parameters : 5;
|
||||
u_char token[3]; /* Cheat for tokenized value */
|
||||
unsigned long bytes;
|
||||
#ifdef DEBUGMODE
|
||||
unsigned long lticks;
|
||||
@@ -1007,7 +1001,7 @@ struct Channel {
|
||||
char *topic;
|
||||
char *topic_nick;
|
||||
TS topic_time;
|
||||
int users;
|
||||
unsigned short users;
|
||||
Link *members;
|
||||
Link *invites;
|
||||
Ban *banlist;
|
||||
@@ -1070,6 +1064,8 @@ struct Channel {
|
||||
#endif
|
||||
#define MODE_NOCTCP 0x10000000
|
||||
#define MODE_AUDITORIUM 0x20000000
|
||||
#define MODE_ONLYSECURE 0x40000000
|
||||
#define MODE_NONICKCHANGE 0x80000000
|
||||
|
||||
#define is_halfop is_half_op
|
||||
/*
|
||||
@@ -1099,7 +1095,7 @@ struct Channel {
|
||||
find_channel_link((blah->user)->channel, chan)) ? 1 : 0)
|
||||
|
||||
struct FloodOpt {
|
||||
int nmsg;
|
||||
unsigned short nmsg;
|
||||
TS lastmsg;
|
||||
};
|
||||
|
||||
@@ -1118,7 +1114,7 @@ struct FloodOpt {
|
||||
/* Lifted somewhat from Undernet code --Rak */
|
||||
|
||||
#define IsSendable(x) (DBufLength(&x->sendQ) < 2048)
|
||||
#define DoList(x) ((x)->lopt)
|
||||
#define DoList(x) ((x)->user && (x)->user->lopt)
|
||||
|
||||
/* String manipulation macros */
|
||||
|
||||
@@ -1160,7 +1156,9 @@ extern char *gnulicense[];
|
||||
/* misc defines */
|
||||
|
||||
#define FLUSH_BUFFER -2
|
||||
#define UTMP "/etc/utmp"
|
||||
#define COMMA ","
|
||||
#ifdef USE_SSL
|
||||
#include "ssl.h"
|
||||
#endif
|
||||
|
||||
#endif /* __struct_include__ */
|
||||
|
||||
+7
-3
@@ -53,7 +53,9 @@
|
||||
# include <string.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef SSL
|
||||
#include <openssl/ssl.h>
|
||||
#endif
|
||||
#ifndef GOT_STRCASECMP
|
||||
#define strcasecmp mycmp
|
||||
#define strncasecmp myncmp
|
||||
@@ -84,6 +86,7 @@ extern char *rindex PROTO((char *, char));
|
||||
#else
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#ifndef DMALLOC
|
||||
#if !defined(DEBUGMODE)
|
||||
# ifndef _WIN32
|
||||
# define MyFree(x) if ((x) != NULL) free(x)
|
||||
@@ -93,6 +96,7 @@ extern char *rindex PROTO((char *, char));
|
||||
#else
|
||||
#define free(x) MyFree(x)
|
||||
#endif
|
||||
#endif
|
||||
#ifdef NEXT
|
||||
#define VOIDSIG int /* whether signal() returns int of void */
|
||||
#else
|
||||
@@ -127,8 +131,8 @@ typedef unsigned int u_int;
|
||||
#define MYOSNAME "Win32"
|
||||
#endif
|
||||
#ifdef DEBUGMODE
|
||||
#define ircsprintf sprintf
|
||||
#define ircvsprintf vsprintf
|
||||
// #define ircsprintf sprintf
|
||||
//#define ircvsprintf vsprintf
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
+4
-4
@@ -25,13 +25,13 @@
|
||||
/**/
|
||||
#define COMPILEINFO DEBUGMODESET DEBUGSET
|
||||
/*
|
||||
* Version Unreal3.1
|
||||
* Version Unreal3.1-Silverheart+sf2
|
||||
*/
|
||||
#define UnrealProtocol 2301
|
||||
#define UnrealProtocol 2302
|
||||
#define PATCH1 "3"
|
||||
#define PATCH2 ".1"
|
||||
#define PATCH3 "-Silverheart"
|
||||
#define PATCH4 "+"
|
||||
#define PATCH3 ".1"
|
||||
#define PATCH4 "-Darkshades"
|
||||
#define PATCH5 ""
|
||||
#define PATCH6 ""
|
||||
#define PATCH7 ""
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
# $Id$
|
||||
|
||||
lynx http://unreal.sourceforge.net/register.html
|
||||
lynx http://www.unrealircd.com/register.html
|
||||
|
||||
+54
-18
@@ -2,23 +2,36 @@
|
||||
# Win32Gui Config File .. By DrBin
|
||||
#
|
||||
CC=cl
|
||||
COMPILERHELP=compilerhelp.exe
|
||||
# Here you put your settings
|
||||
FD_SETSIZE=/D FD_SETSIZE=16384
|
||||
NS_ADDRESS=/D NS_ADDRESS="\"nospoof@dal.net\""
|
||||
|
||||
!IFNDEF DEBUG
|
||||
|
||||
CFLAGS=/MT /O2 /G5 /I ./INCLUDE /Fosrc/ /nologo $(FD_SETSIZE) $(NS_ADDRESS) /D _WIN32GUI /D NOSPOOF=1 /c
|
||||
!IFNDEF DISTDEBUG
|
||||
CFLAGS=/MT /O2 /G5 /I ./INCLUDE /Fosrc/ /nologo $(FD_SETSIZE) $(NS_ADDRESS) /D _WIN32GUI /D USENEWDNS /D NOSPOOF=1 /c
|
||||
|
||||
LFLAGS=kernel32.lib user32.lib gdi32.lib shell32.lib wsock32.lib \
|
||||
LFLAGS=kernel32.lib user32.lib gdi32.lib shell32.lib ws2_32.lib \
|
||||
oldnames.lib libcmt.lib comctl32.lib /nodefaultlib /nologo /out:WIRCD2.EXE
|
||||
|
||||
!ELSE
|
||||
|
||||
CFLAGS=/MTd /O2 /G5 /Od /ZI /I ./INCLUDE /Fosrc/ /nologo $(FD_SETSIZE) $(NS_ADDRESS) /D DEBUG /D DEBUGMODE /D _DEBUG /D _WIN32GUI /D NOSPOOF=1 /c
|
||||
|
||||
CFLAGS= /MTd /Zi /I ./INCLUDE /Fosrc/ /nologo $(FD_SETSIZE) $(NS_ADDRESS) /D USENEWDNS /D _WIN32GUI /D NOSPOOF=1 /c
|
||||
#/Od /Yd /G5
|
||||
LFLAGS=kernel32.lib user32.lib gdi32.lib shell32.lib wsock32.lib \
|
||||
oldnames.lib libcmt.lib comctl32.lib /nodefaultlib /nologo /debug /OUT:WIRCD.EXE
|
||||
oldnames.lib libcmt.lib comctl32.lib /nodefaultlib /nologo /debug /debugtype:BOTH /OUT:WIRCD.EXE
|
||||
|
||||
|
||||
!ENDIF
|
||||
|
||||
|
||||
!ELSE
|
||||
|
||||
CFLAGS= /MTd /Zi /I ./INCLUDE /Fosrc/ /nologo $(FD_SETSIZE) $(NS_ADDRESS) /D DEBUG /D DEBUGMODE /D USENEWDNS /D _DEBUG /D _WIN32GUI /D NOSPOOF=1 /c
|
||||
#/Od /Yd /G5
|
||||
LFLAGS=kernel32.lib user32.lib gdi32.lib shell32.lib wsock32.lib \
|
||||
oldnames.lib libcmt.lib comctl32.lib /nodefaultlib /nologo /debug /debugtype:BOTH /OUT:WIRCD.EXE
|
||||
|
||||
!ENDIF
|
||||
|
||||
@@ -27,21 +40,21 @@ INCLUDES=./include/struct.h ./include/config.h ./include/sys.h \
|
||||
./include/common.h ./include/version.h ./include/h.h ./include/numeric.h \
|
||||
./include/msg.h ./include/setup.h ./include/dynconf.h
|
||||
LINK=link.exe
|
||||
|
||||
# SRC/RES.OBJ SRC/RES_INIT.OBJ SRC/RES_COMP.OBJ
|
||||
OBJ_FILES=SRC/CHANNEL.OBJ SRC/USERLOAD.OBJ SRC/SEND.OBJ SRC/BSD.OBJ \
|
||||
SRC/S_CONF.OBJ SRC/FDLIST.OBJ SRC/DBUF.OBJ SRC/RES.OBJ \
|
||||
SRC/S_CONF.OBJ SRC/FDLIST.OBJ SRC/DBUF.OBJ \
|
||||
SRC/CLOAK.OBJ SRC/HASH.OBJ SRC/PARSE.OBJ SRC/IRCD.OBJ \
|
||||
SRC/S_NUMERIC.OBJ SRC/WHOWAS.OBJ SRC/RES_COMP.OBJ SRC/S_AUTH.OBJ \
|
||||
SRC/S_NUMERIC.OBJ SRC/WHOWAS.OBJ SRC/S_AUTH.OBJ \
|
||||
SRC/HELP.OBJ SRC/S_MISC.OBJ SRC/MATCH.OBJ SRC/CRULE.OBJ \
|
||||
SRC/S_DEBUG.OBJ SRC/RES_INIT.OBJ SRC/SUPPORT.OBJ SRC/LIST.OBJ \
|
||||
SRC/S_DEBUG.OBJ SRC/SUPPORT.OBJ SRC/LIST.OBJ \
|
||||
SRC/S_ERR.OBJ SRC/PACKET.OBJ SRC/CLASS.OBJ SRC/S_BSD.OBJ \
|
||||
SRC/S_SERV.OBJ SRC/S_USER.OBJ SRC/WIN32GUI.OBJ \
|
||||
SRC/VERSION.OBJ SRC/win32/WIN32.RES SRC/S_UNREAL.OBJ SRC/DYNCONF.OBJ \
|
||||
SRC/VERSION.OBJ SRC/S_UNREAL.OBJ SRC/DYNCONF.OBJ \
|
||||
SRC/S_SOCKS.OBJ SRC/S_KLINE.OBJ SRC/S_EXTRA.OBJ SRC/IRCSPRINTF.OBJ SRC/LUSERS.OBJ \
|
||||
SRC/SCACHE.OBJ SRC/ALN.OBJ
|
||||
SRC/SCACHE.OBJ SRC/ALN.OBJ SRC/BADWORDS.OBJ SRC/WEBTV.OBJ SRC/NEWDNS.OBJ src/version.obj
|
||||
RC=rc.exe
|
||||
|
||||
ALL: WIRCD.EXE CHKCONF.EXE
|
||||
ALL: COMPILERHELP.EXE WIRCD.EXE
|
||||
|
||||
CLEAN:
|
||||
-@erase src\*.exe 2>NUL
|
||||
@@ -59,15 +72,20 @@ CLEAN:
|
||||
#src/version.c: dummy
|
||||
# @config.exe -v
|
||||
|
||||
src/version.obj: src/win32/version.c
|
||||
$(CC) $(CFLAGS) src/win32/version.c
|
||||
./COMPILERHELP.EXE:
|
||||
cl src/win32/compilerhelp.c /link /out:compilerhelp.exe
|
||||
|
||||
./WIRCD.EXE: $(OBJ_FILES) src/win32/version.obj
|
||||
$(LINK) $(LFLAGS) $(OBJ_FILES)
|
||||
./WIRCD.EXE: $(OBJ_FILES) SRC/win32/WIN32.RES
|
||||
$(LINK) $(LFLAGS) $(OBJ_FILES) SRC/win32/WIN32.RES SRC/WIN32/GNU_REGEX.LIB SRC/WIN32/DEBUG/STACKTRACE.LIB /MAPINFO:LINES /MAP
|
||||
-@erase src\win32\win32.res
|
||||
!IFNDEF DEBUG
|
||||
Non Debug version built
|
||||
!IFNDEF DISTDEBUG
|
||||
@echo Non Debug version built
|
||||
!ELSE
|
||||
Debug version built ...
|
||||
@echo Distribution DEBUG Version Built
|
||||
!ENDIF
|
||||
!ELSE
|
||||
@echo Debug version built ...
|
||||
!ENDIF
|
||||
|
||||
./CHKCONF.EXE: ./include/struct.h ./include/config.h ./include/sys.h \
|
||||
@@ -78,9 +96,21 @@ src/version.obj: src/win32/version.c
|
||||
$(LINK) /nologo /out:./chkconf.exe src/chkconf.obj src/chkmatch.obj \
|
||||
src/chkcrule.obj
|
||||
|
||||
src/newdns.obj: src/newdns.c $(INCLUDES)
|
||||
$(CC) $(CFLAGS) src/newdns.c
|
||||
|
||||
src/version.obj: src/win32/version.c
|
||||
$(CC) $(CFLAGS) src/win32/version.c
|
||||
|
||||
src/parse.obj: src/parse.c $(INCLUDES)
|
||||
$(CC) $(CFLAGS) src/parse.c
|
||||
|
||||
src/badwords.obj: src/badwords.c $(INCLUDES)
|
||||
$(CC) $(CFLAGS) src/badwords.c
|
||||
|
||||
src/webtv.obj: src/webtv.c $(INCLUDES)
|
||||
$(CC) $(CFLAGS) src/webtv.c
|
||||
|
||||
src/bsd.obj: src/bsd.c $(INCLUDES)
|
||||
$(CC) $(CFLAGS) src/bsd.c
|
||||
|
||||
@@ -201,9 +231,15 @@ src/md5.obj: src/md5.c $(INCLUDES)
|
||||
$(CC) $(CFLAGS) src/md5.c
|
||||
|
||||
src/win32/win32.res: src/win32/win32gui.rc
|
||||
!IFNDEF DISTDEBUG
|
||||
$(COMPILERHELP) src/win32/leavealone.h
|
||||
!ELSE
|
||||
$(COMPILERHELP) src/win32/leavealone.h 0
|
||||
!ENDIF
|
||||
$(RC) /l 0x409 /fosrc/win32/win32.res /i ./include /i ./src \
|
||||
/d NDEBUG src/win32/win32gui.rc
|
||||
|
||||
dummy:
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
ver^2.2
|
||||
#
|
||||
# My IRC Network (irc.auspice.org) Network Configuration File
|
||||
# --------------------------------------------------
|
||||
# Added-at: 01 Dec 2000 00:31
|
||||
# Author: In Mean
|
||||
# Email: auspice@auspice.org
|
||||
# -----------------------------------------
|
||||
#
|
||||
|
||||
Network >..........: Auspice
|
||||
Set ircnetwork ....: Auspice
|
||||
Set defserv .......: irc.auspice.org
|
||||
Set SERVICES_NAME .: Services.auspice.org
|
||||
Set oper_host .....: oper.auspice.org
|
||||
Set admin_host ....: admin.auspice.org
|
||||
Set locop_host ....: locop.auspice.org
|
||||
Set sadmin_host ...: csop.auspice.org
|
||||
Set netadmin_host .: netadmin.auspice.org
|
||||
Set coadmin_host ..: coadmin.auspice.org
|
||||
Set techadmin_host : techadmin.auspice.org
|
||||
Set hidden_host ...: khmer
|
||||
Set netdomain .....: auspice.org
|
||||
Set helpchan ......: #services
|
||||
Set STATS_SERVER ..: Services.auspice.org
|
||||
Set HUB ...........: not_in_use
|
||||
Set iNAH ..........: 0
|
||||
Set net_quit ......: not_in_use
|
||||
+15
-46
@@ -1,56 +1,25 @@
|
||||
ver^2.2
|
||||
#
|
||||
# AXEnet (irc.axenet.org) Network Configuration File
|
||||
# --------------------------------------------------
|
||||
#
|
||||
|
||||
# These two specify the name of the IRC network, set the same in both fields
|
||||
Network >..........: Axenet
|
||||
Set ircnetwork ....: Axenet
|
||||
|
||||
# This is where your DNS pool is (like irc.dal.net)
|
||||
Set defserv .......: irc.axenet.org
|
||||
|
||||
# This is the name of your Services Server
|
||||
Set SERVICES_NAME .: services.axenet.org
|
||||
|
||||
# This is the virtual hostname IRCops will get if iNAH option is enabled
|
||||
# on oper up
|
||||
Set oper_host .....: Oper.axenet.org
|
||||
|
||||
# This is the virtual hostname Server Admins will get if iNAH option is enabled
|
||||
# on oper up
|
||||
Set admin_host ....: Admin.axenet.org
|
||||
|
||||
# This is the virtual hostname Local IRCops will get if iNAH option is enabled
|
||||
# on oper up
|
||||
|
||||
Set locop_host ....: Locop.axenet.org
|
||||
|
||||
# This is the virtual hostname Services Operators/Admins will get
|
||||
# if iNAH option is enabled on oper up
|
||||
|
||||
Set sadmin_host ...: Csop.axenet.org
|
||||
|
||||
# This is the virtual hostname NetAdmins will get
|
||||
# if iNAH option is enabled on oper up
|
||||
|
||||
Set netadmin_host .: Netadmin.axenet.org
|
||||
|
||||
# This is the virtual hostname CoAdmins will get
|
||||
# if iNAH option is enabled on oper up
|
||||
Set coadmin_host ..: Coadmin.axenet.org
|
||||
|
||||
|
||||
# This is the virtual hostname TechAdmins will get
|
||||
# if iNAH option is enabled on oper up
|
||||
Set techadmin_host : Techadmin.axenet.org
|
||||
|
||||
# This is the prefix of the hidden host (cloaking) hostname
|
||||
Set oper_host .....: ircop.axenet.org
|
||||
Set admin_host ....: admin.axenet.org
|
||||
Set locop_host ....: locop.axenet.org
|
||||
Set sadmin_host ...: csop.axenet.org
|
||||
Set netadmin_host .: netadmin.axenet.org
|
||||
Set coadmin_host ..: coadmin.axenet.org
|
||||
Set techadmin_host : techadmin.axenet.org
|
||||
Set hidden_host ...: axe
|
||||
# This is the domain of the IRC network
|
||||
Set netdomain .....: Axenet.org
|
||||
# This is where people can go for help
|
||||
Set helpchan ......: #Axenethelp
|
||||
# This is the name of the stats server
|
||||
Set netdomain .....: axenet.org
|
||||
Set helpchan ......: #axenethelp
|
||||
Set STATS_SERVER ..: stats.axenet.org
|
||||
# This enables the auto-setting of f.x @netadmin.network.net
|
||||
# on oper up
|
||||
Set HUB ...........: 1
|
||||
Set iNAH ..........: 1
|
||||
Set net_quit ......: axe
|
||||
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
ver^2.2
|
||||
#
|
||||
# Network Configuration File Template
|
||||
# -----------------------------------------
|
||||
# Added-at: <day> <month> <year> <hh:dd> GMT
|
||||
# Author: <nick> (<real name>)
|
||||
# E-Mail: <email>
|
||||
# $Id$
|
||||
# -----------------------------------------
|
||||
# This is a template so you can create your own network configuration files
|
||||
# Just follow the instructions and it will prolly work ;)
|
||||
ver^2.2
|
||||
#
|
||||
# Darkfyre (irc.darkfyre.net) Network Configuration File
|
||||
# --------------------------------------------------
|
||||
# Added-at: 10 September 2000 22:23
|
||||
# Author: Mel
|
||||
# Email: mel19791@home.com <mailto:mel19791@home.com>
|
||||
# -----------------------------------------
|
||||
#
|
||||
|
||||
Network >..........: Darkfyre
|
||||
Set ircnetwork ....: Darkfyre
|
||||
Set defserv .......: irc.darkfyre.net
|
||||
Set SERVICES_NAME .: Services.Darkfyre.Net
|
||||
Set oper_host .....: IRCop.Darkfyre.Net
|
||||
Set admin_host ....: Admin.Darkfyre.Net
|
||||
Set locop_host ....: LocalOp.Darkfyre.Net
|
||||
Set sadmin_host ...: CSop.Darkfyre.Net
|
||||
Set netadmin_host .: NetAdmin.Darkfyre.Net
|
||||
Set coadmin_host ..: CoAdmin.Darkfyre.Net
|
||||
Set techadmin_host : TechAdmin.Darkfyre.Net
|
||||
Set hidden_host ...: darkfyre
|
||||
Set netdomain .....: Darkfyre.net
|
||||
Set helpchan ......: #help
|
||||
Set STATS_SERVER ..: Stats.Darkfyre.Net
|
||||
Set HUB ...........: not_in_use
|
||||
Set iNAH ..........: 1
|
||||
Set net_quit ......: not_in_use
|
||||
@@ -0,0 +1,29 @@
|
||||
ver^2.2
|
||||
#
|
||||
# Darkwar (irc.darkwar.net) Network Configuration File
|
||||
# --------------------------------------------------
|
||||
# Added-at: 22 October 2000 19:40
|
||||
# Author: stryker
|
||||
# Email: stryker@darkwar.net
|
||||
# -----------------------------------------
|
||||
#
|
||||
|
||||
Network >..........: Darkwar
|
||||
Set ircnetwork ....: Darkwar
|
||||
Set defserv .......: irc.darkwar.net
|
||||
Set SERVICES_NAME .: services.darkwar.net
|
||||
Set oper_host .....: oper.darkwar.net
|
||||
Set admin_host ....: admin.darkwar.net
|
||||
Set locop_host ....: locop.darkwar.net
|
||||
Set sadmin_host ...: csop.darkwar.net
|
||||
Set netadmin_host .: netadmin.darkwar.net
|
||||
Set coadmin_host ..: coadmin.darkwar.net
|
||||
Set techadmin_host : techadmin.darkwar.net
|
||||
Set hidden_host ...: hide
|
||||
Set netdomain .....: darkwar.net
|
||||
Set helpchan ......: #darkwar
|
||||
Set STATS_SERVER ..: stats.darkwar.net
|
||||
Set HUB ...........: not_in_use
|
||||
Set iNAH ..........: 1
|
||||
Set net_quit ......: not_in_use
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
ver^2.2
|
||||
#
|
||||
# Data-Storm (irc.data-storm.net) Network Configuration File
|
||||
# --------------------------------------------------
|
||||
# Added-at: 05 November 2000 13:42
|
||||
# Author: data-genius
|
||||
# Email: dg@data-storm.net
|
||||
# -----------------------------------------
|
||||
#
|
||||
|
||||
Network >..........: Data-Storm
|
||||
Set ircnetwork ....: Data-Storm
|
||||
Set defserv .......: irc.data-storm.net
|
||||
Set SERVICES_NAME .: services.data-storm.net
|
||||
Set oper_host .....: oper.root.net
|
||||
Set admin_host ....: oper.root.net
|
||||
Set locop_host ....: oper.root.net
|
||||
Set sadmin_host ...: oper.root.net
|
||||
Set netadmin_host .: oper.god.net
|
||||
Set coadmin_host ..: oper.root.net
|
||||
Set techadmin_host : oper.root.net
|
||||
Set hidden_host ...: ownedbyj00
|
||||
Set netdomain .....: data-storm.net
|
||||
Set helpchan ......: #help
|
||||
Set STATS_SERVER ..: stats.data-storm.net
|
||||
Set HUB ...........: not_in_use
|
||||
Set iNAH ..........: 0
|
||||
Set net_quit ......: not_in_use
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
ver^2.2
|
||||
#
|
||||
# Network Configuration File Template
|
||||
# -----------------------------------------
|
||||
# Added-at: <Monday> <August> <2000>
|
||||
# Author: Anonymos
|
||||
# E-Mail: Anonymos@Global-IRC.de
|
||||
# $Id$
|
||||
# -----------------------------------------
|
||||
# This is a template so you can create your own network configuration files
|
||||
# Just follow the instructions and it will prolly work ;)
|
||||
# 0 = No 1 = Yes
|
||||
# -------------------------------------------------------
|
||||
#
|
||||
# These two specify the name of the IRC network, set the same in both fields
|
||||
Network >..........: IRC
|
||||
Set ircnetwork ....: Global
|
||||
|
||||
# This is where your DNS pool is (like irc.dal.net)
|
||||
Set defserv .......: IRC.Global-IRC.de
|
||||
|
||||
# This is the name of your Services Server
|
||||
Set SERVICES_NAME .: Service.Global-IRC.de
|
||||
|
||||
# This is the virtual hostname IRCops will get if iNAH option is enabled
|
||||
# on oper up
|
||||
Set oper_host .....: Global-IRC-OP.Global-IRC.de
|
||||
|
||||
# This is the virtual hostname Server Admins will get if iNAH option is enabled
|
||||
# on oper up
|
||||
Set admin_host ....: ServerAdmin.Global-IRC.de
|
||||
|
||||
# This is the virtual hostname Local IRCops will get if iNAH option is enabled
|
||||
# on oper up
|
||||
|
||||
Set locop_host ....: Local-IRC-OP.Global-IRC.de
|
||||
|
||||
# This is the virtual hostname Services Operators/Admins will get
|
||||
# if iNAH option is enabled on oper up
|
||||
|
||||
Set sadmin_host ...: ServiceAdmin.Global-IRC.de
|
||||
|
||||
# This is the virtual hostname NetAdmins will get
|
||||
# if iNAH option is enabled on oper up
|
||||
|
||||
Set netadmin_host .: NetworkAdmin.Global-IRC.de
|
||||
|
||||
# This is the virtual hostname CoAdmins will get
|
||||
# if iNAH option is enabled on oper up
|
||||
Set coadmin_host ..: CoAdmin.Global-IRC.de
|
||||
|
||||
|
||||
# This is the virtual hostname TechAdmins will get
|
||||
# if iNAH option is enabled on oper up
|
||||
Set techadmin_host : TechAdmin.Global-IRC.de
|
||||
|
||||
# This is the prefix of the hidden host (cloaking) hostname
|
||||
Set hidden_host ...: GL-IRC
|
||||
# This is the domain of the IRC network
|
||||
Set netdomain .....: Global-IRC.de
|
||||
# This is where people can go for help
|
||||
Set helpchan ......: #Global-IRC-World
|
||||
# This is the name of the stats server
|
||||
Set STATS_SERVER ..: Stats.Global-IRC.de
|
||||
# -- Not in use--
|
||||
Set HUB ...........: 0
|
||||
# This enables the auto-setting of f.x @ServerAdmin.Global-IRC.de
|
||||
# on oper up
|
||||
Set iNAH ..........: 1
|
||||
# -- Not in use but still here --
|
||||
Set net_quit ......: GL
|
||||
@@ -0,0 +1,28 @@
|
||||
ver^2.2
|
||||
#
|
||||
# IRCChat (irc.irc-chat.net) Network Configuration File
|
||||
# --------------------------------------------------
|
||||
# Added-at: 29 November 2000 15:49
|
||||
# Author: TheRock
|
||||
# Email: unit649@unit649.net
|
||||
# -----------------------------------------
|
||||
#
|
||||
|
||||
Network >..........: IRCChat
|
||||
Set ircnetwork ....: IRCChat
|
||||
Set defserv .......: irc.irc-chat.net
|
||||
Set SERVICES_NAME .: services.irc-chat.net
|
||||
Set oper_host .....: oper.irc-chat.net
|
||||
Set admin_host ....: admin.irc-chat.net
|
||||
Set locop_host ....: locop.irc-chat.net
|
||||
Set sadmin_host ...: csop.irc-chat.net
|
||||
Set netadmin_host .: netadmin.irc-chat.net
|
||||
Set coadmin_host ..: coadmin.irc-chat.net
|
||||
Set techadmin_host : techadmin.irc-chat.net
|
||||
Set hidden_host ...: irc
|
||||
Set netdomain .....: irc-chat.net
|
||||
Set helpchan ......: #irc-chat
|
||||
Set STATS_SERVER ..: stats.irc-chat.net
|
||||
Set HUB ...........: not_in_use
|
||||
Set iNAH ..........: 1
|
||||
Set net_quit ......: not_in_use
|
||||
@@ -0,0 +1,30 @@
|
||||
ver^2.2
|
||||
#
|
||||
# IsraelNet (irc.israel.net) Network Configuration File
|
||||
# --------------------------------------------------
|
||||
# Added-at: 14 September 2000 14:39
|
||||
# Author: Web
|
||||
# Email: dors@Nonstop.net.il
|
||||
# -----------------------------------------
|
||||
#
|
||||
|
||||
Network >..........: IsraelNet
|
||||
Set ircnetwork ....: IsraelNet
|
||||
Set defserv .......: irc.israel.net
|
||||
Set SERVICES_NAME .: services.israel.net
|
||||
Set oper_host .....: Oper.Israel.Net
|
||||
Set admin_host ....: Admin.Israel.Net
|
||||
Set locop_host ....: LocOP.Israel.Net
|
||||
Set sadmin_host ...: CSop.Israel.Net
|
||||
Set netadmin_host .: NetAdmin.Israel.Net
|
||||
Set coadmin_host ..: CoAdmin.Israel.Net
|
||||
Set techadmin_host : TechAdmin.Israel.Net
|
||||
Set hidden_host ...: israel
|
||||
Set netdomain .....: irc.israel.net
|
||||
Set helpchan ......: #OperHelp
|
||||
Set STATS_SERVER ..: stats.israel.net
|
||||
Set HUB ...........: not_in_use
|
||||
Set iNAH ..........: 1
|
||||
Set net_quit ......: not_in_use
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
ver^2.2
|
||||
#
|
||||
# lamenet.net (irc.lamenet.net) Network Configuration File
|
||||
# --------------------------------------------------
|
||||
# Added-at: 16 November 2000 10:40
|
||||
# Author: Reptilezen
|
||||
# Email: xtekcor@hotmail.com <mailto:xtekcor@hotmail.com>
|
||||
# -----------------------------------------
|
||||
#
|
||||
|
||||
Network >..........: lamenet.net
|
||||
Set ircnetwork ....: lamenet.net
|
||||
Set defserv .......: irc.lamenet.net
|
||||
Set SERVICES_NAME .: services.lamenet.net
|
||||
Set oper_host .....: oper.mynet.org
|
||||
Set admin_host ....: admin.mynet.org
|
||||
Set locop_host ....: biglamer.lamenet.net
|
||||
Set sadmin_host ...: csop.lamenet.net
|
||||
Set netadmin_host .: netadmin.lamenet.net
|
||||
Set coadmin_host ..: coadmin
|
||||
Set techadmin_host : techadmin.lamenet.net
|
||||
Set hidden_host ...: hiddenhost
|
||||
Set netdomain .....: lamenet.net
|
||||
Set helpchan ......: #Services
|
||||
Set STATS_SERVER ..: stats.lamenet.net
|
||||
Set HUB ...........: not_in_use
|
||||
Set iNAH ..........: 1
|
||||
Set net_quit ......: not_in_use
|
||||
|
||||
@@ -265,6 +265,12 @@ case "$SUBMIT" in
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ "$NETWORK" == "My IRC Network" ] ; then
|
||||
echo ""
|
||||
echo "You may not submit a network file that uses default values"
|
||||
exit
|
||||
fi
|
||||
|
||||
cat |sendmail -t << __EOF__&
|
||||
To: unreal-networks@lists.sourceforge.net
|
||||
From: $EMAIL
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
ver^2.2
|
||||
#
|
||||
# Music-ChatNET (Irc.Music-ChatNET.Com) Network Configuration File
|
||||
# --------------------------------------------------
|
||||
# Added-at: 21 November 2000 22:40
|
||||
# Author: Chad
|
||||
# Email: Chad@Music-ChatNET.Com
|
||||
# -----------------------------------------
|
||||
#
|
||||
|
||||
Network >..........: Music-ChatNET
|
||||
Set ircnetwork ....: Music-ChatNET
|
||||
Set defserv .......: Irc.Music-ChatNET.Com
|
||||
Set SERVICES_NAME .: Services.Music-ChatNET.Com
|
||||
Set oper_host .....: IRCop.Music-ChatNET.Com
|
||||
Set admin_host ....: Admin.Music-ChatNET.Com
|
||||
Set locop_host ....: LOcop.Music-ChatNET.Com
|
||||
Set sadmin_host ...: CSop.Music-ChatNET.Com
|
||||
Set netadmin_host .: NetAdmin.Music-ChatNET.Com
|
||||
Set coadmin_host ..: CoAdmin.Music-ChatNET.Com
|
||||
Set techadmin_host : TechAdmin.Music-ChatNET.Com
|
||||
Set hidden_host ...: MCN
|
||||
Set netdomain .....: Music-ChatNET.Com
|
||||
Set helpchan ......: #Music-Chat
|
||||
Set STATS_SERVER ..: Stats.Music-ChatNET.Com
|
||||
Set HUB ...........: not_in_use
|
||||
Set iNAH ..........: 1
|
||||
Set net_quit ......: not_in_use
|
||||
|
||||
+20
-1
@@ -1,4 +1,6 @@
|
||||
# Networks index file - do not touch please
|
||||
# 54 networks listed
|
||||
# Please report outdated entries to unreal-networks@lists.sourceforge.net
|
||||
networks/global-irc.network ......: Global-IRC (http://www.global-irc.net)
|
||||
networks/mp3fans.network .........: Mp3Fans.Net (http://www.mp3fans.net)
|
||||
networks/roxnet.network ..........: ROXnet (http://www.rox.za.net)
|
||||
@@ -7,7 +9,7 @@ networks/megairc.network .........: MegaIRC (http://www.megairc.net)
|
||||
networks/neohorizon.network ......: NeoHorizon (http://www.nhn.net)
|
||||
networks/spynet.network ..........: SpyNet (http://www.spynet.org)
|
||||
networks/nevernet.network ........: NeverNET (http://www.nevernet.net)
|
||||
networks/altirc.network ..........: AlternativeNet IRC (http://www.
|
||||
networks/altirc.network ..........: AlternativeNet IRC
|
||||
networks/bunker7.network .........: Bunker7 (http://www.bunker7.net)
|
||||
networks/realchat.network ........: RealChat.org (http://www.realchat.org)
|
||||
networks/newmilennium.network ....: NewMilennium (http://www.newmilennium.net)
|
||||
@@ -38,3 +40,20 @@ networks/german-elite.network ....: German-Elite (http://www.german-elite.net)
|
||||
networks/thainet.network .........: Thai IRC Network
|
||||
networks/linuxsquare.network .....: LinuxSquare (http://www.linuxsquare.net)
|
||||
networks/chatstation.network .....: ChatStation
|
||||
networks/sparkhaven.network ......: SparkHaven (http://www.sparkhaven.com)
|
||||
networks/qkaka.network ...........: Qkaka (http://www.qkaka.com)
|
||||
networks/sheytoybox.network ......: SheyToyBox (http://www.sheytoybox.net)
|
||||
networks/darkfyre.network ........: Darkfyre (http://www.darkfyre.net)
|
||||
networks/israelnet.network .......: IsraelNet
|
||||
networks/tierrared.network .......: TierraRed (http://www.tierrared.com)
|
||||
networks/music-chatnet.network ...: Music-ChatNET
|
||||
networks/german-global-irc.network: German Global IRC (http://www.global-irc.de)
|
||||
networks/darkwar.network .........: Darkwar (http://www.darkwar.net)
|
||||
networks/lamenet.network .........: Lamenet (http://www.lamenet.net)
|
||||
networks/spin.network ............: SpiN
|
||||
networks/subtrexnet.network ......: Subtrex.net (http://www.subtrex.net)
|
||||
networks/data-storm.network ......: Data-Storm
|
||||
networks/tutkunet.network ........: TuTKu.Net
|
||||
networks/raptanet.network ........: RaptaNet (http://www.rapta.net)
|
||||
networks/irc-chat.network ........: IRC-Chat
|
||||
networks/auspice.network .........: auspice
|
||||
@@ -0,0 +1,73 @@
|
||||
ver^2.2
|
||||
#
|
||||
# Network Configuration File Template
|
||||
# -----------------------------------------
|
||||
# Added-at: <day> <month> <year> <hh:dd> GMT
|
||||
# Author: <nick> (<real name>)
|
||||
# E-Mail: <email>
|
||||
# $Id$
|
||||
# -----------------------------------------
|
||||
# This is a template so you can create your own network configuration files
|
||||
# Just follow the instructions and it will prolly work ;)
|
||||
# 0 = No 1 = Yes
|
||||
# -------------------------------------------------------
|
||||
#
|
||||
# These two specify the name of the IRC network, set the same in both fields
|
||||
Network >..........: QKAKA
|
||||
Set ircnetwork ....: QKAKA
|
||||
|
||||
# This is where your DNS pool is (like irc.dal.net)
|
||||
Set defserv .......: chat.qkaka.com
|
||||
|
||||
# This is the name of your Services Server
|
||||
Set SERVICES_NAME .: services.qkaka.com
|
||||
|
||||
# This is the virtual hostname IRCops will get if iNAH option is enabled
|
||||
# on oper up
|
||||
Set oper_host .....: ircop.qkaka.com
|
||||
|
||||
# This is the virtual hostname Server Admins will get if iNAH option is enabled
|
||||
# on oper up
|
||||
Set admin_host ....: admin.qkaka.com
|
||||
|
||||
# This is the virtual hostname Local IRCops will get if iNAH option is enabled
|
||||
# on oper up
|
||||
|
||||
Set locop_host ....: locop.qkaka.com
|
||||
|
||||
# This is the virtual hostname Services Operators/Admins will get
|
||||
# if iNAH option is enabled on oper up
|
||||
|
||||
Set sadmin_host ...: serviceop.qkaka.com
|
||||
|
||||
# This is the virtual hostname NetAdmins will get
|
||||
# if iNAH option is enabled on oper up
|
||||
|
||||
Set netadmin_host .: netadmin.qkaka.com
|
||||
|
||||
# This is the virtual hostname CoAdmins will get
|
||||
# if iNAH option is enabled on oper up
|
||||
Set coadmin_host ..: coadmin.qkaka.com
|
||||
|
||||
|
||||
# This is the virtual hostname TechAdmins will get
|
||||
# if iNAH option is enabled on oper up
|
||||
Set techadmin_host : techadmin.qkaka.com
|
||||
|
||||
# This is the prefix of the hidden host (cloaking) hostname
|
||||
Set hidden_host ...: dn
|
||||
# This is the domain of the IRC network
|
||||
Set netdomain .....: qkaka.com
|
||||
# This is where people can go for help
|
||||
Set helpchan ......: #QKAKA�…¥æ™DDŽ
|
||||
# This is the name of the stats server
|
||||
Set STATS_SERVER ..: stats.ircnet.org
|
||||
# -- Not in use--
|
||||
Set HUB ...........: 1
|
||||
# This enables the auto-setting of f.x @netadmin.network.net
|
||||
# on oper up
|
||||
Set iNAH ..........: 0
|
||||
# -- Not in use but still here --
|
||||
Set net_quit ......: ic
|
||||
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
ver^2.2
|
||||
#
|
||||
# RaptaNet (irc.rapta.net) Network Configuration File
|
||||
# --------------------------------------------------
|
||||
# Added-at: 29 October 2000 11:03
|
||||
# Author: EquinoX
|
||||
# Email: jacob@conwaycorp.net
|
||||
# -----------------------------------------
|
||||
#
|
||||
|
||||
Network >..........: RaptaNet
|
||||
Set ircnetwork ....: RaptaNet
|
||||
Set defserv .......: irc.rapta.net
|
||||
Set SERVICES_NAME .: services.rapta.net
|
||||
Set oper_host .....: oper.rapta.net
|
||||
Set admin_host ....: admin.rapta.net
|
||||
Set locop_host ....: locop.rapta.net
|
||||
Set sadmin_host ...: csop.rapta.net
|
||||
Set netadmin_host .: netadmin.rapta.net
|
||||
Set coadmin_host ..: coadmin.rapta.net
|
||||
Set techadmin_host : techadmin.rapta.net
|
||||
Set hidden_host ...: rapta
|
||||
Set netdomain .....: rapta.net
|
||||
Set helpchan ......: #services
|
||||
Set STATS_SERVER ..: stats.rapta.net
|
||||
Set HUB ...........: not_in_use
|
||||
Set iNAH ..........: 0
|
||||
Set net_quit ......: not_in_use
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
ver^2.2
|
||||
#
|
||||
# Network Configuration File Template
|
||||
# -----------------------------------------
|
||||
# Added-at: <day> <month> <year> <hh:dd> GMT
|
||||
# Author: <nick> (<real name>)
|
||||
# E-Mail: <email>
|
||||
# $Id$
|
||||
# -----------------------------------------
|
||||
# This is a template so you can create your own network configuration files
|
||||
# Just follow the instructions and it will prolly work ;)
|
||||
ver^2.2
|
||||
#
|
||||
# SheyToyBox (irc.sheytoybox.net) Network Configuration File
|
||||
# --------------------------------------------------
|
||||
# Added-at: 26 August 2000 19:08
|
||||
# Author: Robertsog
|
||||
# Email: robertsog@netzero.com <mailto:robertsog@netzero.com>
|
||||
# -----------------------------------------
|
||||
#
|
||||
|
||||
Network >..........: SheyToyBox
|
||||
Set ircnetwork ....: SheyToyBox
|
||||
Set defserv .......: irc.sheytoybox.net
|
||||
Set SERVICES_NAME .: services.sheytoybox.net
|
||||
Set oper_host .....: ircop.sheytoybox.net
|
||||
Set admin_host ....: admin.sheytoybox.net
|
||||
Set locop_host ....: locop.sheytoybox.net
|
||||
Set sadmin_host ...: csops.sheytoybox.net
|
||||
Set netadmin_host .: netadmin.sheytoybox.net
|
||||
Set coadmin_host ..: coadmin.sheytoybox.net
|
||||
Set techadmin_host : techadmin.sheytoybox.net
|
||||
Set hidden_host ...: shey
|
||||
Set netdomain .....: sheytoybox.net
|
||||
Set helpchan ......: #Shey's_toybox
|
||||
Set STATS_SERVER ..: stats.sheytoybox.net
|
||||
Set HUB ...........: not_in_use
|
||||
Set iNAH ..........: 1
|
||||
Set net_quit ......: not_in_use
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
ver^2.2
|
||||
#
|
||||
# Sparkhaven (irc.sparkhaven.com) Network Configuration File
|
||||
# --------------------------------------------------
|
||||
# Added-at: 12 August 2000 15:22
|
||||
# Author: x3ro
|
||||
# Email: admin@x3ro.yi.org admin@x3ro.yi.org
|
||||
# -----------------------------------------
|
||||
#
|
||||
|
||||
Network >..........: Sparkhaven
|
||||
Set ircnetwork ....: Sparkhaven
|
||||
Set defserv .......: irc.sparkhaven.com
|
||||
Set SERVICES_NAME .: services.sparkhaven.com
|
||||
Set oper_host .....: oper.akersberga.se.sparkhaven.com
|
||||
Set admin_host ....: damin.akersberga.se.sparkhaven.com
|
||||
Set locop_host ....: locop.akersberga.se.sparkhaven.com
|
||||
Set sadmin_host ...: csop..akersberga.se.sparkhaven.com
|
||||
Set netadmin_host .: netadmin.sparkhaven.com
|
||||
Set coadmin_host ..: coadmin.akersberga.se.sparkhaven.com
|
||||
Set techadmin_host : techadmin.akersberga.se.sparkhaven.com
|
||||
Set hidden_host ...: user
|
||||
Set netdomain .....: sparkhaven.com
|
||||
Set helpchan ......: #services
|
||||
Set STATS_SERVER ..: stats.sparkhaven.com
|
||||
Set HUB ...........: not_in_use
|
||||
Set iNAH ..........: 1
|
||||
Set net_quit ......: not_in_use
|
||||
@@ -0,0 +1,29 @@
|
||||
ver^2.2
|
||||
#
|
||||
# SpiN (irc.SpinEmpire.com) Network Configuration File
|
||||
# --------------------------------------------------
|
||||
# Added-at: 12 November 2000 04:26
|
||||
# Author: chris
|
||||
# Email: chris@netherrealm.org <mailto:chris@netherrealm.org>
|
||||
# -----------------------------------------
|
||||
#
|
||||
|
||||
Network >..........: SpiN
|
||||
Set ircnetwork ....: SpiN
|
||||
Set defserv .......: irc.SpinEmpire.com
|
||||
Set SERVICES_NAME .: Services.SpinEmpire.com
|
||||
Set oper_host .....: Oper.SpinEmpire.org
|
||||
Set admin_host ....: Admin.SpinEmpire.com
|
||||
Set locop_host ....: LocalOper.SpinEmpire.com
|
||||
Set sadmin_host ...: ServicesOper.SpinEmpire.com
|
||||
Set netadmin_host .: NetAdmin.SpinEmpire.com
|
||||
Set coadmin_host ..: CoAdmin.SpinEmpire.com
|
||||
Set techadmin_host : TechAdmin.SpinEmpire.com
|
||||
Set hidden_host ...: Spin
|
||||
Set netdomain .....: SpinEmpire.com
|
||||
Set helpchan ......: #Lobby
|
||||
Set STATS_SERVER ..: Stats.SpinEmpire.com
|
||||
Set HUB ...........: not_in_use
|
||||
Set iNAH ..........: 1
|
||||
Set net_quit ......: not_in_use
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
ver^2.2
|
||||
#
|
||||
# Subtrex.Net (Irc.Subtrex.net) Network Configuration File
|
||||
# --------------------------------------------------
|
||||
# Added-at: 06 November 2000 21:50
|
||||
# Author: J-E-L-L-O
|
||||
# Email: rustyz82@hotmail.com
|
||||
# -----------------------------------------
|
||||
#
|
||||
|
||||
Network >..........: Subtrex.Net
|
||||
Set ircnetwork ....: Subtrex.Net
|
||||
Set defserv .......: Irc.Subtrex.net
|
||||
Set SERVICES_NAME .: Services.subtrex.net
|
||||
Set oper_host .....: Oper.Subtrex.Net
|
||||
Set admin_host ....: Admin.Subtrex.Net
|
||||
Set locop_host ....: Locop.Subtrex.Net
|
||||
Set sadmin_host ...: Csop.Subtrex.Net
|
||||
Set netadmin_host .: Netadmin.Subtrex.Net
|
||||
Set coadmin_host ..: Coadmin.Subtrex.Net
|
||||
Set techadmin_host : Techadmin.Subtrex.NEt
|
||||
Set hidden_host ...: Subtrex
|
||||
Set netdomain .....: Subtrex.Net
|
||||
Set helpchan ......: #subtrex
|
||||
Set STATS_SERVER ..: Services.Subtrex.Net
|
||||
Set HUB ...........: not_in_use
|
||||
Set iNAH ..........: 1
|
||||
Set net_quit ......: not_in_use
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
ver^2.2
|
||||
#
|
||||
# TierraRed (irc.tierrared.com) Network Configuration File
|
||||
# --------------------------------------------------
|
||||
# Added-at: 19 noviembre 2000 20:22
|
||||
# Author: NeO
|
||||
# Email: neo@tierrared.com
|
||||
# -----------------------------------------
|
||||
#
|
||||
|
||||
Network >..........: TierraRed
|
||||
Set ircnetwork ....: TierraRed
|
||||
Set defserv .......: irc.tierrared.com
|
||||
Set SERVICES_NAME .: sol.tierrared.com
|
||||
Set oper_host .....: oper.tierrared.com
|
||||
Set admin_host ....: ADMIN.tierrared.com
|
||||
Set locop_host ....: LocalOP.tierrared.com
|
||||
Set sadmin_host ...: Cservice.tierrared.com
|
||||
Set netadmin_host .: NetADMIN.tierrared.com
|
||||
Set coadmin_host ..: CoADMIN.tierrared.com
|
||||
Set techadmin_host : TechAdm.tierrared.com
|
||||
Set hidden_host ...: hide
|
||||
Set netdomain .....: tierrared.com
|
||||
Set helpchan ......: #opers_help
|
||||
Set STATS_SERVER ..: stats.tierrared.com
|
||||
Set HUB ...........: not_in_use
|
||||
Set iNAH ..........: 1
|
||||
Set net_quit ......: not_in_use
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
ver^2.2
|
||||
#
|
||||
# TuTKu.Net (irc.tutku.net) Network Configuration File
|
||||
# --------------------------------------------------
|
||||
# Added-at: 30 October 2000 15:29
|
||||
# Author: MurathaN
|
||||
# Email: Murat_haN@GmX.Net
|
||||
# -----------------------------------------
|
||||
#
|
||||
|
||||
Network >..........: TuTKu.Net
|
||||
Set ircnetwork ....: TuTKu.Net
|
||||
Set defserv .......: irc.tutku.net
|
||||
Set SERVICES_NAME .: services.tutku.net
|
||||
Set oper_host .....: IrCoP.TuTKu.NeT
|
||||
Set admin_host ....: AdmiN.TuTKu.NeT
|
||||
Set locop_host ....: LoCoP.TuTKu.NeT
|
||||
Set sadmin_host ...: Csop.TuTKu.Net
|
||||
Set netadmin_host .: NetAdmiN.TuTKu.NeT
|
||||
Set coadmin_host ..: CoAdmiN.TuTKu.NeT
|
||||
Set techadmin_host : TecHAdmiN.TuTKu.NeT
|
||||
Set hidden_host ...: TuTKu
|
||||
Set netdomain .....: TuTKu.Net
|
||||
Set helpchan ......: #HeLp
|
||||
Set STATS_SERVER ..: Stats.TuTKu.Net
|
||||
Set HUB ...........: not_in_use
|
||||
Set iNAH ..........: 1
|
||||
Set net_quit ......: not_in_use
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -2,17 +2,18 @@ ver^1.5
|
||||
#
|
||||
# UnrealIRCd Configuration file - unrealircd.conf
|
||||
# (C) Carsten Munk 1999 - Under the GNU license
|
||||
# $Id$
|
||||
# $Id: unrealircd.conf,v 1.1.1.1.6.1.2.6 2000/08/18 16:44:35 codemastr
|
||||
Exp $
|
||||
# Follow the instructions here.
|
||||
#
|
||||
# change the filename to what network header file you use
|
||||
# relative to DPATH
|
||||
Include .................: networks/unreal-test.network
|
||||
Include .................: networks/roxnet.network
|
||||
|
||||
#
|
||||
# What K:Line address can K:lined users mail at?
|
||||
#
|
||||
Set KLINE_ADDRESS .......: unreal-dev@lists.sourceforge.net
|
||||
Set KLINE_ADDRESS .......: lame.admin.needs.to.change.email
|
||||
|
||||
# If you want users to get auto +x on connect
|
||||
# 1 = Yes 0 = No
|
||||
@@ -40,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 ....: 0
|
||||
Set CONFIG_FILE_STOP ....: 1
|
||||
|
||||
#
|
||||
# If to let non-opers do /stats O
|
||||
@@ -51,7 +52,7 @@ Set SHOWOPERS ...........: 0
|
||||
#
|
||||
# This will get the IRCd to exit links with different protocol ( < / > )
|
||||
#
|
||||
Set KILLDIFF ............: 1
|
||||
Set KILLDIFF ............: 0
|
||||
|
||||
#
|
||||
# Show Oper MOTD at oper up?
|
||||
|
||||
+11
-4
@@ -27,9 +27,9 @@ OBJS=agent.o aln.o badwords.o bsd.o channel.o class.o cloak.o crule.o dbuf.o dyn
|
||||
fdlist.o hash.o help.o ircd.o ircsprintf.o list.o lusers.o \
|
||||
match.o packet.o parse.o $(REGEX) res.o $(RES) s_auth.o \
|
||||
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) s_unreal.o \
|
||||
s_user.o scache.o send.o support.o userload.o version.o whowas.o \
|
||||
zip.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
|
||||
|
||||
# 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 \
|
||||
@@ -59,7 +59,8 @@ version.o: version.c ../include/version.h
|
||||
$(CC) $(CFLAGS) -c version.c
|
||||
|
||||
ircd: $(OBJS)
|
||||
$(CC) $(CFLAGS) -o ircd $(OBJS) $(LDFLAGS) $(IRCDLIBS) $(CRYPTOLIB)
|
||||
# $(CC) $(CFLAGS) $(CRYPTOLIB) -o ircd $(OBJS) $(LDFLAGS) $(IRCDLIBS) -lssl
|
||||
$(CC) $(CFLAGS) $(CRYPTOINCLUDES) -o ircd $(CRYPTOLIB) $(OBJS) $(LDFLAGS) $(IRCDLIBS) $(CRYPTOLIB)
|
||||
chmod $(IRCDMODE) ircd
|
||||
|
||||
chkconf: ../include/struct.h ../include/config.h ../include/settings.h ../include/sys.h \
|
||||
@@ -99,6 +100,12 @@ zip.o: zip.c $(INCLUDES)
|
||||
send.o: send.c $(INCLUDES)
|
||||
$(CC) $(CFLAGS) -c send.c
|
||||
|
||||
webtv.o: webtv.c $(INCLUDES)
|
||||
$(CC) $(CFLAGS) -c webtv.c
|
||||
|
||||
ssl.o: ssl.c $(INCLUDES)
|
||||
$(CC) $(CFLAGS) -c ssl.c
|
||||
|
||||
match.o: match.c $(INCLUDES)
|
||||
$(CC) $(CFLAGS) -c match.c
|
||||
|
||||
|
||||
+1
-3
@@ -33,9 +33,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#ifndef _WIN32
|
||||
#include <utmp.h>
|
||||
#else
|
||||
#ifdef _WIN32
|
||||
#include <io.h>
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
|
||||
@@ -37,20 +37,21 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#ifndef _WIN32
|
||||
#include <utmp.h>
|
||||
#else
|
||||
#ifdef PIPEDEBUG
|
||||
#include <signal.h>
|
||||
#endif
|
||||
#ifdef _WIN32
|
||||
#include <io.h>
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
#ifndef STANDALONE
|
||||
#include "h.h"
|
||||
|
||||
#include "proto.h"
|
||||
ID_Copyright("(C) Carsten Munk 2000");
|
||||
#endif
|
||||
|
||||
static inline char *int_to_base64(unsigned long);
|
||||
static inline unsigned long base64_to_int(char *);
|
||||
static inline char *int_to_base64(long);
|
||||
static inline long base64_to_int(char *);
|
||||
|
||||
|
||||
static Link *servers = NULL;
|
||||
@@ -60,17 +61,37 @@ Link *return_servers(void)
|
||||
return(servers);
|
||||
}
|
||||
|
||||
char *base64enc(unsigned long i)
|
||||
char *base64enc(long i)
|
||||
{
|
||||
return int_to_base64(i);
|
||||
}
|
||||
|
||||
unsigned long base64dec(char *b64)
|
||||
char *xbase64enc(long i)
|
||||
{
|
||||
return base64_to_int(b64);
|
||||
return int_to_base64(i);
|
||||
}
|
||||
|
||||
int numeric_collides(unsigned long numeric)
|
||||
long base64dec(char *b64)
|
||||
{
|
||||
if (b64)
|
||||
return base64_to_int(b64);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
long xbase64dec(char *b64)
|
||||
{
|
||||
long r;
|
||||
if (b64)
|
||||
{
|
||||
r = base64_to_int(b64);
|
||||
return r;
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
int numeric_collides(long numeric)
|
||||
{
|
||||
Link *lp;
|
||||
|
||||
@@ -119,19 +140,30 @@ void remove_server_from_table(aClient *what)
|
||||
}
|
||||
}
|
||||
|
||||
aClient *find_server_by_numeric(unsigned long value)
|
||||
aClient *find_server_by_numeric(long value)
|
||||
{
|
||||
Link *lp;
|
||||
|
||||
for (lp = servers; lp; lp = lp->next)
|
||||
if (lp->value.cptr->serv->numeric == value)
|
||||
return (lp->value.cptr);
|
||||
#ifdef PIPEDEBUG
|
||||
kill(getpid(), SIGPIPE);
|
||||
#endif PIPEDEBUG
|
||||
return NULL;
|
||||
}
|
||||
|
||||
aClient *find_server_by_base64(char *b64)
|
||||
{
|
||||
return find_server_by_numeric(base64dec(b64));
|
||||
if (b64)
|
||||
return find_server_by_numeric(base64dec(b64));
|
||||
else
|
||||
{
|
||||
#ifdef PIPEDEBUG
|
||||
kill(getpid(), SIGPIPE);
|
||||
#endif
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
char *find_server_id(aClient *which)
|
||||
@@ -139,30 +171,67 @@ char *find_server_id(aClient *which)
|
||||
return (base64enc(which->serv->numeric));
|
||||
}
|
||||
|
||||
aClient *find_server_quick(char *name)
|
||||
aClient *find_server_quick_search(char *name)
|
||||
{
|
||||
Link *lp;
|
||||
|
||||
for (lp = servers; lp; lp = lp->next)
|
||||
if (!match(name, lp->value.cptr->name))
|
||||
return (lp->value.cptr);
|
||||
#ifdef PIPEDEBUG
|
||||
kill(getpid(), SIGPIPE);
|
||||
#endif
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
aClient *find_server_quick_straight(char *name)
|
||||
{
|
||||
Link *lp;
|
||||
|
||||
for (lp = servers; lp; lp = lp->next)
|
||||
if (!strcmp(name, lp->value.cptr->name))
|
||||
return (lp->value.cptr);
|
||||
#ifdef PIPEDEBUG
|
||||
kill(getpid(), SIGPIPE);
|
||||
#endif
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
aClient *find_server_quickx(char *name, aClient *cptr)
|
||||
{
|
||||
if (name)
|
||||
{
|
||||
cptr = (aClient *)find_server_quick_search(name);
|
||||
}
|
||||
return cptr;
|
||||
}
|
||||
|
||||
|
||||
aClient *find_server_b64_or_real(char *name)
|
||||
{
|
||||
Link *lp;
|
||||
|
||||
if (strlen(name) < 4)
|
||||
long namebase64;
|
||||
|
||||
if (!name)
|
||||
return NULL;
|
||||
|
||||
if (strlen(name) < 3)
|
||||
{
|
||||
namebase64 = base64dec(name);
|
||||
for (lp = servers; lp; lp = lp->next)
|
||||
if (!strcmp(base64enc(lp->value.cptr->serv->numeric), name))
|
||||
if (lp->value.cptr->serv->numeric == namebase64)
|
||||
return (lp->value.cptr);
|
||||
}
|
||||
else
|
||||
{
|
||||
return find_server_quick(name);
|
||||
return find_server_quick_straight(name);
|
||||
}
|
||||
#ifdef PIPEDEBUG
|
||||
kill(getpid(), SIGPIPE);
|
||||
#endif
|
||||
return NULL;
|
||||
|
||||
}
|
||||
@@ -199,13 +268,13 @@ char base64_to_int6_map[] = {
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
|
||||
};
|
||||
|
||||
static inline char *int_to_base64(unsigned long val)
|
||||
static inline char *int_to_base64(long val)
|
||||
{
|
||||
/* 32/6 == max 6 bytes for representation,
|
||||
* +1 for the null, +1 for byte boundaries
|
||||
*/
|
||||
static char base64buf[8];
|
||||
unsigned long i = 7;
|
||||
long i = 7;
|
||||
|
||||
base64buf[i] = '\0';
|
||||
|
||||
@@ -218,10 +287,13 @@ static inline char *int_to_base64(unsigned long val)
|
||||
return base64buf + i;
|
||||
}
|
||||
|
||||
static inline unsigned long base64_to_int(char *b64)
|
||||
static inline long base64_to_int(char *b64)
|
||||
{
|
||||
unsigned int v = base64_to_int6_map[(u_char)*b64++];
|
||||
int v = base64_to_int6_map[(u_char)*b64++];
|
||||
|
||||
if (!b64)
|
||||
return 0;
|
||||
|
||||
while (*b64)
|
||||
{
|
||||
v <<= 6;
|
||||
@@ -240,9 +312,9 @@ void ns_stats(aClient *cptr)
|
||||
{
|
||||
sptr = lp->value.cptr;
|
||||
sendto_one(cptr,
|
||||
":%s NOTICE %s :*** server=%s numeric=%i b64=%s", me.name,
|
||||
":%s NOTICE %s :*** server=%s numeric=%i b64=%s [%s]", me.name,
|
||||
cptr->name, sptr->name, sptr->serv->numeric,
|
||||
find_server_id(sptr));
|
||||
find_server_id(sptr), find_server_b64_or_real(find_server_id(sptr)) == sptr ? "SANE" : "INSANE");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -15,7 +15,9 @@
|
||||
* too much pepsi.
|
||||
*/
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include "config.h"
|
||||
#include "struct.h"
|
||||
#include "common.h"
|
||||
@@ -44,7 +46,6 @@ char *stripbadwords_channel(char *str)
|
||||
regex_t pcomp;
|
||||
static char cleanstr[4096];
|
||||
char buf[4096];
|
||||
char errbuf[2048];
|
||||
char *ptr;
|
||||
int errorcode, matchlen, stringlen, this_word;
|
||||
|
||||
@@ -94,7 +95,6 @@ char *stripbadwords_message(char *str)
|
||||
regex_t pcomp;
|
||||
static char cleanstr[4096];
|
||||
char buf[4096];
|
||||
char errbuf[2048];
|
||||
char *ptr;
|
||||
int errorcode, matchlen, stringlen, this_word;
|
||||
|
||||
@@ -197,7 +197,7 @@ int loadbadwords_channel(char *wordfile)
|
||||
*/
|
||||
channelword[i] =
|
||||
(char *)MyMalloc(strlen(buf) + strlen(PATTERN) - 1);
|
||||
sprintf(channelword[i], PATTERN, buf);
|
||||
ircsprintf(channelword[i], PATTERN, buf);
|
||||
}
|
||||
channel_wordlist++;
|
||||
}
|
||||
@@ -261,7 +261,7 @@ int loadbadwords_message(char *wordfile)
|
||||
*/
|
||||
messageword[i] =
|
||||
(char *)MyMalloc(strlen(buf) + strlen(PATTERN) - 1);
|
||||
sprintf(messageword[i], PATTERN, buf);
|
||||
ircsprintf(messageword[i], PATTERN, buf);
|
||||
}
|
||||
message_wordlist++;
|
||||
}
|
||||
|
||||
@@ -118,10 +118,18 @@ int deliver_it(cptr, str, len)
|
||||
cptr->name, cptr->status, IsDead(cptr) ? "DEAD" : "", str);
|
||||
return -1;
|
||||
}
|
||||
|
||||
#ifdef USE_SSL
|
||||
if (cptr->flags & FLAGS_SSL)
|
||||
retval = SSL_write((SSL *)cptr->ssl, str, len);
|
||||
else
|
||||
retval = send(cptr->fd, str, len, 0);
|
||||
#else
|
||||
#ifndef INET6
|
||||
retval = send(cptr->fd, str, len, 0);
|
||||
#else
|
||||
retval = sendto(cptr->fd, str, len, 0, 0, 0);
|
||||
#endif
|
||||
#endif
|
||||
/*
|
||||
** Convert WOULDBLOCK to a return of "0 bytes moved". This
|
||||
|
||||
+399
-321
File diff suppressed because it is too large
Load Diff
+1
-2
@@ -33,6 +33,7 @@
|
||||
#ifdef PCS
|
||||
#include <time.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
|
||||
ID_Copyright("(C) 1993 Darren Reed");
|
||||
ID_Notes("DF version was 1.9 1/30/94");
|
||||
@@ -416,8 +417,6 @@ static aConfItem *initconf(opt)
|
||||
*/
|
||||
if (aconf->status & CONF_CLASS)
|
||||
{
|
||||
int class = 0;
|
||||
|
||||
if (!aconf->host)
|
||||
{
|
||||
(void)fprintf(stderr, "\tERROR: no class #\n");
|
||||
|
||||
+2
-1
@@ -22,6 +22,7 @@
|
||||
#include "common.h"
|
||||
#include "numeric.h"
|
||||
#include "h.h"
|
||||
#include "proto.h"
|
||||
|
||||
ID_Copyright("(C) 1990 Darren Reed");
|
||||
ID_Notes("1.4 6/28/93");
|
||||
@@ -66,7 +67,7 @@ int get_client_class(acptr)
|
||||
{
|
||||
Link *tmp;
|
||||
aClass *cl;
|
||||
int i = 0, retc = BAD_CLIENT_CLASS;
|
||||
int retc = BAD_CLIENT_CLASS;
|
||||
|
||||
if (acptr && !IsMe(acptr) && (acptr->confs))
|
||||
for (tmp = acptr->confs; tmp; tmp = tmp->next)
|
||||
|
||||
+2
-4
@@ -36,9 +36,7 @@ static char sccxid[] = "@(#)cloak.c 9.00 7/12/99 UnrealIRCd";
|
||||
#include "userload.h"
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#ifndef _WIN32
|
||||
#include <utmp.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
#include "h.h"
|
||||
|
||||
|
||||
@@ -213,7 +211,7 @@ char *make_virthost(char *curr, char *new, int mode)
|
||||
char *x;
|
||||
int i;
|
||||
if (curr == NULL)
|
||||
return;
|
||||
return (char *)NULL;
|
||||
|
||||
mask = hidehost(curr, 0);
|
||||
if (mode == 0)
|
||||
|
||||
+9
-5
@@ -24,14 +24,13 @@
|
||||
#include "msg.h"
|
||||
#include "channel.h"
|
||||
#include "userload.h"
|
||||
#include "proto.h"
|
||||
#include <time.h>
|
||||
#include <sys/stat.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#ifndef _WIN32
|
||||
#include <utmp.h>
|
||||
#else
|
||||
#ifdef _WIN32
|
||||
#include <io.h>
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
@@ -132,7 +131,7 @@ int load_conf(char *filename, int type)
|
||||
("[error] %s got a non-compatible version (%s) !",
|
||||
filename, version);
|
||||
sendto_ops
|
||||
("[error] Please go to http://unreal.tspre.org and learn how to upgrade");
|
||||
("[error] Please go to http://www.unrealircd.com and learn how to upgrade");
|
||||
return -1;
|
||||
}
|
||||
else
|
||||
@@ -166,7 +165,7 @@ int load_conf(char *filename, int type)
|
||||
("[error] %s got a non-compatible network file version (%s) !",
|
||||
filename, version);
|
||||
sendto_ops
|
||||
("[error] Please go to http://unreal.tspre.org and learn how to upgrade");
|
||||
("[error] Please go to http://www.unrealircd.com and learn how to upgrade");
|
||||
return -1;
|
||||
}
|
||||
else
|
||||
@@ -302,6 +301,8 @@ int load_conf2(FILE * conf, char *filename, int type)
|
||||
}
|
||||
else if (strcmp(var, "CONFIG_FILE_STOP") == 0)
|
||||
{
|
||||
|
||||
#ifndef DEVELOP
|
||||
if (atoi(setto) == 1)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
@@ -316,6 +317,7 @@ int load_conf2(FILE * conf, char *filename, int type)
|
||||
#endif
|
||||
exit(-1);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else if (strcmp(var, "SHOWOPERS") == 0)
|
||||
{
|
||||
@@ -401,6 +403,7 @@ int load_conf2(FILE * conf, char *filename, int type)
|
||||
{
|
||||
sendto_realops("Loaded %s ..", filename);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Load .network options */
|
||||
@@ -513,6 +516,7 @@ int load_conf3(FILE * conf, char *filename, int type)
|
||||
{
|
||||
sendto_realops("Loaded %s ..", INCLUDE);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
+15
-9
@@ -17,6 +17,7 @@
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include "numeric.h"
|
||||
#include "struct.h"
|
||||
@@ -24,6 +25,7 @@
|
||||
#include "sys.h"
|
||||
#include "hash.h"
|
||||
#include "h.h"
|
||||
#include "proto.h"
|
||||
|
||||
ID_Copyright("(C) 1991 Darren Reed");
|
||||
ID_Notes("2.10 7/3/93");
|
||||
@@ -161,6 +163,10 @@ 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))
|
||||
abort();
|
||||
|
||||
memset((char *)clientTable, '\0', sizeof(aHashEntry) * U_MAX);
|
||||
}
|
||||
|
||||
@@ -284,7 +290,7 @@ aClient *hash_find_client(char *name, aClient *cptr)
|
||||
* Got the bucket, now search the chain.
|
||||
*/
|
||||
for (tmp = (aClient *)tmp3->list; tmp; tmp = tmp->hnext)
|
||||
if (mycmp(name, tmp->name) == 0)
|
||||
if (smycmp(name, tmp->name) == 0)
|
||||
{
|
||||
return (tmp);
|
||||
}
|
||||
@@ -322,8 +328,8 @@ aClient *hash_find_nickserver(char *name, aClient *cptr)
|
||||
* Got the bucket, now search the chain.
|
||||
*/
|
||||
for (tmp = (aClient *)tmp3->list; tmp; tmp = tmp->hnext)
|
||||
if (mycmp(name, tmp->name) == 0 && tmp->user &&
|
||||
mycmp(serv, tmp->user->server) == 0)
|
||||
if (smycmp(name, tmp->name) == 0 && tmp->user &&
|
||||
smycmp(serv, tmp->user->server) == 0)
|
||||
{
|
||||
*--serv = '\0';
|
||||
return (tmp);
|
||||
@@ -353,7 +359,7 @@ aClient *hash_find_server(char *server, aClient *cptr)
|
||||
{
|
||||
if (!IsServer(tmp) && !IsMe(tmp))
|
||||
continue;
|
||||
if (mycmp(server, tmp->name) == 0)
|
||||
if (smycmp(server, tmp->name) == 0)
|
||||
{
|
||||
return (tmp);
|
||||
}
|
||||
@@ -411,7 +417,7 @@ aChannel *hash_find_channel(char *name, aChannel *chptr)
|
||||
tmp3 = &channelTable[hashv];
|
||||
|
||||
for (tmp = (aChannel *)tmp3->list; tmp; tmp = tmp->hnextch)
|
||||
if (mycmp(name, tmp->chname) == 0)
|
||||
if (smycmp(name, tmp->chname) == 0)
|
||||
{
|
||||
return (tmp);
|
||||
}
|
||||
@@ -501,7 +507,7 @@ int add_to_notify_hash_table(nick, cptr)
|
||||
|
||||
/* Find the right nick (header) in the bucket, or NULL... */
|
||||
if ((anptr = (aNotify *) notifyTable[hashv]))
|
||||
while (anptr && mycmp(anptr->nick, nick))
|
||||
while (anptr && smycmp(anptr->nick, nick))
|
||||
anptr = anptr->hnext;
|
||||
|
||||
/* If found NULL (no header for this nick), make one... */
|
||||
@@ -557,7 +563,7 @@ int hash_check_notify(cptr, reply)
|
||||
|
||||
/* Find the right header in this bucket */
|
||||
if ((anptr = (aNotify *) notifyTable[hashv]))
|
||||
while (anptr && mycmp(anptr->nick, cptr->name))
|
||||
while (anptr && smycmp(anptr->nick, cptr->name))
|
||||
anptr = anptr->hnext;
|
||||
if (!anptr)
|
||||
return 0; /* This nick isn't on notify */
|
||||
@@ -590,7 +596,7 @@ aNotify *hash_get_notify(name)
|
||||
hashv = hash_nn_name(name) % NOTIFYHASHSIZE;
|
||||
|
||||
if ((anptr = (aNotify *) notifyTable[hashv]))
|
||||
while (anptr && mycmp(anptr->nick, name))
|
||||
while (anptr && smycmp(anptr->nick, name))
|
||||
anptr = anptr->hnext;
|
||||
|
||||
return anptr;
|
||||
@@ -613,7 +619,7 @@ int del_from_notify_hash_table(nick, cptr)
|
||||
|
||||
/* Find the right header, maintaining last-link pointer... */
|
||||
if ((anptr = (aNotify *) notifyTable[hashv]))
|
||||
while (anptr && mycmp(anptr->nick, nick))
|
||||
while (anptr && smycmp(anptr->nick, nick))
|
||||
{
|
||||
nlast = anptr;
|
||||
anptr = anptr->hnext;
|
||||
|
||||
+1618
-583
File diff suppressed because it is too large
Load Diff
+103
-55
@@ -30,6 +30,7 @@ Computing Center and Jarkko Oikarinen";
|
||||
#include "sys.h"
|
||||
#include "numeric.h"
|
||||
#include "userload.h"
|
||||
#include "msg.h"
|
||||
#include <sys/stat.h>
|
||||
#include <signal.h>
|
||||
#include <fcntl.h>
|
||||
@@ -60,6 +61,7 @@ Computing Center and Jarkko Oikarinen";
|
||||
#include "badwords.h"
|
||||
#endif
|
||||
#include "version.h"
|
||||
#include "proto.h"
|
||||
|
||||
ID_Copyright
|
||||
("(C) 1988 University of Oulu, Computing Center and Jarkko Oikarinen");
|
||||
@@ -79,6 +81,7 @@ int un_gid = 99;
|
||||
extern char unreallogo[];
|
||||
#endif
|
||||
|
||||
LoopStruct loop;
|
||||
extern aMotd *opermotd;
|
||||
extern aMotd *svsmotd;
|
||||
extern aMotd *motd;
|
||||
@@ -123,12 +126,30 @@ int noisy_htm = 1;
|
||||
|
||||
TS check_fdlists();
|
||||
#endif
|
||||
|
||||
void save_stats(void)
|
||||
{
|
||||
FILE *stats = fopen("ircd.stats", "w");
|
||||
if (!stats)
|
||||
return;
|
||||
fprintf(stats, "%li\n", IRCstats.clients);
|
||||
fprintf(stats, "%li\n", IRCstats.invisible);
|
||||
fprintf(stats, "%li\n", IRCstats.servers);
|
||||
fprintf(stats, "%li\n", IRCstats.operators);
|
||||
fprintf(stats, "%li\n", IRCstats.unknown);
|
||||
fprintf(stats, "%li\n", IRCstats.me_clients);
|
||||
fprintf(stats, "%li\n", IRCstats.me_servers);
|
||||
fprintf(stats, "%li\n", IRCstats.me_max);
|
||||
fprintf(stats, "%li\n", IRCstats.global_max);
|
||||
fclose(stats);
|
||||
}
|
||||
|
||||
|
||||
void server_reboot(char *);
|
||||
void restart PROTO((char *));
|
||||
static void open_debugfile(), setup_signals();
|
||||
extern void init_glines(void);
|
||||
|
||||
int do_garbage_collect = 0;
|
||||
TS last_garbage_collect = 0;
|
||||
char **myargv;
|
||||
int portnum = -1; /* Server port number, listening this */
|
||||
@@ -237,12 +258,42 @@ VOIDSIG s_restart()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
VOIDSIG s_segv()
|
||||
{
|
||||
#ifdef POSIX_SIGNALS
|
||||
struct sigaction act;
|
||||
#endif
|
||||
int i;
|
||||
FILE *log;
|
||||
int p;
|
||||
static TS segv_last = (TS)0;
|
||||
#ifdef RENAME_CORE
|
||||
char corename[512];
|
||||
#else
|
||||
# define corename "core"
|
||||
#endif
|
||||
if (!segv_last) {
|
||||
sendto_ops("Recieved first Segfault, doing re-enter test");
|
||||
segv_last = TStime();
|
||||
return;
|
||||
}
|
||||
if ((TStime() - segv_last) > 5) {
|
||||
#ifdef USE_SYSLOG
|
||||
(void)syslog(LOG_WARNING, "Possible fake segfault");
|
||||
#endif
|
||||
segv_last = TStime();
|
||||
return;
|
||||
}
|
||||
#ifdef POSIX_SIGNALS
|
||||
act.sa_flags = 0;
|
||||
act.sa_handler = SIG_DFL;
|
||||
(void)sigemptyset(&act.sa_mask);
|
||||
(void)sigaction(SIGSEGV,&act,NULL);
|
||||
#else
|
||||
(void)signal(SIGSEGV,SIG_DFL);
|
||||
#endif
|
||||
|
||||
#ifdef USE_SYSLOG
|
||||
(void)syslog(LOG_WARNING, "Server terminating: Segmention fault!!!");
|
||||
(void)closelog();
|
||||
@@ -253,6 +304,7 @@ VOIDSIG s_segv()
|
||||
sendto_serv_butone(&me,
|
||||
":%s GLOBOPS :AIEEE!!! Server Terminating: Segmention fault (buf: %s)",
|
||||
me.name, backupbuf);
|
||||
sendto_all_butone(NULL, &me, "NOTICE ALL :SEGFAULT! I'm Meeeeellllting, what a world!");
|
||||
log = fopen(lPATH, "a");
|
||||
if (log)
|
||||
{
|
||||
@@ -264,14 +316,12 @@ VOIDSIG s_segv()
|
||||
|
||||
#if !defined(_WIN32) && !defined(_AMIGA)
|
||||
p = getpid();
|
||||
if (fork() > 0)
|
||||
{
|
||||
kill(p, 3);
|
||||
kill(p, 9);
|
||||
}
|
||||
if (fork()) { return; }
|
||||
write_pidfile();
|
||||
#ifdef RENAME_CORE
|
||||
(void)ircsprintf(corename, "core.%d", p);
|
||||
(void)rename("core", corename);
|
||||
#endif
|
||||
sendto_realops
|
||||
("Dumped core to %s - please read Unreal.nfo on what to do!",
|
||||
corename);
|
||||
@@ -279,15 +329,19 @@ VOIDSIG s_segv()
|
||||
flush_connections(me.fd);
|
||||
|
||||
#ifndef _WIN32
|
||||
for (i = 3; i < MAXCONNECTIONS; i++)
|
||||
for (i = 3; i < MAXCONNECTIONS; i++) {
|
||||
(void)close(i);
|
||||
}
|
||||
#else
|
||||
for (i = 0; i < highest_fd; i++)
|
||||
for (i = 0; i < highest_fd; i++) {
|
||||
if (closesocket(i) == -1)
|
||||
close(i);
|
||||
}
|
||||
#endif
|
||||
kill(p,SIGQUIT);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
void server_reboot(mesg)
|
||||
char *mesg;
|
||||
{
|
||||
@@ -467,7 +521,7 @@ extern TS check_pings(TS currenttime, int check_kills)
|
||||
killflag = 0;
|
||||
if (check_kills && !killflag && IsPerson(cptr))
|
||||
if (find_zap(cptr, 1)
|
||||
|| find_tkline_match(cptr, 2) > -1 ||
|
||||
|| find_tkline_match(cptr, 0) > -1 ||
|
||||
(!IsAnOper(cptr) && find_nline(cptr)))
|
||||
killflag = 1;
|
||||
ping = IsRegistered(cptr) ? get_client_ping(cptr) :
|
||||
@@ -528,38 +582,23 @@ extern TS check_pings(TS currenttime, int check_kills)
|
||||
|
||||
#ifdef SHOWCONNECTINFO
|
||||
if (DoingDNS(cptr))
|
||||
#ifndef _WIN32
|
||||
write(cptr->fd, REPORT_FAIL_DNS,
|
||||
R_fail_dns);
|
||||
#else
|
||||
send(cptr->fd, REPORT_FAIL_DNS,
|
||||
R_fail_dns, 0);
|
||||
#endif
|
||||
sendto_one(cptr, REPORT_FAIL_DNS);
|
||||
else if (DoingAuth(cptr))
|
||||
#ifndef _WIN32
|
||||
write(cptr->fd, REPORT_FAIL_ID,
|
||||
R_fail_id);
|
||||
#else
|
||||
send(cptr->fd, REPORT_FAIL_ID,
|
||||
R_fail_id, 0);
|
||||
#endif
|
||||
sendto_one(cptr, REPORT_FAIL_ID);
|
||||
|
||||
#ifdef SOCKSPORT
|
||||
else
|
||||
#ifndef _WIN32
|
||||
write(cptr->fd, REPORT_NO_SOCKS,
|
||||
R_no_socks);
|
||||
#else
|
||||
send(cptr->fd, REPORT_NO_SOCKS,
|
||||
R_no_socks, 0);
|
||||
|
||||
#endif
|
||||
sendto_one(cptr, REPORT_NO_SOCKS);
|
||||
#endif /* SOCKSPORT */
|
||||
#endif
|
||||
Debug((DEBUG_NOTICE,
|
||||
"DNS/AUTH timeout %s",
|
||||
get_client_name(cptr, TRUE)));
|
||||
#ifndef NEWDNS
|
||||
del_queries((char *)cptr);
|
||||
#else /*NEWDNS*/
|
||||
/*We dont do anything (yet)*/
|
||||
#endif /*NEWDNS*/
|
||||
ClearAuth(cptr);
|
||||
ClearDNS(cptr);
|
||||
#ifdef SOCKSPORT
|
||||
@@ -629,7 +668,7 @@ extern TS check_pings(TS currenttime, int check_kills)
|
||||
cptr->flags |= FLAGS_PINGSENT;
|
||||
/* not nice but does the job */
|
||||
cptr->lasttime = currenttime - ping;
|
||||
sendto_one(cptr, "PING :%s", me.name);
|
||||
sendto_one(cptr, "%s :%s", IsToken(cptr) ? TOK_PING : MSG_PING, me.name);
|
||||
}
|
||||
ping_timeout:
|
||||
timeout = cptr->lasttime + ping;
|
||||
@@ -676,6 +715,8 @@ static int bad_command()
|
||||
return (-1);
|
||||
}
|
||||
|
||||
char chess[] = {85, 110, 114, 101, 97, 108, 0};
|
||||
|
||||
#ifndef _WIN32
|
||||
int main(argc, argv)
|
||||
#else
|
||||
@@ -684,9 +725,6 @@ int InitwIRCD(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
int x;
|
||||
char chess[] = {85, 110, 114, 101, 97, 108, 0};
|
||||
|
||||
#ifdef _WIN32
|
||||
WORD wVersionRequested = MAKEWORD(1, 1);
|
||||
WSADATA wsaData;
|
||||
@@ -715,7 +753,6 @@ int InitwIRCD(argc, argv)
|
||||
(void)signal(SIGUSR1, s_monitor);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef CHROOTDIR
|
||||
if (chdir(dpath))
|
||||
{
|
||||
@@ -743,13 +780,6 @@ int InitwIRCD(argc, argv)
|
||||
initload();
|
||||
init_ircstats();
|
||||
clear_scache_hash_table();
|
||||
i = strcmp(BASE_VERSION, chess);
|
||||
if (i != 0)
|
||||
{
|
||||
printf("Segmentation fault (core dumped)\n");
|
||||
printf("# ");
|
||||
exit(-1);
|
||||
}
|
||||
#ifdef FORCE_CORE
|
||||
corelim.rlim_cur = corelim.rlim_max = RLIM_INFINITY;
|
||||
if (setrlimit(RLIMIT_CORE, &corelim))
|
||||
@@ -806,6 +836,10 @@ int InitwIRCD(argc, argv)
|
||||
break;
|
||||
#endif
|
||||
case 'h':
|
||||
if (!strchr(p, '.')) {
|
||||
(void)printf("ERROR: %s is not valid: Server names must contain at least 1 \".\"\n", p);
|
||||
exit(1);
|
||||
}
|
||||
strncpyzt(me.name, p, sizeof(me.name));
|
||||
break;
|
||||
case 'H':
|
||||
@@ -839,7 +873,7 @@ int InitwIRCD(argc, argv)
|
||||
bootopt |= BOOT_TTY;
|
||||
break;
|
||||
case 'v':
|
||||
(void)printf("ircd %s\n", version);
|
||||
(void)printf("%s\n", version);
|
||||
#else
|
||||
case 'v':
|
||||
MessageBox(NULL, version, "UnrealIRCD/Win32 version",
|
||||
@@ -960,6 +994,7 @@ int InitwIRCD(argc, argv)
|
||||
clear_client_hash_table();
|
||||
clear_channel_hash_table();
|
||||
clear_notify_hash_table();
|
||||
bzero(&loop, sizeof(loop));
|
||||
inittoken();
|
||||
initlists();
|
||||
initclass();
|
||||
@@ -1114,7 +1149,9 @@ int InitwIRCD(argc, argv)
|
||||
#endif
|
||||
check_class();
|
||||
write_pidfile();
|
||||
|
||||
#ifdef USE_SSL
|
||||
init_ssl();
|
||||
#endif
|
||||
Debug((DEBUG_NOTICE, "Server ready..."));
|
||||
#ifdef USE_SYSLOG
|
||||
syslog(LOG_NOTICE, "Server Ready");
|
||||
@@ -1148,6 +1185,14 @@ void SocketLoop(void *dummy)
|
||||
{
|
||||
tkl_check_expire();
|
||||
lastglinecheck = now;
|
||||
#ifdef STATSWRITING
|
||||
save_stats();
|
||||
#endif
|
||||
}
|
||||
if (loop.do_tkl_sweep)
|
||||
{
|
||||
tkl_sweep();
|
||||
loop.do_tkl_sweep = 0;
|
||||
}
|
||||
/* we want accuarte time here not the fucked up TStime() :P -Stskeeps */
|
||||
if ((time(NULL) - last_tune) > 300)
|
||||
@@ -1157,14 +1202,14 @@ void SocketLoop(void *dummy)
|
||||
}
|
||||
|
||||
if (((now - last_garbage_collect) > GARBAGE_COLLECT_EVERY
|
||||
|| (do_garbage_collect == 1)))
|
||||
|| (loop.do_garbage_collect == 1)))
|
||||
{
|
||||
extern int freelinks;
|
||||
extern Link *freelink;
|
||||
Link p, *lpp;
|
||||
Link p;
|
||||
int ii;
|
||||
|
||||
if (do_garbage_collect == 1)
|
||||
if (loop.do_garbage_collect == 1)
|
||||
sendto_realops("Doing garbage collection ..");
|
||||
if (freelinks > HOW_MANY_FREELINKS_ALLOWED)
|
||||
{
|
||||
@@ -1177,16 +1222,16 @@ void SocketLoop(void *dummy)
|
||||
freelink = freelink->next;
|
||||
MyFree(p.next);
|
||||
}
|
||||
if (do_garbage_collect == 1)
|
||||
if (loop.do_garbage_collect == 1)
|
||||
{
|
||||
do_garbage_collect = 0;
|
||||
loop.do_garbage_collect = 0;
|
||||
sendto_realops
|
||||
("Cleaned up %i garbage blocks",
|
||||
(ii - freelinks));
|
||||
}
|
||||
}
|
||||
if (do_garbage_collect == 1)
|
||||
do_garbage_collect = 0;
|
||||
if (loop.do_garbage_collect == 1)
|
||||
loop.do_garbage_collect = 0;
|
||||
|
||||
last_garbage_collect = now;
|
||||
}
|
||||
@@ -1200,8 +1245,6 @@ void SocketLoop(void *dummy)
|
||||
{
|
||||
static TS lasttime = 0;
|
||||
static long lastrecvK, lastsendK;
|
||||
static int init = 0;
|
||||
static TS loadcfreq = LOADCFREQ;
|
||||
static int lrv;
|
||||
|
||||
if (now - lasttime < LCF)
|
||||
@@ -1294,10 +1337,14 @@ void SocketLoop(void *dummy)
|
||||
/*
|
||||
** DNS checks. One to timeout queries, one for cache expiries.
|
||||
*/
|
||||
|
||||
/*TODO: Add FULL Caching*/
|
||||
#ifndef NEWDNS
|
||||
if (now >= nextdnscheck)
|
||||
nextdnscheck = timeout_query_list(now);
|
||||
if (now >= nextexpire)
|
||||
nextexpire = expire_cache(now);
|
||||
#endif /*NEWDNS*/
|
||||
/*
|
||||
** take the smaller of the two 'timed' event times as
|
||||
** the time of next event (stops us being late :) - avalon
|
||||
@@ -1510,10 +1557,11 @@ static void setup_signals()
|
||||
(void)sigaddset(&act.sa_mask, SIGTERM);
|
||||
(void)sigaction(SIGTERM, &act, NULL);
|
||||
/* handling of SIGSEGV as well -sts */
|
||||
#ifndef PROPER_COREDUMP
|
||||
act.sa_handler = s_segv;
|
||||
(void)sigaddset(&act.sa_mask, SIGSEGV);
|
||||
(void)sigaction(SIGSEGV, &act, NULL);
|
||||
|
||||
#endif
|
||||
#else
|
||||
# ifndef HAVE_RELIABLE_SIGNALS
|
||||
(void)signal(SIGPIPE, dummy);
|
||||
|
||||
@@ -290,6 +290,7 @@ char *ircvsprintf(char *str, const char *format, va_list vl)
|
||||
while ((*++str = *++p1));
|
||||
continue;
|
||||
}
|
||||
|
||||
if (c == 'l' && *format == 'u') /* Prints time_t value in interval
|
||||
[ 100000000 , 4294967295 ]
|
||||
Actually prints like "%09lu" */
|
||||
@@ -364,6 +365,30 @@ char *ircvsprintf(char *str, const char *format, va_list vl)
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
/* Send base64 value */
|
||||
|
||||
if (c == 'b')
|
||||
{
|
||||
long v1;
|
||||
char *ap;
|
||||
|
||||
v1 = va_arg(vl, long);
|
||||
for (ap = (char *) xbase64enc(v1); *ap; ap++)
|
||||
*str++ = *ap;
|
||||
continue;
|
||||
}
|
||||
if (c == 'B')
|
||||
{
|
||||
long v1;
|
||||
char *ap;
|
||||
|
||||
v1 = va_arg(vl, long);
|
||||
*str++ = '!';
|
||||
for (ap = (char *) xbase64enc(v1); *ap; ap++)
|
||||
*str++ = *ap;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (c == 'd')
|
||||
{
|
||||
unsigned int v1, v2;
|
||||
|
||||
+18
-34
@@ -132,6 +132,7 @@ aClient *make_client(from, servr)
|
||||
cptr->srvptr = servr;
|
||||
cptr->status = STAT_UNKNOWN;
|
||||
cptr->fd = -1;
|
||||
cptr->passwd;
|
||||
(void)strcpy(cptr->username, "unknown");
|
||||
if (size == CLIENT_LOCAL_SIZE)
|
||||
{
|
||||
@@ -141,9 +142,6 @@ aClient *make_client(from, servr)
|
||||
cptr->sockhost[0] = '\0';
|
||||
cptr->buffer[0] = '\0';
|
||||
cptr->authfd = -1;
|
||||
#ifdef CRYPTOIRCD
|
||||
cptr->cryptinfo = NULL;
|
||||
#endif
|
||||
#ifdef SOCKSPORT
|
||||
cptr->socksfd = -1;
|
||||
#endif
|
||||
@@ -154,10 +152,8 @@ aClient *make_client(from, servr)
|
||||
void free_client(cptr)
|
||||
aClient *cptr;
|
||||
{
|
||||
#ifdef CRYPTOIRCD
|
||||
if (MyClient(cptr) && cptr->cryptinfo)
|
||||
MyFree((char *)cptr->cryptinfo);
|
||||
#endif
|
||||
if (MyClient(cptr) && cptr->passwd)
|
||||
MyFree((char *)cptr->passwd);
|
||||
MyFree((char *)cptr);
|
||||
}
|
||||
|
||||
@@ -185,7 +181,10 @@ anUser *make_user(cptr)
|
||||
user->invited = NULL;
|
||||
user->silence = NULL;
|
||||
user->server = NULL;
|
||||
user->virthost = NULL;
|
||||
user->lopt = NULL;
|
||||
user->whowas = NULL;
|
||||
user->virthost = MyMalloc(5);
|
||||
*user->virthost = '\0';
|
||||
cptr->user = user;
|
||||
}
|
||||
return user;
|
||||
@@ -371,34 +370,14 @@ Link *find_channel_link(lp, ptr)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Look for a match in a list of strings. Go through the list, and run
|
||||
* match() on it. Side effect: if found, this link is moved to the top of
|
||||
* the list.
|
||||
*/
|
||||
int find_str_match_link(lp, str)
|
||||
Link **lp; /* Two **'s, since we might modify the original *lp */
|
||||
char *str;
|
||||
/* Based on find_str_link() from bahamut -- codemastr */
|
||||
int find_str_match_link(Link *lp, char *charptr)
|
||||
{
|
||||
Link **head = lp;
|
||||
if (!str || !lp)
|
||||
if (!charptr)
|
||||
return 0;
|
||||
if (lp && *lp)
|
||||
{
|
||||
if (!match((*lp)->value.cp, str))
|
||||
for (; lp; lp = lp->next) {
|
||||
if(!match(lp->value.cp, charptr))
|
||||
return 1;
|
||||
for (; (*lp)->next; *lp = (*lp)->next)
|
||||
if (!match((*lp)->next->value.cp, str))
|
||||
{
|
||||
Link *temp = (*lp)->next;
|
||||
*lp = (*lp)->next->next;
|
||||
temp->next = *head;
|
||||
*head = temp;
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -425,7 +404,7 @@ void free_str_list(lp)
|
||||
|
||||
Link *make_link()
|
||||
{
|
||||
Link *lp, *lp1;
|
||||
Link *lp;
|
||||
int i;
|
||||
|
||||
/* "caching" slab-allocator... ie. we're allocating one pages
|
||||
@@ -539,6 +518,7 @@ aConfItem *make_conf()
|
||||
aconf->clients = 0;
|
||||
aconf->port = 0;
|
||||
aconf->hold = 0;
|
||||
aconf->options = 0;
|
||||
Class(aconf) = 0;
|
||||
return (aconf);
|
||||
}
|
||||
@@ -562,7 +542,9 @@ void delist_conf(aconf)
|
||||
void free_sqline(asqline)
|
||||
aSqlineItem *asqline;
|
||||
{
|
||||
#ifndef NEWDNS
|
||||
del_queries((char *)asqline);
|
||||
#endif /*NEWDNS*/
|
||||
MyFree(asqline->sqline);
|
||||
MyFree(asqline->reason);
|
||||
MyFree((char *)asqline);
|
||||
@@ -572,7 +554,9 @@ void free_sqline(asqline)
|
||||
void free_conf(aconf)
|
||||
aConfItem *aconf;
|
||||
{
|
||||
#ifndef NEWDNS
|
||||
del_queries((char *)aconf);
|
||||
#endif /*NEWDNS*/
|
||||
MyFree(aconf->host);
|
||||
if (aconf->passwd)
|
||||
bzero(aconf->passwd, strlen(aconf->passwd));
|
||||
|
||||
+1
-3
@@ -33,9 +33,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#ifndef _WIN32
|
||||
#include <utmp.h>
|
||||
#else
|
||||
#ifdef _WIN32
|
||||
#include <io.h>
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
|
||||
+424
@@ -0,0 +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*/
|
||||
-109
@@ -29,63 +29,6 @@ ID_Copyright
|
||||
("(C) 1988 University of Oulu, Computing Center and Jarkko Oikarinen");
|
||||
ID_Notes("2.12 1/30/94");
|
||||
|
||||
#ifdef CRYPTOIRCD
|
||||
char *ep_encrypt(aClient *cptr, char *string, int *len)
|
||||
{
|
||||
static unsigned char cryptobuffer[8192];
|
||||
char ivec[9];
|
||||
int length;
|
||||
char *c;
|
||||
int num;
|
||||
|
||||
if (!cptr->cryptinfo)
|
||||
return string;
|
||||
|
||||
bzero(cryptobuffer, sizeof(cryptobuffer));
|
||||
bzero(ivec, sizeof(ivec));
|
||||
num = 0;
|
||||
|
||||
if ((c = (char *)strchr(string, '\n')))
|
||||
*c = '\0';
|
||||
if ((c = (char *)strchr(string, '\r')))
|
||||
*c = '\0';
|
||||
|
||||
length = strlen(string) + 1;
|
||||
cryptobuffer[0] = (unsigned char)length / 256;
|
||||
cryptobuffer[1] = (unsigned char)length - (cryptobuffer[0] * 256);
|
||||
|
||||
if (cptr->cryptinfo->method == METHOD_BLOWFISH)
|
||||
{
|
||||
BF_cfb64_encrypt(string, &cryptobuffer[2], length,
|
||||
cptr->cryptinfo->key, ivec, &num, BF_ENCRYPT);
|
||||
*len = length + 2;
|
||||
return (cryptobuffer);
|
||||
}
|
||||
}
|
||||
|
||||
char *ep_decrypt(aClient *cptr, char *string)
|
||||
{
|
||||
static char decryptbuffer[8192];
|
||||
int num;
|
||||
char ivec[9];
|
||||
int length;
|
||||
|
||||
if (!cptr->cryptinfo)
|
||||
return string;
|
||||
|
||||
bzero(decryptbuffer, sizeof(decryptbuffer));
|
||||
bzero(ivec, sizeof(ivec));
|
||||
num = 0;
|
||||
length = (*(string) * 256) + (*(string + 1));
|
||||
|
||||
if (cptr->cryptinfo->method == METHOD_BLOWFISH)
|
||||
{
|
||||
BF_cfb64_encrypt(string + 2, decryptbuffer, length,
|
||||
cptr->cryptinfo->key, ivec, &num, BF_DECRYPT);
|
||||
return (decryptbuffer);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
/*
|
||||
* inittoken
|
||||
* Cheat here, blah. Build the lookup tables from msgtab's,
|
||||
@@ -128,11 +71,6 @@ int dopacket(cptr, buffer, length)
|
||||
char *ch1;
|
||||
char *ch2;
|
||||
aClient *acpt = cptr->acpt;
|
||||
#ifdef CRYPTOIRCD
|
||||
int lengthweneed, num, lengthbackup, li;
|
||||
char *s;
|
||||
char f[4096], x[512];
|
||||
#endif
|
||||
|
||||
me.receiveB += length; /* Update bytes received */
|
||||
cptr->receiveB += length;
|
||||
@@ -157,53 +95,6 @@ int dopacket(cptr, buffer, length)
|
||||
}
|
||||
ch1 = cptr->buffer + cptr->count;
|
||||
ch2 = buffer;
|
||||
#ifdef CRYPTOIRCD
|
||||
if (IsSecure(cptr))
|
||||
{
|
||||
while (--length >= 0)
|
||||
{
|
||||
*ch1 = *ch2++;
|
||||
if (ch1 - cptr->buffer > 2)
|
||||
{
|
||||
lengthweneed =
|
||||
((unsigned char)*cptr->buffer) * 256 +
|
||||
((unsigned char)*(cptr->buffer + 1));
|
||||
lengthbackup = ch1 - cptr->buffer;
|
||||
if (lengthbackup >= (lengthweneed + 1))
|
||||
{
|
||||
ch1 = cptr->buffer;
|
||||
cptr->count = 0;
|
||||
Debug((DEBUG_ERROR,
|
||||
"packet recieved len %i",
|
||||
lengthweneed));
|
||||
s =
|
||||
(char *)ep_decrypt(cptr,
|
||||
cptr->buffer);
|
||||
me.receiveM += 1;
|
||||
cptr->receiveM += 1;
|
||||
if (cptr->acpt != &me)
|
||||
cptr->acpt->receiveM += 1;
|
||||
if (parse(cptr, s, s + lengthweneed,
|
||||
msgtab) == FLUSH_BUFFER)
|
||||
return FLUSH_BUFFER;
|
||||
if (cptr->flags & FLAGS_DEADSOCKET)
|
||||
return exit_client(cptr, cptr,
|
||||
&me, "Dead socket");
|
||||
}
|
||||
else
|
||||
if (ch1 <
|
||||
cptr->buffer + (sizeof(cptr->buffer) - 1))
|
||||
ch1++;
|
||||
}
|
||||
else
|
||||
if (ch1 < cptr->buffer + (sizeof(cptr->buffer) - 1))
|
||||
ch1++;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
#endif
|
||||
while (--length >= 0)
|
||||
{
|
||||
char g = (*ch1 = *ch2++);
|
||||
|
||||
+14
-26
@@ -44,9 +44,11 @@ char backupbuf[8192];
|
||||
#include "numeric.h"
|
||||
#include "h.h"
|
||||
|
||||
|
||||
/*
|
||||
* NOTE: parse() should not be called recursively by other functions!
|
||||
*/
|
||||
extern int lifesux;
|
||||
static char *para[MAXPARA + 1];
|
||||
|
||||
static char sender[HOSTLEN + 1];
|
||||
@@ -66,7 +68,6 @@ aClient inline *find_client(name, cptr)
|
||||
char *name;
|
||||
aClient *cptr;
|
||||
{
|
||||
char *newname;
|
||||
|
||||
if (name)
|
||||
{
|
||||
@@ -103,7 +104,6 @@ aClient inline *find_server(name, cptr)
|
||||
char *name;
|
||||
aClient *cptr;
|
||||
{
|
||||
char *newname;
|
||||
if (name)
|
||||
{
|
||||
cptr = hash_find_server(name, cptr);
|
||||
@@ -172,7 +172,7 @@ void ban_flooder(aClient *cptr)
|
||||
};
|
||||
|
||||
strcpy(hostip, (char *)inetntoa((char *)&cptr->ip));
|
||||
exit_client(cptr, cptr, &me, "Flooding");
|
||||
// exit_client(cptr, cptr, &me, "Flooding");
|
||||
|
||||
tkllayer[4] = hostip;
|
||||
tkllayer[5] = me.name;
|
||||
@@ -196,7 +196,7 @@ int parse(cptr, buffer, bufend, mptr)
|
||||
struct Message *mptr;
|
||||
{
|
||||
aClient *from = cptr;
|
||||
char *ch, *s, *p;
|
||||
char *ch, *s;
|
||||
int len, i, numeric, paramcount, noprefix = 0;
|
||||
int token, mfound;
|
||||
#ifdef DEBUGMODE
|
||||
@@ -210,9 +210,7 @@ int parse(cptr, buffer, bufend, mptr)
|
||||
if (IsDead(cptr))
|
||||
return 0;
|
||||
|
||||
#ifdef RAWDEBUG
|
||||
sendto_ops("Debug: parse(): %s", buffer);
|
||||
#endif
|
||||
// sendto_realops("Debug: parse(): %s", buffer);
|
||||
|
||||
if ((cptr->receiveK >= 4) && IsUnknown(cptr))
|
||||
{
|
||||
@@ -397,19 +395,15 @@ int parse(cptr, buffer, bufend, mptr)
|
||||
paramcount = mptr->parameters;
|
||||
i = bufend - ch; /* Is this right? -Donwulff */
|
||||
mptr->bytes += i;
|
||||
if ((mptr->flags & 1) && !(IsServer(cptr) || IsOper(cptr)))
|
||||
cptr->since += (2 + i / 90);
|
||||
/* Allow only 1 msg per 2 seconds
|
||||
* (on average) to prevent dumping.
|
||||
* to keep the response rate up,
|
||||
* bursts of up to 5 msgs are allowed
|
||||
* -SRB
|
||||
*
|
||||
* Not applying to opers now
|
||||
* -techie
|
||||
*
|
||||
* 1 msg per 1.5 second i'd say now
|
||||
*/
|
||||
/* Changed this whole lag generating crap ..
|
||||
* We only generate fake lag in HTM ..
|
||||
* --Stskeeps
|
||||
*/
|
||||
if (!IsServer(cptr) && !IsOper(cptr))
|
||||
{
|
||||
if (lifesux)
|
||||
cptr->since += (2 + i / 90);
|
||||
}
|
||||
}
|
||||
/*
|
||||
** Must the following loop really be so devious? On
|
||||
@@ -471,12 +465,6 @@ int parse(cptr, buffer, bufend, mptr)
|
||||
(mptr->func != m_pass) && (mptr->func != m_quit) &&
|
||||
(mptr->func != m_protoctl) && (mptr->func != m_error) &&
|
||||
(mptr->func != m_admin) && (mptr->func != m_version)
|
||||
#ifdef CRYPTOIRCD
|
||||
&& (mptr->func != m_crypto)
|
||||
#endif
|
||||
#ifdef NOSPOOF
|
||||
&& (mptr->func != m_notice)
|
||||
#endif
|
||||
)))
|
||||
{
|
||||
sendto_one(from, ":%s %d %s :You have not registered",
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#endif
|
||||
#include "nameser.h"
|
||||
#include "resolv.h"
|
||||
#include <string.h>
|
||||
|
||||
#ifndef lint
|
||||
static char sccsid[] = "@(#)res.c 2.38 4/13/94 (C) 1992 Darren Reed";
|
||||
@@ -277,13 +278,7 @@ time_t now;
|
||||
{
|
||||
case ASYNC_CLIENT :
|
||||
#ifdef SHOWCONNECTINFO
|
||||
#ifndef _WIN32
|
||||
write(cptr->fd, REPORT_FAIL_DNS,
|
||||
R_fail_dns);
|
||||
#else
|
||||
send(cptr->fd, REPORT_FAIL_DNS,
|
||||
R_fail_dns, 0);
|
||||
#endif
|
||||
sendto_one(cptr, REPORT_FAIL_DNS);
|
||||
#endif
|
||||
ClearDNS(cptr);
|
||||
if (!DoingAuth(cptr))
|
||||
@@ -676,8 +671,19 @@ HEADER *hptr;
|
||||
if (ans == 1)
|
||||
hp->h_addrtype = (class == C_IN) ?
|
||||
AFINET : AF_UNSPEC;
|
||||
bcopy(cp, (char *)&dr, dlen);
|
||||
|
||||
/* Fix for a recently found exploit, fix by Christophe Kalt <kalt@stealth.net>
|
||||
* Taken from bahamut
|
||||
*/
|
||||
|
||||
if (dlen != sizeof(dr)) {
|
||||
sendto_realops("Bad IP length (%d) returned for %s", dlen, hostbuf);
|
||||
Debug((DEBUG_DNS, "Bad IP length (%d) returned for %s", dlen, hostbuf));
|
||||
return(-2);
|
||||
}
|
||||
|
||||
bcopy(cp, (char *)&dr, dlen);
|
||||
|
||||
adr->S_ADDR = dr.S_ADDR;
|
||||
Debug((DEBUG_INFO,"got ip # %s for %s",
|
||||
inetntoa((char *)adr), hostbuf));
|
||||
|
||||
+1
-3
@@ -1,5 +1,3 @@
|
||||
/*
|
||||
/*
|
||||
/*
|
||||
* Copyright (c) 1985 Regents of the University of California.
|
||||
* All rights reserved.
|
||||
@@ -30,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();
|
||||
|
||||
|
||||
+5
-20
@@ -43,6 +43,7 @@ static char sccsid[] = "@(#)s_auth.c 1.18 4/18/94 (C) 1992 Darren Reed";
|
||||
#include "sock.h" /* If FD_ZERO isn't define up to this point, */
|
||||
/* define it (BSD4.2 needs this) */
|
||||
#include "h.h"
|
||||
#include <string.h>
|
||||
|
||||
/*
|
||||
* start_auth
|
||||
@@ -89,11 +90,7 @@ void start_auth(cptr)
|
||||
#endif
|
||||
|
||||
#ifdef SHOWCONNECTINFO
|
||||
#ifndef _WIN32
|
||||
write(cptr->fd, REPORT_DO_ID, R_do_id);
|
||||
#else
|
||||
send(cptr->fd, REPORT_DO_ID, R_do_id, 0);
|
||||
#endif
|
||||
sendto_one(cptr, REPORT_DO_ID);
|
||||
#endif
|
||||
|
||||
set_non_blocking(cptr->authfd, cptr);
|
||||
@@ -130,11 +127,7 @@ void start_auth(cptr)
|
||||
if (!DoingDNS(cptr))
|
||||
SetAccess(cptr);
|
||||
#ifdef SHOWCONNECTINFO
|
||||
#ifndef _WIN32
|
||||
write(cptr->fd, REPORT_FAIL_ID, R_fail_id);
|
||||
#else
|
||||
send(cptr->fd, REPORT_FAIL_ID, R_fail_id, 0);
|
||||
#endif
|
||||
sendto_one(cptr, REPORT_FAIL_ID);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
@@ -199,11 +192,7 @@ void send_authports(cptr)
|
||||
cptr->authfd = -1;
|
||||
cptr->flags &= ~FLAGS_AUTH;
|
||||
#ifdef SHOWCONNECTINFO
|
||||
#ifndef _WIN32
|
||||
write(cptr->fd, REPORT_FAIL_ID, R_fail_id);
|
||||
#else
|
||||
send(cptr->fd, REPORT_FAIL_ID, R_fail_id, 0);
|
||||
#endif
|
||||
sendto_one(cptr, REPORT_FAIL_ID);
|
||||
#endif
|
||||
if (!DoingDNS(cptr))
|
||||
SetAccess(cptr);
|
||||
@@ -292,11 +281,7 @@ void read_authports(cptr)
|
||||
Debug((DEBUG_INFO, "ident reply: [%s]", cptr->buffer));
|
||||
|
||||
#ifdef SHOWCONNECTINFO
|
||||
#ifndef _WIN32
|
||||
write(cptr->fd, REPORT_FIN_ID, R_fin_id);
|
||||
#else
|
||||
send(cptr->fd, REPORT_FIN_ID, R_fin_id, 0);
|
||||
#endif
|
||||
sendto_one(cptr, REPORT_FIN_ID);
|
||||
#endif
|
||||
|
||||
if (!locp || !remp || !*ruser)
|
||||
|
||||
+170
-195
@@ -50,7 +50,6 @@ Computing Center and Jarkko Oikarinen";
|
||||
#include <sys/socket.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <utmp.h>
|
||||
#include <sys/resource.h>
|
||||
#else
|
||||
#include <io.h>
|
||||
@@ -70,6 +69,8 @@ Computing Center and Jarkko Oikarinen";
|
||||
#endif
|
||||
#include "resolv.h"
|
||||
#include "sock.h" /* If FD_ZERO isn't define up to this point, */
|
||||
#include <string.h>
|
||||
#include "proto.h"
|
||||
/* define it (BSD4.2 needs this) */
|
||||
#include "h.h"
|
||||
#ifndef NO_FDLIST
|
||||
@@ -89,9 +90,6 @@ int rr;
|
||||
#define INADDRSZ sizeof(struct IN_ADDR)
|
||||
#define IN6ADDRSZ sizeof(struct IN_ADDR)
|
||||
|
||||
#ifdef _WIN32
|
||||
extern HWND hwIRCDWnd;
|
||||
#endif
|
||||
extern char backupbuf[8192];
|
||||
aClient *local[MAXCONNECTIONS];
|
||||
int highest_fd = 0, readcalls = 0, resfd = -1;
|
||||
@@ -118,6 +116,10 @@ extern fdlist oper_fdlist;
|
||||
extern fdlist socks_fdlist;
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef NEWDNS
|
||||
void newdns_lookupfromip( aClient *);
|
||||
#endif /*NEWDNS*/
|
||||
/*
|
||||
* Try and find the correct name to use with getrlimit() for setting the max.
|
||||
* number of files allowed to be open by this process.
|
||||
@@ -214,7 +216,7 @@ void report_error(text, cptr)
|
||||
if (err)
|
||||
errtmp = err;
|
||||
#endif
|
||||
sendto_realops(text, host, strerror(errtmp));
|
||||
sendto_umode(UMODE_JUNK, text, host, strerror(errtmp));
|
||||
ircd_log(text,host,strerror(errtmp));
|
||||
#ifdef USE_SYSLOG
|
||||
syslog(LOG_WARNING, text, host, strerror(errtmp));
|
||||
@@ -383,12 +385,20 @@ int add_listener(aconf)
|
||||
switch (*p)
|
||||
{
|
||||
case 'C':
|
||||
if (!(cptr->umodes & LISTENER_SERVERSONLY))
|
||||
cptr->umodes |= LISTENER_CLIENTSONLY;
|
||||
break;
|
||||
case 'S':
|
||||
if (!(cptr->umodes & LISTENER_CLIENTSONLY))
|
||||
cptr->umodes |= LISTENER_SERVERSONLY;
|
||||
break;
|
||||
#ifdef USE_SSL
|
||||
case 's':
|
||||
cptr->umodes |= LISTENER_SSL;
|
||||
break;
|
||||
#endif
|
||||
case 'R':
|
||||
cptr->umodes = 0;
|
||||
cptr->umodes |= LISTENER_REMOTEADMIN;
|
||||
break;
|
||||
case 'J':
|
||||
@@ -457,7 +467,6 @@ void init_sys()
|
||||
#ifndef USE_POLL
|
||||
#ifdef RLIMIT_FD_MAX
|
||||
struct rlimit limit;
|
||||
int pid;
|
||||
|
||||
if (!getrlimit(RLIMIT_FD_MAX, &limit))
|
||||
{
|
||||
@@ -543,8 +552,9 @@ if ((bootopt & BOOT_CONSOLE) || isatty(0))
|
||||
}
|
||||
init_dgram:
|
||||
#endif /*_WIN32*/
|
||||
#ifndef NEWDNS
|
||||
resfd = init_resolver(0x1f);
|
||||
|
||||
#endif /*NEWDNS*/
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -788,7 +798,11 @@ int check_server_init(cptr)
|
||||
else
|
||||
s = aconf->host;
|
||||
Debug((DEBUG_DNS, "sv_ci:cache lookup (%s)", s));
|
||||
#ifndef NEWDNS
|
||||
hp = gethost_byname(s, &lin);
|
||||
#else /*NEWDNS*/
|
||||
hp = newdns_checkcachename(s);
|
||||
#endif /*NEWDNS*/
|
||||
}
|
||||
}
|
||||
return check_server(cptr, hp, c_conf, n_conf, 0);
|
||||
@@ -942,16 +956,31 @@ int check_server(cptr, hp, c_conf, n_conf, estab)
|
||||
static int completed_connection(cptr)
|
||||
aClient *cptr;
|
||||
{
|
||||
aConfItem *aconf;
|
||||
aConfItem *aconf, *cline;
|
||||
extern char serveropts[];
|
||||
SetHandshake(cptr);
|
||||
|
||||
aconf = find_conf(cptr->confs, cptr->name, CONF_CONNECT_SERVER);
|
||||
cline = aconf;
|
||||
if (!aconf)
|
||||
{
|
||||
sendto_ops("Lost C-Line for %s", get_client_name(cptr, FALSE));
|
||||
return -1;
|
||||
}
|
||||
#ifdef USE_SSL
|
||||
if ((cline->options & CONNECT_SSL))
|
||||
if (ssl_client_handshake(cptr) == -2)
|
||||
{
|
||||
sendto_realops("Could not handshake SSL with %s", get_client_name(cptr, FALSE));
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
sendto_realops("Handshaked SSL with %s", cptr->name);
|
||||
cptr->flags |= FLAGS_SSL;
|
||||
}
|
||||
#endif
|
||||
if (!BadPtr(aconf->passwd))
|
||||
sendto_one(cptr, "PASS :%s", aconf->passwd);
|
||||
|
||||
@@ -1027,7 +1056,9 @@ void close_connection(cptr)
|
||||
/*
|
||||
* remove outstanding DNS queries.
|
||||
*/
|
||||
#ifndef NEWDNS
|
||||
del_queries((char *)cptr);
|
||||
#endif /*NEWDNS*/
|
||||
/*
|
||||
* If the connection has been up for a long amount of time, schedule
|
||||
* a 'quick' reconnect, else reset the next-connect cycle.
|
||||
@@ -1053,6 +1084,16 @@ void close_connection(cptr)
|
||||
if (nextconnect > aconf->hold)
|
||||
nextconnect = aconf->hold;
|
||||
}
|
||||
#ifdef USE_SSL
|
||||
if (cptr->flags & FLAGS_SSL)
|
||||
{
|
||||
if (cptr->ssl)
|
||||
{
|
||||
SSL_shutdown((SSL *)cptr->ssl);
|
||||
SSL_free((SSL *)cptr->ssl);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (cptr->authfd >= 0)
|
||||
#ifndef _WIN32
|
||||
@@ -1060,7 +1101,6 @@ void close_connection(cptr)
|
||||
#else
|
||||
(void)closesocket(cptr->authfd);
|
||||
#endif
|
||||
|
||||
#ifdef SOCKSPORT
|
||||
if (cptr->socksfd >= 0)
|
||||
#ifndef _WIN32
|
||||
@@ -1108,6 +1148,7 @@ void close_connection(cptr)
|
||||
/*
|
||||
* fd remap to keep local[i] filled at the bottom.
|
||||
*/
|
||||
#ifdef DO_REMAPPING
|
||||
if (empty > 0)
|
||||
if ((j = highest_fd) > (i = empty) &&
|
||||
(local[j]->status != STAT_LOG))
|
||||
@@ -1116,6 +1157,16 @@ void close_connection(cptr)
|
||||
return;
|
||||
local[i] = local[j];
|
||||
local[i]->fd = i;
|
||||
#ifdef USE_SSL
|
||||
/* I didn't know the code above existed, which
|
||||
fucked up SSL -Stskeeps
|
||||
*/
|
||||
if ((local[i]->flags & FLAGS_SSL) && local[i]->ssl)
|
||||
{
|
||||
/* !! RISKY !! --Stskeeps */
|
||||
SSL_change_fd((SSL *) local[i]->ssl, local[i]->fd);
|
||||
}
|
||||
#endif
|
||||
local[j] = NULL;
|
||||
#ifndef NO_FDLIST
|
||||
/* update server list */
|
||||
@@ -1142,6 +1193,9 @@ void close_connection(cptr)
|
||||
while (!local[highest_fd])
|
||||
highest_fd--;
|
||||
}
|
||||
#endif
|
||||
while (!local[highest_fd])
|
||||
highest_fd--;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1235,6 +1289,26 @@ int get_sockerr(cptr)
|
||||
return errtmp;
|
||||
}
|
||||
|
||||
/*
|
||||
* set_blocking - Set the client connection into non-blocking mode.
|
||||
* If your system doesn't support this, you're screwed, ircd will run like
|
||||
* crap.
|
||||
* returns true (1) if successful, false (0) otherwise
|
||||
*/
|
||||
int set_blocking(int fd)
|
||||
{
|
||||
int flags;
|
||||
|
||||
if ((flags = fcntl(fd, F_GETFL, 0)) < 0
|
||||
|| fcntl(fd, F_SETFL, flags & ~O_NONBLOCK) < 0)
|
||||
return 0;
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
** set_non_blocking
|
||||
** Set the client connection into non-blocking mode. If your
|
||||
@@ -1351,7 +1425,7 @@ aClient *add_connection(cptr, fd)
|
||||
send(fd, zlinebuf, strlen(zlinebuf), 0);
|
||||
goto add_con_refuse;
|
||||
}
|
||||
else if (find_tkline_match(acptr, 2) != -1)
|
||||
else if (find_tkline_match_zap(acptr) != -1)
|
||||
{
|
||||
set_non_blocking(fd, acptr);
|
||||
set_sock_opts(fd, acptr);
|
||||
@@ -1382,29 +1456,45 @@ aClient *add_connection(cptr, fd)
|
||||
goto add_con_refuse;
|
||||
#endif
|
||||
#ifdef SHOWCONNECTINFO
|
||||
#ifndef _WIN32
|
||||
write(fd, REPORT_DO_DNS, R_do_dns);
|
||||
#else
|
||||
send(fd, REPORT_DO_DNS, R_do_dns, 0);
|
||||
/* Start of the very first DNS check */
|
||||
if (!(cptr->umodes & LISTENER_SSL))
|
||||
FDwrite(fd, REPORT_DO_DNS, R_do_dns);
|
||||
#endif
|
||||
#endif
|
||||
lin.flags = ASYNC_CLIENT;
|
||||
#ifndef USENEWDNS
|
||||
lin.flags = ASYNC_CLIENT; //newdns
|
||||
lin.value.cptr = acptr;
|
||||
Debug((DEBUG_DNS, "lookup %s",
|
||||
inetntoa((char *)&addr.SIN_ADDR)));
|
||||
inetntoa((char *)&addr.SIN_ADDR)));
|
||||
|
||||
|
||||
acptr->hostp = gethost_byaddr((char *)&acptr->ip, &lin);
|
||||
|
||||
if (!acptr->hostp)
|
||||
SetDNS(acptr);
|
||||
#ifdef SHOWCONNECTINFO
|
||||
else
|
||||
#ifndef _WIN32
|
||||
write(fd, REPORT_FIN_DNSC, R_fin_dnsc);
|
||||
#else
|
||||
send(fd, REPORT_FIN_DNSC, R_fin_dnsc, 0);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
{
|
||||
if (!(cptr->umodes & LISTENER_SSL))
|
||||
FDwrite(fd, REPORT_FIN_DNSC, R_fin_dnsc);
|
||||
}
|
||||
#endif /*SHOWCONNECTINFO*/
|
||||
nextdnscheck = 1;
|
||||
|
||||
|
||||
#else /*USENEWDNS*/
|
||||
|
||||
Debug((DEBUG_DNS, "lookup %s",
|
||||
inetntoa((char *)&addr.SIN_ADDR)));
|
||||
|
||||
|
||||
if (acptr->hostp = newdns_checkcacheip(acptr))
|
||||
|
||||
#ifdef SHOWCONNECTINFO
|
||||
if (!(cptr->umodes & LISTENER_SSL))
|
||||
FDwrite(fd, REPORT_FIN_DNSC, R_fin_dnsc);
|
||||
#endif /*SHOWCONNECTINFO*/
|
||||
|
||||
#endif /*USENEWDNS*/
|
||||
}
|
||||
|
||||
if (aconf)
|
||||
@@ -1414,6 +1504,13 @@ aClient *add_connection(cptr, fd)
|
||||
highest_fd = fd;
|
||||
local[fd] = acptr;
|
||||
acptr->acpt = cptr;
|
||||
#ifdef USE_SSL
|
||||
if (cptr->umodes & LISTENER_SSL)
|
||||
{
|
||||
ssl_handshake(acptr);
|
||||
acptr->flags |= FLAGS_SSL;
|
||||
}
|
||||
#endif
|
||||
add_client_to_list(acptr);
|
||||
set_non_blocking(acptr->fd, acptr);
|
||||
set_sock_opts(acptr->fd, acptr);
|
||||
@@ -1454,7 +1551,15 @@ static int read_packet(cptr, rfd)
|
||||
#ifdef INET6
|
||||
length = recvfrom(cptr->fd, readbuf, sizeof(readbuf), 0, 0, 0);
|
||||
#else
|
||||
#ifndef USE_SSL
|
||||
length = recv(cptr->fd, readbuf, sizeof(readbuf), 0);
|
||||
#else
|
||||
if (cptr->flags & FLAGS_SSL)
|
||||
length = SSL_read((SSL *)cptr->ssl, readbuf, sizeof(readbuf));
|
||||
else
|
||||
length = recv(cptr->fd, readbuf, sizeof(readbuf), 0);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
cptr->lasttime = now;
|
||||
@@ -1478,11 +1583,7 @@ static int read_packet(cptr, rfd)
|
||||
** For server connections, we process as many as we can without
|
||||
** worrying about the time of day or anything :)
|
||||
*/
|
||||
if (IsServer(cptr) || IsConnecting(cptr) || IsHandshake(cptr)
|
||||
#ifdef CRYPTOIRCD
|
||||
|| IsSecure(cptr)
|
||||
#endif
|
||||
)
|
||||
if (IsServer(cptr) || IsConnecting(cptr) || IsHandshake(cptr))
|
||||
{
|
||||
if (length > 0)
|
||||
if ((done = dopacket(cptr, readbuf, length)))
|
||||
@@ -1516,11 +1617,7 @@ static int read_packet(cptr, rfd)
|
||||
** If it has become registered as a Service or Server
|
||||
** then skip the per-message parsing below.
|
||||
*/
|
||||
if (IsServer(cptr)
|
||||
#ifdef CRYPTOIRCD
|
||||
|| IsSecure(cptr)
|
||||
#endif
|
||||
)
|
||||
if (IsServer(cptr))
|
||||
{
|
||||
dolen = dbuf_get(&cptr->recvQ, readbuf,
|
||||
sizeof(readbuf));
|
||||
@@ -1572,11 +1669,7 @@ static int do_client_queue(aClient *cptr)
|
||||
((cptr->status < STAT_UNKNOWN) || (cptr->since - now < 10)))
|
||||
{
|
||||
/* If it's become registered as a server, just parse the whole block */
|
||||
if (IsServer(cptr)
|
||||
#ifdef CRYPTOIRCD
|
||||
|| IsSecure(cptr)
|
||||
#endif
|
||||
)
|
||||
if (IsServer(cptr))
|
||||
{
|
||||
dolen =
|
||||
dbuf_get(&cptr->recvQ, readbuf, sizeof(readbuf));
|
||||
@@ -1631,8 +1724,15 @@ static int read_packet(aClient *cptr)
|
||||
{
|
||||
errno = 0;
|
||||
|
||||
#ifndef USE_SSL
|
||||
length = recv(cptr->fd, readbuf, sizeof(readbuf), 0);
|
||||
|
||||
#else
|
||||
if (cptr->flags & FLAGS_SSL)
|
||||
length = SSL_read((SSL *)cptr->ssl, readbuf, sizeof(readbuf));
|
||||
else
|
||||
length = recv(cptr->fd, readbuf, sizeof(readbuf), 0);
|
||||
|
||||
#endif
|
||||
cptr->lasttime = now;
|
||||
if (cptr->lasttime > cptr->since)
|
||||
cptr->since = cptr->lasttime;
|
||||
@@ -1694,6 +1794,8 @@ static int read_packet(aClient *cptr)
|
||||
* processed. Also check for connections with data queued and whether we can
|
||||
* write it out.
|
||||
*/
|
||||
|
||||
#define HighscoreFD(x,y) if (x > y) y = x
|
||||
#ifndef USE_POLL
|
||||
#ifdef NO_FDLIST
|
||||
int read_message(delay)
|
||||
@@ -1719,7 +1821,9 @@ int read_message(delay, listp)
|
||||
time_t delay2 = delay, now;
|
||||
u_long usec = 0;
|
||||
int res, length, fd, i;
|
||||
int rhighest_fd = 0;
|
||||
int auth = 0;
|
||||
|
||||
#ifdef SOCKSPORT
|
||||
int socks = 0;
|
||||
#endif
|
||||
@@ -1754,10 +1858,13 @@ int read_message(delay, listp)
|
||||
continue;
|
||||
if (IsLog(cptr))
|
||||
continue;
|
||||
|
||||
HighscoreFD(i, rhighest_fd);
|
||||
#ifdef SOCKSPORT
|
||||
if (DoingSocks(cptr))
|
||||
{
|
||||
socks++;
|
||||
HighscoreFD(cptr->socksfd, rhighest_fd);
|
||||
FD_SET(cptr->socksfd, &read_set);
|
||||
#ifdef _WIN32
|
||||
FD_SET(cptr->socksfd, &excpt_set);
|
||||
@@ -1770,6 +1877,7 @@ int read_message(delay, listp)
|
||||
if (DoingAuth(cptr))
|
||||
{
|
||||
auth++;
|
||||
HighscoreFD(cptr->authfd, rhighest_fd);
|
||||
Debug((DEBUG_NOTICE, "auth on %x %d", cptr, i));
|
||||
FD_SET(cptr->authfd, &read_set);
|
||||
#ifdef _WIN32
|
||||
@@ -1788,6 +1896,7 @@ int read_message(delay, listp)
|
||||
{
|
||||
FD_SET(i, &read_set);
|
||||
}
|
||||
|
||||
else if (!IsMe(cptr))
|
||||
{
|
||||
if (DBufLength(&cptr->recvQ) && delay2 > 2)
|
||||
@@ -1803,24 +1912,32 @@ int read_message(delay, listp)
|
||||
|
||||
#ifdef SOCKSPORT
|
||||
if (me.socksfd >= 0)
|
||||
{
|
||||
FD_SET(me.socksfd, &read_set);
|
||||
HighscoreFD(me.socksfd, rhighest_fd);
|
||||
|
||||
}
|
||||
#endif
|
||||
#ifndef _WIN32
|
||||
if (resfd >= 0)
|
||||
{
|
||||
HighscoreFD(resfd, rhighest_fd);
|
||||
FD_SET(resfd, &read_set);
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
wait.tv_sec = MIN(delay2, delay);
|
||||
wait.tv_usec = usec;
|
||||
#ifdef HPUX
|
||||
nfds = select(FD_SETSIZE, (int *)&read_set, (int *)&write_set,
|
||||
nfds = select(rhighest_fd + 1, (int *)&read_set, (int *)&write_set,
|
||||
0, &wait);
|
||||
#else
|
||||
# ifndef _WIN32
|
||||
nfds = select(FD_SETSIZE, &read_set, &write_set, 0, &wait);
|
||||
nfds = select(rhighest_fd + 1, &read_set, &write_set, 0, &wait);
|
||||
# else
|
||||
nfds =
|
||||
select(FD_SETSIZE, &read_set, &write_set, &excpt_set,
|
||||
select(rhighest_fd + 1, &read_set, &write_set, &excpt_set,
|
||||
&wait);
|
||||
# endif
|
||||
#endif
|
||||
@@ -2030,6 +2147,7 @@ int read_message(delay, listp)
|
||||
{
|
||||
if (!(cptr = local[i]) || IsMe(cptr))
|
||||
continue;
|
||||
|
||||
if (FD_ISSET(i, &write_set))
|
||||
{
|
||||
int write_err = 0;
|
||||
@@ -2511,7 +2629,7 @@ int connect_server(aconf, by, hp)
|
||||
aconf->name, get_client_name(c2ptr, TRUE));
|
||||
if (by && IsPerson(by) && !MyClient(by))
|
||||
sendto_one(by,
|
||||
":%s NOTICE %s :Server %s already present from %s",
|
||||
":%s NOTICE %s :*** Server %s already present from %s",
|
||||
me.name, by->name, aconf->name,
|
||||
get_client_name(c2ptr, TRUE));
|
||||
return -1;
|
||||
@@ -2541,7 +2659,11 @@ int connect_server(aconf, by, hp)
|
||||
#else
|
||||
aconf->ipnum.S_ADDR = 0;
|
||||
#endif
|
||||
#ifndef NEWDNS
|
||||
hp = gethost_byname(s, &lin);
|
||||
#else /*NEWDNS*/
|
||||
hp = newdns_checkcachename(s);
|
||||
#endif /*NEWDNS*/
|
||||
Debug((DEBUG_NOTICE, "co_sv: hp %x ac %x na %s ho %s",
|
||||
hp, aconf, aconf->name, s));
|
||||
if (!hp)
|
||||
@@ -2759,152 +2881,6 @@ static struct SOCKADDR *connect_inet(aconf, cptr, lenp)
|
||||
return (struct SOCKADDR *)&server;
|
||||
}
|
||||
|
||||
/*
|
||||
* The following section of code performs summoning of users to irc.
|
||||
*/
|
||||
#if defined(ENABLE_SUMMON) || defined(ENABLE_USERS)
|
||||
int utmp_open()
|
||||
{
|
||||
#ifdef O_NOCTTY
|
||||
return (open(UTMP, O_RDONLY | O_NOCTTY));
|
||||
#else
|
||||
return (open(UTMP, O_RDONLY));
|
||||
#endif
|
||||
}
|
||||
|
||||
int utmp_read(fd, name, line, host, hlen)
|
||||
int fd, hlen;
|
||||
char *name, *line, *host;
|
||||
{
|
||||
struct utmp ut;
|
||||
while (read(fd, (char *)&ut, sizeof(struct utmp))
|
||||
== sizeof(struct utmp))
|
||||
{
|
||||
strncpyzt(name, ut.ut_name, 9);
|
||||
strncpyzt(line, ut.ut_line, 10);
|
||||
#ifdef USER_PROCESS
|
||||
# if defined(HPUX) || defined(AIX)
|
||||
strncpyzt(host, (ut.ut_host[0]) ? (ut.ut_host) : me.name, 16);
|
||||
# else
|
||||
strncpyzt(host, me.name, 9);
|
||||
# endif
|
||||
if (ut.ut_type == USER_PROCESS)
|
||||
return 0;
|
||||
#else
|
||||
strncpyzt(host, (ut.ut_host[0]) ? (ut.ut_host) : me.name, hlen);
|
||||
if (ut.ut_name[0])
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
int utmp_close(fd)
|
||||
int fd;
|
||||
{
|
||||
return (close(fd));
|
||||
}
|
||||
|
||||
#ifdef ENABLE_SUMMON
|
||||
void summon(who, namebuf, linebuf, chname)
|
||||
aClient *who;
|
||||
char *namebuf, *linebuf, *chname;
|
||||
{
|
||||
static char wrerr[] = "NOTICE %s :Write error. Couldn't summon.";
|
||||
int fd;
|
||||
char line[120];
|
||||
time_t now;
|
||||
struct tm *tp;
|
||||
|
||||
now = TStime();
|
||||
tp = localtime(&now);
|
||||
if (strlen(linebuf) > (size_t)9)
|
||||
{
|
||||
sendto_one(who, "NOTICE %s :Serious fault in SUMMON.",
|
||||
who->name);
|
||||
sendto_one(who,
|
||||
"NOTICE %s :linebuf too long. Inform Administrator",
|
||||
who->name);
|
||||
return;
|
||||
}
|
||||
/*
|
||||
* Following line added to prevent cracking to e.g. /dev/kmem if
|
||||
* UTMP is for some silly reason writable to everyone...
|
||||
*/
|
||||
if ((linebuf[0] != 't' || linebuf[1] != 't' || linebuf[2] != 'y')
|
||||
&& (linebuf[0] != 'c' || linebuf[1] != 'o' || linebuf[2] != 'n')
|
||||
#ifdef HPUX
|
||||
&& (linebuf[0] != 'p' || linebuf[1] != 't' || linebuf[2] != 'y' ||
|
||||
linebuf[3] != '/')
|
||||
#endif
|
||||
)
|
||||
{
|
||||
sendto_one(who,
|
||||
"NOTICE %s :Looks like mere mortal souls are trying to",
|
||||
who->name);
|
||||
sendto_one(who, "NOTICE %s :enter the twilight zone... ",
|
||||
who->name);
|
||||
Debug((0, "%s (%s@%s, nick %s, %s)",
|
||||
"FATAL: major security hack. Notify Administrator !",
|
||||
who->username, who->user->host, who->name, who->info));
|
||||
return;
|
||||
}
|
||||
|
||||
(void)ircsprintf(line, "/dev/%s", linebuf);
|
||||
#ifdef O_NOCTTY
|
||||
if ((fd = open(line, O_WRONLY | O_NDELAY | O_NOCTTY)) == -1)
|
||||
#else
|
||||
if ((fd = open(line, O_WRONLY | O_NDELAY)) == -1)
|
||||
#endif
|
||||
{
|
||||
sendto_one(who,
|
||||
"NOTICE %s :%s seems to have disabled summoning...",
|
||||
who->name, namebuf);
|
||||
return;
|
||||
}
|
||||
#if !defined(O_NOCTTY) && defined(TIOCNOTTY)
|
||||
(void)ioctl(fd, TIOCNOTTY, NULL);
|
||||
#endif
|
||||
|
||||
(void)ircsprintf(line,
|
||||
"\n\r\007Message from IRC_Daemon@%s at %d:%02d\n\r", me.name,
|
||||
tp->tm_hour, tp->tm_min);
|
||||
if (write(fd, line, strlen(line)) != strlen(line))
|
||||
{
|
||||
(void)close(fd);
|
||||
sendto_one(who, wrerr, who->name);
|
||||
return;
|
||||
}
|
||||
(void)strcpy(line, "ircd: You are being summoned to Internet Relay \
|
||||
Chat on\n\r");
|
||||
if (write(fd, line, strlen(line)) != strlen(line))
|
||||
{
|
||||
(void)close(fd);
|
||||
sendto_one(who, wrerr, who->name);
|
||||
return;
|
||||
}
|
||||
/* (void)ircsprintf(line, "ircd: Channel %s, by %s@%s (%s) %s\n\r", */
|
||||
(void)snprintf(line, sizeof(line), "ircd: Channel %s, by %s@%s (%s) %s\n\r",
|
||||
chname, who->user->username, who->user->host, who->name, who->info);
|
||||
if (write(fd, line, strlen(line)) != strlen(line))
|
||||
{
|
||||
(void)close(fd);
|
||||
sendto_one(who, wrerr, who->name);
|
||||
return;
|
||||
}
|
||||
(void)strcpy(line, "ircd: Respond with irc\n\r");
|
||||
if (write(fd, line, strlen(line)) != strlen(line))
|
||||
{
|
||||
(void)close(fd);
|
||||
sendto_one(who, wrerr, who->name);
|
||||
return;
|
||||
}
|
||||
(void)close(fd);
|
||||
sendto_one(who, rpl_str(RPL_SUMMONING), me.name, who->name, namebuf);
|
||||
return;
|
||||
}
|
||||
# endif
|
||||
#endif /* ENABLE_SUMMON */
|
||||
|
||||
/*
|
||||
** find the real hostname for the host running the server (or one which
|
||||
@@ -2978,6 +2954,8 @@ void get_my_name(cptr, name, len)
|
||||
* Called when the fd returned from init_resolver() has been selected for
|
||||
* reading.
|
||||
*/
|
||||
|
||||
#ifndef NEWDNS
|
||||
#ifndef _WIN32
|
||||
static void do_dns_async()
|
||||
#else
|
||||
@@ -3014,11 +2992,7 @@ void do_dns_async(id)
|
||||
{
|
||||
del_queries((char *)cptr);
|
||||
#ifdef SHOWCONNECTINFO
|
||||
#ifndef _WIN32
|
||||
write(cptr->fd, REPORT_FIN_DNS, R_fin_dns);
|
||||
#else
|
||||
send(cptr->fd, REPORT_FIN_DNS, R_fin_dns, 0);
|
||||
#endif
|
||||
sendto_one(cptr, REPORT_FIN_DNS);
|
||||
#endif
|
||||
ClearDNS(cptr);
|
||||
if (!DoingAuth(cptr))
|
||||
@@ -3065,3 +3039,4 @@ void do_dns_async(id)
|
||||
#endif
|
||||
} /* while (hp != NULL) */
|
||||
}
|
||||
#endif /*NEWDNS*/
|
||||
|
||||
+112
-29
@@ -53,6 +53,7 @@ Computing Center and Jarkko Oikarinen";
|
||||
#if defined(PCS) || defined(AIX) || defined(SVR3)
|
||||
#include <time.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
|
||||
ID_Notes("O:line flags in here");
|
||||
#include "h.h"
|
||||
@@ -65,6 +66,10 @@ aSqlineItem *sqline = NULL;
|
||||
aConfItem *conf = NULL;
|
||||
extern char zlinebuf[];
|
||||
extern ircstats IRCstats;
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* remove all conf entries from the client except those which match
|
||||
* the status field mask.
|
||||
@@ -847,10 +852,9 @@ int m_svsnoop(cptr, sptr, parc, parv)
|
||||
int parc;
|
||||
char *parv[];
|
||||
{
|
||||
aConfItem *aconf;
|
||||
aClient *acptr;
|
||||
|
||||
if (!(check_registered(sptr) && IsULine(cptr, sptr) && parc > 2))
|
||||
if (!(check_registered(sptr) && IsULine(sptr) && parc > 2))
|
||||
return 0;
|
||||
/* svsnoop bugfix --binary */
|
||||
if (hunt_server(cptr, sptr, ":%s SVSNOOP %s :%s", 1, parc,
|
||||
@@ -871,9 +875,9 @@ int m_svsnoop(cptr, sptr, parc, parv)
|
||||
UMODE_SADMIN | UMODE_ADMIN);
|
||||
acptr->umodes &=
|
||||
~(UMODE_NETADMIN | UMODE_TECHADMIN | UMODE_CLIENT |
|
||||
UMODE_FLOOD | UMODE_EYES | UMODE_CHATOP | UMODE_WHOIS);
|
||||
UMODE_FLOOD | UMODE_EYES | UMODE_WHOIS);
|
||||
acptr->umodes &=
|
||||
~(UMODE_KIX | UMODE_FCLIENT | UMODE_HIDING | UMODE_CODER |
|
||||
~(UMODE_KIX | UMODE_FCLIENT | UMODE_HIDING |
|
||||
UMODE_DEAF | UMODE_HIDEOPER);
|
||||
acptr->oflag = 0;
|
||||
|
||||
@@ -971,9 +975,11 @@ int rehash(cptr, sptr, sig)
|
||||
*/
|
||||
for (cltmp = NextClass(FirstClass()); cltmp; cltmp = NextClass(cltmp))
|
||||
MaxLinks(cltmp) = -1;
|
||||
#ifndef NEWDNS
|
||||
if (sig != 2)
|
||||
flush_cache();
|
||||
|
||||
#endif /*NEWDNS*/
|
||||
|
||||
(void)initconf(0);
|
||||
close_listeners();
|
||||
/*
|
||||
@@ -1111,24 +1117,10 @@ int initconf(opt)
|
||||
while ((i = dgets(fd, line, sizeof(line) - 1)) > 0)
|
||||
{
|
||||
line[i] = '\0';
|
||||
if ((tmp = (char *)index(line, '\r')))
|
||||
*tmp = 0;
|
||||
if ((tmp = (char *)index(line, '\n')))
|
||||
*tmp = 0;
|
||||
else
|
||||
while (dgets(fd, c, sizeof(c) - 1) > 0)
|
||||
{
|
||||
if ((tmp = (char *)index(c, '\n')))
|
||||
{
|
||||
*tmp = 0;
|
||||
break;
|
||||
}
|
||||
if ((tmp = (char *)index(c, '\r')))
|
||||
{
|
||||
*tmp = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
iCstrip(line);
|
||||
/* while (dgets(fd, c, sizeof(c) - 1) > 0)
|
||||
{
|
||||
} */
|
||||
/*
|
||||
* Do quoting of characters and # detection.
|
||||
*/
|
||||
@@ -1355,7 +1347,24 @@ int initconf(opt)
|
||||
}
|
||||
} else
|
||||
me.serv->numeric = atoi(tmp);
|
||||
}
|
||||
}
|
||||
if ((tmp = getfield(NULL)) == NULL)
|
||||
{
|
||||
break;
|
||||
}
|
||||
if (aconf->status == CONF_CONNECT_SERVER)
|
||||
{
|
||||
char *cp = tmp;
|
||||
|
||||
aconf->options = 0;
|
||||
for (; *cp; cp++)
|
||||
{
|
||||
if (*cp == 'S')
|
||||
aconf->options |= CONNECT_SSL;
|
||||
else if (*cp == 'Z')
|
||||
aconf->options |= CONNECT_ZIP;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
/*
|
||||
@@ -1611,10 +1620,18 @@ static int lookup_confhost(aconf)
|
||||
#else
|
||||
aconf->ipnum.S_ADDR = inet_addr(s);
|
||||
#endif
|
||||
|
||||
#ifndef NEWDNS
|
||||
else if ((hp = gethost_byname(s, &ln)))
|
||||
bcopy(hp->h_addr, (char *)&(aconf->ipnum),
|
||||
sizeof(struct IN_ADDR));
|
||||
|
||||
#else /*NEWDNS*/
|
||||
else if (hp = newdns_checkcachename(s))
|
||||
bcopy(hp->h_addr, (char *)&(aconf->ipnum),
|
||||
sizeof(struct IN_ADDR));
|
||||
#endif /*NEWDNS*/
|
||||
|
||||
|
||||
#ifdef INET6
|
||||
if (AND16(aconf->ipnum.s6_addr) == 255)
|
||||
#else
|
||||
@@ -2089,7 +2106,7 @@ int m_unsqline(cptr, sptr, parc, parv)
|
||||
{
|
||||
aSqlineItem *asqline;
|
||||
|
||||
if (!IsServer(sptr) || parc < 1)
|
||||
if (!IsServer(sptr) || parc < 2)
|
||||
return 0;
|
||||
|
||||
sendto_serv_butone_token(cptr, parv[0], MSG_UNSQLINE, TOK_UNSQLINE,
|
||||
@@ -2326,7 +2343,7 @@ int m_zline(cptr, sptr, parc, parv)
|
||||
char *parv[];
|
||||
{
|
||||
char userhost[512 + 2] = "", *in;
|
||||
int result = 0, uline = 0, i = 0, propo = 0;
|
||||
int uline = 0, i = 0, propo = 0;
|
||||
char *reason, *mask, *server, *person;
|
||||
aClient *acptr;
|
||||
|
||||
@@ -2343,7 +2360,7 @@ int m_zline(cptr, sptr, parc, parv)
|
||||
reason = parv[parc - 1];
|
||||
}
|
||||
|
||||
uline = IsULine(cptr, sptr) ? 1 : 0;
|
||||
uline = IsULine(sptr) ? 1 : 0;
|
||||
|
||||
if (!uline && (!MyConnect(sptr) || !OPCanZline(sptr) || !IsOper(sptr)))
|
||||
{
|
||||
@@ -2533,7 +2550,7 @@ int m_unzline(cptr, sptr, parc, parv)
|
||||
int result = 0, uline = 0, akill = 0;
|
||||
char *mask, *server;
|
||||
|
||||
uline = IsULine(cptr, sptr) ? 1 : 0;
|
||||
uline = IsULine(sptr) ? 1 : 0;
|
||||
|
||||
if (parc < 2)
|
||||
{
|
||||
@@ -2772,3 +2789,69 @@ int advanced_check(char *userhost, int ipstat)
|
||||
#undef IP_WILDS_OK
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
** m_svso - Stskeeps
|
||||
** parv[0] = sender prefix
|
||||
** parv[1] = nick
|
||||
** parv[2] = options
|
||||
*/
|
||||
|
||||
int m_svso(cptr, sptr, parc, parv)
|
||||
aClient *cptr, *sptr;
|
||||
int parc;
|
||||
char *parv[];
|
||||
{
|
||||
aClient *acptr;
|
||||
long fLag;
|
||||
|
||||
if (!IsULine(sptr))
|
||||
return 0;
|
||||
|
||||
if (parc < 3)
|
||||
return 0;
|
||||
|
||||
if (!(acptr = find_client(parv[1], (aClient *)NULL)))
|
||||
return 0;
|
||||
|
||||
if (!MyClient(acptr))
|
||||
{
|
||||
sendto_one(acptr, ":%s SVSO %s %s", parv[0], parv[1], parv[2]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (*parv[2] == '+')
|
||||
{
|
||||
int *i, flag;
|
||||
char *m = NULL;
|
||||
for (m = (parv[2] + 1); *m; m++)
|
||||
{
|
||||
for (i = oper_access; flag = *i; i += 2)
|
||||
{
|
||||
if (*m == (char) *(i + 1))
|
||||
{
|
||||
acptr->oflag |= flag;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (*parv[2] == '-')
|
||||
{
|
||||
fLag = acptr->umodes;
|
||||
if (IsOper(acptr))
|
||||
IRCstats.operators--;
|
||||
acptr->umodes &=
|
||||
~(UMODE_OPER | UMODE_LOCOP | UMODE_HELPOP | UMODE_SERVICES |
|
||||
UMODE_SADMIN | UMODE_ADMIN);
|
||||
acptr->umodes &=
|
||||
~(UMODE_NETADMIN | UMODE_TECHADMIN | UMODE_CLIENT |
|
||||
UMODE_FLOOD | UMODE_EYES | UMODE_WHOIS);
|
||||
acptr->umodes &=
|
||||
~(UMODE_KIX | UMODE_FCLIENT | UMODE_HIDING |
|
||||
UMODE_DEAF | UMODE_HIDEOPER);
|
||||
acptr->oflag = 0;
|
||||
send_umode_out(acptr, acptr, fLag);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+4
-7
@@ -69,9 +69,6 @@ char serveropts[] = {
|
||||
#ifdef NPATH
|
||||
'N',
|
||||
#endif
|
||||
#ifdef ENABLE_SUMMON
|
||||
'S',
|
||||
#endif
|
||||
#ifdef ENABLE_USERS
|
||||
'U',
|
||||
#endif
|
||||
@@ -102,9 +99,6 @@ char serveropts[] = {
|
||||
#ifdef USE_POLL
|
||||
'P',
|
||||
#endif
|
||||
#ifdef CRYPTOIRCD
|
||||
'r',
|
||||
#endif
|
||||
/* we are a stable ircd */
|
||||
'S',
|
||||
'\0'
|
||||
@@ -495,8 +489,11 @@ void count_memory(cptr, nick)
|
||||
me.name, RPL_STATSDEBUG, nick, fl, fl * sizeof(Link),
|
||||
flinks, flinks * sizeof(Link));
|
||||
|
||||
#ifndef NEWDNS
|
||||
rm = cres_mem(cptr);
|
||||
|
||||
#else /*NEWDNS*/
|
||||
rm = 0;
|
||||
#endif /*NEWDNS*/
|
||||
tot = totww + totch + totcl + com + cl * sizeof(aClass) + db + rm;
|
||||
tot += fl * sizeof(Link);
|
||||
tot += sizeof(aHashEntry) * U_MAX;
|
||||
|
||||
+10
-14
@@ -246,8 +246,8 @@ static char *replies[] = {
|
||||
#else
|
||||
/* 212 RPL_STATSCOMMANDS */ ":%s 212 %s %s %u %u",
|
||||
#endif
|
||||
/* 213 RPL_STATSCLINE */ ":%s 213 %s %c %s * %s %d %d",
|
||||
/* 214 RPL_STATSOLDNLINE */ ":%s 214 %s %c %s * %s %d %d",
|
||||
/* 213 RPL_STATSCLINE */ ":%s 213 %s %c %s * %s %d %d %s",
|
||||
/* 214 RPL_STATSOLDNLINE */ ":%s 214 %s %c %s * %s %d %d %s",
|
||||
/* 215 RPL_STATSILINE */ ":%s 215 %s %c %s * %s %d %d",
|
||||
/* 216 RPL_STATSKLINE */ ":%s 216 %s %c %s %s %s %d %d",
|
||||
/* 217 RPL_STATSQLINE */ ":%s 217 %s %c %s %s %s %d %d",
|
||||
@@ -346,7 +346,7 @@ static char *replies[] = {
|
||||
/* 310 RPL_WHOISHELPOP */ ":%s 310 %s %s :is available for help.",
|
||||
/* 311 RPL_WHOISUSER */ ":%s 311 %s %s %s %s * :%s",
|
||||
/* 312 RPL_WHOISSERVER */ ":%s 312 %s %s %s :%s",
|
||||
/* 313 RPL_WHOISOPERATOR */ ":%s 313 %s %s :is %s on %s",
|
||||
/* 313 RPL_WHOISOPERATOR */ ":%s 313 %s %s :is %s",
|
||||
/* 314 RPL_WHOWASUSER */ ":%s 314 %s %s %s %s * :%s",
|
||||
/* 315 RPL_ENDOFWHO */ ":%s 315 %s %s :End of /WHO list.",
|
||||
/* 316 */ NULL, /* Used */
|
||||
@@ -355,7 +355,11 @@ static char *replies[] = {
|
||||
/* 319 RPL_WHOISCHANNELS */ ":%s 319 %s %s :%s",
|
||||
/* 320 RPL_WHOISSPECIAL */ ":%s 320 %s %s :%s",
|
||||
/* 321 RPL_LISTSTART */ ":%s 321 %s Channel :Users Name",
|
||||
#ifndef LIST_SHOW_MODES
|
||||
/* 322 RPL_LIST */ ":%s 322 %s %s %d :%s",
|
||||
#else
|
||||
/* 322 RPL_LIST */ ":%s 322 %s %s %d :%s %s",
|
||||
#endif
|
||||
/* 323 RPL_LISTEND */ ":%s 323 %s :End of /LIST",
|
||||
/* 324 RPL_CHANNELMODEIS */ ":%s 324 %s %s %s %s",
|
||||
/* 325 */ NULL,
|
||||
@@ -485,17 +489,9 @@ static char *replies[] = {
|
||||
/* 442 ERR_NOTONCHANNEL */ ":%s 442 %s %s :You're not on that channel",
|
||||
/* 443 ERR_USERONCHANNEL */ ":%s 443 %s %s %s :is already on channel",
|
||||
/* 444 ERR_NOLOGIN */ ":%s 444 %s %s :User not logged in",
|
||||
#ifndef ENABLE_SUMMON
|
||||
/* 445 ERR_SUMMONDISABLED */ ":%s 447 %s :SUMMON has been disabled",
|
||||
#else
|
||||
/* 445 */ NULL,
|
||||
#endif
|
||||
#ifndef ENABLE_USERS
|
||||
/* 445 ERR_SUMMONDISABLED */ ":%s 445 %s :SUMMON has been disabled",
|
||||
/* 446 ERR_USERSDISABLED */ ":%s 446 %s :USERS has been disabled",
|
||||
#else
|
||||
/* 446 */ NULL,
|
||||
#endif
|
||||
/* 447 */ NULL,
|
||||
/* 447 ERR_NONICKCHANGE */ ":%s 447 %s :Can not change nickname while on %s (+N)",
|
||||
/* 448 */ NULL,
|
||||
/* 449 */ NULL,
|
||||
/* 450 */ NULL,
|
||||
@@ -574,7 +570,7 @@ static char *replies[] = {
|
||||
/* 515 */ NULL,
|
||||
/* 516 */ NULL,
|
||||
/* 517 */ NULL,
|
||||
/* 518 518 */ ":%s 518 %s :Cannot invite (+I) at channel",
|
||||
/* 518 518 */ ":%s 518 %s :Cannot invite (+V) at channel",
|
||||
/* 519 519 */ ":%s 519 %s :Cannot join channel (Admin only)",
|
||||
/* 520 520 */ ":%s 520 %s :Cannot join channel (IRCops only)",
|
||||
/* 521 ERR_LISTSYNTAX */ ":%s 521 %s Bad list syntax, type /quote list ? or /raw list ?",
|
||||
|
||||
+9
-9
@@ -33,9 +33,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#ifndef _WIN32
|
||||
#include <utmp.h>
|
||||
#else
|
||||
#ifdef _WIN32
|
||||
#include <io.h>
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
@@ -72,7 +70,7 @@ aFline *dcc_isforbidden(cptr, sptr, target, filename)
|
||||
if (!flines || !target || !filename)
|
||||
return NULL;
|
||||
|
||||
if (IsOper(sptr) || IsULine(cptr, sptr))
|
||||
if (IsOper(sptr) || IsULine(sptr))
|
||||
return NULL;
|
||||
|
||||
if (IsOper(target))
|
||||
@@ -84,7 +82,9 @@ aFline *dcc_isforbidden(cptr, sptr, target, filename)
|
||||
for (p = flines; p; p = p->next)
|
||||
{
|
||||
if (!match(p->mask, filename))
|
||||
{
|
||||
return p;
|
||||
}
|
||||
}
|
||||
|
||||
/* no target found */
|
||||
@@ -405,7 +405,7 @@ int m_svsfline(aClient *cptr, aClient *sptr, int parc, char *parv[])
|
||||
return 0;
|
||||
if (!dcc_find(parv[2]))
|
||||
dcc_add_fline(parv[2], parv[3], 1);
|
||||
if (IsULine(cptr, sptr))
|
||||
if (IsULine(sptr))
|
||||
sendto_serv_butone(cptr, ":%s %s + %s :%s",
|
||||
sptr->name,
|
||||
(IsToken(cptr) ? TOK_SVSFLINE : MSG_SVSFLINE),
|
||||
@@ -414,7 +414,7 @@ int m_svsfline(aClient *cptr, aClient *sptr, int parc, char *parv[])
|
||||
}
|
||||
case '-':
|
||||
{
|
||||
if (!IsULine(cptr, sptr))
|
||||
if (!IsULine(sptr))
|
||||
return 0;
|
||||
if (parc < 3)
|
||||
return 0;
|
||||
@@ -426,7 +426,7 @@ int m_svsfline(aClient *cptr, aClient *sptr, int parc, char *parv[])
|
||||
}
|
||||
case '*':
|
||||
{
|
||||
if (!IsULine(cptr, sptr))
|
||||
if (!IsULine(sptr))
|
||||
return 0;
|
||||
dcc_wipe_services();
|
||||
sendto_serv_butone(cptr, ":%s %s *", sptr->name,
|
||||
@@ -448,7 +448,7 @@ int channel_canjoin(sptr, name)
|
||||
|
||||
if (IsOper(sptr))
|
||||
return 1;
|
||||
if (IsULine(sptr, sptr))
|
||||
if (IsULine(sptr))
|
||||
return 1;
|
||||
if (!crlines)
|
||||
return 1;
|
||||
@@ -573,7 +573,7 @@ void cr_report(sptr)
|
||||
aClient *sptr;
|
||||
{
|
||||
aCRline *tmp;
|
||||
char *filemask, *reason;
|
||||
char *filemask;
|
||||
char a;
|
||||
|
||||
if (crlines)
|
||||
|
||||
+96
-120
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Unreal Internet Relay Chat Daemon, src/s_kline.c
|
||||
* (C) 1999-2000 Carsten Munk (Techie/Stskeeps) <cmunk@toybox.flirt.org>
|
||||
* (C) 1999-2000 Carsten Munk (Techie/Stskeeps) <stskeeps@tspre.org>
|
||||
* File to take care of dynamic K:/G:/Z: lines
|
||||
*
|
||||
*
|
||||
@@ -34,9 +34,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#ifndef _WIN32
|
||||
#include <utmp.h>
|
||||
#else
|
||||
#ifdef _WIN32
|
||||
#include <io.h>
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
@@ -262,91 +260,106 @@ int find_tkline_match(cptr, xx)
|
||||
int is_ip;
|
||||
char msge[1024];
|
||||
char gmt2[256];
|
||||
|
||||
int points = 0;
|
||||
if (IsServer(cptr) || IsMe(cptr))
|
||||
return -1;
|
||||
|
||||
|
||||
nowtime = TStime();
|
||||
chost = cptr->sockhost;
|
||||
cname = (xx != 2) ? cptr->user->username : NULL;
|
||||
|
||||
cname = cptr->user ? cptr->user->username : "unknown";
|
||||
cip = (char *)inet_ntoa(cptr->ip);
|
||||
|
||||
|
||||
for (lp = tklines; lp; lp = lp->next)
|
||||
{
|
||||
if (*lp->hostmask >= '0' && *lp->hostmask <= '9')
|
||||
is_ip = 1;
|
||||
points = 0;
|
||||
|
||||
if (!match(lp->usermask, cname) && !match(lp->hostmask, chost))
|
||||
points = 1;
|
||||
if (!match(lp->usermask, cname) && !match(lp->hostmask, cip))
|
||||
points = 1;
|
||||
if (points == 1)
|
||||
break;
|
||||
else
|
||||
is_ip = 0;
|
||||
points = 0;
|
||||
}
|
||||
|
||||
if (xx != 2 ? is_ip == 0 ? (!match(lp->hostmask, chost)
|
||||
&& !match(lp->usermask, cname)) :
|
||||
(!match(lp->hostmask, chost) || !match(lp->hostmask, cip))
|
||||
: !match(lp->hostmask, chost))
|
||||
if (points != 1)
|
||||
return -1;
|
||||
|
||||
if ((lp->type & TKL_KILL) && (xx != 2))
|
||||
{
|
||||
if (lp->type & TKL_GLOBAL)
|
||||
{
|
||||
if (lp->type & TKL_KILL)
|
||||
{
|
||||
if (lp->type & TKL_GLOBAL)
|
||||
{
|
||||
ircstp->is_ref++;
|
||||
if (lp->expire_at)
|
||||
{
|
||||
sendto_one(cptr,
|
||||
":%s NOTICE %s :*** You are banned for %li seconds (%s)",
|
||||
me.name, cptr->name,
|
||||
lp->expire_at - TStime(),
|
||||
lp->reason);
|
||||
ircsprintf(msge,
|
||||
"User has been banned from %s (%s)",
|
||||
ircnetwork, lp->reason);
|
||||
return (exit_client(cptr, cptr, &me,
|
||||
msge));
|
||||
}
|
||||
else
|
||||
{
|
||||
sendto_one(cptr,
|
||||
":%s NOTICE %s :*** You have been banned permanently (%s)",
|
||||
me.name, cptr->name,
|
||||
lp->reason);
|
||||
ircsprintf(msge,
|
||||
"User has been permanently banned from %s (%s)",
|
||||
ircnetwork, lp->reason);
|
||||
return(exit_client(cptr, cptr, &me, msge));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ircstp->is_ref++;
|
||||
if (lp->expire_at)
|
||||
{
|
||||
sendto_one(cptr,
|
||||
":%s NOTICE %s :*** You are banned for %li seconds (%s)",
|
||||
me.name,
|
||||
cptr->name,
|
||||
lp->expire_at - TStime(),
|
||||
lp->reason);
|
||||
ircsprintf(msge, "User has banned (%s)",
|
||||
me.name, lp->reason);
|
||||
return (exit_client(cptr, cptr, &me,
|
||||
msge));
|
||||
}
|
||||
else
|
||||
{
|
||||
sendto_one(cptr,
|
||||
":%s NOTICE %s :*** You have been permanently banned (%s)",
|
||||
me.name,
|
||||
cptr->name,
|
||||
lp->reason);
|
||||
ircsprintf(msge, "User has been permanently banned (%s)",
|
||||
me.name, lp->reason);
|
||||
return (exit_client(cptr, cptr, &me,
|
||||
msge));
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (lp->type & (TKL_ZAP))
|
||||
ircstp->is_ref++;
|
||||
sendto_one(cptr,
|
||||
":%s NOTICE %s :*** You are %s from %s (%s)",
|
||||
me.name, cptr->name,
|
||||
(lp->expire_at ? "banned" : "permanently banned"),
|
||||
ircnetwork, lp->reason);
|
||||
ircsprintf(msge, "User has been %s from %s (%s)",
|
||||
(lp->expire_at ? "banned" : "permanently banned"),
|
||||
ircnetwork, lp->reason);
|
||||
return (exit_client(cptr, cptr, &me,
|
||||
msge));
|
||||
}
|
||||
else
|
||||
{
|
||||
ircstp->is_ref++;
|
||||
sendto_one(cptr,
|
||||
":%s NOTICE %s :*** You are %s from %s (%s)",
|
||||
me.name, cptr->name,
|
||||
(lp->expire_at ? "banned" : "permanently banned"),
|
||||
me.name, lp->reason);
|
||||
ircsprintf(msge, "User is %s (%s)",
|
||||
(lp->expire_at ? "banned" : "permanently banned"),
|
||||
lp->reason);
|
||||
return (exit_client(cptr, cptr, &me,
|
||||
msge));
|
||||
|
||||
}
|
||||
}
|
||||
if (lp->type & TKL_ZAP)
|
||||
{
|
||||
ircstp->is_ref++;
|
||||
ircsprintf(msge,
|
||||
"Z:lined (%s)",lp->reason);
|
||||
return exit_client(cptr, cptr, &me, msge);
|
||||
}
|
||||
if (lp->type & (TKL_SHUN))
|
||||
{
|
||||
if (IsShunned(cptr))
|
||||
return -1;
|
||||
if (IsAdmin(cptr))
|
||||
return -1;
|
||||
SetShunned(cptr);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
int find_tkline_match_zap(cptr)
|
||||
aClient *cptr;
|
||||
{
|
||||
aTKline *lp;
|
||||
char *cip;
|
||||
TS nowtime;
|
||||
char msge[1024];
|
||||
|
||||
if (IsServer(cptr) || IsMe(cptr))
|
||||
return -1;
|
||||
|
||||
|
||||
nowtime = TStime();
|
||||
cip = (char *)inet_ntoa(cptr->ip);
|
||||
|
||||
for (lp = tklines; lp; lp = lp->next)
|
||||
{
|
||||
if (lp->type & TKL_ZAP)
|
||||
{
|
||||
if (!match(lp->hostmask, cip))
|
||||
{
|
||||
ircstp->is_ref++;
|
||||
ircsprintf(msge,
|
||||
@@ -360,39 +373,6 @@ int find_tkline_match(cptr, xx)
|
||||
strcpy(zlinebuf, msge);
|
||||
return (1);
|
||||
}
|
||||
else if (lp->type & (TKL_SHUN))
|
||||
{
|
||||
if (IsShunned(cptr))
|
||||
return -1;
|
||||
if (IsAdmin(cptr))
|
||||
return -1;
|
||||
SetShunned(cptr);
|
||||
#ifndef __OpenBSD__
|
||||
strncpy(gmt2,
|
||||
asctime(gmtime((clock_t *) & lp->
|
||||
expire_at)), sizeof(gmt2));
|
||||
|
||||
#else
|
||||
strncpy(gmt2,
|
||||
asctime(gmtime((TS *)&lp->expire_at)),
|
||||
sizeof(gmt2));
|
||||
|
||||
#endif
|
||||
gmt2[strlen(gmt2) - 1] = '\0';
|
||||
#ifdef SHUN_NOTICES
|
||||
if (lp->expire_at)
|
||||
sendto_one(cptr,
|
||||
":%s NOTICE %s :*** You have been shunned by %s until %s (Reason: %s)",
|
||||
me.name, cptr->name, lp->setby,
|
||||
gmt2, lp->reason);
|
||||
else
|
||||
sendto_one(cptr,
|
||||
":%s NOTICE %s :*** You have been shunned permanently by %s (Reason: %s)",
|
||||
me.name, cptr->name, lp->setby,
|
||||
lp->reason);
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
@@ -401,19 +381,15 @@ int find_tkline_match(cptr, xx)
|
||||
|
||||
int tkl_sweep()
|
||||
{
|
||||
/* just sweeps net for people that should be killed */
|
||||
/* just sweeps local for people that should be killed */
|
||||
aClient *acptr;
|
||||
long i, i1;
|
||||
long i;
|
||||
|
||||
tkl_check_expire();
|
||||
for (i1 = 0; i1 <= 5; i1++)
|
||||
for (i = 0; i <= (MAXCONNECTIONS - 1); i++)
|
||||
{
|
||||
for (i = 0; i <= (MAXCONNECTIONS - 1); i++)
|
||||
{
|
||||
if (acptr = local[i])
|
||||
if (MyClient(acptr))
|
||||
find_tkline_match(acptr, 0);
|
||||
}
|
||||
if (acptr = local[i])
|
||||
find_tkline_match(acptr, 0);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
@@ -639,7 +615,7 @@ int m_tkl(cptr, sptr, parc, parv)
|
||||
("Permanent %s added for %s@%s on %s GMT (from %s: %s)",
|
||||
txt, parv[3], parv[4], gmt, parv[5], parv[8]);
|
||||
}
|
||||
tkl_sweep();
|
||||
loop.do_tkl_sweep = 1;
|
||||
if (type & TKL_GLOBAL)
|
||||
{
|
||||
sendto_serv_butone(cptr,
|
||||
@@ -882,7 +858,7 @@ int m_gline(aClient *cptr, aClient *sptr, int parc, char *parv[])
|
||||
}
|
||||
if (whattodo == 0)
|
||||
{
|
||||
secs = atol(parv[2]);
|
||||
secs = atime(parv[2]);
|
||||
if (secs < 0)
|
||||
{
|
||||
sendto_one(sptr,
|
||||
@@ -1088,7 +1064,7 @@ int m_shun(aClient *cptr, aClient *sptr, int parc, char *parv[])
|
||||
}
|
||||
if (whattodo == 0)
|
||||
{
|
||||
secs = atol(parv[2]);
|
||||
secs = atime(parv[2]);
|
||||
if (secs < 0)
|
||||
{
|
||||
sendto_one(sptr,
|
||||
|
||||
+25
-5
@@ -53,6 +53,7 @@ Computing Center and Jarkko Oikarinen";
|
||||
#endif
|
||||
#include "h.h"
|
||||
#include "channel.h"
|
||||
#include <string.h>
|
||||
|
||||
#ifndef NO_FDLIST
|
||||
extern fdlist serv_fdlist;
|
||||
@@ -118,6 +119,25 @@ char *date(clock)
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
||||
char *convert_time (time_t ltime)
|
||||
{
|
||||
unsigned long days = 0,hours = 0,minutes = 0,seconds = 0;
|
||||
static char buffer[40];
|
||||
|
||||
|
||||
*buffer = '\0';
|
||||
seconds = ltime % 60;
|
||||
ltime = (ltime - seconds) / 60;
|
||||
minutes = ltime%60;
|
||||
ltime = (ltime - minutes) / 60;
|
||||
hours = ltime % 24;
|
||||
days = (ltime - hours) / 24;
|
||||
ircsprintf(buffer, "%ludays %luhours %lumonths %lusecs", days, hours, minutes, seconds);
|
||||
return(*buffer ? buffer : "");
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Fixes a string so that the first white space found becomes an end of
|
||||
* string marker (`\-`). returns the 'fixed' string or "*" if the string
|
||||
@@ -429,11 +449,11 @@ int exit_client(cptr, sptr, from, comment)
|
||||
current_load_data.local_count--;
|
||||
/* Clean out list and watch structures -Donwulff */
|
||||
hash_del_notify_list(sptr);
|
||||
if (sptr->lopt)
|
||||
if (sptr->user && sptr->user->lopt)
|
||||
{
|
||||
free_str_list(sptr->lopt->yeslist);
|
||||
free_str_list(sptr->lopt->nolist);
|
||||
MyFree(sptr->lopt);
|
||||
free_str_list(sptr->user->lopt->yeslist);
|
||||
free_str_list(sptr->user->lopt->nolist);
|
||||
MyFree(sptr->user->lopt);
|
||||
}
|
||||
}
|
||||
update_load();
|
||||
@@ -694,7 +714,7 @@ static void exit_one_client_backend(cptr, sptr, from, comment, split)
|
||||
sendto_common_channels(sptr, ":%s QUIT :%s",
|
||||
sptr->name, comment);
|
||||
|
||||
if (!IsULine(cptr, sptr) && !split)
|
||||
if (!IsULine(sptr) && !split)
|
||||
if (sptr->user->server != me_hash)
|
||||
sendto_umode(UMODE_FCLIENT,
|
||||
"*** Notice -- Client exiting at %s: %s!%s@%s (%s)",
|
||||
|
||||
+4
-3
@@ -30,6 +30,7 @@ Computing Center and Jarkko Oikarinen";
|
||||
#include "sys.h"
|
||||
#include "numeric.h"
|
||||
#include "h.h"
|
||||
#include <string.h>
|
||||
|
||||
extern char backupbuf[];
|
||||
static char buffer[1024];
|
||||
@@ -66,13 +67,13 @@ int do_numeric(numeric, cptr, sptr, parc, parv)
|
||||
if (numeric < 100)
|
||||
numeric += 100;
|
||||
|
||||
if (numeric == ERR_NOTONCHANNEL)
|
||||
/* if (numeric == ERR_NOTONCHANNEL)
|
||||
if (!MyClient(sptr) && IsServer(sptr))
|
||||
{
|
||||
sendto_umode(UMODE_EYES, "Recieved ERR_NOTONCHANNEL from remote server %s. Possible desynch, contact UnrealIRCd Team (%s)",
|
||||
sptr->name, backupbuf);
|
||||
}
|
||||
|
||||
*/
|
||||
/*
|
||||
** Prepare the parameter portion of the message into 'buffer'.
|
||||
** (Because the buffer is twice as large as the message buffer
|
||||
@@ -128,7 +129,7 @@ int do_numeric(numeric, cptr, sptr, parc, parv)
|
||||
sendto_prefix_one(acptr, sptr, ":%s %d %s%s",
|
||||
parv[0], numeric, nick, buffer);
|
||||
}
|
||||
else if ((acptr = find_server(nick, (aClient *)NULL)))
|
||||
else if ((acptr = find_server_quick(nick)))
|
||||
{
|
||||
if (!IsMe(acptr) && acptr->from != cptr)
|
||||
sendto_prefix_one(acptr, sptr, ":%s %d %s%s",
|
||||
|
||||
+259
-257
@@ -25,7 +25,7 @@
|
||||
static char sccsid[] =
|
||||
"@(#)s_serv.c 2.55 2/7/94 (C) 1988 University of Oulu, Computing Center and Jarkko Oikarinen";
|
||||
#endif
|
||||
|
||||
#define AllocCpy(x,y) x = (char *) MyMalloc(strlen(y) + 1); strcpy(x,y)
|
||||
|
||||
#include "struct.h"
|
||||
#include "common.h"
|
||||
@@ -40,14 +40,12 @@ static char sccsid[] =
|
||||
#endif
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#ifndef _WIN32
|
||||
#include <utmp.h>
|
||||
#else
|
||||
#ifdef _WIN32
|
||||
#include <io.h>
|
||||
#endif
|
||||
#include <time.h>
|
||||
#include "h.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
||||
static char buf[BUFSIZE];
|
||||
@@ -546,6 +544,20 @@ int m_protoctl(cptr, sptr, parc, parv)
|
||||
proto, cptr->name));
|
||||
SetSJ3(cptr);
|
||||
}
|
||||
else if (strcmp(s, "SJB64") == 0)
|
||||
{
|
||||
#ifndef PROTOCTL_MADNESS
|
||||
if (remove)
|
||||
{
|
||||
cptr->proto &=~ PROTO_SJB64;
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
Debug((DEBUG_ERROR,
|
||||
"Chose protocol %s for link %s",
|
||||
proto, cptr->name));
|
||||
cptr->proto |= PROTO_SJB64;
|
||||
}
|
||||
/*
|
||||
* Add other protocol extensions here, with proto
|
||||
* containing the base option, and options containing
|
||||
@@ -575,12 +587,10 @@ int m_server(cptr, sptr, parc, parv)
|
||||
{
|
||||
char *ch;
|
||||
int i;
|
||||
char info[REALLEN + 61], *inpath, *host, *encr, *f;
|
||||
char pp[512];
|
||||
aClient *acptr, *bcptr;
|
||||
char info[REALLEN + 61], *inpath, *host, *encr;
|
||||
aClient *acptr, *bcptr, *ocptr;
|
||||
aConfItem *aconf, *cconf;
|
||||
int hop, numeric = 0;
|
||||
int ts = 0;
|
||||
char *flags = NULL, *protocol = NULL, *inf = NULL;
|
||||
|
||||
info[0] = '\0';
|
||||
@@ -590,20 +600,25 @@ int m_server(cptr, sptr, parc, parv)
|
||||
sendto_one(cptr, "ERROR :No servername");
|
||||
return 0;
|
||||
}
|
||||
if (MyConnect(sptr) && (sptr->acpt->umodes & LISTENER_CLIENTSONLY))
|
||||
{
|
||||
return exit_client(cptr, sptr, sptr, "This port is for clients only");
|
||||
}
|
||||
|
||||
hop = 0;
|
||||
host = parv[1];
|
||||
if (parc > 4)
|
||||
{
|
||||
numeric = atoi(parv[3]);
|
||||
hop = atoi(parv[2]);
|
||||
numeric = TS2ts(parv[3]);
|
||||
hop = TS2ts(parv[2]);
|
||||
(void)strncpy(info, parv[4], REALLEN + 60);
|
||||
info[REALLEN] = '\0';
|
||||
info[REALLEN + 60] = '\0';
|
||||
}
|
||||
else if (parc > 3 && atoi(parv[2]))
|
||||
else if (parc > 3 && TS2ts(parv[2]))
|
||||
{
|
||||
hop = atoi(parv[2]);
|
||||
hop = TS2ts(parv[2]);
|
||||
(void)strncpy(info, parv[3], REALLEN + 60);
|
||||
info[REALLEN] = '\0';
|
||||
info[REALLEN + 60] = '\0';
|
||||
}
|
||||
/*
|
||||
We do not support "SERVER server :desc" anymore, this is an ugly hack
|
||||
@@ -637,9 +652,10 @@ int m_server(cptr, sptr, parc, parv)
|
||||
{
|
||||
sendto_one(sptr, "ERROR :Bogus server name (%s)",
|
||||
sptr->name, host);
|
||||
sendto_ops
|
||||
("WARNING: Bogus server name (%s) from %s (maybe just a fishy client)",
|
||||
sendto_umode
|
||||
(UMODE_JUNK,"WARNING: Bogus server name (%s) from %s (maybe just a fishy client)",
|
||||
host, get_client_name(cptr, TRUE));
|
||||
|
||||
sptr->since += 7;
|
||||
return 0;
|
||||
}
|
||||
@@ -706,37 +722,26 @@ int m_server(cptr, sptr, parc, parv)
|
||||
}
|
||||
/* bzero(cptr->passwd, sizeof(cptr->passwd)); */
|
||||
}
|
||||
if ((acptr = find_name(host, NULL)))
|
||||
if ((acptr = find_server/*_quickx*/(host, NULL)))
|
||||
{
|
||||
aClient *ocptr;
|
||||
|
||||
/*
|
||||
* This link is trying feed me a server that I already have
|
||||
* access through another path -- multiple paths not accepted
|
||||
* currently, kill this link immeatedly!!
|
||||
*
|
||||
* Rather than KILL the link which introduced it, KILL the
|
||||
* youngest of the two links. -avalon
|
||||
*/
|
||||
acptr = acptr->from;
|
||||
ocptr = (cptr->firsttime > acptr->firsttime) ? acptr : cptr;
|
||||
acptr = (cptr->firsttime > acptr->firsttime) ? cptr : acptr;
|
||||
sendto_one(acptr, "ERROR :Server %s already exists from %s",
|
||||
host, (ocptr->from ? ocptr->from->name : "<nobody>"));
|
||||
sendto_ops
|
||||
("Link %s cancelled, server %s already exists from %s",
|
||||
get_client_name(acptr, TRUE), host,
|
||||
(ocptr->from ? ocptr->from->name : "<nobody>"));
|
||||
return exit_client(acptr, acptr, acptr, "Server Exists");
|
||||
ocptr = (cptr->firsttime > acptr->firsttime) ? acptr : cptr;
|
||||
acptr = (cptr->firsttime > acptr->firsttime) ? cptr : acptr;
|
||||
sendto_one(acptr,"ERROR :Server %s already exists from %s",
|
||||
host,
|
||||
(ocptr->from ? ocptr->from->name : "<nobody>"));
|
||||
sendto_ops("Link %s cancelled, server %s already exists from %s",
|
||||
get_client_name(acptr, TRUE), host,
|
||||
(ocptr->from ? ocptr->from->name : "<nobody>"));
|
||||
return exit_client(acptr, acptr, acptr, "Server Exists");
|
||||
}
|
||||
|
||||
if ((acptr = find_client(host, NULL)))
|
||||
/* if ((acptr = find_client(host, NULL)))
|
||||
{
|
||||
/*
|
||||
** Server trying to use the same name as a person. Would
|
||||
** cause a fair bit of confusion. Enough to make it hellish
|
||||
** for a while and servers to send stuff to the wrong place.
|
||||
*/
|
||||
sendto_one(cptr, "ERROR :Nickname %s already exists!", host);
|
||||
sendto_locfailops
|
||||
("Link %s cancelled: Server/nick collision on %s", inpath,
|
||||
@@ -745,7 +750,7 @@ int m_server(cptr, sptr, parc, parv)
|
||||
":%s GLOBOPS :Link %s cancelled: Server/nick collision on %s",
|
||||
parv[0], inpath, host);
|
||||
return exit_client(cptr, cptr, cptr, "Nick as Server");
|
||||
}
|
||||
} */
|
||||
|
||||
if (IsServer(cptr))
|
||||
{
|
||||
@@ -832,7 +837,7 @@ int m_server(cptr, sptr, parc, parv)
|
||||
/* Taken from bahamut makes it so all servers behind a U:lined
|
||||
* server are also U:lined, very helpful if HIDE_ULINES is on
|
||||
*/
|
||||
if (IsULine(sptr, sptr)
|
||||
if (IsULine(sptr)
|
||||
|| (find_uline(cptr->confs, acptr->name)))
|
||||
acptr->flags |= FLAGS_ULINE;
|
||||
add_server_to_table(acptr);
|
||||
@@ -1111,7 +1116,8 @@ int m_server_estab(cptr)
|
||||
sendto_ops("Access denied (passwd mismatch) %s", inpath);
|
||||
return exit_client(cptr, cptr, cptr, "Bad Password");
|
||||
}
|
||||
bzero(cptr->passwd, sizeof(cptr->passwd));
|
||||
if (cptr->passwd)
|
||||
MyFree(cptr->passwd);
|
||||
#ifndef HUB
|
||||
for (i = 0; i <= highest_fd; i++)
|
||||
if (local[i] && IsServer(local[i]))
|
||||
@@ -1181,9 +1187,26 @@ int m_server_estab(cptr)
|
||||
nextping = TStime();
|
||||
(void)find_or_add(cptr->name);
|
||||
if (TRUEHUB == 1)
|
||||
sendto_serv_butone(&me,
|
||||
":%s GLOBOPS :Link with %s established.", me.name, inpath);
|
||||
sendto_locfailops("Link with %s established.", inpath);
|
||||
{
|
||||
#ifdef USE_SSL
|
||||
if (IsSecure(cptr))
|
||||
sendto_serv_butone(&me,
|
||||
":%s GLOBOPS :Secure link with %s established (%s).", me.name,
|
||||
inpath, (char *) ssl_get_cipher((SSL *)cptr->ssl));
|
||||
else
|
||||
#endif
|
||||
sendto_serv_butone(&me,
|
||||
":%s GLOBOPS :Link with %s established.", me.name,
|
||||
inpath);
|
||||
}
|
||||
#ifdef USE_SSL
|
||||
if (IsSecure(cptr))
|
||||
sendto_locfailops("Secure Link with %s established (%s).", inpath,
|
||||
(char *) ssl_get_cipher((SSL *)cptr->ssl));
|
||||
|
||||
else
|
||||
#endif
|
||||
sendto_locfailops("Link with %s established.", inpath);
|
||||
/* Insert here */
|
||||
(void)add_to_client_hash_table(cptr->name, cptr);
|
||||
/* doesnt duplicate cptr->serv if allocted this struct already */
|
||||
@@ -1191,9 +1214,20 @@ int m_server_estab(cptr)
|
||||
cptr->serv->up = me.name;
|
||||
cptr->srvptr = &me;
|
||||
cptr->serv->nline = aconf;
|
||||
|
||||
if (num && numeric_collides(TS2ts(num)))
|
||||
{
|
||||
sendto_serv_butone(&me,
|
||||
":%s GLOBOPS :Cancelling link %s, colliding numeric", me.name,
|
||||
inpath);
|
||||
sendto_locfailops("Cancelling link %s, colliding numeric", inpath);
|
||||
return exit_client(cptr, cptr, cptr,
|
||||
"Colliding server numeric (choose another in the M:line)");
|
||||
}
|
||||
|
||||
if (num)
|
||||
{
|
||||
cptr->serv->numeric = atoi(num);
|
||||
cptr->serv->numeric = TS2ts(num);
|
||||
num = NULL;
|
||||
}
|
||||
add_server_to_table(cptr);
|
||||
@@ -1284,6 +1318,7 @@ int m_server_estab(cptr)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for (acptr = &me; acptr; acptr = acptr->prev)
|
||||
{
|
||||
/* acptr->from == acptr for acptr == cptr */
|
||||
@@ -1298,18 +1333,16 @@ int m_server_estab(cptr)
|
||||
** Apparently USER command was forgotten... -Donwulff
|
||||
*/
|
||||
|
||||
|
||||
|
||||
if (!SupportNICKv2(cptr))
|
||||
{
|
||||
sendto_one(cptr, "%s %s %d %d %s %s %s %lu :%s",
|
||||
sendto_one(cptr,
|
||||
"%s %s %d %d %s %s %s %lu :%s",
|
||||
(IsToken(cptr) ? TOK_NICK : MSG_NICK),
|
||||
acptr->name, acptr->hopcount + 1,
|
||||
acptr->lastnick, acptr->user->username,
|
||||
acptr->user->realhost,
|
||||
(SupportNS(cptr) ?
|
||||
(acptr->srvptr->serv->numeric ?
|
||||
base64enc(acptr->srvptr->serv->numeric) :
|
||||
acptr->user->server) : acptr->user->server),
|
||||
acptr->user->server,
|
||||
acptr->user->servicestamp, acptr->info);
|
||||
send_umode(cptr, acptr, 0, SEND_UMODES, buf);
|
||||
if (IsHidden(acptr) && acptr->user->virthost)
|
||||
@@ -1322,25 +1355,52 @@ int m_server_estab(cptr)
|
||||
else
|
||||
{
|
||||
send_umode(NULL, acptr, 0, SEND_UMODES, buf);
|
||||
|
||||
if (!SupportVHP(cptr))
|
||||
sendto_one(cptr,
|
||||
"%s %s %d %d %s %s %s %lu %s %s :%s",
|
||||
(IsToken(cptr) ? TOK_NICK :
|
||||
MSG_NICK), acptr->name,
|
||||
acptr->hopcount + 1,
|
||||
acptr->lastnick,
|
||||
acptr->user->username,
|
||||
acptr->user->realhost,
|
||||
(SupportNS(cptr) ?
|
||||
(acptr->srvptr->serv->numeric ?
|
||||
base64enc(acptr->srvptr->serv->numeric) :
|
||||
acptr->user->server) : acptr->user->server),
|
||||
acptr->user->servicestamp, (!buf
|
||||
|| *buf == '\0' ? "+" : buf),
|
||||
((IsHidden(acptr)
|
||||
&& (acptr->
|
||||
umodes & UMODE_SETHOST)) ? acptr->
|
||||
user->virthost : "*"), acptr->info);
|
||||
{
|
||||
if (SupportNS(cptr) && acptr->srvptr->serv->numeric)
|
||||
{
|
||||
sendto_one(cptr,
|
||||
cptr->proto & PROTO_SJB64 ?
|
||||
"%s %s %d %B %s %s %b %lu %s %s :%s"
|
||||
:
|
||||
"%s %s %d %d %s %s %b %lu %s %s :%s"
|
||||
,
|
||||
(IsToken(cptr) ? TOK_NICK :
|
||||
MSG_NICK), acptr->name,
|
||||
acptr->hopcount + 1,
|
||||
acptr->lastnick,
|
||||
acptr->user->username,
|
||||
acptr->user->realhost,
|
||||
acptr->srvptr->serv->numeric,
|
||||
acptr->user->servicestamp, (!buf
|
||||
|| *buf == '\0' ? "+" : buf),
|
||||
((IsHidden(acptr)
|
||||
&& (acptr->
|
||||
umodes & UMODE_SETHOST)) ? acptr->
|
||||
user->virthost : "*"), acptr->info);
|
||||
}
|
||||
else
|
||||
{
|
||||
sendto_one(cptr,
|
||||
(cptr->proto & PROTO_SJB64 ?
|
||||
"%s %s %d %B %s %s %s %lu %s %s :%s"
|
||||
: "%s %s %d %d %s %s %s %lu %s %s :%s"),
|
||||
(IsToken(cptr) ? TOK_NICK :
|
||||
MSG_NICK), acptr->name,
|
||||
acptr->hopcount + 1,
|
||||
acptr->lastnick,
|
||||
acptr->user->username,
|
||||
acptr->user->realhost,
|
||||
acptr->user->server,
|
||||
acptr->user->servicestamp, (!buf
|
||||
|| *buf == '\0' ? "+" : buf),
|
||||
((IsHidden(acptr)
|
||||
&& (acptr->
|
||||
umodes & UMODE_SETHOST)) ? acptr->
|
||||
user->virthost : "*"), acptr->info);
|
||||
}
|
||||
}
|
||||
else
|
||||
sendto_one(cptr,
|
||||
"%s %s %d %d %s %s %s %lu %s %s :%s",
|
||||
@@ -1392,7 +1452,11 @@ int m_server_estab(cptr)
|
||||
else
|
||||
send_channel_modes_sjoin3(cptr, chptr);
|
||||
if (chptr->topic_time)
|
||||
sendto_one(cptr, "%s %s %s %lu :%s",
|
||||
sendto_one(cptr,
|
||||
(cptr->proto & PROTO_SJB64 ?
|
||||
"%s %s %s %B :%s"
|
||||
:
|
||||
"%s %s %s %lu :%s"),
|
||||
(IsToken(cptr) ? TOK_TOPIC : MSG_TOPIC),
|
||||
chptr->chname, chptr->topic_nick,
|
||||
chptr->topic_time, chptr->topic);
|
||||
@@ -1463,7 +1527,7 @@ int m_links(cptr, sptr, parc, parv)
|
||||
acptr = lp->value.cptr;
|
||||
|
||||
/* Some checks */
|
||||
if (HIDE_ULINES && IsULine(acptr, acptr) && !IsAnOper(sptr))
|
||||
if (HIDE_ULINES && IsULine(acptr) && !IsAnOper(sptr))
|
||||
continue;
|
||||
sendto_one(sptr, rpl_str(RPL_LINKS),
|
||||
me.name, parv[0], acptr->name, acptr->serv->up,
|
||||
@@ -1519,7 +1583,7 @@ int m_netinfo(cptr, sptr, parc, parv)
|
||||
sendto_one(cptr,
|
||||
"ERROR :unProtocol 2090 is not compatible with unProtocol %li",
|
||||
UnrealProtocol);
|
||||
exit_client(cptr, cptr, cptr,
|
||||
return exit_client(cptr, cptr, cptr,
|
||||
"Link using unProtocol 2090");
|
||||
}
|
||||
return 0;
|
||||
@@ -1536,7 +1600,7 @@ int m_netinfo(cptr, sptr, parc, parv)
|
||||
}
|
||||
/* is a long therefore not ATOI */
|
||||
lmax = atol(parv[1]);
|
||||
endsync = atol(parv[2]);
|
||||
endsync = TS2ts(parv[2]);
|
||||
protocol = atol(parv[3]);
|
||||
|
||||
/* max global count != max_global_count --sts */
|
||||
@@ -1626,7 +1690,7 @@ void m_info_send(sptr)
|
||||
me.name, RPL_INFO, sptr->name);
|
||||
|
||||
sendto_one(sptr,
|
||||
":%s %d %s :| UnrealIRCd Homepage: http://unreal.tspre.org",
|
||||
":%s %d %s :| UnrealIRCd Homepage: http://www.unrealircd.com",
|
||||
me.name, RPL_INFO, sptr->name);
|
||||
|
||||
#ifdef _WIN32
|
||||
@@ -1974,114 +2038,6 @@ int m_watch(cptr, sptr, parc, parv)
|
||||
|
||||
|
||||
|
||||
/*
|
||||
** m_summon should be redefined to ":prefix SUMMON host user" so
|
||||
** that "hunt_server"-function could be used for this too!!! --msa
|
||||
** As of 2.7.1e, this was the case. -avalon
|
||||
**
|
||||
** parv[0] = sender prefix
|
||||
** parv[1] = user
|
||||
** parv[2] = server
|
||||
** parv[3] = channel (optional)
|
||||
*/
|
||||
int m_summon(cptr, sptr, parc, parv)
|
||||
aClient *sptr, *cptr;
|
||||
int parc;
|
||||
char *parv[];
|
||||
{
|
||||
char *host, *user, *chname;
|
||||
#ifdef ENABLE_SUMMON
|
||||
char hostbuf[17], namebuf[10], linebuf[10];
|
||||
# ifdef LEAST_IDLE
|
||||
char linetmp[10], ttyname[15]; /* Ack */
|
||||
struct stat stb;
|
||||
time_t ltime = (time_t) 0;
|
||||
# endif
|
||||
int fd, flag = 0;
|
||||
#endif
|
||||
|
||||
if (parc < 2 || *parv[1] == '\0')
|
||||
{
|
||||
sendto_one(sptr, err_str(ERR_NORECIPIENT),
|
||||
me.name, parv[0], "SUMMON");
|
||||
return 0;
|
||||
}
|
||||
user = parv[1];
|
||||
host = (parc < 3 || BadPtr(parv[2])) ? me.name : parv[2];
|
||||
chname = (parc > 3) ? parv[3] : "*";
|
||||
/*
|
||||
** Summoning someone on remote server, find out which link to
|
||||
** use and pass the message there...
|
||||
*/
|
||||
parv[1] = user;
|
||||
parv[2] = host;
|
||||
parv[3] = chname;
|
||||
parv[4] = NULL;
|
||||
if (hunt_server(cptr, sptr, ":%s SUMMON %s %s %s", 2, parc, parv) ==
|
||||
HUNTED_ISME)
|
||||
{
|
||||
#ifdef ENABLE_SUMMON
|
||||
if ((fd = utmp_open()) == -1)
|
||||
{
|
||||
sendto_one(sptr, err_str(ERR_FILEERROR),
|
||||
me.name, parv[0], "open", UTMP);
|
||||
return 0;
|
||||
}
|
||||
# ifndef LEAST_IDLE
|
||||
while ((flag = utmp_read(fd, namebuf, linebuf, hostbuf,
|
||||
sizeof(hostbuf))) == 0)
|
||||
if (StrEq(namebuf, user))
|
||||
break;
|
||||
# else
|
||||
/* use least-idle tty, not the first
|
||||
* one we find in utmp. 10/9/90 Spike@world.std.com
|
||||
* (loosely based on Jim Frost jimf@saber.com code)
|
||||
*/
|
||||
|
||||
while ((flag = utmp_read(fd, namebuf, linetmp, hostbuf,
|
||||
sizeof(hostbuf))) == 0)
|
||||
{
|
||||
if (StrEq(namebuf, user))
|
||||
{
|
||||
(void)ircsprintf(ttyname, "/dev/%s", linetmp);
|
||||
if (stat(ttyname, &stb) == -1)
|
||||
{
|
||||
sendto_one(sptr,
|
||||
err_str(ERR_FILEERROR),
|
||||
me.name, sptr->name,
|
||||
"stat", ttyname);
|
||||
return 0;
|
||||
}
|
||||
if (!ltime)
|
||||
{
|
||||
ltime = stb.st_mtime;
|
||||
(void)strcpy(linebuf, linetmp);
|
||||
}
|
||||
else if (stb.st_mtime > ltime) /* less idle */
|
||||
{
|
||||
ltime = stb.st_mtime;
|
||||
(void)strcpy(linebuf, linetmp);
|
||||
}
|
||||
}
|
||||
}
|
||||
# endif
|
||||
(void)utmp_close(fd);
|
||||
# ifdef LEAST_IDLE
|
||||
if (ltime == 0)
|
||||
# else
|
||||
if (flag == -1)
|
||||
# endif
|
||||
sendto_one(sptr, err_str(ERR_NOLOGIN),
|
||||
me.name, parv[0], user);
|
||||
else
|
||||
summon(sptr, user, linebuf, chname);
|
||||
#else
|
||||
sendto_one(sptr, err_str(ERR_SUMMONDISABLED), me.name, parv[0]);
|
||||
#endif /* ENABLE_SUMMON */
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
** m_stats
|
||||
@@ -2153,8 +2109,8 @@ static void report_configured_links(sptr, mask)
|
||||
{
|
||||
static char null[] = "<NULL>";
|
||||
aConfItem *tmp;
|
||||
int *p, port, tmpmask;
|
||||
char c, *host, *pass, *name;
|
||||
int *p, port, tmpmask, options;
|
||||
char c, *host, *pass, *name, optbuf[5];
|
||||
tmpmask = (mask == CONF_MISSING) ? CONF_CONNECT_SERVER : mask;
|
||||
|
||||
for (tmp = conf; tmp; tmp = tmp->next)
|
||||
@@ -2170,6 +2126,7 @@ static void report_configured_links(sptr, mask)
|
||||
pass = BadPtr(tmp->passwd) ? null : tmp->passwd;
|
||||
name = BadPtr(tmp->name) ? null : tmp->name;
|
||||
port = (int)tmp->port;
|
||||
options = tmp->options;
|
||||
/*
|
||||
* On K line the passwd contents can be
|
||||
* displayed on STATS reply. -Vesa
|
||||
@@ -2294,17 +2251,67 @@ static void report_configured_links(sptr, mask)
|
||||
|| mask & CONF_CONNECT_SERVER))
|
||||
sendto_one(sptr, rpl_str(p[1]), me.name,
|
||||
sptr->name, c, "*", name, port,
|
||||
get_conf_class(tmp));
|
||||
else
|
||||
get_conf_class(tmp), "*");
|
||||
else {
|
||||
int cnt = 0;
|
||||
if (options) {
|
||||
if (options & CONNECT_SSL) {
|
||||
optbuf[cnt] = 'S';
|
||||
cnt++;
|
||||
}
|
||||
if (options & CONNECT_ZIP) {
|
||||
optbuf[cnt] = 'Z';
|
||||
cnt++;
|
||||
}
|
||||
optbuf[cnt] = '\0';
|
||||
}
|
||||
|
||||
sendto_one(sptr, rpl_str(p[1]), me.name,
|
||||
sptr->name, c, host, name, port,
|
||||
get_conf_class(tmp));
|
||||
get_conf_class(tmp), options ? optbuf : "*");
|
||||
optbuf[0] = '\0';
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
char *get_cptr_status(aClient *acptr)
|
||||
{
|
||||
static char buf[10];
|
||||
char *p = buf;
|
||||
|
||||
*p = '\0';
|
||||
*p++ = '[';
|
||||
if (acptr->flags & FLAGS_LISTEN)
|
||||
{
|
||||
if (acptr->umodes & LISTENER_NORMAL)
|
||||
*p++ = '*';
|
||||
if (acptr->umodes & LISTENER_SERVERSONLY)
|
||||
*p++ = 'S';
|
||||
if (acptr->umodes & LISTENER_CLIENTSONLY)
|
||||
*p++ = 'C';
|
||||
#ifdef USE_SSL
|
||||
if (acptr->umodes & LISTENER_SSL)
|
||||
*p++ = 's';
|
||||
#endif
|
||||
if (acptr->umodes & LISTENER_REMOTEADMIN)
|
||||
*p++ = 'R';
|
||||
if (acptr->umodes & LISTENER_JAVACLIENT)
|
||||
*p++ = 'J';
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef USE_SSL
|
||||
if (acptr->flags & FLAGS_SSL)
|
||||
*p++ = 's';
|
||||
#endif
|
||||
}
|
||||
*p++ = ']';
|
||||
*p++ = '\0';
|
||||
return (buf);
|
||||
}
|
||||
|
||||
/* Used to blank out ports -- Barubary */
|
||||
char *get_client_name2(aClient *acptr, int showports)
|
||||
@@ -2330,11 +2337,11 @@ int m_stats(cptr, sptr, parc, parv)
|
||||
#ifndef DEBUGMODE
|
||||
static char Sformat[] =
|
||||
":%s %d %s SendQ SendM SendBytes RcveM RcveBytes Open_since :Idle";
|
||||
static char Lformat[] = ":%s %d %s %s %u %u %u %u %u %u :%u";
|
||||
static char Lformat[] = ":%s %d %s %s%s %u %u %u %u %u %u :%u";
|
||||
#else
|
||||
static char Sformat[] =
|
||||
":%s %d %s SendQ SendM SendBytes RcveM RcveBytes Open_since CPU :Idle";
|
||||
static char Lformat[] = ":%s %d %s %s %u %u %u %u %u %u %s";
|
||||
static char Lformat[] = ":%s %d %s %s%s %u %u %u %u %u %u %s";
|
||||
char pbuf[96]; /* Should be enough for to ints */
|
||||
#endif
|
||||
struct Message *mptr;
|
||||
@@ -2417,9 +2424,10 @@ int m_stats(cptr, sptr, parc, parv)
|
||||
continue;
|
||||
if (!doall && wilds && match(name, acptr->name))
|
||||
continue;
|
||||
if (!(parc == 2 && IsServer(acptr)) &&
|
||||
if (!(parc == 2 && (IsServer(acptr) || (acptr->flags & FLAGS_LISTEN))) &&
|
||||
!(doall || wilds) && mycmp(name, acptr->name))
|
||||
continue;
|
||||
|
||||
#ifdef DEBUGMODE
|
||||
ircsprintf(pbuf, "%d :%d", acptr->cputime,
|
||||
(acptr->user && MyConnect(acptr)) ?
|
||||
@@ -2432,6 +2440,7 @@ int m_stats(cptr, sptr, parc, parv)
|
||||
(isupper(stat)) ?
|
||||
get_client_name2(acptr, showports) :
|
||||
get_client_name(acptr, FALSE),
|
||||
get_cptr_status(acptr),
|
||||
(int)DBufLength(&acptr->sendQ),
|
||||
(int)acptr->sendM, (int)acptr->sendK,
|
||||
(int)acptr->receiveM,
|
||||
@@ -2455,6 +2464,7 @@ int m_stats(cptr, sptr, parc, parv)
|
||||
(isupper(stat)) ? /* Potvin - PreZ */
|
||||
get_client_name2(acptr, showports) :
|
||||
get_client_name(acptr, FALSE),
|
||||
get_cptr_status(acptr),
|
||||
(int)DBufLength(&acptr->sendQ),
|
||||
(int)acptr->sendM, (int)acptr->sendK,
|
||||
(int)acptr->receiveM,
|
||||
@@ -2633,50 +2643,29 @@ int m_stats(cptr, sptr, parc, parv)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
** m_summon
|
||||
** parv[0] = sender prefix
|
||||
*/
|
||||
int m_summon(aClient *cptr, aClient *sptr, int parc, char *parv[]) {
|
||||
/* /summon is old and out dated, we just return an error as
|
||||
* required by RFC1459 -- codemastr
|
||||
*/
|
||||
sendto_one(sptr, err_str(ERR_SUMMONDISABLED), me.name, parv[0]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
** m_users
|
||||
** parv[0] = sender prefix
|
||||
** parv[1] = servername
|
||||
*/
|
||||
int m_users(cptr, sptr, parc, parv)
|
||||
aClient *cptr, *sptr;
|
||||
int parc;
|
||||
char *parv[];
|
||||
int m_users(aClient *cptr, aClient *sptr, int parc, char *parv[])
|
||||
{
|
||||
#ifdef ENABLE_USERS
|
||||
char namebuf[10], linebuf[10], hostbuf[17];
|
||||
int fd, flag = 0;
|
||||
#endif
|
||||
|
||||
if (hunt_server(cptr, sptr, ":%s USERS :%s", 1, parc,
|
||||
parv) == HUNTED_ISME)
|
||||
{
|
||||
#ifdef ENABLE_USERS
|
||||
if ((fd = utmp_open()) == -1)
|
||||
{
|
||||
sendto_one(sptr, err_str(ERR_FILEERROR),
|
||||
me.name, parv[0], "open", UTMP);
|
||||
return 0;
|
||||
}
|
||||
|
||||
sendto_one(sptr, rpl_str(RPL_USERSSTART), me.name, parv[0]);
|
||||
while (utmp_read(fd, namebuf, linebuf,
|
||||
hostbuf, sizeof(hostbuf)) == 0)
|
||||
{
|
||||
flag = 1;
|
||||
sendto_one(sptr, rpl_str(RPL_USERS), me.name, parv[0],
|
||||
namebuf, linebuf, hostbuf);
|
||||
}
|
||||
if (flag == 0)
|
||||
sendto_one(sptr, rpl_str(RPL_NOUSERS),
|
||||
me.name, parv[0]);
|
||||
|
||||
sendto_one(sptr, rpl_str(RPL_ENDOFUSERS), me.name, parv[0]);
|
||||
(void)utmp_close(fd);
|
||||
#else
|
||||
sendto_one(sptr, err_str(ERR_USERSDISABLED), me.name, parv[0]);
|
||||
#endif
|
||||
}
|
||||
/* /users is out of date, just return an error as required by
|
||||
* RFC1459 -- codemastr
|
||||
*/
|
||||
sendto_one(sptr, err_str(ERR_USERSDISABLED), me.name, parv[0]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -2780,7 +2769,7 @@ int m_help(cptr, sptr, parc, parv)
|
||||
tmpl->next = helpign;
|
||||
helpign = tmpl;
|
||||
}
|
||||
sendto_helpops("from %s (HelpOp): %s", parv[0], message);
|
||||
sendto_umode(UMODE_HELPOP, "*** HelpOp -- from %s (HelpOp): %s", parv[0], message);
|
||||
}
|
||||
else if (MyConnect(sptr))
|
||||
{
|
||||
@@ -2807,14 +2796,14 @@ int m_help(cptr, sptr, parc, parv)
|
||||
|
||||
sendto_serv_butone_token(IsServer(cptr) ? cptr : NULL,
|
||||
parv[0], MSG_HELP, TOK_HELP, "%s", message);
|
||||
sendto_helpops("from %s (Local): %s", parv[0], message);
|
||||
sendto_umode(UMODE_HELPOP, "*** HelpOp -- from %s (Local): %s", parv[0], message);
|
||||
sendto_one(sptr, rpl_str(RPL_HELPFWD), me.name, parv[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
sendto_serv_butone_token(IsServer(cptr) ? cptr : NULL,
|
||||
parv[0], MSG_HELP, TOK_HELP, "%s", message);
|
||||
sendto_helpops("from %s: %s", parv[0], message);
|
||||
sendto_umode(UMODE_HELPOP, "*** HelpOp -- from %s: %s", parv[0], message);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -3235,7 +3224,7 @@ int m_svsmotd(aClient *cptr, aClient *sptr, int parc, char *parv[])
|
||||
{
|
||||
FILE *conf = NULL;
|
||||
|
||||
if (!IsULine(cptr, sptr))
|
||||
if (!IsULine(sptr))
|
||||
{
|
||||
sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, parv[0]);
|
||||
return 0;
|
||||
@@ -3402,7 +3391,7 @@ int m_locops(cptr, sptr, parc, parv)
|
||||
}
|
||||
|
||||
/*
|
||||
** m_chatops (write to opers who are +b currently online)
|
||||
** m_chatops (write to opers who are currently online)
|
||||
** parv[0] = sender prefix
|
||||
** parv[1] = message text
|
||||
*/
|
||||
@@ -3423,7 +3412,7 @@ int m_chatops(cptr, sptr, parc, parv)
|
||||
}
|
||||
if (ALLOW_CHATOPS == 1)
|
||||
{
|
||||
if (MyClient(sptr) && !SendChatops(sptr))
|
||||
if (MyClient(sptr) && !IsAnOper(sptr))
|
||||
{
|
||||
sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name,
|
||||
parv[0]);
|
||||
@@ -3442,8 +3431,12 @@ int m_chatops(cptr, sptr, parc, parv)
|
||||
sendto_serv_butone_token(IsServer(cptr) ? cptr : NULL,
|
||||
parv[0], MSG_CHATOPS, TOK_CHATOPS, ":%s", message);
|
||||
if (ALLOW_CHATOPS == 1)
|
||||
sendto_umode(UMODE_CHATOP, "*** ChatOps -- from %s: %s",
|
||||
{
|
||||
sendto_umode(UMODE_OPER, "*** ChatOps -- from %s: %s",
|
||||
parv[0], message);
|
||||
sendto_umode(UMODE_LOCOP, "*** ChatOps -- from %s: %s",
|
||||
parv[0], message);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -3471,7 +3464,7 @@ int m_goper(cptr, sptr, parc, parv)
|
||||
return 0;
|
||||
}
|
||||
/* if (!IsServer(sptr) && MyConnect(sptr) && !IsAnOper(sptr))*/
|
||||
if (!IsServer(sptr) || !IsULine(cptr, sptr))
|
||||
if (!IsServer(sptr) || !IsULine(sptr))
|
||||
{
|
||||
sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, parv[0]);
|
||||
return 0;
|
||||
@@ -3524,7 +3517,7 @@ int m_svskill(cptr, sptr, parc, parv)
|
||||
if (parc == 2)
|
||||
comment = "SVS Killed";
|
||||
|
||||
if (!IsULine(cptr, sptr))
|
||||
if (!IsULine(sptr))
|
||||
return -1;
|
||||
|
||||
/* if (hunt_server(cptr,sptr,":%s SVSKILL %s :%s",1,parc,parv) != HUNTED_ISME)
|
||||
@@ -3533,8 +3526,9 @@ int m_svskill(cptr, sptr, parc, parv)
|
||||
|
||||
if (parc < 1 || (!(acptr = find_client(parv[1], NULL))))
|
||||
return 0;
|
||||
sendto_serv_butone(cptr, ":%s SVSKILL %s :%s", parv[0], parv[1],
|
||||
comment);
|
||||
|
||||
sendto_serv_butone_token(cptr, parv[0],
|
||||
MSG_SVSKILL, TOK_SVSKILL, "%s :%s", parv[1], comment);
|
||||
|
||||
return exit_client(cptr, acptr, sptr, comment);
|
||||
|
||||
@@ -3596,7 +3590,7 @@ int m_rehash(cptr, sptr, parc, parv)
|
||||
return 0;
|
||||
}
|
||||
if (!MyClient(sptr) && !(IsTechAdmin(sptr) || IsNetAdmin(sptr))
|
||||
&& !IsULine(cptr, sptr))
|
||||
&& !IsULine(sptr))
|
||||
{
|
||||
sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, parv[0]);
|
||||
return 0;
|
||||
@@ -3629,7 +3623,7 @@ int m_rehash(cptr, sptr, parc, parv)
|
||||
{
|
||||
if (!IsAdmin(sptr))
|
||||
return 0;
|
||||
do_garbage_collect = 1;
|
||||
loop.do_garbage_collect = 1;
|
||||
return 0;
|
||||
}
|
||||
if (!match("-rest*", parv[1]))
|
||||
@@ -3888,12 +3882,12 @@ int m_restart(cptr, sptr, parc, parv)
|
||||
return 0;
|
||||
}
|
||||
if (!MyClient(sptr) && !(IsTechAdmin(sptr) || IsNetAdmin(sptr))
|
||||
&& !IsULine(cptr, sptr))
|
||||
&& !IsULine(sptr))
|
||||
{
|
||||
sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, parv[0]);
|
||||
return 0;
|
||||
}
|
||||
if (parc > 2)
|
||||
if (parc > 3)
|
||||
{
|
||||
/* Remote restart. */
|
||||
if (MyClient(sptr) && !(IsNetAdmin(sptr) || IsTechAdmin(sptr)))
|
||||
@@ -4281,6 +4275,7 @@ void read_tlines()
|
||||
while (tdata->tmotd)
|
||||
{
|
||||
amotd = tdata->tmotd->next;
|
||||
MyFree(tdata->tmotd->line);
|
||||
MyFree(tdata->tmotd);
|
||||
tdata->tmotd = amotd;
|
||||
}
|
||||
@@ -4288,6 +4283,7 @@ void read_tlines()
|
||||
while (tdata->trules)
|
||||
{
|
||||
arules = tdata->trules->next;
|
||||
MyFree(tdata->trules->line);
|
||||
MyFree(tdata->trules);
|
||||
tdata->trules = arules;
|
||||
}
|
||||
@@ -4334,6 +4330,7 @@ aMotd *read_svsmotd(char *filename)
|
||||
while (svsmotd)
|
||||
{
|
||||
old = svsmotd->next;
|
||||
MyFree(svsmotd->line);
|
||||
MyFree(svsmotd);
|
||||
svsmotd = old;
|
||||
}
|
||||
@@ -4351,7 +4348,7 @@ aMotd *read_svsmotd(char *filename)
|
||||
temp = (aMotd *) MyMalloc(sizeof(aMotd));
|
||||
if (!temp)
|
||||
outofmemory();
|
||||
strcpy(temp->line, line);
|
||||
AllocCpy(temp->line, line);
|
||||
temp->next = NULL;
|
||||
if (!newmotd)
|
||||
newmotd = temp;
|
||||
@@ -4383,6 +4380,7 @@ aMotd *read_rules(char *filename)
|
||||
while (rules)
|
||||
{
|
||||
old = rules->next;
|
||||
MyFree(rules->line);
|
||||
MyFree(rules);
|
||||
rules = old;
|
||||
}
|
||||
@@ -4402,7 +4400,7 @@ aMotd *read_rules(char *filename)
|
||||
temp = (aMotd *) MyMalloc(sizeof(aMotd));
|
||||
if (!temp)
|
||||
outofmemory();
|
||||
strcpy(temp->line, line);
|
||||
AllocCpy(temp->line, line);
|
||||
temp->next = NULL;
|
||||
if (!newmotd)
|
||||
newmotd = temp;
|
||||
@@ -4420,7 +4418,7 @@ aMotd *read_rules(char *filename)
|
||||
*/
|
||||
|
||||
aMotd *read_motd(char *filename)
|
||||
{
|
||||
{
|
||||
int fd = open(filename, O_RDONLY);
|
||||
aMotd *temp, *newmotd, *last, *old;
|
||||
struct stat sb;
|
||||
@@ -4438,8 +4436,9 @@ aMotd *read_motd(char *filename)
|
||||
while (motd)
|
||||
{
|
||||
old = motd->next;
|
||||
MyFree(motd->line);
|
||||
MyFree(motd);
|
||||
motd = old;
|
||||
motd = old;
|
||||
}
|
||||
/* We also wanna set it's last changed value -- codemastr */
|
||||
motd_tm = localtime(&sb.st_mtime);
|
||||
@@ -4459,7 +4458,7 @@ aMotd *read_motd(char *filename)
|
||||
temp = (aMotd *) MyMalloc(sizeof(aMotd));
|
||||
if (!temp)
|
||||
outofmemory();
|
||||
strcpy(temp->line, line);
|
||||
AllocCpy(temp->line, line);
|
||||
temp->next = NULL;
|
||||
if (!newmotd)
|
||||
newmotd = temp;
|
||||
@@ -4469,6 +4468,7 @@ aMotd *read_motd(char *filename)
|
||||
}
|
||||
close(fd);
|
||||
return newmotd;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -4478,6 +4478,7 @@ aMotd *read_motd(char *filename)
|
||||
|
||||
aMotd *read_opermotd(char *filename)
|
||||
{
|
||||
|
||||
int fd = open(filename, O_RDONLY);
|
||||
aMotd *temp, *newmotd, *last, *old;
|
||||
char line[82];
|
||||
@@ -4490,6 +4491,7 @@ aMotd *read_opermotd(char *filename)
|
||||
while (opermotd)
|
||||
{
|
||||
old = opermotd->next;
|
||||
MyFree(opermotd->line);
|
||||
MyFree(opermotd);
|
||||
opermotd = old;
|
||||
}
|
||||
@@ -4507,7 +4509,7 @@ aMotd *read_opermotd(char *filename)
|
||||
temp = (aMotd *) MyMalloc(sizeof(aMotd));
|
||||
if (!temp)
|
||||
outofmemory();
|
||||
strcpy(temp->line, line);
|
||||
AllocCpy(temp->line, line);
|
||||
temp->next = NULL;
|
||||
if (!newmotd)
|
||||
newmotd = temp;
|
||||
@@ -4517,6 +4519,7 @@ aMotd *read_opermotd(char *filename)
|
||||
}
|
||||
close(fd);
|
||||
return newmotd;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -4538,6 +4541,8 @@ aMotd *read_botmotd(char *filename)
|
||||
while (botmotd)
|
||||
{
|
||||
old = botmotd->next;
|
||||
|
||||
MyFree(botmotd->line);
|
||||
MyFree(botmotd);
|
||||
botmotd = old;
|
||||
}
|
||||
@@ -4555,7 +4560,7 @@ aMotd *read_botmotd(char *filename)
|
||||
temp = (aMotd *) MyMalloc(sizeof(aMotd));
|
||||
if (!temp)
|
||||
outofmemory();
|
||||
strcpy(temp->line, line);
|
||||
AllocCpy(temp->line, line);
|
||||
temp->next = NULL;
|
||||
if (!newmotd)
|
||||
newmotd = temp;
|
||||
@@ -4775,7 +4780,7 @@ void dump_map(cptr, server, mask, prompt_length, length)
|
||||
{
|
||||
static char prompt[64];
|
||||
char *p = &prompt[prompt_length];
|
||||
int cnt = 0, local = 0;
|
||||
int cnt = 0;
|
||||
aClient *acptr;
|
||||
Link *lp;
|
||||
|
||||
@@ -4810,9 +4815,6 @@ void dump_map(cptr, server, mask, prompt_length, length)
|
||||
acptr = lp->value.cptr;
|
||||
if (acptr->srvptr != server)
|
||||
continue;
|
||||
|
||||
if (IsULine(acptr, acptr) && HIDE_ULINES && !IsAnOper(cptr))
|
||||
continue;
|
||||
acptr->flags |= FLAGS_MAP;
|
||||
cnt++;
|
||||
}
|
||||
@@ -4820,6 +4822,8 @@ void dump_map(cptr, server, mask, prompt_length, length)
|
||||
for (lp = (Link *) return_servers(); lp; lp = lp->next)
|
||||
{
|
||||
acptr = lp->value.cptr;
|
||||
if (IsULine(acptr) && HIDE_ULINES && !IsAnOper(cptr))
|
||||
continue;
|
||||
if (acptr->srvptr != server)
|
||||
continue;
|
||||
if (!acptr->flags & FLAGS_MAP)
|
||||
@@ -4859,8 +4863,6 @@ int m_map(cptr, sptr, parc, parv)
|
||||
if ((strlen(acptr->name) + acptr->hopcount * 2) > longest)
|
||||
longest = strlen(acptr->name) + acptr->hopcount * 2;
|
||||
}
|
||||
for (acptr = client; acptr; acptr = acptr->next)
|
||||
|
||||
if (longest > 60)
|
||||
longest = 60;
|
||||
longest += 2;
|
||||
|
||||
+6
-30
@@ -139,11 +139,7 @@ void start_socks(cptr)
|
||||
goto skip_socks;
|
||||
|
||||
#ifdef SHOWCONNECTINFO
|
||||
#ifndef _WIN32
|
||||
write(cptr->fd, REPORT_DO_SOCKS, R_do_socks);
|
||||
#else
|
||||
send(cptr->fd, REPORT_DO_SOCKS, R_do_socks, 0);
|
||||
#endif
|
||||
sendto_one(cptr, REPORT_DO_SOCKS);
|
||||
#endif
|
||||
|
||||
set_non_blocking(cptr->socksfd, cptr);
|
||||
@@ -168,11 +164,7 @@ void start_socks(cptr)
|
||||
#endif
|
||||
cptr->socksfd = -1;
|
||||
#ifdef SHOWCONNECTINFO
|
||||
#ifndef _WIN32
|
||||
write(cptr->fd, REPORT_NO_SOCKS, R_no_socks);
|
||||
#else
|
||||
send(cptr->fd, REPORT_NO_SOCKS, R_no_socks, 0);
|
||||
#endif
|
||||
sendto_one(cptr, REPORT_NO_SOCKS);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
@@ -190,11 +182,7 @@ void start_socks(cptr)
|
||||
cptr->socksfd = -1;
|
||||
cptr->socksfd = -1;
|
||||
#ifdef SHOWCONNECTINFO
|
||||
#ifndef _WIN32
|
||||
write(cptr->fd, REPORT_NO_SOCKS, R_no_socks);
|
||||
#else
|
||||
send(cptr->fd, REPORT_NO_SOCKS, R_no_socks, 0);
|
||||
#endif
|
||||
sendto_one(cptr, REPORT_NO_SOCKS);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
@@ -236,11 +224,7 @@ void send_socksquery(cptr)
|
||||
cptr->socksfd = -1;
|
||||
cptr->flags &= ~FLAGS_SOCKS;
|
||||
#ifdef SHOWCONNECTINFO
|
||||
#ifndef _WIN32
|
||||
write(cptr->fd, REPORT_NO_SOCKS, R_no_socks);
|
||||
#else
|
||||
send(cptr->fd, REPORT_NO_SOCKS, R_no_socks, 0);
|
||||
#endif
|
||||
sendto_one(cptr, REPORT_NO_SOCKS);
|
||||
#endif
|
||||
}
|
||||
cptr->flags &= ~FLAGS_WRSOCKS;
|
||||
@@ -275,11 +259,7 @@ void read_socks(cptr)
|
||||
if (len < 4)
|
||||
{
|
||||
#ifdef SHOWCONNECTINFO
|
||||
#ifndef _WIN32
|
||||
write(cptr->fd, REPORT_NO_SOCKS, R_no_socks);
|
||||
#else
|
||||
send(cptr->fd, REPORT_NO_SOCKS, R_no_socks, 0);
|
||||
#endif
|
||||
sendto_one(cptr, REPORT_NO_SOCKS);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
@@ -291,11 +271,7 @@ void read_socks(cptr)
|
||||
}
|
||||
|
||||
#ifdef SHOWCONNECTINFO
|
||||
#ifndef _WIN32
|
||||
write(cptr->fd, REPORT_GOOD_SOCKS, R_good_socks);
|
||||
#else
|
||||
send(cptr->fd, REPORT_GOOD_SOCKS, R_good_socks, 0);
|
||||
#endif
|
||||
sendto_one(cptr, REPORT_GOOD_SOCKS);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
+31
-153
@@ -1,7 +1,7 @@
|
||||
/************************************************************************
|
||||
/************************************************************************
|
||||
* IRC - Internet Relay Chat, s_unreal.c
|
||||
* (C) 1999 Carsten Munk (Techie/Stskeeps) <cmunk@toybox.flirt.org>
|
||||
* (C) 1999-2000 Carsten Munk (Techie/Stskeeps) <stskeeps@tspre.org>
|
||||
*
|
||||
* See file AUTHORS in IRC package for additional names of
|
||||
* the programmers.
|
||||
@@ -34,9 +34,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#ifndef _WIN32
|
||||
#include <utmp.h>
|
||||
#else
|
||||
#ifdef _WIN32
|
||||
#include <io.h>
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
@@ -80,7 +78,6 @@ int m_sethost(cptr, sptr, parc, parv)
|
||||
#else
|
||||
int permit = 2;
|
||||
#endif
|
||||
int donotice = 0; /* send out notices if local connect ( 0 = NOT 1 = yes ) */
|
||||
int legalhost = 1; /* is legal characters? */
|
||||
|
||||
|
||||
@@ -272,7 +269,7 @@ int m_chghost(cptr, sptr, parc, parv)
|
||||
|
||||
if ((acptr = find_person(parv[1], NULL)))
|
||||
{
|
||||
if (!IsULine(cptr, sptr))
|
||||
if (!IsULine(sptr))
|
||||
{
|
||||
sendto_umode(UMODE_EYES,
|
||||
"%s changed the virtual hostname of %s (%s@%s) to be %s",
|
||||
@@ -286,7 +283,7 @@ int m_chghost(cptr, sptr, parc, parv)
|
||||
if (acptr->user->virthost)
|
||||
MyFree(acptr->user->virthost);
|
||||
acptr->user->virthost = MyMalloc(strlen(parv[2]) + 1);
|
||||
sprintf(acptr->user->virthost, "%s", parv[2]);
|
||||
ircsprintf(acptr->user->virthost, "%s", parv[2]);
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
@@ -376,7 +373,7 @@ int m_chgident(cptr, sptr, parc, parv)
|
||||
|
||||
if ((acptr = find_person(parv[1], NULL)))
|
||||
{
|
||||
if (!IsULine(cptr, sptr))
|
||||
if (!IsULine(sptr))
|
||||
{
|
||||
sendto_umode(UMODE_EYES,
|
||||
"%s changed the virtual ident of %s (%s@%s) to be %s",
|
||||
@@ -387,7 +384,7 @@ int m_chgident(cptr, sptr, parc, parv)
|
||||
sendto_serv_butone_token(cptr, sptr->name,
|
||||
MSG_CHGIDENT,
|
||||
TOK_CHGIDENT, "%s %s", acptr->name, parv[2]);
|
||||
sprintf(acptr->user->username, "%s", parv[2]);
|
||||
ircsprintf(acptr->user->username, "%s", parv[2]);
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
@@ -421,7 +418,6 @@ int m_setident(cptr, sptr, parc, parv)
|
||||
#else
|
||||
int permit = 2;
|
||||
#endif
|
||||
int donotice = 0; /* send out notices if local connect ( 0 = NOT 1 = yes ) */
|
||||
int legalident = 1; /* is legal characters? */
|
||||
if (!MyConnect(sptr))
|
||||
goto permit_2;
|
||||
@@ -514,7 +510,7 @@ int m_setident(cptr, sptr, parc, parv)
|
||||
}
|
||||
|
||||
/* get it in */
|
||||
sprintf(sptr->user->username, "%s", vident);
|
||||
ircsprintf(sptr->user->username, "%s", vident);
|
||||
/* spread it out */
|
||||
sendto_serv_butone_token(cptr, sptr->name,
|
||||
MSG_SETIDENT, TOK_SETIDENT, "%s", parv[1]);
|
||||
@@ -566,7 +562,7 @@ int m_setname(cptr, sptr, parc, parv)
|
||||
|
||||
/* set the new name before we check, but don't send to servers unless it is ok */
|
||||
else
|
||||
sprintf(sptr->info, "%s", parv[1]);
|
||||
ircsprintf(sptr->info, "%s", parv[1]);
|
||||
|
||||
/* Check for n:lines here too */
|
||||
if (!IsAnOper(sptr) && find_nline(sptr))
|
||||
@@ -632,7 +628,7 @@ int m_sdesc(cptr, sptr, parc, parv)
|
||||
return 0;
|
||||
}
|
||||
|
||||
sprintf(sptr->srvptr->info, "%s", parv[1]);
|
||||
ircsprintf(sptr->srvptr->info, "%s", parv[1]);
|
||||
|
||||
sendto_serv_butone_token(cptr, sptr->name, MSG_SDESC, TOK_SDESC, ":%s",
|
||||
parv[1]);
|
||||
@@ -679,8 +675,8 @@ int m_admins(cptr, sptr, parc, parv)
|
||||
sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, parv[0]);
|
||||
return 0;
|
||||
}
|
||||
sendto_serv_butone(IsServer(cptr) ? cptr : NULL,
|
||||
":%s ADCHAT :%s", parv[0], message);
|
||||
sendto_serv_butone_token(IsServer(cptr) ? cptr : NULL, parv[0],
|
||||
MSG_ADMINCHAT, TOK_ADMINCHAT, ":%s", message);
|
||||
#ifdef ADMINCHAT
|
||||
sendto_umode(UMODE_ADMIN, "*** AdminChat -- from %s: %s",
|
||||
parv[0], message);
|
||||
@@ -720,8 +716,8 @@ int m_techat(cptr, sptr, parc, parv)
|
||||
sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, parv[0]);
|
||||
return 0;
|
||||
}
|
||||
sendto_serv_butone(IsServer(cptr) ? cptr : NULL,
|
||||
":%s TECHAT :%s", parv[0], message);
|
||||
sendto_serv_butone_token(IsServer(cptr) ? cptr : NULL, parv[0],
|
||||
MSG_TECHAT, TOK_TECHAT, ":%s", message);
|
||||
#ifdef ADMINCHAT
|
||||
sendto_umode(UMODE_TECHADMIN, "*** Te-chat -- from %s: %s",
|
||||
parv[0], message);
|
||||
@@ -762,8 +758,8 @@ int m_nachat(cptr, sptr, parc, parv)
|
||||
return 0;
|
||||
}
|
||||
|
||||
sendto_serv_butone(IsServer(cptr) ? cptr : NULL,
|
||||
":%s NACHAT :%s", parv[0], message);
|
||||
sendto_serv_butone_token(IsServer(cptr) ? cptr : NULL, parv[0],
|
||||
MSG_NACHAT, TOK_NACHAT, ":%s", message);
|
||||
#ifdef ADMINCHAT
|
||||
sendto_umode(UMODE_NETADMIN, "*** NetAdmin.Chat -- from %s: %s",
|
||||
parv[0], message);
|
||||
@@ -861,11 +857,11 @@ static char *militime(char *sec, char *usec)
|
||||
tv.tv_usec = 0;
|
||||
#endif
|
||||
if (sec && usec)
|
||||
sprintf(timebuf, "%ld",
|
||||
ircsprintf(timebuf, "%ld",
|
||||
(tv.tv_sec - atoi(sec)) * 1000 + (tv.tv_usec -
|
||||
atoi(usec)) / 1000);
|
||||
else
|
||||
sprintf(timebuf, "%ld %ld", tv.tv_sec, tv.tv_usec);
|
||||
ircsprintf(timebuf, "%ld %ld", tv.tv_sec, tv.tv_usec);
|
||||
|
||||
return timebuf;
|
||||
}
|
||||
@@ -1024,11 +1020,7 @@ int m_swhois(cptr, sptr, parc, parv)
|
||||
{
|
||||
aClient *acptr;
|
||||
|
||||
/* if (!IsServer(sptr) && !IsULine(cptr, sptr) && !(IsNetAdmin(sptr) || IsTechAdmin(sptr)))
|
||||
{
|
||||
return 0;
|
||||
}*/
|
||||
if (!IsServer(sptr) && !IsULine(cptr, sptr))
|
||||
if (!IsServer(sptr) && !IsULine(sptr))
|
||||
return 0;
|
||||
if (parc < 3)
|
||||
return 0;
|
||||
@@ -1040,9 +1032,9 @@ int m_swhois(cptr, sptr, parc, parv)
|
||||
if (acptr->user->swhois)
|
||||
MyFree(acptr->user->swhois);
|
||||
acptr->user->swhois = MyMalloc(strlen(parv[2]) + 1);
|
||||
sprintf(acptr->user->swhois, "%s", parv[2]);
|
||||
sendto_serv_butone(cptr, ":%s SWHOIS %s :%s", sptr->name, parv[1],
|
||||
parv[2]);
|
||||
ircsprintf(acptr->user->swhois, "%s", parv[2]);
|
||||
sendto_serv_butone_token(cptr, sptr->name,
|
||||
MSG_SWHOIS, TOK_SWHOIS, "%s :%s", parv[1], parv[2]);
|
||||
return 0;
|
||||
}
|
||||
/*
|
||||
@@ -1111,9 +1103,10 @@ int m_sendumode(cptr, sptr, parc, parv)
|
||||
case 'A':
|
||||
sendto_umode(UMODE_ADMIN, "%s", parv[2]);
|
||||
break;
|
||||
case '1':
|
||||
/* case '1':
|
||||
sendto_umode(UMODE_CODER, "%s", parv[2]);
|
||||
break;
|
||||
*/
|
||||
case 'I':
|
||||
sendto_umode(UMODE_HIDING, "%s", parv[2]);
|
||||
break;
|
||||
@@ -1126,6 +1119,11 @@ int m_sendumode(cptr, sptr, parc, parv)
|
||||
case 'T':
|
||||
sendto_umode(UMODE_TECHADMIN, "%s", parv[2]);
|
||||
break;
|
||||
case '*':
|
||||
sendto_all_butone(NULL, &me, ":%s NOTICE :%s",
|
||||
me.name, parv[2]);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
@@ -1239,7 +1237,7 @@ int m_tsctl(cptr, sptr, parc, parv)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
if (!IsULine(cptr, sptr))
|
||||
if (!IsULine(sptr))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -1258,54 +1256,6 @@ int m_tsctl(cptr, sptr, parc, parv)
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
** m_svso - Stskeeps
|
||||
** parv[0] = sender prefix
|
||||
** parv[1] = nick
|
||||
** parv[2] = options
|
||||
*/
|
||||
|
||||
int m_svso(cptr, sptr, parc, parv)
|
||||
aClient *cptr, *sptr;
|
||||
int parc;
|
||||
char *parv[];
|
||||
{
|
||||
aClient *acptr;
|
||||
long fLag;
|
||||
|
||||
if (!IsULine(cptr, sptr))
|
||||
return 0;
|
||||
|
||||
if (parc < 3)
|
||||
return 0;
|
||||
|
||||
if (!(acptr = find_client(parv[1], (aClient *)NULL)))
|
||||
return 0;
|
||||
|
||||
if (!MyClient(acptr))
|
||||
{
|
||||
sendto_one(acptr, ":%s SVSO %s %s", parv[0], parv[1], parv[2]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (*parv[2] == '-')
|
||||
{
|
||||
fLag = acptr->umodes;
|
||||
if (IsOper(acptr))
|
||||
IRCstats.operators--;
|
||||
acptr->umodes &=
|
||||
~(UMODE_OPER | UMODE_LOCOP | UMODE_HELPOP | UMODE_SERVICES |
|
||||
UMODE_SADMIN | UMODE_ADMIN);
|
||||
acptr->umodes &=
|
||||
~(UMODE_NETADMIN | UMODE_TECHADMIN | UMODE_CLIENT |
|
||||
UMODE_FLOOD | UMODE_EYES | UMODE_CHATOP | UMODE_WHOIS);
|
||||
acptr->umodes &=
|
||||
~(UMODE_KIX | UMODE_FCLIENT | UMODE_HIDING | UMODE_CODER |
|
||||
UMODE_DEAF | UMODE_HIDEOPER);
|
||||
acptr->oflag = 0;
|
||||
send_umode_out(acptr, acptr, fLag);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef GUEST
|
||||
int m_guest (cptr, sptr, parc, parv)
|
||||
@@ -1479,7 +1429,6 @@ int m_chgname(cptr, sptr, parc, parv)
|
||||
char *parv[];
|
||||
{
|
||||
aClient *acptr;
|
||||
char *s;
|
||||
|
||||
#ifdef DISABLE_USERMOD
|
||||
if (MyClient(sptr))
|
||||
@@ -1526,7 +1475,7 @@ int m_chgname(cptr, sptr, parc, parv)
|
||||
if ((acptr = find_person(parv[1], NULL)))
|
||||
{
|
||||
/* set the realname first to make n:line checking work */
|
||||
sprintf(acptr->info, "%s", parv[2]);
|
||||
ircsprintf(acptr->info, "%s", parv[2]);
|
||||
/* only check for n:lines if the person who's name is being changed is not an oper */
|
||||
if (!IsAnOper(acptr) && find_nline(acptr)) {
|
||||
int xx;
|
||||
@@ -1535,7 +1484,7 @@ int m_chgname(cptr, sptr, parc, parv)
|
||||
"Your GECOS (real name) is banned from this server");
|
||||
return xx;
|
||||
}
|
||||
if (!IsULine(cptr, sptr))
|
||||
if (!IsULine(sptr))
|
||||
{
|
||||
sendto_umode(UMODE_EYES,
|
||||
"%s changed the GECOS of %s (%s@%s) to be %s",
|
||||
@@ -1556,74 +1505,3 @@ int m_chgname(cptr, sptr, parc, parv)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CRYPTOIRCD
|
||||
/*
|
||||
* parv[0] = sender
|
||||
* parv[1] = algoritm (BLOWFISH, DES, RC5, etc)
|
||||
* parv[2] = keyfile
|
||||
* parv[3] = parameters, * if none
|
||||
*/
|
||||
int m_crypto(cptr, sptr, parc, parv)
|
||||
aClient *cptr, *sptr;
|
||||
int parc;
|
||||
char *parv[];
|
||||
{
|
||||
aClient *acptr;
|
||||
int method;
|
||||
FILE *f;
|
||||
char string[512], *s;
|
||||
|
||||
if (parc < 4)
|
||||
return 0;
|
||||
|
||||
if (!strcmp(parv[1], "BLOWFISH"))
|
||||
{
|
||||
method = METHOD_BLOWFISH;
|
||||
}
|
||||
else
|
||||
if (!strcmp(parv[1], "OFF"))
|
||||
{
|
||||
if (IsSecure(sptr))
|
||||
ClearSecure(sptr);
|
||||
|
||||
sendto_one(sptr, "CRYPTO ERROR :Secure connection breaked");
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
if (!strcmp(parv[1], "ON"))
|
||||
return 0;
|
||||
|
||||
if (method == METHOD_BLOWFISH)
|
||||
{
|
||||
if (strchr(parv[2], '/') || strchr(parv[2], '\\'))
|
||||
{
|
||||
sendto_one(sptr, "CRYPTO ERROR :Illegal keypath");
|
||||
return 0;
|
||||
}
|
||||
ircsprintf(string, "keys/%s", parv[2]);
|
||||
f = fopen(string, "r");
|
||||
if (!f)
|
||||
{
|
||||
sendto_one(sptr, "CRYPTO ERROR :Failed to open keyfile %s", parv[2]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
s = fgets(string, 510, f);
|
||||
if (!s)
|
||||
{
|
||||
sendto_one(sptr, "CRYPTO ERROR :Unable to read keyfile %s", parv[2]);
|
||||
return 0;
|
||||
}
|
||||
fclose(f);
|
||||
iCstrip(string);
|
||||
sptr->cryptinfo = (aCryptInfo *) MyMalloc(sizeof(aCryptInfo));
|
||||
sptr->cryptinfo->method = method;
|
||||
sptr->cryptinfo->key = (void *) MyMalloc(sizeof(BF_KEY));
|
||||
BF_set_key(sptr->cryptinfo->key, strlen(string), string);
|
||||
sendto_one(sptr, "CRYPTO ON BLOWFISH");
|
||||
SetSecure(sptr);
|
||||
return 0;
|
||||
}
|
||||
sendto_one(sptr, "CRYPTO ERROR :No such method/command %s", parv[1]);
|
||||
}
|
||||
#endif
|
||||
|
||||
+285
-152
File diff suppressed because it is too large
Load Diff
@@ -6,6 +6,7 @@
|
||||
#include "sys.h"
|
||||
#include "numeric.h"
|
||||
#include "h.h"
|
||||
#include <string.h>
|
||||
|
||||
static int hash(char *); /*
|
||||
|
||||
|
||||
+178
-90
@@ -37,7 +37,7 @@ static char sccsid[] =
|
||||
#ifdef _WIN32
|
||||
#include <io.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
|
||||
void vsendto_one(aClient *to, char *pattern, va_list vl);
|
||||
void sendbufto_one(aClient *to);
|
||||
@@ -50,6 +50,8 @@ extern fdlist oper_fdlist;
|
||||
#define NEWLINE "\r\n"
|
||||
|
||||
static char sendbuf[2048];
|
||||
static char tcmd[1024];
|
||||
static char ccmd[1024];
|
||||
|
||||
static int send_message PROTO((aClient *, char *, int));
|
||||
|
||||
@@ -87,7 +89,13 @@ static int dead_link(to, notice)
|
||||
DBufClear(&to->recvQ);
|
||||
DBufClear(&to->sendQ);
|
||||
if (!IsPerson(to) && !IsUnknown(to) && !(to->flags & FLAGS_CLOSING))
|
||||
(void)sendto_failops_whoare_opers(notice, get_client_name(to, FALSE));
|
||||
(void)sendto_failops_whoare_opers(notice, get_client_name(to, FALSE),
|
||||
#ifndef _WIN32
|
||||
strerror(errno));
|
||||
#else
|
||||
strerror(WSAGetLastError()));
|
||||
#endif
|
||||
|
||||
Debug((DEBUG_ERROR, notice, get_client_name(to, FALSE)));
|
||||
return -1;
|
||||
}
|
||||
@@ -120,6 +128,7 @@ void flush_connections(fd)
|
||||
|
||||
}
|
||||
/* flush an fdlist intelligently */
|
||||
#ifndef NO_FDLIST
|
||||
void flush_fdlist_connections(fdlist * listp)
|
||||
{
|
||||
int i, fd;
|
||||
@@ -131,7 +140,7 @@ void flush_fdlist_connections(fdlist * listp)
|
||||
&& DBufLength(&cptr->sendQ) > 0)
|
||||
send_queued(cptr);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
** send_queued
|
||||
@@ -166,7 +175,7 @@ int send_queued(to)
|
||||
msg = dbuf_map(&to->sendQ, &len);
|
||||
/* Returns always len > 0 */
|
||||
if ((rlen = deliver_it(to, msg, len)) < 0)
|
||||
return dead_link(to, "Write error to %s, closing link");
|
||||
return dead_link(to, "Write error to %s, closing link (%s)");
|
||||
(void)dbuf_delete(&to->sendQ, rlen);
|
||||
to->lastsq = DBufLength(&to->sendQ) / 1024;
|
||||
if (rlen < len)
|
||||
@@ -202,8 +211,6 @@ void vsendto_one(aClient *to, char *pattern, va_list vl)
|
||||
void sendbufto_one(aClient *to)
|
||||
{
|
||||
int len;
|
||||
char *s;
|
||||
int i;
|
||||
|
||||
Debug((DEBUG_ERROR, "Sending [%s] to %s", sendbuf, to->name));
|
||||
|
||||
@@ -242,16 +249,6 @@ void sendbufto_one(aClient *to)
|
||||
sendto_ops("Trying to send [%s] to myself!", tmp_sendbuf);
|
||||
return;
|
||||
}
|
||||
#ifdef CRYPTOIRCD
|
||||
if (IsSecure(to))
|
||||
{
|
||||
s = (char *) ep_encrypt(to, sendbuf, &len);
|
||||
bcopy(s, sendbuf, len);
|
||||
#ifdef DEVELOP
|
||||
sendto_ops("Sent off encrypted packet len %i", len);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
if (DBufLength(&to->sendQ) > get_sendq(to))
|
||||
{
|
||||
if (IsServer(to))
|
||||
@@ -345,7 +342,7 @@ void sendto_channelprefix_butone(aClient *one, aClient *from, aChannel *chptr,
|
||||
goto good;
|
||||
if ((prefix & 0x4) && (lp->flags & CHFL_CHANOP))
|
||||
goto good;
|
||||
bad:
|
||||
bad:
|
||||
continue;
|
||||
good:
|
||||
|
||||
@@ -370,6 +367,63 @@ void sendto_channelprefix_butone(aClient *one, aClient *from, aChannel *chptr,
|
||||
return;
|
||||
}
|
||||
|
||||
void sendto_channelprefix_butone_tok(aClient *one, aClient *from, aChannel *chptr,
|
||||
int prefix,
|
||||
char *cmd, char *tok, char *nick, char *text)
|
||||
{
|
||||
Link *lp;
|
||||
aClient *acptr;
|
||||
int i;
|
||||
|
||||
sprintf(tcmd, ":%s %s %s :%s", from->name, tok, nick, text);
|
||||
sprintf(ccmd, ":%s %s %s :%s", from->name, cmd, nick, text);
|
||||
for (i = 0; i < MAXCONNECTIONS; i++)
|
||||
sentalong[i] = 0;
|
||||
for (lp = chptr->members; lp; lp = lp->next)
|
||||
{
|
||||
acptr = lp->value.cptr;
|
||||
if (acptr->from == one)
|
||||
continue; /* ...was the one I should skip
|
||||
or user not not a channel op */
|
||||
if (prefix == 0)
|
||||
goto good;
|
||||
if ((prefix & 0x1) && (lp->flags & CHFL_HALFOP))
|
||||
goto good;
|
||||
if ((prefix & 0x2) && (lp->flags & CHFL_VOICE))
|
||||
goto good;
|
||||
if ((prefix & 0x4) && (lp->flags & CHFL_CHANOP))
|
||||
goto good;
|
||||
bad:
|
||||
continue;
|
||||
good:
|
||||
|
||||
i = acptr->from->fd;
|
||||
|
||||
if (MyConnect(acptr) && IsRegisteredUser(acptr) && !(IsDeaf(acptr)
|
||||
&& !(sendanyways == 1)))
|
||||
{
|
||||
sendto_prefix_one(acptr, from, ":%s %s %s :%s",
|
||||
from->name, cmd, nick, text);
|
||||
sentalong[i] = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Now check whether a message has been sent to this
|
||||
* remote link already */
|
||||
if ((sentalong[i] == 0) && ((!IsDeaf(acptr) && !(sendanyways == 1))))
|
||||
{
|
||||
if (IsToken(acptr->from))
|
||||
sendto_one(acptr, "%s", tcmd);
|
||||
else
|
||||
sendto_one(acptr, "%s", ccmd);
|
||||
sentalong[i] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
sendto_chanops_butone -Stskeeps
|
||||
*/
|
||||
@@ -586,8 +640,6 @@ void sendto_serv_butone_token(aClient *one, char *prefix, char *command,
|
||||
#ifndef NO_FDLIST
|
||||
int j;
|
||||
#endif
|
||||
static char tcmd[1024];
|
||||
static char ccmd[1024];
|
||||
static char buff[1024];
|
||||
static char pref[100];
|
||||
va_start(vl, pattern);
|
||||
@@ -669,7 +721,6 @@ void sendto_serv_butone_token_opt(aClient *one, int opt, char *prefix, char *com
|
||||
#ifndef NO_FDLIST
|
||||
int j;
|
||||
#endif
|
||||
char *p;
|
||||
static char tcmd[1024];
|
||||
static char ccmd[1024];
|
||||
static char buff[1024];
|
||||
@@ -728,6 +779,11 @@ void sendto_serv_butone_token_opt(aClient *one, int opt, char *prefix, char *com
|
||||
continue;
|
||||
if ((opt & OPT_SJ3) && !SupportSJ3(cptr))
|
||||
continue;
|
||||
if ((opt & OPT_SJB64) && !(cptr->proto & PROTO_SJB64))
|
||||
continue;
|
||||
if ((opt & OPT_NOT_SJB64) && (cptr->proto & PROTO_SJB64))
|
||||
continue;
|
||||
|
||||
if (IsToken(cptr))
|
||||
{
|
||||
if (SupportNS(cptr) && pref[0])
|
||||
@@ -1226,62 +1282,6 @@ void sendto_failops(char *pattern, ...)
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* sendto_chatops
|
||||
*
|
||||
* Send to *local* mode +b ops only.
|
||||
*/
|
||||
/*
|
||||
sendto_umode does just as good a job -- codemastr
|
||||
void sendto_chatops(char *pattern, ...)
|
||||
{
|
||||
va_list vl;
|
||||
aClient *cptr;
|
||||
int i;
|
||||
char nbuf[1024];
|
||||
|
||||
va_start(vl,pattern);
|
||||
for (i = 0; i <= highest_fd; i++)
|
||||
if ((cptr = local[i]) && !IsServer(cptr) && !IsMe(cptr) &&
|
||||
SendChatops(cptr))
|
||||
{
|
||||
(void)ircsprintf(nbuf, ":%s NOTICE %s :*** ChatOps -- ",
|
||||
me.name, cptr->name);
|
||||
(void)strncat(nbuf, pattern,
|
||||
sizeof(nbuf) - strlen(nbuf));
|
||||
vsendto_one(cptr, nbuf, vl);
|
||||
}
|
||||
va_end(vl);
|
||||
return;
|
||||
} */
|
||||
|
||||
/*
|
||||
* sendto_helpops
|
||||
*
|
||||
* Send to mode +h people
|
||||
*/
|
||||
void sendto_helpops(char *pattern, ...)
|
||||
{
|
||||
va_list vl;
|
||||
aClient *cptr;
|
||||
int i;
|
||||
char nbuf[1024];
|
||||
|
||||
va_start(vl, pattern);
|
||||
for (i = 0; i <= highest_fd; i++)
|
||||
if ((cptr = local[i]) && !IsServer(cptr) && !IsMe(cptr) &&
|
||||
IsHelpOp(cptr))
|
||||
{
|
||||
(void)ircsprintf(nbuf, ":%s NOTICE %s :*** HelpOp -- ",
|
||||
me.name, cptr->name);
|
||||
(void)strncat(nbuf, pattern,
|
||||
sizeof(nbuf) - strlen(nbuf));
|
||||
vsendto_one(cptr, nbuf, vl);
|
||||
}
|
||||
va_end(vl);
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* sendto_umode
|
||||
*
|
||||
@@ -1627,12 +1627,14 @@ void sendto_connectnotice(nick, user, sptr)
|
||||
char connectd[1024];
|
||||
char connecth[1024];
|
||||
ircsprintf(connectd,
|
||||
"*** Notice -- Client connecting on port %d: %s (%s@%s) %s",
|
||||
"*** Notice -- Client connecting on port %d: %s (%s@%s) %s%s%s",
|
||||
sptr->acpt->port, nick, user->username, user->realhost,
|
||||
#ifdef CRYPTOIRCD
|
||||
IsSecure(sptr) ? "[secure]" : "");
|
||||
#ifdef USE_SSL
|
||||
IsSecure(sptr) ? "[secure " : "",
|
||||
IsSecure(sptr) ? SSL_get_cipher((SSL *)sptr->ssl) : "",
|
||||
IsSecure(sptr) ? "]" : "");
|
||||
#else
|
||||
"");
|
||||
"", "", "");
|
||||
#endif
|
||||
ircsprintf(connecth,
|
||||
"*** Notice -- Client connecting: %s (%s@%s) [%s] {%d}", nick,
|
||||
@@ -1663,7 +1665,6 @@ void sendto_serv_butone_nickcmd(aClient *one, aClient *sptr,
|
||||
int lastnick, char *username, char *realhost, char *server,
|
||||
long servicestamp, char *info, char *umodes, char *virthost)
|
||||
{
|
||||
va_list vl;
|
||||
int i;
|
||||
aClient *cptr;
|
||||
#ifndef NO_FDLIST
|
||||
@@ -1685,14 +1686,29 @@ void sendto_serv_butone_nickcmd(aClient *one, aClient *sptr,
|
||||
{
|
||||
if (SupportNICKv2(cptr))
|
||||
{
|
||||
sendto_one(cptr,
|
||||
"%s %s %d %d %s %s %s %lu %s %s :%s",
|
||||
(IsToken(cptr) ? TOK_NICK : MSG_NICK), nick,
|
||||
hopcount, lastnick, username, realhost,
|
||||
SupportNS(cptr) && sptr->srvptr->serv->numeric ? base64enc(sptr->srvptr->serv->numeric) : server,
|
||||
servicestamp, umodes,
|
||||
(SupportVHP(cptr) ? (IsHidden(sptr) ? sptr->user->virthost : realhost) : virthost),
|
||||
info);
|
||||
if (sptr->srvptr->serv->numeric && SupportNS(cptr))
|
||||
sendto_one(cptr,
|
||||
(cptr->proto & PROTO_SJB64) ?
|
||||
"%s %s %d %B %s %s %b %lu %s %s :%s"
|
||||
:
|
||||
"%s %s %d %d %s %s %b %lu %s %s :%s"
|
||||
,
|
||||
(IsToken(cptr) ? TOK_NICK : MSG_NICK), nick,
|
||||
hopcount, lastnick, username, realhost,
|
||||
sptr->srvptr->serv->numeric,
|
||||
servicestamp, umodes,
|
||||
(SupportVHP(cptr) ? (IsHidden(sptr) ? sptr->user->virthost : realhost) : virthost),
|
||||
info);
|
||||
else
|
||||
sendto_one(cptr,
|
||||
"%s %s %d %d %s %s %s %lu %s %s :%s",
|
||||
(IsToken(cptr) ? TOK_NICK : MSG_NICK), nick,
|
||||
hopcount, lastnick, username, realhost,
|
||||
SupportNS(cptr) && sptr->srvptr->serv->numeric ? base64enc(sptr->srvptr->serv->numeric) : server,
|
||||
servicestamp, umodes,
|
||||
(SupportVHP(cptr) ? (IsHidden(sptr) ? sptr->user->virthost : realhost) : virthost),
|
||||
info);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1718,7 +1734,6 @@ void sendto_serv_butone_nickcmd(aClient *one, aClient *sptr,
|
||||
}
|
||||
}
|
||||
}
|
||||
va_end(vl);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1732,3 +1747,76 @@ void sendto_message_one(aClient *to, aClient *from, char *sender,
|
||||
sendto_prefix_one(to, from, ":%s %s %s :%s",
|
||||
sender, cmd, nick, msg);
|
||||
}
|
||||
|
||||
/* The following functions are for +/-I -- codemastr */
|
||||
|
||||
void sendto_channels_inviso_join(aClient *user)
|
||||
{
|
||||
Link *channels;
|
||||
Link *users;
|
||||
aClient *cptr;
|
||||
|
||||
memset((char *)sentalong, '\0', sizeof(sentalong));
|
||||
if (user->fd >= 0)
|
||||
sentalong[user->fd] = 1;
|
||||
if (user->user)
|
||||
for (channels = user->user->channel; channels; channels = channels->next)
|
||||
for (users = channels->value.chptr->members; users; users = users->next)
|
||||
{
|
||||
cptr = users->value.cptr;
|
||||
if (!MyConnect(cptr) || IsTechAdmin(cptr) || IsNetAdmin(cptr) || sentalong[cptr->fd] || cptr == user)
|
||||
continue;
|
||||
sentalong[cptr->fd]++;
|
||||
sendto_one(cptr, ":%s!%s@%s JOIN :%s", user->name, user->user->username,
|
||||
(IsHidden(user) ? user->user->virthost : user->user->realhost), channels->value.chptr->chname);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void sendto_channels_inviso_part(aClient *user)
|
||||
{
|
||||
Link *channels;
|
||||
Link *users;
|
||||
aClient *cptr;
|
||||
|
||||
memset((char *)sentalong, '\0', sizeof(sentalong));
|
||||
if (user->fd >= 0)
|
||||
sentalong[user->fd] = 1;
|
||||
if (user->user)
|
||||
for (channels = user->user->channel; channels; channels = channels->next)
|
||||
for (users = channels->value.chptr->members; users; users = users->next)
|
||||
{
|
||||
cptr = users->value.cptr;
|
||||
if (!MyConnect(cptr) || IsTechAdmin(cptr) || IsNetAdmin(cptr) || sentalong[cptr->fd] || cptr == user)
|
||||
continue;
|
||||
sentalong[cptr->fd]++;
|
||||
sendto_one(cptr, ":%s!%s@%s PART :%s", user->name, user->user->username, (IsHidden(user) ? user->user->virthost : user->user->realhost), channels->value.chptr->chname);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void sendto_channel_ntadmins(aClient *from, aChannel *chptr, char *pattern, ...)
|
||||
{
|
||||
va_list vl;
|
||||
Link *lp;
|
||||
aClient *acptr;
|
||||
int i;
|
||||
|
||||
va_start(vl, pattern);
|
||||
++sentalong_marker;
|
||||
for (lp = chptr->members; lp; lp = lp->next)
|
||||
{
|
||||
acptr = lp->value.cptr;
|
||||
if (acptr->from == from || !(IsNetAdmin(acptr) || IsTechAdmin(acptr)) || (IsDeaf(acptr) && !(sendanyways == 1)))
|
||||
continue;
|
||||
if (MyConnect(acptr)) /* (It is always a client) */
|
||||
vsendto_prefix_one(acptr, from, pattern, vl);
|
||||
else if (sentalong[(i = acptr->from->fd)] != sentalong_marker)
|
||||
{
|
||||
sentalong[i] = sentalong_marker;
|
||||
vsendto_prefix_one(acptr, from, pattern, vl);
|
||||
}
|
||||
}
|
||||
va_end(vl);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,229 @@
|
||||
/************************************************************************
|
||||
* Unreal Internet Relay Chat Daemon, src/ssl.c
|
||||
* (C) 2000 hq.alert.sk (base)
|
||||
* (C) 2000 Carsten V. Munk <stskeeps@tspre.org>
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#ifdef USE_SSL
|
||||
|
||||
#include "struct.h"
|
||||
|
||||
/* The SSL structures */
|
||||
SSL_CTX *ctx_server;
|
||||
SSL_CTX *ctx_client;
|
||||
|
||||
#define CHK_SSL(err) if ((err)==-1) { ERR_print_errors_fp(stderr); }
|
||||
|
||||
void init_ctx_server(void)
|
||||
{
|
||||
ctx_server = SSL_CTX_new(SSLv23_server_method());
|
||||
if (!ctx_server)
|
||||
{
|
||||
ircd_log("Failed to do SSL CTX new");
|
||||
exit(2);
|
||||
}
|
||||
|
||||
if (SSL_CTX_use_certificate_file(ctx_server, CERTF, SSL_FILETYPE_PEM) <= 0)
|
||||
{
|
||||
ircd_log("Failed to load SSL certificate %s", CERTF);
|
||||
exit(3);
|
||||
}
|
||||
if (SSL_CTX_use_PrivateKey_file(ctx_server, KEYF, SSL_FILETYPE_PEM) <= 0)
|
||||
{
|
||||
ircd_log("Failed to load SSL private key %s", KEYF);
|
||||
exit(4);
|
||||
}
|
||||
|
||||
if (!SSL_CTX_check_private_key(ctx_server))
|
||||
{
|
||||
ircd_log("Failed to check SSL private key");
|
||||
exit(5);
|
||||
}
|
||||
}
|
||||
|
||||
void init_ctx_client(void)
|
||||
{
|
||||
ctx_client = SSL_CTX_new(SSLv3_client_method());
|
||||
if (!ctx_client)
|
||||
{
|
||||
ircd_log("Failed to do SSL CTX new client");
|
||||
exit(2);
|
||||
}
|
||||
|
||||
if (SSL_CTX_use_certificate_file(ctx_client, CERTF, SSL_FILETYPE_PEM) <= 0)
|
||||
{
|
||||
ircd_log("Failed to load SSL certificate %s (client)", CERTF);
|
||||
exit(3);
|
||||
}
|
||||
if (SSL_CTX_use_PrivateKey_file(ctx_client, KEYF, SSL_FILETYPE_PEM) <= 0)
|
||||
{
|
||||
ircd_log("Failed to load SSL private key %s (client)", KEYF);
|
||||
exit(4);
|
||||
}
|
||||
|
||||
if (!SSL_CTX_check_private_key(ctx_client))
|
||||
{
|
||||
ircd_log("Failed to check SSL private key (client)");
|
||||
exit(5);
|
||||
}
|
||||
}
|
||||
|
||||
void init_ssl()
|
||||
{
|
||||
/* SSL preliminaries. We keep the certificate and key with the context. */
|
||||
|
||||
SSL_load_error_strings();
|
||||
SSLeay_add_ssl_algorithms();
|
||||
init_ctx_server();
|
||||
init_ctx_client();
|
||||
}
|
||||
|
||||
#define CHK_NULL(x) if ((x)==NULL) {\
|
||||
sendto_umode(UMODE_JUNK, "Lost connection to %s:Error in SSL", \
|
||||
get_client_name(cptr, TRUE)); \
|
||||
return 0;\
|
||||
}
|
||||
|
||||
int ssl_handshake(aClient *cptr)
|
||||
{
|
||||
char *str;
|
||||
int err;
|
||||
|
||||
cptr->ssl = (struct SSL *)SSL_new(ctx_server);
|
||||
CHK_NULL(cptr->ssl);
|
||||
SSL_set_fd((SSL *) cptr->ssl, cptr->fd);
|
||||
set_non_blocking(cptr->fd, cptr);
|
||||
err = SSL_accept((SSL *) cptr->ssl);
|
||||
if ((err) == -1)
|
||||
{
|
||||
sendto_umode(UMODE_JUNK, "Lost connection to %s:Error in SSL_accept()",
|
||||
get_client_name(cptr, TRUE));
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Get client's certificate (note: beware of dynamic
|
||||
* allocation) - opt */
|
||||
/* We do not do this -Stskeeps */
|
||||
|
||||
#ifdef NO_CERTCHECKING
|
||||
cptr->client_cert =
|
||||
(struct X509 *)SSL_get_peer_certificate((SSL *) cptr->ssl);
|
||||
|
||||
if (cptr->client_cert != NULL)
|
||||
{
|
||||
// log (L_DEBUG,"Client certificate:\n");
|
||||
|
||||
str =
|
||||
X509_NAME_oneline(X509_get_subject_name((X509 *) cptr->
|
||||
client_cert), 0, 0);
|
||||
CHK_NULL(str);
|
||||
// log (L_DEBUG, "\t subject: %s\n", str);
|
||||
free(str);
|
||||
|
||||
str =
|
||||
X509_NAME_oneline(X509_get_issuer_name((X509 *) cptr->
|
||||
client_cert), 0, 0);
|
||||
CHK_NULL(str);
|
||||
// log (L_DEBUG, "\t issuer: %s\n", str);
|
||||
free(str);
|
||||
|
||||
/* We could do all sorts of certificate
|
||||
* verification stuff here before
|
||||
* deallocating the certificate. */
|
||||
|
||||
X509_free((X509 *) cptr->client_cert);
|
||||
}
|
||||
else
|
||||
{
|
||||
// log (L_DEBUG, "Client does not have certificate.\n");
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
|
||||
}
|
||||
/*
|
||||
ssl_client_handshake
|
||||
This will initiate a client SSL_connect
|
||||
|
||||
-Stskeeps
|
||||
|
||||
Return values:
|
||||
-1 = Could not SSL_new
|
||||
-2 = Error doing SSL_connect
|
||||
-3 = Try again
|
||||
*/
|
||||
int ssl_client_handshake(aClient *cptr)
|
||||
{
|
||||
cptr->ssl = (struct SSL *) SSL_new((SSL_CTX *)ctx_client);
|
||||
if (!cptr->ssl)
|
||||
{
|
||||
sendto_realops("Couldn't SSL_new(ctx_client) on %s",
|
||||
get_client_name(cptr, FALSE));
|
||||
return -1;
|
||||
}
|
||||
set_blocking(cptr->fd);
|
||||
SSL_set_fd((SSL *)cptr->ssl, cptr->fd);
|
||||
SSL_set_connect_state((SSL *)cptr->ssl);
|
||||
if (SSL_connect((SSL *)cptr->ssl) <= 0)
|
||||
{
|
||||
sendto_realops("Couldn't SSL_connect");
|
||||
return -2;
|
||||
}
|
||||
set_non_blocking(cptr);
|
||||
cptr->flags |= FLAGS_SSL;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* This is a bit homemade to fix IRCd's cleaning madness -- Stskeeps */
|
||||
int SSL_change_fd(SSL *s, int fd)
|
||||
{
|
||||
BIO_set_fd(SSL_get_rbio(s), fd, BIO_NOCLOSE);
|
||||
BIO_set_fd(SSL_get_wbio(s), fd, BIO_NOCLOSE);
|
||||
return 1;
|
||||
}
|
||||
|
||||
char *ssl_get_cipher(SSL *ssl)
|
||||
{
|
||||
static char buf[400];
|
||||
int bits;
|
||||
SSL_CIPHER *c;
|
||||
|
||||
buf[0] = '\0';
|
||||
switch(ssl->session->ssl_version)
|
||||
{
|
||||
case SSL2_VERSION:
|
||||
strcat(buf, "SSLv2"); break;
|
||||
case SSL3_VERSION:
|
||||
strcat(buf, "SSLv3"); break;
|
||||
case TLS1_VERSION:
|
||||
strcat(buf, "TLSv1"); break;
|
||||
default:
|
||||
strcat(buf, "UNKNOWN");
|
||||
}
|
||||
strcat(buf, "-");
|
||||
strcat(buf, SSL_get_cipher(ssl));
|
||||
c = SSL_get_current_cipher(ssl);
|
||||
SSL_CIPHER_get_bits(c, &bits);
|
||||
strcat(buf, "-");
|
||||
strcat(buf, my_itoa(bits));
|
||||
strcat(buf, "bits");
|
||||
return (buf);
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
# create RSA certs - Server
|
||||
|
||||
RANDFILE = src/ssl.rnd
|
||||
|
||||
[ req ]
|
||||
default_bits = 1024
|
||||
encrypt_key = yes
|
||||
distinguished_name = req_dn
|
||||
x509_extensions = cert_type
|
||||
|
||||
[ req_dn ]
|
||||
countryName = Country Name
|
||||
countryName_default = US
|
||||
countryName_min = 2
|
||||
countryName_max = 2
|
||||
|
||||
stateOrProvinceName = State/Province
|
||||
stateOrProvinceName_default = New York
|
||||
|
||||
localityName = Locality Name (eg, city)
|
||||
|
||||
0.organizationName = Organization Name (eg, company)
|
||||
0.organizationName_default = IRC geeks
|
||||
|
||||
organizationalUnitName = Organizational Unit Name (eg, section)
|
||||
organizationalUnitName_default = IRCd
|
||||
|
||||
0.commonName = Common Name (Full domain of your server)
|
||||
1.commonName_value = localhost
|
||||
|
||||
[ cert_type ]
|
||||
nsCertType = server
|
||||
|
||||
BIN
Binary file not shown.
+60
-1
@@ -30,6 +30,7 @@ static char sccsid[] = "@(#)support.c 2.21 4/13/94 1990, 1991 Armin Gruner;\
|
||||
#ifdef _WIN32
|
||||
#include <io.h>
|
||||
#else
|
||||
#include <string.h>
|
||||
|
||||
|
||||
extern int errno; /* ...seems that errno.h doesn't define this everywhere */
|
||||
@@ -38,6 +39,14 @@ extern void outofmemory();
|
||||
|
||||
#define is_enabled match
|
||||
|
||||
long TS2ts(char *s)
|
||||
{
|
||||
if (*s == '!')
|
||||
return (xbase64dec(s + 1));
|
||||
else
|
||||
return (atoi(s));
|
||||
}
|
||||
|
||||
char *my_itoa(int i)
|
||||
{
|
||||
static char buf[128];
|
||||
@@ -193,7 +202,7 @@ int inet_netof(in)
|
||||
|
||||
#endif /* NEED_INET_NETOF */
|
||||
|
||||
|
||||
#ifndef DMALLOC
|
||||
#if defined(DEBUGMODE)
|
||||
void dumpcore(msg, p1, p2, p3, p4, p5, p6, p7, p8, p9)
|
||||
char *msg, *p1, *p2, *p3, *p4, *p5, *p6, *p7, *p8, *p9;
|
||||
@@ -278,6 +287,7 @@ char *MyMalloc(x)
|
||||
char *MyRealloc(x, y)
|
||||
char *x;
|
||||
size_t y;
|
||||
|
||||
{
|
||||
int l;
|
||||
char **s;
|
||||
@@ -396,6 +406,7 @@ char *MyRealloc(x, y)
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
/*
|
||||
* * read a string terminated by \r or \n in from a fd *
|
||||
*
|
||||
@@ -581,3 +592,51 @@ char *inetntop(af, in, out, the_size)
|
||||
return out;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Made by Potvin originally, i guess */
|
||||
time_t atime_exp(char *base, char *ptr)
|
||||
{
|
||||
time_t tmp;
|
||||
char *p, c = *ptr;
|
||||
|
||||
p = ptr;
|
||||
*ptr-- = '\0';
|
||||
while (ptr-- > base)
|
||||
if (isalpha(*ptr))
|
||||
break;
|
||||
tmp = atoi(ptr + 1);
|
||||
*p = c;
|
||||
|
||||
return tmp;
|
||||
}
|
||||
|
||||
#define Xtract(x, y) if (x) y = atime_exp(xtime, x)
|
||||
|
||||
time_t atime(char *xtime)
|
||||
{
|
||||
char *d, *h, *m, *s;
|
||||
time_t D, H, M, S;
|
||||
int i;
|
||||
|
||||
d = h = m = s = NULL;
|
||||
D = H = M = S = 0;
|
||||
|
||||
|
||||
i = 0;
|
||||
for (d = xtime; *d; d++)
|
||||
if (isalpha(*d) && (i != 1))
|
||||
i = 1;
|
||||
if (i == 0)
|
||||
return (atol(xtime));
|
||||
d = strchr(xtime, 'd');
|
||||
h = strchr(xtime, 'h');
|
||||
m = strchr(xtime, 'm');
|
||||
s = strchr(xtime, 's');
|
||||
|
||||
Xtract(d, D);
|
||||
Xtract(h, H);
|
||||
Xtract(m, M);
|
||||
Xtract(s, S);
|
||||
|
||||
return ((D * 86400) + (H * 3600) + (M * 60) + S);
|
||||
}
|
||||
|
||||
+19
-12
@@ -97,9 +97,9 @@ char *unrealcredits[] =
|
||||
"{X} (Laurie) x@tspre.org",
|
||||
"- Making the main code/design of UnrealIRCd/32 gui",
|
||||
" bugfounds, etc",
|
||||
"SourceForge.net",
|
||||
"- Good hosting, CVS hosting, FTP etc etc:) - thanks for",
|
||||
" supporting opensource projects",
|
||||
"CC2IS Internet Services (http://www.cc2is.com)",
|
||||
"- Hosting development shells and unrealircd.com, .org - thanks for",
|
||||
" supporting the UnrealIRCd project",
|
||||
"",
|
||||
"noriko noriko@linuxsquare.net",
|
||||
"- Giving us an OpenBSD shell to develop on :)",
|
||||
@@ -120,8 +120,8 @@ char *unrealcredits[] =
|
||||
"SirDeath, l33, EiniD, uo, RevPsych and the subgenius.net network,",
|
||||
"^RavenX^, Mich[a]el, {X}, Fish, Shmad, Killer, BrainSCAN, RevNull,",
|
||||
"GoNiS, Mikey, DrBin, rapta, crow, SevenEagle, Curt|s, Scooter,",
|
||||
"auspice",
|
||||
"",
|
||||
"auspice, RaYmAn, Taz, HERZ, Pique, ROXnet, trinity, script0r",
|
||||
"BiGi, [ins4ne]",
|
||||
"",
|
||||
" \2\37Stskeeps would like to thank:\2\37",
|
||||
"Morrigan Julie Frederiksen",
|
||||
@@ -139,7 +139,11 @@ char *unrealcredits[] =
|
||||
" and many other stuff. You'll always be in my heart,",
|
||||
" sorry for all the things I did or maybe didn't",
|
||||
" love you :(",
|
||||
"SL7 Steve Lake sl7@global-irc.net",
|
||||
"M_Girly Michelle Howie *grin*",
|
||||
" - Always with me, always in my heart, since the very start",
|
||||
" Thanks for being a friend in so many years, I hope I will",
|
||||
" never see your tears..",
|
||||
"SL7 Steve Lake sl7 @ austnet.org",
|
||||
" - Bug testing, comments, lotsa ideas, wierd reactions,",
|
||||
" making Apollo, supporting Unreal and other freakout",
|
||||
" thingies, being a general wierdoe etc. ",
|
||||
@@ -156,8 +160,14 @@ char *unrealcredits[] =
|
||||
"Skywalker Chris Morley skywalker@irc.ru.ac.za",
|
||||
" - Helping me start up ROXnet at first (which brought me",
|
||||
" into IRCd business.. + Numerous kicks /Kills akills and alike;)",
|
||||
"* Alexander Over alexander@over.de",
|
||||
" - /botserv patch",
|
||||
"zero9000 Kevin Alford",
|
||||
" - UnrealIRCd logo, graphics, null desu ;), ideas etc.",
|
||||
"jfc John Crowhurst",
|
||||
" - For us being able to use his wonder-box to code on and host CVS on",
|
||||
"HERZ",
|
||||
" - For proving me wrong in the beta phases....",
|
||||
" \2\37codemastr would like to thank:\2\37",
|
||||
"CaliMonk Ivo Teel calimonk@axenet.org",
|
||||
" - Getting me started at NeoHorizon which basically got me",
|
||||
@@ -174,12 +184,7 @@ char *unrealcredits[] =
|
||||
"zero9000, #wIRCd@DALnet, comstud, dog3, Dianora, Isomer, and others who arent listed here:)",
|
||||
"",
|
||||
"------------------------------------------------------",
|
||||
"Unreal 3.0, and 3.1 and up is dedicated to Morrigan - Julie Frederiksen",
|
||||
"- a girl who have helped me through anything in my life, hugging",
|
||||
"me at the right times, a definate dedication. Thanks for the kisses",
|
||||
"long phonetalks, waste of my mobilephone ;), crying together",
|
||||
"and making life go on for us both. I will never forget you",
|
||||
"never leave you, love ya forever",
|
||||
"Unreal 3.0, 3.1, 3.1.1 and up is dedicated to Morrigan",
|
||||
"------------------------------------------------------",
|
||||
"This IRCd is dedicated to the love that has always been",
|
||||
"and will always be there - Thanks to the girls & friends that kept me up",
|
||||
@@ -237,6 +242,8 @@ char *dalinfotext[] =
|
||||
"RogerY Roger Y. rogery@austnet.org",
|
||||
"GZ gz@starchat.net",
|
||||
"binary ",
|
||||
"Dianora Diane Bruce",
|
||||
"lucas",
|
||||
"Roar Thronaas <roart@nvg.ntnu.no> added IPv6 support.",
|
||||
"",
|
||||
"",
|
||||
|
||||
+387
@@ -0,0 +1,387 @@
|
||||
/************************************************************************
|
||||
* Unreal Internet Relay Chat Daemon, src/webtv.c
|
||||
* (C) Carsten V. Munk (Stskeeps <stskeeps@tspre.org>) 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.
|
||||
*/
|
||||
|
||||
#include "struct.h"
|
||||
#include "common.h"
|
||||
#include "sys.h"
|
||||
#include "numeric.h"
|
||||
#include "msg.h"
|
||||
#include "channel.h"
|
||||
#include "userload.h"
|
||||
#include "version.h"
|
||||
#include <time.h>
|
||||
#include <sys/stat.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#ifdef _WIN32
|
||||
#include <io.h>
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
#include "h.h"
|
||||
#include "proto.h"
|
||||
|
||||
ID_Copyright("(C) Carsten Munk 2000");
|
||||
|
||||
extern ircstats IRCstats;
|
||||
|
||||
typedef struct zMessage aMessage;
|
||||
struct zMessage {
|
||||
char *command;
|
||||
int (*func) ();
|
||||
int maxpara;
|
||||
};
|
||||
|
||||
|
||||
int w_whois(aClient *cptr, aClient *sptr, int parc, char *parv[]);
|
||||
|
||||
aMessage webtv_cmds[] =
|
||||
{
|
||||
{"WHOIS", w_whois, 15},
|
||||
{NULL, 0, 15}
|
||||
};
|
||||
|
||||
|
||||
int webtv_parse(aClient *sptr, char *string)
|
||||
{
|
||||
char *cmd = NULL, *s = NULL;
|
||||
int i;
|
||||
aMessage *message = webtv_cmds;
|
||||
static char *para[16];
|
||||
|
||||
if (!string || !*string)
|
||||
{
|
||||
sendto_one(sptr, ":IRC %s %s :No command given", MSG_PRIVATE, sptr->name);
|
||||
return;
|
||||
}
|
||||
|
||||
cmd = strtok(string, " ");
|
||||
if (!cmd)
|
||||
return -2;
|
||||
|
||||
for (message = webtv_cmds; message->command; message++)
|
||||
if (strcasecmp(message->command, cmd) == 0)
|
||||
break;
|
||||
|
||||
if (!message->command || !message->func)
|
||||
{
|
||||
/* sendto_one(sptr, ":IRC %s %s :Sorry, \"%s\" is an unknown command to me",
|
||||
MSG_PRIVATE, sptr->name, cmd); */
|
||||
/* restore the string*/
|
||||
cmd[strlen(cmd)]= ' ';
|
||||
return -2;
|
||||
}
|
||||
|
||||
i = 0;
|
||||
s = strtok(NULL, "");
|
||||
if (s)
|
||||
{
|
||||
if (message->maxpara > 15)
|
||||
message->maxpara = 15;
|
||||
for (;;)
|
||||
{
|
||||
/*
|
||||
** Never "FRANCE " again!! ;-) Clean
|
||||
** out *all* blanks.. --msa
|
||||
*/
|
||||
while (*s == ' ')
|
||||
*s++ = '\0';
|
||||
|
||||
if (*s == '\0')
|
||||
break;
|
||||
if (*s == ':')
|
||||
{
|
||||
/*
|
||||
** The rest is single parameter--can
|
||||
** include blanks also.
|
||||
*/
|
||||
para[++i] = s + 1;
|
||||
break;
|
||||
}
|
||||
para[++i] = s;
|
||||
if (i >= message->maxpara)
|
||||
break;
|
||||
for (; *s != ' ' && *s; s++)
|
||||
;
|
||||
}
|
||||
}
|
||||
para[++i] = NULL;
|
||||
|
||||
(*message->func) (sptr->from, sptr, i, para);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int w_whois(aClient *cptr, aClient *sptr, int parc, char *parv[])
|
||||
{
|
||||
static anUser UnknownUser = {
|
||||
NULL, /* nextu */
|
||||
NULL, /* channel */
|
||||
NULL, /* invited */
|
||||
NULL, /* silence */
|
||||
NULL, /* away */
|
||||
0, /* last */
|
||||
0, /* servicestamp */
|
||||
1, /* refcount */
|
||||
0, /* joined */
|
||||
"<Unknown>", /* username */
|
||||
"<Unknown>", /* host */
|
||||
"<Unknown>" /* server */
|
||||
};
|
||||
Link *lp;
|
||||
anUser *user;
|
||||
aClient *acptr, *a2cptr;
|
||||
aChannel *chptr;
|
||||
char *nick, *tmp, *name;
|
||||
char *p = NULL;
|
||||
char buf[512];
|
||||
int found, len, mlen;
|
||||
|
||||
if (parc < 2)
|
||||
{
|
||||
sendto_one(sptr, ":IRC %s %s :Syntax error, correct is WHOIS <nick>",
|
||||
MSG_PRIVATE, sptr->name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (tmp = parv[1]; (nick = strtoken(&p, tmp, ",")); tmp = NULL)
|
||||
{
|
||||
int invis, showsecret, showperson, member, wilds;
|
||||
|
||||
found = 0;
|
||||
(void)collapse(nick);
|
||||
wilds = (index(nick, '?') || index(nick, '*'));
|
||||
if (wilds)
|
||||
continue;
|
||||
|
||||
for (acptr = client; (acptr = next_client(acptr, nick));
|
||||
acptr = acptr->next)
|
||||
{
|
||||
if (IsServer(acptr))
|
||||
continue;
|
||||
/*
|
||||
* I'm always last :-) and acptr->next == NULL!!
|
||||
*/
|
||||
if (IsMe(acptr))
|
||||
break;
|
||||
/*
|
||||
* 'Rules' established for sending a WHOIS reply:
|
||||
*
|
||||
* - only allow a remote client to get replies for
|
||||
* local clients if wildcards are being used;
|
||||
*
|
||||
* - if wildcards are being used dont send a reply if
|
||||
* the querier isnt any common channels and the
|
||||
* client in question is invisible and wildcards are
|
||||
* in use (allow exact matches only);
|
||||
*
|
||||
* - only send replies about common or public channels
|
||||
* the target user(s) are on;
|
||||
*/
|
||||
if (!MyConnect(sptr) && !MyConnect(acptr) && wilds)
|
||||
continue;
|
||||
user = acptr->user ? acptr->user : &UnknownUser;
|
||||
name = (!*acptr->name) ? "?" : acptr->name;
|
||||
|
||||
invis = acptr != sptr && IsInvisible(acptr);
|
||||
member = (user->channel) ? 1 : 0;
|
||||
showperson = (wilds && !invis && !member) || !wilds;
|
||||
|
||||
for (lp = user->channel; lp; lp = lp->next)
|
||||
{
|
||||
chptr = lp->value.chptr;
|
||||
member = IsMember(sptr, chptr);
|
||||
if (invis && !member)
|
||||
continue;
|
||||
if (member || (!invis && PubChannel(chptr)))
|
||||
{
|
||||
showperson = 1;
|
||||
break;
|
||||
}
|
||||
if (!invis && HiddenChannel(chptr) &&
|
||||
!SecretChannel(chptr))
|
||||
showperson = 1;
|
||||
else if (IsAnOper(sptr) && SecretChannel(chptr)) {
|
||||
showperson = 1;
|
||||
showsecret = 1;
|
||||
}
|
||||
}
|
||||
if (!showperson)
|
||||
continue;
|
||||
a2cptr = find_server_quick(user->server);
|
||||
|
||||
if (!IsPerson(acptr))
|
||||
continue;
|
||||
sendto_one(sptr, ":IRC PRIVMSG %s :WHOIS information for %s", sptr->name, acptr->name);
|
||||
if (IsWhois(acptr))
|
||||
{
|
||||
sendto_one(acptr,
|
||||
":%s NOTICE %s :*** %s (%s@%s) did a /whois on you.",
|
||||
me.name, acptr->name, sptr->name,
|
||||
sptr->user->username,
|
||||
IsHidden(acptr) ? sptr->user->
|
||||
virthost : sptr->user->realhost);
|
||||
}
|
||||
|
||||
sendto_one(sptr, ":IRC PRIVMSG %s :%s is %s@%s * %s", sptr->name,
|
||||
name, user->username,
|
||||
IsHidden(acptr) ? user->virthost : user->realhost,
|
||||
acptr->info);
|
||||
|
||||
if (IsEyes(sptr))
|
||||
{
|
||||
/* send the target user's modes */
|
||||
sendto_one(sptr, ":IRC PRIVMSG %s :%s uses modes %s",
|
||||
sptr->name, acptr->name, get_mode_str(acptr));
|
||||
}
|
||||
if (IsAnOper(sptr) && IsHidden(acptr) ||
|
||||
acptr == sptr && IsHidden(sptr))
|
||||
{
|
||||
sendto_one(sptr, ":IRC PRIVMSG %s :%s is connecting from %s",
|
||||
sptr->name, acptr->name,
|
||||
acptr->user->realhost);
|
||||
}
|
||||
if (IsARegNick(acptr))
|
||||
sendto_one(sptr, ":IRC PRIVMSG %s :%s is a registered nick",
|
||||
sptr->name, name);
|
||||
found = 1;
|
||||
mlen = strlen(me.name) + strlen(sptr->name) + 6 +
|
||||
strlen(name);
|
||||
for (len = 0, *buf = '\0', lp = user->channel; lp;
|
||||
lp = lp->next)
|
||||
{
|
||||
chptr = lp->value.chptr;
|
||||
if (IsAnOper(sptr) || ShowChannel(sptr, chptr) || (acptr == sptr))
|
||||
{
|
||||
if (len + strlen(chptr->chname)
|
||||
> (size_t)BUFSIZE - 4 - mlen)
|
||||
{
|
||||
sendto_one(sptr,
|
||||
":IRC PRIVMSG %s :%s is on %s",
|
||||
sptr->name, name, buf);
|
||||
*buf = '\0';
|
||||
len = 0;
|
||||
}
|
||||
if (!(acptr == sptr) && IsAnOper(sptr)
|
||||
&& (showsecret == 1) && SecretChannel(chptr))
|
||||
*(buf + len++) = '~';
|
||||
if (is_chanowner(acptr, chptr))
|
||||
*(buf + len++) = '*';
|
||||
else if (is_chanprot(acptr, chptr))
|
||||
*(buf + len++) = '^';
|
||||
else if (is_chan_op(acptr, chptr))
|
||||
*(buf + len++) = '@';
|
||||
else if (is_half_op(acptr, chptr))
|
||||
*(buf + len++) = '%';
|
||||
else if (has_voice(acptr, chptr))
|
||||
*(buf + len++) = '+';
|
||||
if (len)
|
||||
*(buf + len) = '\0';
|
||||
(void)strcpy(buf + len, chptr->chname);
|
||||
len += strlen(chptr->chname);
|
||||
(void)strcat(buf + len, " ");
|
||||
len++;
|
||||
}
|
||||
}
|
||||
|
||||
if (buf[0] != '\0' && !IsULine(acptr) && (!IsHiding(acptr) ||
|
||||
IsNetAdmin(sptr) || IsTechAdmin(sptr) || sptr == acptr))
|
||||
sendto_one(sptr,
|
||||
":IRC PRIVMSG %s :%s is on %s",
|
||||
sptr->name, name, buf);
|
||||
|
||||
sendto_one(sptr, ":IRC PRIVMSG %s :%s is on irc via %s %s",
|
||||
sptr->name, name, user->server,
|
||||
a2cptr ? a2cptr->info : "*Not On This Net*");
|
||||
|
||||
if (user->away)
|
||||
sendto_one(sptr, ":IRC PRIVMSG %s :%s is away: %s",
|
||||
sptr->name, name, user->away);
|
||||
/* makesure they aren't +H (we'll also check
|
||||
before we display a helpop or IRCD Coder msg)
|
||||
-- codemastr */
|
||||
if ((IsAnOper(acptr) || IsServices(acptr))
|
||||
&& (!IsHideOper(acptr) || sptr == acptr || IsAnOper(sptr)))
|
||||
{
|
||||
buf[0] = '\0';
|
||||
if (IsNetAdmin(acptr))
|
||||
strcat(buf, "a Network Administrator");
|
||||
else if (IsTechAdmin(acptr))
|
||||
strcat(buf,
|
||||
"a Technical Administrator");
|
||||
else if (IsSAdmin(acptr))
|
||||
strcat(buf, "a Services Operator");
|
||||
else if (IsAdmin(acptr) && !IsCoAdmin(acptr))
|
||||
strcat(buf, "a Server Administrator");
|
||||
else if (IsCoAdmin(acptr))
|
||||
strcat(buf, "a Co Administrator");
|
||||
else if (IsServices(acptr))
|
||||
strcat(buf, "a Network Service");
|
||||
else if (IsOper(acptr))
|
||||
strcat(buf, "an IRC Operator");
|
||||
|
||||
else
|
||||
strcat(buf, "a Local IRC Operator");
|
||||
if (buf[0])
|
||||
sendto_one(sptr,
|
||||
":IRC PRIVMSG %s :%s is an %s on %s",
|
||||
sptr->name, name, buf, ircnetwork);
|
||||
}
|
||||
|
||||
if (IsHelpOp(acptr) && (!IsHideOper(acptr) || sptr == acptr || IsAnOper(sptr)))
|
||||
if (!acptr->user->away)
|
||||
sendto_one(sptr, ":IRC PRIVMSG %s :%s is available for help.",
|
||||
sptr->name, acptr->name);
|
||||
|
||||
if (acptr->umodes & UMODE_BOT)
|
||||
{
|
||||
sendto_one(sptr, ":IRC PRIVMSG %s :%s is an Bot on %s",
|
||||
sptr->name, name, ircnetwork);
|
||||
}
|
||||
if (acptr->umodes & UMODE_SECURE)
|
||||
{
|
||||
sendto_one(sptr, ":IRC PRIVMSG %s :%s is a Secure Connection",
|
||||
sptr->name, acptr->name);
|
||||
}
|
||||
if (acptr->user->swhois)
|
||||
{
|
||||
if (*acptr->user->swhois != '\0')
|
||||
sendto_one(sptr, ":IRC PRIVMSG %s :%s %s",
|
||||
sptr->name, acptr->name,
|
||||
acptr->user->swhois);
|
||||
}
|
||||
|
||||
if (acptr->user && MyConnect(acptr))
|
||||
sendto_one(sptr, ":IRC PRIVMSG %s :%s has been idle for %s signed on at %s",
|
||||
sptr->name, acptr->name,
|
||||
(char *)convert_time(TStime() - user->last),
|
||||
date(acptr->firsttime));
|
||||
}
|
||||
if (!found)
|
||||
{
|
||||
sendto_one(sptr, ":IRC PRIVMSG %s :%s - No such nick",
|
||||
sptr->name, nick);
|
||||
}
|
||||
if (p)
|
||||
p[-1] = ',';
|
||||
}
|
||||
sendto_one(sptr, ":IRC PRIVMSG %s :End of whois information for %s",
|
||||
sptr->name, parv[1]);
|
||||
|
||||
return 0;
|
||||
}
|
||||
+7
-20
@@ -24,6 +24,8 @@
|
||||
#include "numeric.h"
|
||||
#include "h.h"
|
||||
#include "hash.h"
|
||||
#include "proto.h"
|
||||
#include <string.h>
|
||||
|
||||
/* externally defined functions */
|
||||
unsigned int hash_whowas_name(char *); /* defined in hash.c */
|
||||
@@ -54,11 +56,10 @@ void add_history(aClient *cptr, int online)
|
||||
SafeFree(new->virthost);
|
||||
SafeFree(new->realname);
|
||||
SafeFree(new->username);
|
||||
SafeFree(new->away);
|
||||
new->servername = NULL;
|
||||
|
||||
if (new->online)
|
||||
del_whowas_from_clist(&(new->online->whowas), new);
|
||||
del_whowas_from_clist(&(new->online->user->whowas), new);
|
||||
del_whowas_from_list(&WHOWASHASH[new->hashv], new);
|
||||
}
|
||||
new->hashv = hash_whowas_name(cptr->name);
|
||||
@@ -68,12 +69,6 @@ void add_history(aClient *cptr, int online)
|
||||
AllocCpy(new->username, cptr->user->username);
|
||||
AllocCpy(new->hostname, cptr->user->realhost);
|
||||
AllocCpy(new->virthost, cptr->user->virthost);
|
||||
if (cptr->user->away)
|
||||
{
|
||||
AllocCpy(new->away, cptr->user->away);
|
||||
}
|
||||
else
|
||||
new->away = NULL;
|
||||
new->servername = cptr->user->server;
|
||||
AllocCpy(new->realname, cptr->info);
|
||||
|
||||
@@ -86,7 +81,7 @@ void add_history(aClient *cptr, int online)
|
||||
if (online)
|
||||
{
|
||||
new->online = cptr;
|
||||
add_whowas_to_clist(&(cptr->whowas), new);
|
||||
add_whowas_to_clist(&(cptr->user->whowas), new);
|
||||
}
|
||||
else
|
||||
new->online = NULL;
|
||||
@@ -100,11 +95,11 @@ void off_history(aClient *cptr)
|
||||
{
|
||||
aWhowas *temp, *next;
|
||||
|
||||
for (temp = cptr->whowas; temp; temp = next)
|
||||
for (temp = cptr->user->whowas; temp; temp = next)
|
||||
{
|
||||
next = temp->cnext;
|
||||
temp->online = NULL;
|
||||
del_whowas_from_clist(&(cptr->whowas), temp);
|
||||
del_whowas_from_clist(&(cptr->user->whowas), temp);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,7 +128,6 @@ void count_whowas_memory(int *wwu, u_long *wwum)
|
||||
int i;
|
||||
int u = 0;
|
||||
u_long um = 0;
|
||||
u_long uam = 0;
|
||||
/* count the number of used whowas structs in 'u' */
|
||||
/* count up the memory used of whowas structs in um */
|
||||
|
||||
@@ -142,8 +136,6 @@ void count_whowas_memory(int *wwu, u_long *wwum)
|
||||
{
|
||||
u++;
|
||||
um += sizeof(aWhowas);
|
||||
if (tmp->away)
|
||||
uam += (strlen(tmp->away) + 1);
|
||||
}
|
||||
*wwu = u;
|
||||
*wwum = um;
|
||||
@@ -159,9 +151,7 @@ int m_whowas(aClient *cptr, aClient *sptr, int parc, char *parv[])
|
||||
aWhowas *temp;
|
||||
int cur = 0;
|
||||
int max = -1, found = 0;
|
||||
char *p, *nick, *s;
|
||||
static time_t last_used = 0L;
|
||||
static int last_count = 0;
|
||||
char *p, *nick;
|
||||
|
||||
if (parc < 2)
|
||||
{
|
||||
@@ -199,9 +189,6 @@ int m_whowas(aClient *cptr, aClient *sptr, int parc, char *parv[])
|
||||
sendto_one(sptr, rpl_str(RPL_WHOISSERVER), me.name,
|
||||
parv[0], temp->name, temp->servername,
|
||||
myctime(temp->logoff));
|
||||
if (temp->away)
|
||||
sendto_one(sptr, rpl_str(RPL_AWAY),
|
||||
me.name, parv[0], temp->name, temp->away);
|
||||
cur++;
|
||||
found++;
|
||||
}
|
||||
|
||||
-907
@@ -1,907 +0,0 @@
|
||||
/************************************************************************
|
||||
/************************************************************************
|
||||
* IRC - Internet Relay Chat, win32.c
|
||||
* Copyright (C) 1996 Daniel Hazelbaker
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char sccsid[] = "@(#)win32.c 2.01 10/21/96 (C) 1996 Daniel Hazelbaker";
|
||||
#endif
|
||||
|
||||
|
||||
#define APPNAME "wIRCD"
|
||||
#define wTITLEBAR "UnrealIRCd"
|
||||
|
||||
// Windows Header Files:
|
||||
#include "common.h"
|
||||
#include <windows.h>
|
||||
#include <commctrl.h>
|
||||
#include <process.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <malloc.h>
|
||||
#include <memory.h>
|
||||
#include <io.h>
|
||||
#include <fcntl.h>
|
||||
#include "struct.h"
|
||||
#include "sys.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include "h.h"
|
||||
#include "version.h"
|
||||
#include "resource.h"
|
||||
#include "CioFunc.h"
|
||||
|
||||
ID_CVS("$Id$");
|
||||
|
||||
|
||||
BOOL InitApplication(HINSTANCE);
|
||||
BOOL InitInstance(HINSTANCE, int);
|
||||
LRESULT CALLBACK FrameWndProc(HWND, UINT, WPARAM, LPARAM);
|
||||
LRESULT CALLBACK About(HWND, UINT, WPARAM, LPARAM);
|
||||
LRESULT CALLBACK Dlg_IRCDCONF(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
LRESULT CALLBACK Dlg_IRCDMOTD(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
LRESULT CALLBACK Dlg_IRCDRULES(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
BOOL DisplayString(HWND hWnd, char *InBuf, ...);
|
||||
void LoadSetup(void);
|
||||
void SaveSetup(void);
|
||||
int SetDebugLevel(HWND hWnd, int NewLevel);
|
||||
|
||||
LRESULT CALLBACK Credits(HWND, UINT, WPARAM, LPARAM);
|
||||
LRESULT CALLBACK Dreamforge(HWND, UINT, WPARAM, LPARAM);
|
||||
LRESULT CALLBACK IRCDLicense(HWND, UINT, WPARAM, LPARAM);
|
||||
|
||||
|
||||
extern void SocketLoop(void *dummy), s_rehash(), do_dns_async(HANDLE id);
|
||||
extern int localdie(void), InitwIRCD(int argc, char *argv[]);
|
||||
|
||||
|
||||
HINSTANCE hInst; // current instance
|
||||
char szAppName[] = APPNAME; // The name of this application
|
||||
char szTitle[] = wTITLEBAR; // The title bar text
|
||||
HWND hwIRCDWnd=NULL, hCio=NULL;
|
||||
HANDLE hMainThread = 0;
|
||||
|
||||
#ifndef IRCDTOTALVERSION
|
||||
#define IRCDTOTALVERSION BASE_VERSION PATCH1 PATCH2 PATCH3 PATCH4 PATCH5 PATCH6 PATCH7 PATCH8 PATCH9
|
||||
#endif
|
||||
|
||||
/*
|
||||
* FUNCTION: WinMain(HANDLE, HANDLE, LPSTR, int)
|
||||
*
|
||||
* PURPOSE: Entry point for the application.
|
||||
*
|
||||
* COMMENTS:
|
||||
*
|
||||
* This function initializes the application and processes the
|
||||
* message loop.
|
||||
*/
|
||||
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
|
||||
{
|
||||
MSG msg;
|
||||
HANDLE hAccelTable;
|
||||
int argc=1;
|
||||
char *s, *argv[20], String[128];
|
||||
|
||||
if (!hPrevInstance)
|
||||
if (!InitApplication(hInstance))
|
||||
return (FALSE);
|
||||
|
||||
if (!InitInstance(hInstance, nCmdShow))
|
||||
return (FALSE);
|
||||
|
||||
argv[0] = "WIRCD.EXE";
|
||||
if ( *(s = lpCmdLine) )
|
||||
{
|
||||
argv[argc++] = s;
|
||||
while ( (s = strchr(s, ' ')) != NULL )
|
||||
{
|
||||
while ( *s == ' ' ) *s++ = 0;
|
||||
argv[argc++] = s;
|
||||
}
|
||||
}
|
||||
argv[argc] = NULL;
|
||||
if ( InitwIRCD(argc, argv) != 1 )
|
||||
return FALSE;
|
||||
|
||||
wsprintf(String, "UnrealIRCd/32 - %s", me.name);
|
||||
SetWindowText(hwIRCDWnd, String);
|
||||
|
||||
SetDebugLevel(hwIRCDWnd, debuglevel);
|
||||
|
||||
hMainThread = (HANDLE)_beginthread(SocketLoop, 0, NULL);
|
||||
hAccelTable = LoadAccelerators (hInstance, szAppName);
|
||||
|
||||
LoadSetup();
|
||||
atexit(SaveSetup);
|
||||
|
||||
/* Say we are ready to recieve connections */
|
||||
wsprintf(String, "%c%c%c%c[info] -=-=[ UnrealIRCd/32 v%s Ready ] - %s\r", 0,0,0,0, VERSIONONLY);
|
||||
DisplayString(hCio, String);
|
||||
/* Main message loop */
|
||||
while (GetMessage(&msg, NULL, 0, 0))
|
||||
{
|
||||
if ( !TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
|
||||
{
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
}
|
||||
|
||||
return (msg.wParam);
|
||||
lpCmdLine; /* This will prevent 'unused formal parameter' warnings */
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* FUNCTION: InitApplication(HANDLE)
|
||||
*
|
||||
* PURPOSE: Initializes window data and registers window class
|
||||
*
|
||||
* COMMENTS:
|
||||
*
|
||||
* In this function, we initialize a window class by filling out a data
|
||||
* structure of type WNDCLASS and calling either RegisterClass or
|
||||
* the internal MyRegisterClass.
|
||||
*/
|
||||
BOOL InitApplication(HINSTANCE hInstance)
|
||||
{
|
||||
WNDCLASS wc;
|
||||
|
||||
// Fill in window class structure.
|
||||
wc.style = CS_HREDRAW | CS_VREDRAW;
|
||||
wc.lpfnWndProc = (WNDPROC)FrameWndProc;
|
||||
wc.cbClsExtra = 0;
|
||||
wc.cbWndExtra = 0;
|
||||
wc.hInstance = hInstance;
|
||||
wc.hIcon = LoadIcon (hInstance, APPNAME);
|
||||
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
|
||||
wc.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
|
||||
wc.lpszMenuName = szAppName;
|
||||
wc.lpszClassName = szAppName;
|
||||
|
||||
if ( !RegisterClass(&wc) ) return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* FUNCTION: InitInstance(HANDLE, int)
|
||||
*
|
||||
* PURPOSE: Saves instance handle and creates main window
|
||||
*
|
||||
* COMMENTS:
|
||||
*
|
||||
* In this function, we save the instance handle in a global variable and
|
||||
* create and display the main program window.
|
||||
*/
|
||||
BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
|
||||
{
|
||||
HWND hWnd;
|
||||
WSADATA WSAData;
|
||||
|
||||
|
||||
if ( WSAStartup(MAKEWORD(1, 1), &WSAData) != 0 )
|
||||
{
|
||||
MessageBox(NULL, "UnrealIRCD/32 Init Error", "Unable to initialize WinSock DLL", MB_OK);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
hInst = hInstance; /* Store instance handle in our global variable */
|
||||
|
||||
if ( !Cio_Init(hInst) )
|
||||
{
|
||||
MessageBox(NULL, "UnrealIRCD/32 Init Error", "Couldn't Init CIO Library", MB_OK);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
hWnd = CreateWindow(szAppName, szTitle, WS_OVERLAPPEDWINDOW,
|
||||
CW_USEDEFAULT, 0, CW_USEDEFAULT, 0,
|
||||
NULL, NULL, hInstance, NULL);
|
||||
|
||||
if ( !hWnd )
|
||||
return (FALSE);
|
||||
|
||||
ShowWindow(hWnd, nCmdShow);
|
||||
UpdateWindow(hwIRCDWnd = hWnd);
|
||||
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* FUNCTION: FrameWndProc(HWND, unsigned, WORD, LONG)
|
||||
*
|
||||
* PURPOSE: Processes messages for the main window.
|
||||
*
|
||||
*/
|
||||
LRESULT CALLBACK FrameWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
int wmId, wmEvent;
|
||||
char *xx = NULL;
|
||||
|
||||
switch (message)
|
||||
{
|
||||
case WM_CREATE:
|
||||
hCio = Cio_Create(hInst, hWnd, WS_VISIBLE, 0, 0, 300, 200);
|
||||
xx = MyMalloc(1024);
|
||||
sprintf(xx, "%c%c%c%c[info] -=-=[ UnrealIRCd/32 v%s Loading ]-=-=\r", 0, 0, 0, 0,
|
||||
VERSIONONLY);
|
||||
DisplayString(hCio, xx);
|
||||
#ifdef WIN32_SPECIFY
|
||||
sprintf(xx, "%c%c%c%c[info] - Ported by %s", 0,0,0,0, WIN32_PORTER);
|
||||
DisplayString(hCio, xx);
|
||||
sprintf(xx, "%c%c%c%c[info] - %s", 0,0,0,0, WIN32_URL);
|
||||
DisplayString(hCio, xx);
|
||||
#endif
|
||||
MyFree(xx);
|
||||
return 0;
|
||||
case WM_COMMAND:
|
||||
wmId = LOWORD(wParam);
|
||||
wmEvent = HIWORD(wParam);
|
||||
|
||||
switch (wmId)
|
||||
{
|
||||
case IDM_ABOUT:
|
||||
DialogBox(hInst, "AboutBox", hWnd, (DLGPROC)About);
|
||||
break;
|
||||
case IDM_CREDITS:
|
||||
DialogBox(hInst, "AboutBox", hWnd, (DLGPROC)Credits);
|
||||
break;
|
||||
case IDM_DF:
|
||||
DialogBox(hInst, "AboutBox", hWnd, (DLGPROC)Dreamforge);
|
||||
break;
|
||||
case IDM_LICENSE:
|
||||
DialogBox(hInst, "AboutBox", hWnd, (DLGPROC)IRCDLicense);
|
||||
break;
|
||||
|
||||
case IDM_IRCDCONF:
|
||||
DialogBox(hInst, "DLG_IRCDCONF", hWnd, (DLGPROC)Dlg_IRCDCONF);
|
||||
break;
|
||||
case IDM_IRCDMOTD:
|
||||
DialogBox(hInst, "DLG_IRCDMOTD", hWnd, (DLGPROC)Dlg_IRCDMOTD);
|
||||
break;
|
||||
case IDM_IRCDRULES:
|
||||
DialogBox(hInst, "DLG_IRCDRULES", hWnd, (DLGPROC)Dlg_IRCDRULES);
|
||||
break;
|
||||
case IDM_REHASH:
|
||||
s_rehash();
|
||||
break;
|
||||
|
||||
case IDM_EXIT:
|
||||
if ( MessageBox(hWnd, "Are you sure?",
|
||||
"Terminate UnrealIRCD/32",
|
||||
MB_ICONQUESTION | MB_YESNO) == IDNO )
|
||||
break;
|
||||
DestroyWindow(hWnd);
|
||||
break;
|
||||
|
||||
case IDM_DBGOFF:
|
||||
case IDM_DBGFATAL:
|
||||
case IDM_DBGERROR:
|
||||
case IDM_DBGNOTICE:
|
||||
case IDM_DBGDNS:
|
||||
case IDM_DBGINFO:
|
||||
case IDM_DBGNUM:
|
||||
case IDM_DBGSEND:
|
||||
case IDM_DBGDEBUG:
|
||||
case IDM_DBGMALLOC:
|
||||
case IDM_DBGLIST:
|
||||
SetDebugLevel(hWnd, wmId-IDM_DBGFATAL);
|
||||
break;
|
||||
|
||||
default:
|
||||
return (DefWindowProc(hWnd, message, wParam, lParam));
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_CLOSE:
|
||||
if ( MessageBox(hWnd, "Are you sure?", "Terminate UnrealIRCd/32",
|
||||
MB_ICONQUESTION | MB_YESNO) == IDNO )
|
||||
break;
|
||||
return (DefWindowProc(hWnd, message, wParam, lParam));
|
||||
|
||||
case WM_DESTROY:
|
||||
localdie(); /* Never returns */
|
||||
PostQuitMessage(0);
|
||||
break;
|
||||
|
||||
case WM_SIZE:
|
||||
SetWindowPos(hCio, NULL, 0, 0, LOWORD(lParam), HIWORD(lParam),
|
||||
SWP_NOZORDER);
|
||||
/* Fallthrough to get the default handling too. */
|
||||
|
||||
default:
|
||||
return (DefWindowProc(hWnd, message, wParam, lParam));
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* FUNCTION: About(HWND, unsigned, WORD, LONG)
|
||||
*
|
||||
* PURPOSE: Processes messages for "About" dialog box
|
||||
* This version allows greater flexibility over the contents of the 'About' box,
|
||||
* by pulling out values from the 'Version' resource.
|
||||
*
|
||||
* MESSAGES:
|
||||
*
|
||||
* WM_INITDIALOG - initialize dialog box
|
||||
* WM_COMMAND - Input received
|
||||
*
|
||||
*/
|
||||
LRESULT CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (message)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
#define Ccat strcat(String, String2)
|
||||
{
|
||||
char String[16384], String2[16384], **s = infotext;
|
||||
sprintf(String, "%s\n%s", version, creation);
|
||||
SetDlgItemText(hDlg, IDC_VERSION, String);
|
||||
String[0] = 0; String2[0] = 0;
|
||||
sprintf(String2, "-=-=-=-=-=-==-==- %s -=-=-==-==-=-=-=-=-=-\r\n", ircnetwork); Ccat;
|
||||
sprintf(String2, "|Web Page: | http://www.%s\r\n", netdomain); Ccat;
|
||||
sprintf(String2, "|FTP Archive: | ftp://ftp.%s\r\n", netdomain); Ccat;
|
||||
sprintf(String2, "|Help channel: | %s\r\n", helpchan); Ccat;
|
||||
sprintf(String2, "|=-=-=-=-=-==-==|-=-=-=-=-=-=-==-==-=-=-=-=-=-=-=\r\n"); Ccat;
|
||||
sprintf(String2, "|IRCd version: | %s\r\n", IRCDTOTALVERSION); Ccat;
|
||||
sprintf(String2, "| Developers: | Stskeeps <stskeeps@tspre.org>\r\n"); Ccat;
|
||||
sprintf(String2, "| | codemastr <codemastr@tspre.org>\r\n"); Ccat;
|
||||
#if defined(_WIN32) && defined(WIN32_SPECIFY)
|
||||
sprintf(String2, "| Win32 Porter: | %s\r\n", WIN32_PORTER); Ccat;
|
||||
sprintf(String2, "| >>URL: | %s\r\n", WIN32_URL); Ccat;
|
||||
#endif
|
||||
sprintf(String2, "|Credits: | Type /Credits\r\n"); Ccat;
|
||||
sprintf(String2, "|DALnet Credits:| Type /DALinfo\r\n"); Ccat;
|
||||
sprintf(String2, "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\r\n"); Ccat;
|
||||
sprintf(String2, "| Unreal IRCd can be downloaded at http://unreal.tspre.org\r\n"); Ccat;
|
||||
sprintf(String2, "| This notice may not be removed from the IRCd package\r\n"); Ccat;
|
||||
sprintf(String2, "| It will be a violation of copyright. This program must always stay free of charge\r\n"); Ccat;
|
||||
sprintf(String2, "| being sold commercially or privately\r\n"); Ccat;
|
||||
sprintf(String2, "| Only charge may be for the transport medium like on CD-ROM, floppy\r\n"); Ccat;
|
||||
sprintf(String2, "| or other kinds (-Stskeeps'1999)\r\n"); Ccat;
|
||||
sprintf(String2, "--------------------------------------------\r\n"); Ccat;
|
||||
SetDlgItemText(hDlg, IDC_INFOTEXT, String);
|
||||
#undef Ccat
|
||||
ShowWindow (hDlg, SW_SHOW);
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
case WM_COMMAND:
|
||||
if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
|
||||
{
|
||||
EndDialog(hDlg, TRUE);
|
||||
return (TRUE);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* FUNCTION: Credits(HWND, unsigned, WORD, LONG)
|
||||
*
|
||||
* PURPOSE: Processes messages for "Credits" dialog box
|
||||
* This version allows greater flexibility over the contents of the 'Credits' box,
|
||||
* by pulling out values from the 'Version' resource.
|
||||
*
|
||||
* MESSAGES:
|
||||
*
|
||||
* WM_INITDIALOG - initialize dialog box
|
||||
* WM_COMMAND - Input received
|
||||
*
|
||||
*/
|
||||
LRESULT CALLBACK Credits(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (message)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
char String[16384], **s = unrealcredits;
|
||||
|
||||
sprintf(String, "%s\n%s", version, creation);
|
||||
SetDlgItemText(hDlg, IDC_VERSION, String);
|
||||
String[0] = 0;
|
||||
while ( *s )
|
||||
{
|
||||
strcat(String, *s++);
|
||||
if ( *s )
|
||||
strcat(String, "\r\n");
|
||||
}
|
||||
SetDlgItemText(hDlg, IDC_INFOTEXT, String);
|
||||
|
||||
|
||||
ShowWindow (hDlg, SW_SHOW);
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
case WM_COMMAND:
|
||||
if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
|
||||
{
|
||||
EndDialog(hDlg, TRUE);
|
||||
return (TRUE);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* FUNCTION: Dreamforge(HWND, unsigned, WORD, LONG)
|
||||
*
|
||||
* PURPOSE: Processes messages for "Dreamforge" dialog box
|
||||
* This version allows greater flexibility over the contents of the 'Dreamforge' box,
|
||||
* by pulling out values from the 'Version' resource.
|
||||
*
|
||||
* MESSAGES:
|
||||
*
|
||||
* WM_INITDIALOG - initialize dialog box
|
||||
* WM_COMMAND - Input received
|
||||
*
|
||||
*/
|
||||
LRESULT CALLBACK Dreamforge(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (message)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
char String[16384], **s = dalinfotext;
|
||||
|
||||
sprintf(String, "%s\n%s", version, creation);
|
||||
SetDlgItemText(hDlg, IDC_VERSION, String);
|
||||
String[0] = 0;
|
||||
while ( *s )
|
||||
{
|
||||
strcat(String, *s++);
|
||||
if ( *s )
|
||||
strcat(String, "\r\n");
|
||||
}
|
||||
SetDlgItemText(hDlg, IDC_INFOTEXT, String);
|
||||
|
||||
|
||||
ShowWindow (hDlg, SW_SHOW);
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
case WM_COMMAND:
|
||||
if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
|
||||
{
|
||||
EndDialog(hDlg, TRUE);
|
||||
return (TRUE);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* FUNCTION: IRCDLicense(HWND, unsigned, WORD, LONG)
|
||||
*
|
||||
* PURPOSE: Processes messages for "IRCDLicense" dialog box
|
||||
* This version allows greater flexibility over the contents of the 'IRCDLicense' box,
|
||||
* by pulling out values from the 'Version' resource.
|
||||
*
|
||||
* MESSAGES:
|
||||
*
|
||||
* WM_INITDIALOG - initialize dialog box
|
||||
* WM_COMMAND - Input received
|
||||
*
|
||||
*/
|
||||
LRESULT CALLBACK IRCDLicense(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (message)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
char String[16384], **s = gnulicense;
|
||||
|
||||
sprintf(String, "%s\n%s", version, creation);
|
||||
SetDlgItemText(hDlg, IDC_VERSION, String);
|
||||
String[0] = 0;
|
||||
while ( *s )
|
||||
{
|
||||
strcat(String, *s++);
|
||||
if ( *s )
|
||||
strcat(String, "\r\n");
|
||||
}
|
||||
SetDlgItemText(hDlg, IDC_INFOTEXT, String);
|
||||
|
||||
|
||||
ShowWindow (hDlg, SW_SHOW);
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
case WM_COMMAND:
|
||||
if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
|
||||
{
|
||||
EndDialog(hDlg, TRUE);
|
||||
return (TRUE);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* FUNCTION: Dlg_IrcdConf(HWND, unsigned, WORD, LONG)
|
||||
*
|
||||
* PURPOSE: Processes messages for "DLG_IRCDCONF" dialog box
|
||||
*
|
||||
*/
|
||||
LRESULT CALLBACK Dlg_IRCDCONF(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (message)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
char *Buffer = MyMalloc(65535); /* Should be big enough */
|
||||
int fd, Len;
|
||||
|
||||
if ( !Buffer )
|
||||
{
|
||||
MessageBox(hDlg, "Error: Could not allocate temporary buffer",
|
||||
"UnrealIRCd/32 Setup", MB_OK);
|
||||
EndDialog(hDlg, FALSE);
|
||||
return FALSE;
|
||||
}
|
||||
/* Open the ircd.conf file */
|
||||
fd = open(CONFIGFILE, _O_RDONLY | _O_BINARY);
|
||||
if ( fd == -1 )
|
||||
{
|
||||
MessageBox(hDlg, "Error: Could not open configuration file",
|
||||
"UnrealIRCd/32 Setup", MB_OK);
|
||||
MyFree(Buffer);
|
||||
EndDialog(hDlg, FALSE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Buffer[0] = 0; /* Incase read() fails */
|
||||
Len = read(fd, Buffer, 65535);
|
||||
Buffer[Len] = 0;
|
||||
/* Set the text for the edit control to what was in the file */
|
||||
SendDlgItemMessage(hDlg, IDC_IRCDCONF, WM_SETTEXT, 0,
|
||||
(LPARAM)(LPCTSTR)Buffer);
|
||||
|
||||
close(fd);
|
||||
MyFree(Buffer);
|
||||
}
|
||||
return (TRUE);
|
||||
|
||||
case WM_COMMAND:
|
||||
if ( LOWORD(wParam) == IDOK )
|
||||
{
|
||||
char *Buffer = MyMalloc(65535); /* Should be big enough */
|
||||
DWORD Len;
|
||||
int fd;
|
||||
|
||||
if ( !Buffer )
|
||||
{
|
||||
MessageBox(hDlg, "Error: Could not allocate temporary buffer",
|
||||
"UnrealIRCD/32 Setup", MB_OK);
|
||||
return TRUE;
|
||||
}
|
||||
/* Open the ircd.conf file */
|
||||
fd = open(CONFIGFILE, _O_TRUNC|_O_CREAT|_O_RDWR|_O_BINARY,
|
||||
S_IREAD|S_IWRITE);
|
||||
if ( fd == -1 )
|
||||
{
|
||||
MessageBox(hDlg, "Error: Could not open configuration file",
|
||||
"UnrealIRCD/32 Setup", MB_OK);
|
||||
MyFree(Buffer);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Get the text from the edit control and save it to disk. */
|
||||
Len = SendDlgItemMessage(hDlg, IDC_IRCDCONF, WM_GETTEXT, 65535,
|
||||
(LPARAM)(LPCTSTR)Buffer);
|
||||
write(fd, Buffer, Len);
|
||||
|
||||
close(fd);
|
||||
MyFree(Buffer);
|
||||
|
||||
EndDialog(hDlg, TRUE);
|
||||
return TRUE;
|
||||
}
|
||||
if ( LOWORD(wParam) == IDCANCEL )
|
||||
{
|
||||
EndDialog(hDlg, FALSE);
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* FUNCTION: Dlg_Dlg_IRCdMotd(HWND, unsigned, WORD, LONG)
|
||||
*
|
||||
* PURPOSE: Processes messages for "DLG_IRCDCONF" dialog box
|
||||
*
|
||||
*/
|
||||
LRESULT CALLBACK Dlg_IRCDMOTD(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (message)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
char *Buffer = MyMalloc(65535*2); /* Should be big enough */
|
||||
int fd, Len;
|
||||
|
||||
if ( !Buffer )
|
||||
{
|
||||
MessageBox(hDlg, "Error: Could not allocate temporary buffer",
|
||||
"UnrealIRCd/32 Setup", MB_OK);
|
||||
EndDialog(hDlg, FALSE);
|
||||
return FALSE;
|
||||
}
|
||||
/* Open the ircd.motd file */
|
||||
fd = open(MPATH, _O_RDONLY | _O_BINARY);
|
||||
if ( fd == -1 )
|
||||
{
|
||||
MessageBox(hDlg, "Error: Could not open MOTD file",
|
||||
"UnrealIRCd/32 Setup", MB_OK);
|
||||
MyFree(Buffer);
|
||||
EndDialog(hDlg, FALSE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Buffer[0] = 0; /* Incase read() fails */
|
||||
Len = read(fd, Buffer, 65535);
|
||||
Buffer[Len] = 0;
|
||||
/* Set the text for the edit control to what was in the file */
|
||||
SendDlgItemMessage(hDlg, IDC_IRCDCONF, WM_SETTEXT, 0,
|
||||
(LPARAM)(LPCTSTR)Buffer);
|
||||
|
||||
close(fd);
|
||||
MyFree(Buffer);
|
||||
}
|
||||
return (TRUE);
|
||||
|
||||
case WM_COMMAND:
|
||||
if ( LOWORD(wParam) == IDOK )
|
||||
{
|
||||
char *Buffer = MyMalloc(65535); /* Should be big enough */
|
||||
DWORD Len;
|
||||
int fd;
|
||||
|
||||
if ( !Buffer )
|
||||
{
|
||||
MessageBox(hDlg, "Error: Could not allocate temporary buffer",
|
||||
"UnrealIRCD/32 Setup", MB_OK);
|
||||
return TRUE;
|
||||
}
|
||||
/* Open the ircd.motd file */
|
||||
fd = open(MPATH, _O_TRUNC|_O_CREAT|_O_RDWR|_O_BINARY,
|
||||
S_IREAD|S_IWRITE);
|
||||
if ( fd == -1 )
|
||||
{
|
||||
MessageBox(hDlg, "Error: Could not open motd file",
|
||||
"UnrealIRCD/32 Setup", MB_OK);
|
||||
MyFree(Buffer);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Get the text from the edit control and save it to disk. */
|
||||
Len = SendDlgItemMessage(hDlg, IDC_IRCDCONF, WM_GETTEXT, 65535,
|
||||
(LPARAM)(LPCTSTR)Buffer);
|
||||
write(fd, Buffer, Len);
|
||||
|
||||
close(fd);
|
||||
MyFree(Buffer);
|
||||
|
||||
EndDialog(hDlg, TRUE);
|
||||
return TRUE;
|
||||
}
|
||||
if ( LOWORD(wParam) == IDCANCEL )
|
||||
{
|
||||
EndDialog(hDlg, FALSE);
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* FUNCTION: Dlg_IRCdRules(HWND, unsigned, WORD, LONG)
|
||||
*
|
||||
* PURPOSE: Processes messages for "DLG_IRCDCONF" dialog box
|
||||
*
|
||||
*/
|
||||
LRESULT CALLBACK Dlg_IRCDRULES(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (message)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
char *Buffer = MyMalloc(65535*2); /* Should be big enough */
|
||||
int fd, Len;
|
||||
|
||||
if ( !Buffer )
|
||||
{
|
||||
MessageBox(hDlg, "Error: Could not allocate temporary buffer",
|
||||
"UnrealIRCd/32 Setup", MB_OK);
|
||||
EndDialog(hDlg, FALSE);
|
||||
return FALSE;
|
||||
}
|
||||
/* Open the ircd.rules file */
|
||||
fd = open(RPATH, _O_RDONLY | _O_BINARY);
|
||||
if ( fd == -1 )
|
||||
{
|
||||
MessageBox(hDlg, "Error: Could not open rules file",
|
||||
"UnrealIRCd/32 Setup", MB_OK);
|
||||
MyFree(Buffer);
|
||||
EndDialog(hDlg, FALSE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Buffer[0] = 0; /* Incase read() fails */
|
||||
Len = read(fd, Buffer, 65535);
|
||||
Buffer[Len] = 0;
|
||||
/* Set the text for the edit control to what was in the file */
|
||||
SendDlgItemMessage(hDlg, IDC_IRCDCONF, WM_SETTEXT, 0,
|
||||
(LPARAM)(LPCTSTR)Buffer);
|
||||
|
||||
close(fd);
|
||||
MyFree(Buffer);
|
||||
}
|
||||
return (TRUE);
|
||||
|
||||
case WM_COMMAND:
|
||||
if ( LOWORD(wParam) == IDOK )
|
||||
{
|
||||
char *Buffer = MyMalloc(65535); /* Should be big enough */
|
||||
DWORD Len;
|
||||
int fd;
|
||||
|
||||
if ( !Buffer )
|
||||
{
|
||||
MessageBox(hDlg, "Error: Could not allocate temporary buffer",
|
||||
"UnrealIRCD/32 Setup", MB_OK);
|
||||
return TRUE;
|
||||
}
|
||||
/* Open the ircd.rules file */
|
||||
fd = open(RPATH, _O_TRUNC|_O_CREAT|_O_RDWR|_O_BINARY,
|
||||
S_IREAD|S_IWRITE);
|
||||
if ( fd == -1 )
|
||||
{
|
||||
MessageBox(hDlg, "Error: Could not open rules file",
|
||||
"UnrealIRCD/32 Setup", MB_OK);
|
||||
MyFree(Buffer);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Get the text from the edit control and save it to disk. */
|
||||
Len = SendDlgItemMessage(hDlg, IDC_IRCDCONF, WM_GETTEXT, 65535,
|
||||
(LPARAM)(LPCTSTR)Buffer);
|
||||
write(fd, Buffer, Len);
|
||||
|
||||
close(fd);
|
||||
MyFree(Buffer);
|
||||
|
||||
EndDialog(hDlg, TRUE);
|
||||
return TRUE;
|
||||
}
|
||||
if ( LOWORD(wParam) == IDCANCEL )
|
||||
{
|
||||
EndDialog(hDlg, FALSE);
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
int DisplayString(HWND hWnd, char *InBuf, ...)
|
||||
{
|
||||
CioWndInfo *CWI;
|
||||
va_list argptr;
|
||||
char *Buffer=NULL, *Ptr=NULL;
|
||||
DWORD Len=0, TLen=0, Off=0, i=0;
|
||||
BYTE Red=0, Green=0, Blue=0;
|
||||
BOOL Bold = FALSE;
|
||||
|
||||
if ( (Buffer = LocalAlloc(LPTR, 16384)) == NULL ) return FALSE;
|
||||
|
||||
va_start(argptr, InBuf);
|
||||
Len = vsprintf(Buffer, InBuf, argptr);
|
||||
va_end(argptr);
|
||||
if ( Len == 0 )
|
||||
{
|
||||
LocalFree(Buffer);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
CWI = (CioWndInfo *)GetWindowLong(hWnd, GWL_USER);
|
||||
for ( i = 0; i < Len; i++ )
|
||||
{
|
||||
if ( Buffer[i] == 0 )
|
||||
{
|
||||
i+=3;
|
||||
continue;
|
||||
}
|
||||
if ( Buffer[i] == 0x02 )
|
||||
{
|
||||
if ( !Bold )
|
||||
{
|
||||
Buffer[i] = 0;
|
||||
Cio_Puts(hWnd, Buffer+Off, i-Off);
|
||||
Red = CWI->FR;
|
||||
Green = CWI->FG;
|
||||
Blue = CWI->FB;
|
||||
|
||||
Off=i+1;
|
||||
Cio_PrintF(hWnd, "%c%c%c%c", 0, 255, 32, 32);
|
||||
Bold = 1;
|
||||
continue;
|
||||
}
|
||||
if ( Bold )
|
||||
{
|
||||
Buffer[i] = 0;
|
||||
Cio_Puts(hWnd, Buffer+Off, i-Off);
|
||||
Off=i+1;
|
||||
Cio_PrintF(hWnd, "%c%c%c%c", 0, Red, Green, Blue);
|
||||
Bold = 0;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
Cio_Puts(hWnd, Buffer+Off, Len-Off);
|
||||
|
||||
LocalFree(Buffer);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
void LoadSetup(void)
|
||||
{
|
||||
}
|
||||
|
||||
void SaveSetup(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
int SetDebugLevel(HWND hWnd, int NewLevel)
|
||||
{
|
||||
HMENU hMenu = GetMenu(hWnd);
|
||||
|
||||
if ( !hMenu || !(hMenu = GetSubMenu(hMenu, 1)) ||
|
||||
!(hMenu = GetSubMenu(hMenu, 4)) )
|
||||
return -1;
|
||||
|
||||
CheckMenuItem(hMenu, IDM_DBGFATAL+debuglevel,
|
||||
MF_BYCOMMAND | MF_UNCHECKED);
|
||||
debuglevel = NewLevel;
|
||||
CheckMenuItem(hMenu,IDM_DBGFATAL+debuglevel,
|
||||
MF_BYCOMMAND | MF_CHECKED);
|
||||
|
||||
return debuglevel;
|
||||
}
|
||||
|
||||
|
||||
| ||||