1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-06-23 04:46:38 +02:00

577 Commits

Author SHA1 Message Date
Bram Matthys af1c845d09 ahem! typo ;p... and a bad one... horrible resolverbug on ipv6 ;) 2005-10-01 22:18:07 +00:00
Bram Matthys 59e09d1672 resolver fixed:
- c99 // comments removed
- fixed severe link block problem, would probably crash on unresolved hostname
- made 'cannot resolve' msgs for link blocks the same (in 1) failure and 2) bad response)
- fixed OOB read on 64bit systems with IPv6 enabled (in cacher)
- some reorganizing of the source or when we free things, to make things cleaner :)
- I think that was it.
This is was all done thanks to a manual source code audit I did on the printed out source ;). oldscool ^_^
2005-10-01 20:40:57 +00:00
Bram Matthys aee36057b6 read-after-free fixes 2005-09-28 22:17:03 +00:00
Bram Matthys 8eb85bc81c retry & timeout set :) 2005-09-27 22:26:23 +00:00
Bram Matthys 3510bad641 win32 stuff ATTEMPT #2 2005-09-27 22:08:06 +00:00
Bram Matthys a26180b5d1 seems c-ares now works fine on windows too... :) 2005-09-27 21:57:56 +00:00
Bram Matthys 8f6b70b260 hm! ipv6 seems to work with new resolver :) 2005-09-27 20:18:41 +00:00
Bram Matthys 342eb1bf7e ok at least ipv6 does not crash, but gotto fix byte order now ;) 2005-09-22 00:45:04 +00:00
Bram Matthys 2f876f353f ipv6 fixes 2005-09-22 00:41:41 +00:00
Bram Matthys 780655c886 dumdeedum 2005-09-22 00:03:44 +00:00
Bram Matthys 6a81fc54aa more || exit 1 <-- for TRE library ;) 2005-09-21 23:55:11 +00:00
Bram Matthys 5ff71d369d added || exit 1 <--- is this legal? 2005-09-21 23:52:40 +00:00
Bram Matthys 0234dfeae6 added .tar.gz of c-ares (ehm.. 1.3.0 I think) 2005-09-21 23:50:10 +00:00
Bram Matthys fed77b386d current makefile / configure work 2005-09-21 23:46:29 +00:00
Bram Matthys ec1fa23dad refcount bug (also in 3.2.3-cvs) 2005-09-12 18:22:42 +00:00
Bram Matthys 0f4443efd0 fixed reference count bug (also comitted to unreal3_2_fixes). 2005-09-12 16:34:42 +00:00
Bram Matthys f31b959ff5 /connect (and autoconnect????) now work as well. still need to fix up ipv6, AND fixing a reference count problem (but that one is also present in core unreal ;p) regarding link blocks + rehash. 2005-09-11 19:21:12 +00:00
Bram Matthys 97bd2d7a48 c-ares stuff... only linkblocks/configstuff is left. AND test all ipv6 stuff... 2005-09-08 23:40:08 +00:00
cvs2hg 329639f9f1 fixup commit for branch 'c-ares_resolver' 2005-09-04 22:10:07 +00:00
Bram Matthys 1be36fc0dd get rid of "please report!" in operator count bug thing.. we had enough responses :). The code itself still warns&corrects though... 2005-09-04 22:10:06 +00:00
Bram Matthys 61b3242013 - Fixed win32 makefile, now compiles fine. 2005-08-29 21:28:06 +00:00
Bram Matthys 1023df3cd3 CMDLINE_CONFIG change & FAKELAG_CONFIGURABLE added:
- CMDLINE_CONFIG behavior change: command line configuration is now still permitted
  if #undef'ed (which is the default) if uid==euid && gid==egid, since it doesn't make
  any sense to disable it then and is in fact just plain annoying.
- Added FAKELAG_CONFIGURABLE option in include/config.h, this enables an option called
  class::options::nofakelag, which disables "fake lag" for a certain class (that is:
  the artificial delay introduced by the ircd to prevent flooding is turned off,
  allowing the user to flood at full speed).
  IT'S USE IS DISCOURAGED UNLESS YOU REALLY KNOW WHAT YOU ARE DOING.
  Sorry, option is not in ./Config -advanced since I don't get autoconf working, but it's
  such a scary option that this might as well be a good idea to keep in config.h anyway.
  This feature has been suggested for several years (and refused), but the final
  suggestion (with implementation specific hints) came from Gilou in bug #0002207.
- changed a comment slightly in m_tkl.c to get rid of harmless warning ;)
2005-08-28 20:48:46 +00:00
Bram Matthys 4c3681afb9 another fix, for a slight variant 2005-08-28 19:13:51 +00:00
Bram Matthys 72910fafc9 - (5 minutes later..) Small update for above, fix was incorrect for ipv6. 2005-08-28 19:09:15 +00:00
Bram Matthys b1c4afdd41 - Fixed a bug where an invalid /*line could cause a crash, reported by Gilou (#2629). 2005-08-28 19:00:01 +00:00
Bram Matthys 0bc12e552c - Spamfilter: regexes (and reasons) are now more limited in size, this is to combat "I set
a spamfilter, but cannot remove it" problems. In practice this means - depending on the
  length of your spamfilter reason - regexes will be max ~300 characters.
  Spamfilters set in the .conf can be slightly longer (which still causes them to be
  truncated in '/stats f', but they don't have to be removed anyway so it's kinda
  acceptable if it's really needed). This should fix bug #2083, reported by White_Magic.
2005-08-28 16:28:40 +00:00
Bram Matthys 82d4c429da - Added Bulgarian example.bg.conf, translated by Peace. 2005-08-27 14:39:21 +00:00
Bram Matthys 5b444f173a LALalal 2005-08-26 19:38:25 +00:00
Bram Matthys aab5c3eb71 testtest 2005-08-26 19:37:45 +00:00
Bram Matthys b2115e868e aa 2005-08-26 19:37:12 +00:00
Bram Matthys a84350b9d0 - Fixed crash with invalid set::network-name (eg: high ascii), reported by galahad
(#0002584), now printing an error instead (the network name is limited by the 005 spec).
2005-08-19 19:12:21 +00:00
Bram Matthys 247e2ea6d5 - Temporary workaround for spamfilter bug: action 'viruschan' in combination with the
'u' (user) target can cause severe problems (crashes, etc). For now, we have disabled
  'viruschan' in combination with 'u'. A real fix will require quite some work, sorry.
2005-08-19 15:55:06 +00:00
Bram Matthys b340844aed - Fixed ~c not working properly with * and ?'s in channel names.. Now you just need to
escape them like in all bans (eg: to ban #* you need to +b ~c:#\*). As an additional
  bonus, real wildcards are now accepted and processed (eg: +b ~c:#*sex*, just don't
  forget to specify the #). Reported by PhantasyX (#2605).
- Sidenote on above: ~c:*chan* is not supported (use ~c:#*chan* instead) because it would
  cause "hidden bans", therefore it now prints a message (which is useful anyway), but
  does accept such remote bans. In 3.2.5 or so we could enable support for it, it's
  not that important though... ;)
- Added ifdefs for mass closing of file descriptors on start, can now be disabled by
  adding -DNOCLOSEFD as a compile option. Useful for valgrind w/--db-attach=yes, mpatrol,
  and some other debugging tools (not useful for anyone normally running a server).
- Fixed a read-after-free: sptr->serv->aconf was freed but not NULL'ed in exit_client,
  causing close_connection to read from it (when deciding on doing a quick reconnect).
  Could have caused a crash, although nobody ever reported one...
- Removed useless strncpyzt with dest==src.
2005-08-19 15:14:30 +00:00
codemastr df37fc9d5e Fixed a bug where allow channel::channel generated a warning when specified multiple times 2005-08-18 18:38:56 +00:00
Bram Matthys 0edd95dd2f removed useless var + forgot to give credit to ratbox for in6addr_any detection code. configure not rebuild because there are not exactly source code changes... 2005-07-25 21:33:34 +00:00
Bram Matthys 1e509d5dbf changelog comment slightly editted...
- Added -Wno-pointer-sign (if available) to get rid of those stupid warnings that are
  enabled by default even without -Wall (!?) on GCC4.
2005-07-25 21:25:43 +00:00
Bram Matthys ef43bedd03 blah.. that didn't work, this does. [seperate case/esac] 2005-07-25 21:24:57 +00:00
Bram Matthys 97cc076531 - Added -Wno-pointer-sign to get rid of those stupid warnings that are enabled by default
even without -Wall (!?) on GCC4.
2005-07-25 21:17:35 +00:00
Bram Matthys 3b84610599 - IPv6: Added configure check for in6addr_any to fix Fedora Core 4 compile problem,
reported by wheatie80 (#2594).
2005-07-25 21:11:27 +00:00
Bram Matthys 10458c06b9 - Fixed problem with crash-on-link if compiled with GCC 4, reported by jonneyboy (#2573)
and PHANTOm (#2590).
2005-07-25 19:16:16 +00:00
Bram Matthys 0a8e5e6a69 clarification on comment:
- Added -fno-strict-aliasing.. this might well be temporary, but we get tons of strict-
  aliasing warnings, so it sounds good to disable this type of optimization for now.
2005-07-22 23:44:39 +00:00
Bram Matthys 13b81da728 - Added -fno-strict-aliasing
..more on that later..
2005-07-22 23:40:07 +00:00
Bram Matthys bc0e3e9722 no-strict-aliasing.. 2005-07-22 23:30:57 +00:00
Bram Matthys 8a9bae11fa - Made '?*' work correctly in wildcard matches, reported by Bugz (#2585). 2005-07-05 20:26:18 +00:00
Bram Matthys 83cc82bbf2 typo in changelog 2005-07-05 19:16:22 +00:00
Bram Matthys 50ceda48d2 - Added some TSCTL logging (this reminds me we need to add new log levels for 3.3 ;p).
- Attempt to fix bug #2431: 3.2.2 broke CNAME delegation for reverse dns. I'm sorry it took
  so long, but this stuff just plain sucks...
2005-07-05 19:14:58 +00:00
angrywolf 570ba8e327 Doc update (week 23) 2005-06-25 21:52:45 +00:00
stylus740 5fae4f3bf7 Changes of week 23 doc/unreal32docs.de.html 2005-06-13 15:11:57 +00:00
Bram Matthys 08954beb0d -extern MODVAR int badclass; <-- unused var 2005-06-12 18:56:44 +00:00
babass b45a9c4e45 Changements mineurs 2005-06-12 16:54:01 +00:00
trocotronic 5b450e87fa Cambios semana 23 2005-06-11 09:22:55 +00:00
Bram Matthys 3efb800947 - Fixed 2 problems caused by TKL move: 1 windows crash, 1 problem with loading m_*.so,
reported by Trocotronic (#0002553, #0002554).
2005-06-07 14:06:48 +00:00
Bram Matthys d4f27c1183 - Fixed various major bugs due to TKL move from 13h ago. 2005-06-05 14:11:40 +00:00
Bram Matthys 4f40d73aa4 - Moved all TKL code and register_user to modules (using efuncs), that means 20 functions
and 2000 lines total that can be hotfixed if needed ;). The effort involved in moving all
  this sucks a lot though :/. This might need some more testing to make sure it doesn't break
  anything.
- Updated support OS list in documentation.
2005-06-05 00:58:36 +00:00
Bram Matthys 05f2bdfeab ok well, perhaps another time. 2005-05-26 20:45:37 +00:00
Bram Matthys 9d30ce5c75 - Removed quarantaine from all docs: this feature does not exactly add much security because
whenever a server is added to a network it has a lot of power that cannot simply be controlled
  by things like unsetting operflags remotely or anything else. I don't want to encourage
  anyone to use it.
2005-05-26 20:44:01 +00:00
Bram Matthys 24beac59c3 - Cosmetic bug in set::modes-on-join: now rejecting +I in it. Reported by Ron2K (#0002508). 2005-05-26 20:23:53 +00:00
Bram Matthys 5fcd80e11f - Fixed a TKL crash on incorrect *line, reported by nanookles1234 (#0002524).
- Redid include dependencies in Makefile, this makes things safer because on any .h change it
  would force a recompile of all files, but it could mean things will be a bit slower for us
  coders unless we tweak it later on.
- Changed whois a bit to print less useless results.
- Added several indicators to the "detect binary incompatible modules"-system such as detecting
  of a ziplinks module on non-ziplinks (on windows this is ok however), nospoof module on a
  a server without nospoof server, etc. Hopefully this will help some people preventing odd
  crashes because they did not recompile or (re)install modules properly.
- Added './unreal backtrace', so far this has only been tested on Linux and FreeBSD.
- Fixed a bug making ./Config not load the previously stored settings on Solaris 10 and
  probably other Unixes, reported by lion-o (#0002474).
2005-05-26 20:18:07 +00:00
Bram Matthys a58308d0d8 - Fixed chanmode G showing up twice in 005, reported by Snake (#0002466). 2005-04-18 19:30:09 +00:00
stylus740 481324ffef Corrected some spelling mistakes in doc/example.de.conf and doc/help.de.conf 2005-04-10 05:54:38 +00:00
stylus740 8b7a096bee Crorrected linking mistake doc/unreal32docs.de.html 2005-04-04 15:18:28 +00:00
Bram Matthys 1b0d97c5bd - Module coders: Added HOOKTYPE_LOCAL_SPAMFILTER: catches (local) spamfilter matches. 2005-04-02 20:42:15 +00:00
gsf 089ee0fca9 Week 12 Updates. 2005-03-29 01:35:12 +00:00
angrywolf 3a88cdbdc8 Doc update (week 12) 2005-03-26 18:37:36 +00:00
trocotronic d4144dd86c Cambios semana 12 2005-03-26 13:42:45 +00:00
stylus740 6868541b84 doc/unreal32docs.de.html Changes of week 12 2005-03-26 09:44:07 +00:00
stylus740 1f6ac63d4c doc/unreal32docs.de.html Changes of nickchar characters 2005-03-25 10:02:23 +00:00
Bram Matthys eae23edc62 watch clarification 2005-03-24 22:20:47 +00:00
gsf 56a694b1bb Week 10-11 Updates. 2005-03-23 21:46:55 +00:00
Bram Matthys 0a4c8ae419 - Added 'danish' nickchars, supplied by klaus (#0002436). 2005-03-23 21:45:22 +00:00
Bram Matthys c6f34c7de3 - spamfilter.conf Gaggle worm sigs were broken causing odd things to match, this is because
\\ now needs to be escaped as \\\\ due to the 3.2.3 conf change... didn't think of updating sigs.
2005-03-20 17:15:57 +00:00
stylus740 9407616a0e Changes of week 11 / crorrection of some errors: doc/unreal32docs.de.html 2005-03-19 09:30:09 +00:00
stylus740 cf7d113034 correction of errors in doc/help.de.conf 2005-03-14 20:55:42 +00:00
Bram Matthys fcc7ba12aa hm, nm 2005-03-14 16:51:50 +00:00
Bram Matthys e54a74eb52 - (repack) Fixed incorrect badword { } in conf causing a crash (should give an error). 2005-03-14 16:18:31 +00:00
Bram Matthys 4a69b08291 fixed incorrect badword { } causing a crash 2005-03-14 16:09:30 +00:00
Bram Matthys ca4bbb66eb ** 3.2.3 release ** 2005-03-13 20:24:39 +00:00
babass 352bb63b85 Petite correction de typo 2005-03-13 17:53:55 +00:00
Bram Matthys 4fb2a55374 - Corrected small doc typo in unreal32docs, reported by arbiter. 2005-03-13 17:35:55 +00:00
trocotronic a642574a97 Estas tildes... 2005-03-13 09:11:37 +00:00
stylus740 a7355b6ddb Changes 2005-03-13 of doc/example.de.conf doc/help.de.conf 2005-03-13 08:54:55 +00:00
angrywolf 1d0457a1b5 Doc update (week 10) 2005-03-13 02:14:57 +00:00
Bram Matthys c4aea6f0c8 ** internal 3.2.3-pre4 release ** 2005-03-12 21:17:59 +00:00
babass 8640d7da54 Remise à niveau du suivi de la mise à jour 2005-03-12 12:43:49 +00:00
trocotronic 9c2254ad27 Cambios semana 10 2005-03-12 10:00:08 +00:00
stylus740 597d1c2abc Chnges of week 10 for doc/example.de.conf doc/help.de.conf doc/unreal32docs.de.html 2005-03-12 09:04:53 +00:00
babass 6d754671a6 Quelques clarifications sur /RESTART, les redémarrages distants n'ont en fait jamais été supportés, la doc est donc modifiée (pas de modification du code) 2005-03-11 11:18:05 +00:00
Bram Matthys 66804a1cbc - Some clarifications on /RESTART, remote restarts were well never supported, so the docs
are now updated on that (no code changes).
2005-03-11 00:05:37 +00:00
Bram Matthys f92bf9e6d2 - Fixed an important channelmode +j memory corruption bug that would cause crashes, reported
by Bergee (#0002416).
2005-03-10 16:44:34 +00:00
Bram Matthys 34ec08348c - /SAMODE could cause 'fishy timestamp' if digit parameters were used (eg: SAMODE #chan +l 5),
this has now be fixed by sending an explicit TS 0.
2005-03-10 01:29:30 +00:00
codemastr 0fb95bd6ad Updated the list of donators 2005-03-09 15:32:10 +00:00
Bram Matthys 5e44f6b264 - Some spelling fixes in unreal32docs.html, reported by alex323 (#2412). 2005-03-08 23:20:18 +00:00
cvs2hg d4e480cebd fixup commit for tag 'unreal3_2_3pre3' 2005-03-06 21:22:39 +00:00
Bram Matthys 0d7e69803e version nr.. 2005-03-06 21:22:38 +00:00
Bram Matthys d0c6ee47c7 ** internal 3.2.3-pre3 release ** 2005-03-06 21:09:14 +00:00
Bram Matthys e9b536694b - Added doc/example.de.conf 2005-03-06 21:04:54 +00:00
Bram Matthys 6090928333 - Fixed /SAMODE with no can_override not always working with +G/+j/+T (extcmodes), reported
by Ron2K (#0002398).
2005-03-06 21:01:42 +00:00
codemastr 4e7f9c67ba Made it so the win32 version shows channel modes in /list 2005-03-06 19:53:55 +00:00
babass e84bb4b27b Retrait de l'ancien module de cloaking, tout le monde devrait utiliser le nouveau maintenant. 2005-03-06 16:54:34 +00:00
codemastr 7e83d6c150 Made +g get removed when an oper sets -o 2005-03-06 16:49:32 +00:00
gsf 71a2d3c316 Week 08-09 updates - fixed some markup stuff 2005-03-06 10:23:20 +00:00
stylus740 4c01089b10 corrected some mistakes in doc/help.de.conf (o3/06/2005) 2005-03-06 09:01:26 +00:00
Bram Matthys dc1fdb3f34 - Updated release notes (translated docs, zlib, doc\technical, sp/cS desynch). 2005-03-06 00:37:25 +00:00
Bram Matthys c0b6a97c04 - Removed oldcloak cloaking module, everyone should be using the new cloak one by now. 2005-03-06 00:29:20 +00:00
Bram Matthys 6ceb227f58 - Made windows installer also install doc\technical\* 2005-03-06 00:22:56 +00:00
Bram Matthys 20a7feba1f - Windows versions will now be compiled with zlib 1.2.2 and curl 7.13.1. 2005-03-06 00:17:38 +00:00
Bram Matthys f88cea7b45 - Fixed a bug where an unknown operflag would cause a crash. 2005-03-05 20:02:17 +00:00
Bram Matthys 24b9c466a2 - Fixed +s/+p and +c/+S desynch issue during netmerge, reported by Ron2K (#0002391). 2005-03-05 19:58:11 +00:00
babass 3e8f918aa9 Ajout de la documentation sur le mode de salon +j 2005-03-05 17:41:08 +00:00
Bram Matthys eba25738e8 - Added doc/help.de.conf and doc/example.hu.conf 2005-03-05 17:28:17 +00:00
codemastr 338e8497f3 Added documentation about channel mode +j 2005-03-05 17:13:42 +00:00
trocotronic 613544de5c Cambios semana 9 2005-03-05 17:00:25 +00:00
codemastr 0e927787e5 Fixed a couple of typos in doc/example.conf 2005-03-05 16:59:22 +00:00
stylus740 a58a263c67 Changes doc/unreal32docs.de.html week 08 + week 09 2005-03-05 13:02:59 +00:00
angrywolf f253237b1a Doc update (week 09) 2005-03-05 11:43:50 +00:00
cvs2hg 80ca78a285 fixup commit for tag 'unreal3_2_3pre2' 2005-03-04 23:35:31 +00:00
Bram Matthys ede8b13b44 ** internal 3.2.3-pre2 release ** 2005-03-04 23:35:30 +00:00
Bram Matthys 126c07c69f - Fix for above, also reported by Trocotronic. 2005-03-04 23:06:45 +00:00
Bram Matthys 1cec07250e - Fixed various (major) problems that the '-h yourself' caused, reported by Trocotronic
(#0002387).
2005-03-04 22:30:47 +00:00
Bram Matthys 2163d0dddf - Merged NICKCHARS= in PROTOCTL for now, since a seperate one is not (yet!) needed,
reported by SolutechUK and psadi (#0002386).
2005-03-04 21:00:52 +00:00
babass 25ac499c99 Traduction de la FAQ + modification de la partie charset 2005-03-04 20:13:47 +00:00
Bram Matthys 92f413f387 - Fixed a bug where /SAJOIN user 0 caused a desynch, reported by trystanscott (#0002384). 2005-03-04 19:18:25 +00:00
codemastr 137d136233 Fixed a bug with /invite with no parameters (accidentily broken when +I was added) 2005-03-04 17:17:37 +00:00
Bram Matthys 28efcdc65a ** internal 3.2.3-pre1 release ** 2005-03-03 19:50:23 +00:00
Bram Matthys 38a64f1c17 Version now really at 3.2.3-pre1 (not 3.2.2-pre1) ;p 2005-03-03 15:20:16 +00:00
Bram Matthys dabc42e0c3 - TRE mem corruption- & crash-bugs (eg: in backreferences). 2005-03-03 01:16:26 +00:00
Bram Matthys ee7961f31e - alias::format in combination with ::type 'command' caused a crash 2005-03-03 01:15:05 +00:00
Bram Matthys e68b82724a - Renamed version to 3.2.3-pre1, for Thursday. I'll keep the doc version numbers
at 3.2.2-CVS to avoid confusion with the online semi-realtime docs ;).
2005-03-03 00:13:24 +00:00
Bram Matthys cbbc35fae3 - Made some (incorrect) -Wall warnings dissapear. 2005-03-03 00:06:42 +00:00
Bram Matthys 3ae96d5eea typo 2005-03-02 15:41:22 +00:00
Bram Matthys f436f1ea51 - Made the (G)ZLINE warning only happen on add, as it should. Reported by crazy. 2005-03-02 15:40:10 +00:00
Bram Matthys 6a4878f7cd - Updated russian-w1251 (added 2 chars). 2005-03-01 23:54:06 +00:00
Bram Matthys 49ecd9c86f 3.2.3 -> 3.2.3-notyet :p 2005-03-01 22:57:33 +00:00
Bram Matthys 4eba81fa21 - Added 3.2.3 release notes (expected to be changed later on). 2005-03-01 22:56:52 +00:00
Bram Matthys 46fd5f27af - NickChars: Added 'romanian', supplied by crazytoon. 2005-02-28 22:19:03 +00:00
Bram Matthys 09dada415e - Updated doc/technical/token.txt, reported by webfox (#0002373). 2005-02-28 21:09:41 +00:00
Bram Matthys f5110bca31 - Made spamfilter 'u' also check nickchanges, reported by Gilou (#0002251). 2005-02-28 20:15:28 +00:00
Bram Matthys afcfabe8f6 - Made it so halfops can -h themselves, and chanadmins can -a themselves, reported
by fez (#0001503).
2005-02-28 19:50:19 +00:00
babass dc704bd1c0 Traduction de la FAQ + modification de la partie charset 2005-02-28 12:47:25 +00:00
Bram Matthys 6fdc15524b credit -> HERZ 2005-02-28 03:01:06 +00:00
Bram Matthys 0d3b7415ab typo in changelog 2005-02-28 00:28:22 +00:00
Bram Matthys 3597c4a135 - Fixed 'russian-w1250', was not ok at all. 2005-02-28 00:28:02 +00:00
Bram Matthys 19cc435119 - Made badwords (+G) now work with hardcoded word boundaries. Also made the fastbadwords
system accept more characters. Basically what this means is that the (fast) badwords
  system can now be used to properly block words with accents and things like that, just
  the way you block English words. Bug reported by MJ12Helios (#0002311).
2005-02-28 00:11:29 +00:00
Bram Matthys 914f6cceb3 - A warning is now sent to the oper if (s)he tries to add a (G)ZLINE on *@host.
(G)ZLINES should have an ipmask, not a hostmask, because they are processed BEFORE
  any dns lookups are done.
2005-02-27 22:39:51 +00:00
Bram Matthys 6afa0da62b - Fixed /(G)ZLINE [nick] placing the *line on *@host instead of *@IP, reported by
Snake (#0002246).
2005-02-27 22:25:17 +00:00
Bram Matthys 42b975a118 - Fixed various OperOverride issues:
- Opers with can_override can now +qa/-qa even if they are not netadmins,
    and they can also (un)set L/u.
  - Fixed several SAMODE bugs, such as not completely working for non-netadmins and
    not working if you were halfop'ed, etc.
  Bugs reported by pak, aquanight, niphler, Bugz, and more.
  If there are still any bugs left, please report them on http://bugs.unrealircd.org/
  NOTE: some of these enhancements will produce desynchs if your net is not 100%
        on current CVS / Unreal3.2.3 and an oper tries to use these 'new features'.
        So use with care on mixed-version nets.
2005-02-27 22:07:36 +00:00
Bram Matthys cc3a40c383 NICKCHARS:
- Added 'czech-w1250' and 'slovak-w1250' (both might miss a few characters).
  - Added 'windows-1250' group which contains czech-w1250, slovak-w1250, polish-w1250
    and hungarian.
  - Hungarian characters show both fine in w1250 and latin2, hence hungarian is included
    both in 'windows-1250' and 'latin2'.
  - Fixed bug: polish was not included in latin2
2005-02-27 19:41:21 +00:00
Bram Matthys de11702f2e - Added 'russian-w1251', supplied by Roman Parkin. There are like 3 main standards in Russia,
and 7 standards in total, so I didn't dare to call this one 'russian' ;).
2005-02-27 17:31:52 +00:00
Bram Matthys 03eb1935fd REVERT OF PREVIOUS 2, CHANGED TO AUTO-CONVERT:
- If a locop now has can_override/can_gkline/can_gzline we will print out a warning and
  convert it to globops. This is also what we always did for can_globalroute/can_gkill
  (well, except the warning). Giving such NETWORK (GLOBAL) privileges to a LOCAL operator
  does not make any sense and is therefore no longer allowed.
2005-02-27 16:22:24 +00:00
Bram Matthys d226a87522 - Made the can_override one an error since it makes 0.0% sense. 2005-02-27 16:07:31 +00:00
Bram Matthys f0718cc515 - Added warning on using can_override/can_gkline/can_gzline in combination with locops,
since these are global privileges they shouldn't be permitted (will be an error in 3.2.4).
2005-02-27 00:48:56 +00:00
Bram Matthys c01b0e1d0b typo in changelog 2005-02-27 00:02:03 +00:00
Bram Matthys 07d397b4ff - Changed the 'is a Secure Connection' msg/numeric in /whois from RPL_WHOISSPECIAL to
a slightly changed RPL_WHOISSECURE, namely: ':%s 671 %s %s :is using a Secure connection',
2005-02-27 00:01:36 +00:00
Bram Matthys 988a0eb0c2 - Fixed bug in +G where with not-really-matching-words color was needlessly stripped,
reported by SpeedFire (#0002375).
2005-02-26 23:40:54 +00:00
Bram Matthys 3b229d5d34 - Nicks with ~ are now also not cutoff anymore but rejected like any other illegal char (#0002074). 2005-02-26 23:31:07 +00:00
Bram Matthys 4887bb365b - Fixed halfop trying to set chanmode +G/+T/+j not getting an error message, reported
by Ron2K (#Ron2K).
- Module coders: using extcmode_default_requirechop is now depricated, check src/extcmodes.c
  ctrl+f extcmode_default_requirechop for more details (solution: copy+paste & fill in modechar).
2005-02-26 23:27:08 +00:00
Bram Matthys 7bad90fec1 - Made CHGIDENT, CHGHOST and CHGNAME use more numerics (where possible) (#0002358). 2005-02-26 23:10:14 +00:00
Bram Matthys 4788bc3f76 - Fixed bug where chanmode +f #t (per-user text kick[ban]) was also affecting halfops,
reported by seneces (#0002333).
- Fixed doc bug reported by Dukat (#0002374). Also fixed 2 error msgs related to
  the nickchars system printing out incorrect set:: directives.
- spamfilter.conf and dccallow.conf are now also copied upon make install, reported by
  TommyTheKid (#0002313).
2005-02-26 22:47:10 +00:00
Bram Matthys 4af12d14ea - Fixed a bug in mode-skipping (eg '+qk a b' if not +q) and error msgs, reported by brain2
(#0002372).
2005-02-26 17:42:24 +00:00
angrywolf c8a4857452 Doc update (week 08), I've also done some grammar corrections 2005-02-26 13:23:19 +00:00
trocotronic 78673b7228 Cambios semana 08 2005-02-26 10:21:05 +00:00
babass b8424dc50f Update support des caractères 2005-02-25 20:56:07 +00:00
codemastr 0b43d15d53 Fixed a bug where SAJOIN would list channels multiple times in the notices 2005-02-25 18:25:18 +00:00
codemastr d8fc8c0935 Fixed a bug causing SVSNICK not to send out a snomask +n notice 2005-02-25 18:14:35 +00:00
codemastr ab4a0a31b5 Updated wircd.def. Fixed a bug where USERIP would say USERHOST in the not-enough-parameters numeric 2005-02-25 18:09:09 +00:00
Bram Matthys b8c9e4fde5 - NickChars: Added 'icelandic', supplied by Saevar. 2005-02-25 16:28:39 +00:00
Bram Matthys eca350056c - NickChars: Updated polish a bit, and added polish-w1250 which is unfortunately more
common than real latin2 (iso-8859-2), supplied by k4be as well.
2005-02-24 00:09:57 +00:00
Bram Matthys 2a1bd9e244 - Fixed a doc typo, reported by SDF_of_BC. 2005-02-23 22:05:55 +00:00
babass 453d6b3fb6 Modifications de l'aide sur les charsets 2005-02-23 20:46:14 +00:00
Bram Matthys 0e811c403a - Added French example.fr.conf and help.fr.conf, translated/maintained by Babass. 2005-02-23 20:01:24 +00:00
Bram Matthys ad254b94c0 - Added hebrew (iso8859-8I / windows-1255), supplied by PHANTOm. 2005-02-23 19:54:43 +00:00
Bram Matthys 27396e9b26 - Added polish (latin2), submitted by k4be. 2005-02-23 16:32:59 +00:00
Bram Matthys 2c500fcf72 nickchars...
- Build in some additional checks (especially for Chinese).
  - Fixed a bug in chinese character range (affecting 3.2*)
  - Relaxed nick character checking from remote servers (rely on NICKCHARS= PROTOCTL
    to deal with problems). This is useful to prevent any kills in case we slightly
    change the characters that are allowed in a language.
2005-02-22 16:47:20 +00:00
Bram Matthys 8ba098a77a - NickChars:
- Got rid of 'latin7', tiny mistake ;)
  - Removed e' accent from German (used in borrow-words only), reported by Dukat.
  - Added 'swiss-german', which is just German without es-zett, reported by Dukat.
  - Added 'turkish', supplied by Ayberk Yancatoral.
2005-02-21 16:06:08 +00:00
Bram Matthys 97d4be791b - Added NICKCHARS= in PROTOCTL. This indicates which languages are accepted in nicks.
If 2 servers try to link and the allowed nick characters do not fully match, then
  the link will be rejected. Note that this will not prevent you from 3.2.2<->3.2.3/CVS
  charsets mistakes, but only with linking CVS/3.2.3+ servers. Suggested by Troco (#0002360)
  This might need some additional testing, but initial results are positive :).
2005-02-20 22:05:06 +00:00
gsf bff1caa482 Week 7 Doc Updates 2005-02-20 21:46:44 +00:00
babass cedddacbf1 Ajout sur les charsets plus qques autres modifications 2005-02-20 20:02:35 +00:00
Bram Matthys 01262aefd9 - Removed 2 unneeded characters from 'catalan'. 2005-02-20 19:20:15 +00:00
Bram Matthys 67bd44cb77 - set::allowed-nickchars:
- Renamed 'euro-west' to 'latin1' since that's more descriptive/fair ;)
  - Added 'hungarian' [supplied by AngryWolf]
  - Added category 'latin2': just Hungarian for now
  - Added 'catalan' [supplied by Trocotronic]
  - Added 'greek' [supplied by GSF]
  - Added category 'latin7': alias for 'greek'
  - Added category 'gbk': alias for 'chinese'
2005-02-20 17:24:44 +00:00
Bram Matthys 5b5b6ce919 - Various updates to unreal32docs from Ron2K (#0002354). 2005-02-20 16:07:49 +00:00
Bram Matthys c35947553f credit! 2005-02-19 21:58:45 +00:00
Bram Matthys 99d1d11676 - Added swedish support for nicks, supplied by Tank. 2005-02-19 21:58:26 +00:00
Bram Matthys 8650c97cd3 - No longer cutoff nick upon illegal character -- just reject the whole nick. The nick is
still cutoff if the nick is too long. Basically this is the same way as Hybrid does it
  so it should work ok :).
- Added nick character system. This allows you to choose which (additional) characters
  to allow in nicks via set::allowed-nickchars. See unreal32docs.html -> section 3.16
  for a list of available languages and more info on how to use it.
  Current list: dutch, french, german, italian, spanish, euro-west, chinese-trad,
  chinese-simp, chinese-ja, chinese.
  If you wonder why your language is not yet included or why a certain mistake is present,
  then please understand that we are most likely not experienced (at all) in your language.
  If you are a native of your language (or know the language well), and your language
  is not included yet or you have some corrections, then contact syzop@vulnscan.org or
  report it as a bug on http://bugs.unrealircd.org/
2005-02-19 20:47:41 +00:00
Bram Matthys 6128e121b3 - Some help.conf/005.txt updates, reported by Ron2K (#0002354). 2005-02-19 19:21:09 +00:00
angrywolf af5d1d7196 Doc update (week 07) 2005-02-19 14:39:21 +00:00
stylus740 e2ad6c059d Changes week 07 of doc/unreal32docs.de.html 2005-02-19 09:41:47 +00:00
trocotronic 44dad06890 Cambios semana 7 2005-02-19 09:36:34 +00:00
Bram Matthys 87557e0390 - Added greek docs, translator: GSF. 2005-02-17 19:42:02 +00:00
Bram Matthys db69e18e06 - Fixed a bug where shuns placed on IP's did not take effect to currently connected users.
- Fixed a small doc bug regarding shun in spamfilter, reported by KnuX (#0002338).
2005-02-14 15:28:13 +00:00
babass dcf50597e3 Quelques modifications mineures 2005-02-13 21:38:21 +00:00
Bram Matthys 11cb7a1136 - Fixed shuns not working as target in spamfilter and ban version { }, reported by Bugz
(#0002223).
2005-02-13 00:48:58 +00:00
Bram Matthys ab103a74cd - Docs: log { } from 'optional' -> 'recomended'
- If no log { } block is present a warning will be printed out and we will fallback
  to a default of logging errors to ircd.log. Suggested by w00t (#0002327).
2005-02-13 00:20:11 +00:00
Bram Matthys 9c38686f52 - Fixed SVSNOOP bug where remote servers still thought the opers had privileges, reported
by Zell (#0002185)
2005-02-13 00:01:31 +00:00
Bram Matthys 2665b9f04f updated docs on ~c 2005-02-12 23:40:12 +00:00
Bram Matthys 50520aee84 - Added a feature to +b ~c, ~c:[prefix]<#channel>, prefix can be +/%/@/&/~ and will
check if the user is voiced/halfoped/etc.. Especially useful for +e ~c. Idea from
  Bugz (#0002198). Obviously all servers need to be upgraded to make this work.
2005-02-12 23:33:26 +00:00
angrywolf 878777e642 - Doc update (week 06)
- Minor corrections again
2005-02-12 10:57:44 +00:00
trocotronic 9d541d8ed4 Cambios de la semana 6 2005-02-12 10:04:53 +00:00
stylus740 bfb3e15bce Update doc/unreal32docs.de.html Feb. 12. 2005 2005-02-12 10:04:43 +00:00
Bram Matthys b87e3f82fe made it a tad more clear that +j needs testing ;) 2005-02-12 00:11:12 +00:00
Bram Matthys d3a0bb92f6 - Added channelmode +j (jointhrottle), syntax: /mode #chan +j X:Y, and then it will
throttle the number of joins per-user to X in Y seconds. Idea from Angrywolf (who
  wrote a module that did this before). This might need some more testing :).
  It's enabled by default but can be #undef'ed in include/config.h (line 449).
2005-02-12 00:05:08 +00:00
angrywolf 0441305a3a Doc update (week 05) 2005-02-11 11:56:17 +00:00
codemastr e750d52f9e Made channel mode +S strip RGB color codes 2005-02-06 18:24:19 +00:00
codemastr 2d814ac488 Made channel mode +c block RGB color codes. Fixed a bug with channel alias{}'s where using the format syntax caused a crash. 2005-02-06 17:12:52 +00:00
stylus740 9654db70da changes doc/unreal32docs.de.html week05 2005-02-06 14:57:39 +00:00
Bram Matthys 432e3a3a6c - Win32 crash fixes due to modulizing 2005-02-04 20:03:46 +00:00
Bram Matthys 1790648081 plok 2005-02-04 19:08:26 +00:00
Bram Matthys 0945798211 [..] Also made loading m_*.so work again. 2005-02-04 15:49:29 +00:00
Bram Matthys 82d33e262c - Updated makefile to fix compile problem, reported by vonitsanet (#0002317) [?]. 2005-02-04 14:57:55 +00:00
Bram Matthys 3f46918f24 plok 2005-02-04 01:24:38 +00:00
Bram Matthys 1a655c11ca - Added spamfilter topic support ('t' in /spamfilter, or 'topic' in conf), suggested
by Z3l3zT (#0001929).
2005-02-04 01:05:42 +00:00
Bram Matthys be93950f40 - Fixed mode #chan +O set by locop causing a desynch, reported by Unim4trix0 (#0001946). 2005-02-04 00:42:19 +00:00
Bram Matthys 8eb88be500 - Made unreal_copyfile try hardlinking first, if that fails.. it will try to copy
(perhaps this should be a different function?). Anyway, this means less diskspace
  is needed (~1.5mb or more), and it also makes it a bit easier for RBAC (#2300).
- Made a new function DoMD5() which is ssl/non-ssl independent. Also made the cloaking
  module and the auth functions use it. Hopefully I didn't break anything ;). Suggested
  by Bugz (#2298).
2005-02-04 00:26:37 +00:00
Bram Matthys 3469211b62 plok 2005-02-03 18:33:47 +00:00
Bram Matthys e601339deb - Various (important) fixes to above, also made win32 compile work again. 2005-02-03 17:37:28 +00:00
Bram Matthys 4a3be9e58f .. 2005-02-03 17:13:53 +00:00
Bram Matthys bcfc9b85fb dumdeedum.. modulized fixes (timespan <2d) 2005-02-03 17:11:12 +00:00
Bram Matthys 9c979e4e04 join fixes? 2005-02-03 17:04:45 +00:00
Bram Matthys 3e1b7c0f47 bleh 2005-02-03 16:58:16 +00:00
Bram Matthys 03df91bbf3 opermotd tooooooo 2005-02-03 16:58:04 +00:00
Bram Matthys 4bf1758b89 ARGH botmotd GOOOONE 2005-02-03 16:57:42 +00:00
Bram Matthys b3257db161 - win32 makefile updates for above & more <= update 2005-02-03 16:56:02 +00:00
Bram Matthys 3b28ac0385 more modulized fixes 2005-02-03 16:53:29 +00:00
Bram Matthys 14879ae6f0 and another fix for modulized things 2005-02-03 16:51:32 +00:00
Bram Matthys b967f600df - win32 makefile updates for above. 2005-02-03 16:45:05 +00:00
Bram Matthys 6508c962f8 - Made m_template.c use CommandAdd() and CMD_FUNC()
- Modulized a lot of commands and related subfunctions: NICK (750 lines), USER (200),
  MODE (2300), WATCH (250), JOIN (600), PART (250), MOTD (100), OPERMOTD (100),
  BOTMOTD (100), LUSERS (100). More will follow soon (probably including more subfunctions
  related to existing commands).
2005-02-03 00:38:40 +00:00
Bram Matthys 74fdf83dcf copyright date updates 2005-01-31 14:54:28 +00:00
codemastr cee255cbe0 Fixed a win32 GUI problem where the tray menu's config submenu was not updated when new files were loaded or files were unloaded 2005-01-29 19:07:02 +00:00
babass 261c0f75c0 Ajout de corrections mineures 2005-01-29 18:19:17 +00:00
codemastr f43420a15c Fixed a problem when compiling Unreal with GUEST support 2005-01-29 18:07:12 +00:00
codemastr 7a37675909 Fixed a documentation inconsistency with me::numeric 2005-01-29 17:47:32 +00:00
codemastr 52fc709074 Corrected the help.conf documentation for /invite 2005-01-29 17:36:07 +00:00
codemastr a86c75bfb4 Fixed some problems with the /stats help and documentation 2005-01-29 17:22:54 +00:00
codemastr 839efd901a Added invite exceptions (+I) 2005-01-29 16:55:30 +00:00
Bram Matthys a557bc50d7 - Added debug code to trace proto-check bugs in DEBUGMODE [IsToken() etc]
- [Module coders] Added new function: do_cmd(cptr, sptr, cmd, parc, parv) which is an
  uniform method to call any other commands. For more info, see description in src/parcket.c.
  This will be used for any further modulization of commands that need to call other
  commands, like NICK (will be done soon).
2005-01-25 23:31:07 +00:00
codemastr 232b172256 Moved channel mode +G to extcmode to make room for invex 2005-01-23 21:45:49 +00:00
codemastr dd9e9417af Fixed a bug where specifying a reason to SVSPART would cause it to fail 2005-01-23 18:31:59 +00:00
codemastr 0258d13195 Added an options member to the ExtbanInfo structure. This currently supports one flag, EXTBOPT_CHSVSMODE. When set, this extban will be removed when an SVSMODE -b [nick] is executed 2005-01-23 18:24:34 +00:00
codemastr c2224bc5fd Made /stats E include tkl except stats as well 2005-01-22 18:39:33 +00:00
codemastr 64d8a67f4a makefile.win32 2005-01-22 18:34:09 +00:00
codemastr 3a052e213b Fixed a bug where /whois notices were not sent to users who are +R if the sender is -r and on a remote server 2005-01-22 17:59:23 +00:00
codemastr 282a5f3eab Reworded a cloak-key error message to make it clearer 2005-01-22 17:53:49 +00:00
codemastr cb1ca56cae Fixed a bug related to the sajoin recode regarding notices displayed 2005-01-22 17:51:17 +00:00
Bram Matthys 908387c024 ignore this ;p 2005-01-21 01:13:02 +00:00
Bram Matthys d0f4e86833 slight clarification + credit 2005-01-21 01:12:11 +00:00
Bram Matthys 68feb2ba64 - Fixed a resolver cache bug regarding CNAME's, this needs some more testing.
[this description will be updated after knowing if this indeed fixes #2229/#1236]
2005-01-21 01:04:17 +00:00
codemastr 8e0d1cd516 Fixed a problem with set::htm::incoming-rate being interpreted incorrectly 2005-01-18 16:50:53 +00:00
codemastr b9a516d664 Hopefully fixed the last of the alloca warnings 2005-01-17 20:41:27 +00:00
codemastr 107456853e Made it so +f notices are sent to %#chan, not @%#chan 2005-01-17 19:55:20 +00:00
codemastr 83fd8dfa11 Fixed a problem where doing ./unreal restart multiple times would not actually restart the ircd 2005-01-17 19:33:46 +00:00
codemastr 30c9781e72 Made /sajoin support multiple channels and using 0 2005-01-17 19:16:03 +00:00
codemastr 6c88aecf6c Made the win32 installer include the dccallow.conf. Made the win32 installer work with the latest version of Inno Setup (5.0.6) 2005-01-17 18:11:35 +00:00
codemastr 49a988c64f Fixed a couple of problems introduced with the ./Config -advanced changed 2005-01-17 18:04:39 +00:00
codemastr d3641acd7b Made SVSMODE -b and -e remove bans/excepts placed on IPs 2005-01-17 17:31:10 +00:00
codemastr 7e18fcd00e Fixed a minor typo in the "now an oper" announcement 2005-01-17 17:25:05 +00:00
Bram Matthys 7577ae774c clarification 2005-01-15 20:39:43 +00:00
Bram Matthys 3aeea5c63b - Fixed serious crashbug
- Fixed 'make install' error due to example.settings remove.
2005-01-15 18:37:15 +00:00
Bram Matthys 65024ce49e ouch! 2005-01-15 00:39:10 +00:00
trocotronic 4f93681c71 Informacion sobre las regexp 2005-01-08 11:22:21 +00:00
babass bb192d3016 *** empty log message *** 2005-01-06 11:56:38 +00:00
Bram Matthys 4a6f784e37 - Got rid of wma/wmv in dccallow.conf, better to require an explicit select here due to
recent DRM exploits (spyware etc).
- Fixed /restart reasons, reported by SouL-FoRTuNe.
- Partial (incomplete!) fix for alloca warnings during compile (especially w/SSL).
2005-01-05 01:44:42 +00:00
babass 1db7944c09 *** empty log message *** 2005-01-03 18:16:47 +00:00
angrywolf 0676d94ab1 Finished the translation of Appendix A (Regular Expressions). Also corrected some grammar mistakes in it. 2005-01-03 17:04:46 +00:00
stylus740 849205bb31 doc/unreal32docs.de.html week 53 2005-01-02 18:51:27 +00:00
stylus740 013b2de18f doc/unreal32docs.de.html week 53 patially Update (complete translation will follow soon) 2005-01-01 18:10:21 +00:00
codemastr 274230c55f Imported TRE 0.7.2 for *nix 2004-12-29 18:47:42 +00:00
codemastr 629825c6d9 Imported TRE to 0.7.2 for Windows 2004-12-29 18:35:36 +00:00
Bram Matthys d40fc31645 flatmap in /lusers 2004-12-29 04:58:59 +00:00
angrywolf 7c6a6332fc Continuation of the previous translation, part 3 2004-12-28 15:35:47 +00:00
angrywolf 854e64e253 Continued the translation of appendix A (Regular Expressions). 2004-12-28 00:16:24 +00:00
angrywolf 53b182a021 - Started working on the translation of appendix A (regular expressions).
- Corrected the grammar of all subtitles in section 4.
2004-12-27 02:04:44 +00:00
codemastr a07c13bdc2 Added some error checking to /sapart 2004-12-27 00:44:42 +00:00
codemastr 67470b474d Made the (?) kill message not show IP addresses 2004-12-27 00:21:08 +00:00
codemastr 7f8bcdb5b2 Made CIDR no longer accept bitmasks with less than 16bits for /*line commands 2004-12-27 00:14:07 +00:00
codemastr 77f8b18bad Added a basic regex tutorial to unreal32docs.html 2004-12-26 20:16:29 +00:00
Bram Matthys c251d4e198 - Some doc/ updates: removed: Unreal31_to_32.html & example.settings, updated: Authors &
translations.txt.
DEL: Unreal31_to_32.html & example.settings DUE TO outdated
MOD: Authors (added myself, updated griever end date), translations.txt (updated
     to mention that it takes a lot of time, and added a note on using word/frontpage).
2004-12-21 01:05:23 +00:00
Bram Matthys 5cf36dddca French docs update of week 49 (babass). Forgot to commit, woops ;p 2004-12-20 21:00:17 +00:00
Bram Matthys 3cbbaf125b - Fixed bug where servers behind ulines were not ulined, causing for example juped servers to
show up if flat-map was enabled, reported by GSF19 (#0002230).
2004-12-10 20:09:09 +00:00
Bram Matthys 02a00490ad - Fixed tkl except { } not working (post-3.2.2). 2004-12-09 17:15:52 +00:00
trocotronic 693f6e5183 *** empty log message *** 2004-12-04 13:49:14 +00:00
angrywolf 1d7b8bad06 Doc update (week 49) 2004-12-04 12:18:01 +00:00
stylus740 fbf2d2d394 Update unreal32docs.de.html week 49 2004-12-04 09:35:27 +00:00
Bram Matthys a76e4d4712 - Module coders: sendto_snomask* now only sends to opers, sendto_snomask_normal* can be used
to send to normal users w/the snomask set.
- Fixed dcc filtering a bit more.
- Made usermode 'g' operonly since it didn't do much, reported by DukePyrolator (#0002024).
2004-12-03 22:00:09 +00:00
Bram Matthys 54902b0285 - spamfilter.conf: fixed mIRC exploit sigs
- Fixed all spamfilters in configfile not working due to configrewrite (post-3.2.2).
2004-12-03 17:09:29 +00:00
Bram Matthys 4284c39307 - OperOverride INVITE notices are now also global (if you have the eyes snomask set) (#2212).
- Module coders: New function: sendto_snomask_global().
- Speedup sendto_snomask/sendto_connectnotice/sendto_fconnectnotice code.
2004-12-03 03:32:32 +00:00
Bram Matthys 6653e4ef3e help.conf: added long flags to OFLAGS. 2004-12-02 17:45:39 +00:00
Bram Matthys fd47548f55 added tiny note on how I generated indexes 2004-12-02 17:08:45 +00:00
Bram Matthys ecdb057111 - help.conf: Fixed a typo, updated *CMDS indexes a bit, reported crazy (#0002208). 2004-12-02 17:06:32 +00:00
Bram Matthys 55ece5e5e4 - Fixed Oper Override not giving a 'special join notice' if +z is set along with another mode
(eg: +i/+k), reported by tabrisnet (#0001487).
2004-12-02 16:47:55 +00:00
Bram Matthys 5b7e45545c - Fixed dcc spamfilter problem reported by TimeFX and Deadalus (#2177, #2204). 2004-12-02 04:51:29 +00:00
codemastr 9395e74143 Added missing documentation for spamfilter away target 2004-12-01 20:58:56 +00:00
codemastr afbf2070fa Added a set::gline-address which works like set::kline-address 2004-12-01 20:55:38 +00:00
Bram Matthys a6713f14cb - Fixed alloca warning @ Linux (post-3.2.2)
- Numeric audit: 15 small changes (int/long mismatches etc). This might have fixed some
  bugs on architectures where 'long' and 'int' have different sizes (eg: opteron).
2004-11-28 21:26:27 +00:00
codemastr bd142fc323 Added a config.h options, IPV6_COMPRESSED to make Unreal use compressed IPv6 addresses where possible 2004-11-28 17:53:43 +00:00
codemastr ad878b68c8 Changed the +z cannot join message to be a bit more descriptive 2004-11-26 23:28:48 +00:00
codemastr 78ff3fdd53 ... 2004-11-26 22:28:13 +00:00
codemastr 191127296a Rewrote some of the previous change to deal with some strange issues 2004-11-26 22:14:30 +00:00
codemastr 637a36a2af If a user is +b on a channel, and set::allow-userhost-change force-rejoin is used, a part/join is not sent in order to prevent flooding 2004-11-25 23:54:21 +00:00
codemastr 81de8345d2 Added some missing operflags to /stats O and SVSO 2004-11-25 19:22:13 +00:00
codemastr 45cee8f2bd Added the new /invite syntax to help.conf 2004-11-25 19:17:48 +00:00
codemastr a11e6df64b Using /invite with no parameters now lists the channels you are invited to but have not yet joined 2004-11-25 19:16:02 +00:00
codemastr 4c66f198c5 ... and set::hosts errors 2004-11-24 19:57:18 +00:00
codemastr 61f3c2cddf Fixed a minor bug in the new config system when displaying link {} errors 2004-11-24 17:48:31 +00:00
stylus740 aed701705a Update doc/unreal32docs.de.html week 47 2004-11-22 17:00:08 +00:00
angrywolf 84c5813bc4 Doc update (week 47) 2004-11-20 13:49:17 +00:00
trocotronic 174735967a *** empty log message *** 2004-11-20 12:55:41 +00:00
Bram Matthys d310864b43 - Added set::dns::bind-ip (rarely ever needed, but might be useful for paranoid people).
- Some unreal32docs->security section improvements.
2004-11-19 20:55:18 +00:00
Bram Matthys 30d0defdc0 - Fixed bug in remote version reply, reported by DukePyrolator (#0002180). 2004-11-19 20:42:43 +00:00
codemastr 1a035edc8c Fixed the crule parser to treat - and : as valid 'word' characters rather than separators 2004-11-19 20:12:10 +00:00
Bram Matthys ade0c0109d - Win32 installer: Apparently 'install as a service' was still not the default, reported
by fez (#0002191, #0002189).
2004-11-19 19:49:05 +00:00
Bram Matthys cb6bfc4d34 - Renamed some calls from report_error() to report_baderror() since otherwise the errors are
hardly ever seen (unless you have +s +j set). For example a bad link::bind-ip only caused
  "Couldn't connect to xxxxxx" without any meaningful error message. Additionally, errors
  sent to report_baderror() are now logged.
^^ way too long description for a small tweak :p
2004-11-17 17:38:54 +00:00
Bram Matthys bc809fd7aa French docs update of week 46 (babass). 2004-11-14 20:43:19 +00:00
stylus740 ce7bba8b5a doc/unreal32docs.de.html Changes week 46 2004-11-14 07:58:32 +00:00
codemastr dd2f5bedd8 Made typing /kline, /shun, /zline, and /gzline correctly report the correct /stats flag, and these commands now produce the same output as the respective /stats flag they emulate 2004-11-13 18:11:02 +00:00
codemastr 5439dddde5 Added documentation for set::options::fail-oper-warn, Removed an extra ) in the Throttle disconnect message, Fixed a bug where the "looking up your hostname" message could still be displayed even if hostname resolving was disabled 2004-11-13 17:51:26 +00:00
codemastr 77f898e985 Added support for using \\ in the config file to indicate a " 2004-11-13 17:40:49 +00:00
codemastr e964113964 Updated Donation file, Added a 'B' flag to /who output for bots, and allowed normal users to /who +m B 2004-11-13 17:15:17 +00:00
angrywolf fc78e50666 Doc update (week 46) 2004-11-13 10:44:05 +00:00
trocotronic 4e901fdd66 *** empty log message *** 2004-11-13 09:40:27 +00:00
Bram Matthys c3c29d38da - Fixed botmotd crash due to last change (post-3.2.2). 2004-11-10 16:48:24 +00:00
Bram Matthys c2d22329b9 - Fixed small memory leak on /rehash (post-3.2.2). 2004-11-09 20:50:37 +00:00
codemastr b213011ab9 Removed an excess space from the SAMODE notice when a mode without a parameter was set 2004-11-09 20:36:59 +00:00
Bram Matthys 4283702d2c - Fixed crashbug on /rehash due to config rewrite, also made DEBUGMODE working again.
Probably more fixes to come (small or not)...
2004-11-09 17:14:14 +00:00
codemastr 98cb02a410 Added the ability to specify a botmotd and opermotd in a tld {} 2004-11-08 19:40:29 +00:00
Bram Matthys 102d21855a Doc update - week 45 (babass) 2004-11-08 19:22:39 +00:00
stylus740 010d3275f2 unreal32docs.de.html update week 45 2004-11-07 08:05:54 +00:00
Bram Matthys 5af77f8779 - Small fix for above ($arg -> $ARG) 2004-11-06 19:18:46 +00:00
Bram Matthys f3cdcc72ab $arg -> $ARG 2004-11-06 19:17:14 +00:00
codemastr 1bb24f0515 Made ./Config better handle command line arguments, Removed NAZIISH_CHBAN_HANDLING as it didn't do anything, Added -advanced flag to ./Config to configure advanced options 2004-11-06 17:33:50 +00:00
angrywolf a69e979d3d Doc update (week 45) 2004-11-06 12:16:32 +00:00
trocotronic dc9d9dc62e *** empty log message *** 2004-11-06 09:41:29 +00:00
trocotronic 883ec36e8b *** empty log message *** 2004-11-06 09:38:33 +00:00
codemastr 2b3fda5a10 Documented the default behavior of snomasks when /mode nick +s is used and added 'const' to the functions in match.c 2004-11-05 21:26:38 +00:00
codemastr c52dff2da7 Fixed a bug with /rehash and classes due to the config parser rewrite and Modified the module symbol dependency code to do more accurate searching for the module hat contains the necessary symbol 2004-11-05 20:23:59 +00:00
codemastr fb0802a22b Corrected numerous -Wall warnings 2004-11-04 21:42:34 +00:00
codemastr e72b29f81c Recoded the config parsing code, faster, and duplicate config entry detection 2004-11-03 20:38:17 +00:00
Bram Matthys b4d7a60a72 - Added updated auspice.conf from Rocko since previous one was outdated (#0002147). 2004-10-30 15:18:48 +00:00
Bram Matthys aaabed6af2 - Some text updates... docs: now 3.2.2-CVS, lso got rid of double version to avoid
confusion. credits: fixed typo.
2004-10-30 12:21:24 +00:00
codemastr 43db020b75 Fixed a typo in the makefile for USERIP, Made the WATCH command work for WebTV users 2004-10-29 18:24:58 +00:00
Bram Matthys aaa29c02f8 ** 3.2.2 release ** 2004-10-27 18:27:40 +00:00
Bram Matthys f87a4fda13 - Changed version to 3.2.2 2004-10-27 18:18:06 +00:00
Bram Matthys 48bdcf92fc - Forgot to mention away spamfilter target in helpop, reported by Rocko. 2004-10-26 18:46:52 +00:00
Bram Matthys ed38124a1d notice->private-notice 2004-10-25 19:45:24 +00:00
Bram Matthys 50952ed629 REVERT 2004-10-23 21:24:29 +00:00
Bram Matthys cdecfbfedc clarifcation @ changes 2004-10-23 16:03:07 +00:00
Bram Matthys 2d3ca29a45 - Fixed bug where some ban ip { } masks didn't work. 2004-10-23 16:02:48 +00:00
angrywolf 3a9f8eee47 Doc update (week 43) 2004-10-23 09:33:29 +00:00
trocotronic 949de4f098 *** empty log message *** 2004-10-23 09:12:04 +00:00
stylus740 05b098396d Update doc/unreal32docs.de.html week 43 2004-10-23 08:25:26 +00:00
Bram Matthys f541d5f58f - French doc updates, hopefully synched now. 2004-10-22 20:37:00 +00:00
Bram Matthys 2ce551158a - Fixed some doc & release notes typos. Reported by Rocko, HiT. [release note correction was committed earlier] 2004-10-21 20:34:15 +00:00
Bram Matthys 64860fa6c3 Little typo @ release notes 2004-10-20 19:49:22 +00:00
Bram Matthys b434149c41 updated map, right before 3.2.2pre1:
+   IsupportStrings
+   Isupports
+   cmdstr
+   create_tkl_except
+   del_async_connects
+   find_spamfilter_user
+   gethost_byname_revquery
+   isupport_init
+   make_isupportstrings
2004-10-20 18:31:58 +00:00
Bram Matthys c333495b1b ** internal 3.2.2-pre1 release ** 2004-10-20 18:11:38 +00:00
Bram Matthys ea4db0c2fe - Updated version to 3.2.2-pre1 already. (well all the changes went with previous commit) 2004-10-19 18:26:08 +00:00
Bram Matthys 5133dcf755 Version number change -> 3.2.2pre1. Proto -> 2305. Some doc version updates (like Unreal3.2.tar.gz -> Unreal3.2.2.tar.gz). And a small note @ win32 compile instructions about no longer using /MDd but /MD. 2004-10-19 18:21:50 +00:00
Bram Matthys 9e855621e5 - Added some future SJOIN skip stuff. <= for future +I (invex) support. 2004-10-19 18:01:13 +00:00
Bram Matthys fbd7fa502a plok... 2004-10-19 15:30:41 +00:00
Bram Matthys f368a2ba04 this is supposed to be a better version... :p 2004-10-18 19:33:50 +00:00
stylus740 96582cb86e Update doc/unreal32docs.de.html week 42 2004-10-17 07:35:40 +00:00
Bram Matthys 2f42d44b74 - Fixed serious heap corruption bug if remote users were using qlined nicks, thanks to
Gilou and Trankill for making me able to trace this issue down (#0002032).
- Fixed qline notices again: now gives msg #1 for local qlined-nick attempts, and
  another msg in case of a remote client (eg: oper) using a qlined nick.
2004-10-16 19:32:04 +00:00
trocotronic bf829244b8 *** empty log message *** 2004-10-16 08:17:03 +00:00
Bram Matthys 5018dec02f - Windows version can now hold ~4096 connections instead of ~1024
- help.conf: clarified MKPASSWD documentation, reported by hypnetric (#0001926).
- Some modeskip handling for future versions
2004-10-13 18:30:41 +00:00
angrywolf 988f5ff9d6 - Made a few grammar corrections. 2004-10-12 15:10:00 +00:00
angrywolf c3b8d07de4 Update: except tkl::type 2004-10-12 14:44:47 +00:00
Bram Matthys e6156b4604 - Added spamfilter 'away' ('a') target (#0002057). 2004-10-11 18:46:53 +00:00
codemastr 6af767a885 Added file: include/macros.h and a new macro, ARRAY_SIZEOF, Added the ability to specify multiple types in a tkl except 2004-10-11 17:51:02 +00:00
Bram Matthys 681a0ce0c2 - Fixed OOB read/write on user quit (did no harm on Linux&FreeBSD).
- Fixed some tiny memory leaks (~100 bytes) on rehash.
- Updated chinese&japanese GBK nick code, fix supplied by Xuefer (#0002051).
- Added release notes (unfinished).
2004-10-10 23:37:25 +00:00
stylus740 31a7905c94 Update german doc/unreal32docs.de.html week 41 2004-10-10 08:51:44 +00:00
trocotronic 3716f12eee *** empty log message *** 2004-10-09 16:01:49 +00:00
angrywolf a0e3779f74 *** empty log message *** 2004-10-09 09:16:10 +00:00
angrywolf 2e9852c393 Update to the rest of the changes of week 41 (spamfilter target type clarifications). 2004-10-09 09:11:27 +00:00
Bram Matthys 2eadd2efa1 - IPv6: Fixed hostnames in link::hostname not working, reported by Jasmin (#0001990). 2004-10-07 23:52:46 +00:00
Bram Matthys 97ea680aec - Fix for too broad regex in badword::word causing the IRCd to hang, reported by Flop
(#0002101).
2004-10-07 20:45:18 +00:00
Bram Matthys 6f72b78d1b - Made docs a bit more clear on spamfilter targettypes. [sorry angrywolf ;pp] 2004-10-07 19:56:39 +00:00
angrywolf 4d7f9b5a5b - Doc update: alias::target, alias::format::target and spamfilter target 'user'.
- Also made a minor correction in the translation by request of groove-coverage.
2004-10-07 18:53:30 +00:00
Bram Matthys f6e36300bb - If a nick is qlined, the user is now lagged up to limit qline floods a bit (#0001335). 2004-10-06 22:03:11 +00:00
Bram Matthys fae77f21ec - Module coders: Added HOOKTYPE_REMOTE_JOIN, HOOKTYPE_REMOTE_PART, HOOKTYPE_REMOTE_KICK (all
work just the same as the HOOKTYPE_LOCAL_* variants).
- Module coders: HOOKTYPE_REMOTE_CONNECT is now also called during net-merge. You can use
  IsSynched(sptr->srvptr) to find out if it's called due to a net merge (0) or a connect (1).
- Added spamfiler 'user' (u) target. This regex is checked against nick!user@host:realname
  when a user connects. This makes it easy to ban drones with simple patterns.
  For example: '/spamfilter add u gzline 86400 Drone[0-9]+!.+@.+:Drone[0-9]'
  would kill any drones that have both a nick and realname with 'Drone' followed by digits.
2004-10-06 20:33:13 +00:00
codemastr d78acf841e Added channel alias {}'es and fixed an Isupport bug 2004-10-03 17:25:58 +00:00
Bram Matthys cf68fd7d41 - Fixed resolver not working in FreeBSD jail, reported & patch provided by urkel (#0002097). 2004-09-29 16:43:46 +00:00
Bram Matthys 33d9d1dbcd bleh 2004-09-28 18:56:45 +00:00
Bram Matthys d04b80dcc3 - Fixed a (useless) cloak typo / made it a few nanosec faster. Reported by Martin Brulisauer. 2004-09-28 18:56:12 +00:00
codemastr 3edac539d1 Updated Windows to TRE 0.7.0 2004-09-25 19:11:42 +00:00
codemastr 75b639af81 Fixed a +u problem and updated to TRE 0.7.0 2004-09-25 19:10:35 +00:00
Bram Matthys 188e7990ba - Temporary fix for ircsprintf %lu 1..6 issue. 2004-09-19 18:32:14 +00:00
Bram Matthys 47c5c36bda - Added salted passwords. Salts are useful because it "protects" against stored-plaintext
attacks (eg: rainbow) and prevents cracking of several passwords at once.
  This change means /MKPASSWD will now just generate a different string than before.
  Do note however, that the old syntax/encrypted passwords will still work and _will continue
  to work_ in the future, for at least the whole 3.2* series.
  If you are concerned with security and have some time, then converting your passwords
  is probably a good idea... Just in case your configuration file gets stolen one day ;).
- MD5 password encryption is now always available on *NIX, even if SSL is disabled.
2004-09-19 16:13:03 +00:00
Bram Matthys 9b882e5c6d - Fixed a bug regarding chanmode +mu where the <IRC> messages were not properly relayed
to all servers. Reported by Aenox (#0002079).
2004-09-18 22:31:08 +00:00
codemastr 9b86b48b81 Updated doc/technical/token.txt and resolved 2 token conflicts. 2004-09-18 17:49:42 +00:00
stylus740 cf760ad336 unreal32docs.de.html Changes week 37 2004-09-12 07:19:49 +00:00
Bram Matthys 19748e6f03 - Fixed prefix bug caused by previous 'fix'/behavior change. Reported by aquanight (#0002067). 2004-09-11 19:19:17 +00:00
trocotronic 3b6270056d *** empty log message *** 2004-09-11 16:26:55 +00:00
kolibot bbf0df59f1 *** empty log message *** 2004-09-10 12:01:26 +00:00
Bram Matthys 326f506cd9 - Updated installer for msvcr70.dll 2004-09-09 00:10:19 +00:00
codemastr f71bc9335e Changed some stuff to use the release version of MS libraries 2004-09-08 18:53:27 +00:00
kolibot dc77debaec test 2004-09-07 23:42:00 +00:00
Bram Matthys 1ee0f10401 - Added french docs, translated by Kolibot & Babass. 2004-09-07 23:20:42 +00:00
codemastr 18311db5bf Fixed a typo in the *nix Makefile 2004-09-05 23:17:37 +00:00
stylus740 edff4089c7 Update german Translation week 36 2004-09-05 06:46:02 +00:00
codemastr fea3b691b3 Added a USERIP command 2004-09-04 22:55:19 +00:00
angrywolf c88f698c88 - Update: snomask +o 2004-09-04 20:55:30 +00:00
codemastr 23ee49f602 Exported the isupport functions for use in Windows modules. Added a new snomask, +o to show oper-up notices (oper only) 2004-09-04 17:05:25 +00:00
codemastr 36a75d5b55 SVSO now removes +v 2004-09-04 15:53:02 +00:00
angrywolf 4896f37ed4 Some weird characters went into the description of link::ciphers. 2004-09-04 14:22:24 +00:00
angrywolf d8678f686c - Update to week 36.
- Many grammar corrections.
2004-09-04 14:11:11 +00:00
trocotronic 483570dc4a *** empty log message *** 2004-09-04 11:39:38 +00:00
codemastr cbc3eea61e Made it so WATCH will not respond with an erroneous reply if the parameter was simply + or - 2004-09-04 04:26:18 +00:00
codemastr 165386a44b Updated documentation to reflect that cmode +M allows voiced users to talk, not just registered users 2004-09-04 04:21:13 +00:00
codemastr a5a502c1d5 Added documentation for link::ciphers to unreal32docs.html 2004-09-04 04:18:01 +00:00
codemastr d18a82acfe Fixed a problem where a local TKL could be sent to remote servers when it is being changed 2004-09-04 04:08:07 +00:00
codemastr 53b8b86598 Fixed a bug with IP based except tkl {} lines did not validate the ident portion of the mask 2004-09-04 03:59:58 +00:00
codemastr b9558cebe4 ... 2004-09-04 00:00:49 +00:00
codemastr e1d088de41 Fixed a few compile warnings, made +b apply to IPs correctly 2004-09-03 23:48:15 +00:00
codemastr d4059fec92 Rewrote the 005 system to be dynamic and added an API to manipulate it 2004-09-03 21:46:32 +00:00
codemastr 2a1844812f Added a fix for installing unreal as a service under win2003 2004-08-24 16:18:05 +00:00
codemastr ed476aaf75 Added snomasks to /whois usermode output and made usermodes available to all opers not just +e 2004-08-22 18:05:04 +00:00
Bram Matthys 641b12bf00 - Some doc/example.conf clarifications, mainly for modules @ win32. 2004-08-08 15:06:36 +00:00
Bram Matthys 76cd27a028 - Made zip/non-zip modules on win32 binary compatible. Since it was nowhere documented
that you should pass the ZIP_LINKS etc options to 'nmake -f makefile.win32 custommodule'
  many people didn't do this which caused odd problems when reading certain clientstructs.
  Module coders: in the meantime, for 3.2.1 mods, use something like:
  nmake -f makefile.win32 USE_ZIPLINKS=1 ZLIB_INC_DIR="c:\dev\zlib"
   ZLIB_LIB_DIR="c:\dev\zlib\dll32" custommodule MODULEFILE=m_mymodule
  For 3.2.2+ these additional parameters will no longer be needed (but wouldn't harm either).
2004-08-07 21:20:22 +00:00
Bram Matthys 0a97b75bfb changed last comment -> - unbroke spamfilter not working for msgs/notices (oops..). 2004-08-02 03:33:13 +00:00
Bram Matthys acf99712e9 - Oops.. made spamfilter for msgs/notices not working ;p.. fixed. 2004-08-02 03:16:54 +00:00
Bram Matthys fa1c1d4db7 - Windows: the 'notice' parameter in the usermsg callback was always 0 due some windows/vc
weirdness, this also affected spamfilter (so any spamfilters added only at notice
  and not at msg on windows would not work). Now using the real 'notice' parameter.
2004-07-29 19:52:39 +00:00
Bram Matthys 1e743f80d4 forgot to change some paths (c:\openssl -> c:\dev\openssl) 2004-07-28 20:54:02 +00:00
Bram Matthys 1a8706a645 url change 2004-07-28 20:41:20 +00:00
Bram Matthys 85f88aa002 - Updated doc/compiling_win32.txt again with curl build instructions.
Also linked to a page with an unreal dev package which contains zlib+ssl+curl
  precompiled. This basically means many people no longer need to compile zlib/ssl/curl
  anymore themselves (which is a pain to do and takes a lot of time).
2004-07-28 20:40:10 +00:00
stylus740 9c2048f8cf Update unreal32docs.de.html for week 30 2004-07-26 06:25:32 +00:00
Bram Matthys d97c8de0b1 - Improved doc/compiling_win32.txt a lot: now VC7 only, and has instructions on:
compiling modules and their (binary) compatability, zip links (zlib), ssl (OpenSSL)...
  Remote includes (curl and c-ares) instructions still need to be added.
- Made 'Install as a service' unchecked by default, this should help beginners a lot.
2004-07-25 00:49:05 +00:00
trocotronic 743312fceb *** empty log message *** 2004-07-24 08:03:28 +00:00
Bram Matthys 6ce838a933 changelog typo: id -> if 2004-07-22 22:10:31 +00:00
Bram Matthys 1bd085164b - Fixed possible crash id /rehash'ing and a servername was just resolving (due to
/connect or autoconnect) and was not present in the cache. Reported and traced by sh0
  (#0001976).
- Fixed compile bug at *NIX caused by ModuleGetErrorStr fix.
2004-07-22 21:57:44 +00:00
Bram Matthys 0597307562 - Fixed bugs regarding HOOKTYPE_SERVER_QUIT: was sometimes called twice and could cause
crashes due read-after-free. Reported by SET (#0001988).
2004-07-22 21:29:48 +00:00
Bram Matthys c665636045 - Applied patch from slePP for bug #0001252: if IPv6 was enabled then in some cases names
were not properly resolved. Original bug reported by kormat.
2004-07-22 21:12:42 +00:00
Bram Matthys 7aad095b33 improved changelog msg 'Fixed an MacOS X crash-on-first-connect' -> also mention sun solaris [and possibly others] etc :) 2004-07-22 16:41:06 +00:00
codemastr e578ae4ad1 Added a missing message to ModuleGetErrorStr 2004-07-22 16:28:14 +00:00
Bram Matthys 9b9aa1d80f - Fixed a bug if me::info was set to "". 2004-07-21 20:57:22 +00:00
Bram Matthys c38621994b - Fixed an MacOS X crash-on-first-connect if SSL was enabled (#0001982), reported by bit. 2004-07-21 15:57:06 +00:00
angrywolf 827b5fa7e8 Doc update (oper::modes) 2004-07-19 17:42:41 +00:00
codemastr bdda1a6943 Made example.conf refer to unreal32docs.html for oper flags 2004-07-18 22:39:06 +00:00
codemastr 8440b94865 Added oper::modes 2004-07-18 22:35:55 +00:00
codemastr c0ea216165 Added a new modules makefile 2004-07-18 22:18:19 +00:00
codemastr ef85e44157 Fixed an NT service bug and a win32 lockup 2004-07-13 22:27:28 +00:00
codemastr 70b32d0164 Added sapart and svspart comments 2004-07-12 17:00:46 +00:00
trocotronic f73784de19 *** empty log message *** 2004-07-10 08:46:59 +00:00
stylus740 a6fac49452 German Update for doc/unreal32docs.de.html Week28 2004-07-10 06:57:44 +00:00
codemastr 7d1c6344bb Fixed some who ? flag bugs 2004-07-09 17:36:57 +00:00
codemastr 9bc2c3ffcc Added src/win32/editor.c 2004-07-09 16:34:20 +00:00
codemastr cad4c1d4b3 Win32 code cleanups 2004-07-08 21:54:40 +00:00
codemastr 72c94cb5c1 Fixed a whois bug when PREFIX_AQ is undefined 2004-07-07 20:57:24 +00:00
codemastr ec6dcdb573 Win32 code cleanups 2004-07-07 18:22:27 +00:00
angrywolf 567649106e - Made several non-translated texts appear as Hungarian and made a few
spelling corrections.
- Updated the description of set::hosts::* directives.
2004-07-07 13:43:27 +00:00
codemastr 8f196cd879 Removed the * and ^ flags from /whois if PREFIX_AQ is not enabled, Updated the /who docs to use correct English, Added documentation for the /who and /whois flags 2004-07-07 04:19:01 +00:00
Bram Matthys 582c487cff - Fixed defizzer module. Reported by Rocko and netrixtardis. 2004-07-06 22:28:09 +00:00
codemastr 3f9d00a84d Fixed a bug where an ident in a vhost {} was never sent out to other servers and added user@host support for set::hosts 2004-07-06 21:55:34 +00:00
Bram Matthys 791152587c - Fixed ban bug: halfops were also prevented from doing nickchanges if banned, plus..
+b ~n:*!*@* also made nickchanges impossible for voiced(&halfop'ed) people (so like half
  of the purpose of it was defeated @$#&@#). Reported by Rocko.
2004-07-06 14:56:53 +00:00
codemastr 08bd0aa006 Make allow-userhost-change force-rejoin apply to /oper, and removed /hs -> helpserv from anope.conf 2004-07-05 22:00:14 +00:00
angrywolf 562766ae07 Corrected the mIRC link 2004-07-05 20:01:50 +00:00
Bram Matthys b4c03ed74a docs typo (mIRC link pointed to irssi >;p) reported by angrywolf + added additional semi-requirement for translations to put the document-in-progress online somewhere... this seems to be needed since like half of the translators end up dead / not responding ;) 2004-07-05 19:01:57 +00:00
codemastr ce913cd127 Fixed a win32 module problem where file not found errors would display random characters 2004-07-05 16:54:29 +00:00
angrywolf 8f5ee7983f Minor doc corrections reported by Ryan 2004-07-04 13:46:36 +00:00
Bram Matthys 5cc04d4020 temporary -> temporarily 2004-07-03 18:41:51 +00:00
Bram Matthys fd11ec968b added 'cloaking has been cracked' to release notes @ major bugs too 2004-07-03 18:33:45 +00:00
codemastr bd9a57f90f Changed version to 3.2.1 and moved 3.2 changes to Changes.old 2004-07-03 18:28:20 +00:00
codemastr 52f76673c7 Release notes updates 2004-07-03 17:26:07 +00:00
Bram Matthys add996a92a - Made release notes a bit more scary + some other text updates (mainly english grammar/spelling) 2004-07-03 16:19:46 +00:00
stylus740 63e7fd12cc Update doc/unreal32docs.de.html week 27 2004-07-03 07:17:56 +00:00
angrywolf 3b92a1dd2a Updated the copyright info 2004-07-03 06:42:42 +00:00
codemastr 7b12465473 Updated /Credits and added a donator. 2004-07-03 05:00:36 +00:00
codemastr 67598ba37e Fixed a win32 installer bug 2004-07-02 17:43:12 +00:00
angrywolf d3cd57b767 Fixed a typo reported by Toxyc 2004-07-01 15:26:11 +00:00
trocotronic b306553b0a *** empty log message *** 2004-06-29 23:31:03 +00:00
trocotronic b6508ac6e0 write test 2004-06-28 21:51:28 +00:00
Bram Matthys c065f16db6 - Added hungarian docs, translated by AngryWolf. 2004-06-28 21:12:50 +00:00
Bram Matthys 1f1cdab0a6 ** internal 3.2.1-pre2 release ** 2004-06-28 20:10:19 +00:00
Bram Matthys 0b5524cf7b - Fixed serious crashbug due to quick-rehashing bug! Basically if you did a /REHASH and
the clientcount for a class reached 0 (due to quits) it would crash.
2004-06-28 19:47:09 +00:00
Bram Matthys 1fe71cab31 - Added spanish docs, translated by Trocotronic. 2004-06-28 18:48:46 +00:00
Bram Matthys c607eb43ef - Various (>15) small fixes for unreal32docs.html, reported by AngryWolf (#0001906). 2004-06-27 23:24:48 +00:00
Bram Matthys 6c0b8db670 wircd.def 2004-06-26 22:50:50 +00:00
Bram Matthys e3e5f5005c updated for pre1 2004-06-26 22:50:16 +00:00
Bram Matthys 6b2ee1cb4e ** internal 3.2.1-pre1 release ** 2004-06-26 22:18:08 +00:00
Bram Matthys ae9d78e845 - Changed version to 3.2.1-pre1 and updated protocol # to 2304. 2004-06-26 19:47:20 +00:00
Bram Matthys aa9ee31e4e - spamfilter.conf: Added sig for a mIRC decode worm, submitted by nexus.
- Some release notes updates.
2004-06-26 17:48:14 +00:00
stylus740 602c3b94ad Changes german Translation week 26 doc/unreal32docs.de.html 2004-06-26 06:40:24 +00:00
Bram Matthys 5877a32b3b - Fixed "quickly-rehashing + autoconnect linkblocks = crash"-bug. This involved fixing
multiple reference count bugs, one related to sptr->serv->conf, and another one related
  to sptr->serv->class. Both caused problems when someone did a /rehash when a server
  was in the process of connecting (so it might also happen when connfreq was hit and you
  did a /rehash). Original bug was reported by sh0 (#0001872).
2004-06-25 23:50:08 +00:00
Bram Matthys af3c66dea5 - Updated HOOKTYPE_TKL_ADD/HOOKTYPE_TKL_DEL to cptr, sptr, tk, parc, parv, else it was
impossible to tell *who* removed a *line. Again, parc/parv are 0/NULL for expires.
2004-06-25 20:17:18 +00:00
codemastr 638d17fbaa Fixed a problem where the tmp directory was created in the wrong place 2004-06-25 19:36:56 +00:00
codemastr 283014822d Made the new numerics use nicknames 2004-06-25 19:28:38 +00:00
Bram Matthys ad82656408 - Added new logtype 'spamfilter' to log spamfilter matches
- Updated example.conf: added all new flags we added in the example block, removed
  old confusing comment on SEGV logging, config.h: ripped out lPATH since that define
  isn't anywhere used and is only confusing.
2004-06-25 01:37:56 +00:00
Bram Matthys 9c51507d36 - Made IPv6 bans work the way they should again, reported by al5001 (#0001876). 2004-06-25 01:03:32 +00:00
Bram Matthys ec338581d9 - Fixed '/stats P' negative usercount bug (#0001691). 2004-06-25 00:15:37 +00:00
codemastr c4ee6e5114 Converted a bunch of notices to numerics 2004-06-23 19:47:40 +00:00
codemastr 1671c330bf Fixed a CIDR bug 2004-06-22 18:37:00 +00:00
Bram Matthys 22425b09d3 dumdeedum 2004-06-22 01:37:22 +00:00
Bram Matthys d75ca39f78 - Made Mod_Version required (this should be no problem since it's done automatically).
- Added HOOKTYPE_LOG [int type, char *timebuf, char *logbuf]
- Updated the release notes.
2004-06-22 01:20:31 +00:00
codemastr 8e5fb728a4 Added ELIST support 2004-06-21 18:40:02 +00:00
stylus740 7c7592eaa7 German Translation update for: doc/unreal32docs.de.html
week 25
2004-06-20 06:42:18 +00:00
Bram Matthys 5385bd3f89 - internal: Added GetIP() which we will now use instead of all the Inet_ia2p() stuff
because it's slightly faster (already replaced all of them in src/s_kline.c).
  GetIP(acptr) will return the ip for local users and remote users that support NICKIP,
  it returns NULL for remote users that are on non-NICKIP servers (or have non-NICKIP
  servers along their path).
- internal: tkl_add_line now returns aTKline *
- Added some more hooks:
  - HOOKTYPE_TKL_ADD [aClient *cptr, aClient *sptr, aTKline *tk]
  - HOOKTYPE_TKL_DEL [aClient *cptr, aClient *sptr, aTKline *tk]
    NOTE: 'NULL, NULL, tk' is used for *lines that are removed due to expiring
  - HOOKTYPE_LOCAL_KILL [aClient *sptr, aClient *target, char *comment]
2004-06-19 22:49:02 +00:00
codemastr 05a96a3b56 Fixed an SVSNICK bug that could lead to duplicate users in very rare circumstances 2004-06-18 17:02:01 +00:00
codemastr 54ff17f164 Fixed a CIDR bug when compiled without IPv6 support 2004-06-18 16:07:35 +00:00
Bram Matthys 0ca3733542 - Fixed find_qline crashes regarding except tkl 'type qline', reported by Gilou (#0001882).
- Fixed some CIDR bugs causing things not to match.
2004-06-18 15:49:10 +00:00
Bram Matthys 3b398af944 - To be able to use /ADDLINE you now need the (new) 'can_addline' operflag (oper::flags),
reason for this is that it's such a powerful/dangerous command.
2004-06-17 22:32:33 +00:00
codemastr 6316006acb ... 2004-06-17 21:45:36 +00:00
codemastr 58943b710c Added CIDR support 2004-06-17 21:16:58 +00:00
Bram Matthys 2f1da20208 - Fixed compile problem with debugmode + ipv6 2004-06-17 18:32:59 +00:00
Bram Matthys 42a8ab5a84 just correcting my english ;) 2004-06-17 18:18:07 +00:00
Bram Matthys c5d57689a0 - Win32: Readded /J compiler flag (was accidently lost in December). This could cause
some weird issues. Reported by Troco (#0001877).
2004-06-17 16:18:50 +00:00
Bram Matthys e3df6672c4 teh date --> 2004-06-17 2004-06-16 22:11:18 +00:00
Bram Matthys 1ebae10921 - Minor doc tweakers, reported by AngryWolf (#0001871). 2004-06-16 22:00:39 +00:00
stylus740 f0d9b5f66c unreal32docs.de.html Changes week 24 2004-06-15 17:05:44 +00:00
Bram Matthys 023cef1fb7 - Made extbans desynchs a bit more friendly: if a bantype is unknown for the server
it will just accept it if it's from a remote server, and also ops/etc will be allowed
  to REMOVE any unknown extbans (but not add new unknown ones).
- Added extended ban type ~n (nickchange ban), if a user matches this (s)he can not
  change nicks (eg: +b ~n:*!*@*.aol.com) unless (s)he has voice or higher.
  This can be useful as an overall measure for some +m chans (+b ~n:!*@*) or against
  specific 'good' people that are just nickflooding due to a wrongly configured script.
- Added set::restrict-extendedbans by which you can disallow normal users to use
  any extendedbans ("*") or disallow only certain ones (eg: "qc").
- Made the negative TS message a bit more annoying if time is off more than 10 seconds.
2004-06-12 01:26:23 +00:00
Bram Matthys 47f3c43295 - Various (non-critical) fixes for dccallow reported by Rocko (incorrect nick in deny msg,
added set::maxdccallow in docs, added bmp/vob/log/ to dccallow.conf).
2004-06-10 15:53:13 +00:00
Bram Matthys fe89b2e36b new one... includes NICKIP & dccallow changes. 2004-06-10 02:33:19 +00:00
Bram Matthys 6ec3822ce1 CmdoverrideAdd, DCCALLOW, allow dcc { }, umode +v change, register_user fix.
- Module coders: if CmdoverrideAdd() is called for an override that is already in place, it
  now sets MODERR_EXISTS as errorcode and returns NULL (previously it added duplicates).
  In the past module coders had many issues with PERM mods... you had to use weird tricks,
  but now you can (and should!) just override on INIT and on HOOKTYPE_REHASH_COMPLETE.
- Moved register_user declaration to h.h, updated call in m_pingpong.c (due new 'ip' field).
- Usermode +v ('receive dcc send rejection notices') is oper-only now for privacy reasons.
- Added dcc allow { }, which allows one to make exceptions over deny dcc { }.
- Added deny dcc::soft and allow dcc::soft item, if set to 'yes' it allows someone
  to explicitly override it per-person via /DCCALLOW (see next).
- Added DCCALLOW system, taken directly from bahamut.
  With this system you can block certain (or all) DCC SENDs and then allow the user to
  'override' this limit for every user he/she trusts via '/DCCALLOW +User'.
  This is an attempt to stop (or at least limit) the spreading of viruses/etc.
  See '/DCCALLOW HELP' for more info.
- Added example dccallow.conf which filters everything except some known
  'safe types' (jpg, jpeg, png, gif, etc). Note that the purpose of this file
  is NOT to get a complete list, rather to limit it to a few 'known safe' entries.
- Added set::maxdccallow: max number of entries of the DCCALLOW list (default: 10).
2004-06-10 02:26:32 +00:00
codemastr f90a4667bf Added a couple donators to /credits 2004-06-09 17:00:04 +00:00
codemastr 6ab3161969 /who +i added, /who help cleanups, and /who +m fix 2004-06-06 18:30:57 +00:00
stylus740 892cad788d Update week23:
doc/unreal32docs.de.html
2004-06-05 07:26:29 +00:00
Bram Matthys 2fc75d1352 - Fixed a synch bug, reported by Troco (#0001857). 2004-06-03 16:44:20 +00:00
Bram Matthys 3c436c02e7 - Added a doc/translations.txt which describes the (current) translation process
and requirements a bit.
2004-06-02 00:04:29 +00:00
codemastr 30f7b2c519 Made the win32 socket error reporting also handle regular system errors 2004-06-01 21:28:54 +00:00
Bram Matthys 55001ad74a - Seems I forgot to del_Command() SPAMFILTER and TEMPSHUN. 2004-06-01 21:11:08 +00:00
codemastr de1ad88442 Added /dns c to clear the DNS cache 2004-06-01 20:38:18 +00:00
codemastr a450365faa Made Unreal create the tmp/ dir at startup, rather than configure 2004-06-01 20:29:20 +00:00
codemastr 756a7de955 Made a bunch of TKL parameters case insensitive 2004-06-01 20:12:49 +00:00
codemastr ecd9ca0c5b Added snomask +S to the documentation 2004-06-01 20:03:03 +00:00
Bram Matthys 57a3465ef4 clarifcation on '*' @ NICKIP 2004-05-31 19:10:14 +00:00
Bram Matthys bfde79e41d - And another one, should be fixed now. 2004-05-31 18:49:26 +00:00
codemastr facf1d62ef Fixed win32 socket error reporting and a NICKIP bug 2004-05-31 18:18:55 +00:00
Bram Matthys 9ebd9e9bcf - And one more. 2004-05-31 00:32:52 +00:00
Bram Matthys 24c2b72e1a Added some $Id$'z 2004-05-30 23:22:43 +00:00
Bram Matthys a2a4576ca2 more! 2004-05-30 21:49:50 +00:00
Bram Matthys 8337447439 - Fixed SSL problem caused by a fix of 2 days ago. Reported by Fury (#0001842). 2004-05-30 21:43:24 +00:00
Bram Matthys 45e373d683 - Fixed some other win32 crashes due to modulizing: WHOWAS, STATS [some], SVSMOTD.
All caused by missing "MODVAR"s. Reported by Troco (#0001841).
2004-05-30 20:34:33 +00:00
stylus740 324aa0f593 Update geman doc week22 2004-05-30 08:31:40 +00:00
codemastr e5f16b777a Made the win32 version use a dynamically linked libc 2004-05-30 00:59:05 +00:00
Bram Matthys 44b2ae15fa - Imported TRE 0.6.8 for windows 2004-05-29 19:48:40 +00:00
codemastr e050009b51 Added NICKIP to doc/technical/protoctl.txt 2004-05-29 19:01:13 +00:00
codemastr a9fbc71459 Imported TRE 0.6.8 for *nix 2004-05-29 18:58:23 +00:00
codemastr 558c9ede6b Fixed a compile error regarding AF_MAX 2004-05-29 17:12:32 +00:00
Bram Matthys 843d4696ff the '*CVS*' mark should be at current version, not at major version. 2004-05-28 01:18:35 +00:00
Bram Matthys fc37449a9e - unreal32docs.html: added flat-map and set::restrict-usermodes "s"; security tips. 2004-05-28 01:14:15 +00:00
Bram Matthys 8702450af2 Various stuff:
- Added release notes (no, we won't release 3.2.1 anytime soon.. just updating ;p).
- Added various extra messages to make it a bit more easier for people who are
  upgrading (win32 commands.dll, cloaking mod).
- Made win32 ssl<->non-ssl modules binary compatible.
- Added ssl/non-ssl check in Mod_Version on *NIX.
- Added set::options::flat-map: This makes all servers look like they are linked
  directly to the server you are on (/map, /links), thus you cannot see which server
  is linked to which ("hopcount"). This can make it a bit harder for kiddies to find
  any 'weak spots' (which server to attack/[D]DoS). Obviously opers will always
  see the real map.
2004-05-28 00:44:07 +00:00
codemastr 8c89274d3d compile warning cleanups 2004-05-27 22:45:17 +00:00
codemastr 9e9390e57e Configure checks for inet_ntop/pton 2004-05-27 22:10:18 +00:00
codemastr c1af4a4516 Added NICKIP 2004-05-27 22:05:58 +00:00
Bram Matthys 2313035766 - Fixed a permanent modules bug: custom allow/except/ban/deny types were lost
after /rehash. Reported by AngryWolf (#0001837).
2004-05-27 01:57:44 +00:00
stylus740 34cfe19e44 Test/correction ;p 2004-05-23 22:15:04 +00:00
Bram Matthys 4a0c827879 - German doc updates (week 21) 2004-05-23 21:57:09 +00:00
stylus740 976c4a8281 test.. should work. 2004-05-23 21:43:16 +00:00
codemastr 8f2763fff1 Win32 module bug with strcasecmp 2004-05-23 18:30:05 +00:00
Bram Matthys 09d1dd87e4 - spamfilter.conf: Added yet another sig for a site that causes Backdoor.Delf.lq
infection (reported by nexus), also changed LOI trojan and Bloodhound.Exploit.6
  action to gline.
2004-05-21 23:15:33 +00:00
Bram Matthys 9bb3623c4d [vesioncheck] - Improved the above: made it work on windows and also added a check for curl. 2004-05-20 21:21:15 +00:00
Bram Matthys 1fc97c815e blah 2004-05-20 20:49:00 +00:00
Bram Matthys 443c529f9f cvs test + win32 ssl/zip library version check error msgdshfsdhsd 2004-05-20 20:37:01 +00:00
Bram Matthys 1a6e72c1b3 - Added zlib+SSL version check on boot to make sure the runtime version is the same
as the 'compiled for' (header) version. If they mismatch, UnrealIRCd could crash,
  so a big warning is posted if it happends.
2004-05-19 20:47:14 +00:00
Bram Matthys 8c20440e04 - Added optional parameter to SVSJOIN to deal with channel keys. Reported by
DukePyrolator (#0001822).
2004-05-18 21:17:31 +00:00
Bram Matthys 683fae7a38 - German doc updates (week 20). 2004-05-18 00:58:55 +00:00
Bram Matthys 76f0f87fdd - Added set::spamfilter::virus-help-channel-deny. This allows you to block any
normal joins to the virus-help-channel. This way you could prevent users into
  accidental (or tricked) joining of the virus-help-channel and becomming infected.
  This feature is disabled by default. Requested by bleepy (#0001811).
2004-05-18 00:39:45 +00:00
codemastr 6d09e29d0c Fixed a win32 module bug 2004-05-17 20:24:14 +00:00
codemastr 79c4cee4b7 Updated to TRE 0.6.7 2004-05-15 19:43:20 +00:00
codemastr e1cc540182 Upgraded to TRE 0.6.7 2004-05-15 19:42:24 +00:00
codemastr ee9ca0e01f Fixed a remote include bug and a /credits typo 2004-05-15 04:25:29 +00:00
Bram Matthys aab9bffe23 - Changed the way MSG/NOTICE <prefix>#chan works:
- It now goes to <prefix> and higher, so '/notice +#chan hi!' goes to +vhoaq
  - You need at least voice in order to be able to msg/notice +#chan, %#chan or @#chan
  - You need at least ops in order to be able to msg/notice &#chan or ~#chan
  - Any multi-prefix targets will be converted automatically (eg: ~&@#chan to @#chan).
  - internal: use of the CHANOPPFX macro is now deprecated.
  All of this was done to make it a bit more 'safe' and userfriendly (#0001812).
2004-05-14 22:34:17 +00:00
Bram Matthys af94fd243a - Local opers can now also join +O (operonly) channels (#0001694). 2004-05-14 19:55:12 +00:00
Bram Matthys 98bd61c179 - Changed 'Services operator' in /whois (back) to 'Services administrator', this was
requested by many people and seems to be the best after all (#0001634).
2004-05-14 15:53:29 +00:00
codemastr a49e227bd4 Win32 module fixes for ssl/zip/curl 2004-05-13 16:39:23 +00:00
Bram Matthys 45a5bd231f forgot to add this one. 2004-05-12 23:22:52 +00:00
Bram Matthys 2bee263234 try this? 2004-05-12 23:20:01 +00:00
Bram Matthys 130669c03b hidehost.. byebye 2004-05-12 23:09:53 +00:00
Bram Matthys 16a82b6aeb - Modulized cloaking 2004-05-12 23:05:40 +00:00
codemastr dd85bf150d ... 2004-05-12 22:32:11 +00:00
codemastr 257d386a1b ... 2004-05-12 22:16:31 +00:00
codemastr 99bd34fbb9 Added module support for Windows 2004-05-12 22:02:05 +00:00
Bram Matthys d9a6dd34b9 - Include openssl/md5.h and openssl/ripemd.h if compiled w/SSL, this seems how it
should be done and also makes unreal w/SSL able to compile on OpenBSD (3.5).
2004-05-09 18:59:11 +00:00
codemastr 0924b208e7 Fixed an empty set::ssl::options crash bug 2004-05-09 17:21:08 +00:00
Bram Matthys bb003e2583 - Changed int_to_base64() warning so it has less false positives (#0001797). 2004-05-08 19:40:48 +00:00
codemastr 4b2dec05e8 Made it so chg* commands are not logged from services 2004-05-04 19:18:06 +00:00
codemastr 133eac2700 Fixed a doc typo and fixed a ./unreal bug 2004-05-04 19:09:04 +00:00
codemastr 087e36a112 Fixed a problem when compiling with GUEST defined 2004-05-04 18:25:44 +00:00
Bram Matthys 116aaa17ea - Replaced tre.dll/tre.lib, previous versions caused a crash (eg: if you included
spamfilter.conf).
2004-04-25 21:39:02 +00:00
stskeeps 425dae8005 as written 2004-04-25 21:06:57 +00:00
cvs2hg ff898a5a9e fixup commit for branch 'unreal3_2_fixes' 2004-04-24 23:07:41 +00:00
205 changed files with 52129 additions and 21895 deletions
+1 -1
View File
@@ -7,7 +7,7 @@
\___/|_| |_|_| \___|\__,_|_|\___/\_| \_| \____/\__,_|
Configuration Program
for Unreal3.2
for Unreal3.2.3
This program will help you to compile your IRC server, and ask you
questions regarding the compile-time settings of it during the process.
+104 -38
View File
@@ -1,50 +1,116 @@
Unreal3.2 Release Notes
========================
Unreal3.2.3 Release Notes
==========================
==[ GENERAL INFORMATION ]==
* If you are upgrading, make sure you run make clean and ./Config before doing make
* The official UnrealIRCd documentation is doc/unreal32docs.html
- If you are upgrading on *NIX, make sure you run 'make clean' and './Config'
first before doing 'make'
- The official UnrealIRCd documentation is doc/unreal32docs.html
online version at: http://www.vulnscan.org/UnrealIrcd/unreal32docs.html
FAQ: http://www.vulnscan.org/UnrealIrcd/faq/
Read them before asking for help.
* Report bugs at http://bugs.unrealircd.org/
- Report bugs at http://bugs.unrealircd.org/
- When upgrading a network, we assume you are upgrading from the previous
version (3.2.2). If you got a net running with servers that are several
versions behind (eg: 3.2.1) then you might experience (desynch) problems.
Also, if you try to use the new features, some might not work properly
until all your servers are upgraded. It is therefore recommended to
upgrade all servers in a 'short' time span (x day[s], not weeks).
== [ NEW ]==
- Added german docs (doc/unreal32docs.de.html)
- In a spamfilter reason field '_' gets converted to a space (' '),
now also added '__' which gets converted to underscore itself ('_').
==[ MAJOR BUGS FIXED ]==
- '/spamfiltere remove' was often removing the wrong entry (RC2 bug)
- The TRE regex library was sometimes matching too much if [range].+
was used multiple times.
- Fixed a remote include issue and added timeouts in case a connection/transfer fails
==[ MINOR BUGS FIXED ]==
- Sometimes hosts were not resolved on Windows due to a resolver bug
- spamfilter and sqline: memory leak on /rehash (a few kb)
- spamfilter: protect against insane long reason/regex fields in configfile
- set::modes-on-join now accepts extended channelmodes
- Opteron: various crashbugs fixed, should work ok now.
- Win32 GUI "rehash all" option did not reload motd/rules.
- Same for ./unreal rehash on *NIX
- Usermode 'r' (registered) was unset if you changed the case of your
nick (eg: 'blah'->'Blah'), this affected at least ircservices.
- vhost::swhois wasn't shown if you did a remote /whois.
- Made './curlinstall' work with new c-ares-1.0.0.
- Fixed compile problem on some machines related to TRE / libintl.
- /who +m was incorrectly hiding +H users even for opers.
- Fixed /rehash bug if an .so or remote include didn't load properly
==[ NEW ]==
- Channel mode +I (invex, invite exceptions). Users on this list can join +i channels
without needing an /invite.
- Channel mode +j (jointhrottle). If you set +j X:Y you limit each user (individually)
to X joins per Y seconds to the channel.
- Nick Character System: this allows you to choose which additional characters to
allow in nicknames by language (and codepage). Currently available are:
catalan, dutch, french, german, swiss-german, icelandic, italian, spanish,
swedish, hungarian, polish, romanian, slovak, czech, greek, turkish, russian,
hebrew and chinese. There are also several 'groups' available, for more info see:
http://www.vulnscan.org/UnrealIrcd/unreal32docs.html#feature_nickchars
- *NIX: ./Config -advanced, allows you to choose more options
- tld::botmotd and tld::opermotd
- Using /INVITE with no parameters will a list of channels you are invited to
but have not yet joined.
- set::gline-address, works just like set::kline-address but then for glines.
- Added a basic regex tutorial in unreal32docs.html
- /SAJOIN now supports multiple channels (and '0') again.
- Spamfilter topic support ('t' in spamfilter, 'topic' in conf).
- Added a feature to +b/+e ~c: ~c:[prefix]<#channel>. This can be used if you for
example trust all ops of #leet: mode #x +e ~c:@#leet.
- Various translated documents in doc/: unreal32docs.gr.html (Greek), help.fr.conf
and example.fr.conf (French), help.de.conf & example.de.conf (German), and
example.hu.conf (Hungarian).
==[ CHANGED ]==
- spamfilter.conf: fixed fyle sig, added sigs for: soex, Nkie, LOI, Gaggle,
changed a lot of sigs from block to gline.
- Windows: now using new Inno Setup which made the installer 300k smaller
- Docs, help.conf and other text updates.
- Updated auspice.conf
- The usual doc updates, help.conf, spamfilter.conf, dccallow.conf, etc.
- The config parser got (mostly) recoded. This makes it rehash much faster,
additionally "duplicate item" checking is now available.
- Added a 'B' flag to /who output for bots. Also normal users can now /who +m B.
- Support in configfiles for \\ (= a \)
- set::dns::bind::ip, hardly useful for anyone
- If a user is +b on a channel, and set::allow-userhost-change force-rejoin is
in use, then a part/join is not sent in order to prevent flooding.
- OperOverride INVITE notices are now sent out globally to all +s +e users.
- User mode 'g' is now operonly, it hardly did anything for non-opers.
- Made CIDR no longer accept bitmasks with less than 16bits for /*line commands.
- Modulized a lot of commands (~5000 lines of code).
- Made channel modes +c/+S deal with RGB color codes.
- If no log { } block is present, then a warning will be printed and we will log
by default to ircd.log (errors only).
- If an invalid character is found in a nick then the whole nick is rejected now.
- Changed numeric&text of 'is a Secure Connection' to 'is using a Secure Connection',
client coders are encouraged to add support for this new numeric 671. Until then,
in-window-/whois's will probably be broken.
- A locops with can_override/can_gkline/can_gzline is now automatically converted
to a globop, just like we do with can_globalroute/can_gkline. These privileges
are GLOBAL and therefore are not meant to be granted to locops.
- A warning is now sent to an oper if (s)he tries to use /(G)ZLINE on a host.
(G)ZLINES should be placed on *@ipmasks because they are processed before any
ident and host lookups.
- Made (fast) badwords work better with word boundaries, in practice this means
blocking of words with accents/umlauts/es-zett/etc now works properly.
- Made it so halfops can now -h themselves and chanadmins can -a themselves.
- Made spamfilter 'u' also check nickchanges.
==[ COMMING UP ]==
- You can expect module support on windows in a nearby release.
==[ MAJOR BUGS FIXED ]==
- Serious crashbug [this is the same fix that was fixed by the hotfix/3.2.2b]
- TRE mem corruption- & crash-bugs (eg: in backreferences).
==[ MINOR BUGS FIXED ]==
- Made kline/shun/zline/gzline without parameters report the correct stats(flag).
- Made a few more errors send out to all opers, such as link::bind-ip problems.
- A few missing operflags in /STATS O (and SVSO)
- DCC Spamfilter was not always working correctly
- OperOverriding to, for example, a +zi channel did not print the special join notice.
- Servers behind ulines were not properly ulined, one effect that had was causing
an odd view in /MAP if you had flat-map + hide ulines + a juped server in services.
- Made SVSMODE -b/-e remove bans/excepts placed on IPs
- The set::htm::incoming-rate config item was not working correctly
- If a user was +R then remote server notices were accidently also filtered.
- A locop setting MODE #CHAN +O caused a desynch
- Resolver sometimes incorrectly aliased names, causing incorect TTLs etc.
- Fixed SVSNOOP not removing ALL oper status properly.
- 'shun' target was not working for spamfilter and ban version { }
- Removing of shuns placed on IP's did not take effect immediately (had to reconnect).
- Fixed a bug in mode skipping (eg: '+qk a b' if not +q) and error msgs.
- Chanmode +f #t (per-user text limit) now no longer affects halfops.
- Opers w/can_override can now +qa/-qa if they are not netadmins, also affected +L/+u.
Be sure you upgrade all servers to 3.2.3 if using these new abilities, or else you
will get desynch issues.
- Fixed several /SAMODE bugs as well, regarding non-netadmins, being halfop'ed, etc.
- /GZLINE [nick] was placing a *line on *@host instead of *@IP, fixed.
- alias::format in combination with ::type 'command' caused a crash
- zlib upgraded to 1.2.2, curl upgraded to 7.13.1, both fix various issues.
- Win32 installer now also installs doc\technical\*.*
- Desynch issues regarding +s/+p and +c/+S
- /SAMODE causing a 'fishy timestamp' if a cmode with a digit parameter was used.
==[ REMOVED ]==
- NAZIISH_CHBAN_HANDLING (did not work at all)
- The 'oldcloak' cloaking module is now removed, since this old algorithm got broken
8 months ago, nobody should be using it anymore.
==[ ADDITIONAL INFO ]==
* See Changelog
* See Changelog for more details
+839 -3092
View File
File diff suppressed because it is too large Load Diff
+3093
View File
File diff suppressed because it is too large Load Diff
+254 -25
View File
@@ -21,6 +21,27 @@
RUN_CONFIGURE () {
ARG=""
# Do this even if we're not in advanced mode
if [ "$SHOWLISTMODES" = "1" ] ; then
ARG="$ARG--with-showlistmodes "
fi
if [ "$ADVANCED" = "1" ] ; then
if [ "$TOPICNICKISNUH" = "1" ] ; then
ARG="$ARG--with-topicisnuhost "
fi
if [ "$SHUNNOTICES" = "1" ] ; then
ARG="$ARG--with-shunnotices "
fi
if [ "$NOOPEROVERRIDE" = "1" ] ; then
ARG="$ARG--with-no-operoverride "
fi
if [ "$DISABLEUSERMOD" = "1" ] ; then
ARG="$ARG--with-disableusermod "
fi
if [ "$OPEROVERRIDEVERIFY" = "1" ] ; then
ARG="$ARG--with-operoverride-verify "
fi
fi
if [ "$NOSPOOF" = "1" ] ; then
ARG="$ARG--enable-nospoof "
fi
@@ -76,6 +97,184 @@ fi
fi
}
RUN_ADVANCED () {
TEST=""
while [ -z "$TEST" ] ; do
if [ "$SHOWLISTMODES" = "1" ] ; then
TEST="Yes"
else
TEST="No"
fi
echo ""
echo "Do you want to show the modes a channel has set in the /list output?"
echo $n "[$TEST] -> $c"
read cc
if [ -z "$cc" ] ; then
cc=$TEST
fi
case "$cc" in
[Yy]*)
SHOWLISTMODES="1"
;;
[Nn]*)
SHOWLISTMODES=""
;;
*)
echo ""
echo "You must enter either Yes or No"
TEST=""
;;
esac
done
TEST=""
while [ -z "$TEST" ] ; do
if [ "$TOPICNICKISNUH" = "1" ] ; then
TEST="Yes"
else
TEST="No"
fi
echo ""
echo "Do you want the /topic command to show the nick!user@host of the person"
echo "who set the topic, rather than just the nickname?"
echo $n "[$TEST] -> $c"
read cc
if [ -z "$cc" ] ; then
cc=$TEST
fi
case "$cc" in
[Yy]*)
TOPICNICKISNUH="1"
;;
[Nn]*)
TOPICNICKISNUH=""
;;
*)
echo ""
echo "You must enter either Yes or No"
TEST=""
;;
esac
done
TEST=""
while [ -z "$TEST" ] ; do
if [ "$SHUNNOTICES" = "1" ] ; then
TEST="Yes"
else
TEST="No"
fi
echo ""
echo "Should Unreal notify a user when they are no longer shunned?"
echo $n "[$TEST] -> $c"
read cc
if [ -z "$cc" ] ; then
cc=$TEST
fi
case "$cc" in
[Yy]*)
SHUNNOTICES="1"
;;
[Nn]*)
SHUNNOTICES=""
;;
*)
echo ""
echo "You must enter either Yes or No"
TEST=""
;;
esac
done
TEST=""
while [ -z "$TEST" ] ; do
if [ "$NOOPEROVERRIDE" = "1" ] ; then
TEST="Yes"
else
TEST="No"
fi
echo ""
echo "Do you want to disable oper override?"
echo $n "[$TEST] -> $c"
read cc
if [ -z "$cc" ] ; then
cc=$TEST
fi
case "$cc" in
[Yy]*)
NOOPEROVERRIDE="1"
;;
[Nn]*)
NOOPEROVERRIDE=""
;;
*)
echo ""
echo "You must enter either Yes or No"
TEST=""
;;
esac
done
TEST=""
while [ -z "$TEST" ] ; do
if [ "$DISABLEUSERMOD" = "1" ] ; then
TEST="Yes"
else
TEST="No"
fi
echo ""
echo "Do you want to disable /sethost, /setident, /chgname,"
echo "/chghost, and /chgident?"
echo $n "[$TEST] -> $c"
read cc
if [ -z "$cc" ] ; then
cc=$TEST
fi
case "$cc" in
[Yy]*)
DISABLEUSERMOD="1"
;;
[Nn]*)
DISABLEUSERMOD=""
;;
*)
echo ""
echo "You must enter either Yes or No"
TEST=""
;;
esac
done
TEST=""
while [ -z "$TEST" ] ; do
if [ "$OPEROVERRIDEVERIFY" = "1" ] ; then
TEST="Yes"
else
TEST="No"
fi
echo ""
echo "Do you want to require opers to /invite themselves into a +s or +p channel?"
echo $n "[$TEST] -> $c"
read cc
if [ -z "$cc" ] ; then
cc=$TEST
fi
case "$cc" in
[Yy]*)
OPEROVERRIDEVERIFY="1"
;;
[Nn]*)
OPEROVERRIDEVERIFY=""
;;
*)
echo ""
echo "You must enter either Yes or No"
TEST=""
;;
esac
done
}
c=""
n=""
NOSPOOF=""
@@ -97,6 +296,12 @@ INET6=""
REMOTEINC=""
CURLDIR=""
PREFIXAQ=""
SHOWLISTMODES="1"
TOPICNICKISNUH=""
SHUNNOTICES=""
NOOPEROVERRIDE=""
DISABLEUSERMOD=""
OPEROVERRIDEVERIFY=""
EXTRAPARA=""
if [ "`eval echo -n 'a'`" = "-n a" ] ; then
c="\c"
@@ -108,37 +313,52 @@ fi
#parse arguments
NOCACHE=""
NOINTRO=""
if [ "$1" = "--help" ] ; then
echo "Config utility for UnrealIRCd"
echo "-----------------------------"
echo "Syntax: ./Config [options]"
echo "-nocache Ignore settings saved in config.settings"
echo "-nointro Skip intro (release notes, etc)"
echo "-quick Skip questions, go straight to configure"
echo "-C Clean ./configure cache"
exit 0
fi
if [ "$1" = "-nocache" -o "$2" = "-nocache" ] ; then
NOCACHE="1"
fi
if [ "$1" = "-nointro" -o "$2" = "-nointro" ] ; then
NOINTRO="1"
fi
CLEAN=""
ADVANCED=""
while [ $# -ge 1 ] ; do
if [ $1 = "--help" ] ; then
echo "Config utility for UnrealIRCd"
echo "-----------------------------"
echo "Syntax: ./Config [options]"
echo "-nocache Ignore settings saved in config.settings"
echo "-nointro Skip intro (release notes, etc)"
echo "-quick Skip questions, go straight to configure"
echo "-advanced Include additional advanced questions"
echo "-clean Clean ./configure cache"
exit 0
elif [ $1 = "-nocache" ] ; then
NOCACHE="1"
elif [ $1 = "-nointro" ] ; then
NOINTRO="1"
elif [ $1 = "-quick" -o $1 = "-q" ] ; then
echo "running quick config"
if [ -f "config.settings" ] ; then
. ./config.settings
fi
RUN_CONFIGURE
exit 0
elif [ $1 = "-clean" -o $1 = "-C" ] ; then
CLEAN="1"
elif [ $1 = "-advanced" ] ; then
PREADVANCED="1"
fi
shift 1
done
if [ -f "config.settings" -a -z "$NOCACHE" ] ; then
. config.settings
. ./config.settings
fi
if [ "$1" = "-C" -o "$2" = "-C" ] ; then
if [ "$PREADVANCED" = "1" ] ; then
ADVANCED="1"
elif [ "$ADVANCED" = "1" ]; then
ADVANCED=""
fi
if [ -n "$CLEAN" ] ; then
rm -f config.cache
fi
if [ "$1" = "-quick" -o "$1" = "-q" -o "$2" = "-quick" ] ; then
echo "running quick config"
RUN_CONFIGURE
exit 0
fi
clear
if [ -f ".CHANGES.NEW" -a -z "$NOINTRO" ] ; then
@@ -592,7 +812,9 @@ while [ -z "$TEST" ] ; do
;;
esac
done
if [ -n "$ADVANCED" ] ; then
RUN_ADVANCED
fi
echo ""
echo "Would you like any more parameters to configure?"
echo "Write them here:"
@@ -621,7 +843,14 @@ ZIPLINKS="$ZIPLINKS"
ZIPLINKSDIR="$ZIPLINKSDIR"
REMOTEINC="$REMOTEINC"
CURLDIR="$CURLDIR"
SHOWLISTMODES="$SHOWLISTMODES"
TOPICNICKISNUH="$TOPICNICKISNUH"
SHUNNOTICES="$SHUNNOTICES"
NOOPEROVERRIDE="$NOOPEROVERRIDE"
DISABLEUSERMOD="$DISABLEUSERMOD"
OPEROVERRIDEVERIFY="$OPEROVERRIDEVERIFY"
EXTRAPARA="$EXTRAPARA"
ADVANCED="$ADVANCED"
__EOF__
RUN_CONFIGURE
cat << __EOF__
+2 -2
View File
@@ -5,11 +5,11 @@ you like Unreal, and you'd like to see it continue to exist, please consider mak
a donation. We're not asking for anything huge, whatever you can afford is fine.
PayPal Donation Link:
<https://www.paypal.com/xclick/business=donation%40unrealircd.com&
<https://www.paypal.com/xclick/business=donation%40unrealircd.org&
item_name=UnrealIRCd+Donation&no_shipping=1&cn=Comments&tax=0&currency_code=USD>
Or simply send a payment through PayPal to:
donation@unrealircd.com
donation@unrealircd.org
If you don't want to use PayPal, or you want to donate something other than money
(old computer hardware, etc.), contact Stskeeps (stskeeps@unrealircd.com) and send
+4 -3
View File
@@ -34,11 +34,11 @@ FROMDOS=/home/cmunk/bin/4dos
#
#XCFLAGS=-O -g -export-dynamic
IRCDLIBS=@IRCDLIBS@ @TRELIBS@
IRCDLIBS=@IRCDLIBS@ @TRELIBS@ @CARESLIBS@
CRYPTOLIB=@CRYPTOLIB@
OPENSSLINCLUDES=
XCFLAGS=-I@TREINCDIR@ @CFLAGS@
XCFLAGS=-I@TREINCDIR@ -I@CARESINCDIR@ @CFLAGS@
#
# use the following on MIPS:
#CFLAGS= -systype bsd43 -DSYSTYPE_BSD43 -I$(INCLUDEDIR)
@@ -208,11 +208,12 @@ install: all
$(INSTALL) -m 0700 networks/makenet $(IRCDDIR)/networks
$(INSTALL) -m 0600 networks/networks.ndx $(IRCDDIR)/networks
$(INSTALL) -m 0700 -d $(IRCDDIR)/doc
$(INSTALL) -m 0600 doc/Authors doc/example.conf doc/example.settings doc/coding-guidelines doc/tao.of.irc doc/unreal32docs.html $(IRCDDIR)/doc
$(INSTALL) -m 0600 doc/Authors doc/example.conf doc/coding-guidelines doc/tao.of.irc doc/unreal32docs.html $(IRCDDIR)/doc
$(INSTALL) -m 0700 -d $(IRCDDIR)/aliases
$(INSTALL) -m 0600 aliases/*.conf $(IRCDDIR)/aliases
$(TOUCH) $(IRCDDIR)/unrealircd.conf
chmod 0600 $(IRCDDIR)/unrealircd.conf
$(INSTALL) -m 0600 spamfilter.conf dccallow.conf $(IRCDDIR)
$(INSTALL) -m 0600 badwords.*.conf help.conf LICENSE Donation $(IRCDDIR)
$(INSTALL) -m 0700 unreal $(IRCDDIR)
$(INSTALL) -m 0700 -d $(IRCDDIR)/modules
+1 -1
View File
@@ -1,5 +1,5 @@
===============================================
= UnrealIRCd v3.2 =
= UnrealIRCd v3.2.3 =
===============================================
Was brought to you by:
+6 -6
View File
@@ -2,12 +2,12 @@
alias identify {
format "^#" {
nick chanserv;
target chanserv;
type services;
parameters "IDENTIFY %1-";
};
format "^[^#]" {
nick nickserv;
target nickserv;
type services;
parameters "IDENTIFY %1-";
};
@@ -16,12 +16,12 @@ alias identify {
alias services {
format "^#" {
nick chanserv;
target chanserv;
type services;
parameters "%1-";
};
format "^[^#]" {
nick nickserv;
target nickserv;
type services;
parameters "%1-";
};
@@ -30,12 +30,12 @@ alias services {
alias register {
format "^#" {
nick chanserv;
target chanserv;
type services;
parameters "REGISTER %1-";
};
format "^[^#]" {
nick nickserv;
target nickserv;
type services;
parameters "REGISTER %1-";
};
+6 -7
View File
@@ -1,19 +1,18 @@
/* Anope Aliases */
alias nickserv { type services; };
alias ns { nick nickserv; type services; };
alias ns { target nickserv; type services; };
alias chanserv { type services; };
alias cs { nick chanserv; type services; };
alias cs { target chanserv; type services; };
alias memoserv { type services; };
alias ms { nick memoserv; type services; };
alias ms { target memoserv; type services; };
alias operserv { type services; };
alias os { nick operserv; type services; };
alias os { target operserv; type services; };
alias helpserv { type services; };
alias hs { nick helpserv; type services; };
alias botserv { type services; };
alias bs { nick botserv; type services; };
alias bs { target botserv; type services; };
alias hostserv { type services; };
alias hs { nick hostserv; type services; };
alias hs { target hostserv; type services; };
include "aliases/aliases.conf";
+25 -8
View File
@@ -1,16 +1,33 @@
/* Auspice Aliases */
alias nickserv { type services; };
alias ns { nick nickserv; type services; };
/* Uncomment this, if you have enabled "MassServ, W and X" in auspice */
# alias massserv { type services; };
# alias ma { target massserv; type services; };
# alias W { type services; };
# alias X { type services; };
/* Uncomment this, if you have enabled "WebServ" in auspice */
# alias webserv { type services; };
# alias ws { target webserv; type services; };
alias agent { type services; };
alias adminserv { type services; };
alias as { target adminserv; type services; };
alias botserv { type services; };
alias bs { target botserv; type services; };
alias chanserv { type services; };
alias cs { nick chanserv; type services; };
alias memoserv { type services; };
alias ms { nick memoserv; type services; };
alias cs { target chanserv; type services; };
alias helpserv { type services; };
alias hs { nick helpserv; type services; };
alias hs { target helpserv; type services; };
alias hostserv { type services; };
alias ho { target hostserv; type services; };
alias memoserv { type services; };
alias ms { target memoserv; type services; };
alias nickserv { type services; };
alias ns { target nickserv; type services; };
alias operserv { type services; };
alias os { nick operserv; type services; };
alias os { target operserv; type services; };
alias rootserv { type services; };
alias rs { nick rootserv; type services; };
alias rs { target rootserv; type services; };
include "aliases/aliases.conf";
+4 -4
View File
@@ -1,12 +1,12 @@
/* Cygnus Aliases */
alias nickserv { type services; };
alias ns { nick nickserv; type services; };
alias ns { target nickserv; type services; };
alias chanserv { type services; };
alias cs { nick chanserv; type services; };
alias cs { target chanserv; type services; };
alias memoserv { type services; };
alias ms { nick memoserv; type services; };
alias ms { target memoserv; type services; };
alias rootserv { type services; };
alias rs { nick rootserv; type services; };
alias rs { target rootserv; type services; };
include "aliases/aliases.conf";
+6 -6
View File
@@ -1,16 +1,16 @@
/* Epona Aliases */
alias nickserv { type services; };
alias ns { nick nickserv; type services; };
alias ns { target nickserv; type services; };
alias chanserv { type services; };
alias cs { nick chanserv; type services; };
alias cs { target chanserv; type services; };
alias memoserv { type services; };
alias ms { nick memoserv; type services; };
alias ms { target memoserv; type services; };
alias operserv { type services; };
alias os { nick operserv; type services; };
alias os { target operserv; type services; };
alias helpserv { type services; };
alias hs { nick helpserv; type services; };
alias hs { target helpserv; type services; };
alias botserv { type services; };
alias bs { nick botserv; type services; };
alias bs { target botserv; type services; };
include "aliases/aliases.conf";
+5 -5
View File
@@ -1,14 +1,14 @@
/* Generic Aliases */
alias nickserv { type services; };
alias ns { nick nickserv; type services; };
alias ns { target nickserv; type services; };
alias chanserv { type services; };
alias cs { nick chanserv; type services; };
alias cs { target chanserv; type services; };
alias memoserv { type services; };
alias ms { nick memoserv; type services; };
alias ms { target memoserv; type services; };
alias operserv { type services; };
alias os { nick operserv; type services; };
alias os { target operserv; type services; };
alias helpserv { type services; };
alias hs { nick helpserv; type services; };
alias hs { target helpserv; type services; };
include "aliases/aliases.conf";
+1 -1
View File
@@ -1,4 +1,4 @@
/* Generic StatServ Aliases */
alias statserv { type stats; };
alias ss { nick statserv; type stats; };
alias ss { target statserv; type stats; };
+6 -6
View File
@@ -1,17 +1,17 @@
/* IRCServices Aliases */
alias nickserv { type services; };
alias ns { nick nickserv; type services; };
alias ns { target nickserv; type services; };
alias chanserv { type services; };
alias cs { nick chanserv; type services; };
alias cs { target chanserv; type services; };
alias memoserv { type services; };
alias ms { nick memoserv; type services; };
alias ms { target memoserv; type services; };
alias operserv { type services; };
alias os { nick operserv; type services; };
alias os { target operserv; type services; };
alias helpserv { type services; };
alias hs { nick helpserv; type services; };
alias hs { target helpserv; type services; };
alias irciihelp { type services; };
alias statserv { type services; };
alias ss { nick statserv; type services; };
alias ss { target statserv; type services; };
include "aliases/aliases.conf";
+2 -2
View File
@@ -1,6 +1,6 @@
/* OperStats Aliases */
alias operserv { type stats; };
alias os { nick operserv; type stats; };
alias os { target operserv; type stats; };
alias statserv { type stats; };
alias ss { nick statserv; type stats; };
alias ss { target statserv; type stats; };
+99 -7
View File
@@ -20,6 +20,20 @@ CFLAGS="-pipe $CFLAGS"
fi
fi
dnl (the gcc flag detection trick is taken from xemacs/Vin Shelton)
dnl UnrealIRCd might not be strict-aliasing safe at this time
case "`gcc -v --help 2>&1`" in
*-fstrict-aliasing* ) CFLAGS="$CFLAGS -fno-strict-aliasing" ;;
esac
dnl Pointer signedness warnings are really a pain and 99.9% of the time
dnl they are of absolutely no use whatsoever. IMO the person who decided
dnl to enable this without -Wall should be shot on sight.
case "`gcc -v --help 2>&1`" in
*-Wpointer-sign* ) CFLAGS="$CFLAGS -Wno-pointer-sign" ;;
esac
AC_PATH_PROG(RM,rm)
AC_PATH_PROG(CP,cp)
AC_PATH_PROG(TOUCH,touch)
@@ -63,6 +77,9 @@ if test "$ac_cv_prog_gcc" = "yes"; then
Darwin*[)]
ac_cv_pic="-bundle -flat_namespace -undefined suppress"
;;
HP-UX*[)]
ac_cv_pic="-fPIC"
;;
esac
else
case `uname -s` in
@@ -111,9 +128,26 @@ if test "$ac_cv_ip6" = "no"; then
AC_MSG_WARN(Your system does not support IPv6 so it will not be enabled)
else
AC_DEFINE(INET6)
dnl in6addr_any detection code taken from ratbox
AC_MSG_CHECKING([for struct in6addr_any])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#define IN_AUTOCONF
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>]],
[[struct in6_addr a = in6addr_any;]]
)],
[AC_MSG_RESULT(yes)],
[
AC_MSG_RESULT(no)
AC_DEFINE(NO_IN6ADDR_ANY)
]
)
fi
LIBS="$save_libs"
])
AC_CHECK_HEADER(sys/param.h,AC_DEFINE(PARAMH))
AC_CHECK_HEADER(stdlib.h,AC_DEFINE(STDLIBH))
AC_CHECK_HEADER(stddef.h,AC_DEFINE(STDDEFH))
@@ -224,12 +258,27 @@ dnl Checks for library functions.
AC_PROG_GCC_TRADITIONAL
AC_FUNC_SETPGRP
AC_FUNC_SETVBUF_REVERSED
AC_FUNC_ALLOCA
AC_CHECK_FUNCS(snprintf,AC_DEFINE(HAVE_SNPRINTF))
AC_CHECK_FUNCS(vsnprintf,AC_DEFINE(HAVE_VSNPRINTF))
AC_CHECK_FUNCS(strlcpy, AC_DEFINE(HAVE_STRLCPY))
AC_CHECK_FUNCS(strlcat, AC_DEFINE(HAVE_STRLCAT))
AC_CHECK_FUNCS(strlncat, AC_DEFINE(HAVE_STRLNCAT))
AC_CHECK_FUNCS(inet_pton, AC_DEFINE(HAVE_INET_PTON))
AC_CHECK_FUNCS(inet_ntop, AC_DEFINE(HAVE_INET_NTOP))
dnl Check if it supports C99 style variable length arrays
AC_CACHE_CHECK(if C99 variable length arrays are supported, ac_cv_varlen_arrays, [
AC_TRY_COMPILE(,[
int main() {
int i = 5;
int a[i];
a[0] = 1;
return 0;
}], ac_cv_varlen_arrays=yes, ac_cv_varlen_arrays=no)
])
if test "$ac_cv_varlen_arrays" = "yes" ; then
AC_DEFINE(HAVE_C99_VARLEN_ARRAY)
fi
AC_CACHE_CHECK(if we can set the core size to unlimited, ac_cv_force_core,[
AC_TRY_RUN([
#include <sys/time.h>
@@ -323,7 +372,7 @@ AC_DEFINE_UNQUOTED(MYOSNAME,"`uname -a`")
AC_ARG_WITH(permissions, [AC_HELP_STRING([--with-permissions=permissions],[Specify the default permissions for
configuration files])], AC_DEFINE_UNQUOTED(DEFAULT_PERMISSIONS,$withval), AC_DEFINE(DEFAULT_PERMISSIONS, 0600))
AC_ARG_WITH(dpath, [AC_HELP_STRING([--with-dpath=path],[Specify the path where configuration files are stored])],
AC_DEFINE_UNQUOTED(DPATH, "$withval") IRCDDIR="$withval"; mkdir $withval/tmp, AC_DEFINE_UNQUOTED(DPATH,"`pwd`") IRCDDIR="`pwd`" mkdir `pwd`/tmp)
AC_DEFINE_UNQUOTED(DPATH, "$withval") IRCDDIR="$withval", AC_DEFINE_UNQUOTED(DPATH,"`pwd`") IRCDDIR="`pwd`")
AC_ARG_WITH(fd-setsize, [AC_HELP_STRING([--with-fd-setsize=size],[Specify the max file descriptors to use])],
ac_fd=$withval, ac_fd=1024)
AC_DEFINE_UNQUOTED(MAXCONNECTIONS, $ac_fd)
@@ -332,6 +381,18 @@ AC_DEFINE_UNQUOTED(SPATH,"$withval") BINDIR="$withval",AC_DEFINE_UNQUOTED(SPATH,
AC_ARG_ENABLE(nospoof, [AC_HELP_STRING([--enable-nospoof],[Enable spoofing protection])], AC_DEFINE(NOSPOOF))
AC_ARG_ENABLE(prefixaq, [AC_HELP_STRING([--enable-prefixaq],[Enable chanadmin and chanowner prefixes])], AC_DEFINE(PREFIX_AQ))
AC_ARG_ENABLE(hub, [AC_HELP_STRING([--enable-hub],[Compile as a hub server])], AC_DEFINE(HUB))
AC_ARG_WITH(showlistmodes, [AC_HELP_STRING([--with-showlistmodes], [Specify whether modes are shown in /list])],
AC_DEFINE(LIST_SHOW_MODES))
AC_ARG_WITH(topicisnuhost, [AC_HELP_STRING([--with-topicisnuhost], [Display nick!user@host as the topic setter])],
AC_DEFINE(TOPIC_NICK_IS_NUHOST))
AC_ARG_WITH(shunnotices, [AC_HELP_STRING([--with-shunnotices], [Notify a user when he/she is no longer shunned])],
AC_DEFINE(SHUN_NOTICES))
AC_ARG_WITH(no-operoverride, [AC_HELP_STRING([--with-no-operoverride], [Disable OperOverride])],
AC_DEFINE(NO_OPEROVERRIDE))
AC_ARG_WITH(disableusermod, [AC_HELP_STRING([--with-disableusermod], [Disable /set* and /chg*])],
AC_DEFINE(DISABLE_USERMOD))
AC_ARG_WITH(operoverride-verify, [AC_HELP_STRING([--with-operoverride-verify], [Require opers to invite themselves to +s/+p channels])],
AC_DEFINE(OPEROVERRIDE_VERIFY))
CHECK_SSL
CHECK_ZLIB
CHECK_LIBCURL
@@ -364,8 +425,8 @@ IRCDLIBS="$IRCDLIBS -lresolv "
;;
esac
dnl REMEMBER TO CHANGE WITH A NEW RELEASE!
tre_version="0.6.6"
dnl REMEMBER TO CHANGE WITH A NEW TRE RELEASE!
tre_version="0.7.2"
AC_MSG_RESULT(extracting TRE regex library)
cur_dir=`pwd`
cd extras
@@ -381,11 +442,11 @@ else
fi
AC_MSG_RESULT(configuring TRE regex library)
cd tre-$tre_version
./configure --disable-agrep --disable-shared --disable-system-abi --disable-wchar --disable-multibyte --prefix=$cur_dir/extras/regexp
./configure --disable-agrep --disable-shared --disable-system-abi --disable-wchar --disable-multibyte --prefix=$cur_dir/extras/regexp || exit 1
AC_MSG_RESULT(compiling TRE regex library)
$ac_cv_prog_MAKER
$ac_cv_prog_MAKER || exit 1
AC_MSG_RESULT(installing TRE regex library)
$ac_cv_prog_MAKER install
$ac_cv_prog_MAKER install || exit 1
TREINCDIR="$cur_dir/extras/regexp/include"
AC_SUBST(TREINCDIR)
if test "x$ac_cv_path_PKGCONFIG" = "x" ; then
@@ -395,6 +456,37 @@ else
fi
AC_SUBST(TRELIBS)
cd $cur_dir
dnl REMEMBER TO CHANGE WITH A NEW C-ARES RELEASE!
cares_version="1.3.0"
AC_MSG_RESULT(extracting c-ares resolver library)
cur_dir=`pwd`
cd extras
dnl remove old c-ares directory to force a recompile...
rm -rf c-ares-$cares_version
if test "x$ac_cv_path_GUNZIP" = "x" ; then
tar xfz c-ares.tar.gz
else
cp c-ares.tar.gz c-ares.tar.gz.bak
gunzip -f c-ares.tar.gz
cp c-ares.tar.gz.bak c-ares.tar.gz
tar xf c-ares.tar
fi
AC_MSG_RESULT(configuring c-ares library)
cd c-ares-$cares_version
./configure --prefix=$cur_dir/extras/c-ares || exit 1
AC_MSG_RESULT(compiling c-ares resolver library)
$ac_cv_prog_MAKER || exit 1
AC_MSG_RESULT(installing c-ares resolver library)
$ac_cv_prog_MAKER install || exit 1
CARESINCDIR="$cur_dir/extras/c-ares/include"
AC_SUBST(CARESINCDIR)
CARESLIBS="-L../extras/c-ares/lib -lcares"
AC_SUBST(CARESLIBS)
cd $cur_dir
AC_OUTPUT(Makefile src/modules/Makefile unreal ircdcron/ircdchk)
chmod 0700 unreal
chmod 0700 ircdcron/ircdchk
Vendored
+692 -6
View File
@@ -850,6 +850,13 @@ Optional Packages:
stored
--with-fd-setsize=size Specify the max file descriptors to use
--with-spath Specify the location of the executable
--with-showlistmodes Specify whether modes are shown in /list
--with-topicisnuhost Display nick!user@host as the topic setter
--with-shunnotices Notify a user when he/she is no longer shunned
--with-no-operoverride Disable OperOverride
--with-disableusermod Disable /set* and /chg*
--with-operoverride-verify
Require opers to invite themselves to +s/+p channels
Some influential environment variables:
CC C compiler command
@@ -2031,6 +2038,15 @@ CFLAGS="-pipe $CFLAGS"
fi
fi
case "`gcc -v --help 2>&1`" in
*-fstrict-aliasing* ) CFLAGS="$CFLAGS -fno-strict-aliasing" ;;
esac
case "`gcc -v --help 2>&1`" in
*-Wpointer-sign* ) CFLAGS="$CFLAGS -Wno-pointer-sign" ;;
esac
# Extract the first word of "rm", so it can be a program name with args.
set dummy rm; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
@@ -2629,6 +2645,7 @@ fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -6983,6 +7000,314 @@ cat >>confdefs.h <<\_ACEOF
#define SETVBUF_REVERSED 1
_ACEOF
fi
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo "$as_me:$LINENO: checking for working alloca.h" >&5
echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
if test "${ac_cv_working_alloca_h+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
#include "confdefs.h"
#include <alloca.h>
#ifdef F77_DUMMY_MAIN
# ifdef __cplusplus
extern "C"
# endif
int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{
char *p = (char *) alloca (2 * sizeof (int));
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_working_alloca_h=yes
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_working_alloca_h=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
if test $ac_cv_working_alloca_h = yes; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_ALLOCA_H 1
_ACEOF
fi
echo "$as_me:$LINENO: checking for alloca" >&5
echo $ECHO_N "checking for alloca... $ECHO_C" >&6
if test "${ac_cv_func_alloca_works+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
#include "confdefs.h"
#ifdef __GNUC__
# define alloca __builtin_alloca
#else
# ifdef _MSC_VER
# include <malloc.h>
# define alloca _alloca
# else
# if HAVE_ALLOCA_H
# include <alloca.h>
# else
# ifdef _AIX
#pragma alloca
# else
# ifndef alloca /* predefined by HP cc +Olibcalls */
char *alloca ();
# endif
# endif
# endif
# endif
#endif
#ifdef F77_DUMMY_MAIN
# ifdef __cplusplus
extern "C"
# endif
int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{
char *p = (char *) alloca (1);
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_alloca_works=yes
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_alloca_works=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
if test $ac_cv_func_alloca_works = yes; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_ALLOCA 1
_ACEOF
else
# The SVR3 libPW and SVR4 libucb both contain incompatible functions
# that cause trouble. Some versions do not even contain alloca or
# contain a buggy version. If you still want to use their alloca,
# use ar to extract alloca.o from them instead of compiling alloca.c.
ALLOCA=alloca.$ac_objext
cat >>confdefs.h <<\_ACEOF
#define C_ALLOCA 1
_ACEOF
echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
if test "${ac_cv_os_cray+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
#else
wenotbecray
#endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "webecray" >/dev/null 2>&1; then
ac_cv_os_cray=yes
else
ac_cv_os_cray=no
fi
rm -f conftest*
fi
echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
echo "${ECHO_T}$ac_cv_os_cray" >&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func ();
char (*f) ();
#ifdef F77_DUMMY_MAIN
# ifdef __cplusplus
extern "C"
# endif
int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
cat >>confdefs.h <<_ACEOF
#define CRAY_STACKSEG_END $ac_func
_ACEOF
break
fi
done
fi
echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
if test "${ac_cv_c_stack_direction+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test "$cross_compiling" = yes; then
ac_cv_c_stack_direction=0
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
#include "confdefs.h"
int
find_stack_direction ()
{
static char *addr = 0;
auto char dummy;
if (addr == 0)
{
addr = &dummy;
return find_stack_direction ();
}
else
return (&dummy > addr) ? 1 : -1;
}
int
main ()
{
exit (find_stack_direction () < 0);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_c_stack_direction=1
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
( exit $ac_status )
ac_cv_c_stack_direction=-1
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
cat >>confdefs.h <<_ACEOF
#define STACK_DIRECTION $ac_cv_c_stack_direction
_ACEOF
fi
@@ -7381,6 +7706,222 @@ fi
done
for ac_func in inet_pton
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func ();
char (*f) ();
#ifdef F77_DUMMY_MAIN
# ifdef __cplusplus
extern "C"
# endif
int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
cat >>confdefs.h <<\_ACEOF
#define HAVE_INET_PTON 1
_ACEOF
fi
done
for ac_func in inet_ntop
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func ();
char (*f) ();
#ifdef F77_DUMMY_MAIN
# ifdef __cplusplus
extern "C"
# endif
int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
cat >>confdefs.h <<\_ACEOF
#define HAVE_INET_NTOP 1
_ACEOF
fi
done
echo "$as_me:$LINENO: checking if C99 variable length arrays are supported" >&5
echo $ECHO_N "checking if C99 variable length arrays are supported... $ECHO_C" >&6
if test "${ac_cv_varlen_arrays+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
#include "confdefs.h"
#ifdef F77_DUMMY_MAIN
# ifdef __cplusplus
extern "C"
# endif
int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{
int main() {
int i = 5;
int a[i];
a[0] = 1;
return 0;
}
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_varlen_arrays=yes
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_varlen_arrays=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_varlen_arrays" >&5
echo "${ECHO_T}$ac_cv_varlen_arrays" >&6
if test "$ac_cv_varlen_arrays" = "yes" ; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_C99_VARLEN_ARRAY 1
_ACEOF
fi
echo "$as_me:$LINENO: checking if we can set the core size to unlimited" >&5
echo $ECHO_N "checking if we can set the core size to unlimited... $ECHO_C" >&6
if test "${ac_cv_force_core+set}" = set; then
@@ -9486,12 +10027,12 @@ if test "${with_dpath+set}" = set; then
cat >>confdefs.h <<_ACEOF
#define DPATH "$withval"
_ACEOF
IRCDDIR="$withval"; mkdir $withval/tmp
IRCDDIR="$withval"
else
cat >>confdefs.h <<_ACEOF
#define DPATH "`pwd`"
_ACEOF
IRCDDIR="`pwd`" mkdir `pwd`/tmp
IRCDDIR="`pwd`"
fi;
# Check whether --with-fd-setsize or --without-fd-setsize was given.
@@ -9544,6 +10085,60 @@ _ACEOF
fi;
# Check whether --with-showlistmodes or --without-showlistmodes was given.
if test "${with_showlistmodes+set}" = set; then
withval="$with_showlistmodes"
cat >>confdefs.h <<\_ACEOF
#define LIST_SHOW_MODES 1
_ACEOF
fi;
# Check whether --with-topicisnuhost or --without-topicisnuhost was given.
if test "${with_topicisnuhost+set}" = set; then
withval="$with_topicisnuhost"
cat >>confdefs.h <<\_ACEOF
#define TOPIC_NICK_IS_NUHOST 1
_ACEOF
fi;
# Check whether --with-shunnotices or --without-shunnotices was given.
if test "${with_shunnotices+set}" = set; then
withval="$with_shunnotices"
cat >>confdefs.h <<\_ACEOF
#define SHUN_NOTICES 1
_ACEOF
fi;
# Check whether --with-no-operoverride or --without-no-operoverride was given.
if test "${with_no_operoverride+set}" = set; then
withval="$with_no_operoverride"
cat >>confdefs.h <<\_ACEOF
#define NO_OPEROVERRIDE 1
_ACEOF
fi;
# Check whether --with-disableusermod or --without-disableusermod was given.
if test "${with_disableusermod+set}" = set; then
withval="$with_disableusermod"
cat >>confdefs.h <<\_ACEOF
#define DISABLE_USERMOD 1
_ACEOF
fi;
# Check whether --with-operoverride-verify or --without-operoverride-verify was given.
if test "${with_operoverride_verify+set}" = set; then
withval="$with_operoverride_verify"
cat >>confdefs.h <<\_ACEOF
#define OPEROVERRIDE_VERIFY 1
_ACEOF
fi;
# Check whether --enable-ssl or --disable-ssl was given.
if test "${enable_ssl+set}" = set; then
enableval="$enable_ssl"
@@ -9851,6 +10446,9 @@ if test "$ac_cv_c_compiler_gnu" = "yes"; then
Darwin*)
ac_cv_pic="-bundle -flat_namespace -undefined suppress"
;;
HP-UX*)
ac_cv_pic="-fPIC"
;;
esac
else
case `uname -s` in
@@ -9962,6 +10560,58 @@ cat >>confdefs.h <<\_ACEOF
#define INET6 1
_ACEOF
echo "$as_me:$LINENO: checking for struct in6addr_any" >&5
echo $ECHO_N "checking for struct in6addr_any... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
#include "confdefs.h"
#define IN_AUTOCONF
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#ifdef F77_DUMMY_MAIN
# ifdef __cplusplus
extern "C"
# endif
int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{
struct in6_addr a = in6addr_any;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
cat >>confdefs.h <<\_ACEOF
#define NO_IN6ADDR_ANY 1
_ACEOF
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
LIBS="$save_libs"
@@ -10026,7 +10676,7 @@ IRCDLIBS="$IRCDLIBS -lresolv "
;;
esac
tre_version="0.6.6"
tre_version="0.7.2"
echo "$as_me:$LINENO: result: extracting TRE regex library" >&5
echo "${ECHO_T}extracting TRE regex library" >&6
cur_dir=`pwd`
@@ -10043,13 +10693,13 @@ fi
echo "$as_me:$LINENO: result: configuring TRE regex library" >&5
echo "${ECHO_T}configuring TRE regex library" >&6
cd tre-$tre_version
./configure --disable-agrep --disable-shared --disable-system-abi --disable-wchar --disable-multibyte --prefix=$cur_dir/extras/regexp
./configure --disable-agrep --disable-shared --disable-system-abi --disable-wchar --disable-multibyte --prefix=$cur_dir/extras/regexp || exit 1
echo "$as_me:$LINENO: result: compiling TRE regex library" >&5
echo "${ECHO_T}compiling TRE regex library" >&6
$ac_cv_prog_MAKER
$ac_cv_prog_MAKER || exit 1
echo "$as_me:$LINENO: result: installing TRE regex library" >&5
echo "${ECHO_T}installing TRE regex library" >&6
$ac_cv_prog_MAKER install
$ac_cv_prog_MAKER install || exit 1
TREINCDIR="$cur_dir/extras/regexp/include"
if test "x$ac_cv_path_PKGCONFIG" = "x" ; then
@@ -10059,6 +10709,39 @@ else
fi
cd $cur_dir
cares_version="1.3.0"
echo "$as_me:$LINENO: result: extracting c-ares resolver library" >&5
echo "${ECHO_T}extracting c-ares resolver library" >&6
cur_dir=`pwd`
cd extras
rm -rf c-ares-$cares_version
if test "x$ac_cv_path_GUNZIP" = "x" ; then
tar xfz c-ares.tar.gz
else
cp c-ares.tar.gz c-ares.tar.gz.bak
gunzip -f c-ares.tar.gz
cp c-ares.tar.gz.bak c-ares.tar.gz
tar xf c-ares.tar
fi
echo "$as_me:$LINENO: result: configuring c-ares library" >&5
echo "${ECHO_T}configuring c-ares library" >&6
cd c-ares-$cares_version
./configure --prefix=$cur_dir/extras/c-ares || exit 1
echo "$as_me:$LINENO: result: compiling c-ares resolver library" >&5
echo "${ECHO_T}compiling c-ares resolver library" >&6
$ac_cv_prog_MAKER || exit 1
echo "$as_me:$LINENO: result: installing c-ares resolver library" >&5
echo "${ECHO_T}installing c-ares resolver library" >&6
$ac_cv_prog_MAKER install || exit 1
CARESINCDIR="$cur_dir/extras/c-ares/include"
CARESLIBS="-L../extras/c-ares/lib -lcares"
cd $cur_dir
ac_config_files="$ac_config_files Makefile src/modules/Makefile unreal ircdcron/ircdchk"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -10635,6 +11318,7 @@ s,@PKGCONFIG@,$PKGCONFIG,;t t
s,@IRCDLIBS@,$IRCDLIBS,;t t
s,@MKPASSWDLIBS@,$MKPASSWDLIBS,;t t
s,@CPP@,$CPP,;t t
s,@ALLOCA@,$ALLOCA,;t t
s,@STRTOUL@,$STRTOUL,;t t
s,@CRYPTOLIB@,$CRYPTOLIB,;t t
s,@MODULEFLAGS@,$MODULEFLAGS,;t t
@@ -10645,6 +11329,8 @@ s,@BINDIR@,$BINDIR,;t t
s,@FD_SETSIZE@,$FD_SETSIZE,;t t
s,@TREINCDIR@,$TREINCDIR,;t t
s,@TRELIBS@,$TRELIBS,;t t
s,@CARESINCDIR@,$CARESINCDIR,;t t
s,@CARESLIBS@,$CARESLIBS,;t t
CEOF
_ACEOF
+42
View File
@@ -0,0 +1,42 @@
/* Example of a possible semi-secure /DCCALLOW configuration written by Syzop.
* $Id$
*
* Actually nothing is *100% secure*... there could still be
* bugs in the software itself (think: a winamp bug that can
* be exploited via an mp3, or: a wmplayer bug that can be
* exploited via a specially crafted .wmv, etc..).
* If you are really that paranoid you could just remove
* all 'allow dcc'-blocks and prompt the user for EVERY file ;).
*
* Still, I think this file is a good tradeoff between userfriendlyness
* and security. Note that when you try to only DENY specific
* file type (exe, com, etc) you are *guaranteed* to miss ones
* (like: did you know .r17 gets treated as a rar archive?
* and that an exe can be disguished as .cmd which is executable
* on nt/w2k/xp?)
*/
/* first.. deny everything, then allow known-good stuff... */
deny dcc { filename "*"; reason "Possible executable content"; soft yes; };
/* common image formats */
allow dcc { filename "*.jpg"; soft yes; };
allow dcc { filename "*.jpeg"; soft yes; };
allow dcc { filename "*.gif"; soft yes; };
allow dcc { filename "*.png"; soft yes; };
allow dcc { filename "*.bmp"; soft yes; };
/* audio / video (but not scripted/playlists!) */
allow dcc { filename "*.mp1"; soft yes; };
allow dcc { filename "*.mp2"; soft yes; };
allow dcc { filename "*.mp3"; soft yes; };
allow dcc { filename "*.mpg"; soft yes; };
allow dcc { filename "*.mpeg"; soft yes; };
allow dcc { filename "*.m1v"; soft yes; };
allow dcc { filename "*.m2v"; soft yes; };
allow dcc { filename "*.vob"; soft yes; };
allow dcc { filename "*.wav"; soft yes; };
/* text / misc */
allow dcc { filename "*.txt"; soft yes; };
allow dcc { filename "*.log"; soft yes; };
allow dcc { filename "*.pdf"; soft yes; };
allow dcc { filename "*.c"; soft yes; };
allow dcc { filename "*.cpp"; soft yes; };
+3 -2
View File
@@ -123,7 +123,8 @@ Carsten Munk <stskeeps@unrealircd.com> / May 1999, date
Dominick Meglio <codemastr@unrealircd.com> / June 1999, date
David Flynn / March 2000, June 2000
McSkaf / June 2001, September 2001
Finny Merrill <griever@unrealircd.com> / November 2001, date
Finny Merrill <griever@unrealircd.com> / November 2001, December 2002
Bram Matthys <syzop@unrealircd.com> / January 2002, date
Thanks go to those persons not mentioned here who have added their advice,
opinions, and code to IRC.
@@ -143,4 +144,4 @@ Eric P. Scott <eps@toaster.sfsu.edu>
Dan Goodwin <fornax@wpi.wpi.edu>
Noah Friedman <friedman@ai.mit.edu>
[ $Id$ ]
[ $Id$ ]
-195
View File
@@ -1,195 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>UnrealIRCd - 3.2 - Offical Documentation</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<p> <font size="-1">I M P O R T A N T R E A D I N G</font></p>
<p><font size="-1">(YES, YOU WILL NEED TO READ ALL OF THIS)</font></p>
<p><font size="-1">* Unreal3.2 is a lot different than Unreal3.1.1. Forget
all you have learned about setting up Unreal3.1.1 - this is a lot different.
We have got a new configuration format that integrates all the former config
files,ircd.conf, vhost.conf, chrestrict.conf, unrealircd.conf, into to one newunrealircd.conf
(what the ircd.conf is called now). See doc/ for more information on the configuration
format</font></p>
<p><font size="-1">* THIS IS A BETA VERSION, REPORT BUGS ON http://bugs.unrealircd.org</font></p>
<p><font size="-1">* We have introduced a new cloaking algorithm (+x), which makes
it incompatible with Unreal3.1.1 - these can however still link, but the hostname
will look different. This is made of three big numbers, configured in the config
file - and these MUST be the same on all servers on the network. Keep these
numbers secret, and the cloaking algorithm is uncrackable (within 55 years,
that is). The +x algorithm was changed slightly to fix a method of cracking
that was found. #define COMPAT_BETA4_KEYS to use the beta4 system for compatibility
with older betas.</font></p>
<p><font size="-1">* If you use Linux and have problems where the IRCd complains
that MAXCONNECTIONS is larger than FD_SETSIZE, you need to get your root to
edit /usr/include/bits/types.h - #define __FD_SETSIZE 1024 to be somenumber
that is equal or higher than MAXCONNECTIONS. This is a problem with Linux that
it is hard coded and non override able in some distributions. We recommend you
use FreeBSD or the variants of this if you need to run high load IRC servers.</font></p>
<p><font size="-1">* We use autoconf to help with compilation, and this should
make us able to a lot more platform (we have even ported to BeOS).</font></p>
<p><font size="-1">* We require a pthreads library for the SOCKS scan now - and
this is now done in the background (no more waiting!).</font></p>
<p><font size="-1">* The IRCd is now modularized, and you load modules with the
loadmodule command. You will most likely want to add these lines:<br>
loadmodule &quot;src/modules/commands.so&quot;;<br>
loadmodule &quot;src/modules/scan.so&quot;;<br>
loadmodule &quot;src/modules/scan_socks.so&quot;;<br>
loadmodule &quot;src/modules/scan_http.so&quot;;</font></p>
<p><font size="-1"> If you would like to code a module, doc/ will contain a module
guide,and we got an example module in src/modules/m_dummy.c.</font></p>
<p><font size="-1">* We have some IPv6 support, and there are some minor bugs
in it.</font></p>
<p><font size="-1">* The documentation is NOT yet 100% complete</font></p>
<p><font size="-1">* We have added snomask (similar to ircu), basically this allowed
us to remove several modes. Modes +cfFkje are gone, but don't worry, you can
still use them. They are now added like this:</font></p>
<p><font size="-1"> /mode yournick +s +cF</font></p>
<p><font size="-1"> You set the flags in the second parameter of the mode command
for a mode change +s, setting -s with no parameters removes all your snomask.
You can remove a specific snomask by doing:</font></p>
<p><font size="-1"> /mode yournick -s -c</font></p>
<p><font size="-1">The current snomasks are:</font></p>
<p><font size="-1"> c - local connects<br>
F - far connects<br>
f - flood notices<br>
k - kill notices<br>
e - 'eyes' notices<br>
j - 'junk' notices<br>
v - vhost notices<br>
G - gline/shun notices<br>
n - nick change notices<br>
q - deny nick (Q:line) rejection notices</font></p>
<p><font size="-1"> It shouldn't be too hard to figure out, just play around with
it a bit :)</font></p>
<p><font size="-1">* /who needs testing it was recorded and may contain bugs</font></p>
<p><font size="-1">* We have added alias {} which allows you to dynamically create
commands such as /nickserv Read example.conf for more information on how to
create your own. To use standard ones include one of the following files</font></p>
<p><font size="-1"> aliases/ircservices.conf (IRCServices, Daylight)<br>
aliases/epona.conf (Epona)<br>
aliases/auspice.conf (Auspice)<br>
aliases/generic.conf (Magick, Sirius, Wrecked)<br>
aliases/operstats.conf (OperStats)<br>
aliases/genericstats.conf (GeoStats, NeoStats)</font></p>
<p><font size="-1">* You can now use an IP in the oper::from and vhost::from fields
even if the host resolves</font></p>
<p><font size="-1">* Added an http proxy scanner (scan_http.so)</font></p>
<p><font size="-1">* Added oper::snomask to specify default oper snomask modes</font></p>
<p><font size="-1">* /helpop text has been moved to a config directive, help {}.
To keep the standard help text you need to include help.conf so add include
&quot;help.conf&quot;; to your config file.</font></p>
<p><font size="-1">* To be able to use G:lines you must now have the can_gkline
flag (or t if old style flags)</font></p>
<p><font size="-1">* Usermode +T (Tech Admin) has been removed, since it is 100%
useless</font></p>
<p><font size="-1">* Added a make install to copy files to the installation location</font></p>
<p><font size="-1">* Removed ./ircd, ./killircd, crypt/mkpasswd, ./rehash and
merged them into a new ./unreal [start|stop|rehash|mkpasswd] for mkpasswd the
format is</font></p>
<p><font size="-1"> ./unreal mkpasswd [method] [password]</font></p>
<p><font size="-1">* Added a new system for crypting passwords. You now do for
example password &quot;my password&quot; { crypt; }; This allows you to have
some crypted passwords and others not. If you have SSL enabled you may also
use the md5 and sha1 methods.</font></p>
<p><font size="-1">* The old blackhole is now set::scan::endpoint and specifies
an IP and port to tell proxies to connect to.</font></p>
<p><font size="-1">* You can now specify a cipher list for SSL links (read doc/conf.doc
for more info)</font></p>
<p><font size="-1">* +I is now in invisibility.so so it is easily disabled</font></p>
<p><font size="-1">* set::socks has been replaced by set::scan (read doc/conf.doc
for more info)</font></p>
<p><font size="-1">* If you experience problems with the scanners, perhaps check
out BOPM (http://www.blitzed.org/bopm)</font></p>
<p><font size="-1">* log {} syslog support added (read doc/unreal32docs.html for
more info)</font></p>
<p><font size="-1">* Added ripemd-160 password encryption support</font></p>
<p><font size="-1">* Enabled sha1 and md5 password encryption on Win32 regardless
of whether SSL is used.</font></p>
<p><font size="-1">* Added WinNT/2k/XP service support (experimental) To use this
you use the unreal.exe utility: unreal install -installs the service<br>
unreal uninstall -uninstalls the service <br>
unreal start -starts the service <br>
unreal stop -stops the service<br>
unreal restart -restarts the service<br>
unreal rehash -rehashes the config file</font></p>
<p><font size="-1"> Config errors and crashes are now logged to service.log when
in service mode.</font></p>
<p><font size="-1">* Implemented a new win32 debugger to make fixing bugs much
easier.</font></p>
<p><font size="-1">* Added a win32 installer to simplify installing under Windows.</font></p>
<p><font size="-1">* AKILL/RAKILL is deprecated. Server command still works but
will be removed eventually (aliases to TKL G). For normal opers it notices that
the commands are deprecated.</font></p>
<p><font size="-1">Made the config parser smarter when it comes to time values
and size values. Entries are no longer limited to 1d2h1m. You can now enter
&quot;1day 2 hours 1 minute&quot; for example. See doc/conf.doc for more information.</font></p>
<p><font size="-1">* The oper override code has been rewritten to be less intrusive.
You can now no longer automatically join a channel for which you must override
a mode. You must /invite yourself to the channel. The idea behind this is it
prevents the accidental &quot;rejoin on kick&quot; ban override and joining
a +s channel without realizing it is +s and therefore you shouldn't know it
exists.</font></p>
<p><font size="-1">* If you use the SSL features of Unreal, you should use OpenSSL
0.9.6e or later. This is important as the older versions may make the program
exploitable. See http://www.openssl.org for more information</font></p>
<p><font size="-1">* We have made a lot of changes to deal with SSL, and if you
find any flaws or problems, please contact the coder team. We however think
that the changes will make SSL more transparent and make it work more efficiently.</font></p>
<p><font size="-1">* Added technical documentation in doc/technical. This directory
will contain information about the protocol used by Unreal.</font></p>
<p><font size="-1">* Added EGD support for SSL. EGD allows entropy to be gathered
on systems that do not have a random device (/dev/random or /dev/urandom) or
have an unreliable random device. Unreal has been tested using EGADS (http://www.securesoftware.com/egads.php)
[With EGD support enabled], PRNGD (http://www.aet.tu-cottbus.de/personen/jaenicke/postfix_tls/prngd.html),
and EGD (http://egd.sourceforge.net). Other EGD compatible programs should work
as well.</font></p>
<p><font size="-1">* We have created a new complete set of docs! doc/unreal32docs.html
is now a complete<br>
set of docs! It is still not finished, however it contains atleast what was
already<br>
avail. in the other doc files. <br>
It can also be view online @ http://www.unrealircd.com/unreal32docs.html</font></p>
<p><font size="-1">* We have removed ./Setup - Please read the new docs for information
on configuring &amp;<br>
setting up Unreal3.2</font></p>
<p><font size="-1">* Removed makeconf - Read the docs to make a config file</font></p>
<p><font size="-1">* Added set::ssl::options with the following options:<br>
fail-if-no-clientcert - If SSL client connects and doesn't provide a client<br>
certificate, abort connection immediately<br>
verify-certificate - Check the certificate's validity using X509 methods, check if<br>
we trust CA's, etc. <br>
It however does slip self signed certificates through UNLESS<br>
no-self-signed - Don't allow self-signed certificates through (requires<br>
verify-certificate)</font></p>
<p><font size="-1">* Added the ability specify which CA's are trusted using set::ssl::trusted-ca-file</font></p>
<p><font size="-1">* A new configuration system has been added. The system is a bit more strict (meaning it
will complain more often) but it will never crash due to configuration errors, just
display a message saying errors exist.</font></p>
<p><font size="-1">* SVSLUSERS was added to all U:lines to change local and global max user counts (this is
NOT meant so you can make the max count higher than it really should be.)</font></p>
<p><font size="-1">* A new oper flag, can_override/v has been added. This is an attempt to stop oper abuse.
All opers can no longer use oper-override, this oflag MUST be in place for oper-override
to be allowed. Can_override is NOT assumed to be present no matter what your flags,
meaning you could be +N but still not be allowed to use oper-override.</font></p>
<p><font size="-1">* UNKLINE and UNZLINE have been removed in favor of a system like G:lines, to remove you
now /kline -user@host or /zline -user@host</font></p>
<p><font size="-1">* MAKE SURE YOU RERUN ./Config AND RUN make clean BEFORE USING
THIS VERSION!!!</font></p>
<p> </p>
<p> </p>
<p><font size="+2"><strong>Notes on compatibility</strong><a name="notesoncompatibility" id="notesoncompatibility"></a></font><br>
</p>
<p>Unreal 3.2 is ONLY compatible with Unreal3.1.4 and Unreal3.2 servers. DO NOT
ATTEMPT to link to servers that it is NOT compatible with.</p>
<p>
</body>
</html>
+135 -25
View File
@@ -1,30 +1,20 @@
==[ IMPORTANT MESSAGE ABOUT DISABLING NOSPOOF ]==
Disabling NOSPOOF at windows (w9x, nt, w2k, xp) is NOT recommended since this
will allow users to use "spoofed hosts" (like the IP of someone you trust).
WILL allow users to use "spoofed hosts" (like the IP of someone you trust).
If you got problems with NOSPOOF fix your client (bot?) instead (you should
PONG back to the initial PING at connect).
==[ HOW TO COMPILE UNREALIRCD WITHOUT SSL AT WINDOWS ]==
==[ GENERAL GUIDELINES ]==
First of all you need Microsoft Visual C++, compiling with cygwin
is not supported.
== "old" VC++ 6.0 ==
1. You need the Platform SDK (PSDK)
Grab it at: http://www.microsoft.com/msdownload/platformsdk/sdkupdate/ ->
core sdk -> install this sdk.
Note that this can take some time to download because it's >200Mb
(450mb installed) [!].
2. To compile:
start -> programs -> platform sdk blabla -> open build env. -> (choose os) ->
set blabla build env (debug). This will launch a DOS window.
3. Go to your UnrealIrcd dir (like: cd \dev\unreal3.2) and then compile with:
nmake -f makefile.win32
This will generate a wircd.exe and unreal.exe
4. Copy the src\win32\tre.dll to your UnrealIrcd main dir.
5. Done!
VC++ 7.x (.NET) is highly recommended. VC 6 might work but it requires
the Platform SDK (PSDK), it also has quite some bugs (there are 5 servicepacks!).
Basically VC7 is just much easier and known to work, therefore we'll assume
in this text that you are using it.
== VC++ 7.x (.NET) ==
== Simple compile (no SSL/ZIP/Remote includes) ==
1. Start the Visual Studio .NET Command Prompt
2. Go to your UnrealIrcd dir (like: cd \dev\unreal3.2) and then compile with:
nmake -f makefile.win32
@@ -32,12 +22,132 @@ is not supported.
3. Copy the src\win32\tre.dll to your UnrealIrcd main dir.
4. Done!
==[ HOW TO COMPILE UNREALIRCD WITH SSL AT WINDOWS ]==
Ouch, that's much work ;).
You need to compile openssl yourself.
Then have a look at makefile.win32 for instruction on how
to enable / specify path / etc...
DO NOT ask us for help with compiling openssl!
== Compiling modules ==
1. Put your module (the .c file) in src\modules (eg: c:\dev\unreal3.2\src\modules).
2. Start the Visual Studio .NET Command Prompt
3. Go to your UnrealIrcd dir (like: cd \dev\unreal3.2).
4. Compile the module with:
nmake -f makefile.win32 custommodule MODULEFILE=<name>
<name> is the name of the module WITHOUT the .c suffix, so if your
module has the filename 'm_crappymod.c', then you use:
nmake -f makefile.win32 custommodule MODULEFILE=m_crappymod
5. Done. A .dll file should have been created.
==[ AND ZIP LINKS SUPPORT? ]==
See makefile.win32 for instructions.
If you compiled with VC7 and used the official source (not a CVS version,
but for example 3.2.1 source) then the module should work on all these
versions (binary compatible) and you could for example put them on
your website so users can download them.
Such a module will work on both SSL and non-SSL, there should be no need
for separate versions... unless, of course, you use SSL-specific code in your mod.
DO NOT download a CVS version & compile your mod and then start
distributing the .dll for use at another (non-CVS) version!!
Every time we change a struct (and in some other cases) it makes the
binary/module binary incompatible which practically means your module
will CRASH or cause memory corruption and other subtle errors.
== COMPILING WITH ZIP LINKS / SSL / REMOTE INCLUDES SUPPORT ==
First of all, DO NOT use any precompiled libs from the official
zlib/openssl/curl sites. We require certain compile parameters.
Versions downloaded from such sites will often CRASH.
The easiest is to download the UnrealIRCd development package
which contains zlib, openssl and curl precompiled for you.
See: www.vulnscan.org/unrealwin32dev/
Just extract it somewhere (eg: to c:\dev).
Then, use compile flags to enable the features + specify where to look.
Here are examples if you used c:\dev:
ZIP: nmake -f makefile.win32 USE_ZIPLINKS=1 ZLIB_INC_DIR="c:\dev\zlib" ZLIB_LIB_DIR="c:\dev\zlib\dll32"
SSL: nmake -f makefile.win32 USE_SSL=1 OPENSSL_INC_DIR="c:\dev\openssl\include" OPENSSL_LIB_DIR="c:\dev\openssl\lib"
CURL: nmake -f makefile.win32 USE_REMOTEINC=1 LIBCURL_INC_DIR="c:\dev\curl\include" LIBCURL_LIB_DIR="c:\dev\curl\lib"
Obviously you can (and probably will) combine all these options, like
to build a zip+ssl+curl version (all in 1 line):
nmake -f makefile.win32 USE_ZIPLINKS=1 ZLIB_INC_DIR="c:\dev\zlib" ZLIB_LIB_DIR="c:\dev\zlib\dll32"
USE_SSL=1 OPENSSL_INC_DIR="c:\dev\openssl\include" OPENSSL_LIB_DIR="c:\dev\openssl\lib" USE_REMOTEINC=1
LIBCURL_INC_DIR="c:\dev\curl\include" LIBCURL_LIB_DIR="c:\dev\curl\lib"
== COMPILING ZLIB/SSL/CURL YOURSELF ==
This is quite some work.. With the precomiled method shown above it
just takes like 5-10 minutes to have a zlib+ssl+curl Unreal version.
But if you want to compile each of these libs manually then it will
probably take an hour or so.
** THE INFORMATION BELOW IS OUTDATED, WE GOT RID OF MDd, USE MD INSTEAD
AND DONT COMPILE OPENSSL W/DEBUG ***
== ZIP LINKS (zlib) ==
[NOTE: precompiled dlls should NOT be used because they will cause a crash
(this is due to different compile parameters / api call systems]
To compile with ziplinks support you need to do the following:
Download the SOURCE from http://www.winimage.com/zLibDll/
(at the time of writing, http://www.winimage.com/zLibDll/zlib121.zip)
and extract it to somewhere, for example c:\dev\zlib-1.2.1
Then, edit win32\makefile.msc:
- Change -MD to -MDd
- Add -D ZLIB_WINAPI to CFLAGS
- so the result will be like:
CFLAGS = -nologo -MDd -O2 $(LOC) -D ZLIB_WINAPI
- Then compile: nmake -f win32\Makefile.msc
- Assuming the above step went fine, your zlib is now ready.
- Now, to compile UnrealIRCd with ziplinks you do something like this:
nmake -f makefile.win32 USE_ZIPLINKS=1 ZLIB_INC_DIR="c:\dev\zlib-1.2.1" ZLIB_LIB_DIR="c:\dev\zlib-1.2.1"
Obviously, change the paths if needed [1st = *.h files, 2nd=*.dll/*.lib]
== SSL (OpenSSL) ==
[note: openssl requires perl to configure/compile!]
- Download latest openssl (eg: openssl-0.9.7d.tar.gz) and extract it somewhere
(we'll use c:\dev\openssl-0.9.7d in this example)
- Open util\do_masm.bat, add 'debug' to the lines with 'mk1mf.pl' BUT be careful
since it should NOT be the last word, so add it somewhere before that.
For example: perl util\mk1mf.pl dll debug VC-W31-32 >ms\w31dll.mak
- Start the
- Now we go build openssl, run:
ms\do_masm
nmake -f ms\ntdll.mak
- Assuming the above step went fine, your OpenSSL is now ready.
- Now, to compile UnrealIRCd with ziplinks you do something like this:
nmake -f makefile.win32 USE_SSL=1 OPENSSL_INC_DIR="c:\openssl\inc32\openssl" OPENSSL_LIB_DIR="C:\Dev\openssl\out32dll.dbg"
Obviously, change the paths if needed [1st=*.h files, 2nd=*.dll/*.lib]
== REMOTE INCLUDES (curl, c-ares) ==
- Download latest c-ares source from http://daniel.haxx.se/projects/c-ares/
Download latest curl source from http://curl.haxx.se/download.html
Extract both somewhere (eg: c:\dev\c-ares-1.2.0 and c:\dev\curl-7.12.0)
- Open vc\vc.dsw from your ares directory. Assuming you have VC7 it will ask
whether it should convert the project, choose 'Yes to all'.
- (solution explorer) areslib -> properties
C/C++ -> code generation -> runtime library: Change to
'Multi-threaded Debug DLL (/MDd)'
- at the time of writing 'ares_free_errmem.c' should be removed from the
project file (solution explorer -> source files -> find the file + press
delete). Also 'ares_version.c' and 'ares_cancel.c' should be added
(solution explorer -> source files -> rightclick -> add -> add existing ->
go down a few directories if needed and choose the file).
- right click at 'areslib' in the solution explorer and select 'Build'.
Assuming it compiled fine, we are done with c-ares.
- Now go to the curl directory and open lib\curllib.dsw. Choose 'Yes to all'
again when asked about converting.
- Open config-win32.h (@header files in solution explorer) and add:
#define USE_ARES 1
- Open include\curl\multi.h and change the line with:
#include <winsock2.h>
to:
#include <winsock.h>
- (solution explorer) curllib -> properties
- C/C++ -> code generation -> runtime library: Change to
'Multi-threaded Debug DLL (/MDd)'
- C/C++ -> general -> additional include directories:
add the path to your <c-ares-directory> (eg: C:\Dev\c-ares-1.2.0).
- linker -> general -> additional library directories:
add the path to your <c-ares-directory>\vc\areslib\Debug,
for example C:\Dev\c-ares-1.2.0\vc\areslib\Debug.
- linker -> input -> additional dependencies:
add: areslib.lib
- linker -> input -> Module defenition file:
set to: libcurl.def
Done with editting properties.
- Now: Build -> rebuild solution, everything should compile fine.
- Now, to compile UnrealIRCd with remote includes you do something like this:
nmake -f makefile.win32 USE_REMOTEINC=1 LIBCURL_INC_DIR="C:\Dev\curl-7.12.0\include" LIBCURL_LIB_DIR="C:\Dev\curl-7.12.0\lib\Debug"
+764
View File
@@ -0,0 +1,764 @@
/*
* example.conf by Alexander Ganchev AKA Peace (unrealirc@gmail.com).
* $Id$
*
* Prednaznachen e za Unreal3.2 i versii sled nego
* Dobre priqteli. Tova e noviqt example.conf.Izglejda kato nqkoi fail C++ (shega).
* Kakto i da e..vreme e da go configurirame. Trudnichko e kato za purvi put, no
* sus malko praktikuvane i chetene shte mu sviknete.
*
* Kopiraite tozi fail vuv vashata glavna direktoriq i go prekrustete na 'unrealircd.conf'.
* VAJNO: Vsichki linii (tova sa zavurshvashtite na vseki red),
* {trqbwa da zavurshvat sus ; a kraq na samata liniqta slagate i } - demek nakraq stava };
* MOLQ PROCHETETE doc/unreal32docs.html!Online versiqta shte namerite tuk -
* www.vulnscan.org/UnrealIrcd/unreal32docs.html
* Sudurja dosta informaciq za config faila: dava vi informaciq za vseki blok,stoinost, i taka natatuka..
*/
/* Tipove Komentari */
#Comment type 1 (Shell type)
// Comment type 2(C++ style)
/* Comment type 3 (C Style) */
#tezi linii shte budat ignorirani ot ircd-to.
/*
* UnrealIRCd poddurja modulite,clock.dll & commands.dll
* zavisimost ot vashata operacionna sistema izberete za Windows ili za *NIX shte izpolzvate
* Nezavisimo ot Operacionnata vi sistema trqbva da mahnete //- predi loadmodule i na 2-ta reda.
*/
/* FOR *NIX, uncomment the following 2lines: */
//loadmodule "src/modules/commands.so";
//loadmodule "src/modules/cloak.so";
/* FOR Windows, uncomment the following 2 lines: */
loadmodule "modules/commands.dll";
loadmodule "modules/cloak.dll";
/*
* Sushto taka moje da vkliuchite i drugi configuracionni failove.
* help.conf vi se qvqva komadata /helpop text. The badwords.*.conf
* falovete sudurjat vsichki "badword kato slojite mod +G v kanal
* spamfilter.conf sudurja nqkoi dobri pravila za zabrani za puskane na troianski kone.
* Ako iskate mojete da gi vkliuchite tqh :
*/
include "help.conf";
include "badwords.channel.conf";
include "badwords.message.conf";
include "badwords.quit.conf";
include "spamfilter.conf";
/* NEW: me {}
* OLD: M:Line
* me {} opredelq imeto,opisanie i cifrata na vashiqt unrealircd server.
* Sintaksisut e kakto sledva :
* me {
* name "server.name";
* info "Server Description";
* numeric (server numeric*);
* };
* Ako linkvate Servera si,Cifrata moje bi nqma da bude izpolzvaema ot drugite serveri vuv mrejata
*/
me
{
name "Imeto Na Servera vi";
info "Opisanie Na Servera";
numeric Cifra po izbor(po malka e po dobre);
};
/*
* NEW: admin {}
* OLD: A:Line
* Admin dava informaciq za server admin-a na mrejata.
* Mojete da slojite mnogo linii pod grafata 'admin {' ako iskate.
* Sintaksisa kakto sledva:
* admin {
* "Purva liniq";
* "Vtora liniq";
* [drugi]
* };
*/
admin {
"TUk Slojete informaciq za admina";
"Tuk mojete da slojite i ime ili email";
};
/*
* NEW: class {}
* OLD: Y:line (old was confusing)
* Class e grupa nastroiki za vashata vruzka.Primer,Server connect-vane,max clienti i drugi.
* delqt se na 2 Class-a. Class Cliends & Servers.
* {
* pingfreq ((kolko chesto da pignesh user/server v sekundi);
* maxclients (vuzmojnite connekcii za opredelen 'Class');
* sendq (maksimuma ot hora v edna opashka);
* recvq (maximum receive queue from a connection [flood control]);
* };
*/
class clients
{
pingfreq 90;
maxclients 500;
sendq 100000;
recvq 8000;
};
class servers
{
pingfreq 90;
maxclients 10; /* Maksimum serveri koito moje da se link-nat */
sendq 1000000;
connfreq 100; /* Sekundite mejdu vseki opit za connect-vane */
};
/*
* NEW: allow {}
* OLD: I:Line
* Tazi Opciq opredelq koi shte ima pravo da vliza na servera vi...
* Mojete da kontrolirate vashite klienti,da im slagate paroli i drugi.
* control and/or set a password.
* Syntax is as follows:
* allow {
* ip (razresheno ip za izpolzvane);
* hostname (host mask);
* class (class to send them to [see class {}]);
* password "(parola)"; (po izbor)
* maxperip (pozvoleni vruzki ot edno ip); (optional)
* };
*/
allow {
ip *@*;
hostname *@*;
class clients;
maxperip 5;
};
/* Passworded allow line */
allow {
ip *@255.255.255.255;
hostname *@*.passworded.ugly.people;
class clients;
password "Test";
maxperip 1;
};
/*
* NEW: allow channel {}
* OLD: chrestrict
* Razreshenie na userite da vlizat v opredelen kanal...
* Syntax:
* allow channel {
* channel "imeto na kanala";
* };
*/
allow channel {
channel "#Free";
};
/*
* NEW: oper {}
* OLD: O:Line
* Opredelete koi da bude IRC Operator na servera vi
* IRC operators tova sa tochno tezi hora koito da se grijat za servera,
* da go poddurjat i da se connect-vat redovno.
* Sinktaksisut e kakto sledva :
* oper (login) {
* class (class to put them in, if different from I, moves them to new
* class);
* from {
* userhost (ident@host);
* userhost (ident@host);
* };
* flags
* {
* (tuk shte slagate flagovete*);
* };
* OR
* flags "old type flags, like OAaRD"; (sushto moje da slagate i samo bukvite)
* };
*/
/* Za lista s oper flagovete, poglednete doc/unreal32docs.html#operblock
*[Zaduljitelno da se prochete]
*/
oper admin {
class clients;
from {
userhost *@*;
};
password "Test";
flags
{
netadmin;
can_zline;
can_gzline;
can_gkline;
global;
coadmin;
can_globalkill;
can_ungline;
can_gline;
can_kline;
can_unkline;
can_rehash;
can_globops;
can_localroute;
can_wallops;
can_localkill;
can_localnotice;
can_globalroute;
can_globalnotice;
can_dccdeny;
can_setq;
services-admin;
};
};
/*
* NEW: listen {}
* OLD: P:Line
* Tuk shte opredelite porta na vasheto ircd prez koito
* da vlizat useri/serveri.
* Siktaksisut e kakto sledva :
* listen (ip):(nomera na porta)
* {
* options {
* (options here);
* };
* };
* or for a plain
* listen: listen (ip):(port);
*
* NOTICE: for ipv6 ips (3ffe:b80:2:51d::2 etc), use listen [ip]:port;
*
* That works also.
*/
/* Options for listen:
OLD | NEW
S serversonly
C clientsonly
J java
s ssl
* standard
*/
/* BELEJKI ZA SSL PORTOVE : SSL portovete sa dosta nestandartni,
* osven nomera na 'high-SSL portovete', nqkoi hora kazvat che mojej da gi startirash
* na 994 port, zashtoto tova e oficialniqt SSL port..no tova izskva root!Osven tova port 194
* e oficialniqt irc port i mojete nqkoi put da probvate da vidite dali ircd-to e startirano
* na tozi port.
* Nashiqt suvet e da izpolzvate port 6697 za SSL, toi se izpolzva vuv nqkoi mreji i
* mojete da otvorite mnogo SSL portove ako iskate, no izpolzvaite i 6697 po standart.
listen *:6697
{
options
{
ssl;
clientsonly;
};
};
listen *:8067;
listen *:6667;
/*
* NEW: link {}
* OLD: C/N:Lines
* Tezi opcii sa za link-vane na serveri
* BELEJKA: Dva servera se nujdaqt ot LINK {} za da budat linknati bez problemi!
* Sintaksisut e kakto sledva:
* link (server name)
* {
* username (username, moshete da slojite sushto i * );
* hostname (ip nomer/hostmask);
* bind-ip (kum koe ip da bude svurzano sled kato se connect-ne, ili slojete * );
* port (port za svurzvane (moje da slojite vseki);
* hub (ako servera vi e hub,slojete * , ili servermask-a);
* [ili leaf *;]
* password-connect "(parola za svurzvane)";
* password-receive "(povtorete parolata)";
* class (class);
* options {
* (options here*);
* };
* /* Ako izpolzvate SSL,vie mojete da izberete shifur za da izpolzvate SSL mode
* * Lista shte namerite vuv "openssl ciphers",samostoqtelen shifur sus :'s
* */
* ciphers "DES-CBC3-MD5";
*
* };
*/
/*
options:
OLD | NEW
S ssl
Z zip
N/A autoconnect
N/A quarantine
N/A nodnscache
*/
link services.Test.com
{
username *;
hostname 1.2.3.4;
bind-ip *;
port 7029;
hub *;
password-connect "LiNk";
password-receive "LiNk";
class servers;
options {
/* Belejka: vie ne mojete da izpolzvate autoconnect kogato linkvate serveri
autoconnect;
ssl;
zip;
};
};
/*
*
* NEW: ulines {}
* OLD: U:Line
* U-liniite davat poveche komandi na serverut vi,Uliniite se slagat samo za services/stats
* serveri i NIKOGA za normalnite UnrealIRCd serveri!
* Sintaksisut e kakto sledva:
* ulines {
* (server to uline);
* (server to uline);
* [etc]
* };
*/
ulines {
services.Test.org;
stats.Test.org;
};
/*
* NEW: drpass {}
* OLD: X:Line
* Tuk shte slagate parolite za /die i /restart na servera.
* Sintaksusut e kakto sledva:
* drpass {
* restart "(parola za restart na servera)";
* die "(parola za die na servera)";
* };
*/
drpass {
restart "restart";
die "die";
};
/*
* NEW: log {} OLD: nishto ne se kazva otnosno tova kude i kakvo da logva.Mojete
* gi slagate ako iskate
*
* FLAGS: errors, kills, tkl, connects, server-connects, kline, oper
*
* Syntax:
* log "log file"
* {
* flags
* {
* flag;
* flag;
* etc..
* };
* };
*/
log "ircd.log" {
/* Iztriite log faila i napravete nov koito da stiga do 2MB.
*/
maxsize 2097152;
flags {
oper;
kline;
connects;
server-connects;
kills;
errors;
sadmin-commands;
chg-commands;
oper-override;
spamfilter;
};
};
/*
* NEW: alias {}
* OLD: N/A
* Chrez tezi nastroiki moje da napravite prehod ot /nickserv,/chanserv i drugi kum drugi nickove.
* FLAGS: services,stats,normal
*
** Syntax:
* alias "Ime" {
* target "points to";
* type aliastype;
* };
* [BELEJKA: Mojete da vkliuchite i opredeleniq,za celta poglednete doc/unreal32docs.html section 2.9]
*/
// Tova posochva komandata /nickserv-a na user-a NickServ koito e svurzan s set::services-server server
/*alias NickServ {
target "NickServ";
type services;
};*/
// Ako iskate komandite da sa na drug nick mojete da promenite nick-a
//alias ChanServ {type services; };
// Posochva /StatServ na user-a StatServ koqto svurzva set::stats-server server
//alias StatServ {type stats; };
// Posochva /superbot na user-a SuperBot
//alias SuperBot {type normal; };
/* Standart Aliases */
alias NickServ { type services; };
alias ChanServ { type services; };
alias OperServ { type services; };
alias HelpServ { type services; };
alias StatServ { type stats; };
/*
* NEW: alias {}
* OLD: N/A
* Tezi moje da posochite zamestiteli na /identify,/services, i drugi...
* Syntax:
* alias "Ime" {
* format "format string" {
* target "points to";
* type aliastype;
* parameters "parameters to send";
* };
* type command;
* };
*/
/* Tova se pokazva otdelno, zashtoto vypreki che ima syshtoto ime kato predishnata direktiva
*e dosta razlichno po otnoshenie na sintaksis, vypreki che osigurqva prosta funkciq i raz4ita na standartni alias-i za da raboti.
*/
/*
alias "identify" {
format "^#" {
target "chanserv";
type services;
parameters "IDENTIFY %1-";
};
format "^[^#]" {
target "nickserv";
type services;
parameters "IDENTIFY %1-";
};
type command;
};
*/
/* alias::format ditektivata e obichaen izraz.Pyrviq format se svyrzva s
* komandata /identify kogato pyrviq simvol e "#". Sled tova se izprashta do chanserv
* alias-a s parametri identify. %1-. Togava vtoriq ormat se svyrzva s komandata /identify
* kogato pyrviq simvol ne e "#".
* Togava se izprashta do nickserv alias-a s parametri identify %1-.
/* Standard aliases */
alias "services" {
format "^#" {
target "chanserv";
type services;
parameters "%1-";
};
format "^[^#]" {
target "nickserv";
type services;
parameters "%1-";
};
type command;
};
alias "identify" {
format "^#" {
target "chanserv";
type services;
parameters "IDENTIFY %1-";
};
format "^[^#]" {
target "nickserv";
type services;
parameters "IDENTIFY %1-";
};
type command;
};
/*
* NEW: tld {}
* OLD: T:Line
* Tezi nastroki sa za razlichni 'motd' i 'rules' failove
* v zavisimost ot klientskata hostmask-a.
* Sintaksisut e kakto sledva:
* tld {
* * mask (ident@host);
* motd "(motd file)";
* rules "(rules file)";
* };
*/
tld {
mask *@*;
motd "ircd.motd";
rules "ircd.rules";
};
/* BELEJKA: vzemete nqkoi fail primer - vzemete tao.of.irc.doc..sled tova go kopiraite v
* glavnata direktoriq na Unrealircd-to vi.Prekrustete go na irc.motd..Napravete po sushtiq
* nachin i ircd.rules (FAILOVETE SA ZADULJITELNI)
*/
/*
* NEW: ban nick {}
* OLD: Q:Line
* Ako slojite ban na nickname to veche tozi nick stava neizpolzvaem.
* Sintaksisut e kakto sledva :
* ban nick {
* mask "(nick koito jelaete da zabranite)";
* reason "(prichina)";
* };
*/
ban nick {
mask "Test";
reason "Test Nickname";
};
/*
* NEW: ban ip {}
* OLD: Z:Line
* Ban na ip.
* Sintaksis:
* ban ip { mask (ip nomer/hostmask); reason "(prichina)"; };
*/
ban ip {
mask 100.100.200.300;
reason "Wrong Ip";
};
/*
* NEW: ban server {}
* OLD: Server Q:Line
* Slagane na ban na server.Ako servera e link-nat kum otdalecheniq server
* (toest tozi) localniqt server shte se diskonect-ne avtormatichno.
* Syntax is as follows:
* ban server {
* mask "(Imeto na servera)";
* reason "(Prichina)";
* };
*/
ban server {
mask irc.microsoft.com;
reason "Get out of here";
};
/*
* NEW: ban user {}
* OLD: K:Line
* Tazi opciq pozvolqva da zabranite dostupa na user do vashiqt server
* Sintaksis:
* ban user { mask (hostmask/ip nomer); reason "(Prichina)"; };
*/
ban user {
mask *tirc@*.microsoft.com;
reason "Idiot";
};
/*
* NEW: ban realname {}
* OLD: n:Line
* Tazi opciq vi dava pravo da zabranite dostupa na user ot opredeleno 'realname'.
* Sintaksis:
* ban realname {
* mask "(real name)";
* reason "(prichina)";
* };
*/
ban realname {
mask "test";
reason "mIRKFORCE";
};
ban realname {
mask "sub7";
reason "virus";
};
/*
* BELEJKA ZA VSICHKI BANOVE, mojete da povtarqte procedurata sus razlichni nickove!
*
* NEW: except ban {}
* OLD: E:Line
* Nick koito ne moje da bude bannat.
* Sintaksis:
* except ban { mask (ident@host); }
*/
except ban {
/* don't ban stskeeps */
mask *stskeeps@212.*;
};
/*
* NEW: deny dcc {}
* OLD: dccdeny.conf
* Izpolzvaite go za da zabranite dcc.Predpazva vi ot virusi
* Syntax:
* deny dcc
* {
* filename "Fail koito shte blokirate (ie, *exe)";
* reason "prichina";
* };
*/
deny dcc {
filename "Sub7";
reason "Possible Sub7 Virus";
};
/*
* NEW: deny channel {}
* OLD: N/A (NEW)
* Zabranqva kanali po vash izbor.
* Syntax:
* deny channel {
* channel "(kanal)";
* reason "prichina";
* };
*/
deny channel {
channel "hackers";
reason "Warez is illegal";
};
/*
* NEW: vhost {}
* OLD: Vhost.conf file
* Tazi nastroika vi slaga Falshivo ip.Slaga se za hora koito ne sa operatori
* ili puk za operatori (za po murzelivite /sethost :P
* Sintaksis:
* vhost {
* vhost (vhost.com);
* from {
* userhost (ident@host to allow to use it);
* };
* login (login name);
* password (password);
* };
* then to use this vhost, do /vhost (login) (password) in IRC
*/
vhost {
vhost i.hate.microsefrs.com;
from {
userhost *@*;
};
login stskeeps;
password moocowsrulemyworld;
};
/* Mojete da vkliuchite i drugi konfiguracionni failove */
/* vkliuchete "klines.conf"; */
/* Network configuration */
set {
network-name "Imeto na Mrejata vi";
default-server "Imeto na Servera";
services-server "Services.servera";
stats-server "Stats.Servera";
help-channel "#Kanal za pomosht";
hiddenhost-prefix "skrithost";
/* prefix-quit "quit na userite"; */
/* Cloak Keys se slagat na vsichki serveri ot mrejata.
* Te se izpolzvat za po golqma sigurnost.Trqbva da budat izbrani 3 reda
* ot 5-100 simvola i da sudurjat SMESENI golemi,malki bukvi i cifri...
* V primera e posocheno edin takuv 'Cloak Key'..napishete oshte 2
*/
cloak-keys {
"aoAr1HnR6gl3sJ7hVz4Zb7x4YwpW";
"Slojete Tuk Vashi Razburkani";
"Slojete Tuk Vashi Razburkani";
};
/* on-oper host */
hosts {
local "Host za localen operator";
global "Host za globalen operator";
coadmin "Host za coadmin";
admin "Host za admin";
servicesadmin "Host za services-admin";
netadmin "Host za netadmin";
host-on-oper-up "yes\no";
};
};
/* Server specific configuration */
set {
kline-address "slojete adres za kline";
auto-join "#kanal za auto-join";
modes-on-connect "+iw";
modes-on-oper "+wgs";
oper-auto-join "#Kanal za auto-join na operatorite";
dns {
nameserver 127.0.0.1;
timeout 2s;
retries 2;
};
options {
hide-ulines;
/* Ako jelaete da proverqva identa mahnete */
/* identd-check; */
show-connect-info;
};
maxchannelsperuser 10;
/* Tova e minimalnoto vreme v koeto user moje da se svurje sled kato izleze ot servera.
* Tova shte pomogne da se spre spam-a */
anti-spam-quit-message-time 10s;
/* Napravete statichen quit koito da zamestva drugite quit-ove na userite.
custom quits are allowed on local server */
/* static-quit "Client quit"; */
/* Mojete da blokirate 'Part-reason-ite' kato slojite nqkakuv text po vash izbor */
/* static-part yes; */
/* Mojete da slagate 'stats' ili inache kazano nqkoi flagove da budat razresheni i
* izpolzvaemi samo ot operite. Primer za tova sa - klines,glines i shuns
*/
oper-only-stats "okfGsMRUEelLCXzdD";
/* Throttling: Dolniqt primer pokazva che mojete da slojite limit 3 svurzvaniq
za 60 sec (na host). */
throttle {
connections 3;
period 60s;
};
/* Anti flood protection */
anti-flood {
nick-flood 3:60; /* 3 smenqniq na nicka za 60 seconds (po default) */
};
/* Spam filter */
spamfilter {
ban-time 1d; /* vremetraeneto e po default *line ban set by spamfilter */
ban-reason "Spam/Advertising"; /* default prichina */
virus-help-channel "#help"; /* Kanal za skanirane na virusi */
/* s izkliuchenie "#help"; drugite kanali se osvobojdavat ot filtrirane */
};
};
/*
* Ako imate problem ili nujda ot pomosht?
* 1) www.vulnscan.org/UnrealIrcd/unreal32docs.html
* 2) www.vulnscan.org/UnrealIrcd/faq/ <- sudurja 80% ot vuprosite vi!
* 3) Ako imate problem moje da se oburnete i kum irc.ircsystems.net #unreal-support,
* no purvo PROCHETETE HELP FAILA i 'FAQ'.
*/
+56 -57
View File
@@ -26,10 +26,17 @@
#those lines are ignored by the ircd.
/*
* At *NIX UnrealIrcd supports modules.
* Loading the commands module is required:
* UnrealIRCd supports modules, loading some of them is required.
* You need at least the commands module and a cloaking module.
*/
loadmodule "src/modules/commands.so";
/* FOR *NIX, uncomment the following 2lines: */
//loadmodule "src/modules/commands.so";
//loadmodule "src/modules/cloak.so";
/* FOR Windows, uncomment the following 2 lines: */
//loadmodule "modules/commands.dll";
//loadmodule "modules/cloak.dll";
/*
* You can also include other configuration files.
@@ -65,7 +72,8 @@ me
/*
* NEW: admin {}
* OLD: A:Line Admin gives information on the server admin. you
* OLD: A:Line
* Admin gives information on the server admin. you
* may put as many lines under admin { as you wish.
* Syntax is as follows:
* admin {
@@ -180,39 +188,10 @@ allow channel {
* };
*/
/* OLD OPER FLAG | NEW FLAG NAME
O global
o local
a services-admin
A admin
r can_rehash
D can_die
R can_restart
h helpop
w can_wallops
g can_globops
c can_localroute
L can_globalroute
k can_localkill
K can_globalkill
b can_kline
Z can_gzline
t can_gkline
B can_unkline
n can_localnotice
G can_globalnotice
N netadmin
C coadmin
z can_zline
W get_umodew
H get_host
v can_override
*/
/*
Note: netadmin gives you OaAN
admin and services-admin give you o as well
*/
/* For a list of oper flags, see doc/unreal32docs.html#operblock
* [HIGHLY recommended to read]
*/
oper bobsmith {
class clients;
@@ -223,9 +202,13 @@ oper bobsmith {
flags
{
netadmin;
can_zline;
can_gzline;
can_gkline;
global;
};
};
/*
* NEW: listen {}
* OLD: P:Line
@@ -277,6 +260,14 @@ listen *:6697
listen *:8067;
listen *:6667;
/* NOTE: If you are on an IRCd shell with multiple IP's you are
* likely to get 'Address already in use' errors in your log
* and the ircd won't start. This means you MUST bind
* to a specific IP instead of '*', so for example:
* listen 1.2.3.4:6667;
* Obviously, replace the IP with the IP that was assigned to you.
*/
/*
* NEW: link {}
* OLD: C/N:Lines
@@ -327,9 +318,7 @@ link hub.mynet.com
password-receive "LiNk";
class servers;
options {
/* Note: You should not use autoconnect when linking
* services
*/
/* Note: You should not use autoconnect when linking services */
autoconnect;
ssl;
zip;
@@ -374,8 +363,6 @@ drpass {
*
* FLAGS: errors, kills, tkl, connects, server-connects, kline, oper
*
* NOTICE: Right now, SEGV messages are *always* sent to ircd.log. codemastr is
* working on a way to redirect the messages to this log file. *
* Syntax:
* log "log file"
* {
@@ -399,6 +386,10 @@ log "ircd.log" {
server-connects;
kills;
errors;
sadmin-commands;
chg-commands;
oper-override;
spamfilter;
};
};
@@ -410,7 +401,7 @@ log "ircd.log" {
*
* Syntax:
* alias "name" {
* nick "points to";
* target "points to";
* type aliastype;
* };
*
@@ -419,14 +410,14 @@ log "ircd.log" {
// This points the command /nickserv to the user NickServ who is connected to the set::services-server server
/*alias NickServ {
nick "NickServ";
target "NickServ";
type services;
};*/
// If you want the command to point to the same nick as the command, you can leave the nick entry out
//alias ChanServ { type services; };
// Points the /statserv command to the user StatServ on the set::stats-name server
// Points the /statserv command to the user StatServ on the set::stats-server server
//alias StatServ { type stats; };
// Points the /superbot command to the user SuperBot
@@ -448,7 +439,7 @@ alias StatServ { type stats; };
* Syntax:
* alias "name" {
* format "format string" {
* nick "points to";
* target "points to";
* type aliastype;
* parameters "parameters to send";
* };
@@ -461,12 +452,12 @@ alias StatServ { type stats; };
/*
alias "identify" {
format "^#" {
nick "chanserv";
target "chanserv";
type services;
parameters "IDENTIFY %1-";
};
format "^[^#]" {
nick "nickserv";
target "nickserv";
type services;
parameters "IDENTIFY %1-";
};
@@ -481,18 +472,19 @@ alias "identify" {
/* The alias::format::parameters is similar to scripting languages. %N (where N is a number) represents a
* parameter sent to the command (in this case /identify). If you specify %N- it means all parameters from
* N until the last parameter in the string.
* N until the last parameter in the string. You may also specify %n which is replaced by
* the user's nickname.
*/
/* Standard aliases */
alias "services" {
format "^#" {
nick "chanserv";
target "chanserv";
type services;
parameters "%1-";
};
format "^[^#]" {
nick "nickserv";
target "nickserv";
type services;
parameters "%1-";
};
@@ -501,12 +493,12 @@ alias "services" {
alias "identify" {
format "^#" {
nick "chanserv";
target "chanserv";
type services;
parameters "IDENTIFY %1-";
};
format "^[^#]" {
nick "nickserv";
target "nickserv";
type services;
parameters "IDENTIFY %1-";
};
@@ -533,6 +525,11 @@ tld {
rules "ircd.rules.fr";
};
/* note: you can just delete the example block above,
* in which case the defaults motd/rules files (ircd.motd, ircd.rules)
* will be used for everyone.
*/
/*
* NEW: ban nick {}
* OLD: Q:Line
@@ -696,14 +693,16 @@ set {
help-channel "#ROXnet";
hiddenhost-prefix "rox";
/* prefix-quit "no"; */
/* Your cloak keys should be 3 random numbers between 10000 and 2147483646
* and should be the same at all servers on the network.
/* Cloak keys should be the same at all servers on the network.
* They are used for generating masked hosts and should be kept secret.
* The keys should be 3 random strings of 5-100 characters
* (10-20 chars is just fine) and must consist of lowcase (a-z),
* upcase (A-Z) and digits (0-9) [see first key example].
*/
cloak-keys {
9666;
3333;
3330;
"aoAr1HnR6gl3sJ7hVz4Zb7x4YwpW";
"and another one";
"and another one";
};
/* on-oper host */
hosts {
+789
View File
@@ -0,0 +1,789 @@
/*
* example.conf von Daniel Hawton AKA Osiris (osiris@unrealircd.org).
* $Id$
*
* Arbeitet mit Unreal3.2 und darüber
*
* Dies hier ist die neue example.conf. Sie ähnelt irgendwie ein wenig C++ und sie
* soll sie jedenfalls einmal erläutert werden. Es ist ein wenig schwer, erstmals
* damit umzugehen, aber mit ein Wenig Übung und sorgfältigem Lesen sollte das zu
* verstehen sein.
*
* Diese Datei ist einfach in das Hauptverzeichnis des UnrealIRCD zu kopieren und in
* 'unrealircd.conf' umzubenennen.
*
* ZU BEACHTEN: Sämtliche Zeilen außer der mit einer '{' zu Beginn werden mit dem Zeichen
* ';' beendet, auch die Zeile mit '}'. (Beliebter Syntaxfehler!)
* Kommentar Zeilen werden vom IRCd ignoriert.
*
* BITTE LESE die doc/unreal32docs.html! Sie ist auch online erhältlich bei:
* www.vulnscan.org/UnrealIrcd/unreal32docs.html
* Diese Datei enthält zahlreiche ergänzende Informationen über jeden Block, Variablen usw.
* Übersetzung durch stylus740@smart-irc.de (bei irc.smart-irc.net)/
/* Kommentar Typen */
#Kommentar Typ 1 (Shell Typ)
// Kommentar Typ 2(C++ Stil)
/* Kommentar Typ 3 (C Stil) */
#Solche Zeilen vom Typ 1, 2 oder 3 werden vom ircd ignoriert.
/*
* UnrealIRCd arbeitet mit Modulen, die geladen werden, wenn sie benötigt werden.
* Man benötigt mindestens das commands Modul und ein cloaking Modul.
*/
/* FÜR *NIX (Unix, Linux, Xenix etc.), sind diese 2 Zeilen auszukommentieren: */
//loadmodule "src/modules/commands.so";
//loadmodule "src/modules/cloak.so";
/* FÜR Windows sind diese 2 Zeilen auszukommentieren: */
//loadmodule "modules/commands.dll";
//loadmodule "modules/cloak.dll";
/*
* Man kann über eine 'include' Anweisung auch weitere Konfigurationsdateien einfügen.
* help.conf enthält sämtliche /helpop Texte. Die badwords.*.conf filtert alle badword
* Einträge für den Modus +G...
* Die spamfilter.conf enthält einige wirksame Regeln für aktuelle Trojaner.
* Falls man diese Dateien mit einfügen möchte:
*/
include "help.conf";
include "badwords.channel.conf";
include "badwords.message.conf";
include "badwords.quit.conf";
include "spamfilter.conf";
/*
* NEU: me {}
* ALT: M:Line
* me {} legt Name, Beschreibung und eindeutige Nummer ('numeric') für diesen Server fest.
* Syntax ist wie folgt:
* me {
* name "server.name";
* info "Server Beschreibung";
* numeric (server numeric*);
* };
* Falls der Server mit anderen gelinkt wird, darf muss die Nummer bei 'numeric' eindeutig
* sein, darf also von keinem anderen Server im Netzwerk verwendet werden.
*/
me
{
name "irc.foonet.com";
info "FooNet Server";
numeric 1;
};
/*
* NEU: admin {}
* ALT: A:Line
* Admin liefert Informationen über den Server Administrator. Man kann
* so viele Zeilen unter 'admin {' angeben, wie man will.
* Syntax ist wie folgt:
* admin {
* "erste Zeile";
* "zweite Zeile";
* [usw]
* };
*/
admin {
"Bob Smith";
"bob";
"widely@used.name";
};
/*
* NEU: class {}
* ALT: Y:line (alte Form war verwirrend)
* Hiermit werden Klassen und ihre Einstellungen festgelegt. Eine Klasse ist eine Gruppen
* Einstellung für Verbindungen. So kann man beispielsweise Server Verbindungen in einer
* eigenen Klasse behandeln, statt zusammen mit Clients.
* Syntax ist wie folgt:
* class (class name)
* {
* pingfreq (wie oft in Sekunden wird ein user/server angepingt);
* maxclients (wie viele Verbindungen sind in dieser Klasse möglich);
* sendq (maximale send Queue einer Verbindung);
* recvq (maximale Empfangs Queue einer Verbindung [Flood Kontrolle!]);
* };
*/
class clients
{
pingfreq 90;
maxclients 500;
sendq 100000;
recvq 8000;
};
class servers
{
pingfreq 90;
maxclients 10; /* Wieviele Servers können gleichzeitig gelinkt sein */
sendq 1000000;
connfreq 100; /* Wieviele Sekunden zwischen jedem Verbindungsversuch */
};
/*
* NEU: allow {}
* ALT: I:Line
* Hier wird festgelegt, welche Verbindungen erlaubt sind...
* Grundlegend kann man damit Clienten erlauben, zu verbinden und hat etwas Kontrolle
* Syntax ist wie folgt:
* allow {
* ip (ip Maske für allow);
* hostname (host Maske);
* class (Klasse, die zugewiesen wird [siehe class {}]);
* password "(password)"; (optional)
* maxperip (wie viele Verbindungen je IP); (optional)
* };
*/
allow {
ip *@*;
hostname *@*;
class clients;
maxperip 5;
};
/* Passworded allow line */
allow {
ip *@255.255.255.255;
hostname *@*.passworded.ugly.people;
class clients;
password "f00Ness";
maxperip 1;
};
/*
* NEU: allow channel {}
* ALT: chrestrict
* Erlaubt es Usern, einen Channel zu betreten...
* Ist wie eine Ausnahme von 'deny channel'.
* Syntax ist wie folgt:
* allow channel {
* channel "channel name";
* };
*/
allow channel {
channel "#WarezSucks";
};
/*
* NEU: oper {}
* ALT: O:Line
* Legt einen IRC Operator fest
* IRC Operatoren halten den Server in Ordnung, warten ihn und halten die Verbindung
* zum Netzwerk.
* Syntax ist wie folgt:
* oper (login) {
* class (Klasse, die zugewiesen wird, falls anders als meine, wird eine neuee Klasse
* zugewiesen);
* from {
* userhost (ident@host);
* userhost (ident@host);
* };
* flags
* {
* (Flags hier*);
* };
* ODER
* flags "alte Form von Flags, wie OAaRD";
* };
*/
/* Die Liste möglicher Oper Flags kann in doc/unreal32docs.html#operblock nachgelesen werden
* [WIRKLICH empfehlenswert, zu lesen!]
*/
oper bobsmith {
class clients;
from {
userhost bob@smithco.com;
};
password "f00";
flags
{
netadmin;
can_zline;
can_gzline;
can_gkline;
global;
};
};
/*
* NEU: listen {}
* ALT: P:Line
* Legt den Port fest, an dem der ircd 'lauscht', um Usern/Servern zu erlauben, eine
* Verbindung zum Server aufzunehmen.
* Syntax ist wie folgt:
* listen (ip number):(port number)
* {
* options {
* (options here);
* };
* };
* oder für ein einfaches listen:
* listen (ip):(port);
*
* ACHTUNG: für ipv6 ips (3ffe:b80:2:51d::2 etc), benutze listen [ip]:port;
*
* Das funktioniert ebenfalls.
*/
/* Options for listen:
OLD | NEW
S serversonly
C clientsonly
J java
s ssl
* standard
*/
/* ZU BEACHTEN BEI SSL PORTS: SSL Ports sind nicht standardisiert.
* Es wird oft gesagt, man solle den Port 994 benutzen, weil dies der
* offizielle SSL Port sei. Aber das erfordert root Rechte! Andererseits
* ist der Port 194 der offizielle Port und wann hat man je einen Ircd
* auf diesem Port laufen gesehen?
* Unsere Empfehlung ist, den Port 6697 für SSL zu benutzen, wie es auch
* bei vielen anderen Netzwerken gemacht wird und für z.B. StunTour benutzt wird.
* Man kann so viele SSL Ports öffnen, wie man will, aber wenn man (auch) den Port
* 6697 benutzt, hilft man mit, die Welt ein klein wenig zu standardisieren ;).
*/
listen *:6697
{
options
{
ssl;
clientsonly;
};
};
listen *:8067;
listen *:6667;
/* ACHTUNG: Wird der IRCd auf einer Shell mit verschiedenen IP's ausgeführt, kann
* die Fehlermeldung 'Address already in use' ('Adresse wird schon benutzt')
* in den Logfiles auftauchen und der IRCd startet nicht.
* Das bedeutet, dass man eine spezifische Adresse anstelle von '*' definieren
* MUSS, wie z.B.:
* listen 1.2.3.4:6667;
* Es sollte klar sein, dass die IP durch die zu ersetzen ist, die einem
* zugewiesen ist.
*/
/*
* NEU: link {}
* ALT: C/N:Lines
* Hiermit wird ein okay für eine Server Verbindung festgelegt.
* ACHTUNG: BEIDE SERVER MÜSSEN EINE LINK {} EINSTELLUNG HABEN, UM KORREKT ZU VERBINDEN!
* Syntax ist wie folgt:
* link (server name)
* {
* username (username, * funktioniert auch);
* hostname (ip Nummer/Hostmaske);
* bind-ip (Welche IP soll zum Verbinden benutzt werden, oder *);
* port (Port, zu dem verbunden werden soll);
* hub (Wenn dies ein Hub ist, funktioniert * , oder Servermasken);
* [oder leaf *;]
* password-connect "(Passwort zu senden)";
* password-receive "(Passwort, welches wir emfangen sollten)";
* class (Klasse, in die Server sollen);
* options {
* (options hier*);
* };
* /* Wird SSL benutzt, kann bestimmt werden, welche Verschlüsselung im SSL
* * Modus zu benutzen ist
* * Bei mehreren "openssl ciphers" sind die einzelnen Verschlüsselungen
* * durch ':' zu trennen
* */
* ciphers "DES-CBC3-MD5";
*
* };
*/
/*
options:
OLD | NEW
S ssl
Z zip
N/A autoconnect
N/A quarantine
N/A nodnscache
*/
link hub.mynet.com
{
username *;
hostname 1.2.3.4;
bind-ip *;
port 7029;
hub *;
password-connect "LiNk";
password-receive "LiNk";
class servers;
options {
/* Achtung: autoconnect sollte nicht benutzt werden, wenn man Services linkt */
autoconnect;
ssl;
zip;
};
};
/*
*
* NEU: ulines {}
* ALT: U:Line
* U-lines geben Servern mehr Möglichkeiten/Befehle, sie sollten NUR für Services/Stats
* gesetzt werden und NIEMALS für normale UnrealIRCd Server!
* Syntax ist wie folgt:
* ulines {
* (server to uline);
* (server to uline);
* [etc]
* };
*/
ulines {
services.roxnet.org;
stats.roxnet.org;
};
/*
* NEU: drpass {}
* ALT: X:Line
* Hiermit werden die Passworte für /die und /restart festgelegt.
* Syntax ist wie folgt:
* drpass {
* restart "(Passwort für Restart)";
* die "(Passwort für die (die = 'sterben' = Abschaltung))";
* };
*/
drpass {
restart "I-love-to-restart";
die "die-you-stupid";
};
/*
* NEU: log {} ALT: N/A Festlegung von Namen und Speicherort der Logfiles. Man kann
* beliebig viele festlegen.
*
* FLAGS: errors, kills, tkl, connects, server-connects, kline, oper
*
* Syntax:
* log "log file"
* {
* flags
* {
* flag;
* flag;
* etc..
* };
* };
*/
log "ircd.log" {
/* Lösche das Logfile und starte ein neues, wenn 2MB erreicht wurden,
nichts festlegen, wenn man immer das gleiche Log will */
maxsize 2097152;
flags {
oper;
kline;
connects;
server-connects;
kills;
errors;
sadmin-commands;
chg-commands;
oper-override;
spamfilter;
};
};
/*
* NEU: alias {}
* ALT: N/A
* Hier kann man Befels Aliasse festlegen, wie z.B. /nickserv, /chanserv usw.
* FLAGS: services, stats, normal
*
* Syntax:
* alias "name" {
* target "points to";
* type aliastype;
* };
*
* [ACHTUNG: Mann kann hier auch eine Datei mit vordefinierten Aliassen per include
* einfügen. Siehe auch: doc/unreal32docs.html Abschnitt 2.9]
*/
// Hiermit wird der Befehl /nickserv an den User NickServ geleitet, welcher zur Einstellung set::services-server server verbunden ist
/*alias NickServ {
target "NickServ";
type services;
};*/
// Soll der Befehl auf denselben Nick wie das der Befehl leiten, kann man den Nick auslassen
//alias ChanServ { type services; };
// leitet den /statserv Befehl an den User StatServ aus set::stats-server server
//alias StatServ { type stats; };
// leitet den /superbot Befehl an den User SuperBot
//alias SuperBot { type normal; };
/* Standard Aliasse */
alias NickServ { type services; };
alias ChanServ { type services; };
alias OperServ { type services; };
alias HelpServ { type services; };
alias StatServ { type stats; };
/*
* NEU: alias {}
* ALT: N/A
* Hier können Befehls Aliase, wie z.B.: /identify, /services, usw festgelegt werden.
*
* Syntax:
* alias "name" {
* format "format string" {
* target "zeigt auf";
* type aliastype;
* parameters "zu sendende Parameter";
* };
* type command;
* };
*/
/* Die nachfolgenden Zeilen eigens deshalb, um zu zeigen, dass trotz gleichem Namens die vorherige Anweisung
* völlig unterschiedlich in der Syntax ist, obwohl eine ähnliche Funktion unterstützt wird.
*/
/*
alias "identify" {
format "^#" {
target "chanserv";
type services;
parameters "IDENTIFY %1-";
};
format "^[^#]" {
target "nickserv";
type services;
parameters "IDENTIFY %1-";
};
type command;
};
*/
/* Die alias::format Anweisung ist ein regulärer Ausdruck. Das erste Format passt auf den /identify Befehl,
* wenn das erste Zeichen ein # ist. Dann wird dies an den chanserv alias mit dem Parameters IDENTIFY
* %1- übergeben. Das zweite Format passt auf den /identify Befehl, wenn das erste Zeichen kein # ist. Danach
* wird der Befehl an den nickserv alias mit den Parameters IDENTIFY %1- geleitet.
*/
/* Die alias::format::parameters Scripting Sprachen ähnlich. %N (wobei N einen Nummer ist) repräsentiert einen
* Parameter, der an den Befehl (in diesem Fall /identify) zu senden ist. Wird %N- angegeben, bedeutet dies
* alle Parameter vom N bis zum letzten Parameter des Strings. Man kann ebenso %n angeben, welches durch den
* Nicknamen des users ersetzt wird.
*/
/* Standard Aliasse */
alias "services" {
format "^#" {
target "chanserv";
type services;
parameters "%1-";
};
format "^[^#]" {
target "nickserv";
type services;
parameters "%1-";
};
type command;
};
alias "identify" {
format "^#" {
target "chanserv";
type services;
parameters "IDENTIFY %1-";
};
format "^[^#]" {
target "nickserv";
type services;
parameters "IDENTIFY %1-";
};
type command;
};
/*
* NEU: tld {}
* ALT: T:Line
* Hiermit werden unterschiedliche motd und rules Dateien in Abhängigkeit
* von der Hostmaske des Clients eingestellt.
* Syntax ist wie folgt:
* tld {
* mask (ident@host);
* motd "(motd file)";
* rules "(rules file)";
* };
*/
tld {
mask *@*.fr;
motd "ircd.motd.fr";
rules "ircd.rules.fr";
};
/* zu beachten: Will man nur die default motd/rules Dateien (ircd.motd, ircd.rules)
* für jedermann benutzen, genügt es, den obigen Beispiel Block einfach zu löschen.
*/
/*
* NEU: ban nick {}
* ALT: Q:Line
* Bannt einen Nicknamen, so dass dieser nicht benutzt werden kann.
* Syntax ist wie folgt:
* ban nick {
* mask "(nick to ban)";
* reason "(reason)";
* };
*/
ban nick {
mask "*C*h*a*n*S*e*r*v*";
reason "Reserviert für Services";
};
/*
* NEU: ban ip {}
* ALT: Z:Line
* Bannt eine IP, so dass diese nicht mehr zum Netzwerk verbinden kann.
* Syntax:
* ban ip { mask (ip Nummer/Hostmaske); reason "(Grund)"; };
*/
ban ip {
mask 195.86.232.81;
reason "Server nicht mehr gelinkt";
};
/*
* NEU: ban server {}
* ALT: Server Q:Line
* Nimmt einem Server die Möglichkeit, zum Neztwerk zu verbinden.
* Wenn der Server zu einem anderen Server des Netzwerkes linkt, wird der
* lokale server die Verbindung zum Netzwerk trennen.
* Syntax ist wie folgt:
* ban server {
* mask "(Server Name)";
* reason "(angegebener Grund)";
* };
*/
ban server {
mask eris.berkeley.edu;
reason "Hau ab hier.";
};
/*
* NEU: ban user {}
* ALT: K:Line
* Bewirkt, dass ein User mit einer bestimmten Maske nicht mehr zum Server verbinden kann.
* Syntax:
* ban user { mask (Hostmaske/ip Nummer); reason "(Grund)"; };
*/
ban user {
mask *tirc@*.saturn.bbn.com;
reason "Idiot";
};
/*
* NEU: ban realname {}
* ALT: n:Line
* Verhindert, dass ein bestimmter Realname benutzt werden kann.
* Syntax:
* ban realname {
* mask "(Realname)";
* reason "(Grund)";
* };
*/
ban realname {
mask "Swat Team";
reason "mIRKFORCE";
};
ban realname {
mask "sub7server";
reason "sub7";
};
/*
* Sämtliche Banns dürfen durch zusätzliche Einträge wiederholt werden!
*
* NEU: except ban {}
* ALT: E:Line
* Diese Maske ist von Banns ausgenommen.
* Syntax:
* except ban { mask (ident@host); };
* except ban {} kann so oft angegeben werden, wie man für verschiedene Hosts will.
*/
except ban {
/* don't ban stskeeps */
mask *stskeeps@212.*;
};
/*
* NEU: deny dcc {}
* ALT: dccdeny.conf
* Mit diesem Block können dcc send's geblockt werden... Gut, um Virten aufzuhalten.
* Syntax:
* deny dcc
* {
* filename "zu sperrende Datei(ie, *exe)";
* reason "Grund";
* };
*/
deny dcc {
filename "*sub7*";
reason "Möglicherweise Sub7 Virus";
};
/*
* NEU: deny channel {}
* ALT: N/A (NEW)
* Verhindert, dass angegebene Channels benutzt werden können.
* Syntax:
* deny channel {
* channel "(channel)";
* reason "Grund";
* };
*/
deny channel {
channel "*warez*";
reason "Warez sind illegal";
};
/*
* NEU: vhost {}
* ALT: Vhost.conf file
* Setzt eine Fake IP für Nicht-Opers, oder opers, die zu bequem für /sethost sind.... :P
* Syntax:
* vhost {
* vhost (vhost.com);
* from {
* userhost (ident@host um die Nutzung zu gestatten);
* };
* login (Loginname);
* password (Passwort);
* };
* um den vhost zu nutzen, mache /vhost (login) (password) im IRC
*/
vhost {
vhost i.hate.microsefrs.com;
from {
userhost *@*.image.dk;
};
login stskeeps;
password moocowsrulemyworld;
};
/* Man kann hier weitere Config Dateien einfügen */
/* include "klines.conf"; */
/* Network configuration */
set {
network-name "ROXnet";
default-server "irc.roxnet.org";
services-server "services.roxnet.org";
stats-server "stats.roxnet.org";
help-channel "#ROXnet";
hiddenhost-prefix "rox";
/* prefix-quit "no"; */
/* Cloak keys müssen angegeben sein und sie müssen die selben auf allen Servern
* im Netzwerk sein. Sie werden zur Generierung der maskierten Hosts verwendet
* und sie sollten geheim gehalten werden.
* Die Keys sollten 3 zufällige Strings von 5-100 Zeichen Länge sein (10-20 Zeichen
* (sind ganz ok) und müssen aus Kleinbuchstaben(a-z), Großbuchstaben (A-Z) und
* Ziffern (0-9) bestehen [wie im ersten Key Beispiel].
*/
cloak-keys {
"aoAr1HnR6gl3sJ7hVz4Zb7x4YwpW";
"und noch einer";
"und noch einer";
};
/* on-oper Host */
hosts {
local "locop.roxnet.org";
global "ircop.roxnet.org";
coadmin "coadmin.roxnet.org";
admin "admin.roxnet.org";
servicesadmin "csops.roxnet.org";
netadmin "netadmin.roxnet.org";
host-on-oper-up "no";
};
};
/* Server spezifische Configuration */
set {
kline-address "setze.diese.email";
modes-on-connect "+ixw";
modes-on-oper "+xwgs";
oper-auto-join "#opers";
dns {
nameserver 127.0.0.1;
timeout 2s;
retries 2;
};
options {
hide-ulines;
/* Man kann hier ident checking aktivieren, wenn man will */
/* identd-check; */
show-connect-info;
};
maxchannelsperuser 10;
/* Die Mindestzeit, die ein User verbunden sein muss, bevor er eine QUIT Meldung
* senden darf (Das wird offentlich helfen, Spam zu verhindern */
anti-spam-quit-message-time 10s;
/* Macht die Meldung statisch, die in allen Quit Meldungen angezeigt wird.
Somit sind keine individuellen Quts auf dem lokalen Server mehr erlaubt */
/* static-quit "Client quit"; */
/* Man kann auch sämtliche Part Meldungen blocken, indem man dies auskommentiert
* und 'yes' sagt oder einen anderen Text angibt (z.B. "Bye bye!")
/* static-part yes; */
/* Hiermit kann man bestimmte stats auf ausschliesslich Opers beschränken. Für
* alle Stats kann man * benutzen. Wenn man es weglässt, können alle User alle
* Stats abfragen. Eine vollständige Liste erhält man mit dem Befehl '/stats'.
* Manche Admins entfernen 'kGs' und erlauben so normalen Usern die Anzeige von
* klines, glines and shuns.
*/
oper-only-stats "okfGsMRUEelLCXzdD";
/* Throttling: Dieses Beispiel setzte ein Limit von 3 Verbindungen je 60s (pro Host). */
throttle {
connections 3;
period 60s;
};
/* Anti Flood Schutz */
anti-flood {
nick-flood 3:60; /* 3 Nickänderungen pro 60 Sekunden (Default) */
};
/* Spam Filter */
spamfilter {
ban-time 1d; /* Default Dauer eines *line Banns durch Spamfilter */
ban-reason "Spam/Belästigung"; /* default Grund */
virus-help-channel "#help"; /* Channel, der für die 'viruschan' action benutzt wird*/
/* except "#help"; Channel, der von Filtern ausgenommen wird */
};
};
/*
* Probleme? Weitere Hilfe nötig?
* 1) www.vulnscan.org/UnrealIrcd/unreal32docs.html
* 2) www.vulnscan.org/UnrealIrcd/faq/ <- enthält 80% deiner Fragen - Wetten Dass?
* 3) Hat man dann noch Probleme, kann man den Chat bei irc.ircsystems.net
* #unreal-support aufsuchen. Dabei ist zu beachten, dass wir voraussetzen,
* dass zuvor DIE DOKU GELESEN WURDE (genauso, wie die FAQ!)!
*/
+793
View File
@@ -0,0 +1,793 @@
/*
* example.conf par Daniel Hawton AKA Osiris (osiris@unrealircd.org).
* $Id$
* Traduction française par babass (babass@unrealircd.org).
*
* Fonctionne pour Unreal3.2 et supérieur
*
* Okay les mecs. Voici la nouvelle version de l'example.conf. Cela ressemble plus à du C++.
* Peu importe, il est temps de se lancer. Il est difficile de l'attaquer pour la première fois, mais
* avec un peu d'expérience et en lisant vous comprendrez.
*
* Copiez juste ce fichier dans votre répertoire unrealircd principal et appellez le 'unrealircd.conf'.
*
* NOTE: Toutes les lignes, excepté la ligne d'ouverture { , les lignes finissant par un ;,
* et celle de fermeture } incluses.
* L'IRCd ignorera les lignes commentées.
*
* LISEZ S'IL VOUS PLAIT doc/unreal32docs.fr.html! La version en ligne est aussi disponible à :
* www.vulnscan.org/UnrealIrcd/unreal32docs.fr.html
* Elle contient beaucoup d'informations à propos du fichier de configuration : fournis des informations
* à propos de chaque blocs, variable, etc..
*/
/* Type de commentaires */
#Commentaire type 1 (type Shell)
// Commentaire type 2 (style C++)
/* Commentaire type 3 (style C) */
#Ces lignes sont ignorées par l'ircd.
/*
* UnrealIRCd supportes des modules, en charger certains est requis.
* Vous aurez besoin au moins du module commands et du module cloaking.
*/
/* POUR *NIX, décommentez les 2 lignes suivantes : */
//loadmodule "src/modules/commands.so";
//loadmodule "src/modules/cloak.so";
/* POUR Windows, décommentez les 2 lignes suivantes : */
//loadmodule "modules/commands.dll";
//loadmodule "modules/cloak.dll";
/*
* Vous pouvez également inclure d'autres fichiers de configuration.
* help.conf contient tous le texte de /helpop. Les fichiers badwords.*.conf
* contiennent tous les badwords pour le mode +G...
* spamfilter.conf contient quelques bonnes règles pour les trojans courrants.
* Vous voudrez probablement les inclure:
*/
include "help.conf";
include "badwords.channel.conf";
include "badwords.message.conf";
include "badwords.quit.conf";
include "spamfilter.conf";
/*
* ACTUEL : me {}
* ANCIEN : M:Line
* me {} definit le nom, la description et le numeric du serveur unreal
* pour ce serveur. La syntaxe est la suivante :
* me {
* name "nom.du.serveur";
* info "Description du Serveur";
* numeric (numeric* serveur);
* };
* En cas de link, ce numeric ne peut être utilisé pour aucun autre serveur du réseau.
*/
me
{
name "irc.foonet.com";
info "FooNet Server";
numeric 1;
};
/*
* ACTUEL : admin {}
* ANCIEN : A:Line
* Admin donne des informations sur les server admins.
* Vous pouvez mettre autant de lignes que vous voulez après admin {.
* La syntaxe est la suivante :
* admin {
* "première ligne";
* "deuxième ligne";
* [etc]
* };
*/
admin {
"Bob Smith";
"bob";
"widely@used.name";
};
/*
* ACTUEL : class {}
* ANCIEN : Y:line (l'ancien était déroutant)
* Défini les réglages pour les classes. Une classe est un groupe de réglages pour
* des connexions. Par exemple, les connexions serveurs, au lieu de passer par une classe
* client, vous utilisez directement une classe serveur. La syntaxe est la suivante :
* class (nom de la classe)
* {
* pingfreq (fréquence des pings utilisateurs/serveurs en secondes);
* maxclients (combien de connexions pour cette classe);
* sendq (file d'attente maximum pour l'envoie depuis une connexion);
* recvq (file d'attente maximum pour la réception depuis une connexion [contrôle du flood]);
* };
*/
class clients
{
pingfreq 90;
maxclients 500;
sendq 100000;
recvq 8000;
};
class servers
{
pingfreq 90;
maxclients 10; /* Nombre maximum de serveurs pouvant être reliés en même temps */
sendq 1000000;
connfreq 100; /* Combien de secondes entre chaque tentatives de connexions */
};
/*
* ACTUEL : allow {}
* ANCIEN : I:Line
* Défini les autorisations de connexions...
* Principalement pour les clients, cela leur permet de se connecter, vous pouvez donc avoir un certain
* contrôle et/ou mettre un mot de passe.
* La syntaxe est la suivante :
* allow {
* ip (ip mask à autoriser);
* hostname (host mask);
* class (classe à laquelle les renvoyer [voir class {}]);
* password "(mot de passe)"; (optionnel)
* maxperip (nombre de connexions par ip); (optionnel)
* };
*/
allow {
ip *@*;
hostname *@*;
class clients;
maxperip 5;
};
/* connexion autorisée avec mot de passe */
allow {
ip *@255.255.255.255;
hostname *@*.passworded.ugly.people;
class clients;
password "f00Ness";
maxperip 1;
};
/*
* ACTUEL : allow channel {}
* ANCIEN : chrestrict
* Autorise un utilisateur à joindre un salon...
* comme une exception au deny channel.
* Syntaxe :
* allow channel {
* channel "nom du salon";
* };
*/
allow channel {
channel "#WarezSucks";
};
/*
* ACTUEL : oper {}
* ANCIEN : O:Line
* Défini un IRC Operateur
* Les IRC operateurs sont là pour préserver la qualité du serveur mais aussi d'en assurer
* la maintenance et sa connexion au réseau.
* La syntaxe est la suivante :
* oper (login) {
* class (classe à laquelle les associer, si différent de moi, déplacez les vers une
* nouvelle classe);
* from {
* userhost (ident@host);
* userhost (ident@host);
* };
* flags
* {
* (flags ici*);
* };
* OU
* flags "ancien type de flags, comme OAaRD";
* };
*/
/* Pour avoir la liste des flags oper, voir doc/unreal32docs.fr.html#operblock
* [lecture HAUTEMENT recommendée]
*/
oper bobsmith {
class clients;
from {
userhost bob@smithco.com;
};
password "f00";
flags
{
netadmin;
can_zline;
can_gzline;
can_gkline;
global;
};
};
/*
* ACTUEL : listen {}
* ANCIEN : P:Line
* Défini un port à rattacher à l'ircd, pour autoriser
* des utilisateurs/serveurs à se connecter au serveur.
* La syntaxe est la suivante :
* listen (ip):(port)
* {
* options {
* (options ici);
* };
* };
* ou pour une écoute
* indifférente : listen (ip):(port);
*
* NOTICE : pour les ips ipv6 (3ffe:b80:2:51d::2 etc), utilisez listen [ip]:port;
*
* Cela fonctionne également.
*/
/* Options de listen:
ANCIEN | ACTUEL
S serversonly
C clientsonly
J java
s ssl
* standard
*/
/* NOTE SUR LES PORTS SSL: les ports SSL sont plutôt non standardisés,
* A côté des nombreux ports high-SSL, certaines personnes disent que vous devez
* l'utiliser sur le port 994 car c'est le port SSL officiel.. mais cela
* requière d'être root! D'un autre coté, le port 194 est le port irc officiel et
* avez vous déjà vu un ircd fonctionner sur celui-ci ?
* Donc, notre suggestion est d'utiliser le port 6697 pour le SSL, ceci est utilisé par
* assez bien de réseaux et est reconnu par exemple par StunTour.
* Vous êtes libre d'ouvrir autant de ports SSL que vous le désirez mais
* en utilisant (au moins) 6697 vous aidez le monde à standardiser un peu a bit ;).
*/
listen *:6697
{
options
{
ssl;
clientsonly;
};
};
listen *:8067;
listen *:6667;
/* NOTE: Si vous êtes sur un shell shell avec de multiples IP's vous êtes
* susceptibles d'avoir l'erreur 'Address already in use' (adresse déjà utilisée)
* dans vos logs et l'ircd refusera de démarer.
* Cela signifie que vous devrez utiliser une IP spécifique au lieu de '*',
* Donc par exemple :
* listen 1.2.3.4:6667;
* Evidemment, remplacez l'IP par celle qui vous a été assignée.
*/
/*
* ACTUEL : link {}
* ANCIEN : C/N:Lines
* Défini un accord pour la connexion d'un serveur.
* NOTE : CHACUN DES SERVEURS NECESSITE UN PARAMETRE LINK {} POUR SE CONNECTER CORRECTEMENT !
* La syntaxe est la suivante :
* link (nom du serveur)
* {
* username (username, * fonctionne aussi);
* hostname (ip/hostmask);
* bind-ip (Quelle IP à laquelle se relier lors de la connexion, ou *);
* port (port auquel se connecter, si il y en a un);
* hub (Si c'est un a hub, * fonctionne, ou les servermasks qu'il doit porter);
* [ou leaf *;]
* password-connect "(mot de passe à envoyer)";
* password-receive "(mot de passe que l'on doit recevoir)";
* class (classe à affecter aux serveurs);
* options {
* (options ici*);
* };
* /* Si vous utilisez le SSL, vous pouvez choisir quel cryptage (cipher) utiliser dans le mode SSL
* * Retrouvez une liste "crytages openssl", séparez les cryptages par des :
* */
* ciphers "DES-CBC3-MD5";
*
* };
*/
/*
options:
ANCIEN | ACTUEL
S ssl
Z zip
N/A autoconnect
N/A quarantine
N/A nodnscache
*/
link hub.mynet.com
{
username *;
hostname 1.2.3.4;
bind-ip *;
port 7029;
hub *;
password-connect "LiNk";
password-receive "LiNk";
class servers;
options {
/* Note : Vous ne devriez pas utiliser autoconnect lorsque vous linkez des services */
autoconnect;
ssl;
zip;
};
};
/*
*
* ACTUEL : ulines {}
* ANCIEN : U:Line
* Les U-lines donnent aux serveurs plus de pouvoir/commandes, ceci doit UNIQUEMENT être appliqué
* aux serveurs de services/stats et JAMAIS pour des servuers UnrealIRCd normaux !
* La syntaxe est la suivante :
* ulines {
* (serveur auquel appliquer la uline);
* (serveur auquel appliquer la uline);
* [etc]
* };
*/
ulines {
services.roxnet.org;
stats.roxnet.org;
};
/*
* ACTUEL : drpass {}
* ANCIEN : X:Line
* Défini les mots de passe pour les commandes /die et /restart.
* La syntaxe est la suivante :
* drpass {
* restart "(mot de passe pour relancer)";
* die "(mot de passe pour arrêter)";
* };
*/
drpass {
restart "I-love-to-restart";
die "die-you-stupid";
};
/*
* ACTUEL : log {}
* ANCIEN : N/A
* Dit à l'ircd où et quoi loguer. Vous pouvez en avoir
* autant que vous le souhaitez.
*
* FLAGS : errors, kills, tkl, connects, server-connects, kline, oper
*
* Syntaxe :
* log "fichier de log"
* {
* flags
* {
* flag;
* flag;
* etc..
* };
* };
*/
log "ircd.log" {
/* Efface le fichier de log et commence un nouveau lorsqu'il dépasse 2MB,
retirez ceci pour toujour utiliser le même fichier de log */
maxsize 2097152;
flags {
oper;
kline;
connects;
server-connects;
kills;
errors;
sadmin-commands;
chg-commands;
oper-override;
spamfilter;
};
};
/*
* ACTUEL : alias {}
* ANCIEN : N/A
* Ceci vous permet de définir des alias pour les commandes telles que /nickserv, /chanserv etc
* FLAGS: services, stats, normal
*
* Syntaxe :
* alias "nom" {
* target "pointe vers";
* type typedalias;
* };
*
* [NOTE : Vous pouvez également inclure un fichier d'alias prédéfinis ici, voir
* doc/unreal32docs.fr.html section 2.9]
*/
// Ceci fait pointer la commande /nickserv vers l'utilisateur NickServ qui est connecté au serveur set::services-server
/*alias NickServ {
target "NickServ";
type services;
};*/
// Si vous voulez que la commande pointe vers le même nom que la commande, vous pouvez ignorez l'entré du nom
//alias ChanServ { type services; };
// Faire pointer la commande /statserv vers l'utilisateur StatServ sur le serveur set::stats-name
//alias StatServ { type stats; };
// Faire pointer la commande /superbot vers l'utilisateur SuperBot
//alias SuperBot { type normal; };
/* Alias Standards */
alias NickServ { type services; };
alias ChanServ { type services; };
alias OperServ { type services; };
alias HelpServ { type services; };
alias StatServ { type stats; };
/*
* ACTUEL : alias {}
* ANCIEN : N/A
* Ceci vous permet de définir des alias pour les commandes telles que /identify, /services, etc
*
* Syntaxe :
* alias "nom" {
* format "format string" {
* target "pointer vers";
* type typedalias;
* parameters "paramètres à envoyer";
* };
* type command;
* };
*/
/* Ceci est expliqué séparément car même si elle a le même nom que la directive précédente, elle est très
* différente dans sa syntaxe, bien que elle a une fonction similaire et dépend des alias standards pour
* fonctionner.
*/
/*
alias "identify" {
format "^#" {
target "chanserv";
type services;
parameters "IDENTIFY %1-";
};
format "^[^#]" {
target "nickserv";
type services;
parameters "IDENTIFY %1-";
};
type command;
};
*/
/* La direcitive alias::format est une expression régulière. Le premier format correspond à la commande
* /identify command lorsque le premier caractère est un #. Cela renvois donc à l'alias chanserv avec
* les paramètres IDENTIFY %1-. Le second format correspond à la commanden /identify lorsque le premier
* caractère n'est pas un #. Cela envoies alors la commande à l'alias nickserv avec les paramètres
* IDENTIFY %1-.
*/
/* L'alias::format::parameters est similaire aux languages de programmation. %N (où N est un nombre)
* représente un paramètre envoyé à la commande (dans ce cas /identify). Si vous spécifiez %N- cela
* signifie que tous les paramètres depuis N jusqu'au dernier paramètre dans la chaîne de caractères.
* Vous pouvez également spécifier %n qui est remplacé par le pseudo de l'utilisateur.
*/
/* Alias Standards */
alias "services" {
format "^#" {
target "chanserv";
type services;
parameters "%1-";
};
format "^[^#]" {
target "nickserv";
type services;
parameters "%1-";
};
type command;
};
alias "identify" {
format "^#" {
target "chanserv";
type services;
parameters "IDENTIFY %1-";
};
format "^[^#]" {
target "nickserv";
type services;
parameters "IDENTIFY %1-";
};
type command;
};
/*
* ACTUEL : tld {}
* ANCIEN : T:Line
* Ceci applique une motd et des fichiers de règles différents
* en fonction de l'hostmask des clients.
* La syntaxe est la suivante :
* tld {
* mask (ident@host);
* motd "(motd file)";
* rules "(rules file)";
* };
*/
tld {
mask *@*.fr;
motd "ircd.motd.fr";
rules "ircd.rules.fr";
};
/* note : vous pouvez juste effacer le bloc d'exemple ci-dessus,
* en quel cas les fichiers motd/règles par défaut (ircd.motd, ircd.rules)
* seront utilisés pour tout le monde.
*/
/*
* ACTUEL : ban nick {}
* ANCIEN : Q:Line
* Banni un pseudo, il ne peut donc être utilisé.
* La syntaxe est la suivante :
* ban nick {
* mask "(pseudo à bannir)";
* reason "(raison)";
* };
*/
ban nick {
mask "*C*h*a*n*S*e*r*v*";
reason "Reservé aux Services";
};
/*
* ACTUEL : ban ip {}
* ANCIEN : Z:Line
* Empêche une ip de se connecter au réseau.
* Syntaxe :
* ban ip { mask (ip/hostmask); reason "(raison)"; };
*/
ban ip {
mask 195.86.232.81;
reason "Serveur délinké";
};
/*
* ACTUEL : ban server {}
* ANCIEN : Server Q:Line
* Empêche un serveur de se connecter au réseau.
* Si le serveur est linké à un serveur distant, le serveur local
* sera déconnecté du réseau.
* La syntaxe est la suivante :
* ban server {
* mask "(nom du serveur)";
* reason "(raison à donner)";
* };
*/
ban server {
mask eris.berkeley.edu;
reason "Va-t-en d'ici.";
};
/*
* ACTUEL : ban user {}
* ANCIEN : K:Line
* Fait qu'un utilisateur avec un certain masque ne peut se connecter
* à votre serveur.
* Syntaxe :
* ban user { mask (hostmask/ip); reason "(raison)"; };
*/
ban user {
mask *tirc@*.saturn.bbn.com;
reason "Idiot";
};
/*
* ACTUEL : ban realname {}
* ANCIEN : n:Line
* Ceci empêche un certain realname d'être utilisé.
* Syntaxe :
* ban realname {
* mask "(realname)";
* reason "(raison)";
* };
*/
ban realname {
mask "Swat Team";
reason "mIRKFORCE";
};
ban realname {
mask "sub7server";
reason "sub7";
};
/*
* NOTE POUR TOUS LES BANS, ils peuvent être répetés pour ajouter des entrées !
*
* ACTUEL : except ban {}
* ANCIEN : E:Line
* Fait que vous ne pouvez être banni.
* Syntaxe :
* except ban { mask (ident@host); };
* Répétez l'except ban {} autant de fois
* que vous voulez pour différents hosts.
*/
except ban {
/* ne banni pas stskeeps */
mask *stskeeps@212.*;
};
/*
* ACTUEL : deny dcc {}
* ANCIEN : dccdeny.conf
* Utilisez ceci pour bloquer l'envoie de dcc... stope
* mieux les virus.
* Syntaxe :
* deny dcc
* {
* filename "fichier à bloquer (ex : *exe)";
* reason "raison";
* };
*/
deny dcc {
filename "*sub7*";
reason "Possible Sub7 Virus";
};
/*
* ACTUEL : deny channel {}
* ANCIEN : N/A (NEW)
* Ceci empêche des salons d'être joins.
* Syntax:
* deny channel {
* channel "(salon)";
* reason "raison";
* };
*/
deny channel {
channel "*warez*";
reason "Warez is illegal";
};
/*
* ACTUEL : vhost {}
* ANCIEN : Vhost.conf file
* Applique une ip factice aux non-opers, ou aux
* opers trop flemmards pour utiliser /sethost :P
* Syntaxe :
* vhost {
* vhost (vhost.com);
* from {
* userhost (ident@host à autoriser à utiliser);
* };
* login (login);
* password (mot de passe);
* };
* ensuite pour utiliser ce vhost, tapez /vhost (login) (mot de passe) sur l'IRC
*/
vhost {
vhost i.hate.microsefrs.com;
from {
userhost *@*.image.dk;
};
login stskeeps;
password moocowsrulemyworld;
};
/* Vous pouvez utiliser d'autres fichiers de configuration */
/* include "klines.conf"; */
/* Configuration du réseau */
set {
network-name "ROXnet";
default-server "irc.roxnet.org";
services-server "services.roxnet.org";
stats-server "stats.roxnet.org";
help-channel "#ROXnet";
hiddenhost-prefix "rox";
/* prefix-quit "no"; */
/* Les Cloak keys doivent être les mêmes sur tous les serveurs du réseau.
* Ils sont utilisés pour générer des hosts masqués et doivent être gardés secrets.
* Les clés doivent être 3 chaînes de 5-100 caractères melangés.
* (10-20 caractères est parfait) et elles doivent être constituées de minuscules (a-z),
* majuscules (A-Z) et chiffres (0-9) [voir le premier exemple de clé].
*/
cloak-keys {
"aoAr1HnR6gl3sJ7hVz4Zb7x4YwpW";
"et une autre";
"et un autre";
};
/* host à l'identification oper */
hosts {
local "locop.roxnet.org";
global "ircop.roxnet.org";
coadmin "coadmin.roxnet.org";
admin "admin.roxnet.org";
servicesadmin "csops.roxnet.org";
netadmin "netadmin.roxnet.org";
host-on-oper-up "no";
};
};
/* Configuration spécifique d'un serveur */
set {
kline-address "mettre.cet.email";
modes-on-connect "+ixw";
modes-on-oper "+xwgs";
oper-auto-join "#opers";
dns {
nameserver 127.0.0.1;
timeout 2s;
retries 2;
};
options {
hide-ulines;
/* Vous pouvez enclencher la vérification des idents si vous voulez */
/* identd-check; */
show-connect-info;
};
maxchannelsperuser 10;
/* Durée maximum pendant laquelle un utilisateur doit rester connecté avant de pouvoir utiliser
* un message de QUIT.
* Ceci devrait aider à stoper le spam */
anti-spam-quit-message-time 10s;
/* Applique le message de static-quit à tous les quits - cela signifie qu'aucun
message de quit personalisé ne sera autorisé sur le serveur local */
/* static-quit "Client quit"; */
/* Vous pouvez également bloquer toutes les raisons de part en décommentant ceci et en disant
* 'yes', ou spécifiez un autre texte (ex: "Bye bye!") pour qu'il soit toujours utilisé.. */
/* static-part yes; */
/* Vous permet de restreindre certaines stats aux opers, utilisez * pour toutes les stats,
* enlevez le pour autoriser les utilisateurs à voir toutes les stats. Tapez '/stats' pour
* une liste complète.
* Certains admins pourront vouloir bloquer 'kGs' pour que les utilisateurs normaux ne puissent
* lister les klines, glines et shuns.
*/
oper-only-stats "okfGsMRUEelLCXzdD";
/* Throttling: cet exemple applique une limite de 3 connexions en 60s (par host). */
throttle {
connections 3;
period 60s;
};
/* Protection Anti flood */
anti-flood {
nick-flood 3:60; /* 3 changements de pseudo en 60 secondes (la valeur par défaut) */
};
/* Filtre anti-spam */
spamfilter {
ban-time 1d; /* durée par défaut d'un ban *line appliqué par le spamfilter */
ban-reason "Spam/Advertising"; /* raison par défaut */
virus-help-channel "#help"; /* salon à utiliser pour l'action 'viruschan' */
/* excepté "#help"; salon à exempter de filtrage */
};
};
/*
* Problèmes ou besoin de plus d'aide ?
* 1) www.vulnscan.org/UnrealIrcd/unreal32docs.fr.html
* 2) www.vulnscan.org/UnrealIrcd/faq/ <- contient 80% de vos questions !
* 3) Si vous avez encore des problèmes vous pouvez aller sur irc.ircsystems.net #unreal-support,
* notez que vous devez avoir LU LA DOCUMENTATION ET LA FAQ d'abord !
*/
+812
View File
@@ -0,0 +1,812 @@
/*
* example.conf Daniel Hawton avagy Osiris jóvoltából (osiris@unrealircd.org).
* A magyar fordítást AngryWolf <angrywolf@flashmail.com> készítette.
* $Id$
*
* Felhasználható Unreal3.2 és későbbi verziókhoz
*
* Oké, emberek! Ez az új példa konfiguráció. A kinézete nagyon hasonló
* a C++-hoz, olyasformán. Mindenesetre itt az ideje végigmennünk rajta. Eleinte
* nehéz nekilendülni, de kis gyakorlással és olvasgatással meg fogjuk érteni.
*
* Csak másoljuk be ezt a fájlt a fő unrealircd könyvtárunkba, és nevezzük
* 'unrealircd.conf'-nak.
*
* MEGJEGYZÉS: Minden sor, kivéve a nyitó { sort, ;-vel végződik, beleértve
* a záró } sort is. Az IRCd figyelmen kívül hagyja a megjegyzéssorokat.
*
* KÉRLEK, OLVASD EL A doc/unreal32docs.html-T! Az online verzió is elérhető
* a www.vulnscan.org/UnrealIrcd/unreal32docs.html címen.
* Rengeteg információt tartalmaz a konfigurációs fájlról: tájékoztatást ad
* minden blokkról, változóról stb.
*/
/* Megjegyzések típusai */
#1. Megjegyzéstípus (Shell típusú)
// 2. Megjegyzéstípus (C++ stílusú)
/* 3. Megjegyzéstípus (C stílusú) */
#ezeket a sorokat az ircd figyelmen kívül hagyja.
/*
* Az UnrealIRCd támogat modulokat, néhányuk betöltése kötelező is.
* Legalább a parancsokat biztosító és egy álcázó modulra lesz szükségünk.
*/
/* *NIX-BAN vegyük ki a megjegyzésből a következő két sort: */
//loadmodule "src/modules/commands.so";
//loadmodule "src/modules/cloak.so";
/* Windows-BAN vegyük ki a megjegyzésből a következő két sort: */
//loadmodule "modules/commands.dll";
//loadmodule "modules/cloak.dll";
/*
* Azt is megtehetjük, hogy befűzünk más konfigurációs fájlokat.
* A help.conf tartalmazza az összes /helpop szöveget. A badwords.*.conf
* fájlok tartalmazzák az összes csúnyaszó bejegyzést a +G módhoz...
* A spamfilter.conf néhány jó szabályt a jelenlegi trójai vírusokra.
* Valószínűleg be akarjuk tölteni őket:
*/
include "help.conf";
include "badwords.channel.conf";
include "badwords.message.conf";
include "badwords.quit.conf";
include "spamfilter.conf";
/*
* ÚJ: me {}
* RÉGI: M:Line
* A me {} határozza meg ennek a szervernek a nevét, a leírását és az unrealbeli
* szerverazonosító-számát. A szintaktikája a következő:
* me {
* name "szerver.név";
* info "A szerver leírása";
* numeric (szerverazonosító*);
* };
* Ha linkelünk, ezt az azonosítószámot nem használhatja semmilyen más szerver
* a hálózaton.
*/
me
{
name "irc.valaminet.com";
info "ValamiNet Szerver";
numeric 1;
};
/*
* ÚJ: admin {}
* RÉGI: A:Line
* Ez a blokk információt ad a szerver adminisztrátorairól. Annyi sort tehetünk
* az admin { alá, amennyit kívánunk.
* A szintaktikája a következő:
* admin {
* "első sor";
* "második sor";
* [stb]
* };
*/
admin {
"Bob Smith";
"bob";
"szeleskorben@hasznalt.nev";
};
/*
* ÚJ: class {}
* RÉGI: Y:line (a régi zavarbaejtő volt)
* Ezek az osztályokat állítják be. Az osztályok a kapcsolatok egy csoportjának
* beállításai. Például a szerver kapcsolatokat, ahelyett, hogy egy kliens
* osztályába kerülnének, beleirányítjuk a szerverek osztályába. Szintaktika:
* class (osztálynév)
* {
* pingfreq (hány másodpercenként pingeljünk egy felhasználót/szervert);
* maxclients (mennyi kapcsolat lehet ebben az osztályban);
* sendq (egy kapcsolat küldési sorának maximális mérete);
* recvq (egy kapcsolat fogadási sorának maximális mérete [árvízvédelem]);
* };
*/
class clients
{
pingfreq 90;
maxclients 500;
sendq 100000;
recvq 8000;
};
class servers
{
pingfreq 90;
maxclients 10; /* Legfeljebb ennyi szervert linkelhetünk egyszerre */
sendq 1000000;
connfreq 100; /* Ennyi másodpercet várjon, mielőtt újra kapcsolódik */
};
/*
* ÚJ: allow {}
* RÉGI: I:Line
* Ez a kapcsolatok engedélyezését határozza meg...
* Alapvetően kliensekre használjuk; megengedi nekik, hogy kapcsolódjanak, így
* némileg van lehetőség a szabályozásra, valamint jelszót is beállíthatunk.
* A szintaktika a következő:
* allow {
* ip (ip maszk az engedélyezéshez);
* hostname (gazdanév maszk);
* class (osztály, ahová küldjük őket [lásd: class {}]);
* password "(jelszó)"; (nem kötelező)
* maxperip (mennyi kapcsolatot engedjünk ip címenként); (nem kötelező)
* };
*/
allow {
ip *@*;
hostname *@*;
class clients;
maxperip 5;
};
/* Jelszavas allow blokk */
allow {
ip *@255.255.255.255;
hostname *@*.jelszavas.csunya.emberkek;
class clients;
password "V4lami";
maxperip 1;
};
/*
* ÚJ: allow channel {}
* RÉGI: chrestrict
* Megengedi egy felhasználónak, hogy belépjen egy csatornára...
* mint egy csatornáról letiltás alóli kivétel.
* Szintaktika:
* allow channel {
* channel "csatornanév";
* };
*/
allow channel {
channel "#AWarezSzívás";
};
/*
* ÚJ: oper {}
* RÉGI: O:Line
* Definiál egy IRC operátort
* Az IRC operátorok feladata, hogy épségben tartsák a szervert; rendszerint
* ügyelnek a karbantartottságára és arra, hogy kapcsolatban maradjon
* a hálózattal. A szintaktika a következő:
* oper (bejelentkezőnév) {
* class (osztály, ahová berakjuk őket; ha eddig más osztályban voltak,
* átteszi őket ebbe az új osztályba);
* from {
* userhost (azonosító@gazdanév);
* userhost (azonosító@gazdanév);
* };
* flags
* {
* (flagek ide*);
* };
* VAGY
* flags "régi típusú flagek, mint pl. OAaRD";
* };
*/
/* Az oper flagek listáját lásd a doc/unreal32docs.hu.html#operblock szekcióban
* [ERŐSEN ajánlott elolvasni]
*/
oper bobsmith {
class clients;
from {
userhost bob@smithco.com;
};
password "f00";
flags
{
netadmin;
can_zline;
can_gzline;
can_gkline;
global;
};
};
/*
* ÚJ: listen {}
* RÉGI: P:Line
* Meghatároz egy olyan portot, amelyet az ircd megnyit, és engedélyt ad
* a felhasználóknak/szervereknek, hogy kapcsolódjanak a szerverre.
* A szintaktika a következő:
* listen (ip cím):(portszám)
* {
* options {
* (opciók ide);
* };
* };
* vagy egy síma portnyitáshoz:
* listen (ip):(port);
*
* MEGJEGYZÉS: ipv6-os ip-kre (3ffe:b80:2:51d::2 stb.) használjuk a
* listen [ip]:port;
* szintaktikát. Az is működik.
*/
/* Opciók a listenhez:
RÉGI | ÚJ
S serversonly
C clientsonly
J java
s ssl
* standard
*/
/* MEGJEGYZÉS SSL PORTOKRA: az SSL portok eléggé szabványosítatlanok, emellett
* sok a magas SSL port. Néhányan azt mondják, a 994-en célszerű futtatni,
* mert az a hivatalos SSL port... de a rendszergazdát igényel! Ezenkívül,
* a 194 a hivatalos irc port, de láttunk valaha egy ircd-t azon futni?
* Így mi a javaslatunk az, hogy használjuk a 6697-et SSL-hez, ezt használja
* jónéhány hálózat, és ezt ismeri fel például a StunTour is.
* Szabadon megnyithatunk annyi SSL portot, amennyit akarunk, de ha a 6697-et
* (is) használjuk, kicsit segítjük a világot szabványosodni ;).
*/
listen *:6697
{
options
{
ssl;
clientsonly;
};
};
listen *:8067;
listen *:6667;
/* MEGJEGYZÉS: Ha egy több IP címes IRCd shellen vagyunk, előfordulhat, hogy
* "Address already in use" ("A cím már használatban van") hibaüzeneteket
* találunk a naplóban, és az ircd nem indul el. Ez azt jelenti, hogy
* az ircd-nek egy meghatározott IP címre KELL bindelnie a "*" helyett
* vagyis például így:
* listen 1.2.3.4:6667;
* Természetesen cseréljük ki az IP címet arra az IP-re, amelyet nekünk
* osztottak ki.
*/
/*
* ÚJ: link {}
* RÉGI: C/N:Line-ok
* Ez a blokk "igen"-t mond egy szerver kapcsolódására.
* MEGJEGYZÉS: MINDKÉRT SZERVEREN KELL EGY LINK {} BEÁLLÍTÁS A HELYES
* KAPCSOLÓDÁSHOZ!
* A szintaktika a következő:
* link (szervernév)
* {
* username (felhasználónév, * is működik);
* hostname (ip cím/gazdanév maszk);
* bind-ip (amilyen IP címre bindeljen kapcsolódáskor, vagy *);
* port (port, ahová kapcsolódjon, ha van);
* hub (Ha ez egy hub; * működik, vagy szervermaszkokat is beírhatunk);
* [vagy leaf *;]
* password-connect "(elküldendő jelszó)";
* password-receive "(fogadandó jelszó)";
* class (osztály, ahová betesszük a szervereket);
* options {
* (opciók ide*);
* };
* /* Ha SSL-t használunk, kiválaszthatjuk, milyen rejtjelező algoritmusok
* * legyenek használatban SSL módban. Listát kapunk az "openssl ciphers"
* * paranccsal. Az egyes rejtjeleket :-tal válasszuk el.
* */
* ciphers "DES-CBC3-MD5";
*
* };
*/
/*
opciók:
RÉGI | ÚJ
S ssl
Z zip
N/A autoconnect
N/A quarantine
N/A nodnscache
*/
link hub.sajatnet.com
{
username *;
hostname 1.2.3.4;
bind-ip *;
port 7029;
hub *;
password-connect "LiNk";
password-receive "LiNk";
class servers;
options {
/* Megjegyzés: szolgáltatások linkelésekor célszerű nem
* használni az autoconnect opciót.
*/
autoconnect;
ssl;
zip;
};
};
/*
*
* ÚJ: ulines {}
* RÉGI: U:Line
* Az U-line-ok több hatalmat/parancsot adnak a szervereknek. CSAK
* szolgáltatásokat és statisztikákat nyújtó szerverekre érdemes beállítani,
* és SOHA rendes UnrealIRCd szerverekre!
* A szintaktika a következő:
* ulines {
* (uline-ra teendő szerver);
* (uline-ra teendő szerver);
* [stb.]
* };
*/
ulines {
services.roxnet.org;
stats.roxnet.org;
};
/*
* ÚJ: drpass {}
* RÉGI: X:Line
* Meghatározza a jelszavakat a /die és /restart parancsokhoz.
* A szintaktika a következő:
* drpass {
* restart "(újraindítás jelszava)";
* die "(leállítás jelszava)";
* };
*/
drpass {
restart "Imádok-újraindítani";
die "Halj-te-buta";
};
/*
* ÚJ: log {}
* RÉGI: N/A
* Megmondja az ircd-nek, hová és mit naplózzon. Annyi naplófájlunk lehet,
* amennyit szeretnénk.
*
* FLAGEK: errors, kills, tkl, connects, server-connects, kline, oper
*
* Szintaktika:
* log "naplófájl"
* {
* flags
* {
* (flag);
* (flag);
* [stb.]
* };
* };
*/
log "ircd.log" {
/* Törölje a naplófájlt, és kezdjen egy újat, ha eléri a 2 MB-ot;
* hagyjuk ki ezt a beállításból, ha mindig ugyanazt a naplót
* szeretnénk használni
*/
maxsize 2097152;
flags {
oper;
kline;
connects;
server-connects;
kills;
errors;
sadmin-commands;
chg-commands;
oper-override;
spamfilter;
};
};
/*
* ÚJ: alias {}
* RÉGI: N/A
* Ezzel olyan álparancsokat készíthetünk, mint a /nickserv, /chanserv stb.
* FLAGEK: services (szolgáltatás), stats (statisztika), normal (közönséges
* felhasználó)
*
* Szintaxis:
* alias "név" {
* target "ahová mutasson";
* type álparancstípus;
* };
*
* [MEGJEGYZÉS: Beilleszthetünk ide egy előre beállított álparancsfájlt is,
* lásd: doc/unreal32docs.html, 2.9-es szekció]
*/
// Ez a /nickserv parancsot a NickServ felhasználóra irányítja, aki a set::services-server szerverre kapcsolódott.
/*alias NickServ {
target "NickServ";
type services;
};*/
// Ha a parancsot ugyanarra a nicknévre szeretnénk irányítani, ami a parancs neve, kihagyhatjuk a nick bejegyzést.
//alias ChanServ { type services; };
// A /statserv parancsot a set::stats-server szerveren lévő StatServ felhasználóra irányítja
//alias StatServ { type stats; };
// A /superbot parancsot a SuperBot felhasználóra irányítja.
//alias SuperBot { type normal; };
/* Szabványos álparancsok */
alias NickServ { type services; };
alias ChanServ { type services; };
alias OperServ { type services; };
alias HelpServ { type services; };
alias StatServ { type stats; };
/*
* ÚJ: alias {}
* RÉGI: N/A
* Ezzel olyan álparancsokat készíthetünk, mint az /identify, /services stb.
*
* Szintaktika:
* alias "név" {
* format "formátumsztring" {
* target "ahova mutasson";
* type álparancstípus;
* parameters "küldendő paraméterek";
* };
* type command;
* };
*/
/* Ezt azért mutatjuk külön, mert még ha ugyanaz is a neve, mint az előző direktívának, a szintaktikája nagyon
* más, habár hasonló feladatot lát el, és a szabványosok álparancsokra van szüksége, hogy működjön.
*/
/*
alias "identify" {
format "^#" {
target "chanserv";
type services;
parameters "IDENTIFY %1-";
};
format "^[^#]" {
target "nickserv";
type services;
parameters "IDENTIFY %1-";
};
type command;
};
*/
/* Az alias::format direktíva egy reguláris kifejezés. Az első formátum akkor illeszkedik az /identify parancsra,
* ha az első karakter egy #. Azután elküldi ezt a chanserv álparancshoz az IDENTIFY %1- paraméterekkel.
* A második formátum akkor illeszkedik az /identify parancsra, ha az első karakter nem egy #. Azután
* elküldi a parancsot a nickserv álparancshoz az IDENTIFY %1- paraméterekkel.
*/
/* Az alias::format::parameters hasonló a scriptnyelvekhez. Az %N (ahol N egy szám) a parancshoz küldött egyik
* paramétert ábrázolja (ebben az esetben az /identify-ét). Ha azt írjuk, hogy %N-, a sztring N-edik
* paraméterétől az utolsóig minden paramétert fog jelenteni. Megadhatunk egy %n-et is, amely ki lesz cserélve
* a felhasználó nicknevével.
*/
/* Szabványos álparancsok */
alias "services" {
format "^#" {
target "chanserv";
type services;
parameters "%1-";
};
format "^[^#]" {
target "nickserv";
type services;
parameters "%1-";
};
type command;
};
alias "identify" {
format "^#" {
target "chanserv";
type services;
parameters "IDENTIFY %1-";
};
format "^[^#]" {
target "nickserv";
type services;
parameters "IDENTIFY %1-";
};
type command;
};
/*
* ÚJ: tld {}
* RÉGI: T:Line
* Beállít más motd és rules fájlt
* a kliens hostmaszkjára.
* A szintaktikája a következő:
* tld {
* mask (azonosító@gazda);
* motd "(motd fájl)";
* rules "(rules fájl)";
* };
*/
tld {
mask *@*.fr;
motd "ircd.motd.fr";
rules "ircd.rules.fr";
};
/* megjegyzés: a fenti példa blokkot akár le is törölhetjük; ebben az esetben
* mindenkire az alapértelmezett motd/rules fájlok (ircd.motd, ircd.rules)
* lesznek használatban.
*/
/*
* ÚJ: ban nick {}
* RÉGI: Q:Line
* Kitilt egy nicknevet, így az nem használható.
* A szintaktikája a következő:
* ban nick {
* mask "(kitiltandó nick)";
* reason "(indoklás)";
* };
*/
ban nick {
mask "*C*h*a*n*S*e*r*v*";
reason "Fenntartva a szolgáltatásoknak";
};
/*
* ÚJ: ban ip {}
* RÉGI: Z:Line
* Megtiltja egy ip-nek, hogy a hálózatra kapcsolódjon.
* Szintaktika:
* ban ip { mask (ip cím/gazdanévmaszk); reason "(indoklás)"; };
*/
ban ip {
mask 195.86.232.81;
reason "Lecsatolt szerver";
};
/*
* ÚJ: ban server {}
* RÉGI: Q:Line szerverekre
* Megtiltja egy szervernek, hogy a hálózatra kapcsolódjon.
* Ha egy szerver távoli szerverre linkel, a helyi szerver
* szétkapcsolja a hálózatról.
* A szintaktikája a következő:
* ban server {
* mask "(szervernév)";
* reason "(indoklás)";
* };
*/
ban server {
mask eris.berkeley.edu;
reason "Mars ki innen!";
};
/*
* ÚJ: ban user {}
* RÉGI: K:Line
* Elintézi, hogy egy felhasználó egy bizonyos maszkról ne tudjon kapcsolódni
* a szerverünkre.
* Szintaktika:
* ban user { mask (gazdanévmaszk/ip cím); reason "(indok)"; };
*/
ban user {
mask *tirc@*.saturn.bbn.com;
reason "Idióta";
};
/*
* ÚJ: ban realname {}
* RÉGI: n:Line
* Letiltja egy bizonyos valós név használatát.
* Szintaktikája:
* ban realname {
* mask "(valós név)";
* reason "(indok)";
* };
*/
ban realname {
mask "Swat Team";
reason "mIRKFORCE";
};
ban realname {
mask "sub7server";
reason "sub7";
};
/*
* MEGJEGYZÉS MINDEN BANRA: ezek ismételhetőek további bejegyzésekhez!
*
* ÚJ: except ban {}
* RÉGI: E:Line
* Elintézi, hogy ne lehessen minket kibannolni.
* Szintaktika:
* except ban { mask (azonosító@gazda); };
* További gazdákhoz annyiszor ismételjük az except ban {}-t,
* amennyiszer szükséges.
*/
except ban {
/* ne tiltsuk ki stskeeps-t */
mask *stskeeps@212.*;
};
/*
* ÚJ: deny dcc {}
* RÉGI: dccdeny.conf
* Használjuk dcc küldések blokkolására... Jobban
* megállítja a vírusokat.
* Szintaktika:
* deny dcc
* {
* filename "blokkolandó fájl (pl. *exe)";
* reason "indok";
* };
*/
deny dcc {
filename "*sub7*";
reason "Valószínűleg Sub7 Virus";
};
/*
* ÚJ: deny channel {}
* RÉGI: N/A (ÚJ)
* Letiltja bizonyos csatornákon a belépést.
* Szintaktika:
* deny channel {
* channel "(csatorna)";
* reason "indok";
* };
*/
deny channel {
channel "*warez*";
reason "A warez törvényellenes";
};
/*
* ÚJ: vhost {}
* RÉGI: Vhost.conf fájl
* Beállít egy hamis ip címet közönséges felhasználókon, vagy
* olyan operátorokon, akik lusták a /sethost-ot használni :P
* Szintaktika:
* vhost {
* vhost (vhost.com);
* from {
* userhost (azonosító@gazda, aki használhatja);
* };
* login (bejelentkezőnév);
* password (jelszó);
* };
* azután e vhost használatához adjuk ki
* a /vhost (bejelentkezőnév) (jelszó) parancsot IRC-n
*/
vhost {
vhost i.hate.microsefrs.com;
from {
userhost *@*.image.dk;
};
login stskeeps;
password moocowsrulemyworld;
};
/* Befűzhetünk más konfigurációs fájlokat */
/* include "klines.conf"; */
/* Hálózati beállítások */
set {
network-name "ROXnet";
default-server "irc.roxnet.org";
services-server "services.roxnet.org";
stats-server "stats.roxnet.org";
help-channel "#ROXnet";
hiddenhost-prefix "rox";
/* prefix-quit "no"; */
/* Az álcázó kulcsoknak a hálózat minden szerverén azonosnak kell
* lenniük. Álcázott gazdanevek előállításában van szerepük, ezért
* legyenek titokban tartva! Mind 3 kulcs legyen egy-egy véletlenszerű
* sztring 5-100 karakterből (10-20 karakter kitűnő), valamint
* tartalmazniuk kell kisbetűket (a-z), nagybetűket (A-Z) és számokat
* (0-9) [ahogy az első kulcsos példában látható].
*/
cloak-keys {
"aoAr1HnR6gl3sJ7hVz4Zb7x4YwpW";
"írjunk hozzá még egyet";
"írjunk hozzá még egyet";
};
/* gazdanevek opereléskor */
hosts {
local "locop.roxnet.org";
global "ircop.roxnet.org";
coadmin "coadmin.roxnet.org";
admin "admin.roxnet.org";
servicesadmin "csops.roxnet.org";
netadmin "netadmin.roxnet.org";
host-on-oper-up "no";
};
};
/* Szerverszintű beállítások */
set {
kline-address "állítsuk.be.ezt.az.emailt";
modes-on-connect "+ixw";
modes-on-oper "+xwgs";
oper-auto-join "#operek";
dns {
nameserver 127.0.0.1;
timeout 2s;
retries 2;
};
options {
hide-ulines;
/* Itt engedélyezhetjük az ident ellenőrzést, ha szeretnénk */
/* identd-check; */
show-connect-info;
};
maxchannelsperuser 10;
/* Legkevesebb ennyi ideig kell a felhasználónak kapcsolatban lennie,
* mielőtt engedélyt kap a QUIT üzenetek használatára. Remélhetőleg
* ez leállítja a spamot. */
anti-spam-quit-message-time 10s;
/* A static-quit a neki megadott üzenetet megjeleníti minden
* kilépésben - avagy egyéni kilépési szövegek nem engedélyezettek
* a helyi szerveren */
/* static-quit "Kliens kilépés"; */
/* Hasonlóan blokkolható minden lelépési indok, úgy, hogy kivesszük
* a megjegyzésből ezt, és "yes"-t írunk vagy megadunk valamilyen
* más szöveget (pl. "Bye bye!"), hogy mindig az legyen a lelépés
* indoklószövege. */
/* static-part yes; */
/* Ezzel megmondhatjuk, mely statisztikákat szeretnénk csak operátorok
* számára engedélyezni. Használjunk *-ot, ha az összeset kívánjuk,
* és hagyjuk el a direktívát, ha a felhasználók mindet láthatják. Írjuk
* be a "/stats" parancsot a teljes listáért.
* Lehet, hogy néhány adminisztrátor törölni fogja a "kGs"-t, hogy
a közönséges felhasználók láthassák a kline-okat, gline-okat és
* shunokat.
*/
oper-only-stats "okfGsMRUEelLCXzdD";
/* Elfojtás: ez a példa 60 másodpercenként (gazdánként) legfeljebb
* 3 kapcsolatot engedélyező korlátozást állít be. */
throttle {
connections 3;
period 60s;
};
/* Árasztásellenes védelem */
anti-flood {
nick-flood 3:60; /* 3 nicknévváltás 60 másodpercenként
(az alapértelmezés) */
};
/* Spamszűrő */
spamfilter {
ban-time 1d; /* a spamszűrő által beállított *line-ok
alapértelmezett kitiltási ideje */
ban-reason "Spam/Reklámozás"; /* alapértelmezett indok */
virus-help-channel "#help"; /* a "viruschan" tevékenységhez
használt csatorna */
/* except "#help"; kivesszük a szűrés alól ezt a csatornát */
};
};
/*
* Problémák akadtak, vagy szükség van további segítségre?
* 1) www.vulnscan.org/UnrealIrcd/unreal32docs.html
* 2) www.vulnscan.org/UnrealIrcd/faq/ <- a kérdéseid 80%-át tartalmazza!
* 3) Ha még mindig gondod van, felmehetsz az irc.ircsystems.net #unreal-support
* csatornájára. Fontos: kérjük, hogy előbb OLVASD EL A DOKUMENTÁCIÓT és
* a GYIK-ot!
*/
-53
View File
@@ -1,53 +0,0 @@
/*
* Example set {} block
*/
set {
/*
* This is the mail users will get shown when k-lined
*/
kline-address "mail.to.mail.to";
/*
* What modes will users get when connecting to this server
*/
modes-on-connect "+ix";
/* What channels users will autojoin */
auto-join "0";
/* What channels opers will autojoin on connect*/
oper-auto-join "0";
dns {
/* What IP has our DNS server got? */
nameserver 127.0.0.1;
/* How long time will we wait for each attempt? */
timeout 2s;
/* How many attempts will we do */
retries 2s;
};
options {
enable-opermotd;
enable-chatops;
hide-ulines;
// webtv-support;
identd-check;
};
/*
* How many channels each user can join
*/
maxchannelsperuser 10;
/*
* This is a new thing in Unreal3.2.
* You _need_ to make three numbers up, bigger than 100000
* These MUST be the SAME on EVERY server in your NETWORK
* If people discover these keys, it is easier for them to crack
* the +x algoritm.
*/
cloak-keys
{
0;
0;
0;
};
};
+1349
View File
File diff suppressed because it is too large Load Diff
+1333
View File
File diff suppressed because it is too large Load Diff
+65 -7
View File
@@ -1,5 +1,5 @@
Numeric 005 Documentation (c) 2002 codemastr (Dominick Meglio) [codemastr@unrealircd.com]
(As of Unreal3.2-beta11)
Numeric 005 Documentation (c) 2002-2005 codemastr (Dominick Meglio) [codemastr@unrealircd.com]
(As of Unreal3.2.3)
Numeric 005 allows the server to inform the client of any protocol specific features in the
IRCd. The numeric is sent at connection time immediately after numeric 004. Additionally
@@ -17,13 +17,23 @@ by this server"
Currently UnrealIRCd supports several tokens that are included in numeric 005. A list of
all tokens, their respective value and a brief description are listed below.
Unreal attempts to follow the proposed ISupport standard as much as possible. Unreal only
ignores the standard in one regard, the TARGMAX token. This token is believed to be
impractical and technically impossible to correctly implement due to existing limitations
in the standard. Therefore, this token is not currently supported.
Unreal does additionally provide a few tokens which are not specified in the standard, these
include: HCN, AWAYLEN, WATCH, SILENCE, EXTBAN, ELIST, and CMDS. Unreal also maintains a few
legacy tokens such as MAXCHANNELS and WALLCHOPS to ensure compatibility until the ISupport
standard is more widely accepted by clients.
Token Value Default Value Description
------------------------------------------------------------------------------------------------
MAP none none Informs the client that the /map
command is present.
command is present. [Obsolete]
KNOCK none none Informs the client that the /knock
command is present.
command is present. [Obsolete]
SAFELIST none none The LIST command is sent in
multiple iterations so that the
@@ -34,10 +44,11 @@ HCN none none The server supports t
(Hybrid Connect Notice) protocol.
MAXCHANNELS number 10 The maximum number of channels a
user may join.
user may join. [Deprecated]
MAXBANS number 60 The maximum number of bans that
may be placed for a channel.
[Obsolete]
NICKLEN number 30 Maximum length of a user's
nickname.
@@ -55,6 +66,7 @@ AWAYLEN number 307 Maximum length of an
WALLCHOPS none none Indicates that you may use
NOTICE/PRIVMSG to send to +ohv by
using PRIVMSG/NOTICE [@|%|+]#channel.
[Deprecated]
WATCH number 128 Indicates the presence of the
WATCH command and specifies the
@@ -74,8 +86,8 @@ PREFIX (modes)prefixes (qaohv)~&@%+ Indicates the modes o
that corespond to the given
nickname prefixes.
CHANMODES A,B,C,D be,k,lfL, Specifies how each channel mode is
psmntirRcOAQKVHGCuzN set/unset. The A section specifies
CHANMODES A,B,C,D be,kfL,lj, Specifies how each channel mode is
psmntirRcOAQKVHGCuzNSMT set/unset. The A section specifies
modes that add a nick/mask to a
list. The B section specifies
modes that require a parameter
@@ -100,3 +112,49 @@ EXTBAN prefix,types ~,cqr Specifies what extban
defines which character indicates
an extban and the types defines
which extbans the server supports.
ELIST flags MNUCT Specifies the set of extended LIST
options supported. The M flag
indicates mask based searching,
the N flag indicates negative
mask based searching. The U flag
means support for user count
searching. The C flag allows channel
creation time searching, and the T
flag allows topic set time
searching.
CMDS commands MAP,KNOCK,DCCALLOW,USERIP Specifies a series of commands that
can be useful for the client to know
exist as they may provide a more
efficient means for the client to
accomplish a specific task. This
token replaces the MAP and KNOCK
tokens.
STATUSMSG flags ~&@%+ Specifies the mode flags that may
prefix a channel name in a PRIVMSG
or NOTICE to limit who receives the
message to only those with a certain
level of access. This token will
replace the WALLCHOPS token.
EXCEPTS none none Indicates that channel ban exceptions
(+e) are supported by the server.
INVEX none none Indicates that channel invite
exceptions (+I) are supported by
the server.
MAXLIST mode:num,... b:60,e:60,I:60 Specifies the maximum number of
entries that may be added to a
particular mode list (type A modes).
This token replaces MAXBANS.
CHANLIMIT pfx:num,... #:10 Specifies the maximum number of
channels with the specified prefix
that a user may join at one time.
This token will replace MAXCHANNELS.
CHANNELLEN number 32 Provides the maximum length of a
channel name that a user can create.
+11
View File
@@ -128,3 +128,14 @@ ZIP If both servers have this set then the link will be (zlib) compres
TKLEXT This allows 10 instead of 8 parameters in TKL's for spamfilter, see s_kline.c
function m_tkl for more info on this (added in 3.2RC2).
NICKIP This token indicates that a (standard) base64 encoded IP address is included
in the NICK command. The IP is in binary network byte order formated and
encoded using the standard base64 algorithm. '*' is used if no IP is available.
NICKCHARS This specifies a list of language characters that are allowed in nicks.
USMARC codes are used, with a suffix if needed. See src/charsys.c for the full
list (ctrl+f, static LangList) of possible languages (2nd column).
The items in the list sent as NICKCHARS=.. must always be sorted.
If a server sends NICKCHARS= and if the remote parameters do not match the
charsets in use locally, then the server link is rejected.
+108 -120
View File
@@ -1,122 +1,110 @@
Token List (c) 2002 codemastr (Dominick Meglio) [codemastr@unrealircd.com]
(As of Unreal3.2-beta11)
Token List (c) 2002-2004 codemastr (Dominick Meglio) [codemastr@unrealircd.com]
(As of Unreal3.2.3)
Command Token
Command Token
------------------------------------------------------------------------------------------------
PRIVMSG !
WHO \
WHOIS #
WHOWAS $
USER %
NICK &
SERVER '
LIST (
TOPIC )
INVITE *
VERSION +
QUIT ,
SQUIT -
KILL .
INFO /
LINKS 0
SUMMON 1
STATS 2
USERS 3
HELP 4
HELPOP 4
ERROR 5
AWAY 6
CONNECT 7
PING 8
PONG 9
OPER ;
PASS <
WALLOPS =
TIME >
NAMES ?
ADMIN @
NOTICE B
JOIN C
PART D
LUSERS E
MOTD F
MODE G
KICK H
USERHOST J
ISON K
REHASH O
RESTART P
CLOSE Q
DIE R
HASH S
DNS T
SILENCE U
AKILL V
KLINE W
UNKLINE X
RAKILL Y
GNOTICE Z
GOPER [
GLOBOPS ]
LOCOPS ^
PROTOCTL _
WATCH `
TRACE b
SQLINE c
UNSQLINE d
SVSNICK e
SVSNOOP f
SVSKILL h
SVSMODE n
SAMODE o
CHATOPS p
ZLINE q
UNZLINE r
RULES t
MAP u
SVS2MODE v
DALINFO w
ADCHAT x
MKPASSWD y
ADDLINE z
GLINE }
SETHOST AA
NACHAT AC
SETIDENT AD
SETNAME AE
LAG AF
SDESC AG
KNOCK AI
CREDITS AJ
LICENSE AK
CHGHOST AL
RPING AM
RPONG AN
NETINFO AO
SENDUMODE AP
ADDMODE AQ
ADDOMODE AR
SVSMODE AS
SMO AU
OPERMOTD AV
TSCTL AW
SAJOIN AX
SAPART AY
CHGIDENT AZ
SWHOIS BA
SVSO BB
SVSFLINE BC
TKL BD
VHOST BE
BOTMOTD BF
HTM BH
SHUN BL
SVSJOIN BR
SVSPART BT
SJOIN ~
UMODE2 |
PRIVATE !
WHOIS #
NICK &
SERVER '
TOPIC )
INVITE *
VERSION +
QUIT ,
SQUIT -
KILL .
INFO /
LINKS 0
STATS 2
HELP 4
ERROR 5
AWAY 6
CONNECT 7
PING 8
PONG 9
PASS <
TIME >
ADMIN @
SETHOST AA
NACHAT AC
SETIDENT AD
SETNAME AE
LAG AF
SDESC AG
KNOCK AI
CREDITS AJ
LICENSE AK
CHGHOST AL
RPING AM
RPONG AN
NETINFO AO
SENDUMODE AP
ADDMOTD AQ
ADDOMOTD AR
SVSMOTD AS
SMO AU
OPERMOTD AV
TSCTL AW
SAJOIN AX
SAPART AY
CHGIDENT AZ
NOTICE B
SWHOIS BA
SVSO BB
SVSFLINE BC
TKL BD
VHOST BE
BOTMOTD BF
HTM BH
DCCDENY BI
UNDCCDENY BJ
CHGNAME BK
SHUN BL
CYCLE BP
MODULE BQ
SVSNLINE BR
SVSPART BT
SVSLUSERS BU
SVSSNO BV
SVS2SNO BW
SVSJOIN BX
SVSSILENCE Bs
SVSWATCH Bw
JOIN C
PART D
LUSERS E
EOS ES
MOTD F
MODE G
KICK H
REHASH O
RESTART P
CLOSE Q
SENDSNO Ss
DNS T
TEMPSHUN Tz
SILENCE U
AKILL V
UNKLINE X
RAKILL Y
GLOBOPS ]
LOCOPS ^
PROTOCTL _
WATCH `
TRACE b
SQLINE c
UNSQLINE d
SVSNICK e
SVSNOOP f
SVSKILL h
SVSMODE n
SAMODE o
CHATOPS p
UNZLINE r
RULES t
MAP u
SVS2MODE v
DALINFO w
ADMINCHAT x
UMODE2 |
SJOIN ~
+5 -2
View File
@@ -3,7 +3,10 @@ VL Information (c) 2002 codemastr (Dominick Meglio) [codemastr@unrealircd.com]
Protocol Version
------------------------------------------------------------------------------------------------
2303 3.2-Selene
2306 3.2.3
2305 3.2.2
2304 3.2.1
2303 3.2-beta*, 3.2-RC*, 3.2
2302 3.1.1-Darkshades, 3.1.2-Darkshades, 3.1.3-Komara, 3.1.4-Meadows
2301 3.1-Silverheart
2300 3.0-Morrigana
@@ -28,5 +31,5 @@ e SSL supported
O OperOverride enabled
o OperOverride without verify
Z Zip links supported
3 3rd party modules (were) loaded
3 3rd party modules (were) loaded or unreal is any other way 'tainted' (eg: bad libs)
E Extended channel modes supported
+45
View File
@@ -0,0 +1,45 @@
==[ Translations ]============================================================
Starting with the release of Unreal 3.2 we have begun accepting translated
documentation files. For now, only translations of unreal32docs.html and
example.conf are accepted. Other stuff might be translated later, but
this will probably be postponed to 3.3 (numerics/ircd text/help.conf/etc).
There a few requirements however:
- When you submit your translation it should be a translation of the
very latest doc... So be sure to translate the cvs version of
unreal32docs.html (www.vulnscan.org/UnrealIrcd/unreal32docs.html).
- Of course the translation should be correct.. So also 'technically',
it's therefore recommended that have some real experience with Unreal ;)
- If you are accepted and start working on it, it would be nice if you
could put your docs-in-progress online somewhere so we can see how
progress is going a bit.
- You should use a proper HTML editor, this especially excludes Microsoft
Word and Frontpage since it enlarges the .html file by (at least) 30%.
Don't worry, there are enough free&simple html editors out there that
work perfectly fine, you won't need to be an HTML expert at all!
- Someone, usually the person who translated it, needs to be willing
to actively maintain the docs. This is very important! If docs are
out of date (out-of-synch) there will be confusion among users.
Translators will receive once a week (and right before every release)
all changes that were made in unreal32docs.html. Then the translator
should update his/her doc and send it in (or commit it via cvs).
Count on an average of 15 minutes a week (it varies).
Now, we should tell you that the first-time translation of unreal32docs.html
is a LOT of work.. probably 20 hours or so. After that, the weekly updates
take really just 5, 10, 15 minutes a week, which is pretty much "no time".
Now why would you translate at all? Well, by translating UnrealIRCd
documentation you will help out your fellow citizens and/or other people
of that language, you will make Unreal a bit more 'internationalized',
and it's a worthwile contribution to the UnrealIRCd project.
Upon successful completion you will also receive an @unrealircd.org
forwarder email address, and of course your name will be in the docs.
If you want to start translating a document, please send an email to
coders@lists.unrealircd.org and mention the language you are willing
to translate to.. You will then receive an email back saying you can
go ahead (or not). This is mainly to avoid multiple persons working
on the same translation.
==============================================================================
+1051 -354
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+577 -239
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
Binary file not shown.
+7 -30
View File
@@ -35,12 +35,7 @@ DLLFUNC int h_defizzer_connect(aClient *sptr);
static Hook *LocConnect = NULL;
ModuleInfo DefizzerModInfo;
#ifndef DYNAMIC_LINKING
ModuleHeader defizzer_Header
#else
#define defizzer_Header Mod_Header
ModuleHeader Mod_Header
#endif
ModuleHeader MOD_HEADER(defizzer)
= {
"defizzer", /* Name of module */
"$Id$", /* Version */
@@ -49,43 +44,25 @@ ModuleHeader Mod_Header
NULL
};
/* The purpose of these ifdefs, are that we can "static" link the ircd if we
* want to
*/
/* This is called on module init, before Server Ready */
#ifdef DYNAMIC_LINKING
DLLFUNC int Mod_Init(ModuleInfo *modinfo)
#else
int defizzer_Init(ModuleInfo *modinfo)
#endif
DLLFUNC int MOD_INIT(defizzer)(ModuleInfo *modinfo)
{
bcopy(modinfo,&DefizzerModInfo,modinfo->size);
LocConnect = HookAddEx(DefizzerModInfo.handle, HOOKTYPE_PRE_LOCAL_CONNECT, h_defizzer_connect);
return MOD_SUCCESS;
}
/* Is first run when server is 100% ready */
#ifdef DYNAMIC_LINKING
DLLFUNC int Mod_Load(int module_load)
#else
int defizzer_Load(int module_load)
#endif
DLLFUNC int MOD_LOAD(defizzer)(int module_load)
{
return MOD_SUCCESS;
}
/* Called when module is unloaded */
#ifdef DYNAMIC_LINKING
DLLFUNC int Mod_Unload(int module_unload)
#else
int defizzer_Unload(int module_unload)
#endif
DLLFUNC int MOD_UNLOAD(defizzer)(int module_unload)
{
HookDel(LocConnect);
return MOD_SUCCESS;
}
static void ban_fizzer(aClient *cptr)
{
int i;
@@ -148,4 +125,4 @@ DLLFUNC int h_defizzer_connect(aClient *sptr)
return exit_client(sptr, sptr, &me, "Fizzer client");
}
return 0;
}
}
BIN
View File
Binary file not shown.
+186 -86
View File
@@ -25,21 +25,29 @@ help {
" ==-------------------------oOo--------------------------==";
};
/* note: indexes were generated by cat somecmds|sort|column -c 70
* along with tab->space conversion (tabwidth 8).
* Perhaps we should automate this step :). -- Syzop
*/
help Usercmds {
" Currently the following User commands are available.";
" Use /HELPOP <command name> to get more information about";
" a specific command.";
" -";
" ==-----------------oOo-----------------==";
" ADMIN KICK MOTD QUIT VERSION";
" AWAY KNOCK NAMES RULES VHOST";
" CREDITS LICENSE NICK SETNAME WATCH";
" CYCLE LINKS NOTICE SILENCE WHO";
" DALINFO LIST PART STATS WHOIS";
" INVITE LUSERS PING TIME WHOWAS";
" ISON MAP PONG TOPIC";
" JOIN MODE PRIVMSG USERHOST";
" ==-----------------oOo-----------------==";
" ==-------------------------oOo-------------------------==";
" ADMIN LICENSE PART USERHOST";
" AWAY LINKS PING USERIP";
" CREDITS LIST PONG VERSION";
" CYCLE LUSERS PRIVMSG VHOST";
" DALINFO MAP QUIT WATCH";
" DCCALLOW MODE RULES WHO";
" INVITE MODULE SETNAME WHOIS";
" ISON MOTD SILENCE WHOWAS";
" JOIN NAMES STATS";
" KICK NICK TIME";
" KNOCK NOTICE TOPIC";
" ==-------------------------oOo-------------------------==";
};
help Opercmds {
@@ -47,16 +55,19 @@ help Opercmds {
" Use /HELPOP <command name> to get more information about";
" a specific command.";
" -";
" ==----------------oOo---------------==";
" OPER WALLOPS GLOBOPS CHATOPS LOCOPS DNS";
" ADCHAT NACHAT KILL KLINE ZLINE SPAMFILTER";
" GLINE SHUN GZLINE HTM TSCTL TEMPSHUN";
" REHASH RESTART DIE";
" LAG SETHOST SETIDENT CHGHOST CHGIDENT";
" CHGNAME SQUIT CONNECT DCCDENY UNDCCDENY";
" SAJOIN SAPART SAMODE RPING TRACE";
" OPERMOTD SDESC MKPASSWD CLOSE MODULE";
" ==----------------oOo---------------==";
" ==-------------------------oOo-------------------------==";
" ADCHAT GLOBOPS OPERMOTD SPAMFILTER";
" CHATOPS GZLINE REHASH SQUIT";
" CHGHOST HTM RESTART TEMPSHUN";
" CHGIDENT KILL RPING TRACE";
" CHGNAME KLINE SAJOIN TSCTL";
" CLOSE LAG SAMODE UNDCCDENY";
" CONNECT LOCOPS SAPART WALLOPS";
" DCCDENY MKPASSWD SDESC ZLINE";
" DIE MODULE SETHOST";
" DNS NACHAT SETIDENT";
" GLINE OPER SHUN";
" ==-------------------------oOo-------------------------==";
};
help Svscmds {
@@ -67,13 +78,13 @@ help Svscmds {
" Use /HELPOP <command name> to get more information about";
" a specific command.";
" -";
" ==-----------oOo-----------==";
" SVSNICK SVSMODE SVSKILL SVSWATCH";
" SVSNOOP SVSJOIN SVSPART SVSSILENCE";
" SVSO SWHOIS SQLINE SVSNLINE";
" UNSQLINE SVS2MODE SVSFLINE SVSSNO";
" SVSMOTD SVS2SNO SVSLUSERS";
" ==-----------oOo-----------==";
" ==-------------------------oOo-------------------------==";
" SQLINE SVSKILL SVSNLINE SVSSNO";
" SVS2MODE SVSLUSERS SVSNOOP SVSWATCH";
" SVS2SNO SVSMODE SVSO SWHOIS";
" SVSFLINE SVSMOTD SVSPART UNSQLINE";
" SVSJOIN SVSNICK SVSSILENCE";
" ==-------------------------oOo-------------------------==";
};
help Umodes {
@@ -130,7 +141,9 @@ help Snomasks {
" k = View KILL notices";
" n = View nick changes on local server";
" N = View nick changes on remote servers";
" o = View oper-up notices";
" q = View rejected nick changes due to Q:lines";
" s = View general notices";
" S = View spamfilter matches";
" v = View usage of /VHOST command";
" ==-------------------------oOo------------------------==";
@@ -149,9 +162,10 @@ help Chmodes {
" b <nick!ident@host> = Bans the nick!ident@host from the channel [h]";
" c = Block messages containing mIRC color codes [o]";
" e <nick!ident@host> = Overrides a ban for matching users [h]";
" f [*]<lines>:<seconds> = Flood protection [o]";
" (Users will be kicked after saying <lines> in <seconds> and banned if * is specified)";
" I <nick!ident@host> = Overrides +i for matching users [h]";
" f <floodparams> = Flood protection (for more info see /HELPOP CHMODEF) [o]";
" i = A user must be invited to join the channel [h]";
" j <joins:sec> = Throttle joins per-user to 'joins' per 'sec' seconds [o]";
" k <key> = Users must specify <key> to join [h]";
" l <number of max users> = Channel may hold at most <number> of users [o]";
" m = Moderated channel (only +vhoaq users may speak) [h]";
@@ -164,7 +178,7 @@ help Chmodes {
" A = Server/Net Admin only channel (settable by Admins)";
" C = No CTCPs allowed in the channel [o]";
" G = Filters out all Bad words in messages with <censored> [o]";
" M = Must be using a registered nick (+r) to talk [o]";
" M = Must be using a registered nick (+r), or have voice access to talk [o]";
" K = /KNOCK is not allowed [o]";
" L <chan2> = Channel link (If +l is full, the next user will auto-join <chan2>) [q]";
" N = No Nickname changes are permitted in the channel [o]";
@@ -180,39 +194,67 @@ help Chmodes {
" ==------------------------------oOo----------------------------==";
};
help Chmodef {
" The +f channel mode provides comprehensive flood protection for a channel.";
" This mode allows you to prevent join, nick change, CTCP, text, and knock";
" floods. The syntax for this mode's parameter is as follows:";
" -";
" +f [<amount><type>{#<action>}{,...}]:<seconds>";
" -";
" The amount specifies the number of times the specified flood must occur";
" before action is taken. Below are the available types:";
" -";
" ==-----Type-----Name--------Default Action---Other Actions-----==";
" c CTCP +C m, M";
" j Join +i R";
" k Knock +k";
" m Messages +m M";
" n Nickchange +N";
" t Text kick b";
" -";
" The difference between type m and t is that m is tallied for the entire";
" channel whereas t is tallied per user.";
" -";
" If you choose to specify an action for a mode, you may also specify a";
" time (in minutes) after which the specific action will be reversed.";
};
help Oflags {
" Here you will find the flags that can be placed inside of the O:Lines";
" -";
" ==----------------------oOo--------------------==";
" o = Local Operator";
" O = Global Operator";
" a = Gets +a on oper up. Is Services Administrator";
" A = Gets +A on oper up. Is Server Administrator";
" C = Gets +C on oper up. Is Co Administrator";
" N = Gets +N on oper up. Is Network Administrator";
" ==-------------------------------oOo-----------------------------==";
" o (locop) Local Operator";
" O (globop) Global Operator";
" C (coadmin) Gets +C on oper up. Is Co Administrator";
" A (admin) Gets +A on oper up. Is Server Administrator";
" a (services-admin) Gets +a on oper up. Is Services Administrator";
" N (netadmin) Gets +N on oper up. Is Network Administrator";
" -";
" r = Access to /REHASH server";
" R = Access to /RESTART server";
" D = Access to /DIE server";
" h = Oper receives umode +h (helpop)";
" g = Oper can send /GLOBOPS";
" w = Oper can send /WALLOPS";
" n = Oper can send Local Server Notices";
" G = Oper can send Global Server Notices";
" c = Access to do local /SQUITs and /CONNECTs";
" L = Access to do global /SQUITs and /CONNECTs";
" k = Access to do local /KILLs";
" K = Access to do global /KILLs";
" b = Oper can /KLINE users from server";
" B = Oper can remove Klines";
" z = Can add Z:Lines";
" Z = Can add global Z:Lines";
" t = Can use /GLINE and /SHUN";
" v = Can use OperOverride";
" q = Can use +q";
" H = Gets +x on oper up";
" W = Gets +W on oper up";
" ==----------------------oOo--------------------==";
" r (can_rehash) Access to /REHASH server";
" R (can_restart) Access to /RESTART server";
" D (can_die) Access to /DIE server";
" h (helpop) Oper receives umode +h (helpop)";
" g (can_globops) Oper can send /GLOBOPS";
" w (can_wallops) Oper can send /WALLOPS";
" n (can_localnotice) Oper can send Local Server Notices";
" G (can_globalnotice) Oper can send Global Server Notices";
" c (can_localroute) Access to do local /SQUITs and /CONNECTs";
" L (can_globalroute) Access to do global /SQUITs and /CONNECTs";
" k (can_localkill) Access to do local /KILLs";
" K (can_globalkill) Access to do global /KILLs";
" b (can_kline) Oper can /KLINE users from server";
" B (can_unkline) Oper can remove Klines";
" z (can_zline) Can add Z:Lines";
" Z (can_gzline) Can add global Z:Lines";
" t (can_gkline) Can use /GLINE, /SHUN and /SPAMFILTER";
" v (can_override) Can use OperOverride";
" q (can_setq) Can use +q";
" H (get_host) Gets +x on oper up";
" W (get_umodew) Gets +W on oper up";
" X (can_addline) Can use /ADDLINE";
" d (can_dccdeny) Can use /DCCDENY";
" ==-------------------------------oOo-----------------------------==";
};
@@ -232,31 +274,61 @@ help Whois {
" -";
" Syntax: WHOIS <user>";
" Example: WHOIS hAtbLaDe";
" -";
" Status flags:";
" The list of channels shown in the WHOIS reply can include one or more";
" status flags to indicate information about the channel. These flags are";
" described below:";
" ~ - User is a Channel Owner (+q)";
" & - User is a Channel Admin (+a)";
" @ - User is a Channel Operator (+o)";
" % - User is a Halfop (+h)";
" + - User is Voiced (+v)";
" ! - User has channels hidden in whois (+p) and you are an IRC Operator";
" ? - The channel is secret (+s) and you are an IRC Operator";
};
help Who {
" Retrieves information about users";
" -";
" Syntax:";
" /WHO [+|-][acghmnsuCM] [args]";
" /WHO [+|-][acghimnsuMRI] [args]";
" Flags are specified like channel modes, the flags cgmnsu all have arguments";
" Flags are set to a positive check by +, a negative check by -";
" The flags available:";
" Flag a: user is away";
" Flag c <channel>: user is on <channel>, no wildcards accepted";
" Flag g <gcos/realname>: user has string <gcos> in their GCOS,";
" Flag g <gcos/realname>: user has string <gcos> in his/her GCOS,";
" wildcards accepted, oper only";
" Flag h <host>: user has string <host> in their hostname, wildcards are accepted";
" Flag m <usermodes>: user has <usermodes> set on them, only o/A/a for nonopers";
" Flag n <nick>: user has string <nick> in their nickname, wildcards accepted";
" Flag h <host>: user has string <host> in his/her hostname, wildcards are accepted";
" Flag i <ip>: user has string <ip> in his/her IP address";
" Flag m <usermodes>: user has <usermodes> set, only o/C/A/a/N for nonopers";
" Flag n <nick>: user has string <nick> in his/her nickname, wildcards accepted";
" Flag s <server>: user is on server <server>, wildcards not accepted";
" Flag u <user>: user has string <user> in their username, wildcards accepted";
" Flag u <user>: user has string <user> in his/her username, wildcards accepted";
" Behavior flags:";
" Flag C: show first visible channel user is in";
" Flag M: check for user in channels I am a member of";
" Flag R: show users' real hostnames";
" Flag I: show users' IP addresses";
" -";
" For backwards compatibility, /who 0 o still shows +o users";
" Example: WHO +m o";
" -";
" Status flags:";
" The who command shows several flags in the returned result to indicate";
" different information about the user. These flags are explained below:";
" G - User is /away (gone)";
" H - User is not /away (here)";
" r - User is using a registered nickname";
" B - User is a bot (+B)";
" * - User is an IRC Operator";
" ~ - User is a Channel Owner (+q)";
" & - User is a Channel Admin (+a)";
" @ - User is a Channel Operator (+o)";
" % - User is a Halfop (+h)";
" + - User is Voiced (+v)";
" ! - User is +H and you are an IRC Operator";
" ? - User is only visible because you are an IRC Operator";
};
help Whowas {
@@ -427,6 +499,14 @@ help Userhost {
" Example: USERHOST hAtbLaDe";
};
help Userip {
" Returns the userip of the user in question.";
" Usually used by scripts or bots.";
" -";
" Syntax: USERIP <nickname>";
" Example: USERIP codemastr";
};
help Topic {
" Sets/Changes the topic of the channel in question,";
" or just display the current Topic.";
@@ -439,11 +519,14 @@ help Topic {
help Invite {
" Sends a user an Invitation to join a particular channel.";
" You must be an Operator on the channel in order to";
" invite a user into it.";
" If the channel is +i, you must be an Operator to use this";
" command, otherwise any user may use the command.";
" Invite without parameters lists the channels you have been";
" invited to.";
" -";
" Syntax: INVITE <user> <channel>";
" Syntax: INVITE [<user> <channel>]";
" Example: INVITE hAtbLaDe #Support";
" Example: INVITE";
};
help Kick {
@@ -473,7 +556,7 @@ help Watch {
" -";
" Syntax: WATCH +nick1 +nick2 +nick3 (Add nicknames)";
" WATCH -nick (Delete nicknames)";
" WATCH (View the watchlist)";
" WATCH (View which users are online)";
};
help List {
@@ -502,9 +585,11 @@ help Privmsg {
" Send a message to a channel.";
" Ex: /PRIVMSG #room Hi all";
" /PRIVMSG <prefix><#channel> <text>";
" Send a message to users with <prefix> in <#channel> only";
" Ex: /PRIVMSG @#room This goes to all ops";
" /PRIVMSG +%@#room This goes to all +v, +h and +o's.";
" Send a message to users with <prefix> and higher in <#channel> only";
" Ex: /PRIVMSG @#room This goes to +oaq";
" /PRIVMSG +#room This goes to +vhoaq";
" NOTE: You need at least voice in order to send to +#chan/%#chan/@#chan";
" and at least ops to send to &#chan/~#chan.";
" /PRIVMSG $<mask> <text>";
" Send a message to all users on servers matching <mask> [Oper only]";
" This is shown in the status window by most clients.";
@@ -527,9 +612,11 @@ help Notice {
" Send a notice to a channel.";
" Ex: /NOTICE #room Hi all, this is annoying";
" /NOTICE <prefix><#channel> <text>";
" Send a notice to users with <prefix> in <#channel> only";
" Ex: /NOTICE @#room This goes to all ops";
" /NOTICE +%@#room This goes to all +v, +h and +o's.";
" Send a notice to users with <prefix> and higher in <#channel> only";
" Ex: /NOTICE @#room This goes to +oaq";
" /NOTICE +#room This goes to +vhoaq";
" NOTE: You need at least voice in order to send to +#chan/%#chan/@#chan";
" and at least ops to send to &#chan/~#chan.";
" /NOTICE $<mask> <text>";
" Send a notice to all users on servers matching <mask> [Oper only]";
" This is shown in the status window by most clients.";
@@ -794,7 +881,7 @@ help Restart {
" -";
" Syntax: RESTART";
" RESTART <password>";
" RESTART <server> <password>";
" RESTART <password> <reason>";
};
help Die {
@@ -903,9 +990,10 @@ help Sapart {
" Forces a user to part a channel.";
" Services Admin Command";
" -";
" Syntax: SAPART <nick> <channel>,[<channel2>..]";
" Syntax: SAPART <nick> <channel>,[<channel2>..] [<comment>]";
" Example: SAPART hAtbLaDe #OperHelp";
" SAPART hAtbLaDe #Support,#IRCHelp";
" SAPART hAtbLaDe #Support,#IRCHelp Go away";
};
help Samode {
@@ -951,13 +1039,16 @@ help Sdesc {
};
help Mkpasswd {
" This command will Encrypt the string it has been given";
" So you can add it directly to the unrealircd.conf if you use";
" Encrypted passwords. Type can be crypt, sha1, or md5. Sha1";
" and md5 are only available when compiled with SSL support.";
" This command will return a 'hash' of the string that has been specified,"
" you can use this hash for any encrypted passwords in your configuration file:";
" eg: for oper::password, vhost::password, etc.";
" Available types (in order of 'secureness'):";
" *NIX: crypt, md5, sha1 [*], ripemd160 [*]";
" Windows: crypt [*], md5, sha1, ripemd160 [*]";
" [*: only available if compiled with SSL support]";
" -";
" Syntax: MKPASSWD <method> <password>";
" Example: MKPASSWD crypt mpsare";
" Example: MKPASSWD md5 IamTeh1337";
};
help Module {
@@ -1053,7 +1144,7 @@ help Svsjoin {
" Forces a user to join a channel.";
" Must be sent through an U:Lined server.";
" -";
" Syntax: SVSJOIN <nick> <channel>[,<channel2>..]";
" Syntax: SVSJOIN <nick> <channel>[,<channel2>..] [key1[,key2[..]]]";
" Example: SVSJOIN hAtbLaDe #jail";
" SVSJOIN hAtbLaDe #jail,#zoo";
};
@@ -1062,9 +1153,10 @@ help Svspart {
" Forces a user to leave a channel.";
" Must be sent through an U:Lined server.";
" -";
" Syntax: SVSPART <nick> <channel>[,<channel2>..]";
" Syntax: SVSPART <nick> <channel>[,<channel2>..] [<comment>]";
" Example: SVSPART hAtbLaDe #Hanson";
" SVSPART hAtbLaDe #Hanson,#AOL";
" SVSPART hAtbLaDe #Hanson,#AOL You must leave";
};
help Svso {
@@ -1191,7 +1283,8 @@ help Spamfilter {
" Use: /spamfilter [add|del|remove|+|-] [type] [action] [tkltime] [reason] [regex]";
" [type] specifies the target type, you can specify multiple targets:";
" 'c' channel msg, 'p' private msg, 'n' private notice,";
" 'N' channel notice, 'P' part msg, 'q' quit msg, 'd' dcc";
" 'N' channel notice, 'P' part msg, 'q' quit msg, 'd' dcc,";
" 'a' away, 't' topic, 'u' user (nick!user@host:realname ban)";
" [action] specifies the action to be taken (only 1 action can be specified):";
" 'kill', 'tempshun' (only shun current session), 'shun',";
" 'kline', 'gline', 'zline', 'gzline', 'block' (blocks the msg),";
@@ -1225,3 +1318,10 @@ help Tempshun {
" Example: TEMPSHUN evilguy suspected infection";
" TEMPSHUN -niceguy";
};
help DccAllow {
" For help on the DCCALLOW system, type '/DCCALLOW HELP'";
/* It would be useless and bad to include it here since that
* stuff quickly gets out-of-synch.
*/
};
+2 -5
View File
@@ -31,8 +31,9 @@ typedef struct {
#define AUTHTYPE_SSL_CLIENTCERT 4
#define AUTHTYPE_RIPEMD160 5
#ifdef USE_SSL
/* md5 is always available and enabled as of Unreal3.2.1 */
#define AUTHENABLE_MD5
#ifdef USE_SSL
#define AUTHENABLE_SHA1
#define AUTHENABLE_SSL_CLIENTCERT
#define AUTHENABLE_RIPEMD160
@@ -47,11 +48,7 @@ typedef struct {
#endif
#endif
#ifdef _WIN32
#ifndef AUTHENABLE_MD5
#define AUTHENABLE_MD5
#endif
#ifndef AUTHENABLE_SHA1
#define AUTHENABLE_SHA1
#endif
+33 -66
View File
@@ -36,7 +36,7 @@
#include <process.h>
#include <io.h>
#endif
//#include "dynconf.h"
#include "types.h"
#include "config.h"
#ifdef PARAMH
#include <sys/param.h>
@@ -96,12 +96,12 @@ void free();
#define TS time_t
extern int match(char *, char *);
extern int match(const char *, const char *);
#define mycmp(a,b) \
( (toupper(a[0])!=toupper(b[0])) || smycmp((a)+1,(b)+1) )
extern int smycmp(char *, char *);
extern int smycmp(const char *, const char *);
#ifndef GLIBC2_x
extern int myncmp(char *, char *, int);
extern int myncmp(const char *, const char *, int);
#endif
#ifdef NEED_STRTOK
@@ -125,7 +125,15 @@ extern char *inet_ntoa(struct IN_ADDR);
extern int inet_netof(struct IN_ADDR);
#endif
int global_count, max_global_count;
#ifndef HAVE_INET_NTOP
const char *inet_ntop(int, const void *, char *, size_t);
#endif
#ifndef HAVE_INET_PTON
int inet_pton(int af, const char *src, void *dst);
#endif
MODVAR int global_count, max_global_count;
extern char *myctime(time_t);
extern char *strtoken(char **, char *, char *);
@@ -140,10 +148,11 @@ extern char *strtoken(char **, char *, char *);
#define DupString(x,y) do{int l=strlen(y);x=MyMalloc(l+1);(void)memcpy(x,y, l+1);}while(0)
extern u_char tolowertab[], touppertab[];
extern MODVAR u_char tolowertab[], touppertab[];
#if defined(CHINESE_NICK) || defined(JAPANESE_NICK)
#if defined(NICK_GB2312) || defined(NICK_GBK) || defined(NICK_GBK_JAP)
#define USE_LOCALE
#include <ctype.h>
#endif
#ifndef USE_LOCALE
@@ -166,7 +175,7 @@ extern u_char tolowertab[], touppertab[];
#undef isspace
#undef iscntrl
#endif
extern unsigned char char_atribs[];
extern MODVAR unsigned char char_atribs[];
#define PRINT 1
#define CNTRL 2
@@ -175,6 +184,7 @@ extern unsigned char char_atribs[];
#define DIGIT 16
#define SPACE 32
#define ALLOW 64
#define ALLOWN 128
#ifndef KLINE_TEMP
#define KLINE_PERM 0
@@ -199,6 +209,7 @@ extern unsigned char char_atribs[];
#define isgraph(c) ((char_atribs[(u_char)(c)]&PRINT) && ((u_char)(c) != 0x32))
#define ispunct(c) (!(char_atribs[(u_char)(c)]&(CNTRL|ALPHA|DIGIT)))
#endif
#define iswseperator(c) (!isalnum(c) && !((u_char)c >= 128))
#ifndef MALLOCD
#define MyFree free
@@ -240,66 +251,18 @@ extern struct SLink *find_user_link( /* struct SLink *, struct Client * */ );
#define EXPAR4 ""
#endif /* EXTCMODE */
#define PROTOCTL_CLIENT_1 \
"MAP" \
" KNOCK" \
" SAFELIST" \
" HCN" \
" MAXCHANNELS=%i" \
" MAXBANS=%i" \
" NICKLEN=%i" \
" TOPICLEN=%i" \
" KICKLEN=%i" \
" MAXTARGETS=%i" \
" AWAYLEN=%i" \
" :are supported by this server"
#define PROTOCTL_PARAMETERS_1 \
MAXCHANNELSPERUSER, \
MAXBANS, \
NICKLEN, \
TOPICLEN, \
TOPICLEN, \
MAXTARGETS, \
TOPICLEN
#ifdef PREFIX_AQ
#define CHPFIX "(qaohv)~&@%+"
#define CHPAR1 "be"
#define CHPFIX "(qaohv)~&@%+"
#define CHPAR1 "beI"
#else
#define CHPFIX "(ohv)@%+"
#define CHPAR1 "beqa"
#define CHPFIX "(ohv)@%+"
#define CHPAR1 "beIqa"
#endif /* PREFIX_AQ */
#define CHPAR2 "kfL"
#define CHPAR3 "l"
#define CHPAR4 "psmntirRcOAQKVGCuzNSM"
#define CHPAR2 "kfL"
#define CHPAR3 "l"
#define CHPAR4 "psmntirRcOAQKVCuzNSM"
#define PROTOCTL_CLIENT_2 \
"WALLCHOPS" \
" WATCH=%i" \
" SILENCE=%i" \
" MODES=%i" \
" CHANTYPES=%s" \
" PREFIX=%s" \
" CHANMODES=%s%s,%s%s,%s%s,%s%s" \
" NETWORK=%s" \
" CASEMAPPING=%s" \
" EXTBAN=~,%s" \
" :are supported by this server"
#define PROTOCTL_PARAMETERS_2 \
MAXWATCH, \
SILENCE_LIMIT, \
MAXMODEPARAMS, \
"#", \
CHPFIX, \
CHPAR1, EXPAR1, \
CHPAR2, EXPAR2, \
CHPAR3, EXPAR3, \
"psmntirRcOAQKVGCuzNSM", EXPAR4, \
ircnet005, \
"ascii", \
extbanstr
/* Server-Server PROTOCTL -Stskeeps
* Please check send_proto() for more. -- Syzop
@@ -314,7 +277,8 @@ extern struct SLink *find_user_link( /* struct SLink *, struct Client * */ );
" SJ3" \
" NS" \
" SJB64" \
" TKLEXT"
" TKLEXT" \
" NICKIP"
#ifdef _WIN32
/*
@@ -322,7 +286,6 @@ extern struct SLink *find_user_link( /* struct SLink *, struct Client * */ );
* Windows' internal strerror() function doesn't work with socket errors.
*/
extern int DisplayString(HWND hWnd, char *InBuf, ...);
#undef strerror
#else
typedef int SOCKET;
#define INVALID_SOCKET -1
@@ -336,8 +299,9 @@ extern int lu_noninv, lu_inv, lu_serv, lu_oper,
lu_unknown, lu_channel, lu_lu, lu_lulocal, lu_lserv,
lu_clu, lu_mlu, lu_cglobalu, lu_mglobalu;
TS now;
MODVAR TS now;
#ifndef _WIN32
#if defined(__STDC__)
#define __const const
#define __signed signed
@@ -360,6 +324,9 @@ TS now;
#endif
#endif
#endif
#else
#define inline __inline
#endif
#define READBUF_SIZE 8192
+44 -75
View File
@@ -76,11 +76,6 @@
*/
#define SHOW_SECRET
/*
* This allows you to see modes in /list
*/
#define LIST_SHOW_MODES
/*
* Admin's chat...
*/
@@ -92,24 +87,12 @@
*/
#undef SECURECHANMSGSONLYGOTOSECURE
/*
* be compatible with older cloak keys? If you link to servers beta4 and
* earlier without this the cloak keys will produce diff results
* Not recommended, however, as beta4 and earlier 3.2 has an insecure
* cloak algo -griever
*/
#undef COMPAT_BETA4_KEYS
/*
If you want SHUN_NOTICES, define this
*/
#undef SHUN_NOTICES
/*
If you want to support chinese and/or japanese nicks
*/
#undef CHINESE_NICK
#undef JAPANESE_NICK
#undef NICK_GB2312
#undef NICK_GBK
#undef NICK_GBK_JAP
/*
Remote rehash
@@ -126,39 +109,12 @@
*/
#undef STRIPBADWORDS_CHAN_ALWAYS
/*
* NO_OPEROVERRIDE
* This will disable OperMode, OperTopic and Banwalks
*/
#undef NO_OPEROVERRIDE
/*
* OPEROVERRIDE_VERIFY
* This will prompt opers before permitting them to join +p/+s
* channels, decreasing the chances of someone "accidentally"
* entering a random channel.
*/
#undef OPEROVERRIDE_VERIFY
/*
* THROTTLING
* This will only allow 1 connection per ip in set::throttle::period time
*/
#define THROTTLING
/*
* NAZIISH_CHBAN_HANDLING (formerly ANNOYING_BAN_THING)
* Reject bans that are matched by existing bans, causes chanserv
* To flood-kick an akicked user if their akick is matched by another
* Ban, but if you don't mind, this can free up ban list space I guess
*/
#undef NAZIISH_CHBAN_HANDLING
/*
* Disable /sethost, /setident, /chgname, /chghost, /chgident
*/
#undef DISABLE_USERMOD
/*
* No spoof code
*
@@ -178,13 +134,6 @@
*/
#define HOSTILENAME /* [DO NOT CHANGE!] */
/*
* This makes topics include nick!user@host instead of nick in topic whoset,
* ALL servers must be Unreal3.2-beta12 or higher, and services may have some
* problems with this
*/
#undef TOPIC_NICK_IS_NUHOST
/*
* Use JOIN instead of SJOIN on every remotely sent JOIN
*/
@@ -241,7 +190,11 @@
* the maintainer.
*/
/* #undef DEBUGMODE define DEBUGMODE to enable debugging mode.*/
/* DEBUGMODE: This should only be used when tracing a problem. It creates
* an insane amount of log output which can be very useful for debugging.
* You should *NEVER* enable this setting on production servers.
*/
/* #undef DEBUGMODE */
/*
* Full pathnames and defaults of irc system's support files. Please note that
@@ -255,7 +208,6 @@
#define OPATH "oper.motd" /* Operators MOTD file */
#define LPATH "debug.log" /* Where the debug file lives, if DEBUGMODE */
#define PPATH "ircd.pid" /* file for server pid */
#define lPATH "ircd.log" /* server log file */
#define VPATH "ircd.svsmotd" /* Services MOTD append. */
#define BPATH "bot.motd" /* Bot MOTD */
#define IRCDTUNE "ircd.tune" /* tuning .. */
@@ -286,9 +238,25 @@
* that the 'new' access lets them. Note also that defining this is
* a major security hole if your ircd goes down and some other user
* starts up the server with a new conf file that has some extra
* O-lines. So don't use this unless you're debugging.
* O-lines.
* Naturally, for non-suid/sgid ircds, this setting does not matter,
* hence command line parameters are always permitted then.
*/
#undef CMDLINE_CONFIG /* allow conf-file to be specified on command line */
#undef CMDLINE_CONFIG
/** FAKELAG_CONFIGURABLE makes it possible to make certain classes exempted
* from 'fake lag' (that is, the artificial delay that is added by the ircd
* to prevent flooding, which causes the messages/commands of the user to
* slow down). Naturally, incorrect use of this feature can cause SEVERE
* issues, in fact it can easily bring your whole IRCd down if one of the
* users with class::options::nofakelag does a good flood at full speed.
* Hence, this is disabled by default, and you need to explicitly enable it
* here IF YOU KNOW WHAT YOU ARE DOING. People complaining their ircd
* ""crashed"" because of this setting will be shot. </DISCLAIMER>
* Common usage for this are: a trusted bot ran by an IRCOp, that you only
* want to give "flood access" and nothing else, and other such things.
*/
#undef FAKELAG_CONFIGURABLE
/*
* Size of the LISTEN request. Some machines handle this large
@@ -374,25 +342,13 @@
#define PORTNUM 6667 /* 6667 is default */
/*
* Maximum number of network connections your server will allow. This should
* never exceed max. number of open file descrpitors and wont increase this.
* Should remain LOW as possible. Most sites will usually have under 30 or so
* connections. A busy hub or server may need this to be as high as 50 or 60.
* Making it over 100 decreases any performance boost gained from it being low.
* if you have a lot of server connections, it may be worth splitting the load
* over 2 or more servers.
* 1 server = 1 connection, 1 user = 1 connection.
* This should be at *least* 3: 1 listen port, 1 dns port + 1 client
*
* Note: this figure will be too high for most systems. If you get an
* fd-related error on compile, change this to 256.
*
* Windows users: This should be a fairly high number. Some operations
* will slow down because of this, but it is _required_ because of the way
* windows NT(and possibly 95) allocate fd handles. A good number is 16384.
* Maximum number of network connections your server will allow.
* This is usually configured via ./Config on *NIX,
* the setting mentioned below is the default for Windows.
* 2004-10-13: 1024 -> 4096
*/
#ifndef MAXCONNECTIONS
#define MAXCONNECTIONS 1024
#define MAXCONNECTIONS 4096
#endif
/*
@@ -483,9 +439,15 @@
*/
#define SIXBONE_HACK
/*
* Forces Unreal to use compressed IPv6 addresses rather than expanding them
*/
#undef IPV6_COMPRESSED
/*
* Extended channel modes. This extends the channel modes with yet another
* 32 possible modes which can also be used in modules.
* This is now pretty much required.
*/
#define EXTCMODE
@@ -495,6 +457,13 @@
*/
#define NEWCHFLOODPROT
/* JoinThrottle (chanmode +j): +j x:y throttles users to X joins per Y seconds (per-user).
* In peak situations (eg: just after a server restart with thousand clients joining
* hundreds of channels) it can use like ~200k, but in normal circumstances you should
* count on just ~10-50k.
*/
#define JOINTHROTTLE
/* ------------------------- END CONFIGURATION SECTION -------------------- */
#define MOTD MPATH
#define RULES RPATH
+117 -10
View File
@@ -27,10 +27,6 @@
typedef struct zNetwork aNetwork;
struct zNetwork {
long key;
long key2;
long key3;
long keycrc;
unsigned x_inah:1;
char *x_ircnetwork;
char *x_ircnet005;
@@ -74,6 +70,7 @@ typedef struct zConfiguration aConfiguration;
struct zConfiguration {
unsigned som:1;
unsigned hide_ulines:1;
unsigned flat_map:1;
unsigned allow_chatops:1;
unsigned webtv_support:1;
unsigned no_oper_hiding:1;
@@ -88,11 +85,13 @@ struct zConfiguration {
long host_timeout;
int host_retries;
char *name_server;
char *dns_bindip;
#ifdef THROTTLING
long throttle_period;
char throttle_count;
#endif
char *kline_address;
char *gline_address;
long conn_modes;
long oper_modes;
char *oper_snomask;
@@ -102,6 +101,7 @@ struct zConfiguration {
char *oper_only_stats;
OperStat *oper_only_stats_ext;
int maxchannelsperuser;
int maxdccallow;
int anti_spam_quit_message_time;
char *egd_path;
char *static_quit;
@@ -111,10 +111,14 @@ struct zConfiguration {
char *x_server_key_pem;
char *trusted_ca_file;
long ssl_options;
#elif defined(_WIN32)
void *bogus1, *bogus2, *bogus3;
long bogus4;
#endif
enum UHAllowed userhost_allowed;
char *restrict_usermodes;
char *restrict_channelmodes;
char *restrict_extendedbans;
char *channel_command_prefix;
long unknown_flood_bantime;
long unknown_flood_amount;
@@ -138,24 +142,28 @@ struct zConfiguration {
long spamfilter_ban_time;
char *spamfilter_ban_reason;
char *spamfilter_virus_help_channel;
char spamfilter_vchan_deny;
SpamExcept *spamexcept;
char *spamexcept_line;
aNetwork network;
};
#ifndef DYNCONF_C
extern aConfiguration iConf;
extern MODVAR aConfiguration iConf;
#endif
#define KLINE_ADDRESS iConf.kline_address
#define KLINE_ADDRESS iConf.kline_address
#define GLINE_ADDRESS iConf.gline_address
#define CONN_MODES iConf.conn_modes
#define OPER_MODES iConf.oper_modes
#define OPER_SNOMASK iConf.oper_snomask
#define CONNECT_SNOMASK iConf.user_snomask
#define SHOWOPERMOTD iConf.som
#define HIDE_ULINES iConf.hide_ulines
#define FLAT_MAP iConf.flat_map
#define ALLOW_CHATOPS iConf.allow_chatops
#define MAXCHANNELSPERUSER iConf.maxchannelsperuser
#define MAXDCCALLOW iConf.maxdccallow
#define WEBTV_SUPPORT iConf.webtv_support
#define NO_OPER_HIDING iConf.no_oper_hiding
#define DONT_RESOLVE iConf.dont_resolve
@@ -164,6 +172,7 @@ extern aConfiguration iConf;
#define HOST_TIMEOUT iConf.host_timeout
#define HOST_RETRIES iConf.host_retries
#define NAME_SERVER iConf.name_server
#define DNS_BINDIP iConf.dns_bindip
#define IDENT_CHECK iConf.ident_check
#define FAILOPER_WARN iConf.fail_oper_warn
#define SHOWCONNECTINFO iConf.show_connect_info
@@ -191,15 +200,12 @@ extern aConfiguration iConf;
#define SSL_SERVER_CERT_PEM (iConf.x_server_cert_pem ? iConf.x_server_cert_pem : "server.cert.pem")
#define SSL_SERVER_KEY_PEM (iConf.x_server_key_pem ? iConf.x_server_key_pem : "server.key.pem")
#define CLOAK_KEY1 iConf.network.key
#define CLOAK_KEY2 iConf.network.key2
#define CLOAK_KEY3 iConf.network.key3
#define CLOAK_KEYCRC iConf.network.keycrc
#define STATIC_QUIT iConf.static_quit
#define STATIC_PART iConf.static_part
#define UHOST_ALLOWED iConf.userhost_allowed
#define RESTRICT_USERMODES iConf.restrict_usermodes
#define RESTRICT_CHANNELMODES iConf.restrict_channelmodes
#define RESTRICT_EXTENDEDBANS iConf.restrict_extendedbans
#ifdef THROTTLING
#define THROTTLING_PERIOD iConf.throttle_period
#define THROTTLING_COUNT iConf.throttle_count
@@ -238,4 +244,105 @@ extern aConfiguration iConf;
#define SPAMFILTER_BAN_TIME iConf.spamfilter_ban_time
#define SPAMFILTER_BAN_REASON iConf.spamfilter_ban_reason
#define SPAMFILTER_VIRUSCHAN iConf.spamfilter_virus_help_channel
#define SPAMFILTER_VIRUSCHANDENY iConf.spamfilter_vchan_deny
#define SPAMFILTER_EXCEPT iConf.spamexcept_line
/* Used for duplicate checking */
struct SetCheck {
unsigned has_show_opermotd:1;
unsigned has_hide_ulines:1;
unsigned has_flat_map:1;
unsigned has_allow_chatops:1;
unsigned has_webtv_support:1;
unsigned has_no_oper_hiding:1;
unsigned has_ident_check:1;
unsigned has_fail_oper_warn:1;
unsigned has_show_connect_info:1;
unsigned has_dont_resolve:1;
unsigned has_mkpasswd_for_everyone:1;
unsigned has_allow_part_if_shunned:1;
unsigned has_ssl_egd:1;
unsigned has_dns_timeout:1;
unsigned has_dns_retries:1;
unsigned has_dns_nameserver:1;
#ifdef THROTTLING
unsigned has_throttle_period:1;
unsigned has_throttle_connections:1;
#endif
unsigned has_kline_address:1;
unsigned has_gline_address:1;
unsigned has_modes_on_connect:1;
unsigned has_modes_on_oper:1;
unsigned has_snomask_on_connect:1;
unsigned has_snomask_on_oper:1;
unsigned has_auto_join:1;
unsigned has_oper_auto_join:1;
unsigned has_oper_only_stats:1;
unsigned has_maxchannelsperuser:1;
unsigned has_maxdccallow:1;
unsigned has_anti_spam_quit_message_time:1;
unsigned has_egd_path:1;
unsigned has_static_quit:1;
unsigned has_static_part:1;
#ifdef USE_SSL
unsigned has_ssl_certificate:1;
unsigned has_ssl_key:1;
unsigned has_ssl_trusted_ca_file:1;
unsigned has_ssl_options:1;
#endif
unsigned has_allow_userhost_change:1;
unsigned has_restrict_usermodes:1;
unsigned has_restrict_channelmodes:1;
unsigned has_restrict_extendedbans:1;
unsigned has_channel_command_prefix:1;
unsigned has_anti_flood_unknown_flood_bantime:1;
unsigned has_anti_flood_unknown_flood_amount:1;
unsigned has_modes_on_join:1;
#ifdef NO_FLOOD_AWAY
unsigned has_anti_flood_away_count:1;
unsigned has_anti_flood_away_period:1;
#endif
unsigned has_anti_flood_nick_flood:1;
unsigned has_ident_connect_timeout:1;
unsigned has_ident_read_timeout:1;
unsigned has_default_bantime:1;
unsigned has_who_limit:1;
unsigned has_silence_limit:1;
#ifdef NEWCHFLOODPROT
unsigned has_modef_default_unsettime:1;
unsigned has_modef_max_unsettime:1;
#endif
unsigned has_ban_version_tkl_time:1;
unsigned has_spamfilter_ban_time:1;
unsigned has_spamfilter_ban_reason:1;
unsigned has_spamfilter_virus_help_channel:1;
unsigned has_spamfilter_virus_help_channel_deny:1;
unsigned has_spamfilter_except:1;
unsigned has_hosts_host_on_oper_up:1;
unsigned has_network_name:1;
unsigned has_default_server:1;
unsigned has_services_server:1;
unsigned has_hosts_global:1;
unsigned has_hosts_admin:1;
unsigned has_hosts_local:1;
unsigned has_hosts_servicesadmin:1;
unsigned has_hosts_netadmin:1;
unsigned has_hosts_coadmin:1;
unsigned has_hiddenhost_prefix:1;
unsigned has_prefix_quit:1;
unsigned has_help_channel:1;
unsigned has_stats_server:1;
unsigned has_cloak_keys:1;
unsigned has_options_webtv_support:1;
unsigned has_options_hide_ulines:1;
unsigned has_options_flat_map:1;
unsigned has_options_show_opermotd:1;
unsigned has_options_identd_check:1;
unsigned has_options_fail_oper_warn:1;
unsigned has_options_dont_resolve:1;
unsigned has_options_show_connect_info:1;
unsigned has_options_mkpasswd_for_everyone:1;
unsigned has_options_allow_part_if_shunned:1;
};
+1 -1
View File
@@ -13,7 +13,7 @@ void delfrom_fdlist(int a, fdlist * b);
void init_fdlist(fdlist * b);
#ifndef NO_FDLIST
extern fdlist oper_fdlist;
extern MODVAR fdlist oper_fdlist;
#endif
+230 -147
View File
@@ -25,28 +25,29 @@
* Most of the externs and prototypes thrown in here to 'cleanup' things.
* -avalon
*/
#include "setup.h"
#ifndef NO_FDLIST
#include "fdlist.h"
#endif
extern char *extraflags;
extern int tainted;
extern MODVAR char *extraflags;
extern MODVAR int tainted;
/* for the new s_err.c */
extern char *getreply(int);
#define rpl_str(x) getreply(x)
#define err_str(x) getreply(x)
extern Member *freemember;
extern Membership *freemembership;
extern MembershipL *freemembershipL;
extern TS nextconnect, nextdnscheck, nextping;
extern aClient *client, me, *local[];
extern aChannel *channel;
extern struct stats *ircstp;
extern int bootopt;
extern time_t TSoffset;
extern MODVAR Member *freemember;
extern MODVAR Membership *freemembership;
extern MODVAR MembershipL *freemembershipL;
extern MODVAR TS nextconnect, nextdnscheck, nextping;
extern MODVAR aClient *client, me, *local[];
extern MODVAR aChannel *channel;
extern MODVAR struct stats *ircstp;
extern MODVAR int bootopt;
extern MODVAR time_t TSoffset;
/* Prototype added to force errors -- Barubary */
extern TS check_pings(TS now);
extern TS TS2ts(char *s);
extern time_t timeofday;
extern MODVAR time_t timeofday;
/* newconf */
#define get_sendq(x) ((x)->class ? (x)->class->sendq : MAXSENDQLENGTH)
/* get_recvq is only called in send.c for local connections */
@@ -55,53 +56,53 @@ extern time_t timeofday;
#define CMD_FUNC(x) int (x) (aClient *cptr, aClient *sptr, int parc, char *parv[])
#ifndef NO_FDLIST
extern float currentrate;
extern float currentrate2; /* outgoing */
extern float highest_rate;
extern float highest_rate2;
extern int lifesux;
extern int LRV;
extern time_t LCF;
extern int currlife;
extern int HTMLOCK;
extern int noisy_htm;
extern long lastsendK, lastrecvK;
extern MODVAR float currentrate;
extern MODVAR float currentrate2; /* outgoing */
extern MODVAR float highest_rate;
extern MODVAR float highest_rate2;
extern MODVAR int lifesux;
extern MODVAR int LRV;
extern MODVAR time_t LCF;
extern MODVAR int currlife;
extern MODVAR int HTMLOCK;
extern MODVAR int noisy_htm;
extern MODVAR long lastsendK, lastrecvK;
#endif
/*
* Configuration linked lists
*/
extern ConfigItem_me *conf_me;
extern ConfigItem_class *conf_class;
extern ConfigItem_class *default_class;
extern ConfigItem_admin *conf_admin;
extern ConfigItem_admin *conf_admin_tail;
extern ConfigItem_drpass *conf_drpass;
extern ConfigItem_ulines *conf_ulines;
extern ConfigItem_tld *conf_tld;
extern ConfigItem_oper *conf_oper;
extern ConfigItem_listen *conf_listen;
extern ConfigItem_allow *conf_allow;
extern ConfigItem_except *conf_except;
extern ConfigItem_vhost *conf_vhost;
extern ConfigItem_link *conf_link;
extern ConfigItem_ban *conf_ban;
extern ConfigItem_badword *conf_badword_channel;
extern ConfigItem_badword *conf_badword_message;
extern ConfigItem_badword *conf_badword_quit;
extern ConfigItem_deny_dcc *conf_deny_dcc;
extern ConfigItem_deny_channel *conf_deny_channel;
extern ConfigItem_deny_link *conf_deny_link;
extern ConfigItem_allow_channel *conf_allow_channel;
extern ConfigItem_deny_version *conf_deny_version;
extern ConfigItem_log *conf_log;
extern ConfigItem_alias *conf_alias;
extern ConfigItem_include *conf_include;
extern ConfigItem_help *conf_help;
extern ConfigItem_offchans *conf_offchans;
extern MODVAR ConfigItem_me *conf_me;
extern MODVAR ConfigItem_class *conf_class;
extern MODVAR ConfigItem_class *default_class;
extern MODVAR ConfigItem_admin *conf_admin;
extern MODVAR ConfigItem_admin *conf_admin_tail;
extern MODVAR ConfigItem_drpass *conf_drpass;
extern MODVAR ConfigItem_ulines *conf_ulines;
extern MODVAR ConfigItem_tld *conf_tld;
extern MODVAR ConfigItem_oper *conf_oper;
extern MODVAR ConfigItem_listen *conf_listen;
extern MODVAR ConfigItem_allow *conf_allow;
extern MODVAR ConfigItem_except *conf_except;
extern MODVAR ConfigItem_vhost *conf_vhost;
extern MODVAR ConfigItem_link *conf_link;
extern MODVAR ConfigItem_ban *conf_ban;
extern MODVAR ConfigItem_badword *conf_badword_channel;
extern MODVAR ConfigItem_badword *conf_badword_message;
extern MODVAR ConfigItem_badword *conf_badword_quit;
extern MODVAR ConfigItem_deny_dcc *conf_deny_dcc;
extern MODVAR ConfigItem_deny_channel *conf_deny_channel;
extern MODVAR ConfigItem_deny_link *conf_deny_link;
extern MODVAR ConfigItem_allow_channel *conf_allow_channel;
extern MODVAR ConfigItem_allow_dcc *conf_allow_dcc;
extern MODVAR ConfigItem_deny_version *conf_deny_version;
extern MODVAR ConfigItem_log *conf_log;
extern MODVAR ConfigItem_alias *conf_alias;
extern MODVAR ConfigItem_include *conf_include;
extern MODVAR ConfigItem_help *conf_help;
extern MODVAR ConfigItem_offchans *conf_offchans;
extern int completed_connection(aClient *);
extern void clear_unknown();
extern EVENT(tkl_check_expire);
extern EVENT(e_unload_module_delayed);
#ifdef THROTTLING
extern EVENT(e_clean_out_throttling_buckets);
@@ -110,9 +111,8 @@ extern EVENT(e_clean_out_throttling_buckets);
extern void module_loadall(int module_load);
extern long set_usermode(char *umode);
extern char *get_modestr(long umodes);
extern void tkl_stats(aClient *cptr, int type, char *para);
extern void config_error(char *format, ...) __attribute__((format(printf,1,2)));
extern int config_verbose;
extern MODVAR int config_verbose;
extern void config_progress(char *format, ...) __attribute__((format(printf,1,2)));
extern void ipport_seperate(char *string, char **ip, char **port);
ConfigItem_class *Find_class(char *name);
@@ -120,28 +120,26 @@ ConfigItem_deny_dcc *Find_deny_dcc(char *name);
ConfigItem_oper *Find_oper(char *name);
ConfigItem_listen *Find_listen(char *ipmask, int port);
ConfigItem_ulines *Find_uline(char *host);
ConfigItem_except *Find_except(char *host, short type);
ConfigItem_except *Find_except(aClient *, char *host, short type);
ConfigItem_tld *Find_tld(aClient *cptr, char *host);
ConfigItem_link *Find_link(char *username, char *hostname, char *ip, char *servername);
ConfigItem_ban *Find_ban(char *host, short type);
ConfigItem_ban *Find_banEx(char *host, short type, short type2);
ConfigItem_ban *Find_ban(aClient *, char *host, short type);
ConfigItem_ban *Find_banEx(aClient *,char *host, short type, short type2);
ConfigItem_vhost *Find_vhost(char *name);
ConfigItem_deny_channel *Find_channel_allowed(char *name);
ConfigItem_alias *Find_alias(char *name);
ConfigItem_help *Find_Help(char *command);
int AllowClient(aClient *cptr, struct hostent *hp, char *sockhost, char *username);
int parse_netmask(const char *text, struct IN_ADDR *addr, int *b);
int match_ipv4(struct IN_ADDR *addr, struct IN_ADDR *mask, int b);
#ifdef INET6
int match_ipv6(struct IN_ADDR *addr, struct IN_ADDR *mask, int b);
#endif
extern struct tm motd_tm, smotd_tm;
extern Link *Servers;
int parse_netmask(const char *text, struct irc_netmask *netmask);
int match_ip(struct IN_ADDR addr, char *uhost, char *mask, struct irc_netmask *netmask);
ConfigItem_ban *Find_ban_ip(aClient *sptr);
extern MODVAR struct tm motd_tm, smotd_tm;
extern MODVAR Link *Servers;
void add_ListItem(ListStruct *, ListStruct **);
ListStruct *del_ListItem(ListStruct *, ListStruct **);
/* Remmed out for win32 compatibility.. as stated of 467leaf win32 port.. */
extern aClient *find_match_server(char *mask);
extern LoopStruct loop;
extern MODVAR LoopStruct loop;
extern int del_banid(aChannel *chptr, char *banid);
extern int del_exbanid(aChannel *chptr, char *banid);
#ifdef SHOWCONNECTINFO
@@ -155,11 +153,11 @@ extern int del_exbanid(aChannel *chptr, char *banid);
#define BREPORT_FIN_ID "NOTICE AUTH :*** Received identd response\r\n"
#define BREPORT_FAIL_ID "NOTICE AUTH :*** No ident response; username prefixed with ~\r\n"
extern char REPORT_DO_DNS[256], REPORT_FIN_DNS[256], REPORT_FIN_DNSC[256],
extern MODVAR char REPORT_DO_DNS[256], REPORT_FIN_DNS[256], REPORT_FIN_DNSC[256],
REPORT_FAIL_DNS[256], REPORT_DO_ID[256], REPORT_FIN_ID[256],
REPORT_FAIL_ID[256];
extern int R_do_dns, R_fin_dns, R_fin_dnsc, R_fail_dns,
extern MODVAR int R_do_dns, R_fin_dns, R_fin_dnsc, R_fail_dns,
R_do_id, R_fin_id, R_fail_id;
#endif
@@ -183,6 +181,7 @@ extern int del_silence(aClient *, char *);
extern void send_user_joins(aClient *, aClient *);
extern void clean_channelname(char *);
extern int do_nick_name(char *);
extern int do_remote_nick_name(char *);
extern int can_send(aClient *, aChannel *, char *, int);
extern long get_access(aClient *, aChannel *);
extern int is_chan_op(aClient *, aChannel *);
@@ -205,10 +204,14 @@ extern int attach_conf(aClient *, aConfItem *);
extern void inittoken();
extern void reset_help();
extern char *debugmode, *configfile, *sbrk0;
extern MODVAR char *debugmode, *configfile, *sbrk0;
extern char *getfield(char *);
extern void get_sockhost(aClient *, char *);
#ifndef _WIN32
extern char *strerror(int);
#else
extern MODFUNC char *sock_strerror(int);
#endif
extern int dgets(int, char *, int);
extern char *inetntoa(char *);
@@ -220,14 +223,14 @@ extern int vsnprintf (char *str, size_t count, const char *fmt, va_list arg);
#endif
#ifdef _WIN32
extern int dbufalloc, dbufblocks, debuglevel;
extern MODVAR int dbufalloc, dbufblocks, debuglevel;
#else
extern int dbufalloc, dbufblocks, debuglevel, errno, h_errno;
#endif
extern short LastSlot; /* last used index in local client array */
extern int OpenFiles; /* number of files currently open */
extern int debuglevel, portnum, debugtty, maxusersperchannel;
extern int readcalls, udpfd, resfd;
extern MODVAR short LastSlot; /* last used index in local client array */
extern MODVAR int OpenFiles; /* number of files currently open */
extern MODVAR int debuglevel, portnum, debugtty, maxusersperchannel;
extern MODVAR int readcalls, udpfd, resfd;
extern aClient *add_connection(aClient *, int);
extern int add_listener(aConfItem *);
extern void add_local_domain(char *, int);
@@ -310,8 +313,11 @@ extern void sendto_opers(char *, ...) __attribute__((format(printf,1,2)));
extern void sendto_umode(int, char *, ...) __attribute__((format(printf,2,3)));
extern void sendto_umode_raw(int, char *, ...) __attribute__((format(printf,2,3)));
extern void sendto_snomask(int snomask, char *pattern, ...) __attribute__((format(printf,2,3)));
extern void sendto_snomask_global(int snomask, char *pattern, ...) __attribute__((format(printf,2,3)));
extern void sendto_snomask_normal(int snomask, char *pattern, ...) __attribute__((format(printf,2,3)));
extern void sendto_snomask_normal_global(int snomask, char *pattern, ...) __attribute__((format(printf,2,3)));
extern void sendnotice(aClient *to, char *pattern, ...) __attribute__((format(printf,2,3)));
extern int writecalls, writeb[];
extern MODVAR int writecalls, writeb[];
extern int deliver_it(aClient *, char *, int);
extern int check_for_chan_flood(aClient *cptr, aClient *sptr, aChannel *chptr);
extern int check_for_target_limit(aClient *sptr, void *target, const char *name);
@@ -323,7 +329,8 @@ extern unsigned char *StripColors(unsigned char *);
extern const char *StripControlCodes(unsigned char *text);
extern char *canonize(char *buffer);
extern int webtv_parse(aClient *sptr, char *string);
extern ConfigItem_deny_dcc *dcc_isforbidden(aClient *cptr, aClient *sptr, aClient *target, char *filename);
extern ConfigItem_deny_dcc *dcc_isforbidden(aClient *sptr, char *filename);
extern ConfigItem_deny_dcc *dcc_isdiscouraged(aClient *sptr, char *filename);
extern int check_registered(aClient *);
extern int check_registered_user(aClient *);
extern char *get_client_name(aClient *, int);
@@ -340,7 +347,6 @@ extern int hunt_server(aClient *, aClient *, char *, int, int, char **);
extern int hunt_server_token(aClient *, aClient *, char *, char *, char *, int, int, char **);
extern int hunt_server_token_quiet(aClient *, aClient *, char *, char *, char *, int, int, char **);
extern aClient *next_client(aClient *, char *);
extern int m_umode(aClient *, aClient *, int, char **);
extern int m_names(aClient *, aClient *, int, char **);
extern int m_server_estab(aClient *);
extern void umode_init(void);
@@ -379,7 +385,7 @@ extern struct hostent *get_res(char *);
extern struct hostent *gethost_byaddr(char *, Link *);
extern struct hostent *gethost_byname(char *, Link *);
extern void flush_cache();
extern int init_resolver(int);
extern void init_resolver(void);
extern time_t timeout_query_list(time_t);
extern time_t expire_cache(time_t);
extern void del_queries(char *);
@@ -410,52 +416,57 @@ extern time_t atime(char *xtime);
/* Mode externs
*/
extern long UMODE_INVISIBLE; /* 0x0001 makes user invisible */
extern long UMODE_OPER; /* 0x0002 Operator */
extern long UMODE_WALLOP; /* 0x0004 send wallops to them */
extern long UMODE_FAILOP; /* 0x0008 Shows some global messages */
extern long UMODE_HELPOP; /* 0x0010 Help system operator */
extern long UMODE_REGNICK; /* 0x0020 Nick set by services as registered */
extern long UMODE_SADMIN; /* 0x0040 Services Admin */
extern long UMODE_ADMIN; /* 0x0080 Admin */
extern long UMODE_SERVNOTICE;/* 0x0100 server notices such as kill */
extern long UMODE_LOCOP; /* 0x0200 Local operator -- SRB */
extern long UMODE_RGSTRONLY; /* 0x0400 Only reg nick message */
extern long UMODE_WEBTV; /* 0x0800 WebTV Client */
extern long UMODE_SERVICES; /* 0x4000 services */
extern long UMODE_HIDE; /* 0x8000 Hide from Nukes */
extern long UMODE_NETADMIN; /* 0x10000 Network Admin */
extern long UMODE_COADMIN; /* 0x80000 Co Admin */
extern long UMODE_WHOIS; /* 0x100000 gets notice on /whois */
extern long UMODE_KIX; /* 0x200000 usermode +q */
extern long UMODE_BOT; /* 0x400000 User is a bot */
extern long UMODE_SECURE; /* 0x800000 User is a secure connect */
extern long UMODE_VICTIM; /* 0x8000000 Intentional Victim */
extern long UMODE_DEAF; /* 0x10000000 Deaf */
extern long UMODE_HIDEOPER; /* 0x20000000 Hide oper mode */
extern long UMODE_SETHOST; /* 0x40000000 used sethost */
extern long UMODE_STRIPBADWORDS; /* 0x80000000 */
extern long UMODE_HIDEWHOIS; /* hides channels in /whois */
extern long UMODE_NOCTCP; /* blocks all ctcp (except dcc and action) */
extern long AllUmodes, SendUmodes;
extern MODVAR long UMODE_INVISIBLE; /* 0x0001 makes user invisible */
extern MODVAR long UMODE_OPER; /* 0x0002 Operator */
extern MODVAR long UMODE_WALLOP; /* 0x0004 send wallops to them */
extern MODVAR long UMODE_FAILOP; /* 0x0008 Shows some global messages */
extern MODVAR long UMODE_HELPOP; /* 0x0010 Help system operator */
extern MODVAR long UMODE_REGNICK; /* 0x0020 Nick set by services as registered */
extern MODVAR long UMODE_SADMIN; /* 0x0040 Services Admin */
extern MODVAR long UMODE_ADMIN; /* 0x0080 Admin */
extern MODVAR long UMODE_SERVNOTICE;/* 0x0100 server notices such as kill */
extern MODVAR long UMODE_LOCOP; /* 0x0200 Local operator -- SRB */
extern MODVAR long UMODE_RGSTRONLY; /* 0x0400 Only reg nick message */
extern MODVAR long UMODE_WEBTV; /* 0x0800 WebTV Client */
extern MODVAR long UMODE_SERVICES; /* 0x4000 services */
extern MODVAR long UMODE_HIDE; /* 0x8000 Hide from Nukes */
extern MODVAR long UMODE_NETADMIN; /* 0x10000 Network Admin */
extern MODVAR long UMODE_COADMIN; /* 0x80000 Co Admin */
extern MODVAR long UMODE_WHOIS; /* 0x100000 gets notice on /whois */
extern MODVAR long UMODE_KIX; /* 0x200000 usermode +q */
extern MODVAR long UMODE_BOT; /* 0x400000 User is a bot */
extern MODVAR long UMODE_SECURE; /* 0x800000 User is a secure connect */
extern MODVAR long UMODE_VICTIM; /* 0x8000000 Intentional Victim */
extern MODVAR long UMODE_DEAF; /* 0x10000000 Deaf */
extern MODVAR long UMODE_HIDEOPER; /* 0x20000000 Hide oper mode */
extern MODVAR long UMODE_SETHOST; /* 0x40000000 used sethost */
extern MODVAR long UMODE_STRIPBADWORDS; /* 0x80000000 */
extern MODVAR long UMODE_HIDEWHOIS; /* hides channels in /whois */
extern MODVAR long UMODE_NOCTCP; /* blocks all ctcp (except dcc and action) */
extern MODVAR long AllUmodes, SendUmodes;
extern long SNO_KILLS;
extern long SNO_CLIENT;
extern long SNO_FLOOD;
extern long SNO_FCLIENT;
extern long SNO_JUNK;
extern long SNO_VHOST;
extern long SNO_EYES;
extern long SNO_TKL;
extern long SNO_NICKCHANGE;
extern long SNO_FNICKCHANGE;
extern long SNO_QLINE;
extern long SNO_SNOTICE;
extern long SNO_SPAMF;
extern MODVAR long SNO_KILLS;
extern MODVAR long SNO_CLIENT;
extern MODVAR long SNO_FLOOD;
extern MODVAR long SNO_FCLIENT;
extern MODVAR long SNO_JUNK;
extern MODVAR long SNO_VHOST;
extern MODVAR long SNO_EYES;
extern MODVAR long SNO_TKL;
extern MODVAR long SNO_NICKCHANGE;
extern MODVAR long SNO_FNICKCHANGE;
extern MODVAR long SNO_QLINE;
extern MODVAR long SNO_SNOTICE;
extern MODVAR long SNO_SPAMF;
extern MODVAR long SNO_OPER;
#ifdef EXTCMODE
/* Extended chanmodes... */
extern Cmode_t EXTMODE_NONOTICE;
extern MODVAR Cmode_t EXTMODE_NONOTICE;
#ifdef STRIPBADWORDS
extern MODVAR Cmode_t EXTMODE_STRIPBADWORDS;
#endif
extern MODVAR Cmode_t EXTMODE_JOINTHROTTLE;
#endif
#ifndef HAVE_STRLCPY
@@ -476,6 +487,7 @@ extern void debug(int, char *, ...);
extern void send_usage(aClient *, char *);
extern void send_listinfo(aClient *, char *);
extern void count_memory(aClient *, char *);
extern int checkprotoflags(aClient *, int, char *, int);
#endif
#ifdef INET6
@@ -495,8 +507,8 @@ char *Inet_ia2pNB(struct IN_ADDR *ia, int compressed);
/*
* CommandHash -Stskeeps
*/
extern aCommand *CommandHash[256];
extern aCommand *TokenHash[256];
extern MODVAR aCommand *CommandHash[256];
extern MODVAR aCommand *TokenHash[256];
extern void init_CommandHash(void);
extern aCommand *add_Command_backend(char *cmd, int (*func)(), unsigned char parameters, unsigned char token, int flags);
extern void add_Command(char *cmd, char *token, int (*func)(), unsigned char parameters);
@@ -542,10 +554,6 @@ extern char *make_virthost(char *curr, char *new, int mode);
extern int channel_canjoin(aClient *sptr, char *name);
extern char *collapse(char *pattern);
extern void send_list(aClient *cptr, int numsend);
extern int find_tkline_match_zap(aClient *cptr);
extern int find_shun(aClient *cptr);
extern aTKline *find_qline(aClient *cptr, char *nick, int *ishold);
extern void tkl_synch(aClient *sptr);
extern void dcc_sync(aClient *sptr);
extern void report_flines(aClient *sptr);
extern void report_network(aClient *sptr);
@@ -585,7 +593,7 @@ extern time_t rfc2time(char *s);
extern char *rfctime(time_t t, char *buf);
extern void *MyMallocEx(size_t size);
#ifdef USE_SSL
extern char *ssl_get_cipher(SSL *ssl);
extern MODFUNC char *ssl_get_cipher(SSL *ssl);
#endif
extern long config_checkval(char *value, unsigned short flags);
extern void config_status(char *format, ...) __attribute__((format(printf,1,2)));
@@ -593,14 +601,14 @@ extern void init_random();
extern u_char getrandom8();
extern u_int16_t getrandom16();
extern u_int32_t getrandom32();
extern char trouble_info[1024];
extern MODVAR char trouble_info[1024];
#define EVENT_DRUGS BASE_VERSION
extern void rejoin_doparts(aClient *sptr);
extern void rejoin_dojoinandmode(aClient *sptr);
extern void rejoin_doparts(aClient *sptr, char did_parts[]);
extern void rejoin_dojoinandmode(aClient *sptr, char did_parts[]);
extern void ident_failed(aClient *cptr);
extern char extchmstr[4][64];
extern char extbanstr[EXTBANTABLESZ+1];
extern MODVAR char extchmstr[4][64];
extern MODVAR char extbanstr[EXTBANTABLESZ+1];
#ifdef EXTCMODE
extern int extcmode_default_requirechop(aClient *, aChannel *, char *, int, int);
extern int extcmode_default_requirehalfop(aClient *, aChannel *, char *, int, int);
@@ -629,23 +637,23 @@ extern int l_commands_Load(int);
#endif
extern void sendto_chmodemucrap(aClient *, aChannel *, char *);
extern void verify_opercount(aClient *, char *);
extern int place_host_ban(aClient *sptr, int action, char *reason, long time);
extern int valid_host(char *host);
extern int count_oper_sessions(char *);
extern char *unreal_mktemp(char *dir, char *suffix);
extern char *unreal_getpathname(char *filepath, char *path);
extern char *unreal_getfilename(char *path);
extern int unreal_copyfile(char *src, char *dest);
extern int unreal_copyfileex(char *src, char *dest, int tryhardlink);
extern time_t unreal_getfilemodtime(char *filename);
extern void unreal_setfilemodtime(char *filename, time_t mtime);
extern void DeleteTempModules(void);
extern Extban *extbaninfo;
extern MODVAR Extban *extbaninfo;
extern Extban *findmod_by_bantype(char c);
extern Extban *ExtbanAdd(Module *reserved, ExtbanInfo req);
extern void ExtbanDel(Extban *);
extern void extban_init(void);
extern char *trim_str(char *str, int len);
extern char *ban_realhost, *ban_virthost, *ban_ip;
extern void join_channel(aChannel *chptr, aClient *cptr, aClient *sptr, int flags);
extern MODVAR char *ban_realhost, *ban_virthost, *ban_ip;
extern char *unreal_checkregex(char *s, int fastsupport, int check_broadness);
extern int banact_stringtoval(char *s);
extern char *banact_valtostring(int val);
@@ -654,34 +662,109 @@ extern char banact_valtochar(int val);
extern int spamfilter_gettargets(char *s, aClient *sptr);
extern char *spamfilter_target_inttostring(int v);
extern Spamfilter *unreal_buildspamfilter(char *s);
extern int dospamfilter(aClient *sptr, char *str_in, int type, char *target);
extern char *our_strcasestr(char *haystack, char *needle);
extern int spamfilter_getconftargets(char *s);
extern void remove_oper_snomasks(aClient *sptr);
extern char *spamfilter_inttostring_long(int v);
extern int check_channelmask(aClient *, aClient *, char *);
extern aChannel *get_channel(aClient *cptr, char *chname, int flag);
extern char backupbuf[];
extern MODVAR char backupbuf[];
extern void add_invite(aClient *, aChannel *);
extern void channel_modes(aClient *, char *, char *, aChannel *);
extern char modebuf[BUFSIZE], parabuf[BUFSIZE];
extern MODVAR char modebuf[BUFSIZE], parabuf[BUFSIZE];
extern int op_can_override(aClient *sptr);
extern aClient *find_chasing(aClient *sptr, char *user, int *chasing);
extern long opermode;
extern void do_mode(aChannel *, aClient *, aClient *, int, char **, time_t, int);
extern void set_mode(aChannel *, aClient *, int, char **, u_int *,
char[MAXMODEPARAMS][MODEBUFLEN + 3], int);
extern MODVAR long opermode;
extern void add_user_to_channel(aChannel *chptr, aClient *who, int flags);
extern int add_banid(aClient *, aChannel *, char *);
extern int add_exbanid(aClient *cptr, aChannel *chptr, char *banid);
extern void sub1_from_channel(aChannel *);
extern aCtab cFlagTab[];
extern MODVAR aCtab cFlagTab[];
extern char *unreal_encodespace(char *s);
extern char *unreal_decodespace(char *s);
extern Link *helpign;
extern aMotd *rules;
extern fdlist default_fdlist, busycli_fdlist, serv_fdlist, oper_fdlist;
extern void DCCdeny_add(char *filename, char *reason, int type);
extern MODVAR Link *helpign;
extern MODVAR aMotd *rules;
extern MODVAR fdlist default_fdlist, busycli_fdlist, serv_fdlist, oper_fdlist;
extern void DCCdeny_add(char *filename, char *reason, int type, int type2);
extern void DCCdeny_del(ConfigItem_deny_dcc *deny);
extern void dcc_wipe_services(void);
extern void reread_motdsandrules();
extern MODVAR int SVSNOOP;
extern int callbacks_check(void);
extern void callbacks_switchover(void);
extern int efunctions_check(void);
extern void efunctions_switchover(void);
extern char *encode_ip(u_char *);
extern char *decode_ip(char *);
extern void sendto_fconnectnotice(char *nick, anUser *user, aClient *sptr, int disconnect, char *comment);
extern void sendto_one_nickcmd(aClient *cptr, aClient *sptr, char *umodes);
extern int on_dccallow_list(aClient *to, aClient *from);
extern int add_dccallow(aClient *sptr, aClient *optr);
extern int del_dccallow(aClient *sptr, aClient *optr);
extern void delete_linkblock(ConfigItem_link *link_ptr);
extern void delete_classblock(ConfigItem_class *class_ptr);
extern void del_async_connects(void);
extern void make_extbanstr(void);
extern void isupport_init(void);
extern int do_cmd(aClient *cptr, aClient *sptr, char *cmd, int parc, char *parv[]);
extern void create_snomask(aClient *sptr, anUser *user, char *snomask);
extern MODVAR char *me_hash;
extern MODVAR int dontspread;
/* Efuncs */
extern MODVAR int (*do_join)(aClient *, aClient *, int, char **);
extern MODVAR void (*join_channel)(aChannel *chptr, aClient *cptr, aClient *sptr, int flags);
extern MODVAR int (*can_join)(aClient *cptr, aClient *sptr, aChannel *chptr, char *key, char *link, char *parv[]);
extern MODVAR void (*do_mode)(aChannel *chptr, aClient *cptr, aClient *sptr, int parc, char *parv[], time_t sendts, int samode);
extern MODVAR void (*set_mode)(aChannel *chptr, aClient *cptr, int parc, char *parv[], u_int *pcount,
char pvar[MAXMODEPARAMS][MODEBUFLEN + 3], int bounce);
extern MODVAR int (*m_umode)(aClient *, aClient *, int, char **);
extern MODVAR int (*register_user)(aClient *cptr, aClient *sptr, char *nick, char *username, char *umode, char *virthost, char *ip);
extern MODVAR int (*tkl_hash)(unsigned int c);
extern MODVAR char (*tkl_typetochar)(int type);
extern MODVAR aTKline *(*tkl_add_line)(int type, char *usermask, char *hostmask, char *reason, char *setby,
TS expire_at, TS set_at, TS spamf_tkl_duration, char *spamf_tkl_reason);
extern MODVAR aTKline *(*tkl_del_line)(aTKline *tkl);
extern MODVAR void (*tkl_check_local_remove_shun)(aTKline *tmp);
extern MODVAR aTKline *(*tkl_expire)(aTKline * tmp);
extern MODVAR EVENT((*tkl_check_expire));
extern MODVAR int (*find_tkline_match)(aClient *cptr, int xx);
extern MODVAR int (*find_shun)(aClient *cptr);
extern MODVAR int (*find_spamfilter_user)(aClient *sptr);
extern MODVAR aTKline *(*find_qline)(aClient *cptr, char *nick, int *ishold);
extern MODVAR int (*find_tkline_match_zap)(aClient *cptr);
extern MODVAR void (*tkl_stats)(aClient *cptr, int type, char *para);
extern MODVAR void (*tkl_synch)(aClient *sptr);
extern MODVAR int (*m_tkl)(aClient *cptr, aClient *sptr, int parc, char *parv[]);
extern MODVAR int (*place_host_ban)(aClient *sptr, int action, char *reason, long duration);
extern MODVAR int (*dospamfilter)(aClient *sptr, char *str_in, int type, char *target);
/* /Efuncs */
extern MODVAR aMotd *opermotd, *svsmotd, *motd, *botmotd, *smotd;
extern MODVAR int max_connection_count;
extern int add_listmode(Ban **list, aClient *cptr, aChannel *chptr, char *banid);
extern int del_listmode(Ban **list, aChannel *chptr, char *banid);
extern int Halfop_mode(long mode);
extern void chanfloodtimer_add(aChannel *chptr, char mflag, long mbit, time_t when);
extern void chanfloodtimer_del(aChannel *chptr, char mflag, long mbit);
extern char *clean_ban_mask(char *, int, aClient *);
extern void chanfloodtimer_stopchantimers(aChannel *chptr);
extern int find_invex(aChannel *chptr, aClient *sptr);
extern void DoMD5(unsigned char *mdout, unsigned char *src, unsigned long n);
#ifdef JOINTHROTTLE
aJFlood *cmodej_addentry(aClient *cptr, aChannel *chptr);
void cmodej_delentry(aJFlood *e);
void cmodej_deluserentries(aClient *cptr);
void cmodej_delchannelentries(aChannel *chptr);
#endif
extern void charsys_reset(void);
extern void charsys_addmultibyterange(char s1, char e1, char s2, char e2);
extern void charsys_addallowed(char *s);
extern void charsys_reset(void);
extern MODVAR char langsinuse[4096];
extern MODVAR aTKline *tklines[TKLISTLEN];
extern int isipv6(struct IN_ADDR *addr);
extern void inet4_to_inet6(const void *src_in, void *dst_in);
extern void unrealdns_delreq_bycptr(aClient *cptr);
extern void inet6_to_inet4(const void *src, void *dst);
extern void sendtxtnumeric(aClient *to, char *pattern, ...);
extern void unrealdns_gethostbyname_link(char *name, ConfigItem_link *conf);
extern void unrealdns_delasyncconnects(void);
+3
View File
@@ -30,6 +30,9 @@
#define __u_l unsigned long
#endif
extern int inet_pton(int af, const char *src, void *dst);
extern const char *inet_ntop(int af, const void *src, char *dst, size_t cnt);
#ifdef __STDC__
# ifndef _WIN32
extern __u_l inet_addr(char *);
+37
View File
@@ -0,0 +1,37 @@
/************************************************************************
* Unreal Internet Relay Chat Daemon, include/macros.h
* Copyright (c) 2004 Dominick Meglio & The UnrealIRCd Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 1, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Id$
*/
#include "setup.h"
/* Calculate the size of an array */
#define ARRAY_SIZEOF(x) (sizeof((x))/sizeof((x)[0]))
/* Allocate a dynamic local variable */
#if defined(HAVE_C99_VARLEN_ARRAY)
#define DYN_LOCAL(type, name, size) type name[size]
#define DYN_FREE(name)
#elif defined(HAVE_ALLOCA)
#define DYN_LOCAL(type, name, size) type *name = (size ? alloca(size) : NULL)
#define DYN_FREE(name)
#else
#define DYN_LOCAL(type, name, size) type *name = (size ? malloc(size) : NULL)
#define DYN_FREE(name) (name ? free(name) : 0)
#endif
+28
View File
@@ -0,0 +1,28 @@
/*
* This is an OpenSSL-compatible implementation of the RSA Data Security,
* Inc. MD5 Message-Digest Algorithm.
*
* Written by Solar Designer <solar@openwall.com> in 2001, and placed in
* the public domain. See md5.c for more information.
*/
#if defined(USE_SSL)
#include <openssl/md5.h>
#elif !defined(_MD5_H)
#define _MD5_H
/* Any 32-bit or wider unsigned integer data type will do */
typedef unsigned long MD5_u32plus;
typedef struct {
MD5_u32plus lo, hi;
MD5_u32plus a, b, c, d;
unsigned char buffer[64];
MD5_u32plus block[16];
} MD5_CTX;
extern void MD5_Init(MD5_CTX *ctx);
extern void MD5_Update(MD5_CTX *ctx, void *data, unsigned long size);
extern void MD5_Final(unsigned char *result, MD5_CTX *ctx);
#endif
+175 -47
View File
@@ -21,40 +21,51 @@
#ifndef MODULES_H
#define MODULES_H
#include "types.h"
#define MOD_VERSION "3.2-b5-1"
#define MOD_WE_SUPPORT "3.2-b5*"
#define MAXCUSTOMHOOKS 30
#define MAXHOOKTYPES 70
#define MAXHOOKTYPES 100
#define MAXCALLBACKS 30
#define MAXEFUNCTIONS 60
#if defined(_WIN32)
#define DLLFUNC _declspec(dllexport)
#define irc_dlopen(x,y) LoadLibrary(x)
#define irc_dlclose FreeLibrary
#define irc_dlsym(x,y,z) z = (void *)GetProcAddress(x,y)
#undef irc_dlerror
#define MOD_EXTENSION "dll"
#define DLLFUNC _declspec(dllexport)
#define irc_dlopen(x,y) LoadLibrary(x)
#define irc_dlclose FreeLibrary
#define irc_dlsym(x,y,z) z = (void *)GetProcAddress(x,y)
#define irc_dlerror our_dlerror
#elif defined(HPUX)
#define irc_dlopen(x,y) shl_load(x,y,0L)
#define irc_dlsym(x,y,z) shl_findsym(x,y,z)
#define irc_dlclose shl_unload
#define irc_dlerror() strerror(errno)
#define MOD_EXTENSION "so"
#define irc_dlopen(x,y) shl_load(x,y,0L)
#define irc_dlsym(x,y,z) shl_findsym(x,y,z)
#define irc_dlclose shl_unload
#define irc_dlerror() strerror(errno)
#else
#define irc_dlopen dlopen
#define irc_dlclose dlclose
#if defined(UNDERSCORE)
#define irc_dlsym(x,y,z) z = obsd_dlsym(x,y)
#else
#define irc_dlsym(x,y,z) z = dlsym(x,y)
#endif
#define irc_dlerror dlerror
#define DLLFUNC
#define MOD_EXTENSION "so"
#define irc_dlopen dlopen
#define irc_dlclose dlclose
#if defined(UNDERSCORE)
#define irc_dlsym(x,y,z) z = obsd_dlsym(x,y)
#else
#define irc_dlsym(x,y,z) z = dlsym(x,y)
#endif
#define irc_dlerror dlerror
#define DLLFUNC
#endif
#define EVENT(x) void (x) (void *data)
/* Casts to int, void, void *, and char * function pointers */
#define TO_INTFUNC(x) (int (*)())(x)
#define TO_VOIDFUNC(x) (void (*)())(x)
#define TO_PVOIDFUNC(x) (void *(*)())(x)
#define TO_PCHARFUNC(x) (char *(*)())(x)
typedef struct _mod_symboltable Mod_SymbolDepTable;
typedef struct _event Event;
typedef struct _eventinfo EventInfo;
typedef struct _irchook Hook;
typedef struct _hooktype Hooktype;
typedef struct _irccallback Callback;
typedef struct _ircefunction Efunction;
/*
* Module header that every module must include, with the name of
@@ -87,15 +98,18 @@ typedef struct {
} ModuleInfo;
#define MOBJ_EVENT 0x0001
#define MOBJ_HOOK 0x0002
#define MOBJ_COMMAND 0x0004
#define MOBJ_HOOKTYPE 0x0008
#define MOBJ_VERSIONFLAG 0x0010
#define MOBJ_SNOMASK 0x0020
#define MOBJ_UMODE 0x0040
#define MOBJ_CMDOVERRIDE 0x0080
#define MOBJ_EXTBAN 0x0100
#define MOBJ_EVENT 0x0001
#define MOBJ_HOOK 0x0002
#define MOBJ_COMMAND 0x0004
#define MOBJ_HOOKTYPE 0x0008
#define MOBJ_VERSIONFLAG 0x0010
#define MOBJ_SNOMASK 0x0020
#define MOBJ_UMODE 0x0040
#define MOBJ_CMDOVERRIDE 0x0080
#define MOBJ_EXTBAN 0x0100
#define MOBJ_CALLBACK 0x0200
#define MOBJ_ISUPPORT 0x0400
#define MOBJ_EFUNCTION 0x0800
typedef struct {
long mode;
@@ -234,12 +248,17 @@ typedef struct {
#define EXTBANTABLESZ 32
typedef enum ExtbanOptions { EXTBOPT_CHSVSMODE=0x1 } ExtbanOptions;
typedef struct {
/** extbans module */
Module *owner;
/** extended ban character */
char flag;
/** extban options */
ExtbanOptions options;
/** access checking [optional].
* aClient *: the client
* aChannel *: the channel
@@ -274,8 +293,9 @@ typedef struct {
typedef struct {
char flag;
ExtbanOptions options;
int (*is_ok)(aClient *, aChannel *, char *para, int, int, int);
char * (*conv_param)(char *);
char * (*conv_param)(char *);
int (*is_banned)(aClient *, aChannel *, char *, int);
} ExtbanInfo;
@@ -291,6 +311,13 @@ typedef struct _versionflag {
ModuleChild *parents;
} Versionflag;
typedef struct _isupport {
struct _isupport *prev, *next;
char *token;
char *value;
Module *owner;
} Isupport;
typedef struct _ModuleObject {
struct _ModuleObject *prev, *next;
short type;
@@ -304,6 +331,9 @@ typedef struct _ModuleObject {
Umode *umode;
Cmdoverride *cmdoverride;
Extban *extban;
Callback *callback;
Efunction *efunction;
Isupport *isupport;
} object;
} ModuleObject;
@@ -318,6 +348,39 @@ struct _irchook {
Module *owner;
};
struct _irccallback {
Callback *prev, *next;
short type;
union {
int (*intfunc)();
void (*voidfunc)();
char *(*pcharfunc)();
} func;
Module *owner;
char willberemoved; /* will be removed on next rehash? (eg the 'old'/'current' one) */
};
/* Definition of an efunction: a MANDATORY Extern Function (in a module),
* for things like do_join, join_channel, etc.
* The difference between callbacks and efunctions are:
* - efunctions are mandatory, while callbacks can be optional (depends!)
* - efunctions are ment for internal usage, so 3rd party modules are not allowed
* to add them.
* - all efunctions are declared as function pointers in modules.c
*/
struct _ircefunction {
Efunction *prev, *next;
short type;
union {
int (*intfunc)();
void (*voidfunc)();
void *(*pvoidfunc)();
char *(*pcharfunc)();
} func;
Module *owner;
char willberemoved; /* will be removed on next rehash? (eg the 'old'/'current' one) */
};
struct _hooktype {
short id;
char *string;
@@ -356,7 +419,7 @@ struct _Module
unsigned char options;
unsigned char errorcode;
char *tmp_file;
unsigned char compilecheck; /* feel free to rename this mess, but mod->flags sucks :[. */
unsigned long mod_sys_version;
};
/*
* Symbol table
@@ -425,8 +488,10 @@ void EventStatus(aClient *sptr);
void SetupEvents(void);
void LockEventSystem(void);
void UnlockEventSystem(void);
extern Hook *Hooks[MAXHOOKTYPES];
extern Hooktype Hooktypes[MAXCUSTOMHOOKS];
extern MODVAR Hook *Hooks[MAXHOOKTYPES];
extern MODVAR Hooktype Hooktypes[MAXCUSTOMHOOKS];
extern MODVAR Callback *Callbacks[MAXCALLBACKS], *RCallbacks[MAXCALLBACKS];
extern MODVAR Efunction *Efunctions[MAXEFUNCTIONS];
void Module_Init(void);
char *Module_Create(char *path);
@@ -445,6 +510,11 @@ void *obsd_dlsym(void *handle, char *symbol);
Versionflag *VersionflagAdd(Module *module, char flag);
void VersionflagDel(Versionflag *vflag, Module *module);
Isupport *IsupportAdd(Module *module, const char *token, const char *value);
void IsupportSetValue(Isupport *isupport, const char *value);
void IsupportDel(Isupport *isupport);
Isupport *IsupportFind(const char *token);
#define add_Hook(hooktype, func) HookAddMain(NULL, hooktype, func, NULL, NULL)
#define HookAdd(hooktype, func) HookAddMain(NULL, hooktype, func, NULL, NULL)
#define HookAddEx(module, hooktype, func) HookAddMain(module, hooktype, func, NULL, NULL)
@@ -492,6 +562,24 @@ void HooktypeDel(Hooktype *hooktype, Module *module);
#define RunHook6(hooktype,a,b,c,d,e,f) do { Hook *h; for (h = Hooks[hooktype]; h; h = h->next) (*(h->func.intfunc))(a,b,c,d,e,f); } while(0)
#define RunHook7(hooktype,a,b,c,d,e,f,g) do { Hook *h; for (h = Hooks[hooktype]; h; h = h->next) (*(h->func.intfunc))(a,b,c,d,e,f,g); } while(0)
#define CallbackAdd(cbtype, func) CallbackAddMain(NULL, cbtype, func, NULL, NULL)
#define CallbackAddEx(module, cbtype, func) CallbackAddMain(module, cbtype, func, NULL, NULL)
#define CallbackAddVoid(cbtype, func) CallbackAddMain(NULL, cbtype, NULL, func, NULL)
#define CallbackAddVoidEx(module, cbtype, func) CallbackAddMain(module, cbtype, NULL, func, NULL)
#define CallbackAddPChar(cbtype, func) CallbackAddMain(NULL, cbtype, NULL, NULL, func)
#define CallbackAddPCharEx(module, cbtype, func) CallbackAddMain(module, cbtype, NULL, NULL, func)
extern Callback *CallbackAddMain(Module *module, int cbtype, int (*intfunc)(), void (*voidfunc)(), char *(*pcharfunc)());
extern Callback *CallbackDel(Callback *cb);
#define EfunctionAdd(module, cbtype, func) EfunctionAddMain(module, cbtype, func, NULL, NULL, NULL)
#define EfunctionAddVoid(module, cbtype, func) EfunctionAddMain(module, cbtype, NULL, func, NULL, NULL)
#define EfunctionAddPVoid(module, cbtype, func) EfunctionAddMain(module, cbtype, NULL, NULL, func, NULL)
#define EfunctionAddPChar(module, cbtype, func) EfunctionAddMain(module, cbtype, NULL, NULL, NULL, func)
extern Efunction *EfunctionAddMain(Module *module, int eftype, int (*intfunc)(), void (*voidfunc)(), void *(*pvoidfunc)(), char *(*pcharfunc)());
extern Efunction *EfunctionDel(Efunction *cb);
Command *CommandAdd(Module *module, char *cmd, char *tok, int (*func)(), unsigned char params, int flags);
void CommandDel(Command *command);
int CommandExists(char *name);
@@ -539,12 +627,50 @@ int CallCmdoverride(Cmdoverride *ovr, aClient *cptr, aClient *sptr, int parc, ch
#define HOOKTYPE_UMODE_CHANGE 36
#define HOOKTYPE_TOPIC 37
#define HOOKTYPE_REHASH_COMPLETE 38
#define HOOKTYPE_TKL_ADD 39
#define HOOKTYPE_TKL_DEL 40
#define HOOKTYPE_LOCAL_KILL 41
#define HOOKTYPE_LOG 42
#define HOOKTYPE_REMOTE_JOIN 43
#define HOOKTYPE_REMOTE_PART 44
#define HOOKTYPE_REMOTE_KICK 45
#define HOOKTYPE_LOCAL_SPAMFILTER 46
/* Hook return values */
#define HOOK_CONTINUE 0
#define HOOK_ALLOW -1
#define HOOK_DENY 1
/* Callback types */
#define CALLBACKTYPE_CLOAK 1
#define CALLBACKTYPE_CLOAKKEYCSUM 2
/* Efunction types */
#define EFUNC_DO_JOIN 1
#define EFUNC_JOIN_CHANNEL 2
#define EFUNC_CAN_JOIN 3
#define EFUNC_DO_MODE 4
#define EFUNC_SET_MODE 5
#define EFUNC_M_UMODE 6
#define EFUNC_REGISTER_USER 7
#define EFUNC_TKL_HASH 8
#define EFUNC_TKL_TYPETOCHAR 9
#define EFUNC_TKL_ADD_LINE 10
#define EFUNC_TKL_DEL_LINE 11
#define EFUNC_TKL_CHECK_LOCAL_REMOVE_SHUN 12
#define EFUNC_TKL_EXPIRE 13
#define EFUNC_TKL_CHECK_EXPIRE 14
#define EFUNC_FIND_TKLINE_MATCH 15
#define EFUNC_FIND_SHUN 16
#define EFUNC_FIND_SPAMFILTER_USER 17
#define EFUNC_FIND_QLINE 18
#define EFUNC_FIND_TKLINE_MATCH_ZAP 19
#define EFUNC_TKL_STATS 20
#define EFUNC_TKL_SYNCH 21
#define EFUNC_M_TKL 22
#define EFUNC_PLACE_HOST_BAN 23
#define EFUNC_DOSPAMFILTER 24
/* Module flags */
#define MODFLAG_NONE 0x0000
#define MODFLAG_LOADED 0x0001 /* Fully loaded */
@@ -563,25 +689,27 @@ int CallCmdoverride(Cmdoverride *ovr, aClient *cptr, aClient *sptr, int parc, ch
#define CONFIG_EXCEPT 4
#define CONFIG_DENY 5
#define CONFIG_ALLOW 6
#define CONFIG_CLOAKKEYS 7
#ifdef DYNAMIC_LINKING
#define MOD_HEADER(name) Mod_Header
#define MOD_TEST(name) Mod_Test
#define MOD_INIT(name) Mod_Init
#define MOD_LOAD(name) Mod_Load
#define MOD_UNLOAD(name) Mod_Unload
#define MOD_HEADER(name) Mod_Header
#define MOD_TEST(name) Mod_Test
#define MOD_INIT(name) Mod_Init
#define MOD_LOAD(name) Mod_Load
#define MOD_UNLOAD(name) Mod_Unload
#else
#define MOD_HEADER(name) name##_Header
#define MOD_TEST(name) name##_Test
#define MOD_INIT(name) name##_Init
#define MOD_LOAD(name) name##_Load
#define MOD_UNLOAD(name) name##_Unload
#define MOD_HEADER(name) name##_Header
#define MOD_TEST(name) name##_Test
#define MOD_INIT(name) name##_Init
#define MOD_LOAD(name) name##_Load
#define MOD_UNLOAD(name) name##_Unload
#endif
#define CLOAK_KEYCRC RCallbacks[CALLBACKTYPE_CLOAKKEYCSUM]->func.pcharfunc()
#ifdef DYNAMIC_LINKING
/* ugly alert!!!! */
#include "version.h"
char Mod_Version[] = BASE_VERSION PATCH1 PATCH2 PATCH3 PATCH4 PATCH5 PATCH6 PATCH7 PATCH8 PATCH9;
#include "modversion.h"
#endif
#endif
+91
View File
@@ -0,0 +1,91 @@
/************************************************************************
* Unreal Internet Relay Chat Daemon, include/modversion.h
* (C) 2004-2005 Bram Matthys and The UnrealIRCd Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 1, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Id$
*/
#include "version.h"
/* What all this is for? Well, it's simple...
* Example: When someone compiles a module with zip support, but the
* core was not compiled with zip support, then the module will read
* things incorrect in the struct because the module sees an extra
* field half-way the struct but in the core that field does not exist,
* hence all data is shifted 4 bytes causing all kinds of odd crashes,
* memory corruption, and weird problems.
* This is an attempt to prevent this a bit, but there are a lot more
* options that cause binary incompatability (eg: changing nicklen),
* we just take the most common ones...
*
* NOTE: On win32 we allow ssl and zip inconsistencies because we
* explicitly use "padding" in the structs: we add a useless
* placeholder so everything is still aligned correctly.
* In the process of doing so, we waste several bytes per-user,
* but this prevents (most) binary incompatability problems
* making it easier for module coders to ship dll's.
*/
#if defined(USE_SSL) && !defined(_WIN32)
#define MYTOKEN_SSL "/SSL"
#else
#define MYTOKEN_SSL ""
#endif
#if defined(ZIP_LINKS) && !defined(_WIN32)
#define MYTOKEN_ZIP "/ZIP"
#else
#define MYTOKEN_ZIP ""
#endif
#if defined(NOSPOOF)
#define MYTOKEN_NOSPOOF "/NOSPF"
#else
#define MYTOKEN_NOSPOOF ""
#endif
#if !defined(EXTCMODE)
#define MYTOKEN_EXTCMODE "/NOEXTC"
#else
#define MYTOKEN_EXTCMODE ""
#endif
#if !defined(JOINTHROTTLE)
#define MYTOKEN_JOINTHROTTLE "/NOJTHR"
#else
#define MYTOKEN_JOINTHROTTLE ""
#endif
#if !defined(NO_FLOOD_AWAY)
#define MYTOKEN_NOFLDAWAY "/NONFA"
#else
#define MYTOKEN_NOFLDAWAY ""
#endif
#if !defined(NEWCHFLOODPROT)
#define MYTOKEN_NEWCHF "/NOCHF"
#else
#define MYTOKEN_NEWCHF ""
#endif
#ifdef INET6
#define MYTOKEN_INET6 "/IPV6"
#else
#define MYTOKEN_INET6 ""
#endif
#ifdef UNREALCORE
char our_mod_version[] = BASE_VERSION PATCH1 PATCH2 PATCH3 PATCH4 PATCH5 PATCH6 PATCH7 PATCH8 PATCH9 \
MYTOKEN_SSL MYTOKEN_ZIP MYTOKEN_NOSPOOF MYTOKEN_EXTCMODE MYTOKEN_JOINTHROTTLE \
MYTOKEN_NOFLDAWAY MYTOKEN_NEWCHF MYTOKEN_INET6;
#else
DLLFUNC char Mod_Version[] = BASE_VERSION PATCH1 PATCH2 PATCH3 PATCH4 PATCH5 PATCH6 PATCH7 PATCH8 PATCH9 \
MYTOKEN_SSL MYTOKEN_ZIP MYTOKEN_NOSPOOF MYTOKEN_EXTCMODE MYTOKEN_JOINTHROTTLE \
MYTOKEN_NOFLDAWAY MYTOKEN_NEWCHF MYTOKEN_INET6;
#endif
+3 -11
View File
@@ -239,7 +239,6 @@
#define MSG_TSCTL "TSCTL"
#define TOK_TSCTL "AW"
#define MSG_SVSJOIN "SVSJOIN"
#define TOK_SVSJOIN "BR"
#define MSG_SAJOIN "SAJOIN"
#define TOK_SAJOIN "AX"
#define MSG_SVSPART "SVSPART"
@@ -300,23 +299,16 @@
#define MAXPARA 15
extern int m_join(), m_part(), m_mode();
extern int m_nick(), m_error();
extern int m_error();
extern int m_dns();
extern int m_tkl();
extern int m_motd(), m_user();
extern int m_info(), m_summon();
extern int m_users(), m_version();
extern int m_names();
extern int m_lusers(), m_umode();
extern int m_motd();
extern int m_service(), m_watch();
extern int m_service();
extern int m_dalinfo();
extern int m_credits();
extern int m_license();
extern int m_botmotd();
extern int m_opermotd();
extern int m_module(), m_alias(), m_tkl(), m_opermotd();
extern int m_module(), m_alias();
extern int m_rehash(), m_die(), m_restart();
#endif
+26 -4
View File
@@ -33,11 +33,11 @@
#define RPL_YOURHOST 002
#define RPL_CREATED 003
#define RPL_MYINFO 004
#define RPL_PROTOCTL 005
#define RPL_ISUPPORT 005
#define RPL_REDIR 10
#define RPL_REMOTEPROTOCTL 105
#define RPL_REMOTEISUPPORT 105
/*
* Errors are in the range from 400-599 currently and are grouped by what
@@ -127,6 +127,9 @@
#define ERR_NOOPERHOST 491
#define ERR_NOCTCP 492
#define ERR_CHANOWNPRIVNEEDED 499
#define ERR_TOOMANYJOINS 500
#define ERR_UMODEUNKNOWNFLAG 501
#define ERR_USERSDONTMATCH 502
@@ -134,6 +137,9 @@
#define ERR_TOOMANYWATCH 512
#define ERR_NEEDPONG 513
#define ERR_TOOMANYDCC 514
#define ERR_DISABLED 517
#define ERR_NOINVITE 518
#define ERR_ADMONLY 519
#define ERR_OPERONLY 520
@@ -178,8 +184,12 @@
#define RPL_TOPIC 332
#define RPL_TOPICWHOTIME 333
#define RPL_INVITELIST 336
#define RPL_ENDOFINVITELIST 337
#define RPL_LISTSYNTAX 334
#define RPL_WHOISBOT 335
#define RPL_USERIP 340
#define RPL_INVITING 341
#define RPL_SUMMONING 342
@@ -189,8 +199,8 @@
#define RPL_ENDOFWHO 315
#define RPL_NAMREPLY 353
#define RPL_ENDOFNAMES 366
#define RPL_INVITELIST 346
#define RPL_ENDOFINVITELIST 347
#define RPL_INVEXLIST 346
#define RPL_ENDOFINVEXLIST 347
#define RPL_EXLIST 348
#define RPL_ENDOFEXLIST 349
@@ -264,6 +274,7 @@
#define RPL_STATSVLINE 227
#define RPL_STATSBANVER 228
#define RPL_STATSSPAMF 229
#define RPL_STATSEXCEPTTKL 230
#define RPL_SERVICEINFO 231
#define RPL_RULES 232
#define RPL_SERVICE 233
@@ -305,6 +316,7 @@
#define RPL_HELPFWD 294
#define RPL_HELPIGN 295
/*
* New /MAP format.
*/
@@ -332,8 +344,18 @@
#define RPL_NOWOFF 605
#define RPL_WATCHLIST 606
#define RPL_ENDOFWATCHLIST 607
#define RPL_DCCSTATUS 617
#define RPL_DCCLIST 618
#define RPL_ENDOFDCCLIST 619
#define RPL_DCCINFO 620
#define RPL_DUMPING 640
#define RPL_DUMPRPL 641
#define RPL_EODUMP 642
#define RPL_WHOISSECURE 671
#define ERR_CANNOTDOCOMMAND 972
#define ERR_CANNOTCHANGECHANMODE 974
#define ERR_NUMERICERR 999
-4
View File
@@ -55,10 +55,6 @@ EVENT(loop_event);
/* support.c */
char *my_itoa(int i);
/* s_kline.c */
int find_tkline_match(aClient *cptr, int xx);
extern EVENT(tkl_check_expire);
/* s_serv.c */
void load_tunefile(void);
extern EVENT(save_tunefile);
+74 -66
View File
@@ -1,74 +1,82 @@
/*
* ircd/res_def.h (C)opyright 1992 Darren Reed.
/* OMG... OMG! WHAT AN INCLUDE HORROR !!! */
#undef strcasecmp
#undef strncasecmp
#ifdef WIN32
#include <win32/ares/setup.h>
#endif
#include <ares.h>
#include <ares_version.h>
#undef strcasecmp
#undef strncasecmp
#ifndef GOT_STRCASECMP
#define strcasecmp mycmp
#define strncasecmp myncmp
#endif
typedef enum {
DNSREQ_CLIENT = 1,
DNSREQ_LINKCONF = 2,
DNSREQ_CONNECT = 3
} DNSReqType;
typedef struct _dnsreq DNSReq;
/* Depending on the request type, some fields are filled in:
* cptr: DNSREQ_CLIENT, DNSREQ_CONNECT
* link: DNSREQ_LINKCONF, DNSREQ_CONNECT
*/
#define RES_INITLIST 1
#define RES_CALLINIT 2
#define RES_INITSOCK 4
#define RES_INITDEBG 8
#define RES_INITCACH 16
#define MAXPACKET 1024
#define MAXALIASES 35
#define MAXADDRS 35
#define AR_TTL 300 /* minimum TTL in seconds for dns cache entries */
struct hent {
char *h_name; /* official name of host */
char *h_aliases[MAXALIASES]; /* alias list */
int h_addrtype; /* host address type */
int h_length; /* length of address */
/* list of addresses from name server */
struct IN_ADDR h_addr_list[MAXADDRS];
#define h_addr h_addr_list[0] /* address, for backward compatiblity */
struct _dnsreq {
DNSReq *prev, *next;
char *name; /**< Name being resolved (only for DNSREQ_LINKCONF and DNSREQ_CONNECT) */
char ipv6; /**< Resolving for ipv6 or ipv4? */
DNSReqType type; /**< DNS Request type (DNSREQ_*) */
aClient *cptr; /**< Client the request is for, NULL if client died OR unavailable */
ConfigItem_link *linkblock; /**< Linkblock */
};
typedef struct reslist {
int id;
int sent; /* number of requests sent */
int srch;
time_t ttl;
char type;
char retries; /* retry counter */
char sends; /* number of sends (>1 means resent) */
char resend; /* send flag. 0 == dont resend */
time_t sentat;
time_t timeout;
struct IN_ADDR addr;
char *name;
struct reslist *next;
Link cinfo;
struct hent he;
} ResRQ;
typedef struct _dnscache DNSCache;
typedef struct cache {
time_t expireat;
time_t ttl;
struct hostent he;
struct cache *hname_next, *hnum_next, *list_next;
} aCache;
struct _dnscache {
DNSCache *prev, *next; /**< Previous and next in linked list */
DNSCache *hprev, *hnext; /**< Previous and next in hash list */
char *name; /**< The hostname */
struct IN_ADDR addr; /**< Stored IP address */
time_t expires; /**< When record expires */
};
typedef struct cachetable {
aCache *num_list;
aCache *name_list;
} CacheTable;
typedef struct _dnsstats DNSStats;
#define ARES_CACSIZE 101
struct _dnsstats {
unsigned int cache_hits;
unsigned int cache_misses;
unsigned int cache_adds;
};
#define MAXCACHED 81
#ifdef _WIN32
typedef unsigned short u_int16_t;
#endif
extern struct __res_state ircd_res;
extern int ircd_res_init();
extern u_int ircd_res_randomid();
extern u_int16_t ircd_getshort(const u_char *msgp);
extern u_int32_t ircd_getlong(const u_char *msgp);
extern void ircd__putshort(register u_int16_t s, register u_char *msgp);
extern void ircd__putlong(register u_int32_t l,register u_char *msgp);
extern int ircd_dn_expand(const u_char *msg, const u_char *eom, const u_char *src, char *dst, int dstsiz);
extern int __ircd_dn_skipname(const u_char *ptr, const u_char *eom);
extern int ircd_dn_comp(const char *src, u_char *dst, int dstsiz, u_char **dnptrs, u_char **lastdnptr);
extern int ircd_res_mkquery(int op, const char *dname, int class, int type, const u_char *data,
int datalen, const u_char *newrr_in, u_char *buf, int buflen);
/** Time to keep cache records. */
#define DNSCACHE_TTL 600
/** Size of the hash table (prime!).
* Consumes <this>*4 on ia32 and <this>*4 on 64 bit
* 241 seems a good bet.. which ~1k on ia32 and ~2k on ia64.
*/
#define DNS_HASH_SIZE 241
/** Max # of entries we want in our cache.
* This:
* a) prevents us from using too much memory, and
* b) prevents us from keeping useless cache records
*
* A dnscache item is roughly ~80 bytes in size (slightly more on x86),
* so 241*80=~20k, which seems reasonable ;).
*/
#define DNS_MAX_ENTRIES DNS_HASH_SIZE
extern ares_channel resolver_channel;
extern void init_resolver(void);
struct hostent *unrealdns_doclient(aClient *cptr);
+36 -9
View File
@@ -225,18 +225,27 @@
/* Define if you want IPv6 enabled */
#undef INET6
/* Define if you want modes shown in /list */
#undef LIST_SHOW_MODES
/* Define if you want nick!user@host shown for the topic setter */
#undef TOPIC_NICK_IS_NUHOST
/* Define if you want users to be notified when their shun is removed */
#undef SHUN_NOTICES
/* Define if you want OperOverride disabled */
#undef NO_OPEROVERRIDE
/* Define if you want opers to have to use /invite to join +s/+p channels */
#undef OPEROVERRIDE_VERIFY
/* Define if you want to disable /set* and /chg* */
#undef DISABLE_USERMOD
/* Define if your system prepends an underscore to symbols */
#undef UNDERSCORE
/* Define if you have gethostbyname_r with 3 parameters */
#undef HAVE_GETHOSTBYNAME_R_3
/* Define if you have gethostbyname_r with 5 parameters */
#undef HAVE_GETHOSTBYNAME_R_5
/* Define if you have gethostbyname_r with 6 parameters */
#undef HAVE_GETHOSTBYNAME_R_6
/* Define if rlim_t is long long */
#undef LONG_LONG_RLIM_T
@@ -254,3 +263,21 @@
/* Define if you have strlncat */
#undef HAVE_STRLNCAT
/* Define if you have inet_pton */
#undef HAVE_INET_PTON
/* Define if you have inet_ntop */
#undef HAVE_INET_NTOP
/* Define if you have a compiler with C99 variable length array support */
#undef HAVE_C99_VARLEN_ARRAY
/* Define if you have alloca.h */
#undef HAVE_ALLOCA_H
/* Define if you have alloca */
#undef HAVE_ALLOCA
/* Define to 1 if your system has no in6addr_any. */
#undef NO_IN6ADDR_ANY
+1 -1
View File
@@ -30,7 +30,7 @@ struct SynchList {
aSynchList *next, *prev;
};
aSynchList *SJSynchList = NULL;
MODVAR aSynchList *SJSynchList = NULL;
aSynchList *make_synchlist()
{
+191 -63
View File
@@ -37,6 +37,8 @@
#include <openssl/err.h>
#include <openssl/evp.h>
#include <openssl/rand.h>
#include <openssl/md5.h>
#include <openssl/ripemd.h>
#endif
#include "common.h"
#include "sys.h"
@@ -50,6 +52,7 @@
#ifdef STDDEFH
# include <stddef.h>
#endif
#include "md5.h"
#ifdef HAVE_SYSLOG
# include <syslog.h>
@@ -69,8 +72,12 @@
#include "channel.h"
#if defined(_WIN32) && !defined(NOSPOOF)
#error "Compiling win32 without nospoof is VERY insecure and NOT supported"
#endif
extern int sendanyways;
extern MODVAR int sendanyways;
typedef struct aloopStruct LoopStruct;
@@ -98,6 +105,7 @@ typedef struct _configitem_listen ConfigItem_listen;
typedef struct _configitem_allow ConfigItem_allow;
typedef struct _configflag_allow ConfigFlag_allow;
typedef struct _configitem_allow_channel ConfigItem_allow_channel;
typedef struct _configitem_allow_dcc ConfigItem_allow_dcc;
typedef struct _configitem_vhost ConfigItem_vhost;
typedef struct _configitem_except ConfigItem_except;
typedef struct _configitem_link ConfigItem_link;
@@ -140,6 +148,7 @@ typedef struct _cmdoverride Cmdoverride;
typedef struct SMember Member;
typedef struct SMembership Membership;
typedef struct SMembershipL MembershipL;
typedef struct JFlood aJFlood;
#ifdef ZIP_LINKS
typedef struct Zdata aZdata;
@@ -183,7 +192,7 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
/* NOTE: this must be down here so the stuff from struct.h IT uses works */
#include "whowas.h"
/* Loggin types */
/* Logging types */
#define LOG_ERROR 0x0001
#define LOG_KILL 0x0002
#define LOG_TKL 0x0004
@@ -194,6 +203,7 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
#define LOG_SACMDS 0x0080
#define LOG_CHGCMDS 0x0100
#define LOG_OVERRIDE 0x0200
#define LOG_SPAMFILTER 0x0400
/*
@@ -259,6 +269,8 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
#define SetClient(x) ((x)->status = STAT_CLIENT)
#define SetLog(x) ((x)->status = STAT_LOG)
#define IsSynched(x) (x->serv->flags.synced)
/* opt.. */
#define OPT_SJOIN 0x0001
#define OPT_NOT_SJOIN 0x0002
@@ -276,13 +288,15 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
#define OPT_NOT_VHP 0x2000
#define OPT_TKLEXT 0x4000
#define OPT_NOT_TKLEXT 0x8000
#define OPT_NICKIP 0x10000
#define OPT_NOT_NICKIP 0x20000
/* client->flags (32 bits): 28 used, 4 free */
#define FLAGS_PINGSENT 0x0001 /* Unreplied ping sent */
#define FLAGS_DEADSOCKET 0x0002 /* Local socket is dead--Exiting soon */
#define FLAGS_KILLED 0x0004 /* Prevents "QUIT" from being sent for this */
#define FLAGS_BLOCKED 0x0008 /* socket is in a blocked condition */
#define FLAGS_UNOCCUP1 0x0010 /* [FREE] */
#define FLAGS_OUTGOING 0x0010 /* outgoing connection, do not touch cptr->listener->clients */
#define FLAGS_CLOSING 0x0020 /* set when closing to suppress errors */
#define FLAGS_LISTEN 0x0040 /* used to mark clients which we listen() on */
#define FLAGS_CHKACCESS 0x0080 /* ok to check clients access if set */
@@ -305,14 +319,14 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
#ifdef ZIP_LINKS
#define FLAGS_ZIP 0x1000000
#endif
#define FLAGS_UNOCCUP2 0x2000000 /* [FREE] */
#define FLAGS_DCCNOTICE 0x2000000 /* Has the user seen a notice on how to use DCCALLOW already? */
#define FLAGS_SHUNNED 0x4000000
#define FLAGS_VIRUS 0x8000000 /* tagged by spamfilter */
#ifdef USE_SSL
#define FLAGS_SSL 0x10000000
#endif
#define FLAGS_UNOCCUP4 0x20000000 /* [FREE] */
#define FLAGS_DCCBLOCK 0x40000000
#define FLAGS_DCCBLOCK 0x40000000 /* Block all DCC send requests */
#define FLAGS_MAP 0x80000000 /* Show this entry in /map */
/* Dec 26th, 1997 - added flags2 when I ran out of room in flags -DuffJ */
@@ -321,7 +335,7 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
* -DuffJ
*/
#define SNO_DEFOPER "+kscfvGq"
#define SNO_DEFOPER "+kscfvGqo"
#define SNO_DEFUSER "+ks"
#define SEND_UMODES (SendUmodes)
@@ -343,6 +357,8 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
#define PROTO_VHP 0x0400 /* Send hostnames in NICKv2 even if not sethosted */
#define PROTO_SJB64 0x0800
#define PROTO_TKLEXT 0x1000 /* TKL extension: 10 parameters instead of 8 (3.2RC2) */
#define PROTO_NICKIP 0x2000 /* Send IP addresses in the NICK command */
/* note: client->proto is currently a 'short' (max is 0x8000) */
/*
@@ -386,6 +402,7 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
#define IsDead(x) ((x)->flags & FLAGS_DEADSOCKET)
#define GotProtoctl(x) ((x)->flags & FLAGS_PROTOCTL)
#define IsBlocked(x) ((x)->flags & FLAGS_BLOCKED)
#define IsOutgoing(x) ((x)->flags & FLAGS_OUTGOING)
#define GotNetInfo(x) ((x)->flags & FLAGS_NETINFO)
#define SetNetInfo(x) ((x)->flags |= FLAGS_NETINFO)
@@ -425,6 +442,7 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
#endif
#define GetHost(x) (IsHidden(x) ? (x)->user->virthost : (x)->user->realhost)
#define GetIP(x) ((x->user && x->user->ip_str) ? x->user->ip_str : (MyConnect(x) ? Inet_ia2p(&x->ip) : NULL))
#define SetKillsF(x) ((x)->user->snomask |= SNO_KILLS)
#define SetClientF(x) ((x)->user->snomask |= SNO_CLIENT)
@@ -443,8 +461,11 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
#define DoingDNS(x) ((x)->flags & FLAGS_DOINGDNS)
#define SetAccess(x) ((x)->flags |= FLAGS_CHKACCESS); Debug((DEBUG_DEBUG, "SetAccess(%s)", (x)->name))
#define SetBlocked(x) ((x)->flags |= FLAGS_BLOCKED)
#define SetOutgoing(x) do { x->flags |= FLAGS_OUTGOING; } while(0)
#define DoingAuth(x) ((x)->flags & FLAGS_AUTH)
#define NoNewLine(x) ((x)->flags & FLAGS_NONL)
#define IsDCCNotice(x) ((x)->flags & FLAGS_DCCNOTICE)
#define SetDCCNotice(x) do { x->flags |= FLAGS_DCCNOTICE; } while(0)
#define SetRegNick(x) ((x)->umodes & UMODE_REGNICK)
#define SetHidden(x) ((x)->umodes |= UMODE_HIDE)
#define SetHideOper(x) ((x)->umodes |= UMODE_HIDEOPER)
@@ -478,17 +499,24 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
/*
* ProtoCtl options
*/
#define DontSendQuit(x) ((x)->proto & PROTO_NOQUIT)
#define IsToken(x) ((x)->proto & PROTO_TOKEN)
#define SupportSJOIN(x) ((x)->proto & PROTO_SJOIN)
#define SupportNICKv2(x) ((x)->proto & PROTO_NICKv2)
#define SupportSJOIN2(x) ((x)->proto & PROTO_SJOIN2)
#define SupportUMODE2(x) ((x)->proto & PROTO_UMODE2)
#define SupportNS(x) ((x)->proto & PROTO_NS)
#define SupportVL(x) ((x)->proto & PROTO_VL)
#define SupportSJ3(x) ((x)->proto & PROTO_SJ3)
#define SupportVHP(x) ((x)->proto & PROTO_VHP)
#define SupportTKLEXT(x) ((x)->proto & PROTO_TKLEXT)
#ifndef DEBUGMODE
#define CHECKPROTO(x,y) ((x)->proto & y)
#else
#define CHECKPROTO(x,y) (checkprotoflags(x, y, __FILE__, __LINE__))
#endif
#define DontSendQuit(x) (CHECKPROTO(x, PROTO_NOQUIT))
#define IsToken(x) (CHECKPROTO(x, PROTO_TOKEN))
#define SupportSJOIN(x) (CHECKPROTO(x, PROTO_SJOIN))
#define SupportNICKv2(x) (CHECKPROTO(x, PROTO_NICKv2))
#define SupportNICKIP(x) (CHECKPROTO(x, PROTO_NICKIP))
#define SupportSJOIN2(x) (CHECKPROTO(x, PROTO_SJOIN2))
#define SupportUMODE2(x) (CHECKPROTO(x, PROTO_UMODE2))
#define SupportNS(x) (CHECKPROTO(x, PROTO_NS))
#define SupportVL(x) (CHECKPROTO(x, PROTO_VL))
#define SupportSJ3(x) (CHECKPROTO(x, PROTO_SJ3))
#define SupportVHP(x) (CHECKPROTO(x, PROTO_VHP))
#define SupportTKLEXT(x) (CHECKPROTO(x, PROTO_TKLEXT))
#define SetSJOIN(x) ((x)->proto |= PROTO_SJOIN)
#define SetNoQuit(x) ((x)->proto |= PROTO_NOQUIT)
@@ -532,6 +560,7 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
#define OFLAG_LNOTICE 0x00004000 /* Oper can send local serv notices */
#define OFLAG_GNOTICE 0x00008000 /* Oper can send global notices */
#define OFLAG_ADMIN 0x00010000 /* Admin */
#define OFLAG_ADDLINE 0x00020000 /* Oper can use /addline */
#define OFLAG_ZLINE 0x00080000 /* Oper can use /zline and /unzline */
#define OFLAG_NETADMIN 0x00200000 /* netadmin gets +N */
#define OFLAG_COADMIN 0x00800000 /* co admin gets +C */
@@ -544,7 +573,7 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
#define OFLAG_UMODEQ 0x80000000 /* can set +q */
#define OFLAG_LOCAL (OFLAG_REHASH|OFLAG_HELPOP|OFLAG_GLOBOP|OFLAG_WALLOP|OFLAG_LOCOP|OFLAG_LROUTE|OFLAG_LKILL|OFLAG_KLINE|OFLAG_UNKLINE|OFLAG_LNOTICE)
#define OFLAG_GLOBAL (OFLAG_LOCAL|OFLAG_GROUTE|OFLAG_GKILL|OFLAG_GNOTICE)
#define OFLAG_ISGLOBAL (OFLAG_GROUTE|OFLAG_GKILL|OFLAG_GNOTICE)
#define OFLAG_ISGLOBAL (OFLAG_GROUTE|OFLAG_GKILL|OFLAG_GNOTICE|OFLAG_TKL|OFLAG_GZL|OFLAG_OVERRIDE)
#define OFLAG_NADMIN (OFLAG_NETADMIN | OFLAG_SADMIN | OFLAG_ADMIN | OFLAG_GLOBAL | OFLAG_UMODEQ | OFLAG_DCCDENY)
#define OFLAG_ADMIN_ (OFLAG_ADMIN | OFLAG_GLOBAL | OFLAG_DCCDENY)
#define OFLAG_COADMIN_ (OFLAG_COADMIN | OFLAG_GLOBAL | OFLAG_DCCDENY)
@@ -555,6 +584,7 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
#define OPCanDCCDeny(x) ((x)->oflag & OFLAG_DCCDENY)
#define OPCanTKL(x) ((x)->oflag & OFLAG_TKL)
#define OPCanGZL(x) ((x)->oflag & OFLAG_GZL)
#define OPCanAddline(x) ((x)->oflag & OFLAG_ADDLINE)
#define OPCanZline(x) ((x)->oflag & OFLAG_ZLINE)
#define OPCanRehash(x) ((x)->oflag & OFLAG_REHASH)
#define OPCanDie(x) ((x)->oflag & OFLAG_DIE)
@@ -633,6 +663,9 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
#define DEBUG_MALLOC 9 /* malloc/free calls */
#define DEBUG_LIST 10 /* debug list use */
/* blah */
#define IsSkoAdmin(sptr) (IsAdmin(sptr) || IsNetAdmin(sptr) || IsSAdmin(sptr))
/*
* defines for curses in client
*/
@@ -640,6 +673,21 @@ typedef unsigned int u_int32_t; /* XXX Hope this works! */
#define CURSES_TERM 1
#define TERMCAP_TERM 2
/* Dcc deny types (see src/s_extra.c) */
#define DCCDENY_HARD 0
#define DCCDENY_SOFT 1
/* Linked list dcc flags */
#define DCC_LINK_ME 1 /* My dcc allow */
#define DCC_LINK_REMOTE 2 /* I need to remove dccallows from these clients when I die */
struct irc_netmask
{
short int type;
struct IN_ADDR mask;
short int bits;
};
struct FloodOpt {
unsigned short nmsg;
TS firstmsg;
@@ -653,7 +701,9 @@ struct MotdItem {
struct aloopStruct {
unsigned do_garbage_collect : 1;
unsigned ircd_booted : 1;
unsigned do_bancheck : 1;
unsigned do_bancheck : 1; /* perform *line bancheck? */
unsigned do_bancheck_spamf_user : 1; /* perform 'user' spamfilter bancheck */
unsigned do_bancheck_spamf_away : 1; /* perform 'away' spamfilter bancheck */
unsigned ircd_rehashing : 1;
unsigned tainted : 1;
aClient *rehash_save_cptr, *rehash_save_sptr;
@@ -684,6 +734,7 @@ struct User {
Membership *channel; /* chain of channel pointer blocks */
Link *invited; /* chain of invite pointer blocks */
Link *silence; /* chain of silence pointer blocks */
Link *dccallow; /* chain of dccallowed entries */
char *away; /* pointer to away message */
u_int32_t servicestamp; /* Services' time stamp variable */
signed char refcnt; /* Number of times this block is referenced */
@@ -699,6 +750,7 @@ struct User {
#ifdef LIST_DEBUG
aClient *bcptr;
#endif
char *ip_str; /* The IP in string form */
char *operlogin; /* Only used if person is/was opered, used for oper::maxlogins */
struct {
time_t nick_t;
@@ -708,6 +760,9 @@ struct User {
unsigned char away_c; /* number of times away has been set */
#endif
} flood;
#ifdef JOINTHROTTLE
aJFlood *jflood;
#endif
};
struct Server {
@@ -735,6 +790,7 @@ struct Server {
#define M_ALIAS 0x0020
#define M_RESETIDLE 0x0040
#define M_VIRUS 0x0080
#define M_ANNOUNCE 0x0100
/* tkl:
@@ -758,6 +814,9 @@ struct Server {
#define SPAMF_PART 0x0010 /* P */
#define SPAMF_QUIT 0x0020 /* q */
#define SPAMF_DCC 0x0040 /* d */
#define SPAMF_USER 0x0080 /* u */
#define SPAMF_AWAY 0x0100 /* a */
#define SPAMF_TOPIC 0x0200 /* t */
struct _spamfilter {
unsigned short action; /* see BAN_ACT* */
@@ -770,7 +829,10 @@ struct t_kline {
aTKline *prev, *next;
int type;
unsigned short subtype; /* subtype (currently spamfilter only), see SPAMF_* */
Spamfilter *spamf;
union {
Spamfilter *spamf;
struct irc_netmask *netmask;
} ptr;
char usermask[USERLEN + 3];
char *hostmask, *reason, *setby;
TS expire_at, set_at;
@@ -794,19 +856,19 @@ typedef struct ircstatsx {
int global_max; /* global max */
} ircstats;
extern ircstats IRCstats;
extern MODVAR ircstats IRCstats;
#include "modules.h"
extern Umode *Usermode_Table;
extern short Usermode_highest;
extern MODVAR Umode *Usermode_Table;
extern MODVAR short Usermode_highest;
extern Snomask *Snomask_Table;
extern short Snomask_highest;
extern MODVAR Snomask *Snomask_Table;
extern MODVAR short Snomask_highest;
#ifdef EXTCMODE
extern Cmode *Channelmode_Table;
extern unsigned short Channelmode_highest;
extern MODVAR Cmode *Channelmode_Table;
extern MODVAR unsigned short Channelmode_highest;
#endif
extern Umode *UmodeAdd(Module *module, char ch, int options, int (*allowed)(aClient *sptr, int what), long *mode);
@@ -820,6 +882,12 @@ extern Cmode *CmodeAdd(Module *reserved, CmodeInfo req, Cmode_t *mode);
extern void CmodeDel(Cmode *cmode);
#endif
typedef struct {
EXTCM_PAR_HEADER
unsigned short num;
unsigned short t;
} aModejEntry;
#define LISTENER_NORMAL 0x000001
#define LISTENER_CLIENTSONLY 0x000002
#define LISTENER_SERVERSONLY 0x000004
@@ -885,9 +953,13 @@ struct Client {
long receiveM; /* Statistics: protocol messages received */
#ifdef ZIP_LINKS
struct Zdata *zip; /* zip data */
#elif defined(_WIN32)
void *zip_NOTUSED; /* (win32 binary compatability) */
#endif
#ifdef USE_SSL
SSL *ssl;
#elif defined(_WIN32)
void *ssl_NOTUSED; /* (win32 binary compatability) */
#endif
#ifndef NO_FDLIST
long lastrecvM; /* to check for activity --Mika */
@@ -1017,11 +1089,17 @@ struct _configitem_admin {
char *line;
};
#define CLASS_OPT_NOFAKELAG 0x1
struct _configitem_class {
ConfigItem *prev, *next;
ConfigFlag flag;
char *name;
int pingfreq, connfreq, maxclients, sendq, recvq, clients;
int xrefcount; /* EXTRA reference count, 'clients' also acts as a reference count but
* link blocks also refer to classes so a 2nd ref. count was needed.
*/
unsigned int options;
};
struct _configflag_allow {
@@ -1039,6 +1117,7 @@ struct _configitem_allow {
unsigned short maxperip;
int port;
ConfigItem_class *class;
struct irc_netmask *netmask;
ConfigFlag_allow flags;
};
@@ -1049,6 +1128,7 @@ struct _configitem_oper {
anAuthStruct *auth;
ConfigItem_class *class;
ConfigItem *from;
unsigned long modes;
long oflags;
int maxlogins;
};
@@ -1076,9 +1156,10 @@ struct _configitem_ulines {
struct _configitem_tld {
ConfigItem *prev, *next;
ConfigFlag_tld flag;
char *mask, *motd_file, *rules_file, *smotd_file, *channel;
char *mask, *motd_file, *rules_file, *smotd_file;
char *botmotd_file, *opermotd_file, *channel;
struct tm motd_tm, smotd_tm;
aMotd *rules, *motd, *smotd;
aMotd *rules, *motd, *smotd, *botmotd, *opermotd;
u_short options;
};
@@ -1112,6 +1193,8 @@ struct _configitem_link {
time_t hold;
#ifdef USE_SSL
char *ciphers;
#elif defined(_WIN32)
void *ciphers_NOTUSED;
#endif
#ifdef ZIP_LINKS
int compression_level;
@@ -1123,15 +1206,14 @@ struct _configitem_except {
ConfigFlag_except flag;
int type;
char *mask;
struct irc_netmask *netmask;
};
struct _configitem_ban {
ConfigItem *prev, *next;
ConfigFlag_ban flag;
char *mask, *reason;
struct IN_ADDR netmask;
int bits;
short masktype;
struct irc_netmask *netmask;
unsigned short action;
};
@@ -1188,6 +1270,12 @@ struct _configitem_allow_channel {
char *channel;
};
struct _configitem_allow_dcc {
ConfigItem *prev, *next;
ConfigFlag_ban flag;
char *filename;
};
struct _configitem_log {
ConfigItem *prev, *next;
ConfigFlag flag;
@@ -1211,24 +1299,24 @@ struct _configitem_unknown_ext {
ConfigEntry *ce_entries;
};
#define ALIAS_SERVICES 1
#define ALIAS_STATS 2
#define ALIAS_NORMAL 3
#define ALIAS_COMMAND 4
typedef enum {
ALIAS_SERVICES=1, ALIAS_STATS, ALIAS_NORMAL, ALIAS_COMMAND, ALIAS_CHANNEL
} AliasType;
struct _configitem_alias {
ConfigItem *prev, *next;
ConfigFlag flag;
ConfigItem_alias_format *format;
char *alias, *nick;
short type;
AliasType type;
};
struct _configitem_alias_format {
ConfigItem *prev, *next;
ConfigFlag flag;
char *nick;
short type;
AliasType type;
char *format, *parameters;
regex_t expr;
};
@@ -1415,6 +1503,10 @@ struct Channel {
Link *invites;
Ban *banlist;
Ban *exlist; /* exceptions */
Ban *invexlist; /* invite list */
#ifdef JOINTHROTTLE
aJFlood *jflood;
#endif
char chname[1];
};
@@ -1479,8 +1571,9 @@ struct liststruct {
#define CHFL_BAN 0x0020 /* ban channel flag */
#define CHFL_CHANOWNER 0x0040 /* channel owner */
#define CHFL_CHANPROT 0x0080 /* chan op protection */
#define CHFL_HALFOP 0x0100 /* halfop */
#define CHFL_EXCEPT 0x0200 /* phase this out ? +e */
#define CHFL_HALFOP 0x0100 /* halfop */
#define CHFL_EXCEPT 0x0200 /* phase this out ? +e */
#define CHFL_INVEX 0x0400 /* invite exception */
#define CHFL_OVERLAP (CHFL_CHANOWNER|CHFL_CHANPROT|CHFL_CHANOP|CHFL_VOICE|CHFL_HALFOP)
@@ -1489,21 +1582,21 @@ struct liststruct {
#define MODE_CHANOP CHFL_CHANOP
#define MODE_VOICE CHFL_VOICE
#define MODE_PRIVATE 0x0004
#define MODE_SECRET 0x0008
#define MODE_SECRET 0x0008
#define MODE_MODERATED 0x0010
#define MODE_TOPICLIMIT 0x0020
#define MODE_CHANOWNER 0x0040
#define MODE_CHANPROT 0x0080
#define MODE_HALFOP 0x0100
#define MODE_EXCEPT 0x0200
#define MODE_BAN 0x0400
#define MODE_HALFOP 0x0100
#define MODE_EXCEPT 0x0200
#define MODE_BAN 0x0400
#define MODE_INVITEONLY 0x0800
#define MODE_NOPRIVMSGS 0x1000
#define MODE_KEY 0x2000
#define MODE_LIMIT 0x4000
#define MODE_RGSTR 0x8000
#define MODE_RGSTRONLY 0x10000
#define MODE_LINK 0x20000
#define MODE_KEY 0x2000
#define MODE_LIMIT 0x4000
#define MODE_RGSTR 0x8000
#define MODE_RGSTRONLY 0x10000
#define MODE_LINK 0x20000
#define MODE_NOCOLOR 0x40000
#define MODE_OPERONLY 0x80000
#define MODE_ADMONLY 0x100000
@@ -1513,9 +1606,7 @@ struct liststruct {
#define MODE_NOINVITE 0x1000000
#define MODE_FLOODLIMIT 0x2000000
#define MODE_MODREG 0x4000000
#ifdef STRIPBADWORDS
#define MODE_STRIPBADWORDS 0x8000000
#endif
#define MODE_INVEX 0x8000000
#define MODE_NOCTCP 0x10000000
#define MODE_AUDITORIUM 0x20000000
#define MODE_ONLYSECURE 0x40000000
@@ -1525,7 +1616,7 @@ struct liststruct {
/*
* mode flags which take another parameter (With PARAmeterS)
*/
#define MODE_WPARAS (MODE_HALFOP|MODE_CHANOP|MODE_VOICE|MODE_CHANOWNER|MODE_CHANPROT|MODE_BAN|MODE_KEY|MODE_LINK|MODE_LIMIT|MODE_EXCEPT)
#define MODE_WPARAS (MODE_HALFOP|MODE_CHANOP|MODE_VOICE|MODE_CHANOWNER|MODE_CHANPROT|MODE_BAN|MODE_KEY|MODE_LINK|MODE_LIMIT|MODE_EXCEPT|MODE_INVEX)
/*
* Undefined here, these are used in conjunction with the above modes in
* the source.
@@ -1553,7 +1644,8 @@ struct liststruct {
#define BadPtr(x) (!(x) || (*(x) == '\0'))
#define isvalid(c) (((c) >= 'A' && (c) <= '~') || isdigit(c) || (c) == '-')
/** Is valid character in nick? [not for external usage, use do_check_nickname instead!] */
#define isvalid(c) (char_atribs[(u_char)(c)]&ALLOWN)
/* remote fds are set to -256, else its a local fd (a local fd
* can get -1 or -2 in case it has been closed). -- Syzop
@@ -1607,14 +1699,17 @@ struct liststruct {
/* misc variable externs */
extern char *version, *infotext[], *dalinfotext[], *unrealcredits[];
extern char *generation, *creation;
extern char *gnulicense[];
extern MODVAR char *version, *infotext[], *dalinfotext[], *unrealcredits[];
extern MODVAR char *generation, *creation;
extern MODVAR char *gnulicense[];
/* misc defines */
#define FLUSH_BUFFER -2
#define COMMA ","
#define PARTFMT ":%s PART %s"
#define PARTFMT2 ":%s PART %s :%s"
#ifdef USE_SSL
#include "ssl.h"
#endif
@@ -1662,12 +1757,48 @@ typedef struct {
unsigned parameters : 1;
} aCtab;
#ifdef JOINTHROTTLE
/** A jointhrottle item, this is a double linked list.
* prev_u Previous entry of user
* next_u Next entry of user
* prev_c Previous entry of channel
* next_c Next entry of channel
* chptr The channel this entry applies to
* cptr The user this entry applies to
* firstjoin Timestamp of "first join" (since last timer reset)
* numjoin Number of joins since that period
* CLARIFICATION:
* Why a double linked list? Well, the following operations need to be performed:
* - if user quits, entry must be removed
* - if channel is destroyed, entry must be removed
* (and of course, more, but these are the most important ones affecting this decision)
* While it would be possible to have a linked list only by user (for example),
* that would mean that upon channel destroy ALL entries would have to be searched
* trough, which might mean for example 800*8=6400 entries in a peak situation
* (such as after a server restart and hundreds of clients connecting&joining).
* For obvious reasons, that would be a very bad idea :).
* So this costs us 2 pointers (8b on ia32) per entry, but in case of channel destroy
* it means we only have for example 20 entries to scan trough rather than 2000.
* Worth the extra memory :). -- Syzop
* Note that in normal situations it won't be that bad since we will try to
* regulary free up some entries.
*/
struct JFlood {
aJFlood *prev_u, *next_u;
aJFlood *prev_c, *next_c;
aChannel *chptr;
aClient *cptr;
time_t firstjoin;
unsigned short numjoins;
};
#endif
void init_throttling_hash();
int hash_throttling(struct IN_ADDR *in);
struct ThrottlingBucket *find_throttling_bucket(struct IN_ADDR *in);
void add_throttling_bucket(struct IN_ADDR *in);
void del_throttling_bucket(struct ThrottlingBucket *bucket);
int throttle_can_connect(struct IN_ADDR *in);
int throttle_can_connect(aClient *, struct IN_ADDR *in);
#endif
@@ -1675,11 +1806,8 @@ int throttle_can_connect(struct IN_ADDR *in);
#define MARK_AS_OFFICIAL_MODULE(modinf) do { if (modinf && modinf->handle) ModuleSetOptions(modinfo->handle, MOD_OPT_OFFICIAL); } while(0)
#ifdef PREFIX_AQ
#define CHANOPPFX "~&@"
#else
#define CHANOPPFX "@"
#endif
/* old.. please don't use anymore */
#define CHANOPPFX "@"
/* used for is_banned type field: */
#define BANCHK_JOIN 0 /* checking if a ban forbids the person from joining */
+24 -3
View File
@@ -21,6 +21,25 @@
#ifndef __sys_include__
#define __sys_include__
/* alloca stuff */
#ifdef _WIN32
# include <malloc.h>
# define alloca _alloca
#else /* _WIN32 */
# ifdef HAVE_ALLOCA
# if defined(_AIX) && !defined(__GNUC__)
#pragma alloca
# endif /* _AIX */
# if defined(HAVE_ALLOCA_H)
# include <alloca.h>
# endif /* HAVE_ALLOCA_H */
# if defined(__GNUC__) && !defined(HAVE_ALLOCA_H) && !defined(alloca)
# define alloca __builtin_alloca
# endif /* __GNUC__ */
# endif /* HAVE_ALLOCA */
#endif /* !_WIN32 */
#ifdef ISC202
#include <net/errno.h>
#else
@@ -142,6 +161,9 @@ typedef unsigned short u_int16_t;
* IPv4 or IPv6 structures?
*/
# define MYDUMMY_SIZE 128
#ifdef INET6
# define AND16(x) ((x)[0]&(x)[1]&(x)[2]&(x)[3]&(x)[4]&(x)[5]&(x)[6]&(x)[7]&(x)[8]&(x)[9]&(x)[10]&(x)[11]&(x)[12]&(x)[13]&(x)[14]&(x)[15])
@@ -160,7 +182,6 @@ typedef unsigned short u_int16_t;
//# define uint32_t __u32
// # endif
# define MYDUMMY_SIZE 128
char mydummy[MYDUMMY_SIZE];
char mydummy2[MYDUMMY_SIZE];
@@ -170,7 +191,7 @@ char mydummy2[MYDUMMY_SIZE];
# endif
# endif
# if defined(linux)
# if defined(linux) && defined(NO_IN6ADDR_ANY)
static const struct in6_addr in6addr_any = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0
};
@@ -232,7 +253,7 @@ static const struct in6_addr in6addr_any = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
#define CLOSE_SOCK(fd) closesocket(fd)
#define IOCTL(x, y, z) ioctlsocket((x), (y), (z))
#define ERRNO WSAGetLastError()
#define STRERROR(x) nt_strerror(x)
#define STRERROR(x) sock_strerror(x)
#define SET_ERRNO(x) WSASetLastError(x)
/* Error constant portability */
#define P_EMFILE WSAEMFILE
+17 -1
View File
@@ -1,5 +1,5 @@
/*
* Unreal Internet Relay Chat Daemon, src/url.c
* Unreal Internet Relay Chat Daemon, include/types.h
* (C) 2003 The UnrealIRCd Team
*
* This program is free software; you can redistribute it and/or modify
@@ -24,4 +24,20 @@ typedef void (*vFP)(); /* Void function pointer */
typedef int (*iFP)(); /* Integer function pointer */
typedef char (*cFP)(); /* char * function pointer */
#ifndef MODVAR
#if defined(MODULE_COMPILE) && defined(_WIN32)
#define MODVAR __declspec(dllimport)
#else
#define MODVAR
#endif
#endif
#ifndef MODFUNC
#ifdef _WIN32
#define MODFUNC __declspec(dllexport)
#else
#define MODFUNC
#endif
#endif
#endif
+7 -6
View File
@@ -1,11 +1,12 @@
#ifndef URL_H
#define URL_H
#include "types.h"
int url_is_valid(char *);
char *url_getfilename(char *);
char *download_file(char *, char **);
void download_file_async(char *, time_t, vFP);
void url_do_transfers_async(void);
void url_init(void);
int MODFUNC url_is_valid(char *);
char MODFUNC *url_getfilename(char *);
char MODFUNC *download_file(char *, char **);
void MODFUNC download_file_async(char *, time_t, vFP);
void MODFUNC url_do_transfers_async(void);
void MODFUNC url_init(void);
#endif
+3 -3
View File
@@ -24,12 +24,12 @@
/**/
#define COMPILEINFO DEBUGMODESET DEBUGSET
/*
* Version Unreal3.2
* Version Unreal3.2.2
*/
#define UnrealProtocol 2303
#define UnrealProtocol 2306
#define PATCH1 "3"
#define PATCH2 ".2"
#define PATCH3 ""
#define PATCH3 ".3"
#define PATCH4 ""
#define PATCH5 ""
#define PATCH6 ""
+93 -34
View File
@@ -1,7 +1,7 @@
/*
regex.h - POSIX.2 compatible regexp interface and TRE extensions
Copyright (C) 2001-2003 Ville Laurikari <vl@iki.fi>.
Copyright (C) 2001-2004 Ville Laurikari <vl@iki.fi>.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 (June
@@ -27,6 +27,10 @@
#include <sys/types.h>
#endif /* HAVE_SYS_TYPES_H */
#ifdef HAVE_LIBUTF8_H
#include <libutf8.h>
#endif /* HAVE_LIBUTF8_H */
#ifdef TRE_USE_SYSTEM_REGEX_H
/* Include the system regex.h to make TRE ABI compatible with the
system regex. */
@@ -47,6 +51,17 @@ extern "C" {
typedef int reg_errcode_t;
#endif /* !HAVE_REG_ERRCODE_T */
#if !defined(REG_NOSPEC) && !defined(REG_LITERAL)
#define REG_LITERAL 0x1000
#endif
/* Extra regcomp() flags. */
#define REG_RIGHT_ASSOC (REG_LITERAL << 1)
/* Extra regexec() flags. */
#define REG_APPROX_MATCHER 0x1000
#define REG_BACKTRACKING_MATCHER (REG_APPROX_MATCHER << 1)
#else /* !TRE_USE_SYSTEM_REGEX_H */
/* If the we're not using system regex.h, we need to define the
@@ -55,7 +70,7 @@ typedef int reg_errcode_t;
typedef int regoff_t;
typedef struct {
size_t re_nsub; /* Number of parenthesized subexpressions. */
void *value; /* For internal use only. */
void *value; /* For internal use only. */
} regex_t;
typedef struct {
@@ -65,45 +80,50 @@ typedef struct {
typedef enum {
REG_OK = 0, /* No error. */
REG_OK = 0, /* No error. */
/* POSIX regcomp() return error codes. (In the order listed in the
standard.) */
REG_NOMATCH, /* No match. */
REG_BADPAT, /* Invalid regexp. */
REG_ECOLLATE, /* Unknown collating element. */
REG_ECTYPE, /* Unknown character class name. */
REG_EESCAPE, /* Trailing backslash. */
REG_ESUBREG, /* Invalid back reference. */
REG_EBRACK, /* "[]" imbalance */
REG_EPAREN, /* "\(\)" or "()" imbalance */
REG_EBRACE, /* "\{\}" or "{}" imbalance */
REG_BADBR, /* Invalid content of {} */
REG_ERANGE, /* Invalid use of range operator */
REG_ESPACE, /* Out of memory. */
standard.) */
REG_NOMATCH, /* No match. */
REG_BADPAT, /* Invalid regexp. */
REG_ECOLLATE, /* Unknown collating element. */
REG_ECTYPE, /* Unknown character class name. */
REG_EESCAPE, /* Trailing backslash. */
REG_ESUBREG, /* Invalid back reference. */
REG_EBRACK, /* "[]" imbalance */
REG_EPAREN, /* "\(\)" or "()" imbalance */
REG_EBRACE, /* "\{\}" or "{}" imbalance */
REG_BADBR, /* Invalid content of {} */
REG_ERANGE, /* Invalid use of range operator */
REG_ESPACE, /* Out of memory. */
REG_BADRPT
} reg_errcode_t;
/* POSIX regcomp() flags. */
#define REG_EXTENDED 1
#define REG_ICASE (REG_EXTENDED << 1)
#define REG_NEWLINE (REG_ICASE << 1)
#define REG_NOSUB (REG_NEWLINE << 1)
#define REG_EXTENDED 1
#define REG_ICASE (REG_EXTENDED << 1)
#define REG_NEWLINE (REG_ICASE << 1)
#define REG_NOSUB (REG_NEWLINE << 1)
/* Extra regcomp() flags. */
#define REG_BASIC 0
#define REG_LITERAL (REG_NOSUB << 1)
#define REG_BASIC 0
#define REG_LITERAL (REG_NOSUB << 1)
#define REG_RIGHT_ASSOC (REG_LITERAL << 1)
/* POSIX regexec() flags. */
#define REG_NOTBOL 1
#define REG_NOTEOL (REG_NOTBOL << 1)
/* Extra regexec() flags. */
#define REG_APPROX_MATCHER (REG_NOTEOL << 1)
#define REG_BACKTRACKING_MATCHER (REG_APPROX_MATCHER << 1)
#endif /* !TRE_USE_SYSTEM_REGEX_H */
/* REG_NOSPEC and REG_LITERAL mean the same thing. */
#if defined(REG_LITERAL)
#define REG_NOSPEC REG_LITERAL
#ifdef REG_LITERAL
#define REG_NOSPEC REG_LITERAL
#elif defined(REG_NOSPEC)
#define REG_LITERAL REG_NOSPEC
#define REG_LITERAL REG_NOSPEC
#endif /* defined(REG_NOSPEC) */
/* The maximum number of iterations in a bound expression. */
@@ -144,24 +164,24 @@ int regwnexec(const regex_t *preg, const wchar_t *string, size_t len,
/* Approximate matching parameter struct. */
typedef struct {
int cost_ins; /* Default cost of an inserted character. */
int cost_del; /* Default cost of a deleted character. */
int cost_ins; /* Default cost of an inserted character. */
int cost_del; /* Default cost of a deleted character. */
int cost_subst; /* Default cost of a substituted character. */
int max_cost; /* Maximum allowed cost of a match. */
int max_cost; /* Maximum allowed cost of a match. */
int max_ins; /* Maximum allowed number of inserts. */
int max_del; /* Maximum allowed number of deletes. */
int max_ins; /* Maximum allowed number of inserts. */
int max_del; /* Maximum allowed number of deletes. */
int max_subst; /* Maximum allowed number of substitutes. */
int max_err; /* Maximum allowed number of errors total. */
int max_err; /* Maximum allowed number of errors total. */
} regaparams_t;
/* Approximate matching result struct. */
typedef struct {
size_t nmatch; /* Length of pmatch[] array. */
regmatch_t *pmatch; /* Submatch data. */
int cost; /* Cost of the match. */
int num_ins; /* Number of inserts in the match. */
int num_del; /* Number of deletes in the match. */
int cost; /* Cost of the match. */
int num_ins; /* Number of inserts in the match. */
int num_del; /* Number of deletes in the match. */
int num_subst; /* Number of substitutes in the match. */
} regamatch_t;
@@ -183,6 +203,45 @@ int regawnexec(const regex_t *preg, const wchar_t *string, size_t len,
void regaparams_default(regaparams_t *params);
#endif /* TRE_APPROX */
#ifdef TRE_WCHAR
typedef wchar_t tre_char_t;
#else /* !TRE_WCHAR */
typedef unsigned char tre_char_t;
#endif /* !TRE_WCHAR */
typedef struct {
int (*get_next_char)(tre_char_t *c, unsigned int *pos_add, void *context);
void (*rewind)(size_t pos, void *context);
int (*compare)(size_t pos1, size_t pos2, size_t len, void *context);
void *context;
} tre_str_source;
int reguexec(const regex_t *preg, const tre_str_source *string,
size_t nmatch, regmatch_t pmatch[], int eflags);
/* Returns the version string. The returned string is static. */
char *tre_version(void);
/* Returns the value for a config parameter. The type to which `result'
must point to depends of the value of `query', see documentation for
more details. */
int tre_config(int query, void *result);
enum {
TRE_CONFIG_APPROX,
TRE_CONFIG_WCHAR,
TRE_CONFIG_MULTIBYTE,
TRE_CONFIG_SYSTEM_ABI,
TRE_CONFIG_VERSION
};
/* Returns 1 if the compiled pattern has back references, 0 if not. */
int tre_have_backrefs(const regex_t *preg);
/* Returns 1 if the compiled pattern uses approximate matching features,
0 if not. */
int tre_have_approx(const regex_t *preg);
#ifdef __cplusplus
}
#endif
+2 -1
View File
@@ -30,7 +30,6 @@
#undef SYSSYSLOGH
#define NOINDEX
#define NOBCOPY
#define NEED_STRERROR
#define NEED_STRTOKEN
#undef NEED_STRTOK
#undef NEED_INET_ADDR
@@ -43,10 +42,12 @@
#undef POSIX_SIGNALS
#undef TIMES_2
#undef GETRUSAGE_2
#define HAVE_ALLOCA
#define SPATH "."
#define DPATH "."
#define DOMAINNAME "irc.net"
#define NO_U_TYPES
#define NEED_U_INT32_T
#define PREFIX_AQ
#define LIST_SHOW_MODES
#endif
+29 -3
View File
@@ -1,5 +1,15 @@
/* tre-config.h. This file defines all compile time definitions
that are needed in `regex.h' for Win32. */
#ifndef HAVE_ALLOCA
/* Define to 1 if you have `alloca', as a function or macro. */
#define HAVE_ALLOCA 1
#endif
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
*/
#define HAVE_ALLOCA_H 1
/* Define to 1 if you have the <libutf8.h> header file. */
/* #undef HAVE_LIBUTF8_H */
/* Define to 1 if the system has the type `reg_errcode_t'. */
/* #undef HAVE_REG_ERRCODE_T */
@@ -16,11 +26,27 @@
/* Define to enable multibyte character set support. */
#undef TRE_MULTIBYTE
/* Define to include the system regex.h from TRE regex.h */
/* #undef TRE_USE_SYSTEM_REGEX_H */
/* Define to the absolute path to the system regex.h */
/* #undef TRE_SYSTEM_REGEX_H_PATH */
/* Define if you want TRE to use alloca() instead of malloc() when allocating
memory needed for regexec operations. */
#define TRE_USE_ALLOCA 1
/* Define to include the system regex.h from TRE regex.h */
/* #undef TRE_USE_SYSTEM_REGEX_H */
/* Define to enable wide character (wchar_t) support. */
#undef TRE_WCHAR
/* TRE version string. */
#define TRE_VERSION "0.7.2"
/* TRE version level 1. */
#define TRE_VERSION_1 0
/* TRE version level 2. */
#define TRE_VERSION_2 7
/* TRE version level 3. */
#define TRE_VERSION_3 2
+4 -4
View File
@@ -54,7 +54,7 @@ struct Zdata {
#endif /* ZIP_LINKS */
extern int zip_init(struct Client *, int);
extern void zip_free(struct Client *);
extern char *unzip_packet(struct Client *, char *, int *);
extern char *zip_buffer(struct Client *, char *, int *, int);
extern MODFUNC int zip_init(struct Client *, int);
extern MODFUNC void zip_free(struct Client *);
extern MODFUNC char *unzip_packet(struct Client *, char *, int *);
extern MODFUNC char *zip_buffer(struct Client *, char *, int *, int);
+3 -8
View File
@@ -1,6 +1,6 @@
/*
* IRC - Internet Relay Chat, src/modules/%FILE%
* (C) 2004 The UnrealIRCd Team
* (C) 2005 The UnrealIRCd Team
*
* See file AUTHORS in IRC package for additional names of
* the programmers.
@@ -44,7 +44,7 @@
#include "version.h"
#endif
DLLFUNC int m_%COMMAND%(aClient *cptr, aClient *sptr, int parc, char *parv[]);
DLLFUNC CMD_FUNC(m_%COMMAND%);
#define MSG_%UCOMMAND% "%UCOMMAND%"
#define TOK_%UCOMMAND% "%TOKEN%"
@@ -60,7 +60,7 @@ ModuleHeader MOD_HEADER(m_%COMMAND%)
DLLFUNC int MOD_INIT(m_%COMMAND%)(ModuleInfo *modinfo)
{
add_Command(MSG_%UCOMMAND%, TOK_%UCOMMAND%, m_%COMMAND%, %MAXPARA%);
CommandAdd(modinfo->handle, MSG_%UCOMMAND%, TOK_%UCOMMAND%, m_%COMMAND%, %MAXPARA%, M_USER|M_SERVER);
MARK_AS_OFFICIAL_MODULE(modinfo);
return MOD_SUCCESS;
}
@@ -72,11 +72,6 @@ DLLFUNC int MOD_LOAD(m_%COMMAND%)(int module_load)
DLLFUNC int MOD_UNLOAD(m_%COMMAND%)(int module_unload)
{
if (del_Command(MSG_%UCOMMAND%, TOK_%UCOMMAND%, m_%COMMAND%) < 0)
{
sendto_realops("Failed to delete commands when unloading %s",
MOD_HEADER(m_%COMMAND%).name);
}
return MOD_SUCCESS;
}
+451 -321
View File
@@ -101,70 +101,133 @@ OPENSSL_LIB=/LIBPATH:"$(OPENSSL_LIB_DIR)"
!ENDIF
!IFDEF DEBUG
DBGCFLAG=/MTd /Zi
DBGCFLAG=/MD /Zi
DBGLFLAG=/debug /debugtype:BOTH
MODDBGCFLAG=/LDd /MD /Zi
!ELSE
DBGCFLAG=/MT /O2 /G5
DBGCFLAG=/MD /O2 /G5
MODDBGCFLAG=/LD /MD
!ENDIF
FD_SETSIZE=/D FD_SETSIZE=16384
CFLAGS=$(DBGCFLAG) $(LIBCURL_INC) $(ZLIB_INC) $(OPENSSL_INC) /I ./INCLUDE /Fosrc/ /nologo \
$(ZIPCFLAGS) $(CURLCFLAGS) $(FD_SETSIZE) $(SSLCFLAGS) $(NS_ADDRESS) /D STATIC_LINKING \
/D NOSPOOF=1 /c
CFLAGS=$(DBGCFLAG) $(LIBCURL_INC) $(ZLIB_INC) $(OPENSSL_INC) /J /I ./INCLUDE /I ./INCLUDE/WIN32/ARES /Fosrc/ /nologo \
$(ZIPCFLAGS) $(CURLCFLAGS) $(FD_SETSIZE) $(SSLCFLAGS) $(NS_ADDRESS) /D NOSPOOF=1 /c
LFLAGS=kernel32.lib user32.lib gdi32.lib shell32.lib ws2_32.lib advapi32.lib \
dbghelp.lib oldnames.lib libcmt.lib comctl32.lib comdlg32.lib $(ZLIB_LIB) $(ZIPLIB) \
$(OPENSSL_LIB) $(SSLLIBS) $(LIBCURL_LIB) $(CURLLIB) /nodefaultlib /nologo $(DBGLFLAG) \
/out:WIRCD.EXE
dbghelp.lib oldnames.lib comctl32.lib comdlg32.lib $(ZLIB_LIB) $(ZIPLIB) \
$(OPENSSL_LIB) $(SSLLIBS) $(LIBCURL_LIB) $(CURLLIB) /def:wircd.def /implib:wircd.lib \
/nologo $(DBGLFLAG) /out:WIRCD.EXE
MODCFLAGS=$(MODDBGCFLAG) $(SSLCFLAGS) $(ZIPCFLAGS) $(CURLCFLAGS) /J /Fesrc/modules/ \
/Fosrc/modules/ /nologo $(LIBCURL_INC) $(ZLIB_INC) $(OPENSSL_INC) /I ./INCLUDE /D \
DYNAMIC_LINKING /D NOSPOOF /D MODULE_COMPILE
MODLFLAGS=/link /def:src/modules/module.def wircd.lib $(OPENSSL_LIB) $(SSLLIBS) \
$(ZLIB_LIB) $(ZIPLIB) $(LIBCURL_LIB) $(CURLLIB)
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
OBJ_FILES=SRC/CHANNEL.OBJ SRC/SEND.OBJ SRC/SOCKET.OBJ \
EXP_OBJ_FILES=SRC/CHANNEL.OBJ SRC/SEND.OBJ SRC/SOCKET.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/S_AUTH.OBJ \
SRC/HELP.OBJ SRC/S_MISC.OBJ SRC/MATCH.OBJ SRC/CRULE.OBJ \
SRC/S_DEBUG.OBJ SRC/SUPPORT.OBJ SRC/LIST.OBJ \
SRC/S_ERR.OBJ SRC/PACKET.OBJ SRC/S_BSD.OBJ \
SRC/S_SERV.OBJ SRC/S_USER.OBJ SRC/WIN32GUI.OBJ \
SRC/VERSION.OBJ SRC/RES_INIT.OBJ SRC/RES_COMP.OBJ SRC/RES_MKQUERY.OBJ SRC/RES_SKIPNAME.OBJ \
SRC/S_KLINE.OBJ SRC/S_EXTRA.OBJ SRC/IRCSPRINTF.OBJ SRC/LUSERS.OBJ \
SRC/S_SERV.OBJ SRC/S_USER.OBJ SRC/CHARSYS.OBJ \
SRC/VERSION.OBJ SRC/S_KLINE.OBJ SRC/S_EXTRA.OBJ SRC/IRCSPRINTF.OBJ SRC/LUSERS.OBJ \
SRC/SCACHE.OBJ SRC/ALN.OBJ SRC/BADWORDS.OBJ SRC/WEBTV.OBJ SRC/RES.OBJ SRC/MODULES.OBJ \
SRC/S_SVS.OBJ SRC/EVENTS.OBJ SRC/UMODES.OBJ SRC/AUTH.OBJ SRC/CIDR.OBJ SRC/SSL.OBJ \
SRC/SERVICE.OBJ SRC/DEBUG.OBJ SRC/RANDOM.OBJ SRC/EXTCMODES.OBJ \
SRC/RANDOM.OBJ SRC/EXTCMODES.OBJ SRC/MD5.OBJ SRC/API-ISUPPORT.OBJ SRC/API-COMMAND.OBJ \
SRC/EXTBANS.OBJ $(ZIPOBJ) $(CURLOBJ)
MOD_FILES=SRC/L_COMMANDS.OBJ SRC/M_CHGHOST.OBJ SRC/M_SDESC.OBJ SRC/M_SETIDENT.OBJ \
SRC/M_SETNAME.OBJ SRC/M_SETHOST.OBJ SRC/M_CHGIDENT.OBJ SRC/M_SVSMOTD.OBJ \
SRC/M_SVSNLINE.OBJ SRC/M_WHO.OBJ SRC/M_SWHOIS.OBJ SRC/M_SVSMODE.OBJ \
SRC/M_AWAY.OBJ SRC/M_SVSNOOP.OBJ SRC/M_MKPASSWD.OBJ SRC/M_SVSO.OBJ SRC/M_SVSNICK.OBJ \
SRC/M_ADMINCHAT.OBJ SRC/M_AKILL.OBJ SRC/M_CHGNAME.OBJ SRC/M_GUEST.OBJ SRC/M_HTM.OBJ \
SRC/M_LAG.OBJ SRC/M_MESSAGE.OBJ SRC/M_NACHAT.OBJ SRC/M_OPER.OBJ \
SRC/M_PINGPONG.OBJ SRC/M_QUIT.OBJ SRC/M_RAKILL.OBJ SRC/M_RPING.OBJ SRC/M_SENDUMODE.OBJ \
SRC/M_SQLINE.OBJ SRC/M_KILL.OBJ SRC/M_TSCTL.OBJ SRC/M_UNKLINE.OBJ \
SRC/M_UNSQLINE.OBJ SRC/M_UNZLINE.OBJ SRC/M_WHOIS.OBJ \
SRC/M_TKL.OBJ SRC/M_VHOST.OBJ \
SRC/M_CYCLE.OBJ SRC/M_SVSJOIN.OBJ SRC/M_SVSPART.OBJ SRC/M_SVSLUSERS.OBJ \
SRC/M_SVSWATCH.OBJ SRC/M_SVSSILENCE.OBJ SRC/M_SENDSNO.OBJ SRC/M_SVSSNO.OBJ \
SRC/M_SAJOIN.OBJ SRC/M_SAPART.OBJ SRC/M_SAMODE.OBJ SRC/M_KICK.OBJ SRC/M_TOPIC.OBJ \
SRC/M_INVITE.OBJ SRC/M_LIST.OBJ SRC/M_TIME.OBJ SRC/M_SVSKILL.OBJ SRC/M_KNOCK.OBJ \
SRC/M_UMODE2.OBJ SRC/M_SQUIT.OBJ SRC/M_PROTOCTL.OBJ SRC/M_SJOIN.OBJ SRC/M_PASS.OBJ \
SRC/M_USERHOST.OBJ SRC/M_ISON.OBJ SRC/M_SILENCE.OBJ SRC/M_ADDLINE.OBJ SRC/M_ADDMOTD.OBJ \
SRC/M_ADDOMOTD.OBJ SRC/M_WALLOPS.OBJ SRC/M_GLOBOPS.OBJ SRC/M_LOCOPS.OBJ SRC/M_CHATOPS.OBJ \
SRC/M_ADMIN.OBJ SRC/M_TRACE.OBJ SRC/M_NETINFO.OBJ SRC/M_LINKS.OBJ SRC/M_HELP.OBJ \
SRC/M_RULES.OBJ SRC/M_CLOSE.OBJ SRC/M_MAP.OBJ SRC/M_EOS.OBJ SRC/M_SERVER.OBJ \
SRC/M_STATS.OBJ SRC/M_SVSFLINE.OBJ SRC/M_DCCDENY.OBJ SRC/M_UNDCCDENY.OBJ \
SRC/M_WHOWAS.OBJ SRC/M_CONNECT.OBJ
OBJ_FILES=$(EXP_OBJ_FILES) SRC/GUI.OBJ SRC/SERVICE.OBJ SRC/DEBUG.OBJ SRC/RTF.OBJ \
SRC/EDITOR.OBJ SRC/WIN32.OBJ
ALL: CONF UNREAL.EXE WIRCD.EXE
MOD_FILES=SRC/MODULES/L_COMMANDS.C SRC/MODULES/M_CHGHOST.C SRC/MODULES/M_SDESC.C \
SRC/MODULES/M_SETIDENT.C SRC/MODULES/M_SETNAME.C SRC/MODULES/M_SETHOST.C \
SRC/MODULES/M_CHGIDENT.C SRC/MODULES/M_SVSMOTD.C SRC/MODULES/M_SVSNLINE.C \
SRC/MODULES/M_WHO.C SRC/MODULES/M_SWHOIS.C SRC/MODULES/M_SVSMODE.C SRC/MODULES/M_AWAY.C \
SRC/MODULES/M_SVSNOOP.C SRC/MODULES/M_MKPASSWD.C SRC/MODULES/M_SVSO.C \
SRC/MODULES/M_SVSNICK.C SRC/MODULES/M_ADMINCHAT.C SRC/MODULES/M_AKILL.C \
SRC/MODULES/M_CHGNAME.C SRC/MODULES/M_GUEST.C SRC/MODULES/M_HTM.C SRC/MODULES/M_LAG.C \
SRC/MODULES/M_MESSAGE.C SRC/MODULES/M_NACHAT.C SRC/MODULES/M_OPER.C \
SRC/MODULES/M_PINGPONG.C SRC/MODULES/M_QUIT.C SRC/MODULES/M_RAKILL.C SRC/MODULES/M_RPING.C \
SRC/MODULES/M_SENDUMODE.C SRC/MODULES/M_SQLINE.C SRC/MODULES/M_KILL.C \
SRC/MODULES/M_TSCTL.C SRC/MODULES/M_UNKLINE.C SRC/MODULES/M_UNSQLINE.C \
SRC/MODULES/M_UNZLINE.C SRC/MODULES/M_WHOIS.C SRC/MODULES/M_TKL.C SRC/MODULES/M_VHOST.C \
SRC/MODULES/M_CYCLE.C SRC/MODULES/M_SVSJOIN.C SRC/MODULES/M_SVSPART.C \
SRC/MODULES/M_SVSLUSERS.C SRC/MODULES/M_SVSWATCH.C SRC/MODULES/M_SVSSILENCE.C \
SRC/MODULES/M_SENDSNO.C SRC/MODULES/M_SVSSNO.C SRC/MODULES/M_SAJOIN.C \
SRC/MODULES/M_SAPART.C SRC/MODULES/M_SAMODE.C SRC/MODULES/M_KICK.C SRC/MODULES/M_TOPIC.C \
SRC/MODULES/M_INVITE.C SRC/MODULES/M_LIST.C SRC/MODULES/M_TIME.C SRC/MODULES/M_SVSKILL.C \
SRC/MODULES/M_KNOCK.C SRC/MODULES/M_UMODE2.C SRC/MODULES/M_SQUIT.C \
SRC/MODULES/M_PROTOCTL.C SRC/MODULES/M_SJOIN.C SRC/MODULES/M_PASS.C \
SRC/MODULES/M_USERHOST.C SRC/MODULES/M_ISON.C SRC/MODULES/M_SILENCE.C \
SRC/MODULES/M_ADDLINE.C SRC/MODULES/M_ADDMOTD.C SRC/MODULES/M_ADDOMOTD.C \
SRC/MODULES/M_WALLOPS.C SRC/MODULES/M_GLOBOPS.C SRC/MODULES/M_LOCOPS.C \
SRC/MODULES/M_CHATOPS.C SRC/MODULES/M_ADMIN.C SRC/MODULES/M_TRACE.C \
SRC/MODULES/M_NETINFO.C SRC/MODULES/M_LINKS.C SRC/MODULES/M_HELP.C \
SRC/MODULES/M_RULES.C SRC/MODULES/M_CLOSE.C SRC/MODULES/M_MAP.C SRC/MODULES/M_EOS.C \
SRC/MODULES/M_SERVER.C SRC/MODULES/M_STATS.C SRC/MODULES/M_SVSFLINE.C \
SRC/MODULES/M_DCCDENY.C SRC/MODULES/M_UNDCCDENY.C SRC/MODULES/M_WHOWAS.C \
SRC/MODULES/M_CONNECT.C SRC/MODULES/M_DCCALLOW.C SRC/MODULES/M_USERIP.C \
SRC/MODULES/M_NICK.C SRC/MODULES/M_USER.C SRC/MODULES/M_MODE.C \
SRC/MODULES/M_WATCH.C SRC/MODULES/M_PART.C SRC/MODULES/M_JOIN.C \
SRC/MODULES/M_MOTD.C SRC/MODULES/M_OPERMOTD.C SRC/MODULES/M_BOTMOTD.C \
SRC/MODULES/M_LUSERS.C
DLL_FILES=SRC/MODULES/M_CHGHOST.DLL SRC/MODULES/M_SDESC.DLL SRC/MODULES/M_SETIDENT.DLL \
SRC/MODULES/M_SETNAME.DLL SRC/MODULES/M_SETHOST.DLL SRC/MODULES/M_CHGIDENT.DLL \
SRC/MODULES/M_SVSMOTD.DLL SRC/MODULES/M_SVSNLINE.DLL SRC/MODULES/M_WHO.DLL \
SRC/MODULES/M_SWHOIS.DLL SRC/MODULES/M_SVSMODE.DLL SRC/MODULES/M_AWAY.DLL \
SRC/MODULES/M_SVSNOOP.DLL SRC/MODULES/M_MKPASSWD.DLL SRC/MODULES/M_SVSO.DLL \
SRC/MODULES/M_SVSNICK.DLL SRC/MODULES/M_ADMINCHAT.DLL SRC/MODULES/M_AKILL.DLL \
SRC/MODULES/M_CHGNAME.DLL SRC/MODULES/M_GUEST.DLL SRC/MODULES/M_HTM.DLL \
SRC/MODULES/M_LAG.DLL SRC/MODULES/M_MESSAGE.DLL SRC/MODULES/M_NACHAT.DLL \
SRC/MODULES/M_OPER.DLL SRC/MODULES/M_PINGPONG.DLL SRC/MODULES/M_QUIT.DLL \
SRC/MODULES/M_RAKILL.DLL SRC/MODULES/M_RPING.DLL SRC/MODULES/M_SENDUMODE.DLL \
SRC/MODULES/M_SQLINE.DLL SRC/MODULES/M_KILL.DLL SRC/MODULES/M_TSCTL.DLL \
SRC/MODULES/M_UNKLINE.DLL SRC/MODULES/M_UNSQLINE.DLL SRC/MODULES/M_UNZLINE.DLL \
SRC/MODULES/M_WHOIS.DLL SRC/MODULES/M_TKL.DLL SRC/MODULES/M_VHOST.DLL \
SRC/MODULES/M_CYCLE.DLL SRC/MODULES/M_SVSJOIN.DLL SRC/MODULES/M_SVSPART.DLL \
SRC/MODULES/M_SVSLUSERS.DLL SRC/MODULES/M_SVSWATCH.DLL SRC/MODULES/M_SVSSILENCE.DLL \
SRC/MODULES/M_SENDSNO.DLL SRC/MODULES/M_SVSSNO.DLL SRC/MODULES/M_SAJOIN.DLL \
SRC/MODULES/M_SAPART.DLL SRC/MODULES/M_SAMODE.DLL SRC/MODULES/M_KICK.DLL \
SRC/MODULES/M_TOPIC.DLL SRC/MODULES/M_INVITE.DLL SRC/MODULES/M_LIST.DLL \
SRC/MODULES/M_TIME.DLL SRC/MODULES/M_SVSKILL.DLL SRC/MODULES/M_KNOCK.DLL \
SRC/MODULES/M_UMODE2.DLL SRC/MODULES/M_SQUIT.DLL SRC/MODULES/M_PROTOCTL.DLL \
SRC/MODULES/M_SJOIN.DLL SRC/MODULES/M_PASS.DLL SRC/MODULES/M_USERHOST.DLL \
SRC/MODULES/M_ISON.DLL SRC/MODULES/M_SILENCE.DLL SRC/MODULES/M_ADDLINE.DLL \
SRC/MODULES/M_ADDMOTD.DLL SRC/MODULES/M_ADDOMOTD.DLL SRC/MODULES/M_WALLOPS.DLL \
SRC/MODULES/M_GLOBOPS.DLL SRC/MODULES/M_LOCOPS.DLL SRC/MODULES/M_CHATOPS.DLL \
SRC/MODULES/M_ADMIN.DLL SRC/MODULES/M_TRACE.DLL SRC/MODULES/M_NETINFO.DLL \
SRC/MODULES/M_LINKS.DLL SRC/MODULES/M_HELP.DLL SRC/MODULES/M_RULES.DLL \
SRC/MODULES/M_CLOSE.DLL SRC/MODULES/M_MAP.DLL SRC/MODULES/M_EOS.DLL \
SRC/MODULES/M_SERVER.DLL SRC/MODULES/M_STATS.DLL SRC/MODULES/M_SVSFLINE.DLL \
SRC/MODULES/M_DCCDENY.DLL SRC/MODULES/M_UNDCCDENY.DLL SRC/MODULES/M_WHOWAS.DLL \
SRC/MODULES/M_CONNECT.DLL SRC/MODULES/M_DCCALLOW.DLL SRC/MODULES/M_USERIP.DLL \
SRC/MODULES/M_NICK.DLL SRC/MODULES/M_USER.DLL SRC/MODULES/M_MODE.DLL \
SRC/MODULES/M_WATCH.DLL SRC/MODULES/M_PART.DLL SRC/MODULES/M_JOIN.DLL \
SRC/MODULES/M_MOTD.DLL SRC/MODULES/M_OPERMOTD.DLL SRC/MODULES/M_BOTMOTD.DLL \
SRC/MODULES/M_LUSERS.DLL \
SRC/MODULES/CLOAK.DLL
ALL: CONF UNREAL.EXE WIRCD.EXE src/modules/commands.dll MODULES
CLEAN:
-@erase src\*.obj >NUL
-@erase src\win32.res >NUL
-@erase src\version.c >NUL
-@erase src\win32\*.obj >NUL
-@erase src\modules\*.obj >NUL
-@erase src\modules\*.dll >NUL
-@erase .\*.exe >NUL
-@erase wircd.lib >NUL
-@erase src\modules\*.exp >NUL
-@erase src\modules\*.lib >NUL
-@erase src\modules\*.pdb >NUL
-@erase src\modules\*.ilk >NUL
./UNREAL.EXE: SRC/UNREAL.OBJ SRC/WIN32/UNREAL.RES
$(LINK) advapi32.lib src/unreal.obj src/win32/unreal.res
@@ -176,8 +239,8 @@ CONF:
./WIRCD.EXE: $(OBJ_FILES) $(MOD_FILES) SRC/win32/WIN32.RES
$(LINK) $(LFLAGS) $(OBJ_FILES) $(MOD_FILES) SRC/win32/WIN32.RES SRC/WIN32/TRE.LIB /MAPINFO:LINES /MAP
./WIRCD.EXE: $(OBJ_FILES) SRC/win32/WIN32.RES
$(LINK) $(LFLAGS) $(OBJ_FILES) SRC/win32/WIN32.RES SRC/WIN32/TRE.LIB SRC/WIN32/ARESLIB.LIB /MAPINFO:LINES /MAP
-@erase src\win32\win32.res
!IFNDEF DEBUG
@echo Non Debug version built
@@ -185,6 +248,8 @@ CONF:
@echo Debug version built ...
!ENDIF
#Source files
src/version.obj: src/version.c
$(CC) $(CFLAGS) src/version.c
@@ -246,12 +311,6 @@ src/list.obj: src/list.c $(INCLUDES)
src/res.obj: src/res.c $(INCLUDES)
$(CC) $(CFLAGS) src/res.c
src/res_mkquery.obj: src/res_mkquery.c $(INCLUDES)
$(CC) $(CFLAGS) src/res_mkquery.c
src/res_skipname.obj: src/res_skipname.c $(INCLUDES)
$(CC) $(CFLAGS) src/res_skipname.c
src/s_bsd.obj: src/s_bsd.c $(INCLUDES)
$(CC) $(CFLAGS) src/s_bsd.c
@@ -286,6 +345,10 @@ src/s_user.obj: src/s_user.c $(INCLUDES) ./include/dbuf.h \
./include/channel.h ./include/whowas.h
$(CC) $(CFLAGS) src/s_user.c
src/charsys.obj: src/charsys.c $(INCLUDES) ./include/dbuf.h \
./include/channel.h ./include/whowas.h
$(CC) $(CFLAGS) src/charsys.c
src/s_extra.obj: src/s_extra.c $(INCLUDES) ./include/dbuf.h \
./include/channel.h ./include/whowas.h
$(CC) $(CFLAGS) src/s_extra.c
@@ -305,32 +368,35 @@ src/hash.obj: src/hash.c $(INCLUDES) ./include/hash.h
src/crule.obj: src/crule.c $(INCLUDES)
$(CC) $(CFLAGS) src/crule.c
src/win32gui.obj: src/win32/win32gui.c $(INCLUDES) ./include/resource.h
$(CC) $(CFLAGS) src/win32/win32gui.c
src/gui.obj: src/win32/gui.c $(INCLUDES) ./include/resource.h
$(CC) $(CFLAGS) src/win32/gui.c
src/rtf.obj: src/win32/rtf.c $(INCLUDES) ./src/win32/win32.h
$(CC) $(CFLAGS) src/win32/rtf.c
src/editor.obj: src/win32/editor.c $(INCLUDES) ./include/resource.h ./src/win32/win32.h
$(CC) $(CFLAGS) src/win32/editor.c
src/service.obj: src/win32/service.c $(INCLUDES)
$(CC) $(CFLAGS) src/win32/service.c
src/unreal.obj: src/win32/unreal.c $(INCLUDES)
$(CC) $(CFLAGS) src/win32/unreal.c
src/debug.obj: src/win32/debug.c $(INCLUDES)
$(CC) $(CFLAGS) src/win32/debug.c
src/res_comp.obj: src/res_comp.c $(INCLUDES)
$(CC) $(CFLAGS) src/res_comp.c
src/win32.obj: src/win32/win32.c $(INCLUDES)
$(CC) $(CFLAGS) src/win32/win32.c
src/res_init.obj: src/res_init.c $(INCLUDES)
$(CC) $(CFLAGS) src/res_init.c
src/unreal.obj: src/win32/unreal.c $(INCLUDES)
$(CC) $(CFLAGS) src/win32/unreal.c
src/help.obj: src/help.c $(INCLUDES)
$(CC) $(CFLAGS) src/help.c
src/modules.obj: src/modules.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules.c
$(CC) $(CFLAGS) src/modules.c
src/events.obj: src/events.c $(INCLUDES)
$(CC) $(CFLAGS) src/events.c
$(CC) $(CFLAGS) src/events.c
src/umodes.obj: src/umodes.c $(INCLUDES)
$(CC) $(CFLAGS) src/umodes.c
@@ -347,285 +413,27 @@ src/random.obj: src/random.c $(INCLUDES)
src/extcmodes.obj: src/extcmodes.c $(INCLUDES)
$(CC) $(CFLAGS) src/extcmodes.c
src/md5.obj: src/md5.c $(INCLUDES)
$(CC) $(CFLAGS) src/md5.c
src/url.obj: src/url.c $(INCLUDES) ./include/url.h
$(CC) $(CFLAGS) src/url.c
src/extbans.obj: src/extbans.c $(INCLUDES)
$(CC) $(CFLAGS) src/extbans.c
src/api-isupport.obj: src/api-isupport.c $(INCLUDES)
$(CC) $(CFLAGS) src/api-isupport.c
src/api-command.obj: src/api-command.c $(INCLUDES)
$(CC) $(CFLAGS) src/api-command.c
src/zip.obj: src/zip.c $(INCLUDES)
$(CC) $(CFLAGS) src/zip.c
src/ssl.obj: src/ssl.c $(INCLUDES)
$(CC) $(CFLAGS) src/ssl.c
src/l_commands.obj: src/modules/l_commands.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/l_commands.c
src/m_chghost.obj: src/modules/m_chghost.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_chghost.c
src/m_chgident.obj: src/modules/m_chgident.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_chgident.c
src/m_sdesc.obj: src/modules/m_sdesc.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_sdesc.c
src/m_sethost.obj: src/modules/m_sethost.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_sethost.c
src/m_setident.obj: src/modules/m_setident.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_setident.c
src/m_setname.obj: src/modules/m_setname.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_setname.c
src/m_svsmotd.obj: src/modules/m_svsmotd.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_svsmotd.c
src/m_svsmode.obj: src/modules/m_svsmode.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_svsmode.c
src/m_tkl.obj: src/modules/m_tkl.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_tkl.c
src/m_swhois.obj: src/modules/m_swhois.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_swhois.c
src/m_svsnline.obj: src/modules/m_svsnline.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_svsnline.c
src/m_who.obj: src/modules/m_who.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_who.c
src/m_away.obj: src/modules/m_away.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_away.c
src/m_mkpasswd.obj: src/modules/m_mkpasswd.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_mkpasswd.c
src/m_svsnoop.obj: src/modules/m_svsnoop.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_svsnoop.c
src/m_svso.obj: src/modules/m_svso.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_svso.c
src/m_svsnick.obj: src/modules/m_svsnick.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_svsnick.c
src/m_adminchat.obj: src/modules/m_adminchat.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_adminchat.c
src/m_akill.obj: src/modules/m_akill.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_akill.c
src/m_chgname.obj: src/modules/m_chgname.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_chgname.c
src/m_guest.obj: src/modules/m_guest.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_guest.c
src/m_htm.obj: src/modules/m_htm.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_htm.c
src/m_kill.obj: src/modules/m_kill.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_kill.c
src/m_lag.obj: src/modules/m_lag.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_lag.c
src/m_message.obj: src/modules/m_message.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_message.c
src/m_nachat.obj: src/modules/m_nachat.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_nachat.c
src/m_oper.obj: src/modules/m_oper.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_oper.c
src/m_pingpong.obj: src/modules/m_pingpong.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_pingpong.c
src/m_quit.obj: src/modules/m_quit.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_quit.c
src/m_rakill.obj: src/modules/m_rakill.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_rakill.c
src/m_rping.obj: src/modules/m_rping.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_rping.c
src/m_sendumode.obj: src/modules/m_sendumode.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_sendumode.c
src/m_sqline.obj: src/modules/m_sqline.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_sqline.c
src/m_tsctl.obj: src/modules/m_tsctl.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_tsctl.c
src/m_unkline.obj: src/modules/m_unkline.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_unkline.c
src/m_unsqline.obj: src/modules/m_unsqline.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_unsqline.c
src/m_unzline.obj: src/modules/m_unzline.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_unzline.c
src/m_whois.obj: src/modules/m_whois.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_whois.c
src/m_vhost.obj: src/modules/m_vhost.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_vhost.c
src/m_cycle.obj: src/modules/m_cycle.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_cycle.c
src/m_svsjoin.obj: src/modules/m_svsjoin.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_svsjoin.c
src/m_svspart.obj: src/modules/m_svspart.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_svspart.c
src/m_svslusers.obj: src/modules/m_svslusers.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_svslusers.c
src/m_svswatch.obj: src/modules/m_svswatch.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_svswatch.c
src/m_svssilence.obj: src/modules/m_svssilence.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_svssilence.c
src/m_sendsno.obj: src/modules/m_sendsno.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_sendsno.c
src/m_svssno.obj: src/modules/m_svssno.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_svssno.c
src/m_sajoin.obj: src/modules/m_sajoin.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_sajoin.c
src/m_sapart.obj: src/modules/m_sapart.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_sapart.c
src/m_samode.obj: src/modules/m_samode.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_samode.c
src/m_kick.obj: src/modules/m_kick.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_kick.c
src/m_topic.obj: src/modules/m_topic.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_topic.c
src/m_invite.obj: src/modules/m_invite.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_invite.c
src/m_list.obj: src/modules/m_list.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_list.c
src/m_time.obj: src/modules/m_time.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_time.c
src/m_svskill.obj: src/modules/m_svskill.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_svskill.c
src/m_sjoin.obj: src/modules/m_sjoin.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_sjoin.c
src/m_pass.obj: src/modules/m_pass.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_pass.c
src/m_userhost.obj: src/modules/m_userhost.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_userhost.c
src/m_ison.obj: src/modules/m_ison.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_ison.c
src/m_silence.obj: src/modules/m_silence.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_silence.c
src/m_knock.obj: src/modules/m_knock.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_knock.c
src/m_umode2.obj: src/modules/m_umode2.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_umode2.c
src/m_squit.obj: src/modules/m_squit.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_squit.c
src/m_protoctl.obj: src/modules/m_protoctl.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_protoctl.c
src/m_addline.obj: src/modules/m_addline.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_addline.c
src/m_addmotd.obj: src/modules/m_addmotd.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_addmotd.c
src/m_addomotd.obj: src/modules/m_addomotd.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_addomotd.c
src/m_wallops.obj: src/modules/m_wallops.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_wallops.c
src/m_admin.obj: src/modules/m_admin.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_admin.c
src/m_globops.obj: src/modules/m_globops.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_globops.c
src/m_locops.obj: src/modules/m_locops.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_locops.c
src/m_chatops.obj: src/modules/m_chatops.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_chatops.c
src/m_trace.obj: src/modules/m_trace.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_trace.c
src/m_netinfo.obj: src/modules/m_netinfo.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_netinfo.c
src/m_links.obj: src/modules/m_links.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_links.c
src/m_help.obj: src/modules/m_help.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_help.c
src/m_rules.obj: src/modules/m_rules.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_rules.c
src/m_close.obj: src/modules/m_close.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_close.c
src/m_map.obj: src/modules/m_map.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_map.c
src/m_eos.obj: src/modules/m_eos.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_eos.c
src/m_server.obj: src/modules/m_server.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_server.c
src/m_stats.obj: src/modules/m_stats.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_stats.c
src/m_svsfline.obj: src/modules/m_svsfline.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_svsfline.c
src/m_dccdeny.obj: src/modules/m_dccdeny.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_dccdeny.c
src/m_undccdeny.obj: src/modules/m_undccdeny.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_undccdeny.c
src/m_whowas.obj: src/modules/m_whowas.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_whowas.c
src/m_connect.obj: src/modules/m_connect.c $(INCLUDES)
$(CC) $(CFLAGS) src/modules/m_connect.c
src/win32/win32.res: src/win32/win32gui.rc
$(RC) /l 0x409 /fosrc/win32/win32.res /i ./include /i ./src \
/d NDEBUG src/win32/win32gui.rc
@@ -634,6 +442,328 @@ src/win32/unreal.res: src/win32/unreal.rc
$(RC) /l 0x409 /fosrc/win32/unreal.res /i ./include /i ./src \
/d NDEBUG src/win32/unreal.rc
################# Modules #################
CUSTOMMODULE: src/modules/$(MODULEFILE).c
$(CC) $(MODCFLAGS) src/modules/$(MODULEFILE).c $(MODLFLAGS) \
/OUT:src/modules/$(MODULEFILE).dll $(EXLIBS)
SYMBOLFILE:
$(CC) src/win32/def-clean.c
dlltool --output-def wircd.def.in --export-all-symbols $(EXP_OBJ_FILES)
def-clean wircd.def.in wircd.def
MODULES: $(DLL_FILES)
src/modules/commands.dll: $(MOD_FILES) $(INCLUDES)
$(CC) $(MODDBGCFLAG) $(LIBCURL_INC) $(ZLIB_INC) $(OPENSSL_INC) /nologo \
$(SSLCFLAGS) $(ZIPCFLAGS) $(CURLCFLAGS) /Fosrc/modules/ \
/I ./INCLUDE /D NOSPOOF /D MODULE_COMPILE $(MOD_FILES) \
$(MODLFLAGS) src/win32/tre.lib /OUT:src/modules/commands.dll
src/modules/m_chghost.dll: src/modules/m_chghost.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_chghost.c $(MODLFLAGS)
src/modules/m_chgident.dll: src/modules/m_chgident.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_chgident.c $(MODLFLAGS)
src/modules/m_sdesc.dll: src/modules/m_sdesc.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_sdesc.c $(MODLFLAGS)
src/modules/m_sethost.dll: src/modules/m_sethost.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_sethost.c $(MODLFLAGS)
src/modules/m_setident.dll: src/modules/m_setident.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_setident.c $(MODLFLAGS)
src/modules/m_setname.dll: src/modules/m_setname.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_setname.c $(MODLFLAGS)
src/modules/m_svsmotd.dll: src/modules/m_svsmotd.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_svsmotd.c $(MODLFLAGS)
src/modules/m_svsmode.dll: src/modules/m_svsmode.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_svsmode.c $(MODLFLAGS)
src/modules/m_tkl.dll: src/modules/m_tkl.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_tkl.c $(MODLFLAGS) src/win32/tre.lib
src/modules/m_swhois.dll: src/modules/m_swhois.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_swhois.c $(MODLFLAGS)
src/modules/m_svsnline.dll: src/modules/m_svsnline.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_svsnline.c $(MODLFLAGS)
src/modules/m_who.dll: src/modules/m_who.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_who.c $(MODLFLAGS)
src/modules/m_away.dll: src/modules/m_away.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_away.c $(MODLFLAGS)
src/modules/m_mkpasswd.dll: src/modules/m_mkpasswd.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_mkpasswd.c $(MODLFLAGS)
src/modules/m_svsnoop.dll: src/modules/m_svsnoop.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_svsnoop.c $(MODLFLAGS)
src/modules/m_svso.dll: src/modules/m_svso.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_svso.c $(MODLFLAGS)
src/modules/m_svsnick.dll: src/modules/m_svsnick.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_svsnick.c $(MODLFLAGS)
src/modules/m_adminchat.dll: src/modules/m_adminchat.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_adminchat.c $(MODLFLAGS)
src/modules/m_akill.dll: src/modules/m_akill.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_akill.c $(MODLFLAGS)
src/modules/m_chgname.dll: src/modules/m_chgname.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_chgname.c $(MODLFLAGS)
src/modules/m_guest.dll: src/modules/m_guest.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_guest.c $(MODLFLAGS)
src/modules/m_htm.dll: src/modules/m_htm.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_htm.c $(MODLFLAGS)
src/modules/m_kill.dll: src/modules/m_kill.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_kill.c $(MODLFLAGS)
src/modules/m_lag.dll: src/modules/m_lag.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_lag.c $(MODLFLAGS)
src/modules/m_message.dll: src/modules/m_message.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_message.c $(MODLFLAGS)
src/modules/m_nachat.dll: src/modules/m_nachat.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_nachat.c $(MODLFLAGS)
src/modules/m_oper.dll: src/modules/m_oper.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_oper.c $(MODLFLAGS)
src/modules/m_pingpong.dll: src/modules/m_pingpong.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_pingpong.c $(MODLFLAGS)
src/modules/m_quit.dll: src/modules/m_quit.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_quit.c $(MODLFLAGS)
src/modules/m_rakill.dll: src/modules/m_rakill.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_rakill.c $(MODLFLAGS)
src/modules/m_rping.dll: src/modules/m_rping.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_rping.c $(MODLFLAGS)
src/modules/m_sendumode.dll: src/modules/m_sendumode.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_sendumode.c $(MODLFLAGS)
src/modules/m_sqline.dll: src/modules/m_sqline.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_sqline.c $(MODLFLAGS)
src/modules/m_tsctl.dll: src/modules/m_tsctl.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_tsctl.c $(MODLFLAGS)
src/modules/m_unkline.dll: src/modules/m_unkline.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_unkline.c $(MODLFLAGS)
src/modules/m_unsqline.dll: src/modules/m_unsqline.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_unsqline.c $(MODLFLAGS)
src/modules/m_unzline.dll: src/modules/m_unzline.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_unzline.c $(MODLFLAGS)
src/modules/m_whois.dll: src/modules/m_whois.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_whois.c $(MODLFLAGS)
src/modules/m_vhost.dll: src/modules/m_vhost.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_vhost.c $(MODLFLAGS)
src/modules/m_cycle.dll: src/modules/m_cycle.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_cycle.c $(MODLFLAGS)
src/modules/m_svsjoin.dll: src/modules/m_svsjoin.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_svsjoin.c $(MODLFLAGS)
src/modules/m_svspart.dll: src/modules/m_svspart.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_svspart.c $(MODLFLAGS)
src/modules/m_svslusers.dll: src/modules/m_svslusers.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_svslusers.c $(MODLFLAGS)
src/modules/m_svswatch.dll: src/modules/m_svswatch.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_svswatch.c $(MODLFLAGS)
src/modules/m_svssilence.dll: src/modules/m_svssilence.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_svssilence.c $(MODLFLAGS)
src/modules/m_sendsno.dll: src/modules/m_sendsno.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_sendsno.c $(MODLFLAGS)
src/modules/m_svssno.dll: src/modules/m_svssno.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_svssno.c $(MODLFLAGS)
src/modules/m_sajoin.dll: src/modules/m_sajoin.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_sajoin.c $(MODLFLAGS)
src/modules/m_sapart.dll: src/modules/m_sapart.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_sapart.c $(MODLFLAGS)
src/modules/m_samode.dll: src/modules/m_samode.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_samode.c $(MODLFLAGS)
src/modules/m_kick.dll: src/modules/m_kick.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_kick.c $(MODLFLAGS)
src/modules/m_topic.dll: src/modules/m_topic.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_topic.c $(MODLFLAGS)
src/modules/m_invite.dll: src/modules/m_invite.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_invite.c $(MODLFLAGS)
src/modules/m_list.dll: src/modules/m_list.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_list.c $(MODLFLAGS)
src/modules/m_time.dll: src/modules/m_time.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_time.c $(MODLFLAGS)
src/modules/m_svskill.dll: src/modules/m_svskill.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_svskill.c $(MODLFLAGS)
src/modules/m_sjoin.dll: src/modules/m_sjoin.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_sjoin.c $(MODLFLAGS)
src/modules/m_pass.dll: src/modules/m_pass.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_pass.c $(MODLFLAGS)
src/modules/m_userhost.dll: src/modules/m_userhost.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_userhost.c $(MODLFLAGS)
src/modules/m_ison.dll: src/modules/m_ison.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_ison.c $(MODLFLAGS)
src/modules/m_silence.dll: src/modules/m_silence.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_silence.c $(MODLFLAGS)
src/modules/m_knock.dll: src/modules/m_knock.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_knock.c $(MODLFLAGS)
src/modules/m_umode2.dll: src/modules/m_umode2.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_umode2.c $(MODLFLAGS)
src/modules/m_squit.dll: src/modules/m_squit.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_squit.c $(MODLFLAGS)
src/modules/m_protoctl.dll: src/modules/m_protoctl.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_protoctl.c $(MODLFLAGS)
src/modules/m_addline.dll: src/modules/m_addline.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_addline.c $(MODLFLAGS)
src/modules/m_addmotd.dll: src/modules/m_addmotd.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_addmotd.c $(MODLFLAGS)
src/modules/m_addomotd.dll: src/modules/m_addomotd.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_addomotd.c $(MODLFLAGS)
src/modules/m_wallops.dll: src/modules/m_wallops.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_wallops.c $(MODLFLAGS)
src/modules/m_admin.dll: src/modules/m_admin.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_admin.c $(MODLFLAGS)
src/modules/m_globops.dll: src/modules/m_globops.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_globops.c $(MODLFLAGS)
src/modules/m_locops.dll: src/modules/m_locops.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_locops.c $(MODLFLAGS)
src/modules/m_chatops.dll: src/modules/m_chatops.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_chatops.c $(MODLFLAGS)
src/modules/m_trace.dll: src/modules/m_trace.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_trace.c $(MODLFLAGS)
src/modules/m_netinfo.dll: src/modules/m_netinfo.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_netinfo.c $(MODLFLAGS)
src/modules/m_links.dll: src/modules/m_links.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_links.c $(MODLFLAGS)
src/modules/m_help.dll: src/modules/m_help.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_help.c $(MODLFLAGS)
src/modules/m_rules.dll: src/modules/m_rules.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_rules.c $(MODLFLAGS)
src/modules/m_close.dll: src/modules/m_close.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_close.c $(MODLFLAGS)
src/modules/m_map.dll: src/modules/m_map.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_map.c $(MODLFLAGS)
src/modules/m_eos.dll: src/modules/m_eos.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_eos.c $(MODLFLAGS)
src/modules/m_server.dll: src/modules/m_server.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_server.c $(MODLFLAGS)
src/modules/m_stats.dll: src/modules/m_stats.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_stats.c $(MODLFLAGS)
src/modules/m_svsfline.dll: src/modules/m_svsfline.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_svsfline.c $(MODLFLAGS)
src/modules/m_dccdeny.dll: src/modules/m_dccdeny.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_dccdeny.c $(MODLFLAGS)
src/modules/m_undccdeny.dll: src/modules/m_undccdeny.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_undccdeny.c $(MODLFLAGS)
src/modules/m_whowas.dll: src/modules/m_whowas.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_whowas.c $(MODLFLAGS)
src/modules/m_connect.dll: src/modules/m_connect.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_connect.c $(MODLFLAGS)
src/modules/m_dccallow.dll: src/modules/m_dccallow.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_dccallow.c $(MODLFLAGS)
src/modules/m_userip.dll: src/modules/m_userip.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_userip.c $(MODLFLAGS)
src/modules/m_nick.dll: src/modules/m_nick.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_nick.c $(MODLFLAGS)
src/modules/m_user.dll: src/modules/m_user.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_user.c $(MODLFLAGS)
src/modules/m_mode.dll: src/modules/m_mode.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_mode.c $(MODLFLAGS)
src/modules/m_watch.dll: src/modules/m_watch.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_watch.c $(MODLFLAGS)
src/modules/m_part.dll: src/modules/m_part.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_part.c $(MODLFLAGS)
src/modules/m_join.dll: src/modules/m_join.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_join.c $(MODLFLAGS)
src/modules/m_motd.dll: src/modules/m_motd.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_motd.c $(MODLFLAGS)
src/modules/m_opermotd.dll: src/modules/m_opermotd.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_opermotd.c $(MODLFLAGS)
src/modules/m_botmotd.dll: src/modules/m_botmotd.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_botmotd.c $(MODLFLAGS)
src/modules/m_lusers.dll: src/modules/m_lusers.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/m_lusers.c $(MODLFLAGS)
src/modules/cloak.dll: src/modules/cloak.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/cloak.c $(MODLFLAGS)
dummy:
+39 -9
View File
@@ -14,17 +14,17 @@
*/
spamfilter {
regex "(.+ ){20}";
target dcc;
regex "\x01DCC (SEND|RESUME)[ ]+\"(.+ ){20}";
target { private; channel; };
reason "mIRC 6.0-6.11 exploit attempt";
action kill;
};
spamfilter {
regex ".{225}";
target dcc;
reason "mIRC 6.12 exploit attempt";
action block;
regex "\x01DCC (SEND|RESUME).{225}";
target { private; channel; };
reason "Possible mIRC 6.12 exploit attempt";
action kill;
};
spamfilter {
@@ -149,20 +149,20 @@ spamfilter {
spamfilter {
regex ".*(http://jokes\.clubdepeche\.com|http://horny\.69sexy\.net|http://private\.a123sdsdssddddgfg\.com).*";
target private;
action block;
action gline;
reason "Infected by LOI trojan"; /* Name is still unsure */
};
/* This is a 'general sig' which might have a tad more false positives, hence just 'block' is used */
spamfilter {
regex "C:\\WINNT\\system32\\[][0-9a-z_-{|}`]+\.zip";
regex "C:\\\\WINNT\\\\system32\\\\[][0-9a-z_-{|}`]+\.zip";
target dcc;
action block;
reason "Infected by Gaggle worm?";
};
spamfilter {
regex "C:\\WINNT\\system32\\(notes|videos|xxx|ManualSeduccion|postal|hechizos|images|sex|avril)\.zip";
regex "C:\\\\WINNT\\\\system32\\\\(notes|videos|xxx|ManualSeduccion|postal|hechizos|images|sex|avril)\.zip";
target dcc;
action dccblock;
reason "Infected by Gaggle worm";
@@ -174,3 +174,33 @@ spamfilter {
action block;
reason "Infected by Gaggle worm";
};
spamfilter {
regex "^Free porn pic.? and movies (www\.sexymovies\.da\.ru|www\.girlporn\.org)";
target private;
reason "Unknown virus. Site causes Backdoor.Delf.lq infection";
action block;
};
spamfilter {
regex "^LOL! //echo -a \$\(\$decode\(.+,m\),[0-9]\)$";
target channel;
reason "$decode exploit";
action block;
};
/*
spamfilter {
regex "//write \$decode\(.+\|.+load -rs";
target { private; channel; };
reason "Generic $decode exploit";
action block;
};
*/
spamfilter {
regex "^Want To Be An IRCOp\? Try This New Bug Type: //write \$decode\(.+=.?,m\) \| \.load -rs \$decode\(.+=.?,m\)$";
target private;
action block;
reason "Spamming users with an mIRC trojan. Type '/unload -rs newb' to remove the trojan.";
};
+52 -38
View File
@@ -21,15 +21,14 @@
CC = danger will robinson
OBJS=auth.o aln.o badwords.o channel.o cloak.o crule.o dbuf.o \
OBJS=res.o s_bsd.o auth.o aln.o badwords.o channel.o cloak.o crule.o dbuf.o \
events.o fdlist.o hash.o help.o ircd.o ircsprintf.o list.o lusers.o \
match.o modules.o packet.o parse.o res.o \
res_init.o res_comp.o res_mkquery.o res_skipname.o s_auth.o \
s_bsd.o s_conf.o s_debug.o s_err.o s_extra.o s_kline.o \
match.o modules.o packet.o parse.o s_auth.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_svs.o $(STRTOUL) socket.o \
ssl.o s_user.o scache.o send.o support.o umodes.o \
ssl.o s_user.o charsys.o scache.o send.o support.o umodes.o \
version.o webtv.o whowas.o zip.o cidr.o random.o extcmodes.o \
extbans.o $(URL)
extbans.o md5.o api-isupport.o api-command.o $(URL)
SRC=$(OBJS:%.o=%.c)
@@ -44,10 +43,17 @@ MAKEARGS = 'CFLAGS=${CFLAGS}' 'CC=${CC}' 'IRCDLIBS=${IRCDLIBS}' \
MAKE = make $(MAKEARGS)
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/dynconf.h ../include/modules.h ../include/setup.h
INCLUDES = ../include/auth.h ../include/badwords.h ../include/channel.h \
../include/class.h ../include/common.h ../include/config.h ../include/dbuf.h \
../include/dynconf.h ../include/events.h ../include/fdlist.h ../include/h.h \
../include/hash.h ../include/inet.h ../include/ircsprintf.h \
../include/license.h ../include/macros.h ../include/md5.h \
../include/modules.h ../include/modversion.h ../include/msg.h ../include/nameser.h \
../include/numeric.h ../include/proto.h \
../include/resource.h ../include/setup.h ../include/sjoin.h \
../include/sock.h ../include/ssl.h ../include/struct.h ../include/sys.h \
../include/threads.h ../include/types.h ../include/url.h \
../include/version.h ../include/whowas.h ../include/zip.h
all: build
@@ -93,7 +99,7 @@ socket.o: socket.c $(INCLUDES)
dbuf.o: dbuf.c $(INCLUDES) ../include/dbuf.h
dbuf.o: dbuf.c $(INCLUDES)
$(CC) $(CFLAGS) -c dbuf.c
packet.o: packet.c $(INCLUDES)
@@ -162,74 +168,73 @@ cleandir: clean
depend:
makedepend -I${INCLUDEDIR} ${SRC}
channel.o: channel.c $(INCLUDES) ../include/channel.h
channel.o: channel.c $(INCLUDES)
$(CC) $(CFLAGS) -c channel.c
ircd.o: ircd.c ../include/dbuf.h $(INCLUDES)
ircd.o: ircd.c $(INCLUDES)
$(CC) $(CFLAGS) -c ircd.c
list.o: list.c ../include/dbuf.h $(INCLUDES)
list.o: list.c $(INCLUDES)
$(CC) $(CFLAGS) -c list.c
lusers.o: lusers.c ../include/dbuf.h $(INCLUDES)
lusers.o: lusers.c $(INCLUDES)
$(CC) $(CFLAGS) -c lusers.c
res.o: res.c ../include/res.h $(INCLUDES)
res.o: res.c $(INCLUDES) ../include/res.h
$(CC) $(CFLAGS) -c res.c
cloak.o: cloak.c ../include/res.h $(INCLUDES)
cloak.o: cloak.c $(INCLUDES)
$(CC) $(CFLAGS) -c cloak.c
fdlist.o: fdlist.c ../include/fdlist.h $(INCLUDES)
fdlist.o: fdlist.c $(INCLUDES)
$(CC) $(CFLAGS) -c fdlist.c
s_bsd.o: s_bsd.c ../include/dbuf.h $(INCLUDES)
s_bsd.o: s_bsd.c $(INCLUDES) ../include/res.h
$(CC) $(CFLAGS) -c s_bsd.c
s_auth.o: s_auth.c ../include/dbuf.h $(INCLUDES)
s_auth.o: s_auth.c $(INCLUDES)
$(CC) $(CFLAGS) -c s_auth.c
s_conf.o: s_conf.c ../include/dbuf.h $(INCLUDES)
s_conf.o: s_conf.c $(INCLUDES)
$(CC) $(CFLAGS) -c s_conf.c
s_debug.o: ../include/sys.h s_debug.c $(INCLUDES)
s_debug.o: s_debug.c $(INCLUDES)
$(CC) $(CFLAGS) -c s_debug.c
s_err.o: ../include/msg.h s_err.c $(INCLUDES)
s_err.o: s_err.c $(INCLUDES)
$(CC) $(CFLAGS) -c s_err.c
s_misc.o: s_misc.c ../include/dbuf.h $(INCLUDES)
s_misc.o: s_misc.c $(INCLUDES)
$(CC) $(CFLAGS) -c s_misc.c
scache.o: scache.c ../include/dbuf.h $(INCLUDES)
scache.o: scache.c $(INCLUDES)
$(CC) $(CFLAGS) -c scache.c
ircsprintf.o: ircsprintf.c ../include/dbuf.h $(INCLUDES)
ircsprintf.o: ircsprintf.c $(INCLUDES)
$(CC) $(CFLAGS) -c ircsprintf.c
s_user.o: s_user.c $(INCLUDES) \
../include/dbuf.h ../include/channel.h ../include/whowas.h
s_user.o: s_user.c $(INCLUDES)
$(CC) $(CFLAGS) -c s_user.c
s_extra.o: s_extra.c $(INCLUDES) \
s_numeric.c ../include/dbuf.h ../include/channel.h ../include/whowas.h
charsys.o: charsys.c $(INCLUDES)
$(CC) $(CFLAGS) -c charsys.c
s_extra.o: s_extra.c $(INCLUDES)
$(CC) $(CFLAGS) -c s_extra.c
s_kline.o: s_kline.c $(INCLUDES) \
s_numeric.c ../include/dbuf.h ../include/channel.h ../include/whowas.h
s_kline.o: s_kline.c $(INCLUDES)
$(CC) $(CFLAGS) -c s_kline.c
s_serv.o: s_serv.c $(INCLUDES) \
../include/dbuf.h ../include/whowas.h
s_serv.o: s_serv.c $(INCLUDES)
$(CC) $(CFLAGS) -c s_serv.c
s_numeric.o: s_numeric.c ../include/dbuf.h $(INCLUDES)
s_numeric.o: s_numeric.c $(INCLUDES)
$(CC) $(CFLAGS) -c s_numeric.c
whowas.o: whowas.c ../include/dbuf.h ../include/whowas.h $(INCLUDES)
whowas.o: whowas.c $(INCLUDES)
$(CC) $(CFLAGS) -c whowas.c
hash.o: hash.c ../include/hash.h $(INCLUDES)
hash.o: hash.c $(INCLUDES)
$(CC) $(CFLAGS) -c hash.c
crule.o: crule.c $(INCLUDES)
@@ -247,7 +252,16 @@ extcmodes.o: extcmodes.c $(INCLUDES)
extbans.o: extbans.c $(INCLUDES)
$(CC) $(CFLAGS) -c extbans.c
url.o: url.c $(INCLUDES) ../include/url.h
md5.o: md5.c $(INCLUDES)
$(CC) $(CFLAGS) -c md5.c
api-command.o: api-command.c $(INCLUDES)
$(CC) $(CFLAGS) -c api-command.c
api-isupport.o: api-isupport.c $(INCLUDES)
$(CC) $(CFLAGS) -c api-isupport.c
url.o: url.c $(INCLUDES)
$(CC) $(CFLAGS) -c url.c
# DO NOT DELETE THIS LINE -- make depend depends on it.
+7 -6
View File
@@ -232,13 +232,14 @@ static inline char *int_to_base64(long val)
base64buf[i] = '\0';
/* Temporary debugging code.. remove before 2038 ;p */
if (val > 2147483646)
/* Temporary debugging code.. remove before 2038 ;p.
* This might happen in case of 64bit longs (opteron/ia64),
* if the value is then too large it can easily lead to
* a buffer underflow and thus to a crash. -- Syzop
*/
if (val > 2147483647L)
{
snprintf(trouble_info, sizeof(trouble_info),
"[BUG] int_to_base64() called for insane value %ld. Please report!", val);
ircd_log(LOG_ERROR, "%s", trouble_info);
val = 2147483647L; /* prevent buffer overflow */
abort();
}
do
+149
View File
@@ -0,0 +1,149 @@
/************************************************************************
* Unreal Internet Relay Chat Daemon, src/api-command.c
* Copyright (C) 2004 Dominick Meglio and The UnrealIRCd Team
*
* 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 "msg.h"
#include "h.h"
#include <string.h>
char *cmdstr = NULL;
int CommandExists(char *name)
{
aCommand *p;
for (p = CommandHash[toupper(*name)]; p; p = p->next)
{
if (!stricmp(p->cmd, name))
return 1;
}
for (p = TokenHash[*name]; p; p = p->next)
{
if (!strcmp(p->cmd, name))
return 1;
}
return 0;
}
Command *CommandAdd(Module *module, char *cmd, char *tok, int (*func)(), unsigned char params, int flags) {
Command *command;
if (find_Command_simple(cmd) || (tok && find_Command_simple(tok)))
{
if (module)
module->errorcode = MODERR_EXISTS;
return NULL;
}
command = MyMallocEx(sizeof(Command));
command->cmd = add_Command_backend(cmd,func,params, 0, flags);
command->tok = NULL;
command->cmd->owner = module;
if (tok) {
command->tok = add_Command_backend(tok,func,params,1,flags);
command->cmd->friend = command->tok;
command->tok->friend = command->cmd;
command->tok->owner = module;
}
else
command->cmd->friend = NULL;
if (module) {
ModuleObject *cmdobj = (ModuleObject *)MyMallocEx(sizeof(ModuleObject));
cmdobj->object.command = command;
cmdobj->type = MOBJ_COMMAND;
AddListItem(cmdobj, module->objects);
module->errorcode = MODERR_NOERROR;
}
if (flags & M_ANNOUNCE)
{
char *tmp;
if (cmdstr)
tmp = MyMallocEx(strlen(cmdstr)+strlen(cmd)+2);
else
tmp = MyMallocEx(strlen(cmd)+2);
if (cmdstr)
{
strcpy(tmp, cmdstr);
strcat(tmp, ",");
}
strcat(tmp, cmd);
if (cmdstr)
{
IsupportSetValue(IsupportFind("CMDS"), tmp);
free(cmdstr);
}
else
IsupportAdd(NULL, "CMDS", tmp);
cmdstr = tmp;
}
return command;
}
void CommandDel(Command *command) {
Cmdoverride *ovr, *ovrnext;
if (command->cmd->flags & M_ANNOUNCE)
{
char *tmp = MyMallocEx(strlen(cmdstr)+1);
char *tok;
for (tok = strtok(cmdstr, ","); tok; tok = strtok(NULL, ","))
{
if (!stricmp(tok, command->cmd->cmd))
continue;
if (tmp)
strcat(tmp, ",");
strcat(tmp, tok);
}
free(cmdstr);
if (!*tmp)
{
IsupportDel(IsupportFind("CMDS"));
cmdstr = NULL;
}
else
cmdstr = tmp;
}
DelListItem(command->cmd, CommandHash[toupper(*command->cmd->cmd)]);
if (command->tok)
DelListItem(command->tok, TokenHash[*command->tok->cmd]);
if (command->cmd->owner) {
ModuleObject *cmdobj;
for (cmdobj = command->cmd->owner->objects; cmdobj; cmdobj = (ModuleObject *)cmdobj->next) {
if (cmdobj->type == MOBJ_COMMAND && cmdobj->object.command == command) {
DelListItem(cmdobj,command->cmd->owner->objects);
MyFree(cmdobj);
break;
}
}
}
for (ovr = command->cmd->overriders; ovr; ovr = ovrnext)
{
ovrnext = ovr->next;
CmdoverrideDel(ovr);
}
MyFree(command->cmd->cmd);
MyFree(command->cmd);
if (command->tok) {
MyFree(command->tok->cmd);
MyFree(command->tok);
}
MyFree(command);
}
+272
View File
@@ -0,0 +1,272 @@
/************************************************************************
* UnrealIRCd - Unreal Internet Relay Chat Daemon - src/api-isupport.c
* (c) 2004 Dominick Meglio and the UnrealIRCd Team
*
* See file AUTHORS in IRC package for additional names of
* the programmers.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 1, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Id$
*/
#include "struct.h"
#include "common.h"
#include "sys.h"
#include "numeric.h"
#include "msg.h"
#include "channel.h"
#include "version.h"
#include <time.h>
#include <sys/stat.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <fcntl.h>
#include "h.h"
#include "proto.h"
Isupport *Isupports; /* List of ISUPPORT (005) tokens */
MODVAR char *IsupportStrings[5] = {0,0,0,0,0}; /* If we get more than 5 strings, God help us! */
extern char *cmdstr;
/**
* Builds isupport token strings.
* Respects both the 13 token limit and the 512 buffer limit.
*/
void make_isupportstrings(void)
{
int i;
int bufsize = BUFSIZE-HOSTLEN-NICKLEN-39;
int tokcnt = 0, len = 0;
Isupport *isupport;
/* Clear out the old junk */
for (i = 0; IsupportStrings[i]; i++)
{
free(IsupportStrings[i]);
IsupportStrings[i] = NULL;
}
i = 0;
IsupportStrings[i] = MyMallocEx(bufsize);
for (isupport = Isupports; isupport; isupport = isupport->next)
{
int toklen;
/* Just a token */
if (!isupport->value)
{
toklen = strlen(isupport->token);
if (tokcnt == 13 || bufsize < len+toklen+1)
{
tokcnt = 0;
len = 0;
IsupportStrings[++i] = MyMallocEx(bufsize);
}
if (IsupportStrings[i][0])
{
strcat(IsupportStrings[i], " ");
toklen++;
}
strcat(IsupportStrings[i], isupport->token);
len += toklen;
tokcnt++;
}
else
{
toklen = strlen(isupport->token)+strlen(isupport->value)+1;
if (tokcnt == 13 || bufsize < len+toklen+1)
{
tokcnt = 0;
len = 0;
IsupportStrings[++i] = MyMallocEx(bufsize);
}
if (IsupportStrings[i][0])
{
strcat(IsupportStrings[i], " ");
toklen++;
}
strcat(IsupportStrings[i], isupport->token);
strcat(IsupportStrings[i], "=");
strcat(IsupportStrings[i], isupport->value);
len += toklen;
tokcnt++;
}
}
}
/**
* Initializes the builtin isupport tokens.
*/
void isupport_init(void)
{
char tmpbuf[512];
IsupportAdd(NULL, "INVEX", NULL);
IsupportAdd(NULL, "EXCEPTS", NULL);
#ifdef PREFIX_AQ
IsupportAdd(NULL, "STATUSMSG", "~&@%+");
#else
IsupportAdd(NULL, "STATUSMSG", "@%+");
#endif
IsupportAdd(NULL, "ELIST", "MNUCT");
ircsprintf(tmpbuf, "~,%s", extbanstr);
IsupportAdd(NULL, "EXTBAN", tmpbuf);
IsupportAdd(NULL, "CASEMAPPING", "ascii");
IsupportAdd(NULL, "NETWORK", ircnet005);
ircsprintf(tmpbuf, CHPAR1 "%s," CHPAR2 "%s," CHPAR3 "%s," CHPAR4 "%s",
EXPAR1, EXPAR2, EXPAR3, EXPAR4);
IsupportAdd(NULL, "CHANMODES", tmpbuf);
IsupportAdd(NULL, "PREFIX", CHPFIX);
IsupportAdd(NULL, "CHANTYPES", "#");
IsupportAdd(NULL, "MODES", my_itoa(MAXMODEPARAMS));
IsupportAdd(NULL, "SILENCE", my_itoa(SILENCE_LIMIT));
IsupportAdd(NULL, "WATCH", my_itoa(MAXWATCH));
IsupportAdd(NULL, "WALLCHOPS", NULL);
IsupportAdd(NULL, "MAXTARGETS", my_itoa(MAXTARGETS));
IsupportAdd(NULL, "AWAYLEN", my_itoa(TOPICLEN));
IsupportAdd(NULL, "KICKLEN", my_itoa(TOPICLEN));
IsupportAdd(NULL, "TOPICLEN", my_itoa(TOPICLEN));
IsupportAdd(NULL, "CHANNELLEN", my_itoa(CHANNELLEN));
IsupportAdd(NULL, "NICKLEN", my_itoa(NICKLEN));
ircsprintf(tmpbuf, "b:%d,e:%d,I:%d", MAXBANS, MAXBANS, MAXBANS);
IsupportAdd(NULL, "MAXLIST", tmpbuf);
ircsprintf(tmpbuf, "#:%d", MAXCHANNELSPERUSER);
IsupportAdd(NULL, "CHANLIMIT", tmpbuf);
IsupportAdd(NULL, "MAXCHANNELS", my_itoa(MAXCHANNELSPERUSER));
IsupportAdd(NULL, "HCN", NULL);
IsupportAdd(NULL, "SAFELIST", NULL);
if (cmdstr)
IsupportAdd(NULL, "CMDS", cmdstr);
}
/**
* Sets or changes the value of an existing isupport token.
*
* @param isupport The pointer to the isupport handle.
* @param value The new value of the token (NULL indicates no value).
*/
void IsupportSetValue(Isupport *isupport, const char *value)
{
if (isupport->value)
free(isupport->value);
if (value)
isupport->value = strdup(value);
else
isupport->value = NULL;
make_isupportstrings();
}
/**
* Returns an isupport handle based on the given token name.
*
* @param token The isupport token to search for.
* @return Returns the handle to the isupport token if it was found,
* otherwise NULL is returned.
*/
Isupport *IsupportFind(const char *token)
{
Isupport *isupport;
for (isupport = Isupports; isupport; isupport = isupport->next)
{
if (!stricmp(token, isupport->token))
return isupport;
}
return NULL;
}
/**
* Adds a new isupport token.
*
* @param module The module which owns this token.
* @param token The name of the token to create.
* @param value The value of the token (NULL indicates no value).
* @return Returns the handle to the new token if successful, otherwise NULL.
* The module's error code contains specific information about the
* error.
*/
Isupport *IsupportAdd(Module *module, const char *token, const char *value)
{
Isupport *isupport;
char *c;
if (IsupportFind(token))
{
if (module)
module->errorcode = MODERR_EXISTS;
return NULL;
}
/* draft-brocklesby-irc-isupport:
* token = a-zA-Z0-9 and 20 or less characters
* value = ASCII 0x21 - 0x7E
*/
for (c = (char *)token; c && *c; c++)
{
if (!isalnum(*c))
{
if (module)
module->errorcode = MODERR_INVALID;
return NULL;
}
}
if (!token || !*token || c-token > 20)
{
if (module)
module->errorcode = MODERR_INVALID;
return NULL;
}
for (c = (char *)value; c && *c; c++)
{
if (*c < '!' || *c > '~')
{
if (module)
module->errorcode = MODERR_INVALID;
return NULL;
}
}
isupport = MyMallocEx(sizeof(Isupport));
isupport->owner = module;
isupport->token = strdup(token);
if (value)
isupport->value = strdup(value);
AddListItem(isupport, Isupports);
make_isupportstrings();
if (module)
{
ModuleObject *isupportobj = MyMallocEx(sizeof(ModuleObject));
isupportobj->object.isupport = isupport;
isupportobj->type = MOBJ_ISUPPORT;
AddListItem(isupportobj, module->objects);
module->errorcode = MODERR_NOERROR;
}
return isupport;
}
/**
* Removes the specified isupport token.
*
* @param isupport The token to remove.
*/
void IsupportDel(Isupport *isupport)
{
DelListItem(isupport, Isupports);
free(isupport->token);
if (isupport->value)
free(isupport->value);
free(isupport);
make_isupportstrings();
}
+459 -186
View File
@@ -39,16 +39,14 @@
#include <fcntl.h>
#include "h.h"
anAuthStruct AuthTypes[] = {
anAuthStruct MODVAR AuthTypes[] = {
{"plain", AUTHTYPE_PLAINTEXT},
{"plaintext", AUTHTYPE_PLAINTEXT},
#ifdef AUTHENABLE_UNIXCRYPT
{"crypt", AUTHTYPE_UNIXCRYPT},
{"unixcrypt", AUTHTYPE_UNIXCRYPT},
#endif
#ifdef AUTHENABLE_MD5
{"md5", AUTHTYPE_MD5},
#endif
#ifdef AUTHENABLE_SHA1
{"sha1", AUTHTYPE_SHA1},
#endif
@@ -174,6 +172,269 @@ void Auth_DeleteAuthStruct(anAuthStruct *as)
MyFree(as);
}
/* Both values are pretty insane as of 2004, but... just in case. */
#define MAXSALTLEN 127
#define MAXHASHLEN 255
/* RAW salt length (before b64_encode) to use in /MKPASSWD
* and REAL salt length (after b64_encode, including terminating nul),
* used for reserving memory.
*/
#define RAWSALTLEN 6
#define REALSALTLEN 12
/** Parses a password.
* This routine can parse a pass that has a salt (new as of unreal 3.2.1)
* and will set the 'salt' pointer and 'hash' accordingly.
* RETURN VALUES:
* 1 If succeeded, salt and hash can be used.
* 0 If it's a password without a salt ('old'), salt and hash are not touched.
*/
static int parsepass(char *str, char **salt, char **hash)
{
static char saltbuf[MAXSALTLEN+1], hashbuf[MAXHASHLEN+1];
char *p;
int max;
/* Syntax: $<salt>$<hash> */
if (*str != '$')
return 0;
p = strchr(str+1, '$');
if (!p || (p == str+1) || !p[1])
return 0;
max = p - str;
if (max > sizeof(saltbuf))
max = sizeof(saltbuf);
strlcpy(saltbuf, str+1, max);
strlcpy(hashbuf, p+1, sizeof(hashbuf));
*salt = saltbuf;
*hash = hashbuf;
return 1;
}
static int authcheck_md5(aClient *cptr, anAuthStruct *as, char *para)
{
static char buf[512];
int i, r;
char *saltstr, *hashstr;
if (!para)
return -1;
r = parsepass(as->data, &saltstr, &hashstr);
if (r == 0) /* Old method without salt: b64(MD5(<pass>)) */
{
char result[16];
DoMD5(result, para, strlen(para));
if ((i = b64_encode(result, sizeof(result), buf, sizeof(buf))))
{
if (!strcmp(buf, as->data))
return 2;
else
return -1;
} else
return -1;
} else {
/* New method with salt: b64(MD5(MD5(<pass>)+salt)) */
char result1[MAXSALTLEN+16+1];
char result2[16];
char rsalt[MAXSALTLEN+1];
int rsaltlen;
/* First, decode the salt to something real... */
rsaltlen = b64_decode(saltstr, rsalt, sizeof(rsalt));
if (rsaltlen <= 0)
return -1;
/* Then hash the password (1st round)... */
DoMD5(result1, para, strlen(para));
/* Add salt to result */
memcpy(result1+16, rsalt, rsaltlen); /* b64_decode already made sure bounds are ok */
/* Then hash it all together again (2nd round)... */
DoMD5(result2, result1, rsaltlen+16);
/* Then base64 encode it all and we are done... */
if ((i = b64_encode(result2, sizeof(result2), buf, sizeof(buf))))
{
if (!strcmp(buf, hashstr))
return 2;
else
return -1;
} else
return -1;
}
return -1; /* NOTREACHED */
}
#ifdef AUTHENABLE_SHA1
static int authcheck_sha1(aClient *cptr, anAuthStruct *as, char *para)
{
char buf[512];
int i, r;
char *saltstr, *hashstr;
if (!para)
return -1;
r = parsepass(as->data, &saltstr, &hashstr);
if (r)
{
/* New method with salt: b64(SHA1(SHA1(<pass>)+salt)) */
char result1[MAXSALTLEN+20+1];
char result2[20];
char rsalt[MAXSALTLEN+1];
int rsaltlen;
#ifndef _WIN32
SHA_CTX hash;
#else
HCRYPTPROV hProv;
HCRYPTHASH hHash;
DWORD size = 20;
#endif
/* First, decode the salt to something real... */
rsaltlen = b64_decode(saltstr, rsalt, sizeof(rsalt));
if (rsaltlen <= 0)
return -1;
#ifdef _WIN32
if (!CryptAcquireContext(&hProv, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT))
return -1;
#endif
/* Then hash the password (1st round)... */
#ifndef _WIN32
SHA1_Init(&hash);
SHA1_Update(&hash, para, strlen(para));
SHA1_Final(result1, &hash);
#else
if (!CryptCreateHash(hProv, CALG_SHA1, 0, 0, &hHash)) return NULL;
if (!CryptHashData(hHash, para, strlen(para), 0)) return NULL;
if (!CryptGetHashParam(hHash, HP_HASHVAL, result1, &size, 0)) return NULL;
CryptDestroyHash(hHash);
#endif
/* Add salt to result */
memcpy(result1+20, rsalt, rsaltlen); /* b64_decode already made sure bounds are ok */
/* Then hash it all together again (2nd round)... */
#ifndef _WIN32
SHA1_Init(&hash);
SHA1_Update(&hash, result1, rsaltlen+20);
SHA1_Final(result2, &hash);
#else
if (!CryptCreateHash(hProv, CALG_SHA1, 0, 0, &hHash)) return NULL;
if (!CryptHashData(hHash, result1, 20+rsaltlen, 0)) return NULL;
if (!CryptGetHashParam(hHash, HP_HASHVAL, result2, &size, 0)) return NULL;
CryptDestroyHash(hHash);
CryptReleaseContext(hProv, 0);
#endif
/* Then base64 encode it all and we are done... */
if ((i = b64_encode(result2, sizeof(result2), buf, sizeof(buf))))
{
if (!strcmp(buf, hashstr))
return 2;
else
return -1;
} else
return -1;
} else {
/* OLD auth */
#ifndef _WIN32
if ((i = b64_encode(SHA1(para, strlen(para), NULL), 20, buf, sizeof(buf))))
{
if (!strcmp(buf, as->data))
return 2;
else
return -1;
} else
return -1;
#else
HCRYPTPROV hProv;
HCRYPTHASH hHash;
char buf2[512];
DWORD size = 512;
if (!CryptAcquireContext(&hProv, NULL, NULL, PROV_RSA_FULL,
CRYPT_VERIFYCONTEXT))
return -1;
if (!CryptCreateHash(hProv, CALG_SHA1, 0, 0, &hHash))
return -1;
if (!CryptHashData(hHash, para, strlen(para), 0))
return -1;
if (!CryptGetHashParam(hHash, HP_HASHVAL, buf, &size, 0))
return -1;
CryptDestroyHash(hHash);
CryptReleaseContext(hProv, 0);
b64_encode(buf, 20, buf2, sizeof(buf2));
if (!strcmp(buf2, as->data))
return 2;
else
return -1;
#endif
}
}
#endif /* AUTHENABLE_SHA1 */
#ifdef AUTHENABLE_RIPEMD160
static int authcheck_ripemd160(aClient *cptr, anAuthStruct *as, char *para)
{
char buf[512];
int i, r;
char *saltstr, *hashstr;
if (!para)
return -1;
r = parsepass(as->data, &saltstr, &hashstr);
if (r)
{
/* New method with salt: b64(RIPEMD160(RIPEMD160(<pass>)+salt)) */
char result1[MAXSALTLEN+20+1];
char result2[20];
char rsalt[MAXSALTLEN+1];
int rsaltlen;
RIPEMD160_CTX hash;
/* First, decode the salt to something real... */
rsaltlen = b64_decode(saltstr, rsalt, sizeof(rsalt));
if (rsaltlen <= 0)
return -1;
/* Then hash the password (1st round)... */
RIPEMD160_Init(&hash);
RIPEMD160_Update(&hash, para, strlen(para));
RIPEMD160_Final(result1, &hash);
/* Add salt to result */
memcpy(result1+20, rsalt, rsaltlen); /* b64_decode already made sure bounds are ok */
/* Then hash it all together again (2nd round)... */
RIPEMD160_Init(&hash);
RIPEMD160_Update(&hash, result1, rsaltlen+20);
RIPEMD160_Final(result2, &hash);
/* Then base64 encode it all and we are done... */
if ((i = b64_encode(result2, sizeof(result2), buf, sizeof(buf))))
{
if (!strcmp(buf, hashstr))
return 2;
else
return -1;
} else
return -1;
} else {
/* OLD auth */
if ((i = b64_encode(RIPEMD160(para, strlen(para), NULL), 20, buf, sizeof(buf))))
{
if (!strcmp(buf, as->data))
return 2;
else
return -1;
} else
return -1;
}
}
#endif /* AUTHENABLE_RIPEMD160 */
/*
* cptr MUST be a local client
* as is what it will be compared with
@@ -192,16 +453,13 @@ int Auth_Check(aClient *cptr, anAuthStruct *as, char *para)
#ifdef AUTHENABLE_UNIXCRYPT
extern char *crypt();
#endif
#if defined(AUTHENABLE_MD5) || defined(AUTHENABLE_SHA1) || defined(AUTHENABLE_RIPEMD160)
static char buf[512];
int i;
#endif
#ifdef AUTHENABLE_SSL_CLIENTCERT
X509 *x509_clientcert = NULL;
X509 *x509_filecert = NULL;
FILE *x509_f = NULL;
#endif
if (!as)
return 1;
@@ -229,108 +487,17 @@ int Auth_Check(aClient *cptr, anAuthStruct *as, char *para)
return -1;
break;
#endif
#ifdef AUTHENABLE_MD5
case AUTHTYPE_MD5:
if (!para)
return -1;
#ifndef _WIN32
if ((i = b64_encode(MD5(para, strlen(para), NULL),
MD5_DIGEST_LENGTH, buf, sizeof(buf))))
{
if (!strcmp(buf, as->data))
return 2;
else
return -1;
}
else
return -1;
break;
#else
{
HCRYPTPROV hProv;
HCRYPTHASH hHash;
char buf2[512];
DWORD size = 512;
if (!CryptAcquireContext(&hProv, NULL, NULL, PROV_RSA_FULL,
CRYPT_VERIFYCONTEXT))
return -1;
if (!CryptCreateHash(hProv, CALG_MD5, 0, 0, &hHash))
return -1;
if (!CryptHashData(hHash, para, strlen(para), 0))
return -1;
if (!CryptGetHashParam(hHash, HP_HASHVAL, buf, &size, 0))
return -1;
CryptDestroyHash(hHash);
CryptReleaseContext(hProv, 0);
b64_encode(buf, 16, buf2, sizeof(buf2));
if (!strcmp(buf2, as->data))
return 2;
else
return -1;
}
return authcheck_md5(cptr, as, para);
break;
#endif
#endif
#ifdef AUTHENABLE_SHA1
case AUTHTYPE_SHA1:
if (!para)
return -1;
#ifndef _WIN32
if ((i = b64_encode(SHA1(para, strlen(para), NULL),
SHA_DIGEST_LENGTH, buf, sizeof(buf))))
{
if (!strcmp(buf, as->data))
return 2;
else
return -1;
}
else
return -1;
break;
#else
{
HCRYPTPROV hProv;
HCRYPTHASH hHash;
char buf2[512];
DWORD size = 512;
if (!CryptAcquireContext(&hProv, NULL, NULL, PROV_RSA_FULL,
CRYPT_VERIFYCONTEXT))
return -1;
if (!CryptCreateHash(hProv, CALG_SHA1, 0, 0, &hHash))
return -1;
if (!CryptHashData(hHash, para, strlen(para), 0))
return -1;
if (!CryptGetHashParam(hHash, HP_HASHVAL, buf, &size, 0))
return -1;
CryptDestroyHash(hHash);
CryptReleaseContext(hProv, 0);
b64_encode(buf, 20, buf2, sizeof(buf2));
if (!strcmp(buf2, as->data))
return 2;
else
return -1;
}
return authcheck_sha1(cptr, as, para);
break;
#endif
#endif
#ifdef AUTHENABLE_RIPEMD160
case AUTHTYPE_RIPEMD160:
if (!para)
return -1;
if ((i = b64_encode(RIPEMD160(para, strlen(para), NULL),
RIPEMD160_DIGEST_LENGTH, buf, sizeof(buf))))
{
if (!strcmp(buf, as->data))
return 2;
else
return -1;
}
else
return -1;
break;
return authcheck_ripemd160(cptr, as, para);
#endif
#ifdef AUTHENABLE_SSL_CLIENTCERT
case AUTHTYPE_SSL_CLIENTCERT:
@@ -367,19 +534,197 @@ int Auth_Check(aClient *cptr, anAuthStruct *as, char *para)
return -1;
}
static char *mkpass_md5(char *para)
{
static char buf[128];
char result1[16+REALSALTLEN];
char result2[16];
char saltstr[REALSALTLEN]; /* b64 encoded printable string*/
char saltraw[RAWSALTLEN]; /* raw binary */
char xresult[64];
int i;
if (!para) return NULL;
/* generate a random salt... */
for (i=0; i < RAWSALTLEN; i++)
saltraw[i] = getrandom8();
i = b64_encode(saltraw, RAWSALTLEN, saltstr, REALSALTLEN);
if (!i) return NULL;
/* b64(MD5(MD5(<pass>)+salt))
* ^^^^^^^^^^^
* step 1
* ^^^^^^^^^^^^^^^^^^^^^
* step 2
* ^^^^^^^^^^^^^^^^^^^^^^^^^^
* step 3
*/
/* STEP 1 */
DoMD5(result1, para, strlen(para));
/* STEP 2 */
/* add salt to result */
memcpy(result1+16, saltraw, RAWSALTLEN);
/* Then hash it all together */
DoMD5(result2, result1, RAWSALTLEN+16);
/* STEP 3 */
/* Then base64 encode it all together.. */
i = b64_encode(result2, sizeof(result2), xresult, sizeof(xresult));
if (!i) return NULL;
/* Good.. now create the whole string:
* $<saltb64d>$<totalhashb64d>
*/
ircsprintf(buf, "$%s$%s", saltstr, xresult);
return buf;
}
#ifdef AUTHENABLE_SHA1
static char *mkpass_sha1(char *para)
{
static char buf[128];
char result1[20+REALSALTLEN];
char result2[20];
char saltstr[REALSALTLEN]; /* b64 encoded printable string*/
char saltraw[RAWSALTLEN]; /* raw binary */
char xresult[64];
#ifndef _WIN32
SHA_CTX hash;
#else
HCRYPTPROV hProv;
HCRYPTHASH hHash;
DWORD size = 20;
#endif
int i;
if (!para) return NULL;
/* generate a random salt... */
for (i=0; i < RAWSALTLEN; i++)
saltraw[i] = getrandom8();
i = b64_encode(saltraw, RAWSALTLEN, saltstr, REALSALTLEN);
if (!i) return NULL;
#ifdef _WIN32
if (!CryptAcquireContext(&hProv, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT))
return NULL;
#endif
/* b64(SHA1(SHA1(<pass>)+salt))
* ^^^^^^^^^^^
* step 1
* ^^^^^^^^^^^^^^^^^^^^^
* step 2
* ^^^^^^^^^^^^^^^^^^^^^^^^^^
* step 3
*/
/* STEP 1 */
#ifndef _WIN32
SHA1_Init(&hash);
SHA1_Update(&hash, para, strlen(para));
SHA1_Final(result1, &hash);
#else
if (!CryptCreateHash(hProv, CALG_SHA1, 0, 0, &hHash)) return NULL;
if (!CryptHashData(hHash, para, strlen(para), 0)) return NULL;
if (!CryptGetHashParam(hHash, HP_HASHVAL, result1, &size, 0)) return NULL;
CryptDestroyHash(hHash);
#endif
/* STEP 2 */
/* add salt to result */
memcpy(result1+20, saltraw, RAWSALTLEN);
/* Then hash it all together */
#ifndef _WIN32
SHA1_Init(&hash);
SHA1_Update(&hash, result1, RAWSALTLEN+20);
SHA1_Final(result2, &hash);
#else
if (!CryptCreateHash(hProv, CALG_SHA1, 0, 0, &hHash)) return NULL;
if (!CryptHashData(hHash, result1, RAWSALTLEN+20, 0)) return NULL;
if (!CryptGetHashParam(hHash, HP_HASHVAL, result2, &size, 0)) return NULL;
CryptDestroyHash(hHash);
CryptReleaseContext(hProv, 0);
#endif
/* STEP 3 */
/* Then base64 encode it all together.. */
i = b64_encode(result2, sizeof(result2), xresult, sizeof(xresult));
if (!i) return NULL;
/* Good.. now create the whole string:
* $<saltb64d>$<totalhashb64d>
*/
ircsprintf(buf, "$%s$%s", saltstr, xresult);
return buf;
}
#endif /* AUTHENABLE_SHA1 */
#ifdef AUTHENABLE_RIPEMD160
static char *mkpass_ripemd160(char *para)
{
static char buf[128];
char result1[20+REALSALTLEN];
char result2[20];
char saltstr[REALSALTLEN]; /* b64 encoded printable string*/
char saltraw[RAWSALTLEN]; /* raw binary */
char xresult[64];
RIPEMD160_CTX hash;
int i;
if (!para) return NULL;
/* generate a random salt... */
for (i=0; i < RAWSALTLEN; i++)
saltraw[i] = getrandom8();
i = b64_encode(saltraw, RAWSALTLEN, saltstr, REALSALTLEN);
if (!i) return NULL;
/* b64(RIPEMD160(RIPEMD160(<pass>)+salt))
* ^^^^^^^^^^^
* step 1
* ^^^^^^^^^^^^^^^^^^^^^
* step 2
* ^^^^^^^^^^^^^^^^^^^^^^^^^^
* step 3
*/
/* STEP 1 */
RIPEMD160_Init(&hash);
RIPEMD160_Update(&hash, para, strlen(para));
RIPEMD160_Final(result1, &hash);
/* STEP 2 */
/* add salt to result */
memcpy(result1+20, saltraw, RAWSALTLEN);
/* Then hash it all together */
RIPEMD160_Init(&hash);
RIPEMD160_Update(&hash, result1, RAWSALTLEN+20);
RIPEMD160_Final(result2, &hash);
/* STEP 3 */
/* Then base64 encode it all together.. */
i = b64_encode(result2, sizeof(result2), xresult, sizeof(xresult));
if (!i) return NULL;
/* Good.. now create the whole string:
* $<saltb64d>$<totalhashb64d>
*/
ircsprintf(buf, "$%s$%s", saltstr, xresult);
return buf;
}
#endif /* AUTHENABLE_RIPEMD160 */
char *Auth_Make(short type, char *para)
{
#ifdef AUTHENABLE_UNIXCRYPT
char salt[3];
extern char *crypt();
#endif
#if defined(AUTHENABLE_MD5) || defined(AUTHENABLE_SHA1) || defined(AUTHENABLE_RIPEMD160)
static char buf[512];
int i;
#endif
#ifdef _WIN32
static char buf2[512];
#endif
switch (type)
{
@@ -397,92 +742,20 @@ char *Auth_Make(short type, char *para)
return(crypt(para, salt));
break;
#endif
#ifdef AUTHENABLE_MD5
case AUTHTYPE_MD5:
if (!para)
return NULL;
#ifndef _WIN32
if ((i = b64_encode(MD5(para, strlen(para), NULL),
MD5_DIGEST_LENGTH, buf, sizeof(buf))))
{
return (buf);
}
else
return NULL;
break;
#else
{
HCRYPTPROV hProv;
HCRYPTHASH hHash;
DWORD size = 512;
if (!CryptAcquireContext(&hProv, NULL, NULL, PROV_RSA_FULL,
CRYPT_VERIFYCONTEXT))
return NULL;
if (!CryptCreateHash(hProv, CALG_MD5, 0, 0, &hHash))
return NULL;
if (!CryptHashData(hHash, para, strlen(para), 0))
return NULL;
if (!CryptGetHashParam(hHash, HP_HASHVAL, buf, &size, 0))
return NULL;
CryptDestroyHash(hHash);
CryptReleaseContext(hProv, 0);
b64_encode(buf, 16, buf2, sizeof(buf2));
return (buf2);
}
break;
#endif
#endif
return mkpass_md5(para);
#ifdef AUTHENABLE_SHA1
case AUTHTYPE_SHA1:
if (!para)
return NULL;
#ifndef _WIN32
if ((i = b64_encode(SHA1(para, strlen(para), NULL),
SHA_DIGEST_LENGTH, buf, sizeof(buf))))
{
return (buf);
}
else
return NULL;
break;
#else
{
HCRYPTPROV hProv;
HCRYPTHASH hHash;
DWORD size = 512;
if (!CryptAcquireContext(&hProv, NULL, NULL, PROV_RSA_FULL,
CRYPT_VERIFYCONTEXT))
return NULL;
if (!CryptCreateHash(hProv, CALG_SHA1, 0, 0, &hHash))
return NULL;
if (!CryptHashData(hHash, para, strlen(para), 0))
return NULL;
if (!CryptGetHashParam(hHash, HP_HASHVAL, buf, &size, 0))
return NULL;
CryptDestroyHash(hHash);
CryptReleaseContext(hProv, 0);
b64_encode(buf, 20, buf2, sizeof(buf2));
return (buf2);
}
break;
return mkpass_sha1(para);
#endif
#endif
#ifdef AUTHENABLE_RIPEMD160
case AUTHTYPE_RIPEMD160:
if (!para)
return NULL;
if ((i = b64_encode(RIPEMD160(para, strlen(para), NULL),
RIPEMD160_DIGEST_LENGTH, buf, sizeof(buf))))
{
return (buf);
}
else
return NULL;
break;
return mkpass_ripemd160(para);
#endif
default:
return (NULL);
}
+12 -8
View File
@@ -62,12 +62,12 @@ inline int fast_badword_match(ConfigItem_badword *badword, char *line)
{
if (!(badword->type & BADW_TYPE_FAST_L))
{
if ((p != line) && isalnum(*(p - 1))) /* aaBLA but no *BLA */
if ((p != line) && !iswseperator(*(p - 1))) /* aaBLA but no *BLA */
goto next;
}
if (!(badword->type & BADW_TYPE_FAST_R))
{
if (isalnum(*(p + bwlen))) /* BLAaa but no BLA* */
if (!iswseperator(*(p + bwlen))) /* BLAaa but no BLA* */
goto next;
}
/* Looks like it matched */
@@ -102,15 +102,14 @@ int cleaned = 0;
pold = our_strcasestr(pold, badword->word);
if (!pold)
break;
cleaned = 1;
if (replacen == -1)
replacen = strlen(replacew);
if (searchn == -1)
searchn = strlen(badword->word);
/* Hunt for start of word */
if (pold > line) {
for (startw = pold; (isalnum(*startw) && (startw != line)); startw--);
if (!isalnum(*startw))
for (startw = pold; (!iswseperator(*startw) && (startw != line)); startw--);
if (iswseperator(*startw))
startw++; /* Don't point at the space/seperator but at the word! */
} else {
startw = pold;
@@ -123,7 +122,7 @@ int cleaned = 0;
}
/* Hunt for end of word */
for (endw = pold; ((*endw != '\0') && (isalnum(*endw))); endw++);
for (endw = pold; ((*endw != '\0') && (!iswseperator(*endw))); endw++);
if (!(badword->type & BADW_TYPE_FAST_R) && (pold+searchn != endw)) {
/* not matched */
@@ -131,6 +130,8 @@ int cleaned = 0;
continue;
}
cleaned = 1; /* still too soon? Syzop/20050227 */
/* Do we have any not-copied-yet data? */
if (poldx != startw) {
int tmp_n = startw - poldx;
@@ -185,7 +186,7 @@ char *stripbadwords(char *str, ConfigItem_badword *start_bw, int *blocked)
static char cleanstr[4096];
char buf[4096];
char *ptr;
int matchlen, stringlen, cleaned;
int matchlen, m, stringlen, cleaned;
ConfigItem_badword *this_word;
*blocked = 0;
@@ -244,8 +245,11 @@ char *stripbadwords(char *str, ConfigItem_badword *start_bw, int *blocked)
{
if (pmatch[0].rm_so == -1)
break;
m = pmatch[0].rm_eo - pmatch[0].rm_so;
if (m == 0)
break; /* anti-loop */
cleaned = 1;
matchlen += pmatch[0].rm_eo - pmatch[0].rm_so;
matchlen += m;
strlncat(buf, ptr, sizeof buf, pmatch[0].rm_so);
if (this_word->replace)
strlcat(buf, this_word->replace, sizeof buf);
+229 -2751
View File
File diff suppressed because it is too large Load Diff
+656
View File
@@ -0,0 +1,656 @@
/*
* Unreal Internet Relay Chat Daemon, src/charsys.c
* (C) Copyright 2005 Bram Matthys and The UnrealIRCd Team.
*
* Character system: This subsystem deals with finding out wheter a
* character should be allowed or not in nicks (nicks only for now).
*
* 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"
#include "struct.h"
#include "common.h"
#include "sys.h"
#include "macros.h"
#include "numeric.h"
#include "msg.h"
#include "channel.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"
#ifdef STRIPBADWORDS
#include "badwords.h"
#endif
#ifdef _WIN32
#include "version.h"
#endif
/* NOTE: it is guaranteed that char is unsigned by compiling options
* (-funsigned-char @ gcc, /J @ MSVC)
* NOTE2: Original credit for supplying the correct chinese
* coderanges goes to: RexHsu, Mr.WebBar and Xuefer
*/
/** Our multibyte structure */
typedef struct _mblist MBList;
struct _mblist
{
MBList *next;
char s1, e1, s2, e2;
};
MBList *mblist = NULL, *mblist_tail = NULL;
/* Use this to prevent mixing of certain combinations
* (such as GBK & high-ascii, etc)
*/
static int langav;
char langsinuse[4096];
/* bitmasks: */
#define LANGAV_ASCII 0x0001 /* 8 bit ascii */
#define LANGAV_LATIN1 0x0002 /* latin1 (western europe) */
#define LANGAV_LATIN2 0x0004 /* latin2 (eastern europe, eg: polish) */
#define LANGAV_ISO8859_7 0x0008 /* greek */
#define LANGAV_ISO8859_8I 0x0010 /* hebrew */
#define LANGAV_ISO8859_9 0x0020 /* turkish */
#define LANGAV_W1250 0x0040 /* windows-1250 (eg: polish-w1250) */
#define LANGAV_W1251 0x0080 /* windows-1251 (eg: russian) */
#define LANGAV_LATIN2W1250 0x0100 /* Compatible with both latin2 AND windows-1250 (eg: hungarian) */
#define LANGAV_GBK 0x1000 /* (Chinese) GBK encoding */
typedef struct _langlist LangList;
struct _langlist
{
char *directive;
char *code;
int setflags;
};
/* MUST be alphabetized (first column) */
static LangList langlist[] = {
{ "catalan", "cat", LANGAV_ASCII|LANGAV_LATIN1 },
{ "chinese", "chi-s,chi-t,chi-j", LANGAV_GBK },
{ "chinese-simp", "chi-s", LANGAV_GBK },
{ "chinese-trad", "chi-t", LANGAV_GBK },
{ "chinese-ja", "chi-j", LANGAV_GBK },
{ "czech", "cze-m", LANGAV_ASCII|LANGAV_W1250 },
{ "danish", "dan", LANGAV_ASCII|LANGAV_LATIN1 },
{ "dutch", "dut", LANGAV_ASCII|LANGAV_LATIN1 },
{ "french", "fre", LANGAV_ASCII|LANGAV_LATIN1 },
{ "gbk", "chi-s,chi-t,chi-j", LANGAV_GBK },
{ "german", "ger", LANGAV_ASCII|LANGAV_LATIN1 },
{ "greek", "gre", LANGAV_ASCII|LANGAV_ISO8859_7 },
{ "hebrew", "heb", LANGAV_ASCII|LANGAV_ISO8859_8I },
{ "hungarian", "hun", LANGAV_ASCII|LANGAV_LATIN2W1250 },
{ "icelandic", "ice", LANGAV_ASCII|LANGAV_LATIN1 },
{ "italian", "ita", LANGAV_ASCII|LANGAV_LATIN1 },
{ "latin1", "cat,dan,dut,fre,ger,ita,spa,swe", LANGAV_ASCII|LANGAV_LATIN1 },
{ "latin2", "hun,pol,rum", LANGAV_ASCII|LANGAV_LATIN2 },
{ "polish", "pol", LANGAV_ASCII|LANGAV_LATIN2 },
{ "polish-w1250", "pol-m", LANGAV_ASCII|LANGAV_W1250 },
{ "romanian", "rum", LANGAV_ASCII|LANGAV_LATIN2W1250 },
{ "russian-w1251","rus", LANGAV_ASCII|LANGAV_W1251 },
{ "slovak", "slo-m", LANGAV_ASCII|LANGAV_W1250 },
{ "spanish", "spa", LANGAV_ASCII|LANGAV_LATIN1 },
{ "swedish", "swe", LANGAV_ASCII|LANGAV_LATIN1 },
{ "swiss-german", "swg", LANGAV_ASCII|LANGAV_LATIN1 },
{ "turkish", "tur", LANGAV_ASCII|LANGAV_ISO8859_9 },
{ "windows-1250", "cze-m,pol-m,rum,slo-m,hun", LANGAV_ASCII|LANGAV_W1250 },
{ NULL, NULL, 0 }
};
/* For temporary use during config_run */
typedef struct _ilanglist ILangList;
struct _ilanglist
{
ILangList *prev, *next;
char *name;
};
ILangList *ilanglist = NULL;
static int do_nick_name_multibyte(char *nick);
static int do_nick_name_standard(char *nick);
/* These characters are ALWAYS disallowed... from remote, in
* multibyte, etc.. even though this might mean a certain
* (legit) character cannot be used (eg: in chinese GBK).
* - no breaking space
* - ! (nick!user seperator)
* - prefix chars: +, %, @, &, ~
* - channel chars: #
* - scary chars: $, :, ', ", ?, *, ',', '.'
* NOTE: the caller should also check for ascii <= 32.
* [CHANGING THIS WILL CAUSE SECURITY/SYNCH PROBLEMS AND WILL
* VIOLATE YOUR ""RIGHT"" ON SUPPORT IMMEDIATELY]
*/
const char *illegalnickchars = "\xA0!+%@&~#$:'\"?*,.";
/** Called on boot and just before config run */
void charsys_reset(void)
{
int i;
MBList *m, *m_next;
/* First, reset everything */
for (i=0; i < 256; i++)
char_atribs[i] &= ~ALLOWN;
for (m=mblist; m; m=m_next)
{
m_next = m->next;
MyFree(m);
}
mblist=mblist_tail=NULL;
/* Then add the default which will always be allowed */
charsys_addallowed("0123456789-ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyzy{|}");
langav = 0;
langsinuse[0] = '\0';
#ifdef DEBUGMODE
if (ilanglist)
abort();
#endif
}
void charsys_reset_pretest(void)
{
langav = 0;
}
static inline void ilang_swap(ILangList *one, ILangList *two)
{
char *tmp = one->name;
one->name = two->name;
two->name = tmp;
}
static void ilang_sort(void)
{
ILangList *outer, *inner;
char *tmp;
/* Selection sort -- perhaps optimize to qsort/whatever if
* possible? ;)
*/
for (outer=ilanglist; outer; outer=outer->next)
{
for (inner=outer->next; inner; inner=inner->next)
{
if (strcmp(outer->name, inner->name) > 0)
ilang_swap(outer, inner);
}
}
}
void charsys_finish(void)
{
ILangList *e, *e_next;
/* Sort alphabetically */
ilang_sort();
/* [note: this can be optimized] */
langsinuse[0] = '\0';
for (e=ilanglist; e; e=e->next)
{
strlcat(langsinuse, e->name, sizeof(langsinuse));
if (e->next)
strlcat(langsinuse, ",", sizeof(langsinuse));
}
/* Free everything */
for (e=ilanglist; e; e=e_next)
{
e_next=e->next;
MyFree(e->name);
MyFree(e);
}
ilanglist = NULL;
#ifdef DEBUGMODE
ircd_log(LOG_ERROR, "[Debug] langsinuse: '%s'", langsinuse);
if (strlen(langsinuse) > 490)
abort();
#endif
}
/** Add a character range to the multibyte list.
* @param s1 Start of highest byte
* @param e1 End of highest byte
* @param s2 Start of lowest byte
* @param e2 End of lowest byte
* @example charsys_addmultibyterange(0xaa, 0xbb, 0x00, 0xff) for 0xaa00-0xbbff
*/
void charsys_addmultibyterange(char s1, char e1, char s2, char e2)
{
MBList *m = MyMallocEx(sizeof(m));
m->s1 = s1;
m->e1 = e1;
m->s2 = s2;
m->e2 = e2;
if (mblist_tail)
mblist_tail->next = m;
else
mblist = m;
mblist_tail = m;
}
/** Adds all characters in the specified string to the allowed list. */
void charsys_addallowed(char *s)
{
for (; *s; s++)
{
if ((*s <= 32) || strchr(illegalnickchars, *s))
{
config_error("INTERNAL ERROR: charsys_addallowed() called for illegal characters: %s", s);
#ifdef DEBUGMODE
abort();
#endif
}
char_atribs[(unsigned int)*s] |= ALLOWN;
}
}
int do_nick_name(char *nick)
{
if (mblist)
return do_nick_name_multibyte(nick);
else
return do_nick_name_standard(nick);
}
static int do_nick_name_standard(char *nick)
{
int len;
char *ch;
if ((*nick == '-') || isdigit(*nick))
return 0;
for (ch=nick,len=0; *ch && len <= NICKLEN; ch++, len++)
if (!isvalid(*ch))
return 0; /* reject the full nick */
*ch = '\0';
return len;
}
static int isvalidmbyte(unsigned char c1, unsigned char c2)
{
MBList *m;
for (m=mblist; m; m=m->next)
{
if ((c1 >= m->s1) && (c1 <= m->e1) &&
(c2 >= m->s2) && (c2 <= m->e2))
return 1;
}
return 0;
}
/* hmmm.. there must be some problems with multibyte &
* other high ascii characters I think (such as german etc).
* Not sure if this can be solved? I don't think so... -- Syzop.
*/
static int do_nick_name_multibyte(char *nick)
{
int len;
char *ch;
MBList *m;
int firstmbchar = 0;
if ((*nick == '-') || isdigit(*nick))
return 0;
for (ch=nick,len=0; *ch && len <= NICKLEN; ch++, len++)
{
/* Some characters are ALWAYS illegal, so they have to be disallowed here */
if ((*ch <= 32) || strchr(illegalnickchars, *ch))
return 0;
if (firstmbchar)
{
if (!isvalidmbyte(ch[-1], *ch))
return 0;
firstmbchar = 0;
} else if ((*ch) & 0x80)
firstmbchar = 1;
else if (!isvalid(*ch))
return 0;
}
if (firstmbchar)
ch--;
*ch = '\0';
return len;
}
/** Does some very basic checking on remote nickname.
* It's only purpose is not to cause the whole network
* to fall down in pieces, that's all. Display problems
* are not really handled here. They are assumed to have been
* checked by PROTOCTL NICKCHARS= -- Syzop.
*/
int do_remote_nick_name(char *nick)
{
char *c;
for (c=nick; *c; c++)
if ((*c <= 32) || strchr(illegalnickchars, *c))
return 0;
return (c - nick);
}
/** Check if the specified charsets during the TESTING phase can be
* premitted without getting into problems.
* RETURNS: -1 in case of failure, 1 if ok
*/
int charsys_postconftest(void)
{
int x=0;
if ((langav & LANGAV_ASCII) && (langav & LANGAV_GBK))
{
config_error("ERROR: set::accept-language specifies incorrect combination "
"of languages: high-ascii languages (such as german, french, etc) "
"cannot be mixed with chinese/..");
return -1;
}
if (langav & LANGAV_LATIN1)
x++;
if (langav & LANGAV_LATIN2)
x++;
if (langav & LANGAV_ISO8859_7)
x++;
if (langav & LANGAV_ISO8859_9)
x++;
if (langav & LANGAV_W1250)
x++;
if (langav & LANGAV_W1251)
x++;
if ((langav & LANGAV_LATIN2W1250) && !(langav & LANGAV_LATIN2) && !(langav & LANGAV_W1250))
x++;
if (x > 1)
{
config_status("WARNING: set::accept-language: "
"Mixing of charsets (eg: latin1+latin2) can cause display problems");
}
return 1;
}
static LangList *charsys_find_language(char *name)
{
int start = 0;
int stop = ARRAY_SIZEOF(langlist)-1;
int mid;
while (start <= stop)
{
mid = (start+stop)/2;
if (smycmp(name, langlist[mid].directive) < 0)
stop = mid-1;
else if (strcmp(name, langlist[mid].directive) == 0)
return &langlist[mid];
else
start = mid+1;
}
return NULL;
}
/** Check if language is available. */
int charsys_test_language(char *name)
{
LangList *l = charsys_find_language(name);
if (l)
{
langav |= l->setflags;
return 1;
}
if (!strcmp(name, "euro-west"))
{
config_error("set::accept-language: ERROR: 'euro-west' got renamed to 'latin1'");
return 0;
}
return 0;
}
static void charsys_doadd_language(char *name)
{
LangList *l;
ILangList *li;
int found;
char tmp[512], *lang, *p;
l = charsys_find_language(name);
if (!l)
{
#ifdef DEBUGMODE
abort();
#endif
return;
}
strlcpy(tmp, l->code, sizeof(tmp));
for (lang = strtoken(&p, tmp, ","); lang; lang = strtoken(&p, NULL, ","))
{
/* Check if present... */
found=0;
for (li=ilanglist; li; li=li->next)
if (!strcmp(li->name, lang))
{
found = 1;
break;
}
if (!found)
{
/* Add... */
li = MyMallocEx(sizeof(ILangList));
li->name = strdup(lang);
AddListItem(li, ilanglist);
}
}
}
void charsys_add_language(char *name)
{
char latin1=0, latin2=0, w1250=0, chinese=0;
/** Note: there could well be some characters missing in the lists below.
* While I've seen other altnernatives that just allow pretty much
* every accent that exists even for dutch (where we rarely use
* accents except for like 3 types), I rather prefer to use a bit more
* reasonable aproach ;). That said, anyone is welcome to make
* suggestions about characters that should be added (or removed)
* of course. -- Syzop
*/
/* Add our language to our list */
charsys_doadd_language(name);
/* GROUPS */
if (!strcmp(name, "latin1"))
latin1 = 1;
else if (!strcmp(name, "latin2"))
latin2 = 1;
else if (!strcmp(name, "windows-1250"))
w1250 = 1;
else if (!strcmp(name, "chinese") || !strcmp(name, "gbk"))
chinese = 1;
/* INDIVIDUAL CHARSETS */
/* [LATIN1] */
if (latin1 || !strcmp(name, "german"))
{
/* a", A", o", O", u", U" and es-zett */
charsys_addallowed("äÄöÖüÜß");
}
if (latin1 || !strcmp(name, "swiss-german"))
{
/* a", A", o", O", u", U" */
charsys_addallowed("äÄöÖüÜ");
}
if (latin1 || !strcmp(name, "dutch"))
{
/* Ok, even though I'm Dutch myself, I've trouble getting
* a proper list of this ;). I think I got them all now, but
* I did not include "borrow-words" like words we use in Dutch
* that are literal French. So if you really want to use them all,
* I suggest you to use just latin1 :P.
*/
/* e', e", o", i", u", e`. */
charsys_addallowed("éëöïüè");
}
if (latin1 || !strcmp(name, "danish"))
{
/* supplied by klaus:
* <ae>, <AE>, ao, Ao, o/, O/ */
charsys_addallowed("æÆåÅøØ");
}
if (latin1 || !strcmp(name, "french"))
{
/* A`, A^, a`, a^, weird-C, weird-c, E`, E', E^, E", e`, e', e^, e",
* I^, I", i^, i", O^, o^, U`, U^, U", u`, u", u`, y" [not in that order, sry]
* Hmm.. there might be more, but I'm not sure how common they are
* and I don't think they are always displayed correctly (?).
*/
charsys_addallowed("ÀÂàâÇçÈÉÊËèéêëÎÏîïÔôÙÛÜùûüÿ");
}
if (latin1 || !strcmp(name, "spanish"))
{
/* a', A', e', E', i', I', o', O', u', U', u", U", n~, N~ */
charsys_addallowed("áÁéÉíÍóÓúÚüÜñÑ");
}
if (latin1 || !strcmp(name, "italian"))
{
/* A`, E`, E', I`, I', O`, O', U`, U', a`, e`, e', i`, i', o`, o', u`, u' */
charsys_addallowed("ÀÈÉÌÍÒÓÙÚàèéìíòóùú");
}
if (latin1 || !strcmp(name, "catalan"))
{
/* supplied by Trocotronic */
/* a`, A`, e`, E`, e', E', i', I', o`, O`, o', O', u', U', i", I", u", U" */
charsys_addallowed("àÀèÈéÉíÍòÒóÓúÚïÏüÜ");
}
if (latin1 || !strcmp(name, "swedish"))
{
/* supplied by Tank */
/* ao, Ao, a", A", o", O" */
charsys_addallowed("åÅäÄöÖ");
}
if (latin1 || !strcmp(name, "icelandic"))
{
/* supplied by Saevar */
charsys_addallowed("ÆæÖöÁáÍíÐðÚúÓóÝýÞþ");
}
/* [LATIN2] */
/* actually hungarian is a special case, include it in both w1250 and latin2 ;p */
if (latin2 || w1250 || !strcmp(name, "hungarian"))
{
/* supplied by AngryWolf */
/* a', e', i', o', o", o~, u', u", u~, A', E', I', O', O", O~, U', U", U~ */
charsys_addallowed("áéíóöõúüûÁÉÍÓÖÕÚÜÛ");
}
/* same is true for romanian: latin2 & w1250 compatible */
if (latin2 || w1250 || !strcmp(name, "romanian"))
{
/* With some help from crazytoon */
/* 'S,' 's,' 'A^' 'A<' 'I^' 'T,' 'a^' 'a<' 'i^' 't,' */
charsys_addallowed("ªºÂÃÎÞâãîþ");
}
if (latin2 || !strcmp(name, "polish"))
{
/* supplied by k4be */
charsys_addallowed("±æê³ñó¶¿¼¡ÆÊ£ÑÓ¦¯¬");
}
/* [windows 1250] */
if (w1250 || !strcmp(name, "polish-w1250"))
{
/* supplied by k4be */
charsys_addallowed("¹æê³ñ󜿟¥ÆÊ£ÑÓŒ¯");
}
if (w1250 || !strcmp(name, "czech-w1250"))
{
/* Syzop [probably incomplete] */
charsys_addallowed("ŠŽšžÁÈÉÌÍÏÒÓØÙÚÝáèéìíïòóøùúý");
}
if (w1250 || !strcmp(name, "slovak-w1250"))
{
/* Syzop [probably incomplete] */
charsys_addallowed("ŠŽšž¼¾ÀÁÄÅÈÉÍÏàáäåèéíïòóôúý");
}
/* [windows 1251] */
if (!strcmp(name, "russian-w1251"))
{
/* supplied by Roman Parkin:
* 128-159 and 223-254
*/
charsys_addallowed("ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ¨¸");
}
/* [GREEK] */
if (!strcmp(name, "greek"))
{
/* supplied by GSF */
/* ranges from rfc1947 / iso 8859-7 */
charsys_addallowed("¶¸¹º¼¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóô");
}
/* [TURKISH] */
if (!strcmp(name, "turkish"))
{
/* Supplied by Ayberk Yancatoral */
charsys_addallowed("öÖçÇþÞüÜðÐý");
}
/* [HEBREW] */
if (!strcmp(name, "hebrew"))
{
/* Supplied by PHANTOm. */
/* 0xE0 - 0xFE */
charsys_addallowed("àáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþ");
}
/* [CHINESE] */
if (chinese || !strcmp(name, "chinese-ja"))
{
charsys_addmultibyterange(0xa4, 0xa4, 0xa1, 0xf3); /* JIS_PIN */
charsys_addmultibyterange(0xa5, 0xa5, 0xa1, 0xf6); /* JIS_PIN */
}
if (chinese || !strcmp(name, "chinese-simp"))
{
charsys_addmultibyterange(0xb0, 0xd6, 0xa1, 0xfe); /* GBK/2 BC with GB2312 */
charsys_addmultibyterange(0xd7, 0xd7, 0xa1, 0xf9); /* GBK/2 BC with GB2312 */
charsys_addmultibyterange(0xd8, 0xf7, 0xa1, 0xfe); /* GBK/2 BC with GB2312 */
}
if (chinese || !strcmp(name, "chinese-trad"))
{
charsys_addmultibyterange(0x81, 0xa0, 0x40, 0x7e); /* GBK/3 - lower half */
charsys_addmultibyterange(0x81, 0xa0, 0x80, 0xfe); /* GBK/3 - upper half */
charsys_addmultibyterange(0xaa, 0xfe, 0x40, 0x7e); /* GBK/4 - lower half */
charsys_addmultibyterange(0xaa, 0xfe, 0x80, 0xa0); /* GBK/4 - upper half */
}
}
+298 -265
View File
@@ -18,342 +18,375 @@
* $Id$
*/
#include <stdlib.h>
#include <string.h>
#include "struct.h"
#include "common.h"
#include "sys.h"
#include "h.h"
/* The following functions have been taken from Hybrid7-beta8 simply because
#include "msg.h"
#include <stdarg.h>
#include <stdio.h>
#ifdef _WIN32
#include <io.h>
#endif
#include <string.h>
/* The following functions have been taken from Hybrid-7.0.1 simply because
* I didn't feel like writing my own when they had ones that work just fine :)
* However, several bugs were found and some stuff was moved around to work
* better.
*/
#ifdef INET6
static int parse_v6_netmask(const char *, struct IN_ADDR *, int *);
static int parse_v6_netmask(const char *, struct IN_ADDR *addr, short int *b);
#endif
static int parse_v4_netmask(const char *, struct IN_ADDR *, int *);
static int parse_v4_netmask(const char *, struct IN_ADDR *addr, short int *b);
#define DigitParse(ch) if (ch >= '0' && ch <= '9') \
#define DigitParse(ch) do { \
if (ch >= '0' && ch <= '9') \
ch = ch - '0'; \
else if (ch >= 'A' && ch <= 'F') \
ch = ch - 'A' + '0'; \
ch = ch - 'A' + 10; \
else if (ch >= 'a' && ch <= 'f') \
ch = ch - 'a' + '0';
ch = ch - 'a' + 10; \
} while(0);
/* The mask parser/type determination code... */
/* int parse_v6_netmask(const char *, struct IN_ADDR*, int *);
/* int parse_v6_netmask(const char *, struct IN_ADDR*, short int *);
* Input: An possible IPV6 address as a string.
* Output: An integer describing whether it is an IPV6 or hostmask,
* an address(if it is IPV6), a bitlength(if it is IPV6).
* Side effects: None
* Comments: Called from parse_netmask
*/
/* Fixed so ::/0 (any IPv6 address) is valid
Also a bug in DigitParse above.
-Gozem 2002-07-19 gozem@linux.nu
*/
#ifdef INET6
static int
parse_v6_netmask(const char *text, struct IN_ADDR *addr, int *b)
static int parse_v6_netmask(const char *text, struct IN_ADDR *addr, short int *b)
{
const char *p;
char c;
int d[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }, dp = 0, nyble = 4, finsert =
-1, bits = 0, deficit = 0;
short dc[8];
const char *p;
char c;
int d[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
int dp = 0;
int nyble = 4;
int finsert = -1;
short int bits = 128;
int deficit = 0;
unsigned short dc[8];
for (p = text; (c = *p); p++)
if (isxdigit(c))
{
if (nyble == 0)
return HM_HOST;
DigitParse(c);
d[dp] |= c << (4 * --nyble);
}
else if (c == ':')
{
if (p > text && *(p - 1) == ':')
{
if (finsert >= 0)
return HM_HOST;
finsert = dp;
}
else
{
/* If there were less than 4 hex digits, e.g. :ABC: shift right
* so we don't interpret it as ABC0 -A1kmm */
d[dp] = d[dp] >> 4 * nyble;
nyble = 4;
if (++dp >= 8)
return HM_HOST;
}
}
else if (c == '*')
{
/* * must be last, and * is ambiguous if there is a ::... -A1kmm */
if (finsert >= 0 || *(p + 1) || dp == 0 || *(p - 1) != ':')
return HM_HOST;
bits = dp * 16;
}
else if (c == '/')
{
char *after;
for (p = text; (c = *p); p++)
/* Parse a digit */
if (isxdigit(c))
{
if (nyble == 0)
return HM_HOST;
DigitParse(c);
d[dp] |= c << (4 * --nyble);
}
else if (c == ':')
{
/* It's a :: */
if (p > text && *(p - 1) == ':')
{
if (finsert >= 0) /* Error: already has a :: */
return HM_HOST;
finsert = dp;
}
/* Just a regular : */
else
{
/* If there were less than 4 hex digits, e.g. :ABC: shift right
* so we don't interpret it as ABC0 -A1kmm */
d[dp] = d[dp] >> 4 * nyble;
nyble = 4;
if (++dp >= 8) /* Error: more than 8 segments */
return HM_HOST;
}
}
/* Wildcard */
else if (c == '*')
{
/* Error: there was a ::, or it is not the last segment */
if (finsert >= 0 || *(p + 1) || dp == 0 || *(p - 1) != ':')
return HM_HOST;
bits = dp * 16;
}
/* Bit section */
else if (c == '/')
{
char *after;
d[dp] = d[dp] >> 4 * nyble;
dp++;
if (p > text && *(p - 1) == ':')
return HM_HOST;
bits = strtoul(p + 1, &after, 10);
if (bits == 0 || *after)
return HM_HOST;
if (bits > dp * 4 && !(finsert >= 0 && bits <= 128))
return HM_HOST;
break;
}
else
return HM_HOST;
d[dp] = d[dp] >> 4 * nyble;
dp++;
bits = strtoul(p + 1, &after, 10);
if (bits < 0 || *after) /* Error: bits is invalid or not the end */
return HM_HOST;
/* Error: Bits is greater than the number of bits given
* and there is no :: */
if (bits > dp * 16 && !(finsert >= 0 && bits <= 128))
return HM_HOST;
break;
}
else /* Error: Illegal character */
return HM_HOST;
d[dp] = d[dp] >> 4 * nyble;
if (c == 0)
dp++;
if (finsert < 0 && bits == 0)
bits = dp * 16;
else if (bits == 0)
bits = 128;
/* How many words are missing? -A1kmm */
deficit = bits / 16 + ((bits % 16) ? 1 : 0) - dp;
/* Now fill in the gaps(from ::) in the copied table... -A1kmm */
for (dp = 0, nyble = 0; dp < 8; dp++)
{
if (nyble == finsert && deficit)
{
dc[dp] = 0;
deficit--;
}
else
dc[dp] = d[nyble++];
}
/* Set unused bits to 0... -A1kmm */
if (bits < 128 && (bits % 16 != 0))
dc[bits / 16] &= ~((1 << (15 - bits % 16)) - 1);
for (dp = bits / 16 + (bits % 16 ? 1 : 0); dp < 8; dp++)
dc[dp] = 0;
/* And assign... -A1kmm */
if (addr)
for (dp = 0; dp < 8; dp++)
/* The cast is a kludge to make netbsd work. */
((unsigned short *)&addr->s6_addr)[dp] = htons(dc[dp]);
if (b)
*b = bits;
return HM_IPV6;
/* This is handled above if it was a / */
if (c != '/')
d[dp] = d[dp] >> 4 * nyble;
if (c == 0)
dp++;
/* If there was no bit section, set the number of bits */
if (finsert < 0 && bits == 0)
bits = dp * 16;
/* How many words are missing? -A1kmm */
/* The original check was wrong -- codemastr */
deficit = 8 - dp;
/* Now fill in the gaps(from ::) in the copied table... -A1kmm */
for (dp = 0, nyble = 0; dp < 8; dp++)
{
if (nyble == finsert && deficit)
{
dc[dp] = 0;
deficit--;
}
else
dc[dp] = d[nyble++];
}
/* Set unused bits to 0... -A1kmm */
/* This check was wrong as well -- codemastr */
if (bits < 128 && (bits % 16 != 0))
dc[bits / 16] &= ~((1 << (16 - bits % 16)) - 1);
for (dp = bits / 16 + (bits % 16 ? 1 : 0); dp < 8; dp++)
dc[dp] = 0;
/* And assign... -A1kmm */
if (addr)
for (dp = 0; dp < 8; dp++)
/* The cast is a kludge to make netbsd work. */
((unsigned short *)&addr->s6_addr)[dp] = htons(dc[dp]);
if (b != NULL)
*b = bits;
return HM_IPV6;
}
#endif
/* int parse_v4_netmask(const char *, struct IN_ADDR *, int *);
* Input: An possible IPV4 address as a string.
/* int parse_v4_netmask(const char *, struct IN_ADDR *, short int *);
* Input: A possible IPV4 address as a string.
* Output: An integer describing whether it is an IPV4 or hostmask,
* an address(if it is IPV4), a bitlength(if it is IPV4).
* Side effects: None
* Comments: Called from parse_netmask
*/
static int
parse_v4_netmask(const char *text, struct IN_ADDR *addr, int *b)
static int parse_v4_netmask(const char *text, struct IN_ADDR *addr, short int *b)
{
const char *p;
const char *digits[4];
unsigned char addb[4];
int n = 0, bits = 0;
char c;
digits[n++] = text;
for (p = text; (c = *p); p++)
if (c >= '0' && c <= '9') /* empty */
;
else if (c == '.')
{
if (n >= 4) /* Error: More than four sections */
return HM_HOST;
digits[n++] = p + 1;
}
else if (c == '*')
{
if (*(p + 1) || n == 0 || *(p - 1) != '.') /* Error: * is not at the end
* or not its own section */
return HM_HOST;
bits = (n - 1) * 8;
break;
}
else if (c == '/')
{
char *after;
bits = strtoul(p + 1, &after, 10);
if (!bits || *after) /* Error: Invalid number or not end */
return HM_HOST;
if (bits > n * 8) /* Error: More than the bits given */
return HM_HOST;
break;
}
else /* Error: Illegal character */
return HM_HOST;
if (n < 4 && bits == 0)
bits = n * 8;
if (bits)
while (n < 4)
digits[n++] = "0";
for (n = 0; n < 4; n++)
addb[n] = strtoul(digits[n], NULL, 10);
if (bits == 0)
bits = 32;
/* Set unused bits to 0... -A1kmm */
if (bits < 32 && bits % 8)
addb[bits / 8] &= ~((1 << (8 - bits % 8)) - 1);
for (n = bits / 8 + (bits % 8 ? 1 : 0); n < 4; n++)
addb[n] = 0;
if (addr)
{
#ifndef INET6
const char *p;
const char *digits[4];
unsigned char addb[8]; /* will only use 4, but space for overflow [?]. -- Syzop*/
int n = 0, bits = 0;
char c;
digits[n++] = text;
for (p = text; (c = *p); p++)
if (c >= '0' && c <= '9') /* empty */
;
else if (c == '.')
{
if (n >= 4)
return HM_HOST;
digits[n++] = p + 1;
}
else if (c == '*')
{
if (*(p + 1) || n == 0 || *(p - 1) != '.')
return HM_HOST;
bits = (n - 1) * 8;
break;
}
else if (c == '/')
{
char *after;
bits = strtoul(p + 1, &after, 10);
if (!bits || *after)
return HM_HOST;
if (bits > n * 8)
return HM_HOST;
break;
}
else
return HM_HOST;
if (n < 4 && bits == 0)
bits = n * 8;
if (bits)
while (n < 4)
digits[n++] = "0";
for (n = 0; n < 4; n++)
addb[n] = strtoul(digits[n], NULL, 10);
if (bits == 0)
bits = 32;
/* Set unused bits to 0... -A1kmm */
if (bits < 32 && bits % 8)
addb[bits / 8] &= ~((1 << (8 - bits % 8)) - 1);
for (n = bits / 8 + (bits % 8 ? 1 : 0); n < 8; n++)
addb[n] = 0;
if (addr)
addr->S_ADDR =
htonl(addb[0] << 24 | addb[1] << 16 | addb[2] << 8 | addb[3]);
if (b)
*b = bits;
return HM_IPV4;
addr->s_addr = htonl(addb[0] << 24 | addb[1] << 16 | addb[2] << 8 | addb[3]);
#else
u_char *cp;
const char *p;
const char *digits[4];
unsigned char addb[4];
int n = 0, bits = 0;
char c;
digits[n++] = text;
for (p = text; (c = *p); p++)
if (c >= '0' && c <= '9') /* empty */
;
else if (c == '.')
{
if (n >= 4)
return HM_HOST;
digits[n++] = p + 1;
}
else if (c == '*')
{
if (*(p + 1) || n == 0 || *(p - 1) != '.')
return HM_HOST;
bits = (n - 1) * 8;
break;
}
else if (c == '/')
{
char *after;
bits = strtoul(p + 1, &after, 10);
if (!bits || *after)
return HM_HOST;
if (bits > n * 8)
return HM_HOST;
break;
}
else
return HM_HOST;
if (n < 4 && bits == 0)
bits = n * 8;
if (bits)
while (n < 4)
digits[n++] = "0";
for (n = 0; n < 4; n++)
addb[n] = strtoul(digits[n], NULL, 10);
if (bits == 0)
bits = 32;
/* Set unused bits to 0... -A1kmm */
if (bits < 32 && bits % 8)
addb[bits / 8] &= ~((1 << (8 - bits % 8)) - 1);
for (n = bits / 8 + (bits % 8 ? 1 : 0); n < 8; n++)
addb[n] = 0;
if (addr)
{
cp = (u_char *)addr->s6_addr;
for (n = 0; n <= 9; n++)
cp[n] = 0;
cp[10] = 0xff;
cp[11] = 0xff;
cp[12] = addb[0];
cp[13] = addb[1];
cp[14] = addb[2];
cp[15] = addb[3];
}
if (b)
*b = bits;
return HM_IPV4;
for (n = 0; n <= 9; n++)
addr->s6_addr[n] = 0;
addr->s6_addr[10] = 0xff;
addr->s6_addr[11] = 0xff;
addr->s6_addr[12] = addb[0];
addr->s6_addr[13] = addb[1];
addr->s6_addr[14] = addb[2];
addr->s6_addr[15] = addb[3];
#endif
}
if (b)
*b = bits;
return HM_IPV4;
}
/* int parse_netmask(const char *, struct IN_ADDR *, int *);
/* int parse_netmask(const char *, struct irc_netmask *);
* Input: A hostmask, or an IPV4/6 address.
* Output: An integer describing whether it is an IPV4, IPV6 address or a
* hostmask, an address(if it is an IP mask),
* a bitlength(if it is IP mask).
* Side effects: None
*/
int
parse_netmask(const char *text, struct IN_ADDR *addr, int *b)
int parse_netmask(const char *text, struct irc_netmask *netmask)
{
char *c;
const char *host;
/* So a user@ip can be specified -- codemastr */
if ((c = strchr(text, '@')) && *(c+1))
host = c+1;
else
host = text;
#ifdef INET6
if (strchr(text, ':'))
return parse_v6_netmask(text, addr, b);
if (strchr(host, ':'))
return parse_v6_netmask(host, &netmask->mask, &netmask->bits);
else
#endif
if (strchr(text, '.'))
return parse_v4_netmask(text, addr, b);
return HM_HOST;
if (strchr(host, '.'))
return parse_v4_netmask(host, &netmask->mask, &netmask->bits);
else
{
/* Well, lets just try and see?
* This is here because ffff/10, for example,
* is valid for our purposes */
if (parse_v4_netmask(host, &netmask->mask, &netmask->bits) == HM_IPV4)
return HM_IPV4;
#ifdef INET6
return parse_v6_netmask(host, &netmask->mask, &netmask->bits);
#endif
}
return HM_HOST;
}
/* The address matching stuff... */
/* int match_ipv6(struct IN_ADDR *, struct IN_ADDR *, int)
* Input: An IP address, an IP mask, the number of bits in the mask.
* Output: if match, 0 else 1
* Output: if match, 1 else 0
* Side effects: None
*/
#ifdef INET6
int
match_ipv6(struct IN_ADDR *addr, struct IN_ADDR *mask, int bits)
int match_ipv6(struct IN_ADDR *addr, struct IN_ADDR *mask, int bits)
{
int i, m, n = bits / 8;
int i, m, n = bits / 8;
for (i = 0; i < n; i++)
if (addr->S_ADDR[i] != mask->S_ADDR[i])
return 1;
if ((m = bits % 8) == 0)
return 0;
if ((addr->S_ADDR[n] & ~((1 << (8 - m)) - 1)) ==
mask->S_ADDR[n])
return 0;
return 1;
for (i = 0; i < n; i++)
if (addr->s6_addr[i] != mask->s6_addr[i])
return 0;
if ((m = bits % 8) == 0)
return 1;
if ((addr->s6_addr[n] & ~((1 << (8 - m)) - 1)) == mask->s6_addr[n])
return 1;
return 0;
}
#endif
/* int match_ipv4(struct IN_ADDR *, struct IN_ADDR *, int)
* Input: An IP address, an IP mask, the number of bits in the mask.
* Output: if match, 0 else 1
* Output: if match, 1 else 0
* Side Effects: None
*/
int
match_ipv4(struct IN_ADDR *addr, struct IN_ADDR *mask, int bits)
int match_ipv4(struct IN_ADDR *addr, struct IN_ADDR *mask, int bits)
{
#ifndef INET6
if ((ntohl(addr->S_ADDR) & ~((1 << (32 - bits)) - 1)) !=
ntohl(mask->S_ADDR))
return 1;
return 0;
if ((ntohl(addr->s_addr) & ~((1 << (32 - bits)) - 1)) == ntohl(mask->s_addr))
return 1;
return 0;
#else
struct in_addr ipv4addr, ipv4mask;
ipv4addr.s_addr = inet_addr((char *)Inet_ia2p(addr));
ipv4mask.s_addr = inet_addr((char *)Inet_ia2p(mask));
if ((ntohl(ipv4addr.s_addr) & ~((1 << (32 - bits)) - 1)) !=
ntohl(ipv4mask.s_addr))
struct in_addr ipv4addr, ipv4mask;
u_char *cp;
cp = (u_char *)((struct IN_ADDR *)addr)->s6_addr;
return 1;
return 0;
/* Make sure the address is IPv4 */
if (cp[0] == 0 && cp[1] == 0 && cp[2] == 0 && cp[3] == 0 && cp[4] == 0
&& cp[5] == 0 && cp[6] == 0 && cp[7] == 0 && cp[8] == 0
&& cp[9] == 0 && cp[10] == 0xff && cp[11] == 0xff)
{
/* Convert the v6 representation to v4 */
bcopy(&addr->s6_addr[12], &ipv4addr, sizeof(struct in_addr));
bcopy(&mask->s6_addr[12], &ipv4mask, sizeof(struct in_addr));
if ((ntohl(ipv4addr.s_addr) & ~((1 << (32 - bits)) - 1)) ==
ntohl(ipv4mask.s_addr))
return 1;
}
return 0;
#endif
}
/* int match_ip(struct IN_ADDR addr, char *uhost, char *mask, struct irc_netmask *netmask)
* Input: an IP, a userhost, string mask, and a netmask struct
* Output: if match, 1 else 0
* Side Effects: None
*/
int match_ip(struct IN_ADDR addr, char *uhost, char *mask, struct irc_netmask *netmask)
{
char *end;
if (!netmask)
return (!match(mask, uhost));
/* If it is an IP mask, we need to extract the user portion of both
* and run a match.
*/
if (mask && (end = strchr(mask, '@')))
{
char username[USERLEN+1], usermask[USERLEN+1];
strlcpy(usermask, mask, end-mask+1 > USERLEN+1 ? USERLEN+1 : end-mask+1);
if ((end = strchr(uhost, '@')))
{
strlcpy(username, uhost, end-uhost+1 > USERLEN+1 ? USERLEN+1 : end-uhost+1);
if (match(usermask, username))
return 0;
}
}
switch (netmask->type)
{
case HM_HOST:
return (!match(mask, uhost));
case HM_IPV4:
return match_ipv4(&addr, &netmask->mask, netmask->bits);
#ifdef INET6
case HM_IPV6:
return match_ipv6(&addr, &netmask->mask, netmask->bits);
#endif
default:
return 0;
}
}
+12 -136
View File
@@ -33,18 +33,6 @@ static char sccxid[] = "@(#)cloak.c 9.00 7/12/99 UnrealIRCd";
#include <string.h>
#include "h.h"
#undef KEY
#undef KEY2
#undef KEY3
#define KEY CLOAK_KEY1
#define KEY2 CLOAK_KEY2
#define KEY3 CLOAK_KEY3
#define POW_8 256L
#define POW_16 65536L
#define POW_32 4294967296L
/* The implementation here was originally done by Gary S. Brown. I have
borrowed the tables directly, and made some minor changes to the
crc32-function (including changing the interface). //ylo */
@@ -161,134 +149,22 @@ unsigned long our_crc32(const unsigned char *s, unsigned int len)
return crc32val;
}
char *hidehost(char *rhost)
{
static char cloaked[512];
static char h1[512];
static char h2[4][4];
static char h3[300];
char *host;
unsigned long l[8];
int i;
char *p, *q;
host = MyMalloc(strlen(rhost)+1);
q = host;
for (p = rhost; *p; p++, q++) {
*q = tolower(*p);
}
*q = '\0';
/* Find out what kind of host we're dealing with here */
/* IPv6 ? */
if (strchr(host, ':'))
{
/* Do IPv6 cloaking here */
/* FIXME: what the hell to do with :FFFF:192.168.1.5?
*/
/*
* a:b:c:d:e:f:g:h
*
* crc(a.b.c.d)
* crc(a.b.c.d.e.f.g)
* crc(a.b.c.d.e.f.g.h)
*/
sscanf(host, "%lx:%lx:%lx:%lx:%lx:%lx:%lx:%lx",
&l[0], &l[1], &l[2], &l[3],
&l[4], &l[5], &l[6], &l[7]);
ircsprintf(h3, "%lx:%lx:%lx:%lx",
l[0], l[1], l[2], l[3]);
l[0] = our_crc32(h3, strlen(h3));
ircsprintf(h3, "%lx:%lx:%lx:%lx:%lx:%lx:%lx",
l[0], l[1], l[2], l[3],
l[4], l[5], l[6]);
l[1] = our_crc32(h3, strlen(h3));
l[2] = our_crc32(host, strlen(host));
for (i = 0; i <= 2; i++)
{
l[i] = ((l[i] + KEY2) ^ KEY) + KEY3;
l[i] &= 0x3FFFFFFF;
}
ircsprintf(cloaked, "%lx:%lx:%lx:IP",
l[2], l[1], l[0]);
free(host);
return cloaked;
}
/* Is this a IPv4 IP? */
for (p = host; *p; p++)
{
if (!isdigit(*p) && !(*p == '.'))
{
break;
}
}
if (!(*p))
{
/* Do IPv4 cloaking here */
strlcpy(h1, host, sizeof h1);
i = 0;
for (i = 0, p = strtok(h1, "."); p && (i <= 3); p = strtok(NULL, "."), i++)
{
strncpy(h2[i], p, 4);
}
ircsprintf(h3, "%s.%s", h2[0], h2[1]);
l[0] = ((our_crc32(h3, strlen(h3)) + KEY) ^ KEY2) + KEY3;
ircsprintf(h3, "%s.%s.%s", h2[0], h2[1], h2[2]);
l[1] = ((KEY2 ^ our_crc32(h3, strlen(h3))) + KEY3) ^ KEY;
l[4] = our_crc32(host, strlen(host));
l[2] = ((l[4] + KEY3) ^ KEY) + KEY2;
l[2] &= 0x3FFFFFFF;
l[0] &= 0x7FFFFFFF;
l[1] &= 0xFFFFFFFF;
snprintf(cloaked, sizeof cloaked, "%lX.%lX.%lX.IP", l[2], l[1], l[0]);
free(host);
return cloaked;
}
else
{
/* Normal host cloaking here
*
* Find first .<alpha>
*/
for (p = rhost; *p; p++)
{
if (*p == '.')
{
if (isalpha(*(p + 1)))
break;
}
}
l[0] = ((our_crc32(host, strlen(host)) ^ KEY2) + KEY) ^ KEY3;
l[0] &= 0x3FFFFFFF;
if (*p) {
int len;
p++;
snprintf(cloaked, sizeof cloaked, "%s-%lX.", hidden_host, l[0]);
len = strlen(cloaked) + strlen(p);
if (len <= HOSTLEN)
strcat(cloaked, p);
else
strcat(cloaked, p + (len - HOSTLEN));
}
else
snprintf(cloaked, sizeof cloaked, "%s-%lX", hidden_host, l[0]);
free(host);
return cloaked;
}
/* Couldn't cloak, -WTF? */
free(host);
return NULL;
}
/* Regular user host */
/* mode = 0, just use strncpyzt, 1 = Realloc new and return new pointer */
char *make_virthost(char *curr, char *new, int mode)
{
char *mask;
char *x;
if (curr == NULL)
return (char *)NULL;
char host[256], *mask, *x, *p, *q;
if (!curr)
return NULL;
/* Convert host to lowercase and cut off at 255 bytes just to be sure */
for (p = curr, q = host; *p && (q < host+sizeof(host)-1); p++, q++)
*q = tolower(*p);
*q = '\0';
/* Call the cloaking layer */
mask = RCallbacks[CALLBACKTYPE_CLOAK]->func.pcharfunc(host);
mask = hidehost(curr);
if (mode == 0)
{
strncpyzt(new, mask, HOSTLEN); /* */
+10 -7
View File
@@ -1,4 +1,3 @@
/*
* SmartRoute phase 1
* connection rule patch
@@ -295,12 +294,12 @@ int crule_gettoken(int *next_tokp, char **ruleptr)
(*ruleptr)--;
*next_tokp = CR_END;
break;
case ':':
*next_tokp = CR_END;
break;
/* Both - and : can appear in hostnames so they must not be
* treated as separators -- codemastr */
default:
if ((isalpha(*(--(*ruleptr)))) || (**ruleptr == '*')
|| (**ruleptr == '?') || (**ruleptr == '.'))
|| (**ruleptr == '?') || (**ruleptr == '.')
|| (**ruleptr == '-') || (**ruleptr == ':'))
*next_tokp = CR_WORD;
else
return (CR_UNKNWTOK);
@@ -314,8 +313,12 @@ void crule_getword(char *word, int *wordlenp, int maxlen, char **ruleptr)
char *word_ptr;
word_ptr = word;
/* Both - and : can appear in hostnames so they must not be
* treated as separators -- codemastr */
while ((isalnum(**ruleptr)) || (**ruleptr == '*') ||
(**ruleptr == '?') || (**ruleptr == '.'))
(**ruleptr == '?') || (**ruleptr == '.') || (**ruleptr == '-') ||
(**ruleptr == ':'))
*word_ptr++ = *(*ruleptr)++;
*word_ptr = '\0';
*wordlenp = word_ptr - word;
@@ -324,7 +327,7 @@ void crule_getword(char *word, int *wordlenp, int maxlen, char **ruleptr)
/*
* Grammar
* rule:
* orexpr END END is end of input or :
* orexpr END END is end of input
* orexpr:
* andexpr
* andexpr || orexpr
+14 -3
View File
@@ -43,7 +43,12 @@
ID_Copyright("(C) Carsten Munk 2001");
Event *events = NULL;
MODVAR Event *events = NULL;
#ifdef JOINTHROTTLE
extern EVENT(cmodej_cleanup_structs);
#endif
extern EVENT(unrealdns_removeoldrecords);
void LockEventSystem(void)
{
@@ -58,7 +63,6 @@ Event *EventAddEx(Module *module, char *name, long every, long howmany,
vFP event, void *data)
{
Event *newevent;
if (!name || (every < 0) || (howmany < 0) || !event)
{
if (module)
@@ -152,7 +156,11 @@ int EventMod(Event *event, EventInfo *mods) {
return 0;
}
#ifndef _WIN32
inline void DoEvents(void)
#else
void DoEvents(void)
#endif
{
Event *eventptr;
Event temp;
@@ -204,12 +212,15 @@ void SetupEvents(void)
LockEventSystem();
/* Start events */
EventAddEx(NULL, "tklexpire", 5, 0, tkl_check_expire, NULL);
EventAddEx(NULL, "tunefile", 300, 0, save_tunefile, NULL);
EventAddEx(NULL, "garbage", GARBAGE_COLLECT_EVERY, 0, garbage_collect, NULL);
EventAddEx(NULL, "loop", 0, 0, loop_event, NULL);
#ifndef NO_FDLIST
EventAddEx(NULL, "fdlistcheck", 1, 0, e_check_fdlists, NULL);
#endif
#ifdef JOINTHROTTLE
EventAddEx(NULL, "cmodej_cleanup_structs", 60, 0, cmodej_cleanup_structs, NULL);
#endif
EventAddEx(NULL, "unrealdns_removeoldrecords", 15, 0, unrealdns_removeoldrecords, NULL);
UnlockEventSystem();
}
+104 -10
View File
@@ -42,10 +42,10 @@
#include <fcntl.h>
#include "h.h"
Extban ExtBan_Table[EXTBANTABLESZ]; /* this should be fastest */
unsigned short ExtBan_highest = 0;
Extban MODVAR ExtBan_Table[EXTBANTABLESZ]; /* this should be fastest */
unsigned MODVAR short ExtBan_highest = 0;
char extbanstr[EXTBANTABLESZ+1];
char MODVAR extbanstr[EXTBANTABLESZ+1];
void make_extbanstr(void)
{
@@ -74,8 +74,8 @@ int i;
Extban *ExtbanAdd(Module *module, ExtbanInfo req)
{
Extban *tmp;
int slot;
char tmpbuf[512];
if (findmod_by_bantype(req.flag))
{
@@ -99,6 +99,7 @@ int slot;
ExtBan_Table[slot].conv_param = req.conv_param;
ExtBan_Table[slot].is_banned = req.is_banned;
ExtBan_Table[slot].owner = module;
ExtBan_Table[slot].options = req.options;
if (module)
{
ModuleObject *banobj = MyMallocEx(sizeof(ModuleObject));
@@ -108,12 +109,18 @@ int slot;
module->errorcode = MODERR_NOERROR;
}
ExtBan_highest = slot;
make_extbanstr();
if (loop.ircd_booted)
{
make_extbanstr();
ircsprintf(tmpbuf, "~,%s", extbanstr);
IsupportSetValue(IsupportFind("EXTBAN"), tmpbuf);
}
return &ExtBan_Table[slot];
}
void ExtbanDel(Extban *eb)
{
char tmpbuf[512];
/* Just zero it all away.. */
if (eb->owner)
@@ -131,6 +138,8 @@ void ExtbanDel(Extban *eb)
}
memset(eb, 0, sizeof(Extban));
make_extbanstr();
ircsprintf(tmpbuf, "~,%s", extbanstr);
IsupportSetValue(IsupportFind("EXTBAN"), tmpbuf);
/* Hmm do we want to go trough all chans and remove the bans?
* I would say 'no' because perhaps we are just reloading,
* and else.. well... screw them?
@@ -146,12 +155,18 @@ void ExtbanDel(Extban *eb)
char *extban_modec_conv_param(char *para)
{
static char retbuf[CHANNELLEN+6];
char *chan, *p;
char *chan, *p, symbol='\0';
strncpyzt(retbuf, para, sizeof(retbuf));
chan = retbuf+3;
if (*chan != '#')
if ((*chan == '+') || (*chan == '%') || (*chan == '%') ||
(*chan == '@') || (*chan == '&') || (*chan == '~'))
chan++;
if ((*chan != '#') && (*chan != '*') && (*chan != '?'))
return NULL;
if (strlen(chan) > CHANNELLEN)
chan[CHANNELLEN] = '\0';
clean_channelname(chan);
@@ -161,15 +176,70 @@ char *chan, *p;
/* on a sidenote '#' is allowed because it's a valid channel (atm) */
return retbuf;
}
/* The only purpose of this function is a temporary workaround to prevent a desynch.. pfff */
int extban_modec_is_ok(aClient *sptr, aChannel *chptr, char *para, int checkt, int what, int what2)
{
char *p;
if ((checkt == EXBCHK_PARAM) && MyClient(sptr) && (what == MODE_ADD) && (strlen(para) > 3))
{
p = para + 3;
if ((*p == '+') || (*p == '%') || (*p == '%') ||
(*p == '@') || (*p == '&') || (*p == '~'))
p++;
if (*p != '#')
{
sendnotice(sptr, "Please use a # in the channelname (eg: ~c:#*blah*)");
return 0;
}
}
return 1;
}
static int extban_modec_compareflags(char symbol, int flags)
{
int require=0;
if (symbol == '+')
require = CHFL_VOICE|CHFL_HALFOP|CHFL_CHANOP|CHFL_CHANPROT|CHFL_CHANOWNER;
else if (symbol == '%')
require = CHFL_HALFOP|CHFL_CHANOP|CHFL_CHANPROT|CHFL_CHANOWNER;
else if (symbol == '@')
require = CHFL_CHANOP|CHFL_CHANPROT|CHFL_CHANOWNER;
else if (symbol == '&')
require = CHFL_CHANPROT|CHFL_CHANOWNER;
else if (symbol == '~')
require = CHFL_CHANOWNER;
if (flags & require)
return 1;
return 0;
}
int extban_modec_is_banned(aClient *sptr, aChannel *chptr, char *ban, int type)
{
Membership *lp;
char *p = ban+3;
char *p = ban+3, symbol = '\0';
if (*p != '#')
{
symbol = *p;
p++;
}
for (lp = sptr->user->channel; lp; lp = lp->next)
{
if (!strcasecmp(lp->chptr->chname, p))
return 1;
if (!match(p, lp->chptr->chname))
{
/* Channel matched, check symbol if needed (+/%/@/etc) */
if (symbol)
{
if (extban_modec_compareflags(symbol, lp->flags))
return 1;
} else
return 1;
}
}
return 0;
}
@@ -189,6 +259,24 @@ char *ban = banin + 3;
return 0;
}
int extban_moden_is_banned(aClient *sptr, aChannel *chptr, char *banin, int type)
{
char *ban = banin + 3;
if (type != BANCHK_NICK)
return 0;
if (has_voice(sptr, chptr))
return 0;
if ((ban_realhost && !match(ban, ban_realhost)) ||
(ban_virthost && !match(ban, ban_virthost)) ||
(ban_ip && !match(ban, ban_ip)))
return 1;
return 0;
}
/** Some kind of general conv_param routine,
* to ensure the parameter is nick!user@host.
* most of the code is just copied from clean_ban_mask.
@@ -251,13 +339,19 @@ void extban_init(void)
req.flag = 'c';
req.conv_param = extban_modec_conv_param;
req.is_banned = extban_modec_is_banned;
req.is_ok = extban_modec_is_ok;
ExtbanAdd(NULL, req);
req.flag = 'q';
req.conv_param = extban_conv_param_nuh;
req.is_banned = extban_modeq_is_banned;
ExtbanAdd(NULL, req);
req.flag = 'n';
req.conv_param = extban_conv_param_nuh;
req.is_banned = extban_moden_is_banned;
ExtbanAdd(NULL, req);
req.flag = 'r';
req.conv_param = extban_moder_conv_param;
req.is_banned = extban_moder_is_banned;
req.options = EXTBOPT_CHSVSMODE;
ExtbanAdd(NULL, req);
}
+233 -3
View File
@@ -54,6 +54,25 @@ Cmode *Channelmode_Table = NULL;
unsigned short Channelmode_highest = 0;
Cmode_t EXTMODE_NONOTICE = 0L;
#ifdef STRIPBADWORDS
Cmode_t EXTMODE_STRIPBADWORDS = 0L;
#endif
#ifdef JOINTHROTTLE
/* cmode j stuff... */
Cmode_t EXTMODE_JOINTHROTTLE = 0L;
int cmodej_is_ok(aClient *sptr, aChannel *chptr, char *para, int type, int what);
CmodeParam *cmodej_put_param(CmodeParam *r_in, char *param);
char *cmodej_get_param(CmodeParam *r_in);
char *cmodej_conv_param(char *param_in);
void cmodej_free_param(CmodeParam *r);
CmodeParam *cmodej_dup_struct(CmodeParam *r_in);
int cmodej_sjoin_check(aChannel *chptr, CmodeParam *ourx, CmodeParam *theirx);
#endif
int extcmode_cmodeT_requirechop(aClient *cptr, aChannel *chptr, char *para, int checkt, int what);
#ifdef STRIPBADWORDS
int extcmode_cmodeG_requirechop(aClient *cptr, aChannel *chptr, char *para, int checkt, int what);
#endif
void make_extcmodestr()
{
@@ -89,9 +108,29 @@ static void load_extendedchanmodes(void)
memset(&req, 0, sizeof(req));
req.paracount = 0;
req.is_ok = extcmode_default_requirechop;
req.is_ok = extcmode_cmodeT_requirechop;
req.flag = 'T';
CmodeAdd(NULL, req, &EXTMODE_NONOTICE);
#ifdef STRIPBADWORDS
req.flag = 'G';
req.is_ok = extcmode_cmodeG_requirechop;
CmodeAdd(NULL, req, &EXTMODE_STRIPBADWORDS);
#endif
#ifdef JOINTHROTTLE
/* +j */
memset(&req, 0, sizeof(req));
req.paracount = 1;
req.is_ok = cmodej_is_ok;
req.flag = 'j';
req.put_param = cmodej_put_param;
req.get_param = cmodej_get_param;
req.conv_param = cmodej_conv_param;
req.free_param = cmodej_free_param;
req.dup_struct = cmodej_dup_struct;
req.sjoin_check = cmodej_sjoin_check;
CmodeAdd(NULL, req, &EXTMODE_JOINTHROTTLE);
#endif
}
void extcmode_init(void)
@@ -115,6 +154,7 @@ void extcmode_init(void)
Cmode *CmodeAdd(Module *reserved, CmodeInfo req, Cmode_t *mode)
{
short i = 0, j = 0;
char tmpbuf[512];
while (i < EXTCMODETABLESZ)
{
@@ -150,21 +190,31 @@ Cmode *CmodeAdd(Module *reserved, CmodeInfo req, Cmode_t *mode)
if (Channelmode_Table[j].flag)
if (j > Channelmode_highest)
Channelmode_highest = j;
make_cmodestr();
make_extcmodestr();
if (reserved)
reserved->errorcode = MODERR_NOERROR;
if (loop.ircd_booted)
{
make_cmodestr();
make_extcmodestr();
ircsprintf(tmpbuf, CHPAR1 "%s," CHPAR2 "%s," CHPAR3 "%s," CHPAR4 "%s",
EXPAR1, EXPAR2, EXPAR3, EXPAR4);
IsupportSetValue(IsupportFind("CHANMODES"), tmpbuf);
}
return &(Channelmode_Table[i]);
}
void CmodeDel(Cmode *cmode)
{
char tmpbuf[512];
/* TODO: remove from all channel */
if (cmode)
cmode->flag = '\0';
make_cmodestr();
make_extcmodestr();
/* Not unloadable, so module object support is not needed (yet) */
ircsprintf(tmpbuf, CHPAR1 "%s," CHPAR2 "%s," CHPAR3 "%s," CHPAR4 "%s",
EXPAR1, EXPAR2, EXPAR3, EXPAR4);
IsupportSetValue(IsupportFind("CHANMODES"), tmpbuf);
}
/** searches in chptr extmode parameters and returns entry or NULL. */
@@ -235,10 +285,22 @@ void extcmode_free_paramlist(CmodeParam *lst)
}
}
/* Ok this is my mistake @ EXCHK_ACCESS_ERR error msg:
* the is_ok() thing does not know which mode it belongs to,
* this is normally redundant information of course but in
* case of a default handler like these, it's required to
* know which setting of mode failed (the mode char).
* I just return '?' for now, better than nothing.
* TO SUMMARIZE: Do not use extcmode_default_requirechop for new modules :p.
* Obviously in Unreal3.3* we should fix this. -- Syzop
*/
int extcmode_default_requirechop(aClient *cptr, aChannel *chptr, char *para, int checkt, int what)
{
if (IsPerson(cptr) && is_chan_op(cptr, chptr))
return EX_ALLOW;
if (checkt == EXCHK_ACCESS_ERR) /* can only be due to being halfop */
sendto_one(cptr, err_str(ERR_NOTFORHALFOPS), me.name, cptr->name, '?');
return EX_DENY;
}
@@ -250,4 +312,172 @@ int extcmode_default_requirehalfop(aClient *cptr, aChannel *chptr, char *para, i
return EX_DENY;
}
int extcmode_cmodeT_requirechop(aClient *cptr, aChannel *chptr, char *para, int checkt, int what)
{
if (IsPerson(cptr) && is_chan_op(cptr, chptr))
return EX_ALLOW;
if (checkt == EXCHK_ACCESS_ERR) /* can only be due to being halfop */
sendto_one(cptr, err_str(ERR_NOTFORHALFOPS), me.name, cptr->name, 'T');
return EX_DENY;
}
int extcmode_cmodeG_requirechop(aClient *cptr, aChannel *chptr, char *para, int checkt, int what)
{
if (IsPerson(cptr) && is_chan_op(cptr, chptr))
return EX_ALLOW;
if (checkt == EXCHK_ACCESS_ERR) /* can only be due to being halfop */
sendto_one(cptr, err_str(ERR_NOTFORHALFOPS), me.name, cptr->name, 'G');
return EX_DENY;
}
#ifdef JOINTHROTTLE
/*** CHANNEL MODE +j STUFF ******/
int cmodej_is_ok(aClient *sptr, aChannel *chptr, char *para, int type, int what)
{
if ((type == EXCHK_ACCESS) || (type == EXCHK_ACCESS_ERR))
{
if (IsPerson(sptr) && is_chan_op(sptr, chptr))
return EX_ALLOW;
if (type == EXCHK_ACCESS_ERR) /* can only be due to being halfop */
sendto_one(sptr, err_str(ERR_NOTFORHALFOPS), me.name, sptr->name, 'j');
return EX_DENY;
} else
if (type == EXCHK_PARAM)
{
/* Check parameter.. syntax should be X:Y, X should be 1-255, Y should be 1-999 */
char buf[32], *p;
int num, t, fail = 0;
strlcpy(buf, para, sizeof(buf));
p = strchr(buf, ':');
if (!p)
{
fail = 1;
} else {
*p++ = '\0';
num = atoi(buf);
t = atoi(p);
if ((num < 1) || (num > 255) || (t < 1) || (t > 999))
fail = 1;
}
if (fail)
{
sendnotice(sptr, "Error in setting +j, syntax: +j <num>:<seconds>, where <num> must be 1-255, and <seconds> 1-999");
return EX_DENY;
}
return EX_ALLOW;
}
/* falltrough -- should not be used */
return EX_DENY;
}
CmodeParam *cmodej_put_param(CmodeParam *r_in, char *param)
{
aModejEntry *r = (aModejEntry *)r_in;
char buf[32], *p;
int num, t;
if (!r)
{
/* Need to create one */
r = (aModejEntry *)malloc(sizeof(aModejEntry));
memset(r, 0, sizeof(aModejEntry));
r->flag = 'j';
}
strlcpy(buf, param, sizeof(buf));
p = strchr(buf, ':');
if (p)
{
*p++ = '\0';
num = atoi(buf);
t = atoi(p);
if (num < 1) num = 1;
if (num > 255) num = 255;
if (t < 1) t = 1;
if (t > 999) t = 999;
r->num = num;
r->t = t;
} else {
r->num = 0;
r->t = 0;
}
return (CmodeParam *)r;
}
char *cmodej_get_param(CmodeParam *r_in)
{
aModejEntry *r = (aModejEntry *)r_in;
static char retbuf[16];
if (!r)
return NULL;
snprintf(retbuf, sizeof(retbuf), "%hu:%hu", r->num, r->t);
return retbuf;
}
char *cmodej_conv_param(char *param_in)
{
static char retbuf[32];
char param[32], *p;
int num, t, fail = 0;
strlcpy(param, param_in, sizeof(param));
p = strchr(param, ':');
if (!p)
return NULL;
*p++ = '\0';
num = atoi(param);
t = atoi(p);
if (num < 1)
num = 1;
if (num > 255)
num = 255;
if (t < 1)
t = 1;
if (t > 999)
t = 999;
snprintf(retbuf, sizeof(retbuf), "%d:%d", num, t);
return retbuf;
}
void cmodej_free_param(CmodeParam *r)
{
MyFree(r);
}
CmodeParam *cmodej_dup_struct(CmodeParam *r_in)
{
aModejEntry *r = (aModejEntry *)r_in;
aModejEntry *w = (aModejEntry *)MyMalloc(sizeof(aModejEntry));
memcpy(w, r, sizeof(aModejEntry));
return (CmodeParam *)w;
}
int cmodej_sjoin_check(aChannel *chptr, CmodeParam *ourx, CmodeParam *theirx)
{
aModejEntry *our = (aModejEntry *)ourx;
aModejEntry *their = (aModejEntry *)theirx;
if (our->t != their->t)
{
if (our->t > their->t)
return EXSJ_WEWON;
else
return EXSJ_THEYWON;
}
else if (our->num != their->num)
{
if (our->num > their->num)
return EXSJ_WEWON;
else
return EXSJ_THEYWON;
} else
return EXSJ_SAME;
}
#endif /* JOINTHROTTLE */
#endif /* EXTCMODE */
+22 -12
View File
@@ -553,13 +553,24 @@ int hash_check_watch(aClient *cptr, int reply)
/* Send notifies out to everybody on the list in header */
for (lp = anptr->watch; lp; lp = lp->next)
sendto_one(lp->value.cptr, rpl_str(reply), me.name,
lp->value.cptr->name, cptr->name,
(IsPerson(cptr) ? cptr->user->username : "<N/A>"),
(IsPerson(cptr) ?
(IsHidden(cptr) ? cptr->user->virthost : cptr->
user->realhost) : "<N/A>"), anptr->lasttime, cptr->info);
{
if (IsWebTV(lp->value.cptr))
sendto_one(lp->value.cptr, ":IRC!IRC@%s PRIVMSG %s :%s (%s@%s) "
" %s IRC",
me.name, lp->value.cptr->name, cptr->name,
(IsPerson(cptr) ? cptr->user->username : "<N/A>"),
(IsPerson(cptr) ?
(IsHidden(cptr) ? cptr->user->virthost : cptr->
user->realhost) : "<N/A>"), reply == RPL_LOGON ?
"is now on" : "has left");
else
sendto_one(lp->value.cptr, rpl_str(reply), me.name,
lp->value.cptr->name, cptr->name,
(IsPerson(cptr) ? cptr->user->username : "<N/A>"),
(IsPerson(cptr) ?
(IsHidden(cptr) ? cptr->user->virthost : cptr->
user->realhost) : "<N/A>"), anptr->lasttime, cptr->info);
}
return 0;
}
@@ -736,7 +747,7 @@ int hash_del_watch_list(aClient *cptr)
#ifdef THROTTLING
struct ThrottlingBucket *ThrottlingHash[THROTTLING_HASH_SIZE+1];
struct MODVAR ThrottlingBucket *ThrottlingHash[THROTTLING_HASH_SIZE+1];
void init_throttling_hash()
{
@@ -779,7 +790,7 @@ EVENT(e_clean_out_throttling_buckets)
{
struct ThrottlingBucket *n;
int i;
struct ThrottlingBucket z = { NULL, NULL, 0};
struct ThrottlingBucket z = { NULL, NULL, {0}, 0, 0};
static time_t t = 0;
for (i = 0; i < THROTTLING_HASH_SIZE; i++)
@@ -793,7 +804,6 @@ EVENT(e_clean_out_throttling_buckets)
if (!t || (TStime() - t > 30))
{
int i;
extern char serveropts[];
extern Module *Modules;
char *p = serveropts + strlen(serveropts);
@@ -846,7 +856,7 @@ void del_throttling_bucket(struct ThrottlingBucket *bucket)
* @retval 2 Allowed, not in list or is an exception.
* @see add_connection()
*/
int throttle_can_connect(struct IN_ADDR *in)
int throttle_can_connect(aClient *sptr, struct IN_ADDR *in)
{
struct ThrottlingBucket *b;
@@ -857,7 +867,7 @@ int throttle_can_connect(struct IN_ADDR *in)
return 1;
else
{
if (Find_except(Inet_ia2p(in), CONF_EXCEPT_THROTTLE))
if (Find_except(sptr, Inet_ia2p(in), CONF_EXCEPT_THROTTLE))
return 2;
b->count++;
if (b->count > (THROTTLING_COUNT ? THROTTLING_COUNT : 3))
+170 -55
View File
@@ -85,17 +85,17 @@ time_t TSoffset = 0;
extern char unreallogo[];
#endif
int SVSNOOP = 0;
extern char *buildid;
extern MODVAR char *buildid;
time_t timeofday = 0;
int tainted = 0;
LoopStruct loop;
extern aMotd *opermotd;
extern aMotd *svsmotd;
extern aMotd *motd;
extern aMotd *rules;
extern aMotd *botmotd;
extern aMotd *smotd;
MemoryInfo StatsZ;
extern MODVAR aMotd *opermotd;
extern MODVAR aMotd *svsmotd;
extern MODVAR aMotd *motd;
extern MODVAR aMotd *rules;
extern MODVAR aMotd *botmotd;
extern MODVAR aMotd *smotd;
MODVAR MemoryInfo StatsZ;
int R_do_dns, R_fin_dns, R_fin_dnsc, R_fail_dns, R_do_id, R_fin_id, R_fail_id;
@@ -104,7 +104,7 @@ char REPORT_DO_DNS[256], REPORT_FIN_DNS[256], REPORT_FIN_DNSC[256],
REPORT_FAIL_ID[256];
extern ircstats IRCstats;
aClient me; /* That's me */
char *me_hash;
MODVAR char *me_hash;
aClient *client = &me; /* Pointer to beginning of Client list */
extern char backupbuf[8192];
#ifdef _WIN32
@@ -165,29 +165,29 @@ static void open_debugfile(), setup_signals();
extern void init_glines(void);
extern void tkl_init(void);
TS last_garbage_collect = 0;
char **myargv;
MODVAR TS last_garbage_collect = 0;
MODVAR char **myargv;
int portnum = -1; /* Server port number, listening this */
char *configfile = CONFIGFILE; /* Server configuration file */
int debuglevel = 10; /* Server debug level */
int bootopt = 0; /* Server boot option flags */
char *debugmode = ""; /* -"- -"- -"- */
char *sbrk0; /* initial sbrk(0) */
static int dorehash = 0;
static int dorehash = 0, dorestart = 0;
static char *dpath = DPATH;
int booted = FALSE;
TS nextconnect = 1; /* time for next try_connections call */
TS nextping = 1; /* same as above for check_pings() */
TS nextdnscheck = 0; /* next time to poll dns to force timeouts */
TS nextexpire = 1; /* next expire run on the dns cache */
TS lastlucheck = 0;
MODVAR int booted = FALSE;
MODVAR TS nextconnect = 1; /* time for next try_connections call */
MODVAR TS nextping = 1; /* same as above for check_pings() */
MODVAR TS nextdnscheck = 0; /* next time to poll dns to force timeouts */
MODVAR TS nextexpire = 1; /* next expire run on the dns cache */
MODVAR TS lastlucheck = 0;
#ifdef UNREAL_DEBUG
#undef CHROOTDIR
#define CHROOT
#endif
TS NOW;
MODVAR TS NOW;
#if defined(PROFIL) && !defined(_WIN32)
extern etext();
@@ -270,6 +270,8 @@ void restart(char *mesg)
VOIDSIG s_restart()
{
dorestart = 1;
#if 0
static int restarting = 0;
if (restarting == 0) {
@@ -280,6 +282,7 @@ VOIDSIG s_restart()
restarting = 1;
server_reboot("SIGINT");
}
#endif
}
@@ -387,7 +390,7 @@ void server_reboot(char *mesg)
exit(-1);
}
char *areason;
MODVAR char *areason;
EVENT(loop_event)
{
@@ -545,7 +548,7 @@ extern TS check_pings(TS currenttime)
* If it's a user, we check for CONF_BAN_USER
*/
bconf =
Find_ban(make_user_host(cptr->
Find_ban(cptr, make_user_host(cptr->
user ? cptr->user->username : cptr->
username,
cptr->user ? cptr->user->realhost : cptr->
@@ -555,7 +558,7 @@ extern TS check_pings(TS currenttime)
if (!killflag && !IsAnOper(cptr) &&
(bconf =
Find_ban(cptr->info, CONF_BAN_REALNAME))) {
Find_ban(NULL, cptr->info, CONF_BAN_REALNAME))) {
killflag++;
}
@@ -565,7 +568,7 @@ extern TS check_pings(TS currenttime)
*/
if (!killflag)
if ((bconf =
Find_ban(Inet_ia2p(&cptr->ip),
Find_ban(cptr, Inet_ia2p(&cptr->ip),
CONF_BAN_IP)))
killflag++;
if (killflag) {
@@ -604,6 +607,17 @@ extern TS check_pings(TS currenttime)
}
}
/* Do spamfilter 'user' banchecks.. */
if (loop.do_bancheck_spamf_user && IsPerson(cptr))
{
if (find_spamfilter_user(cptr) == FLUSH_BUFFER)
continue;
}
if (loop.do_bancheck_spamf_away && IsPerson(cptr) && cptr->user->away)
{
if (dospamfilter(cptr, cptr->user->away, SPAMF_AWAY, NULL) == FLUSH_BUFFER)
continue;
}
/*
* We go into ping phase
*/
@@ -648,7 +662,7 @@ extern TS check_pings(TS currenttime)
Debug((DEBUG_NOTICE,
"DNS/AUTH timeout %s",
get_client_name(cptr, TRUE)));
del_queries((char *)cptr);
unrealdns_delreq_bycptr(cptr);
ClearAuth(cptr);
ClearDNS(cptr);
SetAccess(cptr);
@@ -725,8 +739,7 @@ extern TS check_pings(TS currenttime)
* * - lucas
* *
*/
if (loop.do_bancheck)
loop.do_bancheck = 0;
loop.do_bancheck = loop.do_bancheck_spamf_user = loop.do_bancheck_spamf_away = 0;
Debug((DEBUG_NOTICE, "Next check_ping() call at: %s, %d %d %d",
myctime(currenttime+9), ping, currenttime+9, currenttime));
@@ -741,14 +754,8 @@ extern TS check_pings(TS currenttime)
static int bad_command(void)
{
#ifndef _WIN32
#ifdef CMDLINE_CONFIG
#define CMDLINE_CFG "[-f config] "
#else
#define CMDLINE_CFG ""
#endif
(void)printf
("Usage: ircd %s[-h servername] [-p portnumber] [-x loglevel] [-t] [-H]\n",
CMDLINE_CFG);
("Usage: ircd [-f config] [-h servername] [-p portnumber] [-x loglevel] [-t] [-H]\n");
(void)printf("Server not started\n\n");
#else
if (!IsService) {
@@ -803,6 +810,94 @@ EVENT(e_check_fdlists)
#endif
static void version_check_logerror(char *fmt, ...)
{
va_list va;
char buf[1024];
va_start(va, fmt);
vsnprintf(buf, sizeof(buf), fmt, va);
va_end(va);
#ifndef _WIN32
fprintf(stderr, "[!!!] %s\n", buf);
#else
win_log("[!!!] %s", buf);
#endif
}
/** Ugly version checker that ensures zlib/ssl/curl runtime libraries match the
* version we compiled for.
*/
static void do_version_check()
{
const char *compiledfor, *runtime;
int error = 0;
#ifdef USE_SSL
compiledfor = OPENSSL_VERSION_TEXT;
runtime = SSLeay_version(SSLEAY_VERSION);
if (strcasecmp(compiledfor, runtime))
{
version_check_logerror("OpenSSL version mismatch: compiled for '%s', library is '%s'",
compiledfor, runtime);
error=1;
}
#endif
#ifdef ZIP_LINKS
runtime = zlibVersion();
compiledfor = ZLIB_VERSION;
if (strcasecmp(compiledfor, runtime))
{
version_check_logerror("Zlib version mismatch: compiled for '%s', library is '%s'",
compiledfor, runtime);
error = 1;
}
#endif
#ifdef USE_LIBCURL
/* Perhaps someone should tell them to do this a bit more easy ;)
* problem is runtime output is like: 'libcurl/7.11.1 zlib/1.2.1 c-ares/1.2.0'
* while header output is like: '7.11.1'.
*/
{
char buf[128], *p;
runtime = curl_version();
compiledfor = LIBCURL_VERSION;
if (!strncmp(runtime, "libcurl/", 8))
{
strlcpy(buf, runtime+8, sizeof(buf));
p = strchr(buf, ' ');
if (p)
{
*p = '\0';
if (strcmp(compiledfor, buf))
{
version_check_logerror("Curl version mismatch: compiled for '%s', library is '%s'",
compiledfor, buf);
error = 1;
}
}
}
}
#endif
if (error)
{
#ifndef _WIN32
version_check_logerror("Header<->library mismatches can make UnrealIRCd *CRASH*! "
"Make sure you don't have multiple versions of openssl or zlib installed (eg: "
"one in /usr and one in /usr/local). And, if you recently upgraded them, "
"be sure to recompile Unreal.");
#else
version_check_logerror("Header<->library mismatches can make UnrealIRCd *CRASH*! "
"This should never happen with official Windows builds... unless "
"you overwrote any .dll files with newer/older ones or something.");
win_error();
#endif
tainted = 1;
}
}
extern time_t TSoffset;
#ifndef _WIN32
@@ -816,6 +911,7 @@ int InitwIRCD(int argc, char *argv[])
WSADATA wsaData;
#else
uid_t uid, euid;
gid_t gid, egid;
TS delay = 0;
#endif
#ifdef HAVE_PSTAT
@@ -830,11 +926,14 @@ int InitwIRCD(int argc, char *argv[])
#endif
#ifdef _WIN32
CreateMutex(NULL, FALSE, "UnrealMutex");
SetErrorMode(SEM_FAILCRITICALERRORS);
#endif
#if !defined(_WIN32) && !defined(_AMIGA)
sbrk0 = (char *)sbrk((size_t)0);
uid = getuid();
euid = geteuid();
gid = getgid();
egid = getegid();
# ifdef PROFIL
(void)monstartup(0, etext);
(void)moncontrol(1);
@@ -895,7 +994,7 @@ int InitwIRCD(int argc, char *argv[])
exit(5);
}
#endif /*CHROOTDIR*/
myargv = argv;
myargv = argv;
#ifndef _WIN32
(void)umask(077); /* better safe than sorry --SRB */
#else
@@ -904,6 +1003,7 @@ int InitwIRCD(int argc, char *argv[])
bzero((char *)&me, sizeof(me));
bzero(&StatsZ, sizeof(StatsZ));
setup_signals();
charsys_reset();
init_ircstats();
#ifdef USE_LIBCURL
url_init();
@@ -959,12 +1059,17 @@ int InitwIRCD(int argc, char *argv[])
bootopt |= BOOT_NOFORK;
break;
#ifndef _WIN32
#ifdef CMDLINE_CONFIG
case 'f':
#ifndef CMDLINE_CONFIG
if ((uid == euid) && (gid == egid))
configfile = p;
else
printf("ERROR: Command line config with a setuid/setgid ircd is not allowed");
#else
(void)setuid((uid_t) uid);
configfile = p;
break;
#endif
break;
case 'h':
if (!strchr(p, '.')) {
@@ -1034,13 +1139,6 @@ int InitwIRCD(int argc, char *argv[])
}
#endif
exit(0);
case 'W':{
struct IN_ADDR bah;
int bit;
parse_netmask("255.255.255.255/8", &bah, &bit);
printf("%s - %d\n", Inet_ia2p(&bah), bit);
exit(0);
}
case 'C':
config_verbose = atoi(p);
break;
@@ -1073,6 +1171,8 @@ int InitwIRCD(int argc, char *argv[])
}
}
do_version_check();
#ifndef CHROOTDIR
if (chdir(dpath)) {
# ifndef _WIN32
@@ -1087,7 +1187,11 @@ int InitwIRCD(int argc, char *argv[])
exit(-1);
}
#endif
#ifndef _WIN32
mkdir("tmp", S_IRUSR|S_IWUSR|S_IXUSR); /* Create the tmp dir, if it doesn't exist */
#else
mkdir("tmp");
#endif
#ifndef _WIN32
/*
* didn't set debuglevel
@@ -1107,6 +1211,7 @@ int InitwIRCD(int argc, char *argv[])
#ifndef _WIN32
fprintf(stderr, "%s", unreallogo);
fprintf(stderr, " v%s\n", VERSIONONLY);
fprintf(stderr, " using %s\n", tre_version());
#ifdef USE_SSL
fprintf(stderr, " using %s\n", OPENSSL_VERSION_TEXT);
#endif
@@ -1164,10 +1269,20 @@ int InitwIRCD(int argc, char *argv[])
#ifdef EXTCMODE
make_extcmodestr();
#endif
if (!find_Command_simple("AWAY") || !find_Command_simple("KILL") ||
!find_Command_simple("OPER") || !find_Command_simple("PING"))
{
make_extbanstr();
isupport_init();
if (!find_Command_simple("AWAY") /*|| !find_Command_simple("KILL") ||
!find_Command_simple("OPER") || !find_Command_simple("PING")*/)
{
config_error("Someone forgot to load modules with proper commands in them. READ THE DOCUMENTATION");
#ifdef _WIN32
/* Temporary! */
config_error("As of Unreal3.2.1 modules are supported on windows, "
"therefore you MUST load the commands.dll module and a cloaking module. "
"Just add 'loadmodule \"modules/commands.dll\"' and 'loadmodule \"modules/cloak.dll\"' "
"to your unrealircd.conf and be sure to read the release notes!");
win_error();
#endif
exit(-4);
}
@@ -1392,13 +1507,7 @@ void SocketLoop(void *dummy)
*/
if (nextconnect && timeofday >= nextconnect)
nextconnect = try_connections(timeofday);
/*
* ** DNS checks. One to timeout queries, one for cache expiries.
*/
if (timeofday >= nextdnscheck)
nextdnscheck = timeout_query_list(timeofday);
if (timeofday >= nextexpire)
nextexpire = expire_cache(timeofday);
/*
* ** take the smaller of the two 'timed' event times as
* ** the time of next event (stops us being late :) - avalon
@@ -1470,10 +1579,16 @@ void SocketLoop(void *dummy)
if ((timeofday >= nextping && !lifesux) || loop.do_bancheck)
#endif
nextping = check_pings(timeofday);
if (dorehash) {
if (dorehash)
{
(void)rehash(&me, &me, 1);
dorehash = 0;
}
if (dorestart)
{
server_reboot("SIGINT");
}
/*
* ** Flush output buffers on all connections timeofday if they
* ** have data in them (or at least try to flush)
-22
View File
@@ -305,28 +305,6 @@ char *ircvsprintf(char *str, const char *format, va_list vl)
*str++ = '0';
continue;
}
if (v1 < 6L)
switch (v1)
{
case 0L:
*str++ = '0';
continue;
case 1L:
*str++ = '1';
continue;
case 2L:
*str++ = '1';
continue;
case 3L:
*str++ = '1';
continue;
case 4L:
*str++ = '1';
continue;
case 5L:
*str++ = '1';
continue;
}
if (v1 > 999999999L)
{
v2 = v1 / 1000000000;
+169 -11
View File
@@ -63,13 +63,13 @@ static struct liststats {
void outofmemory();
int flinks = 0;
int freelinks = 0;
Link *freelink = NULL;
Member *freemember = NULL;
Membership *freemembership = NULL;
MembershipL *freemembershipL = NULL;
int numclients = 0;
MODVAR int flinks = 0;
MODVAR int freelinks = 0;
MODVAR Link *freelink = NULL;
MODVAR Member *freemember = NULL;
MODVAR Membership *freemembership = NULL;
MODVAR MembershipL *freemembershipL = NULL;
MODVAR int numclients = 0;
void initlists(void)
{
@@ -199,6 +199,7 @@ anUser *make_user(aClient *cptr)
user->snomask = 0;
*user->realhost = '\0';
user->virthost = NULL;
user->ip_str = NULL;
cptr->user = user;
}
return user;
@@ -235,11 +236,13 @@ void free_user(anUser *user, aClient *cptr)
if (--user->refcnt <= 0)
{
if (user->away)
MyFree((char *)user->away);
MyFree(user->away);
if (user->swhois)
MyFree((char *)user->swhois);
MyFree(user->swhois);
if (user->virthost)
MyFree((char *)user->virthost);
MyFree(user->virthost);
if (user->ip_str)
MyFree(user->ip_str);
if (user->operlogin)
MyFree(user->operlogin);
/*
@@ -252,7 +255,7 @@ void free_user(anUser *user, aClient *cptr)
user->username, user->realhost, user,
user->invited, user->channel, user->joined,
user->refcnt);
MyFree((char *)user);
MyFree(user);
#ifdef DEBUGMODE
users.inuse--;
#endif
@@ -547,5 +550,160 @@ ListStruct *del_ListItem(ListStruct *item, ListStruct **list) {
}
return NULL;
}
#ifdef JOINTHROTTLE
/** Adds a aJFlood entry to user & channel and returns entry.
* NOTE: Does not check for already-existing-entry
*/
aJFlood *cmodej_addentry(aClient *cptr, aChannel *chptr)
{
aJFlood *e;
#ifdef DEBUGMODE
if (!IsPerson(cptr))
abort();
for (e=cptr->user->jflood; e; e=e->next_u)
if (e->chptr == chptr)
abort();
for (e=chptr->jflood; e; e=e->next_c)
if (e->cptr == cptr)
abort();
#endif
e = MyMallocEx(sizeof(aJFlood));
e->cptr = cptr;
e->chptr = chptr;
e->prev_u = e->prev_c = NULL;
e->next_u = cptr->user->jflood;
e->next_c = chptr->jflood;
if (cptr->user->jflood)
cptr->user->jflood->prev_u = e;
if (chptr->jflood)
chptr->jflood->prev_c = e;
cptr->user->jflood = chptr->jflood = e;
return e;
}
/** Removes an individual entry from list and frees it.
*/
void cmodej_delentry(aJFlood *e)
{
/* remove from user.. */
if (e->prev_u)
e->prev_u->next_u = e->next_u;
else
e->cptr->user->jflood = e->next_u; /* new head */
if (e->next_u)
e->next_u->prev_u = e->prev_u;
/* remove from channel.. */
if (e->prev_c)
e->prev_c->next_c = e->next_c;
else
e->chptr->jflood = e->next_c; /* new head */
if (e->next_c)
e->next_c->prev_c = e->prev_c;
/* actually free it */
MyFree(e);
}
/** Removes all entries belonging to user from all lists and free them. */
void cmodej_deluserentries(aClient *cptr)
{
aJFlood *e, *e_next;
for (e=cptr->user->jflood; e; e=e_next)
{
e_next = e->next_u;
/* remove from channel.. */
if (e->prev_c)
e->prev_c->next_c = e->next_c;
else
e->chptr->jflood = e->next_c; /* new head */
if (e->next_c)
e->next_c->prev_c = e->prev_c;
/* actually free it */
MyFree(e);
}
cptr->user->jflood = NULL;
}
/** Removes all entries belonging to channel from all lists and free them. */
void cmodej_delchannelentries(aChannel *chptr)
{
aJFlood *e, *e_next;
for (e=chptr->jflood; e; e=e_next)
{
e_next = e->next_c;
/* remove from user.. */
if (e->prev_u)
e->prev_u->next_u = e->next_u;
else
e->cptr->user->jflood = e->next_u; /* new head */
if (e->next_u)
e->next_u->prev_u = e->prev_u;
/* actually free it */
MyFree(e);
}
chptr->jflood = NULL;
}
/** Regulary cleans up cmode-j user/chan structs */
EVENT(cmodej_cleanup_structs)
{
aJFlood *e, *e_next;
int i;
aClient *cptr;
aChannel *chptr;
int t;
CmodeParam *cmp;
#ifdef DEBUGMODE
int freed=0;
#endif
for (chptr = channel; chptr; chptr=chptr->nextch)
{
if (!chptr->jflood)
continue;
t=0;
/* t will be kept at 0 if not found or if mode not set,
* but DO still check since there are entries left as indicated by ->jflood!
*/
if (chptr->mode.extmode & EXTMODE_JOINTHROTTLE)
{
for (cmp = chptr->mode.extmodeparam; cmp; cmp=cmp->next)
if (cmp->flag == 'j')
t = ((aModejEntry *)cmp)->t;
}
for (e = chptr->jflood; e; e = e_next)
{
e_next = e->next_c;
if (e->firstjoin + t < TStime())
{
cmodej_delentry(e);
#ifdef DEBUGMODE
freed++;
#endif
}
}
}
#ifdef DEBUGMODE
if (freed)
ircd_log(LOG_ERROR, "cmodej_cleanup_structs: %d entries freed [%d bytes]", freed, freed * sizeof(aJFlood));
#endif
}
#endif
+17 -9
View File
@@ -41,7 +41,7 @@ u_char touppertab[], tolowertab[];
* match()
* written by binary
*/
static inline int match2(char *mask, char *name)
static inline int match2(const char *mask, const char *name)
{
u_char *m; /* why didn't the old one use registers */
u_char *n; /* because registers suck -- codemastr */
@@ -139,7 +139,11 @@ static inline int match2(char *mask, char *name)
return 1; /* false: no character left */
n++;
if (!*n) /* return true if end of both, */
{
if ((m[0] == '*') && (m[1] == '\0'))
return 0; /* special case.. a '?*' */
return (cm ? 1 : 0); /* false if end of test str only */
}
continue;
}
if (cm == '_') /* found _: check for '_' or ' ' */
@@ -149,7 +153,11 @@ static inline int match2(char *mask, char *name)
return 1; /* false: didnt match or no character left */
n++;
if (!*n) /* return true if end of both, */
{
if ((m[0] == '*') && (m[1] == '\0'))
return 0; /* special case.. a '?*' */
return (cm ? 1 : 0); /* false if end of test str only */
}
continue;
}
if (cm == '\\') /* next char will not be a wildcard. */
@@ -230,7 +238,7 @@ char *collapse(char *pattern)
* <0, if s1 lexicographically less than s2
* >0, if s1 lexicographically greater than s2
*/
int smycmp(char *s1, char *s2)
int smycmp(const char *s1, const char *s2)
{
u_char *str1;
u_char *str2;
@@ -250,7 +258,7 @@ int smycmp(char *s1, char *s2)
}
int myncmp(char *str1, char *str2, int n)
int myncmp(const char *str1, const char *str2, int n)
{
u_char *s1;
u_char *s2;
@@ -378,8 +386,8 @@ u_char char_atribs[] = {
PRINT | ALPHA | ALLOW,
/* VWX */ PRINT | ALPHA | ALLOW, PRINT | ALPHA | ALLOW,
PRINT | ALPHA | ALLOW,
/* YZ[ */ PRINT | ALPHA | ALLOW, PRINT | ALPHA | ALLOW, PRINT | ALPHA,
/* \]^ */ PRINT | ALPHA, PRINT | ALPHA, PRINT | ALPHA,
/* YZ[ */ PRINT | ALPHA | ALLOW, PRINT | ALPHA | ALLOW, PRINT,
/* \]^ */ PRINT, PRINT, PRINT,
/* _` */ PRINT | ALLOW, PRINT,
/* abc */ PRINT | ALPHA | ALLOW, PRINT | ALPHA | ALLOW,
PRINT | ALPHA | ALLOW,
@@ -397,8 +405,8 @@ u_char char_atribs[] = {
PRINT | ALPHA | ALLOW,
/* vwx */ PRINT | ALPHA | ALLOW, PRINT | ALPHA | ALLOW,
PRINT | ALPHA | ALLOW,
/* yz{ */ PRINT | ALPHA | ALLOW, PRINT | ALPHA | ALLOW, PRINT | ALPHA,
/* |}~ */ PRINT | ALPHA, PRINT | ALPHA, PRINT | ALPHA,
/* yz{ */ PRINT | ALPHA | ALLOW, PRINT | ALPHA | ALLOW, PRINT,
/* |}~ */ PRINT, PRINT, PRINT,
/* del */ 0,
/* 80-8f */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 90-9f */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -411,13 +419,13 @@ u_char char_atribs[] = {
};
/* Old match() */
int _match(char *mask, char *name) {
int _match(const char *mask, const char *name) {
return match2(mask,name);
}
/* Old match() plus some optimizations from bahamut */
int match(char *mask, char *name) {
int match(const char *mask, const char *name) {
if (mask[0] == '*' && mask[1] == '!') {
mask += 2;
while (*name != '!' && *name)
+294
View File
@@ -0,0 +1,294 @@
/*
* This is an OpenSSL-compatible implementation of the RSA Data Security,
* Inc. MD5 Message-Digest Algorithm.
*
* Written by Solar Designer <solar@openwall.com> in 2001, and placed in
* the public domain. There's absolutely no warranty.
*
* This differs from Colin Plumb's older public domain implementation in
* that no 32-bit integer data type is required, there's no compile-time
* endianness configuration, and the function prototypes match OpenSSL's.
* The primary goals are portability and ease of use.
*
* This implementation is meant to be fast, but not as fast as possible.
* Some known optimizations are not included to reduce source code size
* and avoid compile-time configuration.
*/
#include "config.h"
#if !defined(USE_SSL)
#include <string.h>
#include "md5.h"
/*
* The basic MD5 functions.
*
* F is optimized compared to its RFC 1321 definition just like in Colin
* Plumb's implementation.
*/
#define F(x, y, z) ((z) ^ ((x) & ((y) ^ (z))))
#define G(x, y, z) ((y) ^ ((z) & ((x) ^ (y))))
#define H(x, y, z) ((x) ^ (y) ^ (z))
#define I(x, y, z) ((y) ^ ((x) | ~(z)))
/*
* The MD5 transformation for all four rounds.
*/
#define STEP(f, a, b, c, d, x, t, s) \
(a) += f((b), (c), (d)) + (x) + (t); \
(a) = (((a) << (s)) | (((a) & 0xffffffff) >> (32 - (s)))); \
(a) += (b);
/*
* SET reads 4 input bytes in little-endian byte order and stores them
* in a properly aligned word in host byte order.
*
* The check for little-endian architectures which tolerate unaligned
* memory accesses is just an optimization. Nothing will break if it
* doesn't work.
*/
#if defined(__i386__) || defined(__vax__)
#define SET(n) \
(*(MD5_u32plus *)&ptr[(n) * 4])
#define GET(n) \
SET(n)
#else
#define SET(n) \
(ctx->block[(n)] = \
(MD5_u32plus)ptr[(n) * 4] | \
((MD5_u32plus)ptr[(n) * 4 + 1] << 8) | \
((MD5_u32plus)ptr[(n) * 4 + 2] << 16) | \
((MD5_u32plus)ptr[(n) * 4 + 3] << 24))
#define GET(n) \
(ctx->block[(n)])
#endif
/*
* This processes one or more 64-byte data blocks, but does NOT update
* the bit counters. There're no alignment requirements.
*/
static void *body(MD5_CTX *ctx, void *data, unsigned long size)
{
unsigned char *ptr;
MD5_u32plus a, b, c, d;
MD5_u32plus saved_a, saved_b, saved_c, saved_d;
ptr = data;
a = ctx->a;
b = ctx->b;
c = ctx->c;
d = ctx->d;
do {
saved_a = a;
saved_b = b;
saved_c = c;
saved_d = d;
/* Round 1 */
STEP(F, a, b, c, d, SET(0), 0xd76aa478, 7)
STEP(F, d, a, b, c, SET(1), 0xe8c7b756, 12)
STEP(F, c, d, a, b, SET(2), 0x242070db, 17)
STEP(F, b, c, d, a, SET(3), 0xc1bdceee, 22)
STEP(F, a, b, c, d, SET(4), 0xf57c0faf, 7)
STEP(F, d, a, b, c, SET(5), 0x4787c62a, 12)
STEP(F, c, d, a, b, SET(6), 0xa8304613, 17)
STEP(F, b, c, d, a, SET(7), 0xfd469501, 22)
STEP(F, a, b, c, d, SET(8), 0x698098d8, 7)
STEP(F, d, a, b, c, SET(9), 0x8b44f7af, 12)
STEP(F, c, d, a, b, SET(10), 0xffff5bb1, 17)
STEP(F, b, c, d, a, SET(11), 0x895cd7be, 22)
STEP(F, a, b, c, d, SET(12), 0x6b901122, 7)
STEP(F, d, a, b, c, SET(13), 0xfd987193, 12)
STEP(F, c, d, a, b, SET(14), 0xa679438e, 17)
STEP(F, b, c, d, a, SET(15), 0x49b40821, 22)
/* Round 2 */
STEP(G, a, b, c, d, GET(1), 0xf61e2562, 5)
STEP(G, d, a, b, c, GET(6), 0xc040b340, 9)
STEP(G, c, d, a, b, GET(11), 0x265e5a51, 14)
STEP(G, b, c, d, a, GET(0), 0xe9b6c7aa, 20)
STEP(G, a, b, c, d, GET(5), 0xd62f105d, 5)
STEP(G, d, a, b, c, GET(10), 0x02441453, 9)
STEP(G, c, d, a, b, GET(15), 0xd8a1e681, 14)
STEP(G, b, c, d, a, GET(4), 0xe7d3fbc8, 20)
STEP(G, a, b, c, d, GET(9), 0x21e1cde6, 5)
STEP(G, d, a, b, c, GET(14), 0xc33707d6, 9)
STEP(G, c, d, a, b, GET(3), 0xf4d50d87, 14)
STEP(G, b, c, d, a, GET(8), 0x455a14ed, 20)
STEP(G, a, b, c, d, GET(13), 0xa9e3e905, 5)
STEP(G, d, a, b, c, GET(2), 0xfcefa3f8, 9)
STEP(G, c, d, a, b, GET(7), 0x676f02d9, 14)
STEP(G, b, c, d, a, GET(12), 0x8d2a4c8a, 20)
/* Round 3 */
STEP(H, a, b, c, d, GET(5), 0xfffa3942, 4)
STEP(H, d, a, b, c, GET(8), 0x8771f681, 11)
STEP(H, c, d, a, b, GET(11), 0x6d9d6122, 16)
STEP(H, b, c, d, a, GET(14), 0xfde5380c, 23)
STEP(H, a, b, c, d, GET(1), 0xa4beea44, 4)
STEP(H, d, a, b, c, GET(4), 0x4bdecfa9, 11)
STEP(H, c, d, a, b, GET(7), 0xf6bb4b60, 16)
STEP(H, b, c, d, a, GET(10), 0xbebfbc70, 23)
STEP(H, a, b, c, d, GET(13), 0x289b7ec6, 4)
STEP(H, d, a, b, c, GET(0), 0xeaa127fa, 11)
STEP(H, c, d, a, b, GET(3), 0xd4ef3085, 16)
STEP(H, b, c, d, a, GET(6), 0x04881d05, 23)
STEP(H, a, b, c, d, GET(9), 0xd9d4d039, 4)
STEP(H, d, a, b, c, GET(12), 0xe6db99e5, 11)
STEP(H, c, d, a, b, GET(15), 0x1fa27cf8, 16)
STEP(H, b, c, d, a, GET(2), 0xc4ac5665, 23)
/* Round 4 */
STEP(I, a, b, c, d, GET(0), 0xf4292244, 6)
STEP(I, d, a, b, c, GET(7), 0x432aff97, 10)
STEP(I, c, d, a, b, GET(14), 0xab9423a7, 15)
STEP(I, b, c, d, a, GET(5), 0xfc93a039, 21)
STEP(I, a, b, c, d, GET(12), 0x655b59c3, 6)
STEP(I, d, a, b, c, GET(3), 0x8f0ccc92, 10)
STEP(I, c, d, a, b, GET(10), 0xffeff47d, 15)
STEP(I, b, c, d, a, GET(1), 0x85845dd1, 21)
STEP(I, a, b, c, d, GET(8), 0x6fa87e4f, 6)
STEP(I, d, a, b, c, GET(15), 0xfe2ce6e0, 10)
STEP(I, c, d, a, b, GET(6), 0xa3014314, 15)
STEP(I, b, c, d, a, GET(13), 0x4e0811a1, 21)
STEP(I, a, b, c, d, GET(4), 0xf7537e82, 6)
STEP(I, d, a, b, c, GET(11), 0xbd3af235, 10)
STEP(I, c, d, a, b, GET(2), 0x2ad7d2bb, 15)
STEP(I, b, c, d, a, GET(9), 0xeb86d391, 21)
a += saved_a;
b += saved_b;
c += saved_c;
d += saved_d;
ptr += 64;
} while (size -= 64);
ctx->a = a;
ctx->b = b;
ctx->c = c;
ctx->d = d;
return ptr;
}
void MD5_Init(MD5_CTX *ctx)
{
ctx->a = 0x67452301;
ctx->b = 0xefcdab89;
ctx->c = 0x98badcfe;
ctx->d = 0x10325476;
ctx->lo = 0;
ctx->hi = 0;
}
void MD5_Update(MD5_CTX *ctx, void *data, unsigned long size)
{
MD5_u32plus saved_lo;
unsigned long used, free;
saved_lo = ctx->lo;
if ((ctx->lo = (saved_lo + size) & 0x1fffffff) < saved_lo)
ctx->hi++;
ctx->hi += size >> 29;
used = saved_lo & 0x3f;
if (used) {
free = 64 - used;
if (size < free) {
memcpy(&ctx->buffer[used], data, size);
return;
}
memcpy(&ctx->buffer[used], data, free);
data = (unsigned char *)data + free;
size -= free;
body(ctx, ctx->buffer, 64);
}
if (size >= 64) {
data = body(ctx, data, size & ~(unsigned long)0x3f);
size &= 0x3f;
}
memcpy(ctx->buffer, data, size);
}
void MD5_Final(unsigned char *result, MD5_CTX *ctx)
{
unsigned long used, free;
used = ctx->lo & 0x3f;
ctx->buffer[used++] = 0x80;
free = 64 - used;
if (free < 8) {
memset(&ctx->buffer[used], 0, free);
body(ctx, ctx->buffer, 64);
used = 0;
free = 64;
}
memset(&ctx->buffer[used], 0, free - 8);
ctx->lo <<= 3;
ctx->buffer[56] = ctx->lo;
ctx->buffer[57] = ctx->lo >> 8;
ctx->buffer[58] = ctx->lo >> 16;
ctx->buffer[59] = ctx->lo >> 24;
ctx->buffer[60] = ctx->hi;
ctx->buffer[61] = ctx->hi >> 8;
ctx->buffer[62] = ctx->hi >> 16;
ctx->buffer[63] = ctx->hi >> 24;
body(ctx, ctx->buffer, 64);
result[0] = ctx->a;
result[1] = ctx->a >> 8;
result[2] = ctx->a >> 16;
result[3] = ctx->a >> 24;
result[4] = ctx->b;
result[5] = ctx->b >> 8;
result[6] = ctx->b >> 16;
result[7] = ctx->b >> 24;
result[8] = ctx->c;
result[9] = ctx->c >> 8;
result[10] = ctx->c >> 16;
result[11] = ctx->c >> 24;
result[12] = ctx->d;
result[13] = ctx->d >> 8;
result[14] = ctx->d >> 16;
result[15] = ctx->d >> 24;
memset(ctx, 0, sizeof(ctx));
}
#else
/* need these includes for DoMD5()... */
#include "struct.h"
#include "common.h"
#endif
/** Generates an MD5 checksum.
* @param mdout[out] Buffer to store result in, the result will be 16 bytes in binary
* (not ascii printable!).
* @param src[in] The input data used to generate the checksum.
* @param n[in] Length of data.
*/
void DoMD5(unsigned char *mdout, unsigned char *src, unsigned long n)
{
MD5_CTX hash;
MD5_Init(&hash);
MD5_Update(&hash, src, n);
MD5_Final(mdout, &hash);
}
+477 -51
View File
@@ -18,6 +18,8 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Id$
*/
#include "struct.h"
@@ -36,6 +38,7 @@
#ifdef _WIN32
#include <io.h>
#define RTLD_NOW 0
const char *our_dlerror(void);
#elif defined(HPUX)
#include <dl.h>
#define RTLD_NOW BIND_IMMEDIATE
@@ -51,12 +54,18 @@
#ifndef RTLD_NOW
#define RTLD_NOW RTLD_LAZY
#endif
#define UNREALCORE
#include "modversion.h"
Hook *Hooks[MAXHOOKTYPES];
Hooktype Hooktypes[MAXCUSTOMHOOKS];
Module *Modules = NULL;
Versionflag *Versionflags = NULL;
int Module_Depend_Resolve(Module *p);
Callback *Callbacks[MAXCALLBACKS]; /* Callback objects for modules, used for rehashing etc (can be multiple) */
Callback *RCallbacks[MAXCALLBACKS]; /* 'Real' callback function, used for callback function calls */
Efunction *Efunctions[MAXEFUNCTIONS]; /* Efunction objects (used for rehashing) */
MODVAR Module *Modules = NULL;
MODVAR Versionflag *Versionflags = NULL;
int Module_Depend_Resolve(Module *p, char *path);
Module *Module_make(ModuleHeader *header,
#ifdef _WIN32
HMODULE mod
@@ -64,6 +73,74 @@ Module *Module_make(ModuleHeader *header,
void *mod
#endif
);
typedef struct {
char *name;
void **funcptr;
} EfunctionsList;
/* Efuncs */
int (*do_join)(aClient *cptr, aClient *sptr, int parc, char *parv[]);
void (*join_channel)(aChannel *chptr, aClient *cptr, aClient *sptr, int flags);
int (*can_join)(aClient *cptr, aClient *sptr, aChannel *chptr, char *key, char *link, char *parv[]);
void (*do_mode)(aChannel *chptr, aClient *cptr, aClient *sptr, int parc, char *parv[], time_t sendts, int samode);
void (*set_mode)(aChannel *chptr, aClient *cptr, int parc, char *parv[], u_int *pcount,
char pvar[MAXMODEPARAMS][MODEBUFLEN + 3], int bounce);
int (*m_umode)(aClient *cptr, aClient *sptr, int parc, char *parv[]);
int (*register_user)(aClient *cptr, aClient *sptr, char *nick, char *username, char *umode, char *virthost, char *ip);
int (*tkl_hash)(unsigned int c);
char (*tkl_typetochar)(int type);
aTKline *(*tkl_add_line)(int type, char *usermask, char *hostmask, char *reason, char *setby,
TS expire_at, TS set_at, TS spamf_tkl_duration, char *spamf_tkl_reason);
aTKline *(*tkl_del_line)(aTKline *tkl);
void (*tkl_check_local_remove_shun)(aTKline *tmp);
aTKline *(*tkl_expire)(aTKline * tmp);
EVENT((*tkl_check_expire));
int (*find_tkline_match)(aClient *cptr, int xx);
int (*find_shun)(aClient *cptr);
int(*find_spamfilter_user)(aClient *sptr);
aTKline *(*find_qline)(aClient *cptr, char *nick, int *ishold);
int (*find_tkline_match_zap)(aClient *cptr);
void (*tkl_stats)(aClient *cptr, int type, char *para);
void (*tkl_synch)(aClient *sptr);
int (*m_tkl)(aClient *cptr, aClient *sptr, int parc, char *parv[]);
int (*place_host_ban)(aClient *sptr, int action, char *reason, long duration);
int (*dospamfilter)(aClient *sptr, char *str_in, int type, char *target);
static const EfunctionsList efunction_table[MAXEFUNCTIONS] = {
/* 00 */ {NULL, NULL},
/* 01 */ {"do_join", (void *)&do_join},
/* 02 */ {"join_channel", (void *)&join_channel},
/* 03 */ {"can_join", (void *)&can_join},
/* 04 */ {"do_mode", (void *)&do_mode},
/* 05 */ {"set_mode", (void *)&set_mode},
/* 06 */ {"m_umode", (void *)&m_umode},
/* 07 */ {"register_user", (void *)&register_user},
/* 08 */ {"tkl_hash", (void *)&tkl_hash},
/* 09 */ {"tkl_typetochar", (void *)&tkl_typetochar},
/* 10 */ {"tkl_add_line", (void *)&tkl_add_line},
/* 11 */ {"tkl_del_line", (void *)&tkl_del_line},
/* 12 */ {"tkl_check_local_remove_shun", (void *)&tkl_check_local_remove_shun},
/* 13 */ {"tkl_expire", (void *)&tkl_expire},
/* 14 */ {"tkl_check_expire", (void *)&tkl_check_expire},
/* 15 */ {"find_tkline_match", (void *)&find_tkline_match},
/* 16 */ {"find_shun", (void *)&find_shun},
/* 17 */ {"find_spamfilter_user", (void *)&find_spamfilter_user},
/* 18 */ {"find_qline", (void *)&find_qline},
/* 19 */ {"find_tkline_match_zap", (void *)&find_tkline_match_zap},
/* 20 */ {"tkl_stats", (void *)&tkl_stats},
/* 21 */ {"tkl_synch", (void *)&tkl_synch},
/* 22 */ {"m_tkl", (void *)&m_tkl},
/* 23 */ {"place_host_ban", (void *)&place_host_ban},
/* 24 */ {"dospamfilter", (void *)&dospamfilter},
/* 25 */ {NULL, NULL},
/* 26 */ {NULL, NULL},
/* 27 */ {NULL, NULL},
/* 28 */ {NULL, NULL}
};
#ifdef UNDERSCORE
void *obsd_dlsym(void *handle, char *symbol) {
char *obsdsymbol = (char*)MyMalloc(strlen(symbol) + 2);
@@ -90,7 +167,7 @@ void DeleteTempModules(void)
if (!fd) /* Ouch.. this is NOT good!! */
{
config_error("Unable to open 'tmp' directory: %s, please create one with the appropriate permissions",
strerror(ERRNO));
strerror(errno));
if (!loop.ircd_booted)
exit(7);
return;
@@ -133,6 +210,9 @@ void Module_Init(void)
{
bzero(Hooks, sizeof(Hooks));
bzero(Hooktypes, sizeof(Hooktypes));
bzero(Callbacks, sizeof(Callback));
bzero(RCallbacks, sizeof(Callback));
bzero(Efunctions, sizeof(Efunction));
}
Module *Module_Find(char *name)
@@ -153,6 +233,30 @@ Module *Module_Find(char *name)
}
int parse_modsys_version(char *version)
{
int betaversion, tag;
if (!strcmp(version, "3.2.3"))
return 0x32300;
if (sscanf(version, "3.2-b%d-%d", &betaversion, &tag))
{
switch (betaversion)
{
case 5:
return 0x320b5;
case 6:
return 0x320b6;
case 7:
return 0x320b7;
case 8:
return 0x320b8;
default:
return 0;
}
}
return 0;
}
/*
* Returns an error if insucessful .. yes NULL is OK!
*/
@@ -171,11 +275,11 @@ char *Module_Create(char *path_)
char *Mod_Version;
static char errorbuf[1024];
char *path, *tmppath;
ModuleHeader *mod_header;
ModuleHeader *mod_header = NULL;
int ret = 0;
Module *mod = NULL, **Mod_Handle = NULL;
int *x;
int betaversion,tag;
char *expectedmodversion = our_mod_version;
long modsys_ver = 0;
Debug((DEBUG_DEBUG, "Attempting to load module from %s",
path_));
path = path_;
@@ -190,16 +294,24 @@ char *Module_Create(char *path_)
strcpy(path, "./");
strcat(path, path_);
}
unreal_copyfile(path, tmppath);
unreal_copyfileex(path, tmppath, 1);
if ((Mod = irc_dlopen(tmppath, RTLD_NOW)))
{
/* We have engaged the borg cube. Scan for lifesigns. */
irc_dlsym(Mod, "Mod_Version", Mod_Version);
if (Mod_Version && strcmp(version, Mod_Version))
if (Mod_Version && strcmp(Mod_Version, expectedmodversion))
{
snprintf(errorbuf, sizeof(errorbuf),
"Module was compiled for '%s', we are '%s', please recompile the module",
Mod_Version, version);
Mod_Version, expectedmodversion);
irc_dlclose(Mod);
remove(tmppath);
return errorbuf;
}
if (!Mod_Version)
{
snprintf(errorbuf, sizeof(errorbuf),
"Module is lacking Mod_Version. Perhaps a very old one you forgot to recompile?");
irc_dlclose(Mod);
remove(tmppath);
return errorbuf;
@@ -217,14 +329,13 @@ char *Module_Create(char *path_)
remove(tmppath);
return ("Lacking mod_header->modversion");
}
if (sscanf(mod_header->modversion, "3.2-b%d-%d", &betaversion, &tag)) {
if (betaversion < 5 || betaversion >8) {
snprintf(errorbuf, 1023, "Unsupported version, we support %s, %s is %s",
MOD_WE_SUPPORT, path, mod_header->modversion);
irc_dlclose(Mod);
remove(tmppath);
return(errorbuf);
}
if (!(modsys_ver = parse_modsys_version(mod_header->modversion)))
{
snprintf(errorbuf, 1023, "Unsupported module system version '%s'",
mod_header->modversion);
irc_dlclose(Mod);
remove(tmppath);
return(errorbuf);
}
if (!mod_header->name || !mod_header->version ||
!mod_header->description)
@@ -241,8 +352,7 @@ char *Module_Create(char *path_)
}
mod = (Module *)Module_make(mod_header, Mod);
mod->tmp_file = strdup(tmppath);
if (Mod_Version)
mod->compilecheck = 1;
mod->mod_sys_version = modsys_ver;
irc_dlsym(Mod, "Mod_Init", Mod_Init);
if (!Mod_Init)
{
@@ -261,7 +371,7 @@ char *Module_Create(char *path_)
Module_free(mod);
return ("Unable to locate Mod_Load");
}
if (Module_Depend_Resolve(mod) == -1)
if (Module_Depend_Resolve(mod, path) == -1)
{
Module_free(mod);
return ("Dependancy problem");
@@ -272,7 +382,7 @@ char *Module_Create(char *path_)
irc_dlsym(Mod, "Mod_Test", Mod_Test);
if (Mod_Test)
{
if (betaversion >= 8) {
if (mod->mod_sys_version >= 0x320b8) {
if ((ret = (*Mod_Test)(&mod->modinfo)) < MOD_SUCCESS) {
ircsprintf(errorbuf, "Mod_Test returned %i",
ret);
@@ -341,6 +451,7 @@ Module *Module_make(ModuleHeader *header,
modp->modinfo.size = sizeof(ModuleInfo);
modp->modinfo.module_load = 0;
modp->modinfo.handle = modp;
return (modp);
}
@@ -348,7 +459,7 @@ void Init_all_testing_modules(void)
{
Module *mi, *next;
int betaversion, tag, ret;
int ret;
iFP Mod_Init;
for (mi = Modules; mi; mi = next)
{
@@ -356,8 +467,7 @@ void Init_all_testing_modules(void)
if (!(mi->flags & MODFLAG_TESTING))
continue;
irc_dlsym(mi->dll, "Mod_Init", Mod_Init);
sscanf(mi->header->modversion, "3.2-b%d-%d", &betaversion, &tag);
if (betaversion >= 8) {
if (mi->mod_sys_version >= 0x320b8) {
if ((ret = (*Mod_Init)(&mi->modinfo)) < MOD_SUCCESS) {
config_error("Error loading %s: Mod_Init returned %i",
mi->header->name, ret);
@@ -432,6 +542,15 @@ void Unload_all_loaded_modules(void)
else if (objs->type == MOBJ_EXTBAN) {
ExtbanDel(objs->object.extban);
}
else if (objs->type == MOBJ_CALLBACK) {
CallbackDel(objs->object.callback);
}
else if (objs->type == MOBJ_EFUNCTION) {
EfunctionDel(objs->object.efunction);
}
else if (objs->type == MOBJ_ISUPPORT) {
IsupportDel(objs->object.isupport);
}
}
for (child = mi->children; child; child = childnext)
{
@@ -441,7 +560,9 @@ void Unload_all_loaded_modules(void)
}
DelListItem(mi,Modules);
irc_dlclose(mi->dll);
#ifndef DEBUGMODE
remove(mi->tmp_file);
#endif
MyFree(mi->tmp_file);
MyFree(mi);
}
@@ -489,6 +610,15 @@ void Unload_all_testing_modules(void)
else if (objs->type == MOBJ_EXTBAN) {
ExtbanDel(objs->object.extban);
}
else if (objs->type == MOBJ_CALLBACK) {
CallbackDel(objs->object.callback);
}
else if (objs->type == MOBJ_EFUNCTION) {
EfunctionDel(objs->object.efunction);
}
else if (objs->type == MOBJ_ISUPPORT) {
IsupportDel(objs->object.isupport);
}
}
for (child = mi->children; child; child = childnext)
{
@@ -552,6 +682,16 @@ int Module_free(Module *mod)
else if (objs->type == MOBJ_EXTBAN) {
ExtbanDel(objs->object.extban);
}
else if (objs->type == MOBJ_CALLBACK) {
CallbackDel(objs->object.callback);
}
else if (objs->type == MOBJ_EFUNCTION) {
EfunctionDel(objs->object.efunction);
}
else if (objs->type == MOBJ_ISUPPORT) {
IsupportDel(objs->object.isupport);
}
}
for (p = Modules; p; p = p->next)
{
@@ -695,7 +835,7 @@ vFP Module_SymX(char *name, Module **mptr)
void module_loadall(int module_load)
{
#ifndef STATIC_LINKING
iFP fp, fpp;
iFP fp;
Module *mi, *next;
if (!loop.ircd_booted)
@@ -710,14 +850,6 @@ void module_loadall(int module_load)
if (mi->flags & MODFLAG_LOADED)
continue;
irc_dlsym(mi->dll, "Mod_Load", fp);
irc_dlsym(mi->dll, "_Mod_Load", fpp);
if (fp);
else if (fpp) { fp = fpp; }
else
{
/* else, we didn't find it */
continue;
}
/* Call the module_load */
if ((*fp)(module_load) != MOD_SUCCESS)
{
@@ -726,7 +858,6 @@ void module_loadall(int module_load)
}
else
mi->flags = MODFLAG_LOADED;
}
#endif
}
@@ -752,15 +883,13 @@ inline void Module_AddAsChild(Module *parent, Module *child)
AddListItem(childp, parent->children);
}
int Module_Depend_Resolve(Module *p)
int Module_Depend_Resolve(Module *p, char *path)
{
Mod_SymbolDepTable *d = p->header->symdep;
Module *parental = NULL;
if (d == NULL)
{
return 0;
}
#ifndef STATIC_LINKING
while (d->pointer)
{
@@ -772,8 +901,22 @@ int Module_Depend_Resolve(Module *p)
*(d->pointer) = Module_SymX(d->symbol, &parental);
if (!*(d->pointer))
{
config_progress("Unable to resolve symbol %s, attempting to load %s to find it", d->symbol, d->module);
Module_Create(d->module);
/* If >= 3.2.3 */
if (p->mod_sys_version >= 0x32300)
{
char tmppath[PATH_MAX], curpath[PATH_MAX];
unreal_getpathname(path, curpath);
snprintf(tmppath, PATH_MAX, "%s/%s.%s", curpath, d->module,
MOD_EXTENSION);
config_progress("Unable to resolve symbol %s, attempting to load %s to find it", d->symbol, tmppath);
Module_Create(tmppath);
}
else
{
config_progress("Unable to resolve symbol %s, attempting to load %s to find it", d->symbol, d->module);
Module_Create(d->module);
}
*(d->pointer) = Module_SymX(d->symbol, &parental);
if (!*(d->pointer)) {
config_progress("module dependancy error: cannot resolve symbol %s",
@@ -797,13 +940,13 @@ int Module_Depend_Resolve(Module *p)
}
/* m_module.
* originally by ?? (codemastr?)
* I (Syzop) changed it so it's now public for users too,
* as quite some people (and users) requested they should have the
* right to see what kind of weird modules are loaded on the server,
* especially since people like to load spy modules these days.
* by Stskeeps, codemastr, Syzop.
* Changed it so it's now public for users too, as quite some people
* (and users) requested they should have the right to see what kind
* of weird modules are loaded on the server, especially since people
* like to load spy modules these days.
* I do not consider this sensitive information, but just in case
* I stripped the version string for non-admins (eg: normal users).
* I stripped the version string for non-admins (eg: normal users). -- Syzop
*/
int m_module(aClient *cptr, aClient *sptr, int parc, char *parv[])
{
@@ -811,6 +954,9 @@ int m_module(aClient *cptr, aClient *sptr, int parc, char *parv[])
int i;
char tmp[1024], *p;
aCommand *mptr;
#ifdef DEBUGMODE
Efunction *e;
#endif
/* Opers can do /module <servername> */
if ((parc > 1) && (IsServer(cptr) || IsOper(sptr)) &&
@@ -831,8 +977,6 @@ int m_module(aClient *cptr, aClient *sptr, int parc, char *parv[])
strcat(tmp, "[PERM] ");
if (!(mi->options & MOD_OPT_OFFICIAL))
strcat(tmp, "[3RD] ");
if (!mi->compilecheck)
strcat(tmp, "[OLD?] ");
if (!IsOper(sptr))
sendto_one(sptr, ":%s NOTICE %s :*** %s (%s)%s", me.name, sptr->name,
mi->header->name, mi->header->description,
@@ -853,7 +997,7 @@ int m_module(aClient *cptr, aClient *sptr, int parc, char *parv[])
continue;
sprintf(p, "%d ", i);
p += strlen(p);
if (p > tmp+480)
if (p > tmp+380)
{
sendto_one(sptr, ":%s NOTICE %s :Hooks: %s", me.name, sptr->name, tmp);
tmp[0] = '\0';
@@ -871,7 +1015,7 @@ int m_module(aClient *cptr, aClient *sptr, int parc, char *parv[])
{
sprintf(p, "%s ", mptr->cmd);
p += strlen(p);
if (p > tmp+470)
if (p > tmp+380)
{
sendto_one(sptr, ":%s NOTICE %s :Override: %s", me.name, sptr->name, tmp);
tmp[0] = '\0';
@@ -880,6 +1024,20 @@ int m_module(aClient *cptr, aClient *sptr, int parc, char *parv[])
}
}
sendto_one(sptr, ":%s NOTICE %s :Override: %s", me.name, sptr->name, tmp);
#ifdef DEBUGMODE
sendnotice(sptr, "Efunctions dump:");
for (i=0; i < MAXEFUNCTIONS; i++)
if ((e = Efunctions[i]))
{
sendnotice(sptr, "type=%d, name=%s, pointer=%p %s, owner=%s",
e->type,
efunction_table[e->type].name ? efunction_table[e->type].name : "<null>",
e->func.voidfunc,
*efunction_table[e->type].funcptr == e->func.voidfunc ? " [ACTIVE]" : "",
e->owner ? e->owner->header->name : "<null>");
}
#endif
return 1;
}
@@ -1111,6 +1269,114 @@ Hook *HookDel(Hook *hook)
return NULL;
}
Callback *CallbackAddMain(Module *module, int cbtype, int (*func)(), void (*vfunc)(), char *(*cfunc)())
{
Callback *p;
p = (Callback *) MyMallocEx(sizeof(Callback));
if (func)
p->func.intfunc = func;
if (vfunc)
p->func.voidfunc = vfunc;
if (cfunc)
p->func.pcharfunc = cfunc;
p->type = cbtype;
p->owner = module;
AddListItem(p, Callbacks[cbtype]);
if (module) {
ModuleObject *cbobj = (ModuleObject *)MyMallocEx(sizeof(ModuleObject));
cbobj->object.callback = p;
cbobj->type = MOBJ_CALLBACK;
AddListItem(cbobj, module->objects);
module->errorcode = MODERR_NOERROR;
}
return p;
}
Callback *CallbackDel(Callback *cb)
{
Callback *p, *q;
for (p = Callbacks[cb->type]; p; p = p->next) {
if (p == cb) {
q = p->next;
DelListItem(p, Callbacks[cb->type]);
if (RCallbacks[cb->type] == p)
RCallbacks[cb->type] = NULL;
if (p->owner) {
ModuleObject *cbobj;
for (cbobj = p->owner->objects; cbobj; cbobj = cbobj->next) {
if ((cbobj->type == MOBJ_CALLBACK) && (cbobj->object.callback == p)) {
DelListItem(cbobj, cb->owner->objects);
MyFree(cbobj);
break;
}
}
}
MyFree(p);
return q;
}
}
return NULL;
}
Efunction *EfunctionAddMain(Module *module, int eftype, int (*func)(), void (*vfunc)(), void *(*pvfunc)(), char *(*cfunc)())
{
Efunction *p;
if (!module || !(module->options & MOD_OPT_OFFICIAL))
{
module->errorcode = MODERR_INVALID;
return NULL;
}
p = (Efunction *) MyMallocEx(sizeof(Efunction));
if (func)
p->func.intfunc = func;
if (vfunc)
p->func.voidfunc = vfunc;
if (pvfunc)
p->func.pvoidfunc = pvfunc;
if (cfunc)
p->func.pcharfunc = cfunc;
p->type = eftype;
p->owner = module;
AddListItem(p, Efunctions[eftype]);
if (module) {
ModuleObject *cbobj = (ModuleObject *)MyMallocEx(sizeof(ModuleObject));
cbobj->object.efunction = p;
cbobj->type = MOBJ_EFUNCTION;
AddListItem(cbobj, module->objects);
module->errorcode = MODERR_NOERROR;
}
return p;
}
Efunction *EfunctionDel(Efunction *cb)
{
Efunction *p, *q;
for (p = Efunctions[cb->type]; p; p = p->next) {
if (p == cb) {
q = p->next;
DelListItem(p, Efunctions[cb->type]);
if (*efunction_table[cb->type].funcptr == p)
*efunction_table[cb->type].funcptr = NULL;
if (p->owner) {
ModuleObject *cbobj;
for (cbobj = p->owner->objects; cbobj; cbobj = cbobj->next) {
if ((cbobj->type == MOBJ_EFUNCTION) && (cbobj->object.efunction == p)) {
DelListItem(cbobj, cb->owner->objects);
MyFree(cbobj);
break;
}
}
}
MyFree(p);
return q;
}
}
return NULL;
}
Cmdoverride *CmdoverrideAdd(Module *module, char *name, iFP function)
{
aCommand *p;
@@ -1122,6 +1388,15 @@ Cmdoverride *CmdoverrideAdd(Module *module, char *name, iFP function)
module->errorcode = MODERR_NOTFOUND;
return NULL;
}
for (ovr=p->overriders; ovr; ovr=ovr->next)
{
if ((ovr->owner == module) && (ovr->func == function))
{
if (module)
module->errorcode = MODERR_EXISTS;
return NULL;
}
}
ovr = MyMallocEx(sizeof(Cmdoverride));
ovr->func = function;
ovr->owner = module; /* TODO: module objects */
@@ -1236,11 +1511,162 @@ static const char *module_error_str[] = {
"No error",
"Object already exists",
"No space available",
"Invalid parameter(s)"
"Invalid parameter(s)",
"Object was not found"
};
const char *ModuleGetErrorStr(Module *module)
{
if (module->errorcode >= sizeof(module_error_str)/sizeof(module_error_str[0]))
return NULL;
return module_error_str[module->errorcode];
}
static int num_callbacks(int cbtype)
{
Callback *e;
int cnt = 0;
for (e = Callbacks[cbtype]; e; e = e->next)
if (!e->willberemoved)
cnt++;
return cnt;
}
/** Ensure that all required callbacks are in place and meet
* all specified requirements (eg: a cloaking module should
* be loaded).
*/
int callbacks_check(void)
{
int i;
if (!num_callbacks(CALLBACKTYPE_CLOAK) || !num_callbacks(CALLBACKTYPE_CLOAKKEYCSUM))
{
#ifndef _WIN32
config_error("ERROR: No cloaking module loaded. (hint: you probably want to load cloak.so)");
#else
config_error("ERROR: No cloaking module loaded. (hint: you probably want to load modules\\cloak.dll)");
#endif
/* TEMPORARY! */
config_error("If you are upgrading from 3.2 (or any older version), be sure to read the release notes "
"or www.vulnscan.org/tmp/newcloak.txt regarding the cloaking change!");
return -1;
}
for (i=0; i < MAXCALLBACKS; i++)
{
if (num_callbacks(i) > 1)
{
config_error("ERROR: Multiple callbacks loaded for type %d. "
"Make sure you only load 1 module of 1 type (eg: only 1 cloaking module)",
i); /* TODO: make more clear? */
return -1;
}
}
return 0;
}
void callbacks_switchover(void)
{
Callback *e;
int i;
/* Now set the real callback, and tag the new one
* as 'willberemoved' if needed.
*/
for (i=0; i < MAXCALLBACKS; i++)
for (e = Callbacks[i]; e; e = e->next)
if (!e->willberemoved)
{
RCallbacks[i] = e; /* This is the new one. */
if (!(e->owner->options & MOD_OPT_PERM))
e->willberemoved = 1;
break;
}
}
static int num_efunctions(int eftype)
{
Efunction *e;
int cnt = 0;
#ifdef DEBUGMODE
if ((eftype < 0) || (eftype >= MAXEFUNCTIONS))
abort();
#endif
for (e = Efunctions[eftype]; e; e = e->next)
if (!e->willberemoved)
cnt++;
return cnt;
}
/** Ensure that all efunctions are present. */
int efunctions_check(void)
{
int i, n, errors=0;
for (i=0; i < MAXEFUNCTIONS; i++)
if (efunction_table[i].name)
{
n = num_efunctions(i);
if ((n != 1) && (errors > 10))
{
config_error("[--efunction errors truncated to prevent flooding--]");
break;
}
if (n < 1)
{
config_error("ERROR: efunction '%s' not found, you probably did not "
"load commands.so properly (or not all required m_* modules)",
efunction_table[i].name);
errors++;
} else
if (n > 1)
{
config_error("ERROR: efunction '%s' was found %d times, perhaps you "
"loaded commands.so twice or commands.so and a/the m_*.so module(s)",
efunction_table[i].name, n);
errors++;
}
}
return errors ? -1 : 0;
}
void efunctions_switchover(void)
{
Efunction *e;
int i;
/* Now set the real efunction, and tag the new one
* as 'willberemoved' if needed.
*/
for (i=0; i < MAXEFUNCTIONS; i++)
for (e = Efunctions[i]; e; e = e->next)
if (!e->willberemoved)
{
*efunction_table[i].funcptr = e->func.voidfunc; /* This is the new one. */
if (!(e->owner->options & MOD_OPT_PERM))
e->willberemoved = 1;
break;
}
}
#ifdef _WIN32
const char *our_dlerror(void)
{
static char errbuf[513];
DWORD err = GetLastError();
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS, NULL, err,
0, errbuf, 512, NULL);
return errbuf;
}
#endif
+408 -28
View File
@@ -18,18 +18,29 @@
#*
#* $Id$
#*/
# major edit from fez - to compile objects individually...
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/dynconf.h ../include/modules.h ../include/setup.h
INCLUDES = ../include/auth.h ../include/badwords.h ../include/channel.h \
../include/class.h ../include/common.h ../include/config.h ../include/dbuf.h \
../include/dynconf.h ../include/events.h ../include/fdlist.h ../include/h.h \
../include/hash.h ../include/inet.h ../include/ircsprintf.h \
../include/license.h ../include/macros.h ../include/md5.h \
../include/modules.h ../include/modversion.h ../include/msg.h ../include/nameser.h \
../include/numeric.h ../include/proto.h ../include/res.h \
../include/resource.h ../include/setup.h ../include/sjoin.h \
../include/sock.h ../include/ssl.h ../include/struct.h ../include/sys.h \
../include/threads.h ../include/types.h ../include/url.h \
../include/version.h ../include/whowas.h ../include/zip.h
R_MODULES=m_sethost.so m_chghost.so m_chgident.so m_setname.so \
m_setident.so m_sdesc.so m_svsmode.so m_swhois.so\
m_svsmotd.so m_svsnline.so m_who.so m_mkpasswd.so \
m_away.so m_svsnoop.so m_svso.so m_svsnick.so \
#just changing this to cloak.so could be a ./Config option...
#R_MODULES=cloak.so
R_MODULES= \
m_sethost.so m_chghost.so m_chgident.so m_setname.so \
m_setident.so m_sdesc.so m_svsmode.so m_swhois.so\
m_svsmotd.so m_svsnline.so m_who.so m_mkpasswd.so \
m_away.so m_svsnoop.so m_svso.so m_svsnick.so \
m_adminchat.so m_akill.so m_chgname.so m_guest.so m_htm.so m_kill.so \
m_lag.so m_message.so m_nachat.so m_oper.so m_pingpong.so \
m_lag.so m_message.so m_nachat.so m_oper.so m_pingpong.so \
m_quit.so m_rakill.so m_rping.so m_sendumode.so m_sqline.so \
m_tsctl.so m_unkline.so m_unsqline.so m_unzline.so m_whois.so \
m_tkl.so m_vhost.so m_cycle.so m_svsjoin.so m_svspart.so \
@@ -42,26 +53,31 @@ R_MODULES=m_sethost.so m_chghost.so m_chgident.so m_setname.so \
m_trace.so m_netinfo.so m_links.so m_help.so m_rules.so \
m_close.so m_map.so m_eos.so m_server.so m_stats.so \
m_svsfline.so m_dccdeny.so m_undccdeny.so m_whowas.so \
m_connect.so
m_connect.so m_dccallow.so m_userip.so m_nick.so m_user.so \
m_mode.so m_watch.so m_part.so m_join.so m_motd.so m_opermotd.so \
m_botmotd.so m_lusers.so cloak.so
COMMANDS=m_sethost.c m_chghost.c m_chgident.c m_setname.c m_setident.c \
m_sdesc.c m_svsmode.c m_swhois.c m_svsmotd.c m_svsnline.c \
m_who.c m_mkpasswd.c m_away.c m_svsnoop.c m_svso.c m_svsnick.c \
m_adminchat.c m_akill.c m_chgname.c m_guest.c m_htm.c m_kill.c \
m_lag.c m_message.c m_nachat.c m_oper.c m_pingpong.c \
m_quit.c m_rakill.c m_rping.c m_sendumode.c m_sqline.c \
m_tsctl.c m_unkline.c m_unsqline.c m_unzline.c m_whois.c \
m_tkl.c m_vhost.c m_cycle.c m_svsjoin.c m_svspart.c \
m_svslusers.c m_svswatch.c m_svssilence.c m_sendsno.c \
m_svssno.c m_sajoin.c m_sapart.c m_samode.c m_kick.c m_topic.c \
m_invite.c m_list.c m_time.c m_svskill.c m_sjoin.c \
m_pass.c m_userhost.c m_ison.c m_silence.c m_knock.c m_umode2.c \
m_squit.c m_protoctl.c m_addline.c m_addmotd.c m_addomotd.c \
m_wallops.c m_admin.c m_globops.c m_locops.c m_chatops.c \
m_trace.c m_netinfo.c m_links.c m_help.c m_rules.c \
m_close.c m_map.c m_eos.c m_server.c m_stats.c \
m_svsfline.c m_dccdeny.c m_undccdeny.c m_whowas.c \
m_connect.c
#note change of .c to .o
COMMANDS=m_sethost.o m_chghost.o m_chgident.o m_setname.o m_setident.o \
m_sdesc.o m_svsmode.o m_swhois.o m_svsmotd.o m_svsnline.o \
m_who.o m_mkpasswd.o m_away.o m_svsnoop.o m_svso.o m_svsnick.o \
m_adminchat.o m_akill.o m_chgname.o m_guest.o m_htm.o m_kill.o \
m_lag.o m_message.o m_nachat.o m_oper.o m_pingpong.o \
m_quit.o m_rakill.o m_rping.o m_sendumode.o m_sqline.o \
m_tsctl.o m_unkline.o m_unsqline.o m_unzline.o m_whois.o \
m_tkl.o m_vhost.o m_cycle.o m_svsjoin.o m_svspart.o \
m_svslusers.o m_svswatch.o m_svssilence.o m_sendsno.o \
m_svssno.o m_sajoin.o m_sapart.o m_samode.o m_kick.o m_topic.o \
m_invite.o m_list.o m_time.o m_svskill.o m_sjoin.o \
m_pass.o m_userhost.o m_ison.o m_silence.o m_knock.o m_umode2.o \
m_squit.o m_protoctl.o m_addline.o m_addmotd.o m_addomotd.o \
m_wallops.o m_admin.o m_globops.o m_locops.o m_chatops.o \
m_trace.o m_netinfo.o m_links.o m_help.o m_rules.o \
m_close.o m_map.o m_eos.o m_server.o m_stats.o \
m_svsfline.o m_dccdeny.o m_undccdeny.o m_whowas.o \
m_connect.o m_dccallow.o m_userip.o m_nick.o m_user.o \
m_mode.o m_watch.o m_part.o m_join.o m_motd.o m_opermotd.o \
m_botmotd.o m_lusers.o
MODULES=commands.so $(R_MODULES)
@@ -79,6 +95,314 @@ commands.so: l_commands.c $(COMMANDS) $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -o commands.so l_commands.c \
$(COMMANDS)
#############################################################################
# commands.so's .o's section
#############################################################################
m_adminchat.o: m_adminchat.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_adminchat.c
m_akill.o: m_akill.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_akill.c
m_chgname.o: m_chgname.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_chgname.c
m_guest.o: m_guest.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_guest.c
m_htm.o: m_htm.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_htm.c
m_kill.o: m_kill.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_kill.c
m_lag.o: m_lag.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_lag.c
m_message.o: m_message.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_message.c
m_nachat.o: m_nachat.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_nachat.c
m_oper.o: m_oper.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_oper.c
m_pingpong.o: m_pingpong.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_pingpong.c
m_quit.o: m_quit.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_quit.c
m_rakill.o: m_rakill.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_rakill.c
m_rping.o: m_rping.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_rping.c
m_sendumode.o: m_sendumode.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_sendumode.c
m_sqline.o: m_sqline.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_sqline.c
m_tsctl.o: m_tsctl.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_tsctl.c
m_unkline.o: m_unkline.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_unkline.c
m_unsqline.o: m_unsqline.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_unsqline.c
m_unzline.o: m_unzline.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_unzline.c
m_whois.o: m_whois.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_whois.c
m_sethost.o: m_sethost.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_sethost.c
m_chghost.o: m_chghost.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_chghost.c
m_chgident.o: m_chgident.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_chgident.c
m_setident.o: m_setident.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_setident.c
m_setname.o: m_setname.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_setname.c
m_sdesc.o: m_sdesc.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_sdesc.c
m_svsmode.o: m_svsmode.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_svsmode.c
m_swhois.o: m_swhois.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_swhois.c
m_svsmotd.o: m_svsmotd.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_svsmotd.c
m_svsnline.o: m_svsnline.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_svsnline.c
m_who.o: m_who.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_who.c
m_mkpasswd.o: m_mkpasswd.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_mkpasswd.c
m_away.o: m_away.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_away.c
m_svsnoop.o: m_svsnoop.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_svsnoop.c
m_svso.o: m_svso.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_svso.c
m_svsnick.o: m_svsnick.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_svsnick.c
m_tkl.o: m_tkl.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_tkl.c
m_vhost.o: m_vhost.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_vhost.c
m_cycle.o: m_cycle.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_cycle.c
m_svsjoin.o: m_svsjoin.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_svsjoin.c
m_svspart.o: m_svspart.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_svspart.c
m_svslusers.o: m_svslusers.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_svslusers.c
m_svswatch.o: m_svswatch.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_svswatch.c
m_svssilence.o: m_svssilence.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_svssilence.c
m_sendsno.o: m_sendsno.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_sendsno.c
m_svssno.o: m_svssno.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_svssno.c
m_sajoin.o: m_sajoin.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_sajoin.c
m_sapart.o: m_sapart.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_sapart.c
m_samode.o: m_samode.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_samode.c
m_kick.o: m_kick.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_kick.c
m_topic.o: m_topic.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_topic.c
m_invite.o: m_invite.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_invite.c
m_list.o: m_list.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_list.c
m_time.o: m_time.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_time.c
m_svskill.o: m_svskill.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_svskill.c
m_sjoin.o: m_sjoin.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_sjoin.c
m_pass.o: m_pass.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_pass.c
m_userhost.o: m_userhost.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_userhost.c
m_ison.o: m_ison.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_ison.c
m_silence.o: m_silence.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_silence.c
m_knock.o: m_knock.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_knock.c
m_umode2.o: m_umode2.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_umode2.c
m_squit.o: m_squit.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_squit.c
m_protoctl.o: m_protoctl.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_protoctl.c
m_addline.o: m_addline.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_addline.c
m_addmotd.o: m_addmotd.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_addmotd.c
m_addomotd.o: m_addomotd.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_addomotd.c
m_wallops.o: m_wallops.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_wallops.c
m_admin.o: m_admin.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_admin.c
m_globops.o: m_globops.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_globops.c
m_locops.o: m_locops.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_locops.c
m_chatops.o: m_chatops.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_chatops.c
m_trace.o: m_trace.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_trace.c
m_netinfo.o: m_netinfo.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_netinfo.c
m_links.o: m_links.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_links.c
m_help.o: m_help.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_help.c
m_rules.o: m_rules.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_rules.c
m_close.o: m_close.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_close.c
m_map.o: m_map.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_map.c
m_eos.o: m_eos.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_eos.c
m_server.o: m_server.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_server.c
m_stats.o: m_stats.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_stats.c
m_svsfline.o: m_svsfline.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_svsfline.c
m_dccdeny.o: m_dccdeny.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_dccdeny.c
m_undccdeny.o: m_undccdeny.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_undccdeny.c
m_whowas.o: m_whowas.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_whowas.c
m_connect.o: m_connect.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_connect.c
m_dccallow.o: m_dccallow.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_dccallow.c
m_userip.o: m_userip.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_userip.c
m_nick.o: m_nick.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_nick.c
m_user.o: m_user.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_user.c
m_mode.o: m_mode.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_mode.c
m_watch.o: m_watch.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_watch.c
m_part.o: m_part.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_part.c
m_join.o: m_join.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_join.c
m_motd.o: m_motd.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_motd.c
m_opermotd.o: m_opermotd.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_opermotd.c
m_botmotd.o: m_botmotd.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_botmotd.c
m_lusers.o: m_lusers.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -c m_lusers.c
#############################################################################
# .so's section
#############################################################################
m_adminchat.so: m_adminchat.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
-o m_adminchat.so m_adminchat.c
@@ -431,5 +755,61 @@ m_connect.so: m_connect.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
-o m_connect.so m_connect.c
m_dccallow.so: m_dccallow.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
-o m_dccallow.so m_dccallow.c
m_userip.so: m_userip.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
-o m_userip.so m_userip.c
m_nick.so: m_nick.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
-o m_nick.so m_nick.c
m_user.so: m_user.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
-o m_user.so m_user.c
m_mode.so: m_mode.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
-o m_mode.so m_mode.c
m_watch.so: m_watch.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
-o m_watch.so m_watch.c
m_part.so: m_part.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
-o m_part.so m_part.c
m_join.so: m_join.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
-o m_join.so m_join.c
m_motd.so: m_motd.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
-o m_motd.so m_motd.c
m_opermotd.so: m_opermotd.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
-o m_opermotd.so m_opermotd.c
m_botmotd.so: m_botmotd.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
-o m_botmotd.so m_botmotd.c
m_lusers.so: m_lusers.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
-o m_lusers.so m_lusers.c
#############################################################################
# and now the remaining modules...
#############################################################################
cloak.so: cloak.c $(INCLUDES)
$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
-o cloak.so cloak.c
clean:
$(RM) -f *.o *.so *~ core
+408
View File
@@ -0,0 +1,408 @@
/*
* IRC - Internet Relay Chat, src/modules/cloak.c
* (C) 2004 The UnrealIRCd Team
*
* 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.
*/
#include "config.h"
#include "struct.h"
#include "common.h"
#include "sys.h"
#include "numeric.h"
#include "msg.h"
#include "channel.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"
#ifdef _WIN32
#include "version.h"
#endif
static char *cloak_key1 = NULL, *cloak_key2 = NULL, *cloak_key3 = NULL;
static char cloak_checksum[64];
static int nokeys = 1;
#undef KEY1
#undef KEY2
#undef KEY3
#define KEY1 cloak_key1
#define KEY2 cloak_key2
#define KEY3 cloak_key3
DLLFUNC char *hidehost(char *host);
DLLFUNC char *cloakcsum();
DLLFUNC int cloak_config_test(ConfigFile *, ConfigEntry *, int, int *);
DLLFUNC int cloak_config_run(ConfigFile *, ConfigEntry *, int);
DLLFUNC int cloak_config_posttest(int *);
static char *hidehost_ipv4(char *host);
static char *hidehost_ipv6(char *host);
static char *hidehost_normalhost(char *host);
static inline unsigned int downsample(char *i);
Callback *cloak = NULL, *cloak_csum = NULL;
ModuleHeader MOD_HEADER(cloak)
= {
"cloak",
"$Id$",
"Official cloaking module (md5)",
"3.2-b8-1",
NULL
};
DLLFUNC int MOD_TEST(cloak)(ModuleInfo *modinfo)
{
cloak = CallbackAddPCharEx(modinfo->handle, CALLBACKTYPE_CLOAK, hidehost);
if (!cloak)
{
config_error("cloak: Error while trying to install cloaking callback!");
return MOD_FAILED;
}
cloak_csum = CallbackAddPCharEx(modinfo->handle, CALLBACKTYPE_CLOAKKEYCSUM, cloakcsum);
if (!cloak_csum)
{
config_error("cloak: Error while trying to install cloaking checksum callback!");
return MOD_FAILED;
}
HookAddEx(modinfo->handle, HOOKTYPE_CONFIGTEST, cloak_config_test);
HookAddEx(modinfo->handle, HOOKTYPE_CONFIGPOSTTEST, cloak_config_posttest);
return MOD_SUCCESS;
}
DLLFUNC int MOD_INIT(cloak)(ModuleInfo *modinfo)
{
MARK_AS_OFFICIAL_MODULE(modinfo);
HookAddEx(modinfo->handle, HOOKTYPE_CONFIGRUN, cloak_config_run);
return MOD_SUCCESS;
}
DLLFUNC int MOD_LOAD(cloak)(int module_load)
{
return MOD_SUCCESS;
}
DLLFUNC int MOD_UNLOAD(cloak)(int module_unload)
{
if (cloak_key1)
{
MyFree(cloak_key1);
MyFree(cloak_key2);
MyFree(cloak_key3);
}
return MOD_SUCCESS;
}
static int check_badrandomness(char *key)
{
char gotlowcase=0, gotupcase=0, gotdigit=0;
char *p;
for (p=key; *p; p++)
if (islower(*p))
gotlowcase = 1;
else if (isupper(*p))
gotupcase = 1;
else if (isdigit(*p))
gotdigit = 1;
if (gotlowcase && gotupcase && gotdigit)
return 0;
return 1;
}
DLLFUNC int cloak_config_test(ConfigFile *cf, ConfigEntry *ce, int type, int *errs)
{
ConfigEntry *cep;
int keycnt = 0, errors = 0;
char *keys[3];
if (type != CONFIG_CLOAKKEYS)
return 0;
nokeys = 0;
for (cep = ce->ce_entries; cep; cep = cep->ce_next)
{
keycnt++;
/* TODO: check randomness */
if (check_badrandomness(cep->ce_varname))
{
config_error("%s:%i: set::cloak-keys: (key %d) Keys should be mixed a-zA-Z0-9, "
"like \"a2JO6fh3Q6w4oN3s7\"", cep->ce_fileptr->cf_filename, cep->ce_varlinenum, keycnt);
errors++;
}
if (strlen(cep->ce_varname) < 5)
{
config_error("%s:%i: set::cloak-keys: (key %d) Each key should be at least 5 characters",
cep->ce_fileptr->cf_filename, cep->ce_varlinenum, keycnt);
errors++;
}
if (strlen(cep->ce_varname) > 100)
{
config_error("%s:%i: set::cloak-keys: (key %d) Each key should be less than 100 characters",
cep->ce_fileptr->cf_filename, cep->ce_varlinenum, keycnt);
errors++;
}
if (keycnt < 4)
keys[keycnt-1] = cep->ce_varname;
}
if (keycnt != 3)
{
config_error("%s:%i: set::cloak-keys: we want 3 values, not %i!",
ce->ce_fileptr->cf_filename, ce->ce_varlinenum, keycnt);
errors++;
}
if ((keycnt == 3) && (!strcmp(keys[0], keys[1]) || !strcmp(keys[1], keys[2])))
{
config_error("%s:%i: set::cloak-keys: All your 3 keys should be RANDOM, they should not be equal",
ce->ce_fileptr->cf_filename, ce->ce_varlinenum);
errors++;
}
*errs = errors;
return errors ? -1 : 1;
}
DLLFUNC int cloak_config_posttest(int *errs)
{
int errors = 0;
if (nokeys)
{
config_error("set::cloak-keys missing!");
errors++;
}
*errs = errors;
return errors ? -1 : 1;
}
DLLFUNC int cloak_config_run(ConfigFile *cf, ConfigEntry *ce, int type)
{
ConfigEntry *cep;
char buf[512], result[16];
if (type != CONFIG_CLOAKKEYS)
return 0;
/* config test should ensure this goes fine... */
cep = ce->ce_entries;
cloak_key1 = strdup(cep->ce_varname);
cep = cep->ce_next;
cloak_key2 = strdup(cep->ce_varname);
cep = cep->ce_next;
cloak_key3 = strdup(cep->ce_varname);
/* Calculate checksum */
sprintf(buf, "%s:%s:%s", KEY1, KEY2, KEY3);
DoMD5(result, buf, strlen(buf));
ircsprintf(cloak_checksum, "MD5:%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x",
(u_int)(result[0] & 0xf), (u_int)(result[0] >> 4),
(u_int)(result[1] & 0xf), (u_int)(result[1] >> 4),
(u_int)(result[2] & 0xf), (u_int)(result[2] >> 4),
(u_int)(result[3] & 0xf), (u_int)(result[3] >> 4),
(u_int)(result[4] & 0xf), (u_int)(result[4] >> 4),
(u_int)(result[5] & 0xf), (u_int)(result[5] >> 4),
(u_int)(result[6] & 0xf), (u_int)(result[6] >> 4),
(u_int)(result[7] & 0xf), (u_int)(result[7] >> 4),
(u_int)(result[8] & 0xf), (u_int)(result[8] >> 4),
(u_int)(result[9] & 0xf), (u_int)(result[9] >> 4),
(u_int)(result[10] & 0xf), (u_int)(result[10] >> 4),
(u_int)(result[11] & 0xf), (u_int)(result[11] >> 4),
(u_int)(result[12] & 0xf), (u_int)(result[12] >> 4),
(u_int)(result[13] & 0xf), (u_int)(result[13] >> 4),
(u_int)(result[14] & 0xf), (u_int)(result[14] >> 4),
(u_int)(result[15] & 0xf), (u_int)(result[15] >> 4));
return 1;
}
DLLFUNC char *hidehost(char *host)
{
char *p;
/* IPv6 ? */
if (strchr(host, ':'))
return hidehost_ipv6(host);
/* Is this a IPv4 IP? */
for (p = host; *p; p++)
if (!isdigit(*p) && !(*p == '.'))
break;
if (!(*p))
return hidehost_ipv4(host);
/* Normal host */
return hidehost_normalhost(host);
}
DLLFUNC char *cloakcsum()
{
return cloak_checksum;
}
/** Downsamples a 128bit result to 32bits (md5 -> unsigned int) */
static inline unsigned int downsample(char *i)
{
char r[4];
r[0] = i[0] ^ i[1] ^ i[2] ^ i[3];
r[1] = i[4] ^ i[5] ^ i[6] ^ i[7];
r[2] = i[8] ^ i[9] ^ i[10] ^ i[11];
r[3] = i[12] ^ i[13] ^ i[14] ^ i[15];
return ( ((unsigned int)r[0] << 24) +
((unsigned int)r[1] << 16) +
((unsigned int)r[2] << 8) +
(unsigned int)r[3]);
}
static char *hidehost_ipv4(char *host)
{
unsigned int a, b, c, d;
static char buf[512], res[512], res2[512], result[128];
unsigned long n;
unsigned int alpha, beta, gamma;
/*
* Output: ALPHA.BETA.GAMMA.IP
* ALPHA is unique for a.b.c.d
* BETA is unique for a.b.c.*
* GAMMA is unique for a.b.*
* We cloak like this:
* ALPHA = downsample(md5(md5("KEY2:A.B.C.D:KEY3")+"KEY1"));
* BETA = downsample(md5(md5("KEY3:A.B.C:KEY1")+"KEY2"));
* GAMMA = downsample(md5(md5("KEY1:A.B:KEY2")+"KEY3"));
*/
sscanf(host, "%u.%u.%u.%u", &a, &b, &c, &d);
/* ALPHA... */
ircsprintf(buf, "%s:%s:%s", KEY2, host, KEY3);
DoMD5(res, buf, strlen(buf));
strcpy(res+16, KEY1); /* first 16 bytes are filled, append our key.. */
n = strlen(res+16) + 16;
DoMD5(res2, res, n);
alpha = downsample(res2);
/* BETA... */
ircsprintf(buf, "%s:%d.%d.%d:%s", KEY3, a, b, c, KEY1);
DoMD5(res, buf, strlen(buf));
strcpy(res+16, KEY2); /* first 16 bytes are filled, append our key.. */
n = strlen(res+16) + 16;
DoMD5(res2, res, n);
beta = downsample(res2);
/* GAMMA... */
ircsprintf(buf, "%s:%d.%d:%s", KEY1, a, b, KEY2);
DoMD5(res, buf, strlen(buf));
strcpy(res+16, KEY3); /* first 16 bytes are filled, append our key.. */
n = strlen(res+16) + 16;
DoMD5(res2, res, n);
gamma = downsample(res2);
ircsprintf(result, "%X.%X.%X.IP", alpha, beta, gamma);
return result;
}
static char *hidehost_ipv6(char *host)
{
unsigned int a, b, c, d, e, f, g, h;
static char buf[512], res[512], res2[512], result[128];
unsigned long n;
unsigned int alpha, beta, gamma;
/*
* Output: ALPHA:BETA:GAMMA:IP
* ALPHA is unique for a:b:c:d:e:f:g:h
* BETA is unique for a:b:c:d:e:f:g
* GAMMA is unique for a:b:c:d
* We cloak like this:
* ALPHA = downsample(md5(md5("KEY2:a:b:c:d:e:f:g:h:KEY3")+"KEY1"));
* BETA = downsample(md5(md5("KEY3:a:b:c:d:e:f:g:KEY1")+"KEY2"));
* GAMMA = downsample(md5(md5("KEY1:a:b:c:d:KEY2")+"KEY3"));
*/
sscanf(host, "%x:%x:%x:%x:%x:%x:%x:%x",
&a, &b, &c, &d, &e, &f, &g, &h);
/* ALPHA... */
ircsprintf(buf, "%s:%s:%s", KEY2, host, KEY3);
DoMD5(res, buf, strlen(buf));
strcpy(res+16, KEY1); /* first 16 bytes are filled, append our key.. */
n = strlen(res+16) + 16;
DoMD5(res2, res, n);
alpha = downsample(res2);
/* BETA... */
ircsprintf(buf, "%s:%x:%x:%x:%x:%x:%x:%x:%s", KEY3, a, b, c, d, e, f, g, KEY1);
DoMD5(res, buf, strlen(buf));
strcpy(res+16, KEY2); /* first 16 bytes are filled, append our key.. */
n = strlen(res+16) + 16;
DoMD5(res2, res, n);
beta = downsample(res2);
/* GAMMA... */
ircsprintf(buf, "%s:%x:%x:%x:%x:%s", KEY1, a, b, c, d, KEY2);
DoMD5(res, buf, strlen(buf));
strcpy(res+16, KEY3); /* first 16 bytes are filled, append our key.. */
n = strlen(res+16) + 16;
DoMD5(res2, res, n);
gamma = downsample(res2);
ircsprintf(result, "%X:%X:%X:IP", alpha, beta, gamma);
return result;
}
static char *hidehost_normalhost(char *host)
{
char *p;
static char buf[512], res[512], res2[512], result[HOSTLEN+1];
unsigned int alpha, n;
ircsprintf(buf, "%s:%s:%s", KEY1, host, KEY2);
DoMD5(res, buf, strlen(buf));
strcpy(res+16, KEY3); /* first 16 bytes are filled, append our key.. */
n = strlen(res+16) + 16;
DoMD5(res2, res, n);
alpha = downsample(res2);
for (p = host; *p; p++)
if (*p == '.')
if (isalpha(*(p + 1)))
break;
if (*p)
{
unsigned int len;
p++;
ircsprintf(result, "%s-%X.", hidden_host, alpha);
len = strlen(result) + strlen(p);
if (len <= HOSTLEN)
strcat(result, p);
else
strcat(result, p + (len - HOSTLEN));
} else
ircsprintf(result, "%s-%X", hidden_host, alpha);
return result;
}
+65 -8
View File
@@ -47,7 +47,7 @@
/* l_commands.c/commands.so is a special case so we have to do this manually :p */
#ifdef DYNAMIC_LINKING
char Mod_Version[] = BASE_VERSION PATCH1 PATCH2 PATCH3 PATCH4 PATCH5 PATCH6 PATCH7 PATCH8 PATCH9;
#include "modversion.h"
#endif
extern ModuleHeader m_svsnoop_Header;
@@ -72,7 +72,9 @@ ModuleHeader l_commands_Header
* want to
*/
extern int m_htm_Test(ModuleInfo *modinfo);
extern int m_htm_Test(ModuleInfo *modinfo), m_join_Test(ModuleInfo *modinfo);
extern int m_mode_Test(ModuleInfo *modinfo), m_nick_Test(ModuleInfo *modinfo);
extern int m_tkl_Test(ModuleInfo *modinfo);
extern int m_sethost_Init(ModuleInfo *modinfo), m_setname_Init(ModuleInfo *modinfo), m_chghost_Init(ModuleInfo *modinfo);
extern int m_chgident_Init(ModuleInfo *modinfo), m_setident_Init(ModuleInfo *modinfo), m_sdesc_Init(ModuleInfo *modinfo);
@@ -84,7 +86,7 @@ extern int m_lag_Init(ModuleInfo *modinfo), m_rping_Init(ModuleInfo *modinfo), m
extern int m_tsctl_Init(ModuleInfo *modinfo), m_htm_Init(ModuleInfo *modinfo), m_chgname_Init(ModuleInfo *modinfo);
extern int m_message_Init(ModuleInfo *modinfo), m_whois_Init(ModuleInfo *modinfo), m_quit_Init(ModuleInfo *modinfo);
extern int m_kill_Init(ModuleInfo *modinfo), m_pingpong_Init(ModuleInfo *modinfo), m_oper_Init(ModuleInfo *modinfo);
extern int m_akill_Init(ModuleInfo *modinfo), m_rakill_Init(ModuleInfo *modinfo);
extern int m_akill_Init(ModuleInfo *modinfo), m_rakill_Init(ModuleInfo *modinfo), m_userip_Init(ModuleInfo *modinfo);
extern int m_unzline_Init(ModuleInfo *modinfo), m_unkline_Init(ModuleInfo *modinfo);
extern int m_sqline_Init(ModuleInfo *modinfo), m_unsqline_Init(ModuleInfo *modinfo), m_tkl_Init(ModuleInfo *modinfo);
extern int m_vhost_Init(ModuleInfo *modinfo), m_cycle_Init(ModuleInfo *modinfo), m_svsjoin_Init(ModuleInfo *modinfo);
@@ -111,7 +113,12 @@ extern int m_map_Init(ModuleInfo *modinfo), m_eos_Init(ModuleInfo *modinfo);
extern int m_server_Init(ModuleInfo *modinfo), m_stats_Init(ModuleInfo *modinfo);
extern int m_svsfline_Init(ModuleInfo *modinfo), m_undccdeny_Init(ModuleInfo *modinfo);
extern int m_dccdeny_Init(ModuleInfo *modinfo), m_whowas_Init(ModuleInfo *modinfo);
extern int m_connect_Init(ModuleInfo *modinfo);
extern int m_connect_Init(ModuleInfo *modinfo), m_dccallow_Init(ModuleInfo *modinfo);
extern int m_nick_Init(ModuleInfo *modinfo), m_user_Init(ModuleInfo *modinfo);
extern int m_mode_Init(ModuleInfo *modinfo), m_watch_Init(ModuleInfo *modinfo);
extern int m_part_Init(ModuleInfo *modinfo), m_join_Init(ModuleInfo *modinfo);
extern int m_motd_Init(ModuleInfo *modinfo), m_opermotd_Init(ModuleInfo *modinfo);
extern int m_botmotd_Init(ModuleInfo *modinfo), m_lusers_Init(ModuleInfo *modinfo);
#ifdef GUEST
extern int m_guest_Init(ModuleInfo *modinfo);
#endif
@@ -126,7 +133,7 @@ extern int m_lag_Load(int module_load), m_rping_Load(int module_load), m_sendumo
extern int m_tsctl_Load(int module_load), m_htm_Load(int module_load), m_chgname_Load(int module_load);
extern int m_message_Load(int module_load), m_whois_Load(int module_load), m_quit_Load(int module_load);
extern int m_kill_Load(int module_load), m_pingpong_Load(int module_load), m_oper_Load(int module_load);
extern int m_akill_Load(int module_load), m_rakill_Load(int module_load);
extern int m_akill_Load(int module_load), m_rakill_Load(int module_load), m_userip_Load(int unused);
extern int m_unzline_Load(int module_load), m_unkline_Load(int module_load);
extern int m_sqline_Load(int module_load), m_unsqline_Load(int module_load), m_tkl_Load(int module_load);
extern int m_vhost_Load(int module_load), m_cycle_Load(int module_load), m_svsjoin_Load(int module_load);
@@ -153,7 +160,12 @@ extern int m_map_Load(int module_load), m_eos_Load(int module_load);
extern int m_server_Load(int module_load), m_stats_Load(int module_load);
extern int m_svsfline_Load(int module_load), m_undccdeny_Load(int module_load);
extern int m_dccdeny_Load(int module_load), m_whowas_Load(int module_load);
extern int m_connect_Load(int module_load);
extern int m_connect_Load(int module_load), m_dccallow_Load(int module_load);
extern int m_nick_Load(int module_load), m_user_Load(int module_load);
extern int m_mode_Load(int module_load), m_watch_Load(int module_load);
extern int m_part_Load(int module_load), m_join_Load(int module_load);
extern int m_motd_Load(int module_load), m_opermotd_Load(int module_load);
extern int m_botmotd_Load(int module_load), m_lusers_Load(int module_load);
#ifdef GUEST
extern int m_guest_Load(int module_load);
#endif
@@ -166,7 +178,7 @@ extern int m_adminchat_Unload(), m_nachat_Unload(), m_lag_Unload(), m_rping_Unlo
extern int m_sendumode_Unload(), m_tsctl_Unload(), m_htm_Unload(), m_chgname_Unload();
extern int m_message_Unload(), m_whois_Unload(), m_quit_Unload(), m_kill_Unload();
extern int m_pingpong_Unload(), m_oper_Unload(), m_akill_Unload(), m_rakill_Unload();
extern int m_unzline_Unload(), m_unkline_Unload();
extern int m_unzline_Unload(), m_unkline_Unload(), m_userip_Unload();
extern int m_sqline_Unload(), m_unsqline_Unload(), m_tkl_Unload(), m_vhost_Unload();
extern int m_cycle_Unload(), m_svsjoin_Unload(), m_svspart_Unload(), m_svslusers_Unload();
extern int m_svswatch_Unload(), m_svssilence_Unload(), m_svskill_Unload();
@@ -184,7 +196,11 @@ extern int m_netinfo_Unload(), m_links_Unload(), m_help_Unload();
extern int m_rules_Unload(), m_close_Unload(), m_map_Unload();
extern int m_eos_Unload(), m_server_Unload(), m_stats_Unload();
extern int m_svsfline_Unload(), m_dccdeny_Unload(), m_undccdeny_Unload();
extern int m_whowas_Unload(), m_connect_Unload();
extern int m_whowas_Unload(), m_connect_Unload(), m_dccallow_Unload();
extern int m_nick_Unload(), m_user_Unload(), m_mode_Unload();
extern int m_watch_Unload(), m_part_Unload(), m_join_Unload();
extern int m_motd_Unload(), m_opermotd_Unload(), m_botmotd_Unload();
extern int m_lusers_Unload();
#ifdef GUEST
extern int m_guest_Unload();
#endif
@@ -198,8 +214,13 @@ int l_commands_Test(ModuleInfo *modinfo)
#ifdef SCAN_API
Module p;
#endif
MARK_AS_OFFICIAL_MODULE(modinfo);
ModCmdsInfo = modinfo;
m_htm_Test(ModCmdsInfo);
m_join_Test(ModCmdsInfo);
m_mode_Test(ModCmdsInfo);
m_nick_Test(ModCmdsInfo);
m_tkl_Test(ModCmdsInfo);
return MOD_SUCCESS;
}
@@ -305,6 +326,18 @@ int l_commands_Init(ModuleInfo *modinfo)
m_undccdeny_Init(ModCmdsInfo);
m_whowas_Init(ModCmdsInfo);
m_connect_Init(ModCmdsInfo);
m_dccallow_Init(ModCmdsInfo);
m_userip_Init(ModCmdsInfo);
m_nick_Init(ModCmdsInfo);
m_user_Init(ModCmdsInfo);
m_mode_Init(ModCmdsInfo);
m_watch_Init(ModCmdsInfo);
m_part_Init(ModCmdsInfo);
m_join_Init(ModCmdsInfo);
m_motd_Init(ModCmdsInfo);
m_opermotd_Init(ModCmdsInfo);
m_botmotd_Init(ModCmdsInfo);
m_lusers_Init(ModCmdsInfo);
#ifdef GUEST
m_guest_Init(ModCmdsInfo);
#endif
@@ -404,6 +437,18 @@ int l_commands_Load(int module_load)
m_undccdeny_Load(module_load);
m_whowas_Load(module_load);
m_connect_Load(module_load);
m_dccallow_Load(module_load);
m_userip_Load(module_load);
m_nick_Load(module_load);
m_user_Load(module_load);
m_mode_Load(module_load);
m_watch_Load(module_load);
m_part_Load(module_load);
m_join_Load(module_load);
m_motd_Load(module_load);
m_opermotd_Load(module_load);
m_botmotd_Load(module_load);
m_lusers_Load(module_load);
#ifdef GUEST
m_guest_Load(module_load);
#endif
@@ -503,6 +548,18 @@ int l_commands_Unload(int module_unload)
m_undccdeny_Unload();
m_whowas_Unload();
m_connect_Unload();
m_dccallow_Unload();
m_userip_Unload();
m_nick_Unload();
m_user_Unload();
m_mode_Unload();
m_watch_Unload();
m_part_Unload();
m_join_Unload();
m_motd_Unload();
m_opermotd_Unload();
m_botmotd_Unload();
m_lusers_Unload();
#ifdef GUEST
m_guest_Unload();
#endif
+1 -1
View File
@@ -91,7 +91,7 @@ DLLFUNC CMD_FUNC(m_addline)
char *text;
text = parc > 1 ? parv[1] : NULL;
if (!(IsAdmin(sptr) || IsCoAdmin(sptr)))
if (!MyClient(sptr) || !IsAnOper(sptr) || !OPCanAddline(sptr))
{
sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, parv[0]);
return 0;

Some files were not shown because too many files have changed in this diff Show More