Compare commits

..

1351 Commits

Author SHA1 Message Date
Sam Dodrill a99df1c02c do another go of rb_.*printf removal 2014-12-15 21:07:22 -08:00
Sam Dodrill 1ac5b0570e replace rb_snprintf with system snprintf 2014-12-15 20:39:52 -08:00
Sam Dodrill 63a50eaabc naiive s/rb_sprintf/sprintf/g 2014-12-15 20:34:55 -08:00
Sam Dodrill ee03711af4 Merge pull request #34 from Elemental-IRCd/staging/6.6.1
Elemental-IRCd 6.6.1
2014-12-13 15:59:15 -08:00
Sam Dodrill e862c03515 src/newconf: add ability to disable UMODE_HIDECHANS
As requested by a staff member of an IRC network using elemental.
2014-12-10 14:33:25 -08:00
Sam Dodrill 7cfa92c570 Elemental-IRCd 6.6.1 2014-12-08 09:21:04 -08:00
Sam Dodrill eda8b64bd6 Manually merge feat/show-ip-on-iline-cloak
Conflicts:
    src/s_user.c

Spoofed host IP addresses are now broadcast.

This is 2014, we are not EFNet.
2014-12-08 09:18:30 -08:00
Sam Dodrill 8ea110ad78 Merge pull request #35 from KJCracks/master
Fixed Anope protocol module
2014-12-06 10:23:51 -08:00
Terence Tan 79a3bf79ae Update elemental-ircd.cpp 2014-12-06 20:13:37 +08:00
Sam Dodrill 05b16194a3 Merge pull request #22 from Hamcha/master
Allow compilation for targets without EGD (ie LibreSSL)
2014-11-21 04:30:48 +00:00
Sam Dodrill cf6fdf5e76 Merge pull request #32 from Elemental-IRCd/fix/chmode/separate-length-limits
src/chmode: treat invex/ban/quiet/exception discretely
2014-11-21 04:30:29 +00:00
Sam Dodrill 5ba9c76d22 src/chmode: treat invex/ban/quiet/exception discretely
Also prevents unneeded O(n) check of all kinds of list-bans to see if
the list has overflowed and prevents hard-coding of list-like channel
modes in the daemon to allow for future expansion.
2014-10-27 16:07:27 -07:00
Hamcha dd021e6449 Fallback only if EGD is selected 2014-10-12 01:05:06 +02:00
Hamcha bd91ef662b Fixed conding style (tab->spaces) 2014-10-12 01:02:17 +02:00
Sam Dodrill 219934c7ce Add lvimrc to automatically format code to the desired style
Users of other editors are encouraged to do something similar to this.
2014-09-16 20:27:24 -07:00
Sam Dodrill 1bb06bb3d0 Merge pull request #29 from Elemental-IRCd/doc/contributing
CONTRIBUTING: clarify style requirements
2014-09-15 15:47:16 -07:00
Sam Dodrill cb1ff884a1 CONTRIBUTING: clarify style requirements 2014-09-15 14:26:14 -07:00
Sam Dodrill bfac4f3498 Dockerfile: make docker image thinner 2014-09-08 10:58:01 -07:00
Sam Dodrill 095d9fdd1a Dockerfile: change to use deis/init 2014-08-09 21:54:07 -07:00
Apple Dash 7d3966bc9b m_away: Fix potential weird behavior with an empty return 2014-08-09 18:53:18 -04:00
Hamcha b1bd65b6ab Fix conflicts with PR #24
Conflicts:
	libratbox/src/openssl.c
2014-08-08 14:10:34 +02:00
Sam Dodrill 46bf689e52 Merge pull request #23 from Elemental-IRCd/chore/contributing-document
Add contirbution guidelines
2014-08-06 18:14:04 -07:00
Sam Dodrill 22db314d25 Merge pull request #24 from Elemental-IRCd/chore/restyle-code
Change all code to a consistent style
2014-08-06 18:13:29 -07:00
Sam Dodrill 9890a48cd9 Change all code to a consistent style
We use the Linux Kernel format now.
2014-08-03 10:38:55 -07:00
Sam Dodrill 4c0924c242 Add contirbution guidelines 2014-08-03 09:57:53 -07:00
Hamcha 0cea0c17d2 Allow compilation for targets without EGD (ie LibreSSL) 2014-08-03 12:30:51 +02:00
Sam Dodrill 027b2310ca Add irc notifications for travis 2014-08-02 22:35:57 -07:00
Sam Dodrill 923cda96ff Add travis support 2014-08-02 22:25:37 -07:00
Sam Dodrill 13221ce579 Merge pull request #21 from Elemental-IRCd/feat/dockerfile
Add Dockerfile
2014-08-02 22:05:50 -07:00
Sam Dodrill 379a56e808 Add Dockerfile
This is so people can base their projects on elemental-ircd.
2014-08-02 22:02:59 -07:00
Sam Dodrill e12b8a2631 Elemental-IRCd 6.6 2014-08-01 18:27:50 -07:00
Sam Dodrill 4810e6a8d4 Merge branch 'staging/elemental-6.6' 2014-08-01 18:24:31 -07:00
Jilles Tjoelker 0ae1f793d9 libratbox: Fix undefined behaviour advancing pointer beyond end of array.
The C standard does not allow constructing pointers beyond one past the end
of an array. Therefore, if size is an unsigned type (size_t), then
buf + size is never less than buf.

Clang on 32-bit took advantage of the undefined behaviour, causing
segfaults.

(cherry picked from commit fab79c5d25423884fc4f5e0a56d97cb59b618196)
2014-08-01 18:23:59 -07:00
Rylee Fowler e0489d0eec atheme module: remove trailing whitespace 2014-08-01 18:23:59 -07:00
AppleDash 4d07bf5c59 ./Config: Remove unneeded code and handle ^D 2014-08-01 18:23:58 -07:00
AppleDash 47130005ae ./Config: Somewhat rewrote script, improved nicklen prompting and interrupt handling. 2014-08-01 18:23:58 -07:00
Rylee Fowler 26005c6f48 fix spelling typo (s/propegate/propagate/g) 2014-08-01 18:23:58 -07:00
Sam Dodrill 6a55b37bd9 example conf: add tor blacklist 2014-08-01 18:23:58 -07:00
Apple Dash e05337fa2e include/cache.h: Add support for bigmatix. 2014-08-01 18:23:58 -07:00
Sam Dodrill 3c7006c286 example conf: add tor blacklist 2014-06-11 11:44:20 -07:00
Sam Dodrill fb096745d8 Fix autotools build system 2014-06-09 16:10:15 -07:00
Sam Dodrill fdd6c2721a Merge pull request #10 from AppleDash/master
include/cache.h: Add support for wider motds
2014-06-02 07:40:24 -07:00
Apple Dash 263bc51300 include/cache.h: Add support for bigmatix. 2014-06-02 10:35:51 -04:00
Sam Dodrill 990a42b71b Staging for Elemental-IRCd 6.6 release 2014-06-01 16:09:24 -07:00
Sam Dodrill 19d656a29b Fix buffer overflow in introduce_client and burst_TS6
If the client being introduced has more than 10 user modes send_umode()
will overflow ubuf

tracks Adam-/charybdis@9744d53ec9
2014-06-01 15:59:00 -07:00
Sam Dodrill d726cc83a2 Add UMODE +I to hide channels in WHOIS line
Does not hide channels from IRC operators.
2014-06-01 15:52:10 -07:00
Sam Dodrill 8036a22c25 Show remote server IP addresses 2014-06-01 15:20:37 -07:00
Sam Dodrill 050ea2b809 Add channel mode +u to hide banlists
Banlists are silently hidden from all non-halfops or up. Bans still may
be seen as normally. This mode is entirely opt-in.
2014-05-28 19:36:14 -07:00
Sam Dodrill 9a90d0d80e src/s_user: Prevent desync of clients on CHGHOST 2014-04-29 13:18:39 -07:00
Sam Dodrill 2a8868cfe3 tools/genssl: Make certificates last for 3560 days 2014-04-22 12:22:33 -07:00
Andrew Cook b781b52396 stringops: Don't strip unicode in strip_unprintable 2014-04-22 12:15:25 -07:00
Sam Dodrill 02b334ff8f Fix extended-join for remote and fakequit users 2014-04-22 11:38:17 -07:00
Sam Dodrill ae6e4d3352 Config: Remove clear call 2014-04-22 10:16:24 -07:00
Sam Dodrill 6ccb7036db Config script: Disallow turning off SSL
There is no good reason SSL should ever be disabled.
2014-04-16 11:12:29 -07:00
Sam Dodrill f31302d01d Merge branch 'configure-script' 2014-04-15 10:42:17 -07:00
Sam Dodrill 685eed838a README: Update README 2014-04-15 10:40:12 -07:00
Sam Dodrill d23dc975b3 TODO: Update for 6.5.2 2014-04-15 10:28:54 -07:00
Sam Dodrill 4d941d3f49 modules/m_post: Remove snotes
Change made to track upstream
2014-04-12 07:28:41 -07:00
Sam Dodrill 53c7dba717 example confs: Remove AHBL blacklists, which are no longer available. 2014-04-11 11:16:59 -07:00
Sam Dodrill 0953068ef0 m_part: Add quotes around part reason
This is a practice already used by some networks including freenode. It
makes it possible to distinguish user part messages and forced parts
such as /remove.

ref: atheme/charybdis@a0b4a9216d
2014-04-11 11:13:00 -07:00
Sam Dodrill f5945c6972 modules/core/m_message: Flood notices now global
To ease centralized management.
2014-04-10 20:29:11 -07:00
Sam Dodrill a5e296e4eb modules/m_sasl: sasl: fix regression introduced by sasl <-> auth_user integration.
This fixes the null-dereference reported on full-disclosure [1].  A
corrected analysis of the issue
follows below:

When SASL authentication completes, and auth_user is requested,
client_p->user may be NULL. Thusly accessing fields of client_p->user
may cause a null dereference. In these cases, aborting SASL auth
early is a correct interpretation of the IRCv3.1 specification.  The
code must handle this situation, which this commit corrects.

[1]: http://seclists.org/fulldisclosure/2014/Mar/320
2014-03-23 13:57:49 -07:00
Sam Dodrill 1bd7b59879 clicaps: Disable away-notify for now 2014-03-20 07:42:29 -07:00
Sam Dodrill 3a8780867a modules/m_sasl: Emergency patch for m_sasl. Details on full-disclosure 2014-03-17 11:02:55 -07:00
Sam Dodrill be813f8605 src/channel: fix possible null reference in joining 2014-03-09 15:42:07 -07:00
Sam Dodrill c649e42ae9 extensions/m_roleplay: Transmit source name with message 2014-02-18 09:50:59 -08:00
Sam Dodrill a7a510a504 src/supported: add OWNER to 005 output 2014-02-18 08:50:25 -08:00
Sam Dodrill 174c8b49b1 Merge branch 'services-modules' 2014-02-14 19:32:13 -08:00
Sam Dodrill 0ebe9a5930 Merge branch 'purge-cruft' 2014-02-14 19:32:02 -08:00
Sam Dodrill eceffbca02 src/messages.tab: Make ERR_NOOPERHOST more generic 2014-02-14 19:28:40 -08:00
Sam Dodrill 06bfe138d2 modules/m_oper: Prevent password guessing
Change the message for an invalid OPER password to "No appropriate
operator blocks were found for your host".
2014-02-14 19:28:40 -08:00
Sam Dodrill 20b066f6f4 Add TODO for elemental-ircd 6.6 2014-02-02 08:54:48 -08:00
Sam Dodrill 8f1d057a36 Remove old files from the root and finish rebrand 2014-01-30 19:49:46 -08:00
Sam Dodrill 74289701af src/s_user: Add metadata for cloaked hostnames for use with services 2014-01-30 22:37:46 -05:00
Sam Dodrill 1a536989b2 extra: Add modules for services packages 2014-01-30 19:23:52 -08:00
Sam Dodrill 55147df5de src/s_user: Make UID assignment happen once we know it's a valid user 2014-01-29 21:14:09 -08:00
Sam Dodrill 40249913ca Config: Add prototype auto-configuration script 2014-01-26 10:27:59 -08:00
Sam Dodrill 177241882c Merge branch 'ircv3-metadata'
Allow support for the ircv3 metadata verbs while maintaining backwards
compatibility with the old ShadowIRCD verbs
2014-01-17 08:19:39 -08:00
Sam Dodrill ba15f6d690 Merge branch 'fix-non-qs-ts6' 2014-01-17 05:09:40 -08:00
Sam Dodrill d4ea7f897e Merge branch 'grammatical-errors' 2014-01-17 05:09:33 -08:00
Sam Dodrill a3da200088 Merge branch 'owners-immune' 2014-01-17 05:09:16 -08:00
Sam Dodrill 6faf3c2a45 src/client: Remove TS5 logic in the link protocol 2014-01-17 05:07:41 -08:00
Sam Dodrill 3bf316e2dc help: Fix some required oper privileges.
references atheme@charybdis/1de147abc5b145ea3b7c09128ee8d8fb19726ef4
2014-01-11 17:53:50 -08:00
Sam Dodrill 2e1fbf8292 extensions/chm_sslonly: Fix grammatical error
References atheme@charybdis/46b55df60bfbb1d9fa640a819ba270d708e3d2b0
2014-01-11 17:51:36 -08:00
Sam Dodrill c03f7b30c4 bandb: Don't attempt to write to a NULL helper.
Though without a bandb binary your installation is completely screwed.

References atheme@charybdis/c8729b08fb171d80030155c638a65aff93cb1a45
2014-01-11 17:49:21 -08:00
Sam Dodrill 80b3a83cbf src/channel: Fix ordering in kick permission logic 2014-01-10 18:16:08 -08:00
Sam Dodrill 3cfbe05aff Bump up SSL cert generation strength 2014-01-01 04:03:45 -08:00
Sam Dodrill 2f35248278 modules/m_whois: Allow clients to see their own umodes when whoising themselves 2013-12-27 09:32:49 -08:00
Sam Dodrill 0785419045 Remove autojoin_opers
It was broken by the away-notify patch and fixing it is more work than
the feature is useful.
2013-12-26 15:08:55 -08:00
Sam Dodrill 755b88c783 Revert autojoin_opers patch
It causes interesting desyncs of account names when run for more than 2
weeks

Revert "channel: refactor fe3c1c828e and fix surrounding indentation"

This reverts commit 27b08207de.

Revert "src/channel: Fix for autojoin_opers segfault"

This reverts commit 8e1c8b7543.
2013-12-26 15:05:15 -08:00
Sam Dodrill 8bff90d496 modules/core/m_metadata: Re-add support for the old metadata verbs and document the old metadata system. 2013-11-24 14:22:51 -08:00
Sam Dodrill 5810ebb18f modules/code/m_metadata: Changed to conform to IRCv3 command spec 2013-11-24 14:11:00 -08:00
Sam Dodrill be2a7a772c src/messages: Fix reply for STATS o
It previously replied as STATS O. A purely cosmetic fix.
2013-11-24 12:18:17 -08:00
Sam Dodrill b68f994db0 Merge pull request #41 from ariscop/docfix
help/cmode: Document 10 character minimum on +G
2013-11-23 17:23:00 -08:00
Andrew Cook 08879082d1 help/cmode: Document 10 character minimum on +G 2013-11-24 12:08:51 +11:00
Kyle Johnson 77e149bf8b Merge pull request #35 from lyska/remove-old-flags-from-help
help/opers: Remove the old privs and replace with the new system
2013-11-16 11:37:53 -08:00
Kyle Jonhson 27b08207de channel: refactor fe3c1c828e and fix surrounding indentation 2013-11-15 05:00:40 +00:00
Sam Dodrill 399b710cad help/opers: Remove the old privs and replace with the new system 2013-11-14 22:24:31 -05:00
Kyle Jonhson 502490b13a readme: oxford comma... 2013-11-15 02:59:00 +00:00
Kyle Johnson f9b84f1a58 Merge pull request #33 from lyska/fix-my-name
CREDITS: Update contributor nick, change spacing, update URLs
2013-11-14 18:27:27 -08:00
Sam Dodrill 4939f6ee97 CREDITS: Update my nick, change spacing
Changes my nickname to lyska.

Fixes a minor pet peeve on /INFO and accurately shows #rainbow-factory
as the channel for elemental-ircd.

Add my nickname to list of people to ask on IRC in `README.md`
2013-11-14 21:14:05 -05:00
Kyle Johnson d64bf25497 Merge pull request #31 from lyska/m_post-snomask
modules/m_post: Fix s2s message framing issue
2013-11-12 19:25:02 -08:00
Kyle Johnson 9d97f23c96 Merge pull request #28 from lyska/rejigger-help
help: denote that owner, admin and halfops can be disabled in the config
2013-11-12 18:54:01 -08:00
Kyle Johnson 14ed0de487 Merge pull request #27 from lyska/elemental-protocol-deviations
[Documentation] doc/technical/elemental-deviation: new doc file
2013-11-12 18:53:09 -08:00
Sam Dodrill 31b7c1031a modules/m_post: Fix s2s message framing issue 2013-11-11 21:14:19 -05:00
Sam Dodrill fd552b946a doc/technical/elemental-deviation: Add information about elemental's use of global SNOMASKs 2013-11-11 21:02:45 -05:00
Sam Dodrill 4e6a065e62 help: denote that owner, admin and halfops can be disabled in the config 2013-11-10 00:24:53 -05:00
Sam Dodrill 6da1d031e8 doc/technical/elemental-deviation: new doc file
Document protocol changes between vanilla TS6 and Elemental-ircd TS6.
The changes are very minimal and will not likely affect day to day
performance of the IRC daemon, but are still worth mentioning.
2013-11-09 21:22:12 -05:00
Kyle Johnson fe3c1c828e Merge pull request #26 from Niichan/fix-autojoin-opers
src/channel: Fix for autojoin_opers segfault
2013-11-08 23:37:47 -08:00
Sam Dodrill 8e1c8b7543 src/channel: Fix for autojoin_opers segfault 2013-11-07 11:39:43 -08:00
Kyle Johnson 6f979b5e43 Merge pull request #23 from Niichan/help-spellcheck
Fix many typos, spelling and grammatical errors in the helpfiles
2013-11-05 19:06:56 -08:00
Sam Dodrill a95cbf8021 help/opers/c[primsg|notice]: +v
Remember, remember!
    The fifth of November,
    The Gunpowder treason and plot;
    I know of no reason
    Why the Gunpowder treason
    Should ever be forgot!
    Guy Fawkes and his companions
    Did the scheme contrive,
    To blow the King and Parliament
    All up alive.
    Threescore barrels, laid below,
    To prove old England's overthrow.
    But, by God's providence, him they catch,
    With a dark lantern, lighting a match!
    A stick and a stake
    For King James's sake!
    If you won't give me one,
    I'll take two,
    The better for me,
    And the worse for you.
    A rope, a rope, to hang the Pope,
    A penn'orth of cheese to choke him,
    A pint of beer to wash it down,
    And a jolly good fire to burn him.
    Holloa, boys! holloa, boys! make the bells ring!
    Holloa, boys! holloa boys! God save the King!
    Hip, hip, hooor-r-r-ray!
2013-11-05 19:03:27 -08:00
Sam Dodrill e789385552 help: add Oxford comma to some lists 2013-11-05 18:31:51 -08:00
Sam Dodrill a37b75466f help: re-orgainize some things 2013-11-05 18:29:09 -08:00
Sam Dodrill 57d74e150e Fix many typos, spelling and grammatical errors in the helpfiles 2013-11-05 18:05:09 -08:00
Kyle Johnson 86a53b8ed7 Merge pull request #21 from Niichan/master
help/cmode: add documentation on channel owner mode +y
2013-11-05 16:32:27 -08:00
Sam Dodrill dc6bed417c help/opers/cmode: fix small typo 2013-11-05 16:26:07 -08:00
Sam Dodrill 94d6de727e help/cmode: add documentation on channel owner mode +y 2013-11-05 16:17:29 -08:00
Alex Iadicicco 68afaf72ac Rename to elemental-ircd 2013-10-28 18:12:38 -07:00
Sam Dodrill 98fd1d5c44 ponychat-ircd 6.5.1 2013-10-10 11:02:22 -07:00
Sam Dodrill 2cfa339185 Explicitly allow channel admins to kick eachother 2013-10-10 10:55:42 -07:00
Sam Dodrill 203ace2494 ponychat-ircd 6.5 2013-10-10 09:54:50 -07:00
Sam Dodrill 7abfc13b92 Send away-notify on host change fake quit 2013-10-10 09:53:39 -07:00
Sam Dodrill 8a3ac022ae ponychat-ircd-6.5-rc2 2013-10-09 22:30:08 -07:00
Sam Dodrill 6e14174c95 Disallow non-channel ops from kicking users 2013-10-09 13:13:51 -07:00
Sam Dodrill de06cf5102 ponychat-ircd 6.5-rc 2013-10-08 13:07:23 -07:00
Sam Dodrill ccf057bdd7 Revert "Nickname changes are a global SNOTE"
This reverts commit 3efbe7d9fa.
2013-10-08 11:22:56 -07:00
Sam Dodrill 3efbe7d9fa Nickname changes are a global SNOTE 2013-10-08 10:16:52 -07:00
Sam Dodrill ffebe5d876 SASLFAIL SNOMASK is now global 2013-10-06 21:36:42 -07:00
Sam Dodrill b98962e306 modules/m_post: remote rejection snote for HTTP proxies 2013-10-06 20:06:17 -07:00
Sam Dodrill 763e5c24b1 Revert "More spacing on a burst SJOIN"
Adding more spacing made it worse, revert.

This reverts commit 1ce8db9135.
2013-10-06 19:36:21 -07:00
Sam Dodrill 1ce8db9135 More spacing on a burst SJOIN 2013-10-06 19:25:19 -07:00
Sam Dodrill 5a6a3ec287 Fix spacing on SJOIN 2013-10-06 19:14:48 -07:00
Sam Dodrill afe4cb9104 Support ipv6 DNS blacklists
atheme/charybdis@0a1e77c27c
2013-10-06 07:53:17 -07:00
Sam Dodrill 143fdd4069 update CREDITS 2013-10-06 07:30:54 -07:00
Sam Dodrill 407504902e Remove CHARSET=ascii from ISUPPORT
Merge of atheme/charybdis@e1a9785abe
2013-10-05 15:03:07 -07:00
Sam Dodrill 2fad91d915 More fixes for owner mode 2013-10-04 21:40:54 -07:00
Sam Dodrill 0814442111 away-notify and away rate limiting added
Referenced:

atheme/charybdis@c5bbc60375 : Add
away-notify client capability.
atheme/charybdis@d42e6915cf : Pace aways.
atheme/charybdis@725403fd7f : Don't end
the flood grace period with the first AWAY.
atheme/charybdis@dc0fd46236 : Ensure AWAY
pacing only affects local clients.
2013-10-04 21:32:00 -07:00
Sam Dodrill ef6e8564e0 Merge branch 'ircd-spit-unreadable-config' into devel 2013-09-29 05:40:31 -07:00
Sam Dodrill 1659d99bac Merge error notice on unreadable config file
This fix will help with initial setup among other things
2013-09-29 05:38:54 -07:00
Sam Dodrill 0d45b7860f Merge account-notify and extended-join client capabilities 2013-09-29 05:24:52 -07:00
Sam Dodrill bb0a7536e3 Merge branch 'failed-sasl-snomask' into devel 2013-09-28 20:52:08 -07:00
Sam Dodrill 61fe2694df Merge branch 'defer-accept' into devel 2013-09-28 20:49:47 -07:00
Sam Dodrill c141ed9307 Add defer_accept option to enable TCP_DEFER_ACCEPT
Merge: 6fb5e9636fa1fffc62e86561e7dcd734fa2ee53f

Add defer_accept option to enable TCP_DEFER_ACCEPT
Charybdis commits referenced:

atheme/charybdis@77cb59b
    libratbox: add support for TCP_DEFER_ACCEPT on linux

atheme/charybdis@aa4737a
    libratbox: make defer_accept optional.

atheme/charybdis@02270e9
    Add listen::defer_accept option for controlling usage
    of TCP_DEFER_ACCEPT option.

atheme/charybdis@797a29f
    libratbox: Allow defer_accept on FreeBSD.
2013-09-28 20:47:02 -07:00
Sam Dodrill 3ed02190ef Merge branch 'owner-mode' into devel 2013-09-28 20:39:55 -07:00
Sam Dodrill 38b53c2d0e Merge branch 'devel' of github.com:PonyChat/ponychat-ircd into devel 2013-09-17 18:31:11 -07:00
Sam Dodrill 7f45233243 libratbox/openssl: Fix possible memory leak of certificate fingerprints 2013-09-17 18:26:12 -07:00
Sam Dodrill 1d878cec57 Documentation on +M clarified in helpfile and module source code 2013-09-17 18:26:12 -07:00
Sam Dodrill b4bbdf7046 help/monitor: New helpfile 2013-09-17 18:26:12 -07:00
Sam Dodrill 355088a0ef Merge branch 'documentation-fixes' into devel 2013-09-17 18:25:41 -07:00
Sam Dodrill 9302fb31b4 Update gitignore, remove cruft 2013-09-17 18:25:08 -07:00
Sam Dodrill f0b84afaba src/s_user: DNSBL hits are now global snomasks
Previously server notices for DNSBL hits only were locally broadcast. Now they are globally broadcast under SNOMASK r.
2013-09-17 18:24:50 -07:00
Sam Dodrill 25e7c22891 m_nick: Reject nicks with '~' in them, rather than cutting at the '~'
Merge of commit da2fc2cbdec471b516a2aa56ed9f3513da8df87c in master

The behavior of cutting at the first '~' is confusing at first, and
looks too much like a bug.

atheme/charybdis@96b89dce38
2013-09-17 17:43:52 -07:00
Sam Dodrill 5efee8cc5e Update gitignore, remove cruft
Add OSX debug symbols to gitignore

Remove libratbox version file, it is automatically generated
2013-09-17 17:43:18 -07:00
Sam Dodrill 2681b86df2 Added snotes for failed SASL authentication attempts if need_sasl flag is set
Many thanks to Shockk for this patch.

References commits:
 - 15dc12b76e76c6fa2ead773b6b40965223ad453f - Added snotes for failed SASL authentication attempts if need_sasl flag is set.
 - febd2e2aca27f7f1acfc522f3fda65d8be067edc - Updated help/opers/snomask to add +S snomask.
2013-09-15 21:33:10 -07:00
Sam Dodrill 9e58efb6bc Add OSX debug symbols to gitignore 2013-09-15 21:31:10 -07:00
Sam Dodrill 172deacb06 Finalize behavor of channel admins
Channel admins are able to kick channel admins
2013-09-13 19:52:30 -07:00
Sam Dodrill df8e2d39e7 Fix desync when using OJOIN as channel founder 2013-09-13 17:07:58 -07:00
Sam Dodrill 7a2349e318 Update gitignore, remove cruft 2013-09-13 11:52:04 -07:00
Sam Dodrill aa294a3a54 Support for channel owner mode added
This is a lot like the previous channel owner mode patch, except the
documentation that previously said "admin" now says "owner" in comments.

src/channel: Kicking logic for owner mode fixed

src/channel: Document the kick/deop logic

decruft: remove temporary files
2013-09-13 11:45:38 -07:00
Sam Dodrill 8c2b9a6e59 Add Markdown README 2013-09-09 18:21:24 -07:00
Sam Dodrill 8b35db4b07 ponychat-ircd 6.3.4 2013-09-09 17:37:03 -07:00
Sam Dodrill 6b71e3f0f4 change oper-up message 2013-09-09 17:34:47 -07:00
Sam Dodrill 0562fb7791 rebrand as ponychat-ircd 2013-09-09 17:27:17 -07:00
Sam Dodrill 3189f0761b Merge commit a4db1558bf2b5ca931bd89e4507505a61df06738
Work around a bug in GCC's loop optimization.

Or maybe it's undefined behavior in our C. Or maybe both. Either way,
it wasn't broken before, and now it is. So this fixes it.
2013-09-09 17:23:34 -07:00
JD Horelick 2b9892978e ShadowIRCd 6.3.3 2012-12-31 17:36:11 -05:00
JD Horelick f4e99df0e9 Revert "Initial, prospective NEWS for ShadowIRCd 6.4.0"
This reverts commit 465f81c3fc.
2012-12-31 17:31:11 -05:00
BGreenham 8a42fb85b2 Merge pull request #6 from Joah/master
Port m_capab Crash Exploit Fix from charybdis
2012-12-31 11:51:11 -08:00
Joah 806af85d26 Ported m_capab Crash Exploit Fix from charybdis
Ported the fix from charybdis to ShadowIRCd.
2012-12-31 14:49:19 -05:00
Jeff Horelick 5585d1fa16 Merge pull request #5 from Joah/master
Port OpenVZ/epoll Fix From charybdis
2012-11-20 15:32:38 -08:00
Joah d6e3e1cbbe Port OpenVZ/epoll Fix From charybdis
Ported the epoll fix to allow ShadowIRCd to work on OpenVZ VPSes from atheme/charybdis.
2012-11-20 03:15:54 -05:00
Jeff Horelick 5cd204c3ef Add reference.charybdis.conf that is basically the charybdis defaults so people who want just one shadowircd feature can have it 2012-10-17 11:08:49 -04:00
Jeff Horelick f6dbc81c8f Merge pull request #4 from Joah/master
[Fixed] Merge ip_cloaking* Fixes from charybdis
2012-10-12 09:29:51 -07:00
Joah abd9b88621 Merge charybdis Cloaking Module
Fix extensions/ip_cloaking not correctly telling the net about your changed hostname (from dwfreed/charybdis).
2012-10-11 23:17:09 -03:00
Jeff Horelick 465f81c3fc Initial, prospective NEWS for ShadowIRCd 6.4.0 2012-10-11 12:23:09 -04:00
Jeff Horelick 926e7dc884 Merge pull request #1 from dbdii407/patch-1
Update libratbox/src/sigio.c
2012-10-11 08:50:58 -07:00
David Dixon II 336c99f71f Update libratbox/src/sigio.c
This needs to be changed. Originally done here: a85566b151
2012-08-30 16:37:28 -03:00
JD Horelick a55d413fd6 ShadowIRCd 6.3.2.1 2012-03-02 23:30:24 -05:00
Nathan Phillip Brink f3f8978a44 Fix typo `User' => `Use'. 2012-03-02 23:18:42 -05:00
Nathan Phillip Brink ee269f46f5 Detect a potential infinite loop in ./configure in AC_DEFINE_DIR.
Fixes the changes made to AC_DEFINE_DIR in
c74836dc4a5bde1e0bf38da58053bf5f28da8ff5.
2012-03-02 23:18:35 -05:00
Nathan Phillip Brink 68ebdf7f1e Fix inconsistency between --sysconfdir and --with-confdir, deprecate --with-confdir.
The inconsistency was created in
c74836dc4a5bde1e0bf38da58053bf5f28da8ff5 where genssl.sh.in was made
to use sysconfdir while the IRCd and buildsystem still used confdir.
2012-03-02 23:18:27 -05:00
JD Horelick 5a0814763c ShadowIRCd 6.3.2 2012-02-29 23:27:08 -05:00
JD Horelick bf9bfd2696 run autoconf, autoheader and make depend 2012-02-29 23:18:57 -05:00
Nathan Phillip Brink 6bdef3d52f Fix bandb's interaction with --enable-fhs-paths by storing ban.db in the correct directory, pkglocalstatedir. 2012-02-29 23:17:12 -05:00
Nathan Phillip Brink e8da6ccee6 Add explicit support for being installed into a system triggered with --enable-fhs-paths.
Add two mechanism for avoiding name-collisions in a system-wide installation of charybdis. The ssld and bandb daemons, intended to be directly used by ircd and not the user, install into libexec when --enable-fhs-paths is set. For binaries which are meant to be in PATH (bindir), such as ircd and viconf, there is now an option --with-program-prefix=progprefix inspired by automake. If the user specifies --with-program-prefix=charybdis, the ircd binary is named charybdisircd when installed. Add support for saving the pidfile to a rundir and storing the ban database in localstatedir instead of in sysconfdir. This is, again, conditional on --enable-fhs-paths. Fix(?) genssl.sh to always write created SSL key/certificate/dh parameters to the sysconfdir specified during ./configure. The previous behavior was to assume that the user ran genssl.sh after ensuring that his current working directory was either sysconfdir or a sibling directory of sysconfdir.
2012-02-29 23:16:29 -05:00
Nathan Phillip Brink 9d8184bd87 Fix viconf's dependencies on setup.h and config.h. 2012-02-29 23:14:15 -05:00
Nathan Phillip Brink 7c41dea640 Do not unconditionally create a `help-old' folder during installation. 2012-02-29 23:14:12 -05:00
Nathan Phillip Brink e131a2ed68 During installation, don't unconditionally create an empty `modules-old' directory. 2012-02-29 23:14:09 -05:00
Nathan Phillip Brink c8e67ef406 Fix parallel compilation issue when building lexer/parser. 2012-02-29 23:14:07 -05:00
Nathan Phillip Brink 84cda210f0 Use LDFLAGS when compiling extensions or modules. 2012-02-29 23:14:04 -05:00
JD Horelick 040c2a5ba9 Fix handling of ACTIONs when chmode +G is set. 2012-02-28 15:12:33 -05:00
JD Horelick fce7a207b0 NEWS: Fix typo. 2012-02-28 15:10:49 -05:00
JD Horelick 81f2fde1b6 Fix makerelease.sh 2011-06-03 13:58:26 -04:00
JD Horelick b5135efc27 Bump version to 6.3.2 2011-05-24 20:47:06 -04:00
Tony Vroon c530343c91 makerelease.sh: Do things the git way; add a sanity check for release name. 2011-05-22 14:35:55 -04:00
JD Horelick 3d11239c22 Add .gitignore 2011-05-22 14:25:19 -04:00
JD Horelick 4859b814a5 We use Git now. Git is cool. Just like fezes. 2011-05-20 04:39:46 -04:00
JD Horelick 50ee317107 tools: Add helper scripts for WeeChat and XChat as well.
The irssi script is also renamed and now has OSET as well.
2011-05-15 19:02:09 -04:00
JD Horelick 1117974490 tools: Added shadow_help.pl. This is a simple irssi script that adds a OHELP command.
OHELP calls HELP so there's no conflict with in-client help and you do not have
to call HELP with /quote help.
2011-05-15 17:55:18 -04:00
JD Horelick 44d01be7cf Added tag shadowircd-6.3.1 for changeset 8f3ad8b98351 2011-05-15 14:49:15 -04:00
JD Horelick 83118989b9 ShadowIRCd 6.3.1 2011-05-15 14:49:03 -04:00
Jilles Tjoelker 3cc95ad818 Allow kick_on_split_riding to protect channels with mlocked keys.
Do kick_on_split_riding if services sends an SJOIN
with a lower TS and a different key. This relies on
services restoring TS (changets option in atheme) and
services not immediately parting after receiving the
KICK, which is the case in recent atheme.

For invite-only channels, still only do
kick_on_split_riding in netbursts. Services is
assumed to handle this itself (atheme does).
2011-04-06 19:05:08 +02:00
William Pitcock 9494478ea0 bantool: _XOPEN_SOURCE should die in a fire 2011-03-17 10:45:57 -05:00
Jilles Tjoelker 00d66a41f4 Style: use a consistent order for the _C constants. 2011-03-31 00:05:42 +02:00
Stephen Bennett f970f73c68 Disallow mIRC italics in channel names when disable_fake_channels 2011-03-30 11:30:47 +01:00
Jilles Tjoelker 8d5df4cb82 Cope with OPENSSL_VERSION_NUMBER not being a long.
Contrary to the documentation, this is the case on recent FreeBSD at least.
2011-03-20 18:46:32 +01:00
Stephen Bennett 3fa27fe787 Don't allow +Z to be set by default_umodes 2011-03-11 13:12:40 +00:00
Elizabeth Jennifer Myers d9c2579647 m_challenge: fix use of undefined behaviour.
GCC does what we expect, but other compilers could do just about anything.
2011-02-22 12:00:45 -05:00
JD Horelick 01a8417f75 When setting/unsetting cmode +M, only wallops once, not for every server on the network. 2011-05-15 14:01:07 -04:00
JD Horelick 3df8ab7a98 Added tag shadowircd-6.3.0 for changeset 031bedf7e340 2011-02-05 21:24:19 -05:00
JD Horelick 1c895dfbe1 ShadowIRCd 6.3.0 2011-02-05 21:24:08 -05:00
JD Horelick 6dec141a91 Regenerate libratbox configure. 2011-02-05 21:23:08 -05:00
Elizabeth Jennifer Myers d0c759a857 Add endian test to autoconf and convert crypt to use it. 2011-01-24 21:03:00 -05:00
Jilles Tjoelker 6cb47f18b5 Fix memory leak of operator certfp fields. 2011-01-25 00:39:07 +01:00
Elizabeth Jennifer Myers 6a00233824 newconf: fix a warning 2011-01-23 16:56:36 -05:00
Elizabeth Jennifer Myers fd999fad3a newconf: fix certificate fingerprint auth.
yy_oper->certfp was not copied into yy_tmpoper->certfp, thus the information was lost and certfp auth was never really working, since the string was always empty.
2011-01-23 16:12:32 -05:00
JD Horelick 696c935a4c When changing an oper's host, be sure that the mode value has enough room to hold +ah too. 2011-01-26 16:45:41 -05:00
JD Horelick 76db5f7dd4 Added tag shadowircd-6.3.0-RC1 for changeset 5d25c87c7895 2011-01-20 00:02:48 -05:00
JD Horelick ca7dc82d5b ShadowIRCd 6.3.0-RC1 2011-01-20 00:02:30 -05:00
JD Horelick a13221bcae Write a bit of Not The Nine O'Clock NEWS. :P 2011-01-20 00:01:50 -05:00
JD Horelick 2f24d19944 Fix some warnings. 2011-01-19 15:59:30 -05:00
Elizabeth Jennifer Myers 44e6a470d6 Add blowfish to libratbox crypt.
Also change u_int*_t to uint*_t whilst I'm here.
2011-01-17 05:01:11 -05:00
Jilles Tjoelker e9ced3de20 hunt_server: Disallow wildcarded nicknames.
Any hunted parameter with wildcards is now assumed
to be a server, never a user.

Reasons:
* fewer match() calls
* do not disclose existing nicknames
* more intuitive behaviour for CONNECT

m_trace has a copy of some hunt_server logic in it
(for the RPL_TRACELINK reply), so adjust that too.
2011-01-08 17:47:05 +01:00
Jilles Tjoelker 86044bd2d6 Fix compiler warnings. 2011-01-08 17:40:12 +01:00
Keith Buck f38f82ac36 Move list-related isupport items to the list module itself. 2011-01-06 00:40:08 -08:00
Elizabeth Jennifer Myers 565b527019 Make SHA512 the default for mkpasswd again, as SHA512 support is guaranteed to *always* be in libratbox. 2011-01-06 01:56:47 -05:00
Elizabeth Jennifer Myers 28545c3683 Overhaul extensions/m_mkpasswd. It now allows SHA256/SHA512 hashes. DES support is removed, as it is insecure and can be broken on my desktop in about 20 minutes. 2011-01-19 15:54:44 -05:00
JD Horelick 12e395252c Add SHA256/SHA512 support to crypt.c and fix up the MD5 component (it seemed to have been broken). In addition, unconditionally use the libratbox crypt. 2011-01-19 15:50:46 -05:00
Lee T. Starnes bd477ff3a3 cosmetic fix: Blowfish doesn't use CamelCase 2011-01-05 23:20:04 -06:00
JD Horelick e8e3ef0dfb Add topic TS and channel TS constraints for /LIST. 2011-01-19 15:45:45 -05:00
JD Horelick e78f804d42 Implement operspy for /LIST. 2011-01-19 15:41:23 -05:00
Keith Buck a0a6c0dd39 Fix multiple RPL_LISTEND replies when aborting a /LIST. 2011-01-02 00:43:11 -08:00
Jilles Tjoelker 26576db0b3 Remove redundant prototypes in src/ircd_lexer.l.
These seem unnecessary and may cause problems because they
are wrong in some cases.

A comment says these were needed for GCC 3.3. If you are
still using this compiler, check this and if it breaks,
some other approach is needed.
2010-12-15 21:49:47 +01:00
Jilles Tjoelker 7123097bae libratbox: Unbreak compile. 2010-12-15 21:48:26 +01:00
JD Horelick 8c76e73bcf commit c90f903a667ed5744b93b6b89892de4e8c045d17
Author: Stephen Bennett <spb@exherbo.org>
Date:   Fri Dec 31 17:14:05 2010 +0000

    Expire umode +p correctly if it's set via oper_umodes, as well as by user_mode. Bug found by tgies.
2011-01-19 15:15:55 -05:00
JD Horelick bd73ea56ba commit 90509b2e2a364471f2461367fd02c11c8ab3c72d
Author: Stephen Bennett <spb@exherbo.org>
Date:   Fri Dec 31 17:11:50 2010 +0000

    Don't allow opers without the override privilege to get +p via the oper_umodes config setting
2011-01-19 15:15:50 -05:00
B.Greenham 0258787d5d Fix small bug in the VERSION/RPL_MYINFO stuff, as pointed out by init. 2011-01-19 11:28:16 -05:00
JD Horelick af1a78b7c6 extensions/m_roleplay: Channelmode +E is no longer used to allow roleplay commands. It is now +N. Fix the check for it. 2011-01-02 19:26:09 -05:00
B.Greenham 002ca0f963 extensions/roleplay: Fix NPCA/FACTION not showing up properly on some clients. 2010-12-15 15:43:35 -05:00
JD Horelick 4b631c0586 Send ERR_TOOMANYCHANNELS for each channel join that fails due to channel limits.
The reason why we do this is because some clients are dependent on receiving a numeric
for every channel join failure, even due to this limit where it can be assumed that
subsequent joins failed.
2010-12-15 00:02:47 -05:00
William Pitcock 77306edd39 ssld: Request fingerprint when connecting to the server, not just on inbound connections. 2010-12-14 21:28:35 -06:00
William Pitcock dc34aae05e Correct error message involving no fingerprint credentials or password credentials being available. 2010-12-14 21:25:44 -06:00
JD Horelick 255130dde8 Add mr_flea (and Taros) to the list of Charybdis contributors. 2010-12-14 00:33:42 -05:00
William Pitcock 5ac470475d Add support for linking using SSL certificate fingerprints as the link credential rather than the traditional server-password pair. 2010-12-13 23:14:00 -06:00
William Pitcock 6ec1ddabff libratbox: Use the server SSL certificate on outgoing connections. 2010-12-13 22:58:09 -06:00
B.Greenham f0bbc013a2 Correct an error in help roleplay. 2010-12-11 16:35:29 -05:00
JD Horelick 0284952c9f Move cmode +N to cmode +d, so that extensions/m_roleplay can retain cmode +N and maintain a consistent interface with charybdis. 2011-01-19 23:40:21 -05:00
B.Greenham a26bd77404 Bring up updated roleplay module from charybdis. 2010-12-11 16:28:40 -05:00
B.Greenham 5323ec7352 Move flood_attack_channel to channel.c so it can be used outside m_message.c 2010-12-11 16:11:54 -05:00
B.Greenham ee41c3c6cf Add HELP ROLEPLAY. 2010-12-08 00:06:44 -05:00
B.Greenham a4d2230fbc Add extensions/m_roleplay, a module that provides various roleplaying commands. 2010-12-07 23:32:46 -05:00
JD Horelick 6f368776ea Update CREDITS. spb is now a charybdis core developer and i'm a charybdis contributor. YAY! 2010-12-06 23:52:42 -05:00
William Pitcock 359d4d5b20 chmode: Remove chm_regonly, a vestige from ratbox which doesn't apply to native charybdis (or shadowircd) networks. 2010-12-06 23:51:14 -05:00
Jilles Tjoelker 2606c73c6f Change max_bans in reference.conf from 25 to 100, like example.conf. 2010-12-05 16:51:48 +01:00
William Pitcock fa9fb0d66b Use %u instead of %d. 2010-12-04 23:13:35 -06:00
William Pitcock b67bc679f3 blacklist: Remove the sscanf() for the IPv4 blacklist check.
From ratbox r27061 (androsyn).
2010-12-04 23:11:04 -06:00
JD Horelick b0e752b0f9 Do not install ban .conf files (like kline.conf, rsv.conf, etc) as they aren't used anymore. 2010-12-04 17:29:01 -05:00
JD Horelick 3e742e4d22 Remove all the DEFINE's and the random places they were used for the .conf-based ban stuff. 2010-12-04 17:26:14 -05:00
JD Horelick e9bd45dd8c Remove auth_user support from m_pass.c. It's pointless here and it breaks the functionality of having it in m_sasl which is actually useful.... 2010-11-25 03:22:02 -05:00
JD Horelick 2e6fddcccf Force a password if auth_user is sent in PASS.
Not doing this (and not having a password on the auth block) makes it really
easy for anyone to get access to that auth block.
2010-11-24 04:46:36 -05:00
William Pitcock ad06ad5710 libratbox: Clean up uses of strcpy(). 2010-11-23 08:52:18 -06:00
JD Horelick ab72b3e800 Wallops (and log) upon setting/unsetting of +M or any hidden chmode.
(+M is currently the only hidden chmode)
2010-11-22 13:14:02 -05:00
B.Greenham be293b018b Don't segfault if someone tries to OACCEPT a server for some inane reason. 2010-11-22 11:14:44 -05:00
JD Horelick f5ed1007ba Make auth_user work with SASL and add it to the example configs. 2010-11-21 15:03:17 -05:00
JD Horelick 48e9e037f4 Fix up grammar in ShadowIRCd MOTD for great good! 2010-11-16 20:46:26 -05:00
JD Horelick 8071ad5acf Fix a small warning. 2010-11-13 20:37:41 -05:00
B.Greenham 44ee1bb6b9 Update TODO. 2010-11-09 23:32:26 -05:00
JD Horelick ac10b333c7 Change the filenames of the generated SSL key/cert to ssl.* instead of test.* so that they're a bit more descriptive. 2010-11-13 16:07:54 -05:00
William Pitcock 585e477be8 Filter bogus CTCP ACTION messages. 2010-11-05 01:16:03 -05:00
William Pitcock 78ab5aa473 parse(): make reentrant 2010-10-24 21:02:32 -05:00
JD Horelick 10f11ca3b5 Fix a minor spelling error in m_kick.
Thanks to Elizabeth for pointing this out.
2010-11-17 19:08:47 -05:00
JD Horelick d89870fdfb Added tag shadowircd-6.2.0 for changeset e44527fbbaaa 2010-11-09 22:31:06 -05:00
JD Horelick 154ae8cf1f ShadowIRCd 6.2.0 2010-11-09 22:30:49 -05:00
JD Horelick f3cf5d429e Added tag shadowircd-6.2.0-RC1 for changeset 5fe83d338728 2010-11-06 16:11:39 -04:00
JD Horelick 2793290bcd ShadowIRCd 6.2.0-RC1 2010-11-06 16:11:11 -04:00
JD Horelick 64be6183f8 Fix a bug I caused. Whoops. 2010-10-25 20:11:10 -04:00
JD Horelick fe04020ffc re-order the chary-3.3 news 2010-10-24 00:00:58 -04:00
JD Horelick bc5e943f66 Added tag shadowircd-6.2.0-beta1 for changeset d14667a87aee 2010-10-23 23:34:35 -04:00
JD Horelick b540af17eb ShadowIRCd 6.2.0-beta1 2010-10-23 23:34:13 -04:00
JD Horelick 561ee87a2e Update the shadowircd NEWS and TODO. 2010-10-23 23:32:52 -04:00
JD Horelick 0d3be78fc3 Update makerelease.sh to use standard filenames for archives. 2010-10-23 23:22:39 -04:00
JD Horelick 44e51771d5 Add the charybdis 3.3 NEWS to our NEWS file. 2010-10-23 23:20:10 -04:00
William Pitcock f4db473ce8 Example configuration: Set the default TLS port to 6697. 2010-09-17 10:48:56 -05:00
Jilles Tjoelker 62a2743ab7 mkpasswd: Default to MD5-based crypt instead of SHA-based.
We have own code for MD5-based crypt and can therefore
support this even if the OS does not. The SHA-based crypts
are not ubiquitous yet.
2010-09-16 01:39:06 +02:00
JD Horelick 0a2e2a35c8 A few more fixes. Part 3 of 2 I suppose. 2010-10-23 22:46:50 -04:00
JD Horelick 16d76e8659 Clang warning fixes part 2 of 2. 2010-10-23 22:32:31 -04:00
JD Horelick 6c7315ec36 Some clang static analyzer fixes.
More in a moment.
2010-10-23 22:30:52 -04:00
B.Greenham 331285b319 Clarify that serverhide::flatten_links disables /map for non-opers. 2010-10-12 13:30:27 -04:00
B.Greenham 07db71cda0 Fix VERSION and RPL_MYINFO to only show modes that are enabled. Also fix up some errors from the last commit. 2010-10-11 16:35:18 -04:00
B.Greenham b7262e0cce Return an error upon trying to set orphaned cmode, rather than just silently ignoring the mode command. 2010-10-11 14:27:47 -04:00
B.Greenham 4c16b692f3 Add channel::disabledmodes.
This replaces use_invex, use_except, and use_forward, although
those options are still used internally and will continue to work
for users, to maintain config compatibility between charybdis
and shadowircd.
2010-10-11 14:12:52 -04:00
alxbl 829ce93fb8 Added check for division by 0 in m_message.c Hopefully fixes #25 2010-09-07 20:21:29 -04:00
B.Greenham e0b0e08d25 Fix a bug that allowed users to set forwards to channels they lack ops in (and not set forwards to channels they have ops in). 2010-07-28 20:26:13 -04:00
B.Greenham cdec335449 Rerun autoconf. 2010-10-11 12:08:49 -04:00
B.Greenham 4023293674 Merge. 2010-10-11 11:58:39 -04:00
B.Greenham 90728edb58 Backed out changeset 3097ade953f5
Backout modesets.

They're overly invasive and a bit uglier than is required.
The same thing can be accomplished in a better way with another method.
2010-10-11 11:58:21 -04:00
JD Horelick 7d65a051eb Add an item to the FAQ about the flood notice weirdness in case others have the same issue. 2010-10-01 15:10:11 -04:00
William Pitcock 1146ee7dc4 mkpasswd: Default to SHA512 instead of inherently insecure DES. 2010-09-15 03:44:58 -05:00
JD Horelick 2f38ac760c Update TODO-SHADOW 2010-09-11 20:09:22 -04:00
Jilles Tjoelker cc2a7258f1 Send only one ERR_MLOCKRESTRICTED per MODE command.
This agrees with other error messages from MODE.
2010-08-24 23:03:23 +02:00
JD Horelick f10ec0c42e Change ERR_MLOCKRESTRICTED to 742 as 735-739 seem for MONITOR extensions. 2010-09-11 13:55:06 -04:00
William Pitcock fc579e36e7 Enforce TS rules on MLOCKs. 2010-08-23 20:22:59 -05:00
JD Horelick e610316019 First part of charybdis changeset 1393:da0c7fdb7ee1 2010-09-11 13:49:21 -04:00
William Pitcock c95fc52d5a Send numeric 735 on MLOCK policy-restricted mode changes that are ignored. 2010-08-23 19:04:46 -05:00
William Pitcock ed6565a5a0 Add ERR_MLOCKRESTRICTED (735) to reflect bounces caused by MLOCK. 2010-08-23 18:59:32 -05:00
B.Greenham 1fe75e33cc mode api: Remove most modes from the chmode_table, and have them initialized in modeset files.
Modeset files are modules stored in shadowircd/modes. All they do is initalize
a set of modes on load, and orphan said modes on unload.

All cmodes not included in ircd-ratbox are now located in modeset files, rather
than being in the core. These modes no longer simply use defines, their
locations are stored in a the new struct module_modes. Each of these is set
when intializing the mode in the modeset files, and set to 0 when orphaning
the mode upon unloading the modeset file.

In addition, use_forward has been removed, as it is now obsoleted by modesets.
2010-07-02 19:09:46 -04:00
JD Horelick ed6ad7a375 Change the DNSBL hit snomask to SNO_REJ (+r) as to not spam SNO_GENERAL 2010-06-23 15:01:49 -04:00
William Pitcock 6f187f63b5 strip_colour(): strip ASCII 29 (mIRC 7 italics). 2010-06-19 16:53:56 -05:00
JD Horelick 40114db23c Make DNSBL hits snote on hit. The snote displays nick, IP and what DNSBL they hit. 2010-06-23 13:44:33 -04:00
JD Horelick b25b4a7c5a Add InfoServ to the default aliases in ShadowIRCd.
Its now in Atheme and enabled by default in Atheme so it seems intelligent to
do so here.
2010-06-23 02:20:04 -04:00
JD Horelick fb06d910df SVN Id removal part two 2010-06-10 21:28:15 -04:00
JD Horelick 133755685e Removal of ancient SVN ID's part one 2010-06-10 21:22:44 -04:00
JD Horelick 9f1913e7b8 Readd DroneBL to the list of default blacklist. Most of the trustworthiness
issues have been fixed. Keep EFNet RBL though. :)
2010-06-10 17:15:50 -04:00
Jilles Tjoelker 97bd6a2e37 Propagate changed away messages to other servers,
even if the away status did not change.
2010-06-10 22:16:07 +02:00
Jilles Tjoelker dfea673fca Make number_per_ident actually apply to unidented connections as well,
as documented in reference.conf.

Noticed by: spb
2010-06-09 21:22:47 +02:00
William Pitcock 4ea91f08c5 Recommend EFNet's RBL instead of DroneBL due to trustworthiness issues.
(StaticBox policy change as of May 14, 2010.)
2010-05-14 08:49:26 -05:00
Elly 86ed11bb4c Fix memory leaks in PASS command, both in normal and repeated use. 2010-06-01 13:11:47 -04:00
Jilles Tjoelker e70448e441 dline help: add oper reason, clarify temps, add ON <server>. 2010-05-20 00:23:32 +02:00
Jilles Tjoelker 57fe1cf10e openssl: Avoid cutting off OpenSSL errors at 119 chars.
ERR_error_string() is just broken, as it returns at most 119 chars
which means error messages are frequently truncated.
Allow for 511 chars using ERR_error_string_n().
2010-05-09 00:30:51 +02:00
Stephen Bennett 6da02ba998 Update MLOCK protocol documentation to match changes in code 2010-05-02 22:18:13 +01:00
Stephen Bennett c554add299 Allow the final parameter of MLOCK to be empty, to remove an existing mlock 2010-05-02 20:42:46 +01:00
Stephen Bennett b72bd23a03 Rework ircd-side MLOCK enforcement: instead of trying to track modes locked on or off, instead keep a simple list of mode letters that are locked, and reject any change to those modes. 2010-04-30 22:01:21 +01:00
JD Horelick 2d10c55990 Branch merge 2010-09-11 13:31:13 -04:00
JD Horelick ea84bfdeff Backed out changeset c04f6578869c 2010-09-11 13:31:00 -04:00
JD Horelick e09ea16973 "Import" changeset 1346:c57955c5225e from charybdis by hand. 2010-09-11 13:23:35 -04:00
Jilles Tjoelker 9dc68130ea Improve technical documentation of BAN protocol. 2010-04-29 00:26:49 +02:00
Jilles Tjoelker b96db1e3fe Fix crash if identify_service/identify_command were not specified in ircd.conf. 2010-04-18 13:54:03 +02:00
B.Greenham 2498a1b577 Fix some valgrind warnings. 2010-05-27 18:03:51 -04:00
JD Horelick 1add004b97 Change kicknorejoin to be hardcoded to 2 seconds instead of a
configurable opton.
2010-05-21 04:20:45 -04:00
JD Horelick f0e0e5672d Backed out changeset 9bd802724b74 2010-05-21 04:08:05 -04:00
JD Horelick 446c7d4f57 Remove +J chmode (KICKNOREJOIN) 2010-05-21 03:29:07 -04:00
JD Horelick 4b4fc78cfb Do not allow a topic change if a user may not send to the channel
(resv, cmode +m, cmode +b, cmode +q, etc.).

This is only checked for local users.

For optimal compatibility, a failure for this reason still
returns ERR_CHANOPRIVSNEEDED.

Side effect: normal users cannot change topics of resv'ed
channels, even if they have ops, just like they already
cannot send messages. This only matters if resv_forcepart
is disabled, as the user would have been removed from the
channel otherwise.

Imported from charybdis changeset 1368:a224ec22c54c
2010-04-15 13:12:45 -04:00
JD Horelick b752a50272 Fix a bug that stopped halfops from changing the topic. 2010-04-14 19:28:15 -04:00
JD Horelick ef61796891 Added tag shadowircd-6.1.0 for changeset d1acc17f230a 2010-04-11 20:36:55 -04:00
JD Horelick a12a0836ff Bump version to 6.1.0 2010-04-11 20:36:38 -04:00
JD Horelick 55bb399f79 Update TODO 2010-04-11 14:28:46 -04:00
B.Greenham 979a6d5a51 Automated merge with ssh://shadowircd/uranium/shadowircd/ 2010-04-09 11:57:44 -04:00
B.Greenham 05073c8113 Update TODO. 2010-04-09 11:54:41 -04:00
JD Horelick fa6495b47f Clarify no_oper_flood option in the reference.conf 2010-04-08 21:41:15 -04:00
JD Horelick 5882de85a4 Added default_ident_timeout to the NEWS. 2010-04-07 17:29:25 -04:00
B.Greenham ad9de1c86b Update NEWS. 2010-04-07 16:58:01 -04:00
B.Greenham f135c53751 Make PRIVMSG @#channel and PRIVMSG +#channel go to halfops and admins as well as chanops.
6.1 is now feature complete.
2010-04-07 16:53:59 -04:00
JD Horelick 24c2e4ff18 Add OPERHOST to the help for SET. 2010-04-07 15:17:44 -04:00
B.Greenham 8e05e221cd Automated merge with ssh://shadowircd/uranium/shadowircd/ 2010-04-07 15:08:26 -04:00
B.Greenham 41e026e175 Don't throw a warning if general:default_operhost is empty. 2010-04-07 15:08:02 -04:00
B.Greenham 67537fefa4 Add OPERHOST option to /set, which allows you to change the host operators get on oper up (provided they don't have a specific one already defined in their operator block.) 2010-04-07 15:04:42 -04:00
JD Horelick 24170ac312 Add some ircd-seven love to CREDITS. 2010-04-07 14:07:44 -04:00
JD Horelick 1434082803 Change config option for ident_timeout to default_ident_timeout as jilles
recommended. Also update the TODO. Also, cocks.
2010-04-05 16:29:11 -04:00
JD Horelick e50ed244f4 Add a configuration option for ident_timeout. 2010-04-05 15:28:44 -04:00
JD Horelick 4369131cc7 Change the default ident timeout time to 5s to not be as annoying
to clients that don't send an ident and add a TODO item for 6.2 to
make ident timeout time configurable in the ircd.conf.

Currently it's only configurable in the include/defaults.h (ugly)
or on-the-fly with /set (doesn't persist, have to re-set it on each
restart/server).
2010-04-04 17:13:04 -04:00
JD Horelick a5687a4cf7 Update NEWS. 2010-04-04 16:26:16 -04:00
JD Horelick 015b28a06c Branch Merge 2010-04-04 16:25:20 -04:00
B.Greenham d6a51668b7 Update NEWS. 2010-04-04 16:13:48 -04:00
B.Greenham 8097430a81 Allow /ojoin !#channel/%#channel, if admin/halfop are enabled. 2010-04-04 15:58:07 -04:00
B.Greenham 46a30dbe86 Update omode so that it can set +ah. 2010-04-04 15:32:34 -04:00
B.Greenham 2d8ae01fa4 Update help snomask with snomasks provided by extensions. 2010-04-04 14:39:57 -04:00
Jilles Tjoelker 6795400d0a New custom channel mode API allowing reloading such modules.
Additionally, attempting to use too many modes or two times
the same letter is now detected and prevented.

Modules now request that a channel mode be added/orphaned,
instead of ugly manipulation from which that request had
to be guessed.

Slight changes are needed to modules that provide channel modes.
From the old API, one important function has been made static,
the other important function has been renamed, so loading old
modules should fail safely.
2010-04-01 01:16:16 +02:00
B.Greenham 8848e117aa Automated merge with ssh://shadowircd/uranium/shadowircd/ 2010-03-31 11:22:44 -04:00
B.Greenham 92b26e74a9 Make chm_staff (staff only modes) only settable if you have ops in the channel in question.
If operators need to set such modes in a channel where they don't have ops, that's what override/omode are for.
2010-03-31 11:22:32 -04:00
JD Horelick f968f34f4b Update comment for me_svsjoin explaining the sort of morality of it. 2010-03-31 02:16:00 -04:00
JD Horelick b4db7c8695 It'd take the world's longest tape measure to gauge the length of my fail.
-- JD, March 31, 2010
2010-03-31 01:47:24 -04:00
JD Horelick 1d59ea37bb Add me_svsjoin function to allow services to "force"join clients
to channels, primarily for ns_ajoin.
2010-03-30 21:20:26 -04:00
B.Greenham 36fb4e9a77 Update FAQ. 2010-03-30 14:55:33 -04:00
JD Horelick 10a8240ff4 Fix a typo that could've caused a bug 2010-03-29 03:53:55 -04:00
B.Greenham 390351fe8b Automated merge with ssh://shadowircd/uranium/shadowircd/ 2010-03-28 23:44:59 -04:00
B.Greenham aa1906882c Update help indexes, adding EXTBAN and commands provided by extensions. 2010-03-28 23:44:04 -04:00
B.Greenham d4eab91a99 Add help extban. 2010-03-28 23:28:24 -04:00
JD Horelick 6fbcf3827c Fix a typo in configure (glad it was only a minor typo in the help text) 2010-03-28 22:46:46 -04:00
JD Horelick 9960cc94c5 Enable the --enable-small-net option by default. 2010-03-28 19:54:53 -04:00
JD Horelick e2b0cde27f <clarkson>Now its time to do the NOOZ.</clarkson> 2010-03-28 14:39:03 -04:00
JD Horelick ef07b59ac8 Add helpchan and helpurl that tell users the official help channel
and (optionally) link them to your network's specific helppages on
the intertubes. It is shown in /quote help (with no extra parameters).
2010-03-28 14:08:47 -04:00
JD Horelick e59f45e361 yay for consistency 2010-03-28 04:45:25 -04:00
JD Horelick 5c34bc991c Add helpfiles for all extensions that provide commands.
Not being added to the index yet since i'm not sure of the best
way to do that.
2010-03-28 04:41:39 -04:00
JD Horelick 6bcf2929ac THE WHITE HOUSE! 2010-03-28 03:07:57 -04:00
JD Horelick d74f4f873c Add help for MODRELOAD. 2010-03-28 03:00:23 -04:00
B.Greenham d220e9457d Minor umode help file cleanups. 2010-03-27 23:36:06 -04:00
B.Greenham 1705ff0b31 Add umode +x to help. 2010-03-27 23:31:39 -04:00
B.Greenham 8fa2ba9c88 Cleanup cmode help files and add cmodes provided by extensions. 2010-03-27 23:21:34 -04:00
B.Greenham 0068a2a2e2 Automated merge with ssh://shadowircd/uranium/shadowircd/ 2010-03-27 22:42:54 -04:00
B.Greenham bcd6e78cd3 Add help for cmode +M, but only for opers. This requires splitting help cmode into different files for users and opers. 2010-03-27 22:42:32 -04:00
Jilles Tjoelker 7c880acbfe Fix various compiler warnings. 2010-03-27 20:09:46 +01:00
Jilles Tjoelker 7bf8ae67cc Restore snotes, logs for UNRESV nick.
This bug was introduced when adding bandb.
2010-03-27 16:24:13 +01:00
Jilles Tjoelker 9b9d818b32 Add propagated resvs, like klines and xlines. 2010-03-27 16:13:57 +01:00
Jilles Tjoelker d0cf872a95 XLINE: Do not cluster unxlines ON specific servers.
This bug was introduced with BAN support for XLINE.
2010-03-27 16:09:26 +01:00
Jilles Tjoelker 5d2661a149 Remove unused variable. 2010-03-27 02:06:29 +01:00
JD Horelick 88b89a4073 Update TODO a bit. 2010-03-26 00:52:42 -04:00
B.Greenham b791dea807 Some reference.conf cleanups. 2010-03-25 23:10:52 -04:00
JD Horelick 603c6d3c5a Add a small FAQ and modify the todo item about disabled_commands in
auth {} to disable_oper since that covers ~99% of the use-cases and
can be much cleaner.
2010-03-25 14:14:17 -04:00
JD Horelick 64dd2404ca Rewrite message when you don't have the privs to kick a user
(be it that the user is +a and you're +o/+h or you're not an op at all).
2010-03-25 12:31:12 -04:00
JD Horelick fb81a73307 Update NEWS. 2010-03-25 03:39:46 -04:00
JD Horelick 3232087a3c Make all snotes for mod* stuff netwide since unless you're opered
on more than one server, you won't know if the command worked or not.
2010-03-25 03:18:32 -04:00
JD Horelick 576bcf93e5 Add information to helpfiles about remote module loading. 2010-03-25 03:13:13 -04:00
JD Horelick e31b740dd1 Allow using all the mod* commands remotely. 2010-03-25 00:33:20 -04:00
JD Horelick 069f104a2e Add shared::modules option, remote module stuff coming later/soon. 2010-03-24 15:50:15 -04:00
JD Horelick d25c6eb1b2 Yay for documenting code.... 2010-03-23 21:20:07 -04:00
JD Horelick 4aa4fa57f2 I am made of fail. 2010-03-23 15:21:42 -04:00
JD Horelick 5ff039e923 Make remote restart and die actually...work... 2010-03-23 15:21:09 -04:00
JD Horelick 658a333d65 Pull in remote restart and die (from ircd-seven) allow opers
to remotely restart and die servers.
2010-03-23 14:21:31 -04:00
JD Horelick 74e3e4f1e2 Add DIE shared option for remote restart and die which are on their
way next.
2010-03-23 14:19:48 -04:00
JD Horelick 6f7a78f6aa Added check for flood settings in m_message. Why was this not here
before? What good are flood settings really if they're not applied
to messages?
2010-03-21 03:43:25 -04:00
JD Horelick 706f2ddf1a Add the note that no_oper_flood needs to be enabled for true_no_oper_flood
to work correctly.
2010-03-21 01:06:57 -04:00
JD Horelick 1cc810d3a7 Add general::true_no_oper_flood . I'm not going to explain it here.
Ask me what it does on IRC if you're curious.
2010-03-21 00:14:02 -04:00
B.Greenham aa9a8067b1 Use strip_unprintable for chmodes +K and +G, which makes evasion less trivial. 2010-03-20 12:49:57 -04:00
B.Greenham 114406d021 Add strip_unprintable, a function that strips all unprintable characters from a string. 2010-03-20 12:39:39 -04:00
JD Horelick be6960363c Bump the version in configure since we're now in development of 6.1.0.
We've been in 6.1.0 development for like a week now but i forgot to change this a week ago.
Better late than never...
2010-03-20 05:30:37 -04:00
JD Horelick bc9ccf4a0e Update NEWS. 2010-03-20 04:48:18 -04:00
JD Horelick 82b371736d Add showing modes to OLIST so you can more easily see if you're
about to join a +s channel and it can be useful as a oper to easily
see which channels have certain modes set (i'm thinking +PL and maybe more).
2010-03-20 04:34:44 -04:00
B.Greenham baca17aeb3 Some minor conf cleanups. 2010-03-18 13:50:47 -04:00
B.Greenham 2c0c690444 Fix some compile warnings. 2010-03-18 12:32:42 -04:00
JD Horelick 29b3f2e4e5 Fix a small typo that i noticed looking around the source. 2010-03-18 02:44:51 -04:00
Jilles Tjoelker a75522e6a5 BAN: xlines do not have oper reasons, their "reason" is already oper only. 2010-03-18 00:22:35 +01:00
Jilles Tjoelker 112e8a666b Add propagated xlines, like klines. 2010-03-16 23:05:50 +01:00
JD Horelick 504f309e38 Add option general::use_propagated_bans to allow disabling new KLINE.
If this option is yes (default), KLINE by itself sets global (propagated) bans.
If this option is no, KLINE by itself sets a local kline following cluster{},
compatible with 3.2 and older versions.
2010-03-27 14:58:04 -04:00
Jilles Tjoelker cc7e9872be Fix a signedness comparison warning. 2010-03-16 19:13:09 +01:00
JD Horelick b705a46f43 Fix a signedness comparison warning. 2010-03-17 03:42:40 -04:00
B.Greenham 473d0842db Fix some compiler warnings that I generated by accidentally copying something twice. 2010-03-17 02:19:18 -04:00
B.Greenham 7469e4b0d2 Remove the ability of overriding opers to privmsg/notice @#channel while lacking ops.
Since this goes past +q/+m and so on, it could easily and silently be abused.
2010-03-16 13:47:03 -04:00
B.Greenham 7bd3701cd6 Remove override being able to automatically and silently go through +q/+m/etc.
This was previously doable without sending wallops, and had high abuse potential.
Overriding opers can set themselves +v/+o or remove the offending mode if they need to get past such things.
2010-03-16 13:44:44 -04:00
JD Horelick 853058531a Added m_cycle and added it to all the appropriate locations. 2010-03-15 15:35:32 -04:00
B.Greenham 3c0f833420 Add OKICK to documentation. 2010-03-14 17:25:53 -04:00
JD Horelick ceb3eb1de9 Add rehash to the shared all flag because all should prolly = all. 2010-03-14 15:42:28 -04:00
JD Horelick f55bba7c8a Some work on the oper-guide, more coming when i feel like it.
Have I ever mentioned how much i hate markup languages? No? Damn.
2010-03-14 00:52:41 -05:00
B.Greenham 6b2d7a74ce Fix some indentation in reference.conf. 2010-03-13 23:26:23 -05:00
JD Horelick 745237f166 Updating File. 2010-03-13 23:19:36 -05:00
JD Horelick e78f685073 Add use_part_messages config option. When disabled, this will show
all PARTs without a message/reason. Recommended to set to no if
a static quit message is set.
2010-03-13 22:56:38 -05:00
JD Horelick c0e2aa60b8 Added static_quit support. Pretty much what the name implies. 2010-03-13 22:19:29 -05:00
JD Horelick 8e2b81ee9e Pointed the stable repo to the actual URL of the stable repo.
Also, doing this as a test commit for CIA.
2010-03-11 16:45:13 -05:00
JD Horelick 22375cae10 Added tag shadowircd-6.0.0 for changeset d164e7e4e3e6 2010-03-10 14:03:42 -05:00
B.Greenham e99b5ace4d Automated merge with ssh://shadowircd/uranium/shadowircd/ 2010-03-10 14:00:20 -05:00
B.Greenham 18e4f1775b Fix oaccept not propegating wallops. 2010-03-10 14:00:02 -05:00
JD Horelick d813e98a27 Removed tag shadowircd-6.0.0 2010-03-10 13:55:24 -05:00
JD Horelick 3abe50e5ae Added tag shadowircd-6.0.0 for changeset 3b9189ce8015 2010-03-10 12:20:22 -05:00
JD Horelick 2a8e176b54 Bump version to 6.0.0 2010-03-10 12:19:00 -05:00
B.Greenham 7bf7fc16f0 Oaccept isn't named omode... 2010-03-09 01:30:42 -05:00
JD Horelick 6ba7be152d Topiclen is already the highest it can be in chary/shadow.
Remove that TODO item. I am an idiot.
2010-03-08 18:50:25 -05:00
JD Horelick 71cd9c2b9d Add an item to the 6.1 TODO 2010-03-08 18:46:59 -05:00
B.Greenham 3a68f97851 Automated merge with ssh://shadowircd/uranium/shadowircd/ 2010-03-08 18:09:35 -05:00
B.Greenham 0fbe4a384c Make metadata use UIDs for s2s communication, and fix up propegation of channel metadata. 2010-03-08 18:09:10 -05:00
JD Horelick 938bd268e0 Remove curly braces around 2 options in m_info. This caused some
compile warnings which are now gone and the 2 options seem to show
just fine in /INFO and nothing segfaults when you do /INFO.
2010-03-08 13:51:46 -05:00
JD Horelick ad89735d9e Update a few docs files. 2010-03-08 05:00:58 -05:00
William Pitcock e7c34075dd chm_simple(): enforce MLOCK 2010-03-07 23:15:52 -06:00
William Pitcock 28805dc5fc Add propagation of MLOCK state for simple modes.
Special modes like +j can be tracked easily just by adding the necessary
code to parse them to set_channel_mlock().  This will cover propagation
as well.
2010-03-07 23:13:39 -06:00
William Pitcock b552cf8745 Fix order on channel_mlock() call. 2010-03-07 23:12:35 -06:00
William Pitcock 24cf9d8a28 Fix typo. 2010-03-07 22:30:30 -06:00
William Pitcock 6b5059c363 Add MLOCK message to netjoin burst. 2010-03-07 22:29:34 -06:00
William Pitcock 27958781f6 Add MLOCK capability token. 2010-03-07 22:25:41 -06:00
JD Horelick 71ea606903 Make override WALLOPS actually send netwide this time. 2010-03-07 23:22:07 -05:00
B.Greenham c1c91f9438 s/owner/admin/ throughout the source code and docs. 2010-03-07 23:18:39 -05:00
B.Greenham f8b60fb5fd Make joining in override only wallops if you couldn't normally join the channel. 2010-03-07 22:58:27 -05:00
William Pitcock cb2f3005bd Add syntax description of MLOCK message to ts6-protocol.txt. 2010-03-07 21:51:41 -06:00
JD Horelick 34d8ef4d14 Change all override snotes to wallops to match m_o* and to
make it a lot more obvious when a oper is using override.
2010-03-07 22:42:51 -05:00
William Pitcock dc45456c96 struct Channel: add mode_lock structure to the channel object. 2010-03-07 21:41:06 -06:00
William Pitcock 34f6a40e79 struct Mode: add off_mode bitfield to describe disabled channel modes. 2010-03-07 21:40:34 -06:00
William Pitcock 5f58af73d7 Correct 325 (RPL_CHANNELMLOCKIS) numeric. 2010-03-07 21:37:23 -06:00
William Pitcock 22caef5e58 Add RPL_CHANNELMLOCKIS for ircd-side MLOCK enforcement. 2010-03-07 21:35:54 -06:00
B.Greenham 82c11fc45c Automated merge with ssh://taros@hg.atheme.org//hg/unofficial/shadowircd 2010-09-10 13:27:07 -04:00
B.Greenham 01b2be6fe1 Allow users to send replies through +G the same as they can through +g. 2010-09-10 13:26:41 -04:00
JD Horelick 9fc5811f79 Add GroupServ aliases to the shadowircd configs by default. 2010-09-04 18:31:18 -04:00
B.Greenham ca328a798f Fix crash upon recieving SVSJOIN for remote user. 2010-08-30 18:25:40 -04:00
JD Horelick 43c957b5ec Update the Mercurial-Access file for the new Shadowircd-on-atheme.org hg stuff.
Also, testing that cia.vc still works.
2010-08-30 17:05:17 -04:00
Jilles Tjoelker 3721c57468 Show the services login name in WHOWAS.
The numeric is the same (330) as used in WHOIS.

This takes at most half a megabyte of memory (large network, 30 char nicks).
2010-08-29 22:30:54 +02:00
Jilles Tjoelker 80d57d3924 Move RPL_WHOISLOGGEDIN to sendto_one_numeric(). 2010-08-29 22:29:17 +02:00
Jilles Tjoelker d8316e070f Provide an error message when a user does /quote ban. 2010-08-29 15:16:47 +02:00
JD Horelick 8a889b0a5f Change the defaul nicklen back to 31. This is more efficient due to struct packing. 2010-08-29 01:16:28 -04:00
Jilles Tjoelker 9e94d9ea13 Add target change for channels.
This has a separate enabling option channel::channel_target_change.

It applies to PRIVMSG, NOTICE and TOPIC by unvoiced unopped non-opers.

The same slots are used for channels and users.
2010-08-28 20:02:42 -04:00
JD Horelick 7f3998618e Change oper-up message. 2010-08-28 18:16:28 -04:00
JD Horelick ad6bcd42f9 Fix my last commit 2010-08-01 14:35:22 -04:00
JD Horelick 4eaadbf404 Fix a couple of compile warnings. 2010-08-01 14:29:06 -04:00
B.Greenham d76346d3d4 Make channel::admin_on_channel_create only work if admin is enabled. 2010-07-29 14:26:18 -04:00
B.Greenham d7a3d23cdd Add channel::admin_on_channel_create, which gives users creating new channels +ao instead of +o, if enabled. 2010-07-29 14:22:33 -04:00
B.Greenham 7af1b8d223 Merge. 2010-07-28 20:01:55 -04:00
B.Greenham ffd69d40d1 Fix the 'phantom user' bug, along with a bug that would make repeat mode changes appear on burst. 2010-07-28 19:54:22 -04:00
JD Horelick 199eaba28d Change default nicklen to 30. 2010-07-11 21:57:54 -04:00
JD Horelick 713624ed6a Add hide_channel_below_users value to m_info. 2010-07-10 05:01:23 -04:00
JD Horelick 9e8efa00d4 Fix a quick compile warning. 2010-07-10 01:29:22 -04:00
JD Horelick 6898ce9dde Add general::hide_channel_below_users option.
This allows server owners to set how many users must be in a channel before
/LIST will show it.
2010-07-10 01:28:21 -04:00
JD Horelick 430222b125 Remove the /umode2 (opers can change others' umodes) thing from TODO.
There's OACCEPT for +g and for +B, just tell the user to botmode his own bot
or you'll kline it till he does.
If anyone can think of a good use-case for this, it may be re-added.
2010-07-06 15:19:47 -04:00
B.Greenham 0864baa814 Automated merge with ssh://shadowircd/uranium/shadowircd/ 2010-07-06 14:28:19 -04:00
B.Greenham e04086c5ec Update TODO. 2010-07-06 14:28:07 -04:00
JD Horelick 2588ff97f4 Change a bit of the last commit since opers do not go through +g on ShadowIRCd as they do on Charybdis. 2010-07-04 16:12:31 -04:00
JD Horelick 33736ea75f Tweak auto-accept:
* does not apply to NOTICE (as those may well be automated)
* mirrors +g behaviour so that no useless accept entries are added for services
* respects max_accept, if it would be exceeded the message is dropped with numeric 494
* check moved up so this is checked before floodcount/tgchange

Pulled from Charybdis upstream changeset 1388:b1ef26176350 done by jilles.
2010-07-04 15:27:34 -04:00
JD Horelick dab6375a1e Branch Merge 2010-07-04 03:29:35 -04:00
JD Horelick ba06b3db25 Backed out changeset 8781a9e4c62c 2010-07-04 03:25:54 -04:00
William Pitcock 5b71b8ec50 Stop griefing through taunting while hiding behind CALLERID.
This shouldn't provide any way for a client to get on a CALLERID list
without authorization, as if a client is +g already, a CTCP request, for
example, won't be replied to.
2010-07-03 00:44:55 -05:00
B.Greenham 659dbfa585 Automated merge with ssh://shadowircd/uranium/shadowircd/ 2010-07-02 19:09:51 -04:00
JD Horelick 1d0a5f6d0e I am made of the fail today.
/me climbs aboard the failbus.
2010-06-23 16:32:10 -04:00
JD Horelick a58c4fedeb Sort of standardize the display of DNSBL hit snotes. 2010-06-23 16:30:08 -04:00
JD Horelick 96f20bc6f5 Remove FORCEPART from m_force. It is quite abusive (even with the snotes) and
it would be a lot less abusive to use OKICK instead.
2010-06-23 16:01:14 -04:00
JD Horelick c809010b89 Make +-a give you the appropriate error message if you don't have
the proper privs.
2010-03-07 21:57:00 -05:00
JD Horelick 11e91210d7 Check off one TODO item. 2010-03-07 17:27:50 -05:00
JD Horelick 82e5490f59 Add m_webirc to "default" loaded extensions in .conf files and
add a WEBIRC auth {} block for it to show how its used so you
don't have to read the source of the extension to figure it out.
2010-03-07 17:13:46 -05:00
JD Horelick b6a3d80129 Change many of the ERR_CANNOTSENDTOCHAN messages to say WHY the user
can not send to the channel for the new chmodes.
2010-03-07 17:03:12 -05:00
William Pitcock a9f16d808d Fix construction of the channel mode vector table.
This fixes chm_* modules and should be backported to ircd-seven and charybdis 3.2.
2010-03-07 14:45:42 -06:00
Jilles Tjoelker 517967618d Document BAN message. 2010-03-07 14:06:28 +01:00
B.Greenham 942d361d89 I am a massive idiot. Fix this problem. 2010-03-07 00:48:39 -05:00
B.Greenham b35e241271 s/owner/admin/ in the cmode help file. 2010-03-06 22:33:21 -05:00
William Pitcock dc082cb054 Update CREDITS. 2010-03-06 21:01:19 -06:00
B.Greenham bc4764aefd Looks like irc_dictionary things cannot support more than one key with the same value. Therefore, a rework of +J and OACCEPT's metadata are required to make them work properly with multiple users. 2010-03-06 19:22:59 -05:00
Jilles Tjoelker f8cebd00f2 Show d/kline setter to opers in stats/testline. 2010-03-06 22:37:42 +01:00
Jilles Tjoelker 03ad38143b Hgignore some generated files. 2010-03-06 22:27:54 +01:00
B.Greenham 2ec04d9c3b Cleanup reference.conf a bit. 2010-03-06 15:58:15 -05:00
JD Horelick 5814373ffa Add +p/override to the umodes array in the reference.conf 2010-03-06 12:37:42 -05:00
Jilles Tjoelker c3666dd012 Avoid crash if get_oper_name() somehow gave no {} for local oper. 2010-03-06 16:37:50 +01:00
JD Horelick 55bf488d0f Update the YOUREOPER/oper-up message. 2010-03-06 01:36:21 -05:00
B.Greenham 1e5d5ab8c2 Automated merge with ssh://shadowircd/uranium/shadowircd/ 2010-03-05 22:27:05 -05:00
B.Greenham 7da2386c84 Add a TODO item. 2010-03-05 22:26:50 -05:00
JD Horelick 1be5895576 Move make_override_immune to unsupported, because as previously mentioned, i fail. 2010-03-05 22:13:21 -05:00
B.Greenham 2d0895ab63 Automated merge with ssh://shadowircd/uranium/shadowircd/ 2010-03-05 21:36:58 -05:00
B.Greenham c7bf4e391b Add a TODO item. 2010-03-05 21:36:52 -05:00
JD Horelick 55f5eaa147 Add a header file. 2010-03-05 21:35:36 -05:00
B.Greenham e80126d0d3 Fix +K unintentionally stripping any messages to the channel of color. 2010-03-05 20:59:23 -05:00
B.Greenham 76db4b42e2 Fix a segfault in oaccept. 2010-03-05 20:49:30 -05:00
B.Greenham a58b84b4b2 Fix +J not checking for local clients properly. 2010-03-05 20:23:52 -05:00
B.Greenham 7ab1bb39ab Automated merge with ssh://shadowircd/uranium/shadowircd/ 2010-03-05 20:09:26 -05:00
B.Greenham 937efa520e Fix segfault on netsplit due to clearing metadata too late. 2010-03-05 20:06:44 -05:00
Jilles Tjoelker 70fd7fc9fb BAN: Reject bans with insufficient non-wildcard characters.
Such bans are not applied locally, but are propagated normally.
They can only be removed on a server that applies them.

Note that normally KLINE will not accept such bans.
This is mainly for services, differing min_wildcard and
ircd changes.
2010-03-06 01:45:41 +01:00
JD Horelick a8afd89db2 Made overriding join send snotes. 2010-03-05 19:32:17 -05:00
JD Horelick a039358ed0 Fix a typo 2010-03-05 19:18:38 -05:00
B.Greenham 67cecc2b22 Should just specify the name here. 2010-03-05 19:16:27 -05:00
B.Greenham 8e3b2b85c7 Clean up cmode norepeat's metadata when unsetting +K. 2010-03-05 19:10:24 -05:00
B.Greenham 2f39232fab Fix the 'mode changes appear multiple times' bug. 2010-03-05 18:49:57 -05:00
Jilles Tjoelker 20eef93004 Add /stats g to show propagated (global) klines. 2010-03-06 00:31:51 +01:00
Jilles Tjoelker c177d078ea Among bans with the same creation time, prefer the one with longest lifetime. 2010-03-05 23:16:28 +01:00
Jilles Tjoelker 05114b16a3 BAN: Avoid fake direction. 2010-03-05 22:53:35 +01:00
Jilles Tjoelker e49d818579 Remove +/- from the BAN message, instead indicating unban with duration=0.
A kline must now last at least one second since its creation time.

Also add better logic for bans that have already expired
when they come in.
2010-03-05 22:51:47 +01:00
Jilles Tjoelker a4893a45be Use memmove instead of memcpy where there is overlap (modunload). 2010-03-05 22:05:15 +01:00
B.Greenham 5e09b8c741 Adding a TODO item. 2010-03-05 15:04:51 -05:00
B.Greenham 1c646b8914 Fix +g messages not showing to opers. 2010-03-05 14:39:42 -05:00
B.Greenham e6f94b0c3c Make oaccept use UIDs instead of nicks. 2010-03-05 14:34:44 -05:00
B.Greenham 85465c4341 Make +gGR not affect services. 2010-03-05 14:28:48 -05:00
B.Greenham 75a9b0c8b0 Make oaccept work for multiple opers on the same target. 2010-03-05 14:26:40 -05:00
B.Greenham a18f1b6ef8 Make it so that the same user can have more than one metadata entry of the same type. 2010-03-05 14:06:32 -05:00
B.Greenham 559d530111 Make m_okick support the new +J format. 2010-03-05 13:59:35 -05:00
B.Greenham b5285733d3 Update NEWS. 2010-03-05 13:54:38 -05:00
B.Greenham d3b90aaad3 Clean up +J to work nicely and properly. 2010-03-05 13:45:01 -05:00
Jilles Tjoelker 65b8e0029e Add propagated klines.
A KLINE command without the ON clause now sets a propagated
("global") ban. KLINE commands with the ON clause work as
before.

Propagated klines can only be removed with an UNKLINE command
without the ON clause, and this removes them everywhere.
In fact, they remain in a deactivated state until the latest
expiry ever used for the mask has passed.

Propagated klines are part of the netburst using a new BAN
message and capab. If such a burst has an effect, both the
server name and the original oper are shown in the server
notice.

No checks whatsoever are done on bursted klines at this time.

The system should be extended to XLINE and RESV later.

There is currently no way to list propagated klines,
but TESTLINE works normally.
2010-03-05 18:36:44 +01:00
Jilles Tjoelker 90072e8be6 kline: Fix oper reasons. 2010-03-05 18:28:59 +01:00
B.Greenham 6a97cac667 Make channel_metadata_time_add accept a regular value as well as a time value. 2010-03-05 11:57:48 -05:00
Jilles Tjoelker dce31e2723 Fix --disable-balloc.
libratbox r26769
2010-03-05 17:28:47 +01:00
B.Greenham 870b1b4694 Third time's the charm, apparently. Being sleepy and committing is a bad combo. 2010-03-05 01:51:36 -05:00
B.Greenham f865a3619d Actually make okick support +J. 2010-03-05 01:44:16 -05:00
B.Greenham d925c36c4e Make m_okick support +J. 2010-03-05 01:40:52 -05:00
B.Greenham a6d1c6c037 Make RPL_WHOISMODES look a bit nicer. 2010-03-05 01:22:08 -05:00
B.Greenham 0b370fcc63 There's no reason to have two nearly identical structs for metadata, move metadata struct to ircd.h and use it for both channel and user metadata. 2010-03-05 00:51:40 -05:00
B.Greenham 07b7b659c1 6.0 is officially feature complete. 2010-03-05 00:41:05 -05:00
B.Greenham 8bced6dc39 Add *_metadata_clear and start using them. 2010-03-05 00:39:18 -05:00
B.Greenham 104becbf7f Add channel_metadata_time_add, a local only form of metadata that stores time values. And use it to make +J work. 2010-03-05 00:18:56 -05:00
Jilles Tjoelker a491246f8f Skip propagated bans in rehash txlines/tresvs. 2010-03-05 00:37:56 +01:00
B.Greenham 402f23b9e0 TODO updates. 2010-03-04 18:15:12 -05:00
B.Greenham 9a4dc29c68 Finish chmode +K, which prevents repeated lines. 2010-03-04 18:05:15 -05:00
B.Greenham cc39ce707d Make it so that channels can have more than one piece of channel metadata with the same value. 2010-03-04 17:49:15 -05:00
B.Greenham 05f8f9e493 Automated merge with ssh://shadowircd/uranium/shadowircd/ 2010-03-04 15:08:41 -05:00
B.Greenham 6f659342dc Add channel metadata system. 2010-03-04 15:08:16 -05:00
JD Horelick f11e5895dc Fix a few errors in the example configs (caused errors on starting the ircd). 2010-03-04 14:18:15 -05:00
JD Horelick 3da167f207 Really fix the ugly-ass desync by re-adding some code i accidentally
deleted on the first chmode.c override commit.
2010-03-04 04:28:53 -05:00
JD Horelick e853274c16 Fix a warning which may fix a real ugly desync.
If this doesn't fix the desync, i have an idea of how to do so.
2010-03-04 04:22:14 -05:00
B.Greenham a5445b5bb5 Add TODO for ShadowIRCd-6.2 2010-03-04 02:22:45 -05:00
B.Greenham defa3ff445 Add oaccept to extensions/readme, also clarify it a bit in the NEWS. 2010-03-04 01:47:50 -05:00
B.Greenham 1fbf6db662 Add extensions/m_oaccept , a module to allow opers to bypass +gGR with a command. 2010-03-04 01:40:13 -05:00
B.Greenham 5b453fee2a Merge. 2010-03-03 23:32:09 -05:00
B.Greenham 03d65f8fbb Backed out changeset 8ff8459cb04d 2010-03-03 23:20:48 -05:00
B.Greenham 32d464fe77 Finish adding custom operstring support. 2010-03-03 23:06:32 -05:00
B.Greenham 6d1f5fcc73 Automated merge with ssh://shadowircd/uranium/shadowircd/ 2010-03-03 22:59:49 -05:00
B.Greenham 3e06a4c803 Finish adding swhois support. 2010-03-03 22:59:26 -05:00
JD Horelick ccd2e3b8ee Have KICK not show snotes when you're opped in the channel and you have
override on.
2010-03-03 22:34:44 -05:00
JD Horelick 90e68bbebf Added some stuff to NEWS (primarily about metadata and OACCEPT). 2010-03-03 20:53:25 -05:00
B.Greenham 1e25cb1e0e Add core/m_metadata.c , a module required for metadata propegation to work. 2010-03-03 20:41:39 -05:00
B.Greenham 3b0e9fa20e Automated merge with ssh://shadowircd/uranium/shadowircd/ 2010-03-03 20:38:57 -05:00
B.Greenham fb87421d0e Add user metadata. 2010-03-03 20:38:50 -05:00
JD Horelick fbb60f41c5 Remove override and immune from the shadow TODO since they're done now. 2010-03-03 20:28:22 -05:00
Jilles Tjoelker 12894c8888 Add code to expire "propagated" bans.
The data structure is very simple: a dlink list of all propagated bans.
2010-03-04 00:21:22 +01:00
Jilles Tjoelker ebae0e200e ConfItem.next is not used, remove it. 2010-03-03 23:36:28 +01:00
Jilles Tjoelker 8a1d7222f4 bandb: Group writes in transactions to reduce load on heavy kline activity.
When a ban is added or removed, open a transaction and
close it after 3 seconds; any bans in the 3 seconds
will not trigger another transaction (= 4 fsyncs with
sqlite).

The transaction is also committed if ircd closes the
connection, but not if bandb itself is terminated with
a signal.
2010-03-03 22:58:16 +01:00
JD Horelick e7c1f6a51f Luke! Use the fail Luke!
The fail. I am made of it.
* Jdhore boards the failboat.
2010-03-03 15:38:28 -05:00
JD Horelick cb097b8840 Don't discard self-oppings from remote override opers.
There's a small chance this could be incorrect.

Also, the final set of override cleanups.
2010-03-03 15:34:57 -05:00
JD Horelick 565f4362f2 A couple more chm_hidden cleanups/fixes. 2010-03-03 15:16:06 -05:00
JD Horelick f428b59fa8 Add +M awareness to KICK. 2010-03-03 14:51:25 -05:00
JD Horelick 0e4a619958 Added immune extension. Maybe it'll be added to the docs later...Maybe not.. 2010-03-03 14:44:41 -05:00
JD Horelick 1cdd8fdfd7 Framework for hidden (only opers can see/set them) chmodes.
The first one of these is +M and the actual extension which handles
+M will be added next commit.
2010-03-03 14:35:54 -05:00
JD Horelick b869e117f0 Woohoo! Override is complete barring a few possible cleanups in the futures. 2010-03-03 14:11:53 -05:00
JD Horelick 4ed822ed95 Add override support to ban/quiet, owner, op, halfop and voice. 2010-03-03 13:52:31 -05:00
JD Horelick c6fa55060c Made TOPIC override send snotes. 2010-03-03 13:21:28 -05:00
JD Horelick 4ebf686203 Add oper:override priv to the .confs 2010-03-03 12:56:56 -05:00
JD Horelick ee36f72f5d I fail. Move the epiration of +p statement lower so it actually...works. 2010-03-03 03:43:16 -05:00
B.Greenham e6f2e49e86 Fix the typos in the last commit so it compiles and works. 2010-03-03 01:00:07 -05:00
B.Greenham e787d3a226 Add conf options for swhois and operstring, though they don't do anything yet. 2010-03-03 00:52:13 -05:00
JD Horelick 1332a0ef97 Make +p expiry more robust 2010-03-02 20:49:51 -05:00
JD Horelick 9ace21a74d First step of expiry of +p crap. 2010-03-02 20:33:58 -05:00
JD Horelick eccd1c58d2 Initial support for 'noisy' oper-override of channel modes, using omode-type code. Supports simple modes at present. 2010-03-02 19:54:59 -05:00
B.Greenham 08e35f665f Add operator::vhost option. 2010-03-02 18:46:08 -05:00
JD Horelick fbd2e5da56 Make KICK and INVITE send snotes on override. 2010-03-02 13:07:14 -05:00
B.Greenham 220c9db54d Add general::default_operhost. 2010-03-02 01:57:25 -05:00
B.Greenham 1a9821cd51 Make it so that halfops cannot set +-h 2010-03-01 20:12:11 -05:00
JD Horelick 2f3b62d0ad Added a quite cool item to the 6.1 Todo. 2010-03-01 15:51:11 -05:00
B.Greenham 70e4cb8615 Fix a bug I introduced by being a massive idiot. 2010-03-01 15:01:11 -05:00
B.Greenham 5ad94b5000 Add channel::exemptchanops, and make +cCDTNG support it. 2010-03-01 02:43:55 -05:00
JD Horelick 2d465e2456 Add ShadowIRCd 6.0 changes to NEWS. 2010-02-28 23:08:44 -05:00
B.Greenham 23b98f3f5a Add blank +K (norepeat) chmode, though it does nothing yet. 2010-02-28 23:06:42 -05:00
B.Greenham 0eceaff17a Borrow some ircd-seven code to create channel::use_local_channels. 2010-02-28 22:42:59 -05:00
B.Greenham 7956414175 Add TODO for ShadowIRCd-6.1. 2010-02-28 21:56:44 -05:00
Jilles Tjoelker cf06f92b78 Make struct operhash_entry private. 2010-03-01 01:24:00 +01:00
Jilles Tjoelker a0f4c418d3 Track who set a dline/kline/xline/resv as in ratbox3.
Like in ratbox3, there is no way to query this information
(other than bandb's tables, but they worked before this
commit).
2010-03-01 01:23:22 +01:00
B.Greenham fdbbf311ef Update refrence.conf's explanation of invex/except with warnings about disabling them via rehash. 2010-02-28 16:50:51 -05:00
Jilles Tjoelker a04002a292 Fix memory leak on /rehash bans.
We do not have the 'oper' field in klines yet.
2010-02-28 16:45:25 +01:00
B.Greenham 16c19d9c7d Add lines warning people of the confusion that awaits them upon disabling +ah and rehasing. 2010-02-28 14:58:44 -05:00
B.Greenham 77f41d510f Add extensions to the config file which were previously missing. 2010-02-28 14:30:06 -05:00
B.Greenham 6a52011244 Fix m_kick so that it checks if you're trying to kick the target, not yourself. 2010-02-28 12:07:16 -05:00
Jilles Tjoelker 157c1f04bd Generate the "Temporary K-line %d min" part from aconf->hold - aconf->created. 2010-02-28 16:27:06 +01:00
JD Horelick 814ff8c649 Add a space at the top of CREDITS 2010-02-28 03:19:51 -05:00
B.Greenham d6db6693bd Update TODO. 2010-02-28 02:40:31 -05:00
B.Greenham 82f8e812f5 Add full support for +a (owner) and +h (halfop) chmodes. 2010-02-28 02:35:48 -05:00
B.Greenham fc5ba33325 Fix a couple typos. 2010-02-27 23:47:39 -05:00
B.Greenham 154760066c There's no reason to use get_channel_access() in chm_forward, use is_any_op() instead. 2010-02-27 23:44:14 -05:00
B.Greenham e2e3509129 Update extensions for +ah. 2010-02-27 23:20:01 -05:00
B.Greenham c63f75891b Update burst_TS6() for +ah. 2010-02-27 23:10:04 -05:00
B.Greenham da77e1eed9 Update change_nick_user_host() to support +ah. 2010-02-27 23:04:32 -05:00
B.Greenham b8643345db Update find_channel_status() for halfop and owner. 2010-02-27 22:50:41 -05:00
B.Greenham 823e288d57 Automated merge with ssh://shadowircd/uranium/shadowircd/ 2010-02-27 22:33:24 -05:00
B.Greenham 5af82425e0 Add +ah to the 005, if they are enabled. 2010-02-27 22:32:19 -05:00
JD Horelick d6a0775b9f Make credits show up properly in INFO. Who'd have guessed you needed
more than \n for a newline?
2010-02-27 22:27:29 -05:00
B.Greenham 40c6b59b63 Add is_halfop() and is_owner() and start using them in the new functions. 2010-02-27 21:53:46 -05:00
B.Greenham 0b7d7dd960 Automated merge with ssh://shadowircd/uranium/shadowircd/ 2010-02-27 21:27:18 -05:00
B.Greenham b3b2ed9780 Add can_kick_deop() and use it in m_kick. 2010-02-27 21:27:05 -05:00
JD Horelick e3a9472dd6 Edit ze credits file to add the shadowircd6 info and people and
things and junk and stuff.
2010-02-27 21:15:37 -05:00
B.Greenham ce3ec6fbd3 Add to the descriptions of owner and halfop in refrence.conf. 2010-02-27 20:27:24 -05:00
B.Greenham 46f0c51863 Add config options for owner and halfop. 2010-02-27 20:05:07 -05:00
B.Greenham bbc6973347 Move is_chanop_voiced() to a function in channels.c in preperation for +ah. 2010-02-27 19:40:52 -05:00
B.Greenham 7a425f2db3 Automated merge with ssh://shadowircd/uranium/shadowircd/ 2010-02-27 19:20:19 -05:00
B.Greenham d1c7eccf6a Add is_any_op() in preperation for adding +ah, start using it instead of is_chanop() in a few places. 2010-02-27 19:20:01 -05:00
Jilles Tjoelker ce60772db6 Store the creation time of klines and dlines as a time_t instead of as text.
The value 0 indicates the creation time is unknown (currently the case
for bandb).
Also store a creation time for xlines and resvs, but do not use it yet.
2010-02-28 00:46:56 +01:00
Jilles Tjoelker bebc68755d Add a missing comment for new /challenge numerics. 2010-02-27 23:56:56 +01:00
Alexander F?r?y 360742bdf4 Use RPL_QUIETLIST and RPL_ENDOFQUIETLIST instead of RPL_BANLIST and
RPL_ENDOFBANLIST for channel mode +q.
2010-02-27 01:08:41 +01:00
JD Horelick 6b77736ac0 Change default NICKLEN to 31 to be better for most people/networks. 2010-02-26 13:59:44 -05:00
B.Greenham 4424a19423 s/Charybdis/ShadowIRCd/ in the message it gives you at the end of configure. 2010-02-26 12:42:13 -05:00
B.Greenham 846aa234b8 Add the +J channelmode and config options, though they don't do anything yet. 2010-02-26 00:30:39 -05:00
JD Horelick f966f567b8 Automated merge with ssh://hg@bitbucket.org/uranium/shadowircd/ 2010-02-25 22:57:32 -05:00
B.Greenham 0099f31acf Add some code back in that I accidentally deleted. 2010-02-25 20:41:19 -05:00
B.Greenham 700e690027 Update TODO. 2010-02-25 20:37:27 -05:00
B.Greenham 99c780941a Fix everything I broke with the last three commits and make +G work for real. 2010-02-25 20:36:03 -05:00
B.Greenham 12cbce8059 Fix up +G and make it actually work. 2010-02-25 19:16:38 -05:00
B.Greenham c279d43b75 Add has_common_channel(), which is needed by umode +G. 2010-02-25 19:15:13 -05:00
B.Greenham 61ffa214b4 Add umode +G, soft callerid. 2010-02-25 17:57:12 -05:00
B.Greenham ffffcf7321 Fix indentation in help/opers/umode. 2010-02-25 16:58:34 -05:00
JD Horelick 0a9c5766e7 Compile fix 2010-02-25 16:24:06 -05:00
JD Horelick ced234b867 Added +p to the helpfile 2010-02-25 16:16:30 -05:00
JD Horelick a4f6509ce1 more override stuff 2010-02-25 16:15:17 -05:00
JD Horelick 13a467bb98 Override part one. 2010-02-25 16:01:03 -05:00
JD Horelick afe430eebb Backed out changeset 677d7b5cbbcc 2010-02-25 15:47:08 -05:00
JD Horelick c7c1673d10 bad 2010-02-25 15:46:42 -05:00
JD Horelick cff17f66fa branch merge 2010-02-25 15:13:24 -05:00
JD Horelick da3ba37e04 Backed out changeset 0d7b5f2ac591 2010-02-25 15:13:12 -05:00
JD Horelick 4355dbd3c9 branch merge 2010-02-25 15:12:18 -05:00
JD Horelick 47fab428b1 Backed out changeset 65db6ca26281 2010-02-25 15:11:43 -05:00
B.Greenham b2e398fa72 Remove an unnecessary bit from the TODO. 2010-02-25 03:31:11 -05:00
B.Greenham 8b1a522e81 Hey, charybdis already kinda does these two. 2010-02-25 02:48:02 -05:00
B.Greenham 05c4e3c779 Fix a typo in help/opers/cmode. 2010-02-25 01:54:25 -05:00
B.Greenham 48d9c3446a Update TODO. 2010-02-25 01:52:23 -05:00
B.Greenham 2b3c7c29c3 Add chmode +G, which blocks messages in all caps. 2010-02-25 01:51:28 -05:00
B.Greenham 3b84aed4b4 Update TODO. 2010-02-25 01:16:51 -05:00
B.Greenham ea4041ece9 Automated merge with ssh://shadowircd/uranium/shadowircd/ 2010-02-25 01:14:49 -05:00
B.Greenham afd4834b50 Add chmode +N, which prevents nickchanges. 2010-02-25 01:14:38 -05:00
JD Horelick 13ec57db15 autochanmodes support 2010-02-24 22:18:13 -05:00
JD Horelick 44a8fbc29e Actually add +p umode and expiry code. It currently does nothing though. 2010-02-24 21:53:45 -05:00
JD Horelick 5974ba0c55 Add the config handling code for expire_override_time config option.
Part one of override stuff. This is gonna be painful.
2010-02-24 20:28:17 -05:00
Jilles Tjoelker fc551dced3 help: Remove references to old ban .confs,
calling bandb "the database" instead.
2010-02-24 23:31:56 +01:00
Jilles Tjoelker ba6e142043 Use FLAGS_SENTUSER when checking whether to register when ping cookie is received. 2010-02-24 23:28:27 +01:00
B.Greenham e2994faec6 Add the new umodes to documentation in refrence.conf. 2010-02-24 13:02:09 -05:00
B.Greenham b7ec309451 Fix some indentation in refrence.conf. 2010-02-24 12:43:05 -05:00
B.Greenham 4efc8651ac Add hostserv/botserv aliases to the example confs. 2010-02-24 12:04:49 -05:00
B.Greenham 60e16d64e7 Add +x to default_umodes in the example confs, since we're loading ip_cloaking by default. 2010-02-24 11:57:52 -05:00
B.Greenham 28ba4f8f97 Let's not forget to save before we commit next time. 2010-02-24 11:52:03 -05:00
B.Greenham e432274159 Uncomment extensions in the default configs that almost everyone is going to want enabled anyway. 2010-02-24 11:49:07 -05:00
B.Greenham 0c33b827d0 Add m_force to extensions/README and to the example config files. 2010-02-24 11:44:25 -05:00
B.Greenham 9903cf1420 Change a lingering refrence to umode +h to umode +x 2010-02-24 11:33:26 -05:00
B.Greenham ae148f147c And let's not forget the TODO. 2010-02-23 22:39:31 -05:00
B.Greenham 837a020a0c Add general::secret_channels_in_whois. 2010-02-23 22:38:35 -05:00
B.Greenham 763e2baade Make operspy prefix secret channels with * instead of ! . 2010-02-23 21:51:41 -05:00
JD Horelick 78d9febea1 Clean up the ip_cloaking mess. Remove the quite old ip_cloaking modules,
rename ip_cloaking_4.0 to ip_cloaking since because of umode additions,
shadow6 isn't link-compatible with charybdis anyway so might as well
have the cloaking on a expected umode.
2010-02-23 20:50:54 -05:00
Stephen Bennett 47148a3e79 Use FLAGS_SENTUSER instead of 'user' being non-empty to decide whether to register a user on CAP END.
identd and SASL can cause source_p->user to be present without USER having been sent.
Without this change, that could cause a crash later on as localClient->fullcaps is not initialised.
2010-02-23 22:35:58 +00:00
JD Horelick 45b9f1cbc0 Added channel::host_in_topic. 2010-02-23 20:19:58 -05:00
JD Horelick ccac85bf9c Should've updated the TODO on the last commit. I suck. 2010-02-23 19:51:38 -05:00
JD Horelick c3a0fde28f Added cycle_host_change option. 2010-02-23 19:50:45 -05:00
B.Greenham 70731d4fed Update the TODO. 2010-02-23 18:20:30 -05:00
B.Greenham f9e91eceaa Add chmode +E, which prevents ops from using /kick on channels where it is set. 2010-02-23 18:14:43 -05:00
JD Horelick aa35afbb1f Some changes to bring the code i moved all around up-to-date. 2010-02-23 04:12:11 -05:00
B.Greenham 6faf3f4d40 Make it so that only opers see modes in whois. 2010-02-23 03:12:19 -05:00
B.Greenham be2d3c114f Make the last commit actually compile. 2010-02-23 03:08:58 -05:00
B.Greenham 88b63e6506 Make the target user's modes show up in whois. 2010-02-23 02:59:35 -05:00
JD Horelick 074fe45ad7 Some quick user_join() call fixes. 2010-02-23 02:56:57 -05:00
JD Horelick 677e21a450 Constify the header too :D 2010-02-23 02:53:44 -05:00
JD Horelick 824455aba6 Forgot to constify 2010-02-23 02:53:19 -05:00
JD Horelick 3472ff3fec Add an include 2010-02-23 02:52:53 -05:00
JD Horelick 9230426e7a More moving 2010-02-23 02:52:01 -05:00
JD Horelick 67b90240c4 move user_join() to channels.c 2010-02-23 02:48:33 -05:00
JD Horelick 080bb5cf25 Start moving parts of join to channels.c so they can be used in more places. 2010-02-23 02:41:26 -05:00
JD Horelick 2c489d8e65 Backed out changeset 199eadae216a 2010-02-23 02:04:53 -05:00
JD Horelick 6d3e983251 Compile fix 2010-02-23 02:01:19 -05:00
B.Greenham 0bd6cfbe28 Compile fix. 2010-02-23 01:58:38 -05:00
JD Horelick f8b8808ac7 Move m_force to extensions. 2010-02-23 01:42:36 -05:00
JD Horelick f34794d0a8 s/charybdis/shadowircd/ in some other reasonably user-facing places. 2010-02-23 01:27:23 -05:00
JD Horelick 867dcc9f02 Changed version to shadowircd 6.0.0-dev. Going to work on
changing some more strings.
2010-02-23 01:22:15 -05:00
JD Horelick 0d2815dd94 Added some more stuff to the TODO-SHADOW 2010-02-23 01:17:37 -05:00
B.Greenham dacfb79db6 Merge. 2010-02-23 01:10:39 -05:00
JD Horelick cda9a0d833 Add TODO for ShadowIRCd 6.0 2010-02-23 01:08:56 -05:00
B.Greenham 7e6c9180da Add chmode +D, which blocks CTCP ACTION. 2010-02-23 01:08:42 -05:00
B.Greenham 92504d43b1 Merge. 2010-02-23 00:54:16 -05:00
B.Greenham 6afd4b916f Add chmode +T, which blocks notices. 2010-02-23 00:49:24 -05:00
JD Horelick e54944ef98 Whoops, small fail. 2010-02-23 00:43:34 -05:00
JD Horelick 87f58b4ffb Add oper autojoin (with auth::autojoin_opers config option). 2010-02-23 00:41:14 -05:00
JD Horelick fa72cee166 Added autojoin-on-connect (with auth::autojoin config option). 2010-02-23 00:22:37 -05:00
B.Greenham 930629c5f2 Add umode +B, which marks users with it set as a bot in whois. 2010-02-23 00:21:24 -05:00
B.Greenham 2678f87a51 Fix some indentation I messed up while adding umode +C. 2010-02-22 23:10:36 -05:00
B.Greenham 854f6bd0af Add umode +V, which blocks invites to anyone with it set. 2010-02-22 22:45:37 -05:00
B.Greenham ccfc9b567d Add umode +C, which blocks CTCPs to anyone with it set. 2010-02-22 22:14:47 -05:00
Jilles Tjoelker 3d17692d72 Remove some obsolete paths from config.h. 2010-02-22 23:53:45 +01:00
Jilles Tjoelker c6d5c019d0 Remove more old kline.conf stuff.
Make sure to recompile modules, stuff has been removed
close to the start of ConfigFileEntry.
2010-02-22 19:31:05 +01:00
Jilles Tjoelker ed1dc6b379 gnutls: I guess a gnutls_x509_crt_deinit() is needed to avoid memory leak. 2010-02-22 19:16:37 +01:00
Jilles Tjoelker 918a0e1d39 Remove code to write bans to csv files. 2010-02-22 19:09:46 +01:00
William Pitcock 0a62583676 gnutls: Add support for certfp gathering. 2010-02-22 11:13:59 -06:00
Jilles Tjoelker 3abf5074d3 Add spambot check changes to NEWS. 2010-02-21 23:15:07 +01:00
Jilles Tjoelker fdd0b6ccf1 Do not penalize for spambot checks if creating a new channel. 2010-02-21 01:45:51 +01:00
Jilles Tjoelker b6698246ba spambot checks: Fix excessive expiry in some cases. 2010-02-21 01:29:41 +01:00
Jilles Tjoelker 896e8e51b7 JOIN 0: Make spambot check equivalent to PART's. 2010-02-21 01:12:04 +01:00
Jilles Tjoelker 8cf4cea3da Remove dead code: last_join_time is already updated by check_spambot_warning(). 2010-02-21 01:10:04 +01:00
Jilles Tjoelker d5e959f179 Do not check for spambot if the user is not allowed to join the channel. 2010-02-21 01:07:32 +01:00
Jilles Tjoelker 6af7e4faa6 Fix a memory leak with client certificates. 2010-02-19 16:55:15 +01:00
William Pitcock ba29286a4a Do not try to free the alias dict if it does not exist. 2010-02-18 18:38:26 -06:00
William Pitcock 552379f2ab Automated merge with ssh://hg.atheme.org//hg/charybdis 2010-02-18 18:11:32 -06:00
William Pitcock b3fa6c9dc6 Fix libtool build issue. 2010-02-18 18:11:23 -06:00
Jilles Tjoelker 8a64e49e4c challenge: Fix build. 2010-02-18 23:42:07 +01:00
William Pitcock ad5a342de8 Added tag proposed-charybdis-3.2.0 for changeset 7450d2086b3a 2010-02-18 07:35:05 -06:00
William Pitcock 4a92cf0d61 Removed tag proposed-charybdis-3.2.0 2010-02-18 07:35:01 -06:00
William Pitcock 790bfe43cb Documentation updates for the ip_cloaking_4.0 transition. 2010-02-18 07:34:40 -06:00
William Pitcock a58d052d02 Add ip_cloaking_4.0 module, which is the same cloaking as 3.2, but moves the usermode from +h to +x,
which allows us to start transitioning this usermode change.
2010-02-18 07:30:26 -06:00
William Pitcock 11272f5480 Added tag proposed-charybdis-3.2.0 for changeset 99d6cacd4454 2010-02-17 23:13:42 -06:00
William Pitcock 1800d9737b Run autoreconf. 2010-02-17 23:12:45 -06:00
William Pitcock ad03121116 Set autoconf version to 3.2.0. 2010-02-17 23:12:17 -06:00
William Pitcock 08178b13dd BUGS is no longer relevant, as the build system installs files in a way where this is no longer a problem. 2010-02-17 23:11:33 -06:00
William Pitcock 6d194359ab Change license version in version.c.SH (GPLv1 -> GPLv2) so that it agrees with the other documentation. 2010-02-17 23:05:47 -06:00
William Pitcock 8afd32ce07 s/o:lines/operator blocks/ 2010-02-17 23:01:58 -06:00
William Pitcock 1c19179d64 Add certfp check to challenge too. 2010-02-17 23:01:25 -06:00
William Pitcock e4c72f7919 Clarify ERR_NOOPERHOST and convert it to use sendto_one_numeric(). 2010-02-17 06:51:41 -06:00
William Pitcock eb2d2b8d76 hurt: unbreak compile 2010-02-17 06:44:42 -06:00
William Pitcock d8a023eddd Add support for client certificate fingerprints in o:lines. 2010-02-17 06:41:41 -06:00
Jilles Tjoelker 04a611e26e Update target change documentation. 2010-02-17 00:38:08 +01:00
Jilles Tjoelker c9013e0d8b Update NEWS. 2010-02-17 00:24:12 +01:00
Jilles Tjoelker 625a2b1f99 Subject /invite to umodes +g and +R.
The behaviour is the same as /msg except that where
/msg would send RPL_UMODEGMSG to the user, the /invite
is instead let through. This counts as a notification
for caller_id_wait like RPL_UMODEGMSG.

Checks are on the target user's server, which means an
error message will appear after RPL_INVITING.
This must be because the accept list is not globally
known.
2010-02-15 23:07:14 +01:00
Jilles Tjoelker 0f18c084bb Add missing return value. 2010-02-15 22:18:00 +01:00
Jilles Tjoelker 3f76eb8a8c Subject /invite to target change.
Similar to /msg, inviting a user that is not in a channel
you have op or voice in requires a free target; opers always
have a free target.

Being invited adds the source as a reply target.
2010-02-15 22:08:55 +01:00
Jilles Tjoelker 878733fd68 Move target change code to src/tgchange.c,
so we can use it for /invite as well.
2010-02-15 21:58:34 +01:00
Jilles Tjoelker 7eb9307794 target change: Allow free replies.
When a user receives a private message, notice or RPL_UMODEGMSG,
add the source to a special set of 5 target slots.
These slots are checked in the normal way when sending messages,
allowing a reply without using up a free target.

This feature will not be very useful if a user is being messaged
by many different users; to help this, messages blocked entirely
by +g or +R do not affect the targets. CTCP replies also remain
free in terms of targets.
2010-02-15 01:07:07 +01:00
Jilles Tjoelker 3002877654 target change: Overwrite the least recently used target with a new one. 2010-02-15 00:31:17 +01:00
Jilles Tjoelker d29b1834c3 Make the number of targets tracked for target change a #define. 2010-02-13 15:18:17 +01:00
JD Horelick 957ee03b56 English fix to fix the fix i made about 80 minutes ago.
I suck at a/an cometimes. Also, fix.
2010-02-08 18:04:54 -05:00
JD Horelick b17999e11b One or 2 English language cleanups. Less than I thought there were. 2010-02-08 16:28:08 -05:00
Jilles Tjoelker 360a73dc94 Add new function rb_get_ssl_certfp() to export-syms.txt. 2010-02-07 20:38:37 +01:00
Jilles Tjoelker 0e0c4508f1 testline/testgecos: Send "not an oper" message if appropriate. 2010-02-07 17:57:36 +01:00
Jilles Tjoelker 54656d7650 Pass certfp to other servers and show it in whois. Do not show it on connect.
The server protocol for this is
:<uid> ENCAP * CERTFP :<40 hex chars>
both in new user introductions and in burst.

As in oftc-hybrid, only the user themselves and opers can see the certfp.

Displaying the certfp on connect seems unnecessary to me,
the user can whois themselves if needed.
2010-02-06 00:18:27 +01:00
Jilles Tjoelker 8329f99cf9 Fix serno.h for compiles from Mercurial. 2010-02-03 00:46:14 +01:00
Jilles Tjoelker f7b5446177 Apply ratbox3 workaround for too permissive inet_pton6():
Any kline (or various other things) containing * or ? is
a mask kline and not an IP kline. Ideally, rb_inet_pton_sock()
would return failure for those, but in practice this is not
always the case for IPv6.

Such a kline that is erroneously treated as an IP line
likely matches way fewer IPs than expected.
2010-02-03 00:44:51 +01:00
William Pitcock 09fb2d185d Clarify CertFP message. 2010-01-31 17:35:15 -06:00
Jilles Tjoelker a099270d45 Add certfp support to libratbox and ssld.
This lets a user connect with a client certificate, and
passes the certificate's fingerprint to ircd, which
currently just notices it to the user.

A new ssld->ircd message 'F' is used to pass on the
fingerprint.

This is only for OpenSSL for now, not GNUTLS.
2010-01-31 19:04:20 +01:00
William Pitcock 436cf01700 Automated merge with ssh://hg.atheme.org//hg/charybdis 2010-01-30 19:21:28 -06:00
William Pitcock 4b253d3bd7 modreload: Causing an entire 50,000 user network to crash due to user-error is a bad idea, don't let it happen again by not allowing paths in /modreload. 2010-01-30 19:21:17 -06:00
Jilles Tjoelker cfc8334833 Slightly tighten auth{} duplicate check:
If the existing auth{} block has no auth_user, it will
trump any auth{} block for the same u@h.
2010-01-31 01:40:43 +01:00
Jilles Tjoelker 67cc1f0c96 Take auth_user into account when detecting redundant/duplicate auth{}.
from ircd-seven (spb)
2010-01-31 01:36:37 +01:00
Jilles Tjoelker 66a1809526 No need to be paranoid about clearing auth_user.
It is a username, not a password.
2010-01-31 01:30:25 +01:00
Jilles Tjoelker e37a8398ce Fix memory leak with auth_user.
from ircd-seven (spb)
2010-01-31 01:29:08 +01:00
Jilles Tjoelker 6d70eae633 Remove remnants of <foo>_t typedefs. 2010-01-30 15:57:10 +01:00
Jilles Tjoelker 306274351b Fix /links buffer overflow. 2010-01-27 21:05:10 +01:00
Jilles Tjoelker 04bf0760f9 Fix op-moderate (cmode +z) for channel names with '@'. 2010-01-24 19:37:00 +01:00
Jilles Tjoelker 7748deb557 Do not read in help files starting with a dot (including dot and dot-dot). 2010-01-22 02:02:45 +01:00
Jilles Tjoelker a7b9067e0f Fix include/serno.h generation.
Apparently #value# is no longer special in hg templates.
2010-01-22 01:41:48 +01:00
Jilles Tjoelker 8b4cf5c15b Fix memory leak and bad error reporting with posix_spawn():
* an initialized posix_spawnattr_t must be destroyed
* posix_spawn() returns an error number instead of setting errno

libratbox trunk r26730
2010-01-22 00:09:56 +01:00
Stephen Bennett b4c26701c3 Don't cache files that are empty or not files. Avoids crashing on the likes of 'HELP .' 2010-01-21 16:27:34 +00:00
Jilles Tjoelker 343e239585 Put back fb7d6089158e, not setting large_ctcp_sent for CTCP ACTION. 2010-01-20 00:03:57 +01:00
William Pitcock 92a7995129 Merge +C (no CTCP to channels) from ircd-seven. 2010-01-19 02:11:04 -06:00
William Pitcock f5e7f3182b Automated merge with ssh://hg.atheme.org//hg/charybdis 2010-01-19 01:47:27 -06:00
William Pitcock 0a304f3813 supported: Add CLIENTVER=3.0 to indicate presence of 3.0 core capabilities (such as CAP, extended WHO, etc) as requested by LifeIsPain. 2010-01-19 01:47:21 -06:00
Jilles Tjoelker ebc55af53c Do not set large_ctcp_sent for CTCP ACTION as it does not request a reply. 2010-01-14 01:12:16 +01:00
Jilles Tjoelker ddbd4a8151 If a removed resv was temporary, mention this in the server notice.
This agrees with xline.
2010-01-09 22:14:53 +01:00
Jilles Tjoelker 4d9be1a6a3 Add back unresv (permanent resv) notices. 2010-01-09 22:12:06 +01:00
Jilles Tjoelker 609a0d5514 Put back resv_forcepart.
This undoes erroneous revert in a3c064b3b8a2.
2010-01-09 19:08:48 +01:00
Jilles Tjoelker 70c6c150f6 Complete the move of xlines and resvs from aconf->name to aconf->host. 2010-01-08 18:46:29 +01:00
Jilles Tjoelker 28853c8531 bantool: change empty oper fields to "unknown".
Otherwise they would cause a crash when ircd tries to load them.
2010-01-08 18:17:16 +01:00
Jilles Tjoelker c2e615382b Do not change \s in xlines to spaces, match_esc() treats \s correctly.
This undoes erroneous revert in a3c064b3b8a2.
2010-01-08 18:13:47 +01:00
Jilles Tjoelker 36999fb194 Fix build: we need -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION=1
for the sqlite sources.
2010-01-08 16:02:30 +01:00
William Pitcock 4cb3ae7836 Add back missing notices. 2010-01-07 18:17:08 -06:00
William Pitcock ff0482a9cb Fix up more things with bandb. 2010-01-07 18:14:15 -06:00
William Pitcock 9f02582216 Load in new bans from bandb on startup. 2010-01-07 18:06:15 -06:00
William Pitcock 3aa4e417b9 Make this work again. 2010-01-07 17:50:49 -06:00
William Pitcock 03368cb9ab Make this work again. 2010-01-07 17:49:08 -06:00
William Pitcock d63447bfe7 Readd some oper notices. 2010-01-07 17:37:52 -06:00
William Pitcock 58af12a20d Start bandb on ircd initialization. 2010-01-07 17:22:44 -06:00
William Pitcock d8a4c5f618 Update modules to use bandb_add()/bandb_del(). 2010-01-07 17:19:03 -06:00
William Pitcock 2c9a27c46a Add bandb IRCd APIs. 2010-01-07 17:10:16 -06:00
William Pitcock 4ecc1955f0 Add sqlite3 to build. 2010-01-07 17:00:24 -06:00
William Pitcock 7a85b88995 bantool: Fix compilation error. 2010-01-07 17:00:18 -06:00
William Pitcock dbc4e40434 Add DBPATH. 2010-01-07 16:55:34 -06:00
William Pitcock 042acc47bb Run autoreconf. 2010-01-07 16:51:32 -06:00
William Pitcock 5545c7ea81 Link bandb to build. 2010-01-07 16:51:09 -06:00
William Pitcock 7641ecd8cc Add bandb code. 2010-01-07 16:50:34 -06:00
William Pitcock e36c166d49 Automated merge with ssh://hg.atheme.org//hg/charybdis 2010-01-07 16:02:56 -06:00
William Pitcock 778a1c0184 Update trunk to 3.2 (non-release). 2010-01-07 16:02:50 -06:00
Jilles Tjoelker 9e8b3b4345 SCAN UMODES: default list-max to 500, like a global WHO. 2010-01-01 22:55:25 +01:00
Jilles Tjoelker 5c3794b9f0 Update some copyright years. 2010-01-01 22:46:34 +01:00
Jilles Tjoelker 7f9423cb2a ts6-protocol.txt: mention meaning of capabs EX, IE, SERVICES, KNOCK. 2009-12-26 00:25:52 +01:00
Jilles Tjoelker 25b1f927be Remove FLAGS_SENDQEX, fix sendq exceeded snotes for servers.
from ircd-ratbox
2009-12-21 16:58:25 +01:00
Jilles Tjoelker 29e3823d48 Add two more reasons why ssld_count>1 can be useful: bugs and fd limits. 2009-11-18 00:00:07 +01:00
Jilles Tjoelker 661f214917 ssld: Fix an fd leak when closing connections.
Lightly tested.
2009-11-15 23:11:18 +01:00
Jilles Tjoelker e175522025 ssld: Do not crash if not all fds in a message could be received.
Actually fill the mod_ctl_buf_t.nfds field.
2009-11-15 22:41:02 +01:00
William Pitcock eb94e0e2f2 Automated merge with ssh://hg.atheme.org//hg/charybdis 2009-10-24 21:07:53 -05:00
William Pitcock 32f33374f8 If you're going to censor my jokes, at least do it right. 2009-10-24 21:07:41 -05:00
Jilles Tjoelker 6abfcc55d0 Note that blacklist{} only accepts host/reason pairs, no host+host+reason. 2009-10-18 21:08:37 +02:00
Jilles Tjoelker 14a64ad404 Use full (:n!u@h) prefix for sending ETB from a user to clients. 2009-09-20 00:44:47 +02:00
Jilles Tjoelker 100563e836 Force part local users (not resv_exempt) on channel resv.
A notice will be sent to any force parted users that the channel
is temporarily/permanently unavailable on the server.
A new config option channel::resv_forcepart can be used to disable this.

from ircd-ratbox (dubkat)
2009-09-19 21:24:35 +02:00
William Pitcock 022573be75 Display o:line "nickname" in global oper-up messages. 2009-07-13 12:55:35 -05:00
Jilles Tjoelker 4486c20089 Fix fd passing on FreeBSD/amd64 and possibly Solaris/sparc.
The number of file descriptors in the message was not
determined correctly.
2009-07-10 00:27:01 +02:00
Jilles Tjoelker fe86a70d9a Show yyerror() parse errors on stderr on startup.
Noticed by: spb
2009-06-18 00:37:19 +02:00
Jilles Tjoelker f1c550ee4f Correct clone command. 2009-06-09 18:46:40 +02:00
Jilles Tjoelker f80e76cf2c Disallow changing away status via /presence.
Allowing this desynchronizes clients and servers that
do not know about this extension without good reason.
If you want to allow this, change it to spit out the
usual AWAY protocol.
2009-06-04 00:01:57 +02:00
Jilles Tjoelker 338dd42d64 Reject presence updates with too long keys, instead of truncating them
and causing soft assertion failures. Values are still
silently truncated though.
2009-06-03 23:49:50 +02:00
Jilles Tjoelker 9d393c9052 Add new constants for presence key/value lengths
instead of overloading NICKLEN/TOPICLEN.
2009-06-03 23:38:07 +02:00
Jilles Tjoelker 83ad8add98 Remove two obsolete constants. 2009-06-03 23:18:07 +02:00
Stephen Bennett 4606e8fc6c Merge 2009-12-08 19:23:32 +00:00
Stephen Bennett c387fc41ae Revert all presence-related changes 2009-12-08 19:22:55 +00:00
Jilles Tjoelker 22544e37fb Fix crashes when there are no alias blocks in the conf. 2009-12-05 20:48:02 +01:00
Jilles Tjoelker 084af78f05 Remove two obsolete constants. 2009-06-03 23:18:07 +02:00
Jilles Tjoelker 104fea6cda Do not send two 792 numerics when changing a metadata from one non-empty value to another. 2009-06-03 20:44:37 +02:00
Jilles Tjoelker f62bb0776a Correct minimum parameter counts for PRESENCE. 2009-06-03 20:03:15 +02:00
Jilles Tjoelker 320a0f8528 ENCAPs cannot come from local clients, no need to check. 2009-06-03 19:57:27 +02:00
Jilles Tjoelker 7cc7a2c041 Remove special CAP presence handling of /whois away message.
This cannot work because /whois is executed remotely too
and CAPs aren't known remotely.
2009-06-03 19:54:49 +02:00
William Pitcock fa00b4ada9 presence: m_presence module: Use safer get_metadata() where appropriate, to avoid crash possibilities. 2009-06-02 02:55:45 -05:00
William Pitcock 41c6374550 presence: send..._with_capability...(): don't send if the client does not have the capab but isn't on a channel 2009-06-02 02:48:22 -05:00
William Pitcock a436c5aab0 presence: delete_metadata(): Free from the right heap. 2009-06-02 02:46:37 -05:00
William Pitcock 50aa2dd31d presence: Use RPL_WHOISMETADATA. 2009-06-02 02:44:31 -05:00
William Pitcock 46b3bb7655 presence: Add _butone() variant of sendto_common_channels_local_with_capability(). 2009-06-02 02:38:38 -05:00
William Pitcock 8ccc820864 presence: Broadcast presence changes to peer clients with CLICAP_PRESENCE. 2009-06-02 02:36:18 -05:00
William Pitcock 489f4799c8 presence: Declare RPL_METADATACHG. 2009-06-02 02:32:07 -05:00
William Pitcock a917e9baf3 presence: Add sendto_common_channels_local_with_capability(), used for broadcasting presence updates. 2009-06-02 02:28:02 -05:00
William Pitcock 727a98a669 presence: Declare RPL_WHOISMETADATA. 2009-06-02 02:19:37 -05:00
William Pitcock fa2a410abe presence: If CLICAP_PRESENCE is enabled, then RPL_AWAY is replaced by the "away" keyword in the presence dataset.
As such, only fall back to legacy RPL_AWAY if CLICAP_PRESENCE is not set on source_p.
2009-06-02 02:17:42 -05:00
William Pitcock 6364809623 presence: Add CLICAP_PRESENCE.
This will enable broadcasting presence updates on channels.
2009-06-02 02:14:44 -05:00
William Pitcock e4a64911ae presence: Remove no longer used away_heap. 2009-06-02 02:08:45 -05:00
William Pitcock 51f73b614b presence: Replace stagnant free_away() call with delete_metadata(..., "away"). 2009-06-02 02:06:18 -05:00
William Pitcock 987ef7eb1f presence: Remove user.away, replaced by a metadata entry.
Cache the metadata retrieval value where feasible for minimal performance impact.
2009-06-02 02:03:51 -05:00
William Pitcock 25e664566f presence: Make set_metadata() erase any old metadata for an entry. 2009-06-02 01:53:05 -05:00
William Pitcock 85171f1f16 presence: Add get_metadata(). 2009-06-02 01:50:40 -05:00
William Pitcock 0827f524e0 presence: Add m_presence module. This provides an ENCAP s2s interface and lowlevel client interface. 2009-06-02 01:45:43 -05:00
William Pitcock e5847c3ef3 presence: Add set_metadata() and delete_metadata(). 2009-06-02 01:41:44 -05:00
William Pitcock 95cc7c44e8 presence: Declare RPL_METADATASET and RPL_METADATAREM. 2009-06-02 01:32:09 -05:00
William Pitcock d153f8fef1 presence: Declare MetadataEntry struct. 2009-06-02 01:29:58 -05:00
William Pitcock dd7eb3ffaa presence: Create presence metadata tracking structures where appropriate. 2009-05-30 13:30:57 -05:00
William Pitcock c7f7b72079 struct Client: add a dictionary to contain presence metadata. 2009-05-30 13:17:39 -05:00
William Pitcock 3c6fb31a4b Automated merge with ssh://hg.atheme.org//hg/charybdis 2009-05-30 13:16:01 -05:00
William Pitcock a62c60d5dc Add irc_dictionary.h to stdinc. I'm lazy. 2009-05-30 13:15:58 -05:00
Jilles Tjoelker 481912374a Remove check_banned_lines() code duplication.
We can just call check_dlines(), check_klines() and check_xlines().
2009-05-21 23:11:32 +02:00
Jilles Tjoelker 5f1fd8a556 Remove some obsolete unused definitions. 2009-05-21 16:01:46 +02:00
Jilles Tjoelker fcda56627d Allow ctcp replies through floodcount after ctcp'ing a large group.
A large group is any $$ or $# or a channel with more than
floodcount/2 local members, checked on each server separately.
Note that floodcount checks are done on the sender's server.

The special treatment is active for 15 seconds.
2009-05-17 20:52:16 +02:00
Jilles Tjoelker 8479094d8f Check the return value on rb_pipe.
from ircd-ratbox (r26515) (androsyn)
2009-05-13 22:07:57 +02:00
Jilles Tjoelker e17ab35b5d Remove unused inet_socketpair() code, this is in libratbox now. 2009-05-12 23:56:28 +02:00
Jilles Tjoelker e421505e8c More rb_socketpair() return value checks.
from ircd-ratbox (r26507) (androsyn)
2009-05-12 23:30:46 +02:00
Jilles Tjoelker 77ced1e851 Report errors and close the incoming connection if socketpair fails
for ssl connections.
from ircd-ratbox (r26503) (androsyn)
2009-05-12 23:18:41 +02:00
Jilles Tjoelker ecb0b4b941 Update copyright years in sgml docs. 2009-05-08 22:40:18 +02:00
Jilles Tjoelker 957765c32d Remove notes about now fixed xline \s bugs from sgml docs. 2009-05-08 22:37:20 +02:00
Jilles Tjoelker cbd758d71c Rewrite perm xlines containing '",' from local opers (to '"\,').
The change also applies to xlines sent to other servers.
Note that the backslash must be supplied in an unxline.
Incoming xlines containing '",' are rejected to avoid
inconsistency between servers.
2009-05-08 14:42:55 +02:00
Jilles Tjoelker b6c85cc60b Disallow the sequence '",' in perm xlines,
it would cause problems with xline.conf.
2009-05-08 14:27:30 +02:00
Jilles Tjoelker 44bdc688cb Change \s to space when writing xline.conf, to be compatible with older versions. 2009-05-08 13:40:09 +02:00
Jilles Tjoelker 448a723f81 Disallow double quotes in klines.
These could cause parse problems with kline.conf.
2009-05-08 01:50:35 +02:00
Jilles Tjoelker 6e5b8a5dec Disallow commas in channel resvs.
These can never match and could cause parse problems in resv.conf.
2009-05-08 01:23:40 +02:00
Jilles Tjoelker 63860dd1a7 Change xlines to store spaces as \s.
Spaces in xline.conf files are changed to \s in memory
and recognized on unxline, but are not changed in the
file. New xlines are added to xline.conf files with \s.

xline.conf written by this commit or newer will not work
properly with charybdis older than 1124:131254925f32 (which
introduced \s support in match_esc()).
2009-05-08 00:21:14 +02:00
Jilles Tjoelker eb5e3f1520 Stop changing \s to spaces in masktrace and testmask,
match_esc() handles \s directly now.
2009-05-07 23:58:32 +02:00
Jilles Tjoelker 031c4b89d3 Move check for required CAPABs to mr_server -- CAPAB may not be sent.
Also fix exit message.
2009-04-21 18:43:07 +02:00
William Pitcock fde16193c4 Allow for capabilities to be marked as "required".
If capability negotiation fails on these capabilities, then the server link is dropped.
2009-04-20 09:36:55 -05:00
William Pitcock 16d8d9fc6d can_kick hook, based on the ircd-seven one. 2009-04-20 09:20:11 -05:00
William Pitcock ab45668d6a Automatic branch merge from 'origin/freenode/ircd-seven-merge-to-3.2' to 'trunk'. 2009-04-20 08:43:35 -05:00
Stephen Bennett 1229514e6d / is a host character and not a nick character, so make pretty_mask treat it as such 2009-04-20 08:42:41 -05:00
Stephen Bennett 59bb80930d Allow / in spoofed hosts 2009-04-20 08:37:13 -05:00
Jilles Tjoelker cb9345dcd1 Simplify floodcount checking, it is no longer affected by +g/+R anymore. 2009-04-19 00:04:21 +02:00
Jilles Tjoelker c925bc7706 Use uid/sid for some ERR_CHANOPRIVSNEEDED if they go to a remote client. 2009-04-09 23:45:35 +02:00
Jilles Tjoelker 6d4df0e35c Fix compilation with --enable-assert=soft. 2009-04-08 21:30:58 +02:00
Jilles Tjoelker 0c73c94217 Remove some unused variables. 2009-04-08 21:30:34 +02:00
Jilles Tjoelker 1773e9cbab Add description for TB and TOPIC messages. 2009-03-29 22:05:59 +02:00
Jilles Tjoelker fce3e27d20 Update sgml documentation for +z enhancement. 2009-03-29 18:55:23 +02:00
Jilles Tjoelker 80df74cfc5 Add new topic command ETB, allowing services to set topic+setter+ts always
(provided channelTS != 0).

ETB is controlled by the EOPMOD capab. Fairly complicated
stuff is needed for older servers.

ETB can come from clients or servers, but at this time it
should only be sent from clients, as otherwise it is not
always possible to update older servers.
2009-03-29 17:08:42 +02:00
Jilles Tjoelker 6ce8910d97 Apply +z to messages blocked by +b and +q as well.
This adds a new server capab EOPMOD which will be used
for an extended topic command also.
2009-03-29 15:48:07 +02:00
Jilles Tjoelker b03d78803d Mention that @#chan/+#chan requires CHW capab. 2009-03-29 15:04:17 +02:00
Jilles Tjoelker c066192cad Add GUNGLINE to protocol documentation (efnet only, not in charybdis). 2009-03-25 00:34:12 +01:00
Jilles Tjoelker 2ab422dbdd No profanity. 2009-03-13 19:36:49 +01:00
William Pitcock efd2d7e0e5 Our IRC oper messages are now as enhanced as enhanced interrogation techniques. 2009-03-08 21:06:33 -05:00
Jilles Tjoelker 63a99968da Add /rehash throttles to help file. 2009-03-08 16:45:09 +01:00
Jilles Tjoelker 13ea0f1cd1 rehash bans: show mask in k/x line over-ruled notice
This was already shown in the over-ruled notices on k/x line add.
2009-03-08 14:31:50 +01:00
Jilles Tjoelker 6bba251749 rehash bans: still check k/x lines for users exempt from dlines 2009-03-08 13:30:30 +01:00
Jilles Tjoelker 638156bac9 Use ratbox's match_esc(), this allows \s for space. 2009-03-08 02:14:26 +01:00
Jilles Tjoelker cb4ddd7268 Do not send "<blah> is rehashing <blah>" notices to the remote oper. 2009-03-07 16:57:58 +01:00
Jilles Tjoelker 9bf8f69cc6 Fix close detection with ssl+zip, porting more code from ircd-ratbox.
This tells the SSL ssld to report connection closure to ircd
using the new fd.
2009-03-07 03:23:17 +01:00
Jilles Tjoelker 0b1e46f5b4 Allow /rehash throttles to clear throttling. 2009-03-07 01:49:09 +01:00
Jilles Tjoelker dbbe21ed03 Rework remote rehash messages to apply to all server notices during rehash.
Previously various notices such as those applying
to modules were not sent to the remote oper.
2009-03-07 01:27:05 +01:00
Jilles Tjoelker 9fc01c8c31 ssld: Do not do redundant rb_setselect().
Apparently solaris devpoll/ports may have a problem
with this.
from ircd-ratbox (androsyn)
2009-03-03 22:32:18 +01:00
Jilles Tjoelker 76caaecbba Remove unused declaration. 2009-03-03 22:26:45 +01:00
Jilles Tjoelker 8fc0a9b621 Correct WHOX overflow check so it also works for fields other than the last.
Found with llvm static analyzer.
2009-03-01 01:58:53 +01:00
Jilles Tjoelker a6210c453a Remove some unused variables.
Found with llvm static analyzer.
2009-03-01 01:53:40 +01:00
Jilles Tjoelker d2d703a1d7 Document efnet-style GLINE protocol. 2009-03-01 01:03:58 +01:00
Jilles Tjoelker 00ba96a1eb Import new mkpasswd from ircd-ratbox.
This now uses libratbox.
2009-02-22 00:59:16 +01:00
Jilles Tjoelker 29b39b1139 Rerun autoconf. 2009-02-22 00:45:50 +01:00
Jilles Tjoelker 07b9ca8dc8 Remove some warning that will not be fixed. 2009-02-22 00:45:41 +01:00
Jilles Tjoelker dea418e9b4 Add channel::only_ascii_channels config option
to restrict channel names to printable ascii only.
Like disable_fake_channels this only applies to joins
by local users; unlike disable_fake_channels it applies
to opers as well.
2009-02-22 00:12:21 +01:00
Jilles Tjoelker 2a003301de Avoid unnecessary const violation. 2009-02-22 00:05:48 +01:00
Jilles Tjoelker 0052db1664 -Wbad-function-cast is stupid. 2009-02-22 00:02:51 +01:00
Jilles Tjoelker 3fb4733090 Added tag charybdis-3.1.0 for changeset f54b0af927a7 2009-02-08 21:50:07 +01:00
Jilles Tjoelker 5404da73a1 Do not create directories under PREFIX while building. 2009-02-08 21:18:26 +01:00
Jilles Tjoelker e71a453543 Rerun autoconf. 2009-02-08 21:11:59 +01:00
Jilles Tjoelker 72bd8d6b16 Bump version to 3.1.0. 2009-02-08 21:11:33 +01:00
Jilles Tjoelker 377b98f079 autogen.sh is not necessary at this time, and did not work anyway. 2009-02-08 21:09:29 +01:00
Jilles Tjoelker a8b9939d4b Update NEWS. 2009-02-08 16:27:05 +01:00
Jilles Tjoelker 16834df2c2 Clarify some PRIVMSG/NOTICE restrictions. 2009-02-08 15:48:04 +01:00
Jilles Tjoelker fbe27d504f Numerics are also server-server messages. 2009-02-08 15:39:12 +01:00
Jilles Tjoelker 1a4058095d Fix an off by one error with zipstats processing
from ircd-ratbox (androsyn)
2009-02-07 23:26:05 +01:00
Jilles Tjoelker b573143fe7 Clarify propagation of JOIN and SJOIN. 2009-02-06 15:58:02 +01:00
Jilles Tjoelker f47964e44a Disallow invites to juped channels.
In particular, this is checked when the source is
local and not resv_exempt, or the target is local and
not resv_exempt.
2009-02-06 14:07:03 +01:00
Jilles Tjoelker 6b2cf989b6 Disable autoconnect for a server with excessive TS delta.
Note that in some cases (different TS delta settings,
heavy lag) it is possible only one of the servers
detects the problem and autoconnect may be left enabled.
The mechanism used for disabling is the same as
/quote set autoconn <server> 0; the A flag in /stats c
disappears and a rehash or /quote set autoconn can put
it back.
2009-02-05 23:43:07 +01:00
Jilles Tjoelker 71059b1f3b Add more information about propagation. 2009-02-05 20:10:34 +01:00
Jilles Tjoelker 640b57ec84 Add description for LOCOPS message. 2009-02-05 19:57:51 +01:00
Jilles Tjoelker 16369f0281 Fix another typo. 2009-01-31 21:44:11 +01:00
Jilles Tjoelker eb157882d5 Fix typo. 2009-01-31 21:37:33 +01:00
Jilles Tjoelker 24335dd6a3 Update NEWS. 2009-01-31 21:35:05 +01:00
Jilles Tjoelker a751cbefea Fix makerelease. 2009-01-31 18:51:59 +01:00
Jilles Tjoelker 4ffad8e6cc Warn about auth blocks after a *@* auth and duplicate auth blocks. 2009-01-31 18:42:03 +01:00
Jilles Tjoelker dc83edfac4 Clarify connection setup. 2009-01-30 17:08:59 +01:00
Jilles Tjoelker af2484840a Remove comments related to (removed) ability to disable TS6. 2009-01-30 16:50:00 +01:00
Jilles Tjoelker 1ba281712f For remote rehashes, send error messages to the requesting oper as well. 2009-01-30 00:11:12 +01:00
Jilles Tjoelker 12c4f819fa Log unknown class in auth errors to ircd.log as well. 2009-01-29 23:53:20 +01:00
Jilles Tjoelker b3a4fe7410 Don't suggest putting values in an enum that are not in the enum.
Compilers may assume that variables of enumerated type
only contain values in the enumeration.
2009-01-28 01:02:34 +01:00
Jilles Tjoelker 48811aebd5 Update NEWS. 2009-01-27 20:22:03 +01:00
Jilles Tjoelker c70fcd85f7 Show D:line oper reason in /testline. 2009-01-27 20:20:37 +01:00
Jilles Tjoelker 03a905bd21 First draft of a more complete TS6 server protocol description. 2009-01-25 21:11:28 +01:00
Jilles Tjoelker 0f3f5496b8 Remove obsolete comment. 2009-01-25 21:02:04 +01:00
Jilles Tjoelker 0dba1df7cd WHOIS 330 (services login name) does not need a remote whois. 2009-01-25 17:36:19 +01:00
Jilles Tjoelker 388ff36d4b Add umode +R to doc/services.txt. 2009-01-25 17:35:57 +01:00
Jilles Tjoelker 1b09d11527 Get rid of local variable shadowing. 2009-01-25 16:26:17 +01:00
Jilles Tjoelker e19c515ce9 commit 1df4ff0b0558e4698819f8e4ac6ecb7654b81a2c
Author: Stephen Bennett <spb@exherbo.org>
Date:   Sun Jan 18 16:30:27 2009 +0000

    Make testline show oper reason and setter information for K:lines, where applicable
2009-01-25 16:23:36 +01:00
Jilles Tjoelker 8d03179e4f Only kill unknown prefix UIDs that start with a valid SID
(existing and behind the link that sent the prefix).
Also require them to be exactly 9 characters long.
2009-01-22 00:27:27 +01:00
Jilles Tjoelker f8283571ad Simplify hunt_server(), send ERR_NOSUCHSERVER from only one place. 2009-01-21 20:15:07 +01:00
Jilles Tjoelker 88192c68aa Cut down user@server description in opers help file. 2009-01-21 00:40:16 +01:00
Jilles Tjoelker 77f3c1f440 Remove some more references to parv[0] in comments. 2009-01-18 21:20:14 +01:00
Jilles Tjoelker ac408af6cb Update comments for parv[0] removal. 2009-01-18 18:22:43 +01:00
Jilles Tjoelker 564b19bf9a If a privset is removed from ircd.conf, wipe its privs.
(Privsets continue to exist as long as they are referenced.)
2009-01-18 01:39:41 +01:00
Jilles Tjoelker 3619e29987 Change /stats O to show privset blocks (oper only).
To show operator blocks, only /stats o (lowercase) now works.
2009-01-18 01:35:24 +01:00
Jilles Tjoelker 9a67a652f8 Nicer description of /stats o. 2009-01-18 01:33:51 +01:00
Jilles Tjoelker 8e425f4137 Replace parv[0] with source_p->name. 2009-01-17 01:18:19 +01:00
Jilles Tjoelker a13b19f9fe Do not log ERROR messages from unknowns.
from ircd-ratbox (androsyn)
2009-01-17 00:23:02 +01:00
Jilles Tjoelker 1c4d0f3ceb Remove more TS5 remnants. 2009-01-16 23:18:10 +01:00
Jilles Tjoelker 6e749518bb burst_TS6(): assume users have a UID 2009-01-16 23:11:11 +01:00
Jilles Tjoelker ffa772f3d4 Log to serverlog when throwing out a server because of a bad nickname. 2009-01-16 23:10:49 +01:00
Jilles Tjoelker 6eb9f03a13 Close the local link that sends a TS5 NICK introduction.
This is no longer supported and was already broken,
sending out a UID message without UID parameter to
other servers.
2009-01-16 23:08:05 +01:00
Jilles Tjoelker 9f811fcefd Reject SCAN UMODES if invalid parameters are given. 2009-01-16 18:33:38 +01:00
Jilles Tjoelker cffd37ee37 [ratbox3 svn r26397] Make it more likely that error messages on ssld connections get through.
When ssld reports a connection closure because of
"Remote host closed the connection" and the connection
is any server or a registered client, try a
read_packet() on the client.
This should mainly help LIBRB_USE_IOTYPE=poll which
iterates over the ready file descriptors in numerical
order, processing the ssld control connection before the
closing data connection.
2009-01-15 20:08:46 +03:00
androsyn 6f3b64079f [svn r26332] get rid of the zip ready stuff 2009-01-01 14:50:21 +03:00
Valeriy Yatsko c4a6078abd Update client.h. 2008-12-13 23:22:12 +03:00
Aaron Sethman 62271ba929 re-enable ziplinks + ssl 2008-12-13 23:20:59 +03:00
Jilles Tjoelker 7b31d528b1 Remove obsolete comment. 2009-01-07 23:35:24 +01:00
Jilles Tjoelker d5e5bfc851 Update some copyright years. 2009-01-01 22:48:50 +01:00
Jilles Tjoelker c80b76f022 Make SCAN UMODES GLOBAL NO-LIST MASK <mask> no longer an operspy command.
This agrees with allowing MODE <nick> as non-operspy.
2009-01-01 20:32:30 +01:00
Jilles Tjoelker 3471ceb507 Allow opers to see other users umodes with /mode <nick>.
If the other user is local, the snomask is also shown.
2009-01-01 19:24:38 +01:00
Jilles Tjoelker 29ef4e88c8 BOPM/TCM do not need the ability to global kill, so remove it from server_bot
privset.
2008-12-28 23:24:43 +01:00
Jilles Tjoelker 53ece38bb1 Remove redundant check.
Surely, if source_p == target_p, then target_p->from == source_p->from.
2008-12-28 18:36:41 +01:00
Jilles Tjoelker 064c191ad2 Make sure default privset remains available, fixes various crashes
with default/invalid privsets and rehashing.
2008-12-27 23:13:48 +01:00
Jilles Tjoelker 6dfa266965 Allow opers and shide_exempt users to see hopcounts even if flatten_links is on. 2008-12-27 22:41:52 +01:00
Jilles Tjoelker c552a39d49 Show libratbox version info to opers in /info. 2008-12-23 00:28:05 +01:00
Jilles Tjoelker 7b52cd51d5 Put libratbox version on startup in a nicer place. 2008-12-22 21:50:21 +01:00
Valeriy Yatsko b0ef251cda [ratbox3 svn r26284 by androsyn] spew the libratbox version info on -version and at startup 2008-12-22 12:58:33 +03:00
Valeriy Yatsko 7ee3cd3a21 aclocal is unneeded here. 2008-12-22 12:54:40 +03:00
Valeriy Yatsko a2392a3867 Add autogen.sh, called from makerelease.sh script. 2008-12-22 12:52:38 +03:00
Valeriy Yatsko cb2b4d497e Run automake for libratbox. 2008-12-22 12:50:23 +03:00
Valeriy Yatsko f030cae802 Update libratbox. 2008-12-22 12:49:01 +03:00
Valeriy Yatsko 60b3d9e512 Update TODO 2008-12-22 12:40:31 +03:00
Valeriy Yatsko bc647d1d88 Automated merge with ssh://hg.atheme.org//hg/charybdis 2008-12-22 02:47:00 +03:00
Valeriy Yatsko c915c2090e Fix serno.h. 2008-12-22 02:46:26 +03:00
Jilles Tjoelker 20217a2de2 Ignore toplevel include/serno.h only, not libratbox one. 2008-12-22 00:44:00 +01:00
Valeriy Yatsko f9d2a62c1a Revert .hgignore change. 2008-12-22 02:36:18 +03:00
Valeriy Yatsko d56c84364a Remove .hgignore for serno.h, add serno.h for libratbox. 2008-12-22 02:34:40 +03:00
Jilles Tjoelker 0ec112cc00 Add code to detect overflow in WHOX.
This should currently be impossible, but may be
possible with extremely long server/nick names and
additional fields.
In case of overflow, the string sent to to the user is
truncated and if it was the first overflow since the
module was loaded a notice is sent to snomask +d.
2008-12-20 17:17:27 +01:00
Jilles Tjoelker 760ef9e1ea Show rejectcache/throttle in /testline output.
This adds more RPL_TESTLINE numerics with code '!'.
Different from the other results, the I/K line or
RESV will be shown as well.
2008-12-19 19:24:12 +01:00
Jilles Tjoelker 84bfb8ccb3 Only count throttle entries that cause rejection in /stats t. 2008-12-16 21:10:09 +01:00
Jilles Tjoelker 76d4968137 Show throttle info in /stats t.
from ircd-ratbox (androsyn)
2008-12-16 21:02:04 +01:00
Jilles Tjoelker 543b8c392c Make rehashing privset{} change online oper privileges.
This also fixes memory leak due to multiple privsets
with the same name (added after each rehash).
2008-12-14 18:25:15 +01:00
Jilles Tjoelker 0ba0bb4ce0 Unref privset of quitting oper. 2008-12-14 17:31:42 +01:00
Jilles Tjoelker f24b187a8e m_webirc: use rb_crypt() instead of crypt() 2008-12-13 11:49:28 +01:00
Jilles Tjoelker 0c0fc97605 Update sgml docs for cidr_ipv4_bitlen/cidr_ipv6_bitlen split. 2008-12-11 21:53:36 +01:00
androsyn 0dc49ff2f4 cast getpid() to int 2008-12-10 12:46:23 +03:00
Jilles Tjoelker 70f227af69 Update NEWS. 2008-12-09 23:51:38 +01:00
Jilles Tjoelker 8d448eb314 Clarify /quote help snomask a little. 2008-12-09 00:22:58 +01:00
Valeriy Yatsko 761f82c5d6 Update TODO. 2008-12-07 22:48:45 +03:00
Valeriy Yatsko 5054c3bc25 Branch merge 2008-12-07 22:46:38 +03:00
Valeriy Yatsko ed4662f302 Update my email address. 2008-12-07 22:46:19 +03:00
Jilles Tjoelker e238fe3aef Mention auto CPRIVMSG/CNOTICE in sgml docs. 2008-12-05 15:33:38 +01:00
Jilles Tjoelker b626b0171b Add /topic !#channel operspy to sgml docs. 2008-12-04 01:40:57 +01:00
Jilles Tjoelker 2ec2fc9ce6 Add umode +Z to the help files. 2008-12-04 01:03:05 +01:00
Jilles Tjoelker 40d5d119e5 Mention effect of /accept on umode +R. 2008-12-04 00:51:32 +01:00
Jilles Tjoelker 7a509a687f Remove additional wrong declaration for rb_kill(). 2008-12-03 22:57:13 +01:00
Jilles Tjoelker f717c20dbb As in shadowircd, increase buffer for /who status.
Not necessary here but nice for consistency.
2008-12-03 22:54:30 +01:00
Aaron Sethman 5274a6d761 report logfile access issues
committer: Valeriy Yatsko <dwr@it-penza.org>
2008-11-16 10:15:28 +03:00
Valeriy Yatsko 4e2fdb1f81 Branch merge. 2008-12-03 02:59:26 +03:00
Valeriy Yatsko 3b0f3294cf Remove irc_basename, replace it with rb_basename from libratbox. 2008-12-03 02:59:13 +03:00
Jilles Tjoelker 2cf629d9b5 Put back conditionally netwide ssld error snote. 2008-12-03 00:55:58 +01:00
Valeriy Yatsko 2f6c1ef878 Forgot version.c.SH for libratbox/. 2008-12-03 02:54:08 +03:00
Valeriy Yatsko c7c9aa764d Branch merge. 2008-12-03 02:50:01 +03:00
Valeriy Yatsko 94b4fbf93a Copied libratbox and related stuff from shadowircd upstream. 2008-12-03 02:49:39 +03:00
Jilles Tjoelker 1386c9a7c0 Specify RTLD_LOCAL explicitly.
As in atheme-services, I guess some versions of
MacOS X need this.
2008-12-03 00:39:07 +01:00
Jilles Tjoelker 73788f7953 Add operspy /topic.
This allows querying any channel's topic under the
operspy rules, but not changing it.
2008-12-03 00:16:05 +01:00
Jilles Tjoelker 76514a0b77 Put back example.conf limits to their old values,
increasing cidr limit somewhat more.
2008-11-30 13:35:01 +01:00
Jilles Tjoelker 571df4297c Update reference.conf for cidr change as well. 2008-11-30 13:33:43 +01:00
Jilles Tjoelker c8d8588915 Split cidr_bitlen into cidr_ipv4_bitlen and cidr_ipv6_bitlen.
Taken from ircd-ratbox 3 via shadowircd.
2008-11-30 13:31:59 +01:00
Jilles Tjoelker e752dd2618 Allow coloured part reasons in -c channels. 2008-11-29 22:22:18 +01:00
Jilles Tjoelker e157c3aa58 Remove reference to old maxconnections way. 2008-11-28 15:51:52 +01:00
Jilles Tjoelker 89a38579cd Add sgml documentation for /quote set. 2008-11-28 15:48:41 +01:00
Jilles Tjoelker 36f0316a72 Remove unnecessary initialization that violates const. 2008-11-27 22:50:01 +01:00
Jilles Tjoelker e7c8892297 Put back accidentally removed word. 2008-11-26 21:38:49 +01:00
Jilles Tjoelker b29e40b7ca Improve note about case sensitivity. 2008-11-26 00:07:12 +01:00
Jilles Tjoelker e129e2af12 Mention how to specify the default port in a remote connect. 2008-11-25 23:58:24 +01:00
Jilles Tjoelker 660debfad5 Correct buffer without space for '\0', should have been safe due to padding. 2008-11-22 18:51:00 +01:00
Jilles Tjoelker 51e1ce904e Make the notices reporting auth{} privs a bit more serious-looking,
as in ratbox3.
2008-11-19 22:45:13 +01:00
Aaron Sethman 17d00839b3 make is_cti/is_sti collect times connected in unsigned long long instead of time_t as well..on 32bit boxes that is going to wrap pretty quickly
committer: Valeriy Yatsko <dwr@it-penza.org>
2008-11-16 10:04:09 +03:00
Jilles Tjoelker 59eedf155f Allow +z messages from outside if -n.
This gives a useful meaning to the cmode combo +mz-n:
messages from ops and voices go to all channel members,
messages from anyone else (on or off channel) go to ops.
With +mnz, messages from outside are not allowed at all.
2008-11-15 22:56:09 +01:00
Jilles Tjoelker 79ba162940 Truncate idle time in /who to 32 bits.
Pointed out by dwr (but solved differently).
2008-11-15 21:15:38 +01:00
Jilles Tjoelker 9a9f3cf8a5 Only require DNSBL replies to be in 127.0.0.0/8 instead of /24. 2008-11-15 16:17:16 +01:00
Jilles Tjoelker 570ca08a4f Allow the resolver to process longer hostnames,
for the benefit of some DNSBLs like the "TorDNSEL service".
2008-11-15 16:13:39 +01:00
Jilles Tjoelker 863efb0e6b Should use rb_strlcpy instead of strlcpy... 2008-11-09 01:05:39 +01:00
Jilles Tjoelker 44913ac65f Add WHOX to 005 so we can see if much breaks. 2008-11-09 00:27:15 +01:00
Jilles Tjoelker 8e0f260b04 Remove LOCAL_COPY (and thus alloca) usage from /who. 2008-11-09 00:13:48 +01:00
Jilles Tjoelker aff2058aa8 who: Use @+ combining for 354 numeric.
The 352 numeric uses it if CAP multi-prefix is enabled, as before.
2008-11-09 00:13:29 +01:00
Jilles Tjoelker 555801db60 Add ircu-like /who format options.
Use  /quote help who  for details.
The format code "o" (oplevel) is not documented,
but implemented showing dummy information (999 for
chanop, n/a otherwise).
2008-11-09 00:12:56 +01:00
Jilles Tjoelker 9d35015621 Make comment for ms_join() up to date. 2008-11-09 00:05:15 +01:00
Jilles Tjoelker 05d8a68c88 Show spambot notices for joins, not for parts.
Parts still decrement the counter for showing notices.
This shows more channels in the notices.
2008-11-08 17:22:41 +01:00
Jilles Tjoelker 28823cd3db Allow normal users to use /chantrace.
The same information is already available via a
combination of /who and /trace.
2008-11-08 01:28:16 +01:00
Jilles Tjoelker b279c69161 Mention in /quote help cmode that +b/+q prevent nick changes, and +b (too) sending. 2008-11-07 00:41:26 +01:00
Jilles Tjoelker c487e4d25b Make /quote help who more detailed. 2008-11-07 00:36:49 +01:00
Jilles Tjoelker f8d9b22917 Add the IP address to userlog, as in ratbox3. 2008-10-31 10:57:51 +01:00
Jilles Tjoelker e5c20eb289 Rerun autoconf. 2008-10-19 17:31:53 +02:00
Jilles Tjoelker 7642846d8f Check that --with-nicklen was passed a numeric value.
ircd-ratbox r26144 (androsyn)
2008-10-19 17:27:35 +02:00
Jilles Tjoelker 2976cd5379 Do not send snotes/logs about juped servers trying to connect.
A juped server is defined as a server that already
exists with a service{} server as uplink.
If a juped server is introduced by another server,
this generates snotes/logs as before.
2008-09-25 00:00:36 +02:00
Jilles Tjoelker e6a0717d15 Make TS deops appear to come from the same server the other modes come from.
In particular, this makes atheme changets deops come
from the services server instead of the user's server.
2008-09-24 23:13:10 +02:00
Jilles Tjoelker 8e28bf2936 ip_cloaking: clarify logic
This also slightly changes mangled IPs but the
mangling is on the same level.
2008-09-20 00:30:35 +02:00
Jilles Tjoelker 00b7ddcc53 ip_cloaking: remove some unnecessary braces 2008-09-19 23:44:56 +02:00
Jilles Tjoelker 9b9c8484ed ip_cloaking: fix digits in hostnames 2008-09-19 23:42:28 +02:00
Jilles Tjoelker 8109e8e320 ip_cloaking: fix HOSTLEN buffer lengths,
could have truncated one char it shouldn't
2008-09-19 23:41:22 +02:00
Jilles Tjoelker 799483e7ea More ip_cloaking improvements from Spaz.
The mangling function now creates more variation,
and more of numeric IPs is mangled.
2008-09-19 23:35:43 +02:00
William Pitcock d7cff1d11b Automated merge with http://hg.atheme.org/charybdis 2008-09-17 03:25:19 -05:00
Jacob Myers 18395f4fa8 Improved cloaking. It now uses an FNV hash, which makes IP's much more
difficult to predict.
2008-09-17 04:15:51 -04:00
William Pitcock 1596c1242e Copy ip_cloaking.c to ip_cloaking_3.0.c 2008-09-17 03:23:06 -05:00
Jilles Tjoelker 1f24b3b1c2 Make sno_globalkline work for servers without kline_reason, but only for temps. 2008-09-17 00:24:50 +02:00
Jilles Tjoelker 4f2b6c0b38 Allow clearing general::kline_reason via a rehash. 2008-09-17 00:21:00 +02:00
Jilles Tjoelker 18c12212b7 Add more detail in squit reason for certain invalid NICK/UID/EUID commands. 2008-09-16 22:53:44 +02:00
Jilles Tjoelker 72bb40038d Enhance description of umode +S. 2008-09-13 19:10:57 +02:00
Jilles Tjoelker 5ee5c31c51 Note extra server wallops in recent versions. 2008-09-13 18:46:03 +02:00
Jilles Tjoelker 637b590f9e Put oper privileges in alphabetical order in the sgml docs. 2008-09-13 00:46:20 +02:00
Jilles Tjoelker 88d08e8496 Fix oper:remote in reference.conf. 2008-09-13 00:34:52 +02:00
Jilles Tjoelker ebe5601796 Document privsets in the example confs. 2008-09-13 00:32:22 +02:00
Jilles Tjoelker d2e3bb4a19 Pick up remote to oper:routing change. 2008-09-13 00:29:15 +02:00
Jilles Tjoelker 1a745bf1a5 Update SGML docs for need_ssl and new oper priv system. 2008-09-09 23:32:19 +02:00
Jilles Tjoelker 850b23f3a9 Remove old oper privilege flags. 2008-09-09 21:51:26 +02:00
Jilles Tjoelker 92ee45c4b8 Document need_ssl flags in example.conf. 2008-09-09 21:46:12 +02:00
Jilles Tjoelker 3c80e9d634 Avoid hardcoding the number of shared{} flags another time. 2008-09-09 18:42:59 +02:00
Jilles Tjoelker 90b9ef6c6d Fix indentation. 2008-09-09 18:40:57 +02:00
Jilles Tjoelker 663bbb2836 Add need_ssl to auth{} and operator{}.
Specifying need_ssl on auth{} denies the connection if
it is not SSL/TLS, much like need_ident or need_sasl.
Specifying need_ssl on operator{} refuses opering with
ERR_NOOPERHOST if the connection is not SSL/TLS.
from ircd-ratbox
2008-09-07 01:18:58 +02:00
Jilles Tjoelker 73f50e08ea Fix possible crash with m_mkpasswd extension. 2008-09-06 21:49:45 +02:00
Jilles Tjoelker 4137c21c96 Close the link that sends an invalid UID.
It does not make sense to send a kill using an invlid
identifier to an obviously broken server, as was
previously done.
2008-09-06 15:13:28 +02:00
Jilles Tjoelker 77a742c11c Remove check that cannot happen due to minparc in Message struct. 2008-09-06 01:33:18 +02:00
Jilles Tjoelker c71ae7f0dc Improve server notices for hub_mask/leaf_mask.
Local-only server notices kept here because
hub_mask/leaf_mask tends to be specific to a (hub)
server. The same information is now available in
Netsplit notices.
2008-09-06 01:21:16 +02:00
Jilles Tjoelker 5b0a527927 Use rb_snprintf() in various places. 2008-09-06 01:00:20 +02:00
Jilles Tjoelker 341504a702 Remove comment referencing LazyLeaf. 2008-09-06 00:44:09 +02:00
Jilles Tjoelker bdfc9ce626 Avoid empty strings in various notices about rejected server connections.
These come from the name field which is empty for unknown
connections attempting to become a server.
Instead, put [@255.255.255.255] just like ratbox3 does.
2008-09-05 22:56:59 +02:00
Jilles Tjoelker deb7449471 Improve server notices for servers introducing existing servers. 2008-09-05 22:52:39 +02:00
Jilles Tjoelker 9649981ba7 Improve server notices about duplicate SIDs.
Note that this is checked after duplicate server names,
so it can only happen if multiple servers have the
same SID configured.
2008-09-04 01:41:49 +02:00
Jilles Tjoelker 64973a71e6 Do not use get_oper_name() for a netwide server notice, it may be confusing. 2008-09-02 23:44:06 +02:00
Jilles Tjoelker 44d450f242 Correct spelling of oper:remoteban in example.conf. 2008-09-02 23:42:51 +02:00
Jilles Tjoelker 0d499ee5f9 oper:adminwall priv seems meaningless, remove it. 2008-09-02 23:40:22 +02:00
Valeriy Yatsko d05e3e3a7b We don't want to leave the isupport name in the extension memory space on changing it - fixed a bug (tnx Artem@IrcNet(RU)) 2008-08-31 03:57:27 +04:00
William Pitcock 508c7c41fe Make change_isupport() return the old value!!! 2008-08-29 15:36:41 -05:00
William Pitcock 17ad49a96a Add change_isupport() to change the value of an ISUPPORT token. 2008-08-29 15:27:34 -05:00
William Pitcock 9ac19244c0 Automated merge with ssh://hg.atheme.org//hg/charybdis 2008-08-29 14:48:06 -05:00
Stephen Bennett 1d53b4283b don't set an empty password or auth_user 2008-08-29 14:47:51 -05:00
William Pitcock 978daf7118 Automated branch merge. 2008-08-29 14:46:39 -05:00
William Pitcock 016746cfc2 Backed out changeset 7f24e5f3fb86 2008-08-29 14:46:19 -05:00
Stephen Bennett 645103ac52 If auth_user and server password were given and not used, use auth_user as an account name in the nickserv identify command 2008-08-29 14:45:30 -05:00
Stephen Bennett 299ad32f98 If auth_user and server password were given and not used, use auth_user as an account name in the nickserv identify command 2008-08-29 14:45:22 -05:00
Jilles Tjoelker 628eee0041 Remove some dead code.
found using llvm static analyzer
2008-08-29 02:53:52 +02:00
Jilles Tjoelker ef8e4220ec Fix a memory leak.
found using llvm static analyzer
2008-08-29 01:58:10 +02:00
Jilles Tjoelker d3b22631c1 Make genssl.sh work.
Submitted by jdhore.
2008-08-29 01:34:18 +02:00
Jilles Tjoelker 0cdd90ce79 Fix comment, getsockname() can fail legitimately.
from ircd-ratbox r25967 (jilles)
2008-08-28 01:06:19 +02:00
Jilles Tjoelker c80be1ec80 Don't try to add a closed connection.
ircd-ratbox r25965 (jilles)
2008-08-28 01:05:41 +02:00
Jilles Tjoelker 07c8448a5b Fix ident for ssl connections. 2008-08-28 00:49:04 +02:00
Jilles Tjoelker 509c9ee183 Remove another remnant of server hostmasking. 2008-08-26 00:00:11 +02:00
Jilles Tjoelker 79fae8dbc0 ssld: un #if 0 the /dev/null stuff out 2008-08-25 18:48:30 +02:00
Jilles Tjoelker 6acb39cb1a Clear privset on deoper. 2008-08-25 18:24:24 +02:00
Jilles Tjoelker 220c63400a Fix crash if there is no privset= in an operator{}. 2008-08-18 00:55:12 +02:00
Jilles Tjoelker c08e7f2dbd Use C locale for the compilation date. 2008-08-17 22:55:57 +02:00
William Pitcock 858646f1f8 update TODO 2008-08-17 09:30:31 -05:00
William Pitcock 6e915bfe06 privset example: Add a privset for local bots like BOPM and TCMs. 2008-08-17 08:58:34 -05:00
William Pitcock 028aef6ed6 m_privs: Add stuff for privsets here too. 2008-08-17 08:56:40 -05:00
William Pitcock 4db97a8263 HasPrivilege(): check to make sure localClient and localClient.privset are non-NULL. 2008-08-17 08:52:04 -05:00
William Pitcock e2d7f73174 /stats o: display name of privset instead of privs 2008-08-17 08:40:10 -05:00
William Pitcock 73a3435109 All modules converted to use privsets by porting the macro over.
New macro, HasPrivilege() does most of the work here, the old IsOper*() macros
are deprecated, and will likely be removed later.
2008-08-17 08:36:17 -05:00
William Pitcock 34cb09ceea Make a reference to privset in Client.localClient. 2008-08-17 08:23:40 -05:00
William Pitcock 665e79e999 privilegeset_ref(): return the privilegeset 2008-08-17 08:22:56 -05:00
William Pitcock 5a6d4202d1 Make use of the new default privset!! 2008-08-17 08:08:23 -05:00
William Pitcock 001f5f6731 ircd initialization: add a "default" privset with no privs. 2008-08-17 08:06:28 -05:00
William Pitcock 83c037c058 Automated merge with ssh://hg.atheme.org//hg/charybdis 2008-08-17 07:53:32 -05:00
William Pitcock 3ddb54d905 update oper line 2008-08-17 07:53:29 -05:00
Jilles Tjoelker d2e6d8d715 Add 328 numeric (ChanServ channel URL) to the header files. 2008-08-17 14:49:01 +02:00
William Pitcock f6189c43ab same bug 2008-08-17 07:47:06 -05:00
Jilles Tjoelker c73d999576 Remove another servlink remnant. 2008-08-17 14:46:29 +02:00
William Pitcock 39352a39f2 fix another stupid bug, gah 2008-08-17 07:46:18 -05:00
William Pitcock 76eca655f9 Make sure extended privilege sets are added to the registry. 2008-08-17 07:44:46 -05:00
William Pitcock 7ce46e0447 Allow : to be in 'string' values. 2008-08-17 07:41:52 -05:00
William Pitcock b8be4a3f4c Initial work on getting privsets working. 2008-08-17 07:40:27 -05:00
William Pitcock 120b37f94f oper_conf structure: add privset association. 2008-08-17 07:32:30 -05:00
William Pitcock 48de3c1852 Add some privsets for opers here. 2008-08-17 07:17:25 -05:00
William Pitcock de0e9f373b Add config magic for privset{} parsing. 2008-08-17 07:10:23 -05:00
William Pitcock 0e52880760 Add privilegeset_extend(). 2008-08-17 06:35:49 -05:00
William Pitcock 9291987bba Add basic PrivilegeSet API. 2008-08-17 06:27:59 -05:00
Valery V Yatsko e6451707d9 branch merge 2008-08-17 09:33:47 +04:00
Valery V Yatsko 2d9a60fe7e fixed warnings on src/ircd.c compilation 2008-08-17 09:33:05 +04:00
Valery V Yatsko 40b8b28e1b run autoreconf 2008-08-17 09:27:15 +04:00
Valery V Yatsko 767fdd62fe fixed chm_adminonly extension - IsOperAdmin replaced with IsAdmin.. hm.. but possibly we need to allow hidden opers/admins to enter protected
channels?
2008-08-16 23:34:32 +04:00
Valery V Yatsko 200e53e8f2 added improvement in TODO related to support compilation without parser/lexer generators present in OS 2008-08-16 23:24:28 +04:00
Valery V Yatsko 2b97b8ed52 put cygwin/mingw/native win32 (+shared modules) support in TODO (need discussion), currently ratbox3 could be compiled under cygwin/mingw 2008-08-16 22:52:31 +04:00
Valery V Yatsko 5f5fc333fb forgot to remove check for cygwin from configure.ac 2008-08-16 22:50:22 +04:00
Valery V Yatsko 77c9f49528 removed cygwin check from configure.ac 2008-08-16 22:45:09 +04:00
Valery V Yatsko 9b37ad07c3 ircd-ratbox -> charybdis 2008-08-16 22:38:13 +04:00
Valery V Yatsko 2a64312fdc seed random not even every 300 seconds, but on startup also 2008-08-16 22:30:28 +04:00
Valery V Yatsko 2b454b76dc egd fixed 2008-08-16 22:29:33 +04:00
Valery V Yatsko 5d2fe5036e comment to fix egd (not work currently) 2008-08-16 22:24:28 +04:00
Valery V Yatsko 6145bb6027 no more servlink - removed 'servlink_path' from reference.conf and source files 2008-08-16 22:23:56 +04:00
Valery V Yatsko 02be96f211 Updated reference.conf 2008-08-13 23:17:43 +04:00
Valery V Yatsko 1080ffb015 Removed note that we support cygwin (no, we don't) 2008-08-13 22:57:09 +04:00
Valery V Yatsko 8932c8d84e atheme-services -> charybdis for application.sh script 2008-08-13 22:53:36 +04:00
Valery V Yatsko 3df643b140 Extension for +A (admin only) channel mode, currently belongs to type chm_staff as operonly, seen in various networks. 2008-08-13 21:04:27 +04:00
Jilles Tjoelker 74e0c6e660 fix a crash in the rb_bh_gc code
from libratbox svn r25871 (androsyn)
2008-08-12 22:37:29 +02:00
Jilles Tjoelker 97a6160b45 Allow /list on a named +p channel.
A full /list already included +p channels.
2008-08-12 22:34:37 +02:00
Valery V Yatsko 77cc3211c7 Charybdis never had old kline/config format - removed notes about them 2008-08-12 18:09:30 +04:00
Valery V Yatsko b61d17a68a Made README.FIRST much actual (most copied from ircd-ratbox) 2008-08-11 23:29:22 +04:00
Valery V Yatsko 670f0c247e sync with libratbox upstream - r25870 2008-08-11 23:20:24 +04:00
Valery V Yatsko cc430906e0 Updated TODO 2008-08-09 18:46:05 +04:00
Jilles Tjoelker ade4ed6379 Add conf files to be used for automated testing. 2008-08-09 15:38:31 +02:00
Valery V Yatsko 3ae41b440a TODO: test suite as in ircu? should include configuration files & certificates for setting up local debug network containing 3 servers in it +
possibly configuration file for test services (atheme)?
2008-08-08 20:06:00 +04:00
Valery V Yatsko a0775df0ed fixed typo in sslproc.c 2008-08-08 20:01:52 +04:00
Valery V Yatsko b01b826d26 ilog -> inotice in ircd_restart_cb (ircd.c) 2008-08-06 23:57:45 +04:00
Valery V Yatsko 94c100153c from ircd-ratbox r25799 by androsyn: give a bit more info when libratbox calls logging callbacks 2008-08-06 23:12:02 +04:00
Valery V Yatsko c870fa9f9a Restricted +O (operonly) channel mode to be set only by ircops
(chm_staff)
2008-08-04 21:59:58 +04:00
Valery V Yatsko fba62b0151 Moved extern chmode_flags declaration from channel.h to chmode.h, as
it's actually declared in the second one
2008-08-04 21:51:15 +04:00
Valery V Yatsko e76989521a Branch merge 2008-08-04 21:45:56 +04:00
Valery V Yatsko bee0998d33 Removed global_tree declaration as unused from reject.c 2008-08-04 21:45:30 +04:00
Valery V Yatsko f48c47b76e oups, missed param for has_privilege example function in TODO 2008-08-04 01:37:18 +04:00
Valery V Yatsko 4d2ae0d062 added privilege system and some new hooks in TODO 2008-08-04 01:34:59 +04:00
Jilles Tjoelker b62765e9a9 Rerun autoconf. 2008-08-02 02:09:23 +02:00
Jilles Tjoelker 4a387e786a Fix shell syntax. 2008-08-02 02:09:16 +02:00
William Pitcock 63ae37ccd1 Rerun autoconf. 2008-08-01 17:03:18 -05:00
William Pitcock d7e75f0ab9 Add *sunos* conditional to solaris section for opensolaris, and add -D_XPG4_2 -D__EXTENSIONS__ to CFLAGS on these platforms. 2008-08-01 17:02:58 -05:00
William Pitcock 143b6cc1e4 Automated merge with ssh://hg.atheme.org//hg/charybdis 2008-08-01 17:00:41 -05:00
William Pitcock 1f025cc3bf rb_setup_fd_ports(): use correct prototype. 2008-08-01 17:00:00 -05:00
Jilles Tjoelker c3a82957db Update example.conf for max_unknown_ip->throttle. 2008-08-01 02:54:36 +02:00
Jilles Tjoelker d1275a8fd6 Move to ratbox3 reject and throttle code.
Throttle replaces max_unknown_ip, reject is like before
(including the charybdis-specific unkline handling).
Both of these now apply before SSL negotiation.

This commit does not include the global_cidr and new dline code.

m_webirc is a bit nasty with throttling (unlike before
with max_unknown_ip), this may be fixed later (or
the webirc IP needs to be exempt{}ed).
2008-08-01 01:59:08 +02:00
Jilles Tjoelker 70747af524 Fix rejectcache and unknown_count.
Unfortunately they are checked after SSL setup.
2008-07-31 22:47:53 +02:00
Jilles Tjoelker 4045502246 Fix testline crashes, introduced by the auth_user patch. 2008-07-31 22:25:17 +02:00
Jilles Tjoelker bcd8cc02e1 Fix some part of IPv6 dline checking. 2008-07-31 21:56:05 +02:00
Jilles Tjoelker 060ea02eec Remove an unnecessary check for &channels -- sendto_server() already does it. 2008-07-31 18:11:36 +02:00
Jilles Tjoelker b3be8599aa Use channel_modes() to convert a new channel's modes to a string. 2008-07-31 17:55:23 +02:00
Jilles Tjoelker 4d94f914f8 chm_operonly extension: use Unreal's numeric (520)
irssi still does not recognize this properly, oh well
2008-07-31 16:10:14 +02:00
Jilles Tjoelker 8576d6944a Fix problems with resolver not responding and epoll.
Read from resolver socket until it is no longer ready.
2008-07-30 19:53:54 +02:00
Jilles Tjoelker 8789299343 Put back netwide snotes for ssld errors from remote connects. 2008-07-30 14:50:12 +02:00
Jilles Tjoelker f43b492b70 Make the ircd start again. 2008-07-30 14:48:39 +02:00
Valery Yatsko a02e61ed80 channel.h cleaned up a bit - removed unused includes 2008-07-30 16:27:35 +04:00
Valery Yatsko eda5c86098 Removed charybdis.h include - used nowhere 2008-07-30 16:19:56 +04:00
Valery Yatsko 76eaa67b74 ssld synced with ircd-ratbox3 svn 2008-07-30 02:57:01 +04:00
Valery Yatsko f5bdde4b42 sslproc.c synced with ircd-ratbox3 svn 2008-07-30 02:55:08 +04:00
Valery Yatsko f97867dff3 rb_uint32_t -> uint32_t, rb_uint16_t -> uint16_t 2008-07-30 02:45:31 +04:00
Valery Yatsko 4414eb3c9e libratbox sync - r25796 2008-07-30 02:41:27 +04:00
Valery Yatsko d36df23a0b Removed TS5 description as it is no longer supported 2008-07-30 02:25:21 +04:00
Valery Yatsko 7be4360d11 Removed some docs related to ratbox 2008-07-30 02:23:30 +04:00
Valery Yatsko 9b014b4a26 Adding changeable access levels in todo for channel modes extensions 2008-07-30 00:55:20 +04:00
Jilles Tjoelker 11a8216623 Add SENDBANS command (extension) to propagate xlines and resvs manually. 2008-07-29 00:09:03 +02:00
Valery Yatsko 9a7b24a6be Removed unneeded includes from newconf.h 2008-07-28 23:14:51 +04:00
Valery Yatsko b1d6fa8cd2 Reordered functions to match ratbox3's order 2008-07-28 23:02:54 +04:00
Valery Yatsko 3f46cd0007 quick draft fix of ip_cloaking to make module work with ipv6 ips, cleanup later 2008-07-28 10:06:01 +04:00
Jilles Tjoelker 8acef9de29 Let ops/voices bypass tgchange/floodcount if sending to users in their channel.
This was already possible by using CPRIVMSG/CNOTICE
instead of PRIVMSG/NOTICE.
2008-07-27 23:34:58 +02:00
Jilles Tjoelker ceac83d965 Remove user@server messages to local users.
These are unreliable in general and only useful
for violating certain restrictions.
Sending such messages to remote servers is still
possible, for securely messaging pseudoservers whether
service{}'ed or not. The special oper-only syntax
opers@server remains as well.
2008-07-27 22:17:46 +02:00
Valery Yatsko b5a93db8b8 Removing '/* patricia */' declarations block as libratbox3 has this now, changed the order of variable declarations a bit 2008-07-27 16:25:00 +04:00
Valery Yatsko 4d938eac7d Cleanup: removed unused initialVMTop variable from ircd.c and get_maxrss() from restart.c 2008-07-27 16:18:50 +04:00
Valery Yatsko 2b4185469f *.orig and *.log files are useless here too 2008-07-27 16:14:30 +04:00
Valery Yatsko cd1dea9726 last changes of crypt -> rb_crypt 2008-07-27 14:52:46 +04:00
Valery Yatsko cf63b587c9 crypt -> rb_crypt in m_mkpasswd.c 2008-07-27 14:48:16 +04:00
Valery Yatsko 7796ef04d4 crypt -> rb_crypt, fixing another gcc warning 2008-07-27 14:45:42 +04:00
Valery Yatsko 1bf485532d Variable aconf was used before its initialization - fixed 2008-07-27 14:43:49 +04:00
Valery Yatsko 38e0e40411 Added '*~' entry to .hgignore, gedit loves making them much 2008-07-27 14:09:47 +04:00
Valery Yatsko 1e453badaf Changed my email address 2008-07-27 13:53:39 +04:00
Valery Yatsko 0865b537a0 SSL only channel mode extension - might be useful if server owner prefer not to use extended bans, or to make server feel like ircd-ratbox3 2008-07-27 12:47:40 +04:00
Valery Yatsko 16120df7af Added chm_operonly to Makefile 2008-07-27 12:19:21 +04:00
Valery Yatsko 7608ef4933 A very draft version of extensions, which are adding can_join hooks for custom channel modes 2008-07-27 12:10:48 +04:00
Jilles Tjoelker dada366b70 Also apply floodcount to messages to remote clients (except services).
As before, only local clients can have their message blocked.
2008-07-22 01:46:34 +02:00
Jilles Tjoelker 85b8e6497d Do not check floodcount if user is messaging self. 2008-07-13 13:35:43 +02:00
Jilles Tjoelker e23905e60d Regenerate depend files. 2008-07-12 01:52:27 +02:00
Jilles Tjoelker 121cd4dcb6 Some fixes to .depend generation. 2008-07-12 01:52:14 +02:00
Jilles Tjoelker b7fc2983f2 Add some stuff to .hgignore. 2008-07-11 14:46:00 +02:00
Jilles Tjoelker 40a53c07b4 Add a DNS section to charybdis-oper-guide. 2008-07-10 23:31:46 +02:00
Jilles Tjoelker 60817ff45c Remove some obsolete ConfItem flags. 2008-07-04 17:05:18 +02:00
Jilles Tjoelker dc4d501281 Move nick collision notices from +s to +k.
Remote nick collisions (Received KILL/SAVE message)
were already on +k.
2008-07-04 16:54:46 +02:00
Jilles Tjoelker 3fde0c14a2 Do not send kills for unknown prefixes which are nicks.
This can happen harmlessly in particular if a SAVE
and a nick-prefixed command crossed; then, due to
nick changes and nick chasing, it easily causes
ghosts that need a kill or split to disappear.
Most commands use UID as prefix which does not have
this problem and will destroy real ghosts soon enough.
2008-07-02 00:58:56 +02:00
Jilles Tjoelker e5cdec73ac Log ssld errors for servers and handshakes.
(serverlog)
2008-06-30 00:28:00 +02:00
Jilles Tjoelker 0d093bfee3 Call serv_connect_callback() directly from serv_connect_ssl_callback().
This speeds up outgoing SSL server connections by 1 second.
2008-06-29 23:47:10 +02:00
Jilles Tjoelker faed554234 Give proper error messages if connect fails for a server using SSL. 2008-06-29 23:47:02 +02:00
Jilles Tjoelker cd0ba90750 Send ssld error netwide if it was a remote connect and a handshake. 2008-06-29 22:02:32 +02:00
Jilles Tjoelker 9cb932632f Show reason for failed outgoing SSL handshakes to opers.
Also add a comment that ircd does not care about the
reason for failed incoming SSL handshakes.
ircd-ratbox r25651
2008-06-29 21:56:31 +02:00
Jilles Tjoelker 0b53baf73b Keep track of nameservers that timeout and use others preferably.
The number of timeouts since the last received
packet is visible in /stats A.
2008-06-29 21:07:24 +02:00
Jilles Tjoelker 0ae330b43f Reset check_splitmode_ev to NULL after removing it,
to exclude the possibility of it being removed twice.
like ircd-ratbox r25641 (jilles)
reverts 788:476d29d84191
2008-06-29 01:37:11 +02:00
Jilles Tjoelker 346aca1799 Make m_trace.c compile here (with gcc 4.2.1). 2008-06-28 21:08:04 +02:00
Valery V Yatsko a70bad1d73 m_trace.c fixed 2008-06-28 18:20:24 +04:00
Valery V Yatsko 42706093f1 New (and better) values for startup event timings 2008-06-28 14:50:21 +04:00
Valery V Yatsko 6447b1637d Removed __CYGWIN__ define - server has no ability to work on cygwin right now 2008-06-28 14:46:03 +04:00
Valery V Yatsko f4fd05e251 Removed SystemTime declaration 2008-06-28 14:38:27 +04:00
Valery V Yatsko fd4535aa50 Remove srand() from main(), we are using ratbox3 random number generator (ev) 2008-06-28 14:36:25 +04:00
Valery V Yatsko 51b0223e4d 'empty_sockhost = "255.255.255.255"' const for report_this_status 2008-06-28 14:27:33 +04:00
Valery V Yatsko 3db8104751 report_this_status: declaration changed 2008-06-28 14:25:31 +04:00
Valery V Yatsko af7c236800 report_this_status fixed 2008-06-28 14:24:18 +04:00
Valery V Yatsko 715b28fefd Applied svn diff from ratbox3 r21458:21470 2008-06-28 14:13:50 +04:00
Valery V Yatsko 4fd52c8c20 notify_banned_client cleaned up 2008-06-28 12:56:58 +04:00
Valery V Yatsko bb79db15d7 1. Removed stupid initUser() function outside of all heaps initializations
2. Cleaned up make_client
2008-06-28 12:49:27 +04:00
Valery V Yatsko 6992eef0b5 *_heap declaration related to client.c are now in client.c + current_uid too 2008-06-28 12:44:19 +04:00
Valery V Yatsko 9a67ad23d9 Remove Channel->users_last, used nowhere 2008-06-28 12:25:53 +04:00
Valery V Yatsko a2eb0d5913 Removed unneeded '*_ev = NULL' statements 2008-06-28 12:12:18 +04:00
Valery V Yatsko 9813daca73 'struct config_channel_entry ConfigChannel' in channel.c too 2008-06-28 12:02:51 +04:00
Valery V Yatsko 1a218aaf75 'rb_dlink_list global_channel_list' declaration moved to channel.c 2008-06-28 12:00:01 +04:00
Valery V Yatsko 5475a9321f channel_heap,ban_heap,topic_heap,member_heap declared statically in channel.c instead of ircd.{c,h} 2008-06-28 11:54:51 +04:00
Valery V Yatsko c735f93023 Pretty symlink logic for help files 2008-06-28 11:48:30 +04:00
Valery V Yatsko 7dd98666cc untabify function added to cache.c:
removes tabs from src, replaces with 8 spaces, and returns the length
of the new string.  if the new string would be greater than destlen,
it is truncated to destlen - 1
2008-06-28 11:22:43 +04:00
Valery V Yatsko df22ecbf77 sync ssld with ratbox3 repository: now r25594 + charybdis related changes 2008-06-26 21:21:46 +04:00
Valery V Yatsko cddb360c6b update TODO 2008-06-26 21:19:41 +04:00
Valery V Yatsko 03d5e1e46b Fix compilation without zlib headers present, from the ratbox3 upstream 2008-06-26 21:19:19 +04:00
Valery V Yatsko 913bafd10e update TODO 2008-06-26 10:28:01 +04:00
Valery V Yatsko 6a95f26eaf unlikely -> rb_unlikely 2008-06-26 10:19:27 +04:00
Valery V Yatsko 969a1ae66a PASS selector:password for auth{}, based on spb's patch for ircd-seven 2008-06-26 10:18:58 +04:00
Valery V Yatsko ccfcd3519f update TODO 2008-06-26 09:44:07 +04:00
Valery V Yatsko 38d3826839 TODO: done: merge with libratbox SVN 2008-06-26 09:34:27 +04:00
William Pitcock 61e3099998 update TODO 2008-06-25 22:35:44 -05:00
Jilles Tjoelker 92a74bc4a6 Some updates and consistency fixes to help files. 2008-06-25 23:52:28 +02:00
Valery V Yatsko 033be68727 sync libratbox - r25599 + charybdis packaging patch 2008-06-25 09:28:30 +04:00
Valery V Yatsko d9af2dddd3 Branch merge 2008-06-25 07:52:38 +04:00
Valery V Yatsko 2392eb24cd Generating cflags bufs dynamically: one for RPL_MYINFO and one for
supported.c
2008-06-25 07:51:32 +04:00
Valery V Yatsko 57d299acbd Merged find_orphaned_cflags and construct_noparam_modes in one function
as there's no reason to use them separetly
2008-06-25 07:13:58 +04:00
Valery V Yatsko c3f71f606e TODO: done: more beautiful way of adding new channel modes by module 2008-06-24 22:30:14 +04:00
Valery V Yatsko 6b3b07a84e New way of noparam mode search 2008-06-24 22:21:26 +04:00
Valery V Yatsko eba517019e Missed declaration of chm_orphaned 2008-06-24 22:08:24 +04:00
Valery V Yatsko 058aa02c4a New orphaned cflags implementation, now using chm_orphaned instead of
storing orphaned flags in a variable
2008-06-24 22:00:41 +04:00
Jilles Tjoelker 040c4408ed Fix some tracking for cmode +r. 2008-06-25 19:40:12 +02:00
Jilles Tjoelker c08f4515a9 Fix limits on simple modes.
Formerly some mode strings like +svvvv were not accepted.
2008-06-25 19:27:30 +02:00
Valery V Yatsko 73de5d22ed A draft version of find_cmode_slot and orphaned concept for channel
flags
2008-06-24 21:26:49 +04:00
Valery V Yatsko e600f6b488 TODO: btw, this could be useful: allow to set up configfiles path (etc/)
instead of separated configfiles names (kline.conf, ircd.conf etc) like
it is in ratbox3?
2008-06-24 20:54:43 +04:00
Valery V Yatsko 081ad25f69 TODO: 'module engine rework' has begun 2008-06-24 20:46:39 +04:00
Valery V Yatsko 75818939ab Applying dyn-cmodes.diff - first step in implementing channel module
addition in extensions
2008-06-24 20:45:19 +04:00
Valery V Yatsko 193b048113 Added info about two bugs (features?) which must be fixed: 1.
compilation without zlib headers 2. compilation time locale
2008-06-23 03:23:33 +04:00
Valery V Yatsko c481073ea9 Marked that stable version is 3.0 instead of 2.2 2008-06-23 03:19:53 +04:00
Jilles Tjoelker 30e0808268 ident: use rb_read/rb_write instead of direct syscalls 2008-06-21 02:29:21 +02:00
Jilles Tjoelker 0a93f25c7a ident: obtain port numbers earlier and store them
This eliminates two syscalls per ident lookup.
It also removes a piece of code that depends on
the port fields being in the same location for
sockaddr_in and sockaddr_in6.
2008-06-21 01:52:57 +02:00
Jilles Tjoelker e8c4b8b290 ident: Check getsockname() return value. 2008-06-21 01:27:17 +02:00
Jilles Tjoelker ed28210c45 Clean up s_auth a little. No functional changes. 2008-06-21 00:58:08 +02:00
Jilles Tjoelker eb66895a34 Rerun autoconf. 2008-06-21 00:27:16 +02:00
Jilles Tjoelker 081f7ac384 Change == in test(1) to =.
libratbox r25570 (jilles)
2008-06-21 00:27:00 +02:00
Jilles Tjoelker 13818e2470 Remove unused field ip6_int. 2008-06-20 22:55:51 +02:00
Jilles Tjoelker 8813d184e3 Do not timeout unknowns if still waiting for blacklist lookup.
This fixes inability to connect if all DNS queries
time out and any blacklists are defined.
2008-06-20 01:49:53 +02:00
Jilles Tjoelker 3e6a6891a1 Get rid of ", " at the start of some oper privs strings. 2008-06-18 21:58:43 +02:00
Jilles Tjoelker 1728a2acd0 resolver: Remove effectively unused 'resend' flag. 2008-06-15 15:53:04 +02:00
Jilles Tjoelker 8fede7abee resolver: Remove request_state which is no longer used. 2008-06-15 01:17:42 +02:00
Jilles Tjoelker 0accfaf36f Allow CNAMEs everywhere, named will have recursed into them for us.
This makes PTRs containing names that are a CNAME
for an A (instead of an A) work. While this is
probably bad practice, some people do it and most
other ircds seem to accept it.
2008-06-15 00:57:15 +02:00
Jilles Tjoelker ad884f939e Remove construction of some TS5 linebufs. 2008-06-14 02:30:30 +02:00
Jilles Tjoelker bf9ca219d3 Remove more TS5 remants (sendto_server calls). 2008-06-14 02:06:55 +02:00
Jilles Tjoelker 730c5ff105 Move -bqeI from lower TS SJOIN to a more logical place.
This is possible because TS5 support was removed.
2008-06-13 23:55:37 +02:00
Jilles Tjoelker f037fff482 Add an additional check to mr_server() for TS6, in case we don't get an SVINFO
from ircd-ratbox (anfl)
2008-06-13 23:09:52 +02:00
Jilles Tjoelker 0a70e15066 SJOIN: remove various TS5 stuff 2008-06-13 23:03:52 +02:00
Jilles Tjoelker 7592f950b2 Unbreak sending out bans and simple modes with parameters. 2008-06-13 22:21:44 +02:00
Jilles Tjoelker a248682cae Branch merge 2008-06-13 00:32:49 +02:00
Jilles Tjoelker 767394f009 SJOIN: check minimum parameters more strictly. 2008-06-13 00:32:01 +02:00
William Pitcock 1284a4877c Set SONAME to libratbox.so.3. (Again, packaging. Yeah. We know.) 2008-06-10 22:06:54 -05:00
William Pitcock 3ea61d8132 Add libratbox.pc.in for out-of-tree libratbox build (think: packaging). 2008-06-10 22:02:10 -05:00
William Pitcock c7d01d2d7d Make sure x509_cred and dh_params objects are allocated. 2008-06-10 21:24:49 -05:00
William Pitcock 1e320728f3 Merge TODO. 2008-06-10 20:34:46 -05:00
William Pitcock af6f5d479f GNUTLS backend. Untested. 2008-06-10 20:33:15 -05:00
Jilles Tjoelker b9f46fc5fa Get rid of some K&R style function declarations for conf parser. 2008-06-11 00:54:02 +02:00
Jilles Tjoelker 4a4ea261b2 m_stats: get rid of function pointers with unspecified parameter lists
stats l/L is now more a special case than before
2008-06-11 00:53:21 +02:00
Jilles Tjoelker 4cb8529c19 m_set: get rid of function pointers with unspecified parameter lists 2008-06-11 00:39:01 +02:00
Jilles Tjoelker 6d18bf1a12 Some const stuff for m_set. 2008-06-11 00:28:08 +02:00
William Pitcock dd91040957 Run autoreconf. 2008-06-10 13:45:43 -05:00
William Pitcock 5d92990907 libratbox: Add checks for GnuTLS support. 2008-06-10 13:45:15 -05:00
Valery Yatsko 02e13326cf We've done ssl stuff generation tool, 'module engine rework' marked for
current trunk
2008-06-08 12:23:04 +04:30
William Pitcock 9f9b4d7b2b More TS6 special cases simplified. 2008-06-08 02:16:43 -05:00
William Pitcock b813aae326 Remove one last bit of TS5 stuff. 2008-06-08 02:14:21 -05:00
William Pitcock b9d7f41c8a Forgot to test the bitmask, oops. 2008-06-08 02:13:26 -05:00
William Pitcock cf91d0c9d8 Replace old 2.8-style privileges notice with a new one. 2008-06-08 02:09:15 -05:00
William Pitcock 2647617347 Suppress a warning. 2008-06-08 01:32:17 -05:00
William Pitcock 9721c67622 extensions: no more TS5. 2008-06-08 01:31:15 -05:00
William Pitcock a4857d780f core: no more TS5 2008-06-08 01:29:26 -05:00
William Pitcock 06a7954fa1 modules: no more TS5 2008-06-08 01:27:25 -05:00
William Pitcock 45f5f151f8 core modules: no more TS5. 2008-06-08 01:25:42 -05:00
William Pitcock 77bf1a0402 Remove burst_modes_TS5() and burst_TS5(). 2008-06-08 01:11:57 -05:00
William Pitcock a10b07578b Finish merge. 2008-06-08 01:09:52 -05:00
William Pitcock f06c147c70 Merge with 'charybdis-ts6only' branch. 2008-06-08 01:09:04 -05:00
Jilles Tjoelker 00f13098a3 Reindent. 2008-06-03 20:52:47 +02:00
Jilles Tjoelker 823d0e7a34 Clean up m_trace somewhat.
All visibility logic is now in m_trace(), none in
report_this_status().
2008-06-03 20:52:00 +02:00
Jilles Tjoelker 5774cb2ef3 Fix another bad cache variable name. 2008-06-03 20:50:50 +02:00
Jilles Tjoelker 712ca381f9 Add FINDFORWARDS and IDENTIFY commands to oper-guide (from extensions). 2008-05-22 00:46:02 +02:00
Jilles Tjoelker c2c2491a73 Add +F and +W snomasks to oper-guide (from extensions). 2008-05-22 00:30:42 +02:00
Jilles Tjoelker aeeda4466a Reject u@@h klines. 2008-05-21 23:00:10 +02:00
Jilles Tjoelker 1dc9ac1d69 Give an error message when refusing a kline that has neither . : or @. 2008-05-21 22:56:51 +02:00
Jilles Tjoelker 0d234dca12 olist: do not send operspy notices for nonexistent channels 2008-05-21 01:13:45 +02:00
Jilles Tjoelker d4715e8f28 olist: give proper error message if oper does not have oper_spy priv 2008-05-21 00:56:53 +02:00
Jilles Tjoelker 57d78ae1ca Rerun autoconf. 2008-05-18 23:36:39 +02:00
Jilles Tjoelker 9c27c708ee Bump version on trunk to 3.1. 2008-05-18 23:34:39 +02:00
Jilles Tjoelker a2f4910ca7 Added tag charybdis-3.0.1 for changeset b57df81a2c4c 2008-05-18 23:24:45 +02:00
Jilles Tjoelker be54db581c Add MacOS X fixes to NEWS. 2008-05-18 01:24:58 +02:00
Jilles Tjoelker c1309303d4 Rerun autoconf. 2008-05-17 17:46:45 +02:00
Jilles Tjoelker 213aeb8d6b Check for the -rpath linker flag.
This makes it build on MacOS X which neither
supports nor needs this flag.
2008-05-17 17:46:37 +02:00
Jilles Tjoelker 6315153b9c libratbox: Remove static inline symbols from export-syms.txt. 2008-05-17 13:26:42 +02:00
Jilles Tjoelker e0bd36a502 Fix a mistake in kqueue 'overflow' handling.
If there is no space in the output buffer to report an
error adding to the kqueue, kevent(2) will abort and
return the error in errno (I was correct that it does
not tell you where it failed). So do not abort the loop
if kevent(2) fails and do not log (expected) EBADF.
2008-05-14 19:56:41 +02:00
Jilles Tjoelker 47fe799183 Rerun autoconf. 2008-05-13 23:23:12 +02:00
Jilles Tjoelker 6d2090c24c Bump version to 3.0.1. 2008-05-13 23:22:57 +02:00
Jilles Tjoelker 9b4f3c47e1 Save connect errno so that we get a correct connect failure reason
libratbox r25358 (androsyn)
2008-05-13 20:21:12 +02:00
Jilles Tjoelker b68b0b2cde Fix a possible crash with SSL connections closing early.
libratbox r25356 (jilles)
2008-05-12 19:54:24 +02:00
Jilles Tjoelker 98686f18e9 Fix kqueue sometimes dropping updates.
(ircd wouldn't read or write anymore to certain clients)
This happens because kqueue.c will often try to add
already closed file descriptors to the kqueue. The kernel
tries to report bad file descriptors in the eventlist; if
the eventlist has no space, processing of the changelist
is silently halted.
The fix:
1. allocate two kqlst things, one for what kqlst currently does
and one as output buffer
this ensures the kevent(2) call in rb_select_kqueue() never
drops updates
2. replace the kevent(2) call in kq_update_events() by a loop
that processes the updates one at a time
that doesn't happen much, and it's the only way to be sure
without also getting events out of the queue we cannot process
at that time
libratbox r25354 (jilles)
2008-05-12 18:54:20 +02:00
William Pitcock b883310eb5 Added tag charybdis-3.0.0 for changeset d9d47a5f220c 2008-04-25 14:56:38 -05:00
William Pitcock a1789fbdc7 charybdis 3.0.0 2008-04-25 14:56:35 -05:00
William Pitcock 0042c7a1cb Install it into /bin 2008-04-25 14:52:17 -05:00
William Pitcock 562ea72083 Removed tag charybdis-3.0.0 2008-04-25 14:48:39 -05:00
William Pitcock 0037615355 Added tag charybdis-3.0.0 for changeset 4f8eddb79e21 2008-04-25 14:47:25 -05:00
William Pitcock a7a27f1f80 Automated merge with ssh://hg.atheme.org//hg/charybdis 2008-04-25 14:46:46 -05:00
William Pitcock b1572b6778 Add SSL generation tool. 2008-04-25 14:46:24 -05:00
Jilles Tjoelker b11e26cf1d Added tag charybdis-3.0.0-rc1 for changeset 7aef7b002131 2008-04-25 14:38:53 +02:00
Jilles Tjoelker 5cb528f15c Global server notices already exist.
(:<sourceserver> ENCAP <server> SNOTE <snomask> :<text>)
2008-04-25 14:24:33 +02:00
Jilles Tjoelker 8a99d1b9f5 Copy makerelease scripts from atheme-services and adapt them. 2008-04-25 14:17:32 +02:00
Jilles Tjoelker e2435f2280 Document PRIVS command in sgml. 2008-04-24 23:58:47 +02:00
Jilles Tjoelker a58d63e94c Mention potential version differences explicitly. 2008-04-24 23:47:27 +02:00
Jilles Tjoelker a66dbced56 Require remoteban privilege to send dline/undline to other servers. 2008-04-23 18:32:46 +02:00
Jilles Tjoelker 0786ceea88 Mention undline more clearly with unkline oper privilege. 2008-04-23 18:31:34 +02:00
Jilles Tjoelker 848f83a1cb Mention dline/undline with remoteban oper privilege. 2008-04-23 18:31:02 +02:00
William Pitcock 30b25e494e Remove ChangeLog -- it's no longer updated since SVN to HG transition. 2008-04-22 19:42:39 -05:00
William Pitcock 7f7bf7ee3e Add SNONOTICE stuff to 3.1 todo. 2008-04-22 19:40:25 -05:00
Jilles Tjoelker eeae854d6f Expand NEWS for 3.0.0. 2008-04-22 23:41:36 +02:00
Jilles Tjoelker 7f9801883f Show hg revision number (serno) in ircd -version. 2008-04-22 23:41:16 +02:00
William Pitcock bec4db9b38 Automated merge with ssh://hg.atheme.org//hg/charybdis 2008-04-21 20:26:51 -05:00
William Pitcock 8308fcdfed Use sendto_one_numeric() with the new AWAY numerics. 2008-04-21 20:26:23 -05:00
Jilles Tjoelker 0fcbff0c49 Don't try to fflush a file we just closed.
ircd-ratbox r25251 (androsyn)
2008-04-22 00:45:43 +02:00
William Pitcock bbce52f18d TS_MIN is 6 now. 2008-04-11 10:23:47 -05:00
William Pitcock 5295cde25d start working on TS5 removal. 2008-04-11 10:22:44 -05:00
467 changed files with 198269 additions and 101391 deletions

View File

@ -1,27 +1,42 @@
syntax: glob
Makefile
*~
*.o
*.so
*.dSYM/
*.lo
*.la
*.swp
*.orig
*.log
.deps
.libs
autom4te.cache
bandb/bandb
bandb/bantool
config.log
config.status
include/setup.h
include/serno.h
libratbox/include/libratbox_config.h
libratbox/include/librb-config.h
libratbox/include/stamp-h1
libratbox/libratbox.pc
libratbox/libtool
libratbox/src/version.c
scripts/*.tbz2
scripts/*.tgz
scripts/*.tar.bz2
scripts/*.tar.gz
servlink/servlink
src/ircd
src/lex.yy.c
src/version.c.last
src/y.tab.h
src/y.tab.c
ssld/ssld
tools/convertilines
tools/convertklines
tools/genssl.sh
tools/mkpasswd
tools/viconf
include/serno.h
libratbox/src/version.c.last

2
.lvimrc Normal file
View File

@ -0,0 +1,2 @@
au BufWritePost *.c execute 'silent !astyle --style=linux --mode=c -n' shellescape(expand('%'), 1) ' >/dev/null'
au BufWritePost *.h execute 'silent !astyle --style=linux --mode=c -n' shellescape(expand('%'), 1) ' >/dev/null'

12
.travis.yml Normal file
View File

@ -0,0 +1,12 @@
language: c
compiler:
- gcc
before-install:
- sudo apt-get update
install:
- sudo apt-get install build-essential libssl-dev flex bison
script: "./configure && make"
notifications:
irc: "irc.yolo-swag.com#elemental-ircd"

28
BUGS
View File

@ -1,28 +0,0 @@
Known Bugs worthy of a mention:
--------------------------------------------------------------------------------
1. /MODUNLOAD causes cores:
- If a module is modified before being unloaded, /MODUNLOAD (and
therefore /MODRELOAD) may cause a core.
This problem is caused by the behaviour of the OS, which treats
shared libraries differently to executables (modifying the ircd
binary whilst it is running would also cause a core, but is denied
by the OS).
A workaround to avoid coring is possible however. To install new
modules, first remove or rename the old module, then copy/move the
new file into place. install or make install is also safe.
/MODUNLOAD will then work successfully.
We will likely have a workaround implemented in the next version.
BUG REPORTS: If you run this code and encounter problems, you must report
the bug on http://bugs-meta.atheme.org/ (Charybdis project) or via IRC,
irc.atheme.org #charybdis.
Please include a gdb backtrace and keep your binaries, modules and core file
in case the developers need more information.
--------------------------------------------------------------------------------
$Id: BUGS 3344 2007-04-01 22:20:00Z jilles $

20
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,20 @@
# Contribution guidelines
Please open contributions as either issue reports or pull requests. We will ask
that anything that requires testing outside our normally supported platforms be
marked as such.
As ircd is such an ancient project with varying code styles, please try to
follow the current coding style of the file you are in. If all else fails,
please use the [Linux Kernel](https://www.kernel.org/doc/Documentation/CodingStyle)
coding style.
Please run all code against the following `astyle` command before sending in
a pull request:
```console
$ astyle --style=linux --mode=c -n $file
```
It should be trivial to set up your text editor to do this for you.

49
CREDITS
View File

@ -1,5 +1,41 @@
$Id: CREDITS 3133 2007-01-21 15:38:16Z jilles $
Elemental-IRCd is a fork of the now-defunct ShadowIRCD project.
The Elemental-IRCd team is listed below in nick-alphabetical order:
Xena, Sam Dodrill <shadowh511 -at- gmail.com>
Some Elemental-IRCd features are modeled after or direct ports of
code from Charybdis.
ponychat-ircd is a fork of the ShadowIRCD project created to meet
PonyChat's needs and keep the now-defunct ShadowIRCD project's goals
alive.
The ponychat-ircd team is listed in nick-alphabetical order:
aji, Alex Iadicico <alex -at- ajitek.net>
Kabaka, Kyle Johnson <kabaka -at- ponychat.net>
Xe, Sam Dodrill <shadowh511 -at- gmail.com>
ShadowIRCd 6 is a modern restart of the old ShadowIRCd project
based on Charybdis with a few additional features to make it appeal
more to more users. We try to work as closely as possible with the
Charybdis team.
The ShadowIRCd team is listed in nick-alphabetical order:
jdhore, JD Horelick <jdhore1 -at- gmail.com>
Taros, Brett Greenham <taros34 -at- hotmail.com>
Some ShadowIRCd 6 features such as the oper-override and remote
RESTART, DIE and MOD* commands were borrowed from ircd-seven.
ircd-seven is written by:
spb, Stephen Bennett <spb -at- attenuate.org>
Charybdis started as an evolution from ircd-ratbox. Its development
is led by a team of dedicated developers who have put a lot of time
into the project, and it has seen use on a variety of different
@ -7,10 +43,9 @@ network configurations.
The charybdis core team is listed in nick-alphabetical order:
dwr, Valery Yatsko <darkwire -at- darkwire.ru>
gxti, Michael Tharp <gxti -at- partiallystapled.com>
jilles, Jilles Tjoelker <jilles -at- stack.nl>
nenolod, William Pitcock <nenolod -at- nenolod.net>
spb, Stephen Bennett <spb -at- attenuate.org>
The following people have made contributions to the Charybdis releases,
in nick-alphabetical order:
@ -18,11 +53,15 @@ in nick-alphabetical order:
AndroSyn, Aaron Sethman <androsyn -at- ratbox.org>
anfl, Lee Hardy <lee -at- leeh.co.uk>
beu, Elfyn McBratney <elfyn.mcbratney -at- gmail.com>
dwr, Valery Yatsko <dwr -at- shadowircd.net>
Entrope, Michael Poole <mdpoole -at- trolius.org>
spb, Stephen Bennett <spb -at- attenuate.org>
gxti, Michael Tharp <gxti -at- partiallystapled.com>
jdhore, JD Horelick <jdhore1 -at- gmail.com>
mr_flea, Keith Buck <mr_flea -at- esper.net>
Taros, Brett Greenham <taros -at- shadowircd.net>
ThaPrince, Jon Christopherson <jon -at- vile.com>
twincest, River Tarnell <river -at- attenuate.org>
w00t, Robin Burchell <surreal.w00t -at- gmail.com>
Visit the Charybdis website at: http://www.ircd-charybdis.net
Visit us on IRC at: irc.staticbox.net #charybdis
Visit the elemental-ircd repo at: http://www.github.com/ponychat/elemental-ircd
Visit us on IRC at: irc.ponychat.net #rainbow-factory

15246
ChangeLog

File diff suppressed because it is too large Load Diff

99
Config Executable file
View File

@ -0,0 +1,99 @@
#!/usr/bin/env python
"""
Copyright 2014 Sam Dodrill <shadowh511@gmail.com>
This software is under GPL.
"""
from os import system
try:
raw_input = raw_input
except NameError:
raw_input = input
art = """
_______ __ __ __ _______ ______ ______ __
| ___| |.-----.--------.-----.-----.| |_.---.-.| |_____|_ _| __ \ |.--| |
| ___| || -__| | -__| || _| _ || |______|| |_| < ---|| _ |
|_______|__||_____|__|__|__|_____|__|__||____|___._||__| |_______|___|__|______||_____|"""
welcome ="""
Welcome to the Elemental-IRCd Configuration script. This script will help you choose the
best compile flags for your installation of Elemental-IRCd.
"""
class Configure():
def promptUser(self, prompt, default):
inp = raw_input("%s [%s]> " % (prompt, default))
if inp == "":
return default
return inp
def promptYesNo(self, prompt, defult=True):
inp = False if self.promptUser(prompt, "Y") == "N" else True
return inp
def go(self):
configflags = ["./configure"]
print(art)
print(welcome)
print("Please specify where you would like to install Elemental-IRCd.")
installloc = self.promptUser("Install location?", "$HOME/ircd")
print("")
print("Please specify the maximum nickname length. This must be the same across")
print("all servers in your network or you risk desyncs. The maximum is 50.")
nicklen = 0
nicklen_valid = False
while not nicklen_valid:
try:
nicklen = int(self.promptUser("Maximum nickname length?", "31"))
if nicklen < 51:
nicklen_valid = True
except ValueError:
nicklen_valid = False
if not nicklen_valid:
print("Error: you must choose an integer value under 50.")
print("")
print("Would you like to disable small network support? This increases the size")
print("of a few buffers in the code and can increase performance on large networks.")
smallnet = self.promptYesNo("Small network? (Y/N)")
configflags.append("--prefix=%s" % installloc)
configflags.append("--with-nicklen=%s" % nicklen)
if not smallnet:
configflags.append("--enable-small-net")
else:
configflags.append("--disable-small-net")
print("\nThat should be it for now. Running %s" % " ".join(configflags))
raw_input("Press enter to continue... ")
system(" ".join(configflags))
print(art)
print("""
Next, run `make` and `make install`. Then copy %s/etc/example.conf to
%s/etc/ircd.conf and read through the example configuration completely to make
sure your install is tailored to your needs. After that, run %s/bin/ircd
and start to connect clients and servers as you need.
If you have any problems, please check the documentation in the doc/ folder
of the source repository. If problems persist please stop by #elemental-ircd
on irc.yolo-swag.com and ask. Running Elemental-IRCd in insane conditions may
make support either very difficult or at most impossible.""" % (installloc, installloc, installloc))
system("clear")
c = Configure()
try:
c.go()
except (KeyboardInterrupt, EOFError):
print("\nInterrupted, exiting!")
# vim: set ts=4 sw=4 tw=0 et

22
Dockerfile Normal file
View File

@ -0,0 +1,22 @@
FROM flitter/init
MAINTAINER Xena <xena@yolo-swag.com>
# Update base system
RUN apt-get update && apt-get upgrade -yq && \
apt-get -yq install build-essential autoconf libssl-dev flex bison && \
adduser --system --home /home/ircd ircd && \
mkdir /home/ircd/src && \
chmod 777 /home/ircd/src
ADD . /home/ircd/src
RUN cd /home/ircd/src; ./configure --prefix=/home/ircd/run ; make ; make install
ADD doc/example.conf /home/ircd/run/etc/ircd.conf
ADD extra/runit/ /etc/service/ircd/
RUN chmod -R 777 /home/ircd/run
EXPOSE 6667
ENTRYPOINT /sbin/my_init

21
INSTALL
View File

@ -1,10 +1,11 @@
Charybdis INSTALL Document
ShadowIRCd INSTALL Document
$Id: INSTALL 3384 2007-04-03 22:45:04Z jilles $
Copyright (c) 2001 by ircd-hybrid team
Copyright (c) 2002-2004 ircd-ratbox development team
Copyright (c) 2005-2008 charybdis development team
Copyright (c) 2010 by ShadowIRCd development team
----------------------------------------------------------------------
@ -17,7 +18,7 @@
1.
Read the NEWS file to find out about the exciting new features in
this version. Other good reads are BUGS, doc/example.conf, and
this version. Other good reads are doc/example.conf, and
README.FIRST.
2.
@ -25,7 +26,7 @@
Run the configure script. It will create include/setup.h and the
Makefiles to match your system. In ircd-ratbox, the paths are now handled
with the --prefix option to configure, not in config.h.
/usr/local/ircd is the default if no prefix is specified.
$HOME/ircd is the default if no prefix is specified.
./configure --prefix="/usr/local/ircd"
@ -136,16 +137,12 @@
HOW TO GET HELP
Send Check or Money Order to... just kidding! You're on your own for
support. Try asking other ircd-ratbox admins on EFnet if you can't fix it
yourself. If you do fix anything, however, please send context or unified
diffs to ircd-ratbox@lists.ratbox.org so the fixes can be incorporated into
the next release of ircd-hybrid. If ratbox crashes on you, PLEASE contact
ircd-ratbox@lists.ratbox.org ASAP with a backtrace of the core.
The best way to get help regarding bugs and such is by asking on our
IRC channel which is at irc.thinstack.net #shadowircd . Bugs can also
be filed on our bugtracker at:
http://bitbucket.org/uranium/shadowircd/issues/?status=new&status=open
DISCUSSION: There is a mailing list for discussion of ratbox issues,
To subscribe, visit:
http://lists.ratbox.org/cgi-bin/mailman/listinfo/ircd-ratbox
----------------------------------------------------------------------

View File

@ -24,10 +24,17 @@ prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
mandir = @mandir@
libdir = @libdir@
pkglibdir = @pkglibdir@
moduledir = @moduledir@
helpdir = @helpdir@
confdir = @confdir@
sysconfdir = @sysconfdir@
logdir = @logdir@
rundir = @rundir@
pkgrundir = @pkgrundir@
localstatedir = @localstatedir@
pkglocalstatedir= @pkglocalstatedir@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
# Default CFLAGS
# CFLAGS = -g -O2 -DNDEBUG
@ -46,7 +53,8 @@ CFLAGS = @CFLAGS@
# the system one.
#CFLAGS= -DNDEBUG -g -O2 -D"FD_SETSIZE=1024"
SHELL=/bin/sh
SUBDIRS=libratbox modules extensions src tools ssld doc help
# `extensions' must be after `modules' for proper creation of $(moduledir).
SUBDIRS=libratbox modules extensions src tools ssld bandb doc help
CLEANDIRS = ${SUBDIRS}
RSA_FILES=rsa_respond/README rsa_respond/respond.c rsa_respond/Makefile
@ -67,7 +75,7 @@ build:
sh configure; \
fi
@if [ -d .hg ] ; then \
revh=`hg parents --template '#date|shortdate#_#node|short#' 2>/dev/null | sed -e s/-//g -e s/_/-/`;\
revh=`hg parents --template '{date|shortdate}_{node|short}' 2>/dev/null | sed -e s/-//g -e s/_/-/`;\
[ -z "$$revh" ] || echo '#define SERNO "'$$revh'"' >include/serno.h ; \
fi
@[ -f include/serno.h ] || echo '#define SERNO "unknown"' >include/serno.h
@ -116,27 +124,27 @@ lint:
install-mkdirs:
@echo "ircd: setting up ircd directory structure"
-@if test ! -d $(DESTDIR)$(prefix); then \
mkdir $(DESTDIR)$(prefix); \
mkdir -p -m 755 $(DESTDIR)$(prefix); \
fi
-@if test ! -d $(DESTDIR)$(bindir); then \
mkdir $(DESTDIR)$(bindir); \
mkdir -p -m 755 $(DESTDIR)$(bindir); \
fi
-@if test ! -d $(DESTDIR)$(confdir); then \
mkdir $(DESTDIR)$(confdir); \
-@if test ! -d $(DESTDIR)$(sysconfdir); then \
mkdir -p -m 755 $(DESTDIR)$(sysconfdir); \
fi
-@if test ! -d $(DESTDIR)$(mandir); then \
mkdir $(DESTDIR)$(mandir); \
fi
-@if test ! -d $(DESTDIR)$(moduledir); then \
mkdir $(DESTDIR)$(moduledir); \
fi
-@if test ! -d $(DESTDIR)$(helpdir); then \
mkdir $(DESTDIR)$(helpdir); \
mkdir -p -m 755 $(DESTDIR)$(mandir); \
fi
-@if test ! -d $(DESTDIR)$(logdir); then \
mkdir $(DESTDIR)$(logdir); \
mkdir -p -m 755 $(DESTDIR)$(logdir); \
fi
-@if test ! -d '$(DESTDIR)$(pkgrundir)'; then \
mkdir -p -m 755 '$(DESTDIR)$(pkgrundir)'; \
fi
-@if test ! -d '$(DESTDIR)$(pkglocalstatedir)'; then \
mkdir -p -m 755 '$(DESTDIR)$(pkglocalstatedir)'; \
fi
install: install-mkdirs all
@for i in $(SUBDIRS); do \
echo "install ==> $$i";\

View File

@ -1,9 +0,0 @@
The Charybdis Mercurial repository can be checked out using the following command:
hg clone http://hg.atheme.org/charybdis charybdis-devel
The stable version can be checked out using the following command:
hg clone http://hg.atheme.org/release/charybdis-2.2 charybdis-stable
Charybdis's Mercurial repository depot can be browsed over the internet at
the following address:
http://hg.atheme.org/

541
NEWS
View File

@ -1,21 +1,540 @@
This is charybdis 3.0.0, Copyright (c) 2005-2008 Charybdis team.
This is elemental-ircd 6.6.1, Copyright (c) 2014 elemental-ircd team.
See LICENSE for licensing details (GPL v2).
-- elemental-ircd 6.6.1
All code is now in the linux kernel coding style. Patches that do not
follow this coding style are at risk of being rejected. It is suggested
that your editor be set up to automatically style your code in the
desired format. A vim resource file is provided in the repository root.
additions
- automatic code styling for vim
- Dockerfile and nightly docker builds
- show cloaked I:Line vhost IP address remotely
bugfixes
- all channel lists have their own limit instead of sharing one.
5ba9c76d224afac877d9500d6ac1eb8f2bddd076
- fix potential undefined behavior with m_away
7d3966bc9bd9e9ab7833b4ecb0751671bdd085e7
- fix Anope 2.0 protocol module
79a3bf79ae66c43470c4bed25c33053b13a032d1
-- elemental-ircd 6.6
additions
- add OWNER=y to 005
- add autoconfigure script like unrealircd
- add channel mode +u to hide banlists unless users have halfop or up
- add modules for services packages
- add quotes around PART reason
- add umode +I to hide channels line from WHOIS
- make end-user /OPER failures much more generic
- make flooding SNOTEs global
- show own modes in whois
- show remote server IP addresses
- update helpfiles to have much more up to date information
bugfixes
- don't strip unicode in strip_unprintable
- fix extended-join for remote users
- fix null reference in away-notify
- make genssl.sh generate ten year certs
- merge some upstream charybdis patches
removals
- remove away-notify
- remove AHBL from default configs
- remove m_post SNOTEs because of an upstream change
The official channel for Elemental-IRCd is now #elemental-ircd on
irc.yolo-swag.com.
-- elemental-ircd 6.5.1
Rename to Elemental-IRCd
-- ponychat-ircd 6.5
additions
- Channel owner mode (+y)
- away-notify, account-notify and extended-join client capabilities
- DNSBL hit and m_post HTTP proxy rejection server notices are global
- IPv6 DNSBL support
- Away rate limiting added
- Added snotes for failed SASL authentication attempts if need_sasl flag is set
bugfixes
- Reject nicks with '~' in them, rather than cutting at the '~'
- Fix possible memory leak of certificate fingerprints
- Printed error message on unreadable config file rather than just a log entry
-- ponychat-ircd 6.3.4
bugfixes
- Fix compilation with GCC 4.8 and above
-- shadowircd 6.3.3
bugfixes
- Fix compilation with Glibc-2.16 and newer
- Fix extensions/ip_cloaking not telling linked servers about a changed hostname
- Fix crash when a CAPAB with no parameters is sent
- Fix bugs when shadowircd is run under OpenVZ or Virtuozzo
-- shadowircd 6.3.2.1
bugfixes
- Fix small buildsystem regressions introduced in shadowircd 6.3.2
-- shadowircd 6.3.2
bugfixes
- Fix ACTIONs working on a channel when cmode +G (blockcaps) is set.
other
- Do some things the git was as we've switched to git as our VCS since 6.3.1.
- Add support for proper system-wide installability.
- Add a few simple helper scripts for irssi, WeeChat and XChat to add a /OHELP
command which makes it far easier to view ShadowIRCd help on clients that use
/HELP for their own uses.
-- shadowircd 6.3.1
bugfixes
- When setting/unsetting cmode +M, wallops are only sent once, globally,
not for every server on the network where the mode change happens.
- Don't allow +Z to be set by default_umodes.
- Cope with OPENSSL_VERSION_NUMBER not being a long. This is the case on
very new FreeBSD versions.
- Disallow mIRC italics in channel names when disable_fake_channels is in use.
- Allow kick_on_split_riding to protect channels with mlocked keys.
-- shadowircd-6.3.0
new modes
- channelmode 'N' has been moved to 'd' to allow for m_roleplay and
specifically, compatibility with the charybdis m_roleplay.
new modules
- m_roleplay: New extension allowing many roleplay commands. Individual
channels can disable this by setting channelmode +N on their channels.
configuration
- use auth::auth_user for SASL. It is no longer usable in PASS (though its
use-case there is non-existant), but you can now set so if a user
successfully authenticates to the accountname in auth_user with SASL,
they will get the proper auth block privs. You can have multiple auth_users
in one auth block.
- you can now specify a SSL fingerprint that the remote server must have in
order to link.
opers
- wallops are now sent upon setting or unsetting of +M or any other hidden
channelmode.
- /LIST now has operspy support. You can see all channels (including secret
channels) with /LIST ! or /LIST !#target. OLIST still exists and can be
used as well. OLIST will also show channelmodes whereas LIST will not.
users
- /LIST can now be constrained by topic TS and channel TS.
code
- native support for SHA256, SHA512 and Blowfish added everywhere.
- many small improvements and bugfixes.
-- shadowircd-6.2.0
configuration
- add channel::hide_channel_below_users - Channels with a user count lower
than the value of this option will not be shown by default in /LIST.
- add channel::admin_on_channel_create - If enabled, gives users creating
new channels +ao in that channel instead of just +o.
- add channel::disabledmodes - This allows opers to disallow users from
using certain channelmodes. This is only read on startup and your services
and remote servers must be configured the same otherwise desyncs will occur.
- add many services aliases for new Atheme services.
opers
- when users get hit by a DNSBL, this is now shown in the snotes.
other
- change kicknorejoin to not be a config option and be hardcoded to 2 seconds
because a longer time is kind of pointless.
- Many new features and improvements from charybdis 3.3.0. See below for
information about all that.
code
- many bugfixes and various cleanups.
-- charybdis-3.3.0
server protocol
- Add new BAN command, for propagated network-wide bans (K/X:lines and RESVs).
These will burst to new servers as they are introduced, and will stay in sync
across the whole network (new BAN capab).
- Add new MLOCK command, to implement ircd-side channel mode locks. This allows
services to send out a list of mode letters for a given channel which may not
be changed, preventing mode fights between services and client bots (new MLOCK
capab).
user
- New RPL_QUIETLIST(728) and RPL_ENDOFQUIETLIST(729) numerics are used for the
quiet (+q) list, instead of overloading the ban list numerics.
- Users may no longer change the topic of a -t channel if they cannot send to
it.
- Add help for EXTBAN, describing the syntax of extended bans in general, as
well as the most common types.
- Changed AWAY messages are now propagated to other servers. Previously, AWAY
was only propagated when the user was not already away.
- Channel mode +c (and other places that disallow colour codes) now also strip
ASCII 29 (mIRC 7 italics).
- Add auto-accept for user mode +g (callerid): Messaging a user while set +g
will automatically add them to your accept list.
- Add target change for channels. It applies to unopped, unvoiced and unopered
users. This has the effect of stopping spambots which join, message and part
many channels at a time.
- Show RPL_WHOISLOGGEDIN in /whowas as well as in /whois entries. This adds at
most an additional 0.5MB of memory usage.
oper
config
- Add general::use_propagated_bans to switch the new BAN system on or off.
- Add general::default_ident_timeout, to control the timeout for identd (auth)
connections.
- Add channel::channel_target_change to switch the new channel target change limits
on or off.
- Fix class::number_per_ident so that it also applies to connections without
identd.
- Change the example sslport option to 6697, which is more standard than 9999.
misc
- The custom channel mode API has been rewritten, allowing these modules to work
correctly when reloaded, or loaded from the config file.
- The EFNet RBL is now recommended, instead of DroneBL.
- Remove the unsupported modules directory.
- Numerous bug fixes and code cleanups.
- In mkpasswd, default to MD5 crypt instead of insecure DES.
-- shadowircd-6.1.0
new configuration options
- general::static_quit - Quit message to display for all users (not opers).
- general::no_part_messages - If this option is set to no, the ircd will not
display PART messages/reasons from users.
- general::true_no_oper_flood - Turns off *ALL* flood protection for opers.
Instead of command flooding being 4x what it is for a user with no_oper_flood,
there is no limit at all. This option also allows opers to flood channels/users
so if you do set it, be extremely careful.
- serverinfo::helpchan and helpurl - These are 2 config options that tell users,
when they do /quote help (with no extra parameters) the official network help
channel and a special URL for help. If these options are disabled, the users
will just get the help index and that's it on /quote help.
- general::default_ident_timeout - Allows you to set the default ident timeout
in the ircd.conf instead of it being hardcoded and only settable with /SET.
new commands
- CYCLE #channel - server-side CYCLE, also called HOP in some clients/servers.
Parts the user from the given channel, then joins them to it immediately after.
Enabled by loading extensions/m_cycle.
opers
- Override no longer alows overriding opers to talk through +q, +m, etc.
If you need to talk through one of these modes, its recommended to remove
the offending mode or give yourself voice/ops.
- OLIST now shows channel modes so opers can easily see which channels are
+s and see which channels have oper-only channel modes set.
- RESTART and DIE now can be executed remotely. See the appropriate helpfiles
for details.
- All module management commands (MODLOAD, MODLIST, MODUNLOAD, MODRELOAD and
MODRESTART) can be executed remotely. See the appropriate helpfile for
details.
- OMODE can now set and unset +ah.
- OJOIN now works with !#channel and %#channel.
- Staff channelmodes (+AO) now require chanops to set.
- OPERHOST option added to SET. You can now use SET to change the default
operhost that operators get upon opering up, though like the
general::default_operhost config option it will not override the
operator::vhost config option.
other
- Added a strip_unprintable function to make evasion of cmodes +G and +K
less trivial.
- Massive helpfile updates.
- Added SVSJOIN s2s command. This allows things like atheme's ns_ajoin
to work on shadowircd.
- Added BAN stuff (propogated bans on burst) from charybdis trunk. This
can be disabled and the old behavior can be used by setting the
general::use_propogated_bans option to no.
- The --enable-small-net configure option is now enabled by default.
If you wish to disable small net mode, pass --disable-small-net to
configure.
- New channel mode adding API has been added from charybdis trunk.
- NOTICE/PRIVMSG @#channel and +#channel now go to admin/halfop as well
as chanop.
-- shadowircd-6.0.0
new modes
- Add umode +C (no CTCP).
- Add umode +V, users with this mode set will never recieve channel invites
from other users.
- Add umode +B which identifies users as being bots in /whois.
- Add umode +G which disallows users from messaging you unless you're both
on at least one channel together. This can be "overridden" with /accept.
- Add cmode +T which blocks all notices to the channel.
- Add cmode +D which blocks all actions (/me's) from being sent to the channel.
- Add cmode +E which disallows channel ops from kicking users.
- Add cmode +N which disallows users from changing their nick while they're on
a channel with this mode set.
- Add cmode +K (norepeat) which will block repeated messages, regardless of
who they're from.
- Add cmode +G which blocks messages containing 50% or more capital letters
from being sent to the channel.
- Add cmode +J which disallows a kicked user from rejoining within 'X' seconds
of them being kicked, where 'X' is the variable of the channel::kick_no_rejoin_time
configuration option.
- Add cmodes +a and +h (admin and halfop, respectively). There are 2 extra
prefixes to more finely-grain the status of staff members in your channels.
They can be enabled or disabled in the configuration file with the options
channel::use_halfop and channel::use_admin.
new configuration options
- auth::autojoin - This option will specify what channels users in a matching
auth {} block will automatically join on connect to your server/network.
- auth::autojoin_opers - This option will specify what channels opers in a
matching auth {} block will automatically join on oper up (/oper).
- channel::cycle_host_change - This option defines whether or not users
will cycle (part and rejoin) the channels they're in when their host changes.
This can be annoying to some people, but disabling it can cause client desyncs.
- channel::host_in_topic - This option defines whether or not a host setter's
full host or just their nick will be shown on /TOPIC.
- channel::use_local_channels - With this option, you can enable/disable
support for local channels on your server/network.
- channel::exemptchanops - This option defines what channel modes channel
operators are exempt from, channel modes usable in this option are: cCDTNGK.
- general::secret_channels_in_whois - This option defines whether or not opers
can see secret channels that a user is in when whoising them. Secret channels
will show up in the whois prefixed with *. If this option is disabled, opers
will still be able to see secret channels a user is in with the /SPYWHOIS
command.
- Enabled a few popular extensions by default, added a few extensions to the
example config files that were missing, add a few more services aliases
by default, enable ip_cloaking by default and get rid of all the old
ip_cloaking modules.
opers
- Users' umodes are shown when you whois them.
- swhois support - Adds a mostly free-form line of text to opers' whois
if one is set in their operator {} block.
- custom operstring - Instead of showing the IRC operator or IRC administrator
oper strings, you can customize what it shows in each oper's operator {}
block.
- host-on-oper - Give a vhost to operators upon oper up. Can be defined
generally, then the general option may be overridden by each operator {}
block.
- operoverride - Oper override works very differently in ShadowIRCd compared
to all other IRCd's which support oper override. In ShadowIRCd, to be able
to override, you must have the oper:override privledge and you must then
set umode +p on yourself. The p umode will automatically expire and un-set
itself after a time set in the configuration option general::expire_override_time.
- immune - Adds cmode +M. Opers can set this on a channel (even if they don't
have ops) without the channel's ops or other users seeing (only opers see
this mode at all.) It disallows anyone in the channel from kicking opers.
- OACCEPT/callerid override - In ShadowIRCd 6, opers no longer can simply PM
users that have umodes +g or +G set and the oper is not on their accept list.
To allow opers to still be able to PM users in this situation, OACCEPT has been
added. OACCEPT is a new extension that enables the command /oaccept <user>
which adds a piece of metadata to that use which will allow you to PM them.
other
- Changed default NICKLEN to 31 (from 15) to fit more closely with other
IRCd's.
- Rebrand many things from Charybdis to ShadowIRCd.
- Move the m_force module to extensions.
- Add a metadata framework. Currently used for swhois, custom operstring,
OACCEPT, cmode +J, cmode +K.
-- charybdis-3.2.0
server protocol
- Apply +z to messages blocked by +b and +q as well. (new EOPMOD capab)
- Add new topic command ETB, allowing services to set topic+setter+ts always.
(new EOPMOD capab)
- The slash ('/') character is now allowed in spoofs.
user
- Add can_kick hook, based on the ircd-seven one.
- Add cmode +C (no CTCP) from ircd-seven.
- Flood checking has been reworked.
- Fix op-moderate (cmode +z) for channel names with '@'.
- Add CERTFP support, allowing users to connect with an SSL client
certificate and propagating the certificate fingerprint to other servers.
Services packages can use this to identify users based on client
certificates.
- Maintain the list of recently used targets (for the target change
anti-spam system) in most-recently-used order, overwriting the least
recently used target with a new one. This should be friendlier to users
without giving spambots anything.
- Do not require target change slots for replying to the last five users to
send a private message, notice or invite.
- Apply target change restrictions to /invite.
- Apply umode +g/+R restrictions to /invite, with the difference that
instead of sending "<user> is messaging you" the invite is let through
since that is just as noisy.
oper
- Add /rehash throttles to clear throttling.
- Send all server notices resulting from a remote /rehash to the oper.
- '\s' for space is now part of the matching, not a substitution at xline
time, fixing various issues with it.
- Display o:line "nickname" in oper-up server notices.
- Fix sendq exceeded snotes for servers.
- SCAN UMODES: default list-max to 500, like a global WHO.
- Ignore directory names in MODRELOAD to avoid crashing if it is a core
module and the path is incorrect.
- Tweaks to spambot checks.
config
- Add channel::only_ascii_channels config option to restrict channel names
to printable ascii only.
- Add channel::resv_forcepart, forcibly parts local users on channel RESV,
default enabled.
misc
- New mkpasswd from ircd-ratbox.
- Check more system calls for errors and handle the errors.
- Various ssld/libratbox bugfixes from ircd-ratbox. [some MERGED]
- Fix fd passing on FreeBSD/amd64 and possibly Solaris/sparc. [MERGED]
- Various documentation improvements. [some MERGED]
- Fix some crash issues. [MERGED]
- Add bandb from ircd-ratbox, which stores permanent dlines/klines/xlines/resvs
in an sqlite database instead of a flatfile and does the storage in a
helper process.
-- charybdis-3.1.0
- Remove TS5 support. No TS5 servers are permitted in a network with
charybdis 3.1.0 or newer, except jupes.
- Replace oper flags by privilege sets (privsets). This adds an extra
level of indirection between oper flags and operator blocks. /stats O
(capital O) shows the configured privsets.
- Update libratbox and ssld from upstream and use it better.
- Add auth_user to auth{}. This allows specifying a username:password instead
of just a password in PASS, so that a fixed user@host is not necessary
for a specific auth{} block.
- Add need_ssl to auth{} and operator{}. This makes these blocks reject
the user if not connected via SSL.
- Allow modules to provide simple channel modes without parameter.
- Remove restrictions on CNAME in the resolver.
- Make the resolver remember nonresponsive nameservers.
- Move nick collision notices from +s to +k.
- Add additional information to various server notices about server
connections.
- Show throttle information in /stats t.
- Show rejectcache and throttle information in /testline.
- Show oper reason in /testline.
- Allow opers to see other users' umodes with /mode <nick>.
- SCAN UMODES GLOBAL NO-LIST MASK <mask> is no longer an operspy command.
- Also apply floodcount to messages to remote clients (except services).
- Remove user@server messages to local users. Sending such messages to
remote servers is still possible, for securely messaging pseudoservers
whether service{}'ed or not. The special oper-only syntax opers@server
remains as well.
- Allow /list on a named +p channel. A full /list already included +p channels.
- Add operspy /topic.
- For remote rehashes, send error messages to the requesting oper as well.
- Disable autoconnect for a server with excessive TS delta.
- Disallow invites to juped channels.
- Warn about certain duplicate and redundant auth blocks.
- Make PRIVMSG/NOTICE behave as CPRIVMSG/CNOTICE automatically if possible.
- Allow +z messages from outside if a channel is -n.
- Allow coloured part reasons in -c channels.
- Add ircu-like WHOX support. This allows requesting specific information
in /who and allows obtaining services login name for all users in a
channel. XChat/Conspire use WHOX to update away status more efficiently.
- Allow opers and shide_exempt users to see hopcounts even if flatten_links
is on.
- Rework ip_cloaking.
- Add the IP address to userlog, as in ircd-ratbox 3.0.
- Split cidr_bitlen into cidr_ipv4_bitlen and cidr_ipv6_bitlen.
- Allow using ziplinks with SSL connections. This is not as efficient as
using OpenSSL's built in compression, but also works with older versions
of OpenSSL.
- Fix an off by one error with zipstats processing, which could overwrite
a variable with NULL causing a crash on some systems.
- Document some extensions in charybdis-oper-guide.
- Add more server protocol documentation.
- Add m_sendbans extension, SENDBANS command to propagate xlines and resvs
manually.
- Add chm_sslonly extension, cmode +S for SSL/TLS only channels.
- Add chm_operonly extension, cmode +O for IRCop only channels.
- Add chm_adminonly extension, cmode +A for server admin only channels.
- Various code cleanups.
-- charybdis-3.0.4
- Fix a crash on certain recent versions of Ubuntu.
- Allow 127.x.y.z for DNSBL replies instead of just 127.0.0.x.
- Various documentation improvements.
-- charybdis-3.0.3
- Fix IPv6 D:lines
- Fix rejectcache and unknown_count.
- Fix genssl.sh.
- Fix ident for SSL/TLS connections.
- Fix SSL/TLS bugs for servers with more than about 100 connections.
- Small bugfixes.
-- charybdis-3.0.2
- Improve OLIST extension error messages.
- Improve some kline error checking.
- Avoid timing out clients if we are still waiting for a DNSBL lookup.
- Fix resolver hangs with epoll.
- Fix compilation without zlib.
-- charybdis-3.0.1
- Fix occasional hung clients with kqueue.
- Fix a rare ssld crash.
- Fix a bug that could cause incorrect connect failure reasons to be
reported.
- Make the IRCd work on MacOS X again.
-- charybdis-3.0.0
- The IRCd has been ported to libratbox, which has improved our portability.
- Client SSL and Server-to-Server SSL are now available, read the example.conf
for setup.
- A new extban, $z, has been added for ssl users.
- Port the IRCd to libratbox, which has improved our portability and allows
us to reuse low-level code instead of maintaining our own.
- Change configuration of maximum number of clients to ircd-ratbox 3 way.
- Add adminwall from ircd-ratbox, as an extension.
- Add client and server-to-server SSL, read example.conf for setup.
- Replace servlink with ssld (also for ziplinks).
- A new extban, $z, has been added for ssl users (extensions/extb_ssl.so).
- A new compatibility channel mode, +R, has been added, it sets
+q/-q $~a. This is similar to the +R seen in ircd-seven.
+q/-q $~a (extensions/chm_operonly_compat.so). This is similar to
the +R seen in ircd-seven.
- A new compatibility channel mode, +S, has been added, it sets
+b/-b $~z.
+b/-b $~z (extensions/chm_sslonly_compat.so).
- A new compatibility channel mode, +O, has been added, it sets
+iI/-iI $o.
- The /privs command has been added which shows you your privileges and
access level.
- Many error messages have been clarified to enhance usability.
+iI/-iI $o (extensions/chm_operonly_compat.so).
- Add remote D:lines. Note that these are not enabled by default.
- Remove EFnet-style G:lines. Noone appears to use these.
- Remove idle time checking (auto disconnecting users idle too long).
- Display a notice to clients when the IRCd is shut down using SIGTERM.
- Some error messages have been clarified to enhance usability.
- Close the link to servers that send invalid nicks (e.g. nicklen mismatches).
Formerly the users were killed from the network.
- Enable topicburst by default in connect{}.
- Fix a potential desync which can happen with oper override.
- Remove "deopped" flag (TS5 legacy).
- Use 127.0.0.1 as nameserver if none can be found in /etc/resolv.conf.
- Only accept 127.0.0.x as a dnsbl listing.
- Change cloaking module (same as 2.2.1, different from 2.2.0).
- Make some more server notices about failed remote connect attempts
network wide.
- Make some server notices about flooders and TS delta network wide.
- Remove redundant "<server> had been connected for <time>" server notice.
- Add resv oper privilege to control /resv, /unresv and cmode +L and +P,
enabled by default.
- Add mass_notice oper privilege to control global notices and /wallops,
enabled by default.
- Rework unkline/undline/unxline/unresv so they show the exact item removed
and do not rehash bans.
- Show opers a list of recently (<24hrs) split servers in /map.
- Add /privs command, shows effective privileges of a client.
-- charybdis-2.2.0

View File

@ -1,102 +0,0 @@
If you don't read this first, we won't help you.
:-)
******************************* IMPORTANT *************************************
*********** Note for those who dont bother reading docs *****************
* - Reading INSTALL is now a must, as the old DPATH is now specified *
* when configure is run. *
* You now need to ./configure --prefix="/path/to/install/it" *
* - The old config format WILL NOT WORK. Please see doc/example.conf ! *
* - The old kline format WILL NOT WORK. Please use convertklines which *
* will be installed with your ircd! *
*************************************************************************
ALSO, IF YOU ARE UPGRADING YOUR CURRENT SOURCE TREE, AND YOU TRY TO BUILD
IN IT WITHOUT PERFORMING AT LEAST 'make clean', THINGS _WILL_ BREAK. IT IS
RECOMMENDED THAT YOU RUN 'make distclean' AND THEN RERUN './configure'!
******************************* REQUIREMENTS **********************************
Necessary Requirements:
- A supported platform (look below)
- A working dynamic load library, unless
compiling as static, without module
support.
- A working lex. Solaris /usr/ccs/bin/lex
appears to be broken, on this system flex
should be used.
Feature Specific Requirements:
- For the SSL Challenge controlled OPER feature and encrypted server links,
a working OpenSSL library
- For encrypted oper and (optional) server passwords, a working DES and/or
MD5 library
*******************************************************************************
- To report bugs in ircd-ratbox, send the bug report to ircd-ratbox@lists.ratbox.org
- Known bugs are listed in the BUGS file
- See the INSTALL document for info on configuring and compiling
ircd-ratbox.
- Please read doc/index.txt to get an overview of the current documentation.
- Old Hybrid 5/6 configuration files are no longer supported. All conf
files will have to be converted to the new format. A convertconf
utility is provided and installed into bin/.
- If you are wondering why config.h is practically empty, its because many
things that were once in config.h are now specified in the 'general'
block of ircd.conf. Look at example.conf for more information about
these options.
- The files, /etc/services, /etc/protocols, and /etc/resolv.conf, MUST be
readable by the user running the server in order for ircd to start.
Errors from adns causing the ircd to refuse to start up are often related
to permission problems on these files.
- There is a mailing list for ircd-ratbox. To subscribe to this list
visit http://lists.ratbox.org/cgi-bin/mailman/listinfo/ircd-ratbox
Note that this list also gets the commit emails from the CVS server.
- FREEBSD USERS: if you are compiling with ipv6 you may experience
problems with ipv4 due to the way the socket code is written. To
fix this you must: "sysctl net.inet6.ip6.v6only=0"
- SOLARIS USERS: this code appears to tickle a bug in older gcc and
egcs ONLY on 64-bit Solaris7. gcc-2.95 and SunPro C on 64bit should
work fine, and any gcc or SunPro compiled on 32bit.
- DARWIN AND MACOS X USERS: You must be using at least the December 2001
Development Tools from Apple to build ircd-ratbox with shared modules.
Before then you MUST disable shared modules, as we do not have the proper
flags for cc(1) prior to that point to produce shared modules.
- SUPPORTED PLATFORMS: this code should compile without any warnings
on FreeBSD 3.x/4.x, RedHat 6.2, Debian Potato and Solaris 7/8 sparc.
Please let us know if you find otherwise.
It probably does not compile on AIX, IRIX or libc5 Linux.
- TESTED PLATFORMS: The code has been tested on the following platforms, and
is known to run properly.
FreeBSD 3.x/4.x
Linux glibc
Solaris 2.6/7/8
OpenBSD 2.8
NetBSD 1.4
- Please read doc/whats-new.txt for information about what is in this release
- Other files recommended for reading: BUGS, INSTALL
--------------------------------------------------------------------------------
$Id: README.FIRST 1837 2006-08-22 14:05:58Z nenolod $

35
README.md Normal file
View File

@ -0,0 +1,35 @@
# Elemental-IRCd
**Elemental-IRCd** is a high performance, lightweight, and scalable
IRC daemon. It is a fork of the now-defunct ShadowIRCD and seeks to continue in
the direction ShadowIRCD was headed.
## Supported Platforms
All modern \*NIX systems should work. You need the equivalent of the following
Debian packages:
- `libssl-dev`
- `flex`
- `bison`
- `build-essential`
```
Cassy | If you put something on a platform which cannot support it
| it may tip and fall and become broken. Simple physics.
```
Read the included documentation for detailed compilation and install
directions.
## Support
The official channel for Elemental-IRCd is `#elemental-ircd` on
`irc.yolo-swag.com`. Anyone with push access to the repository will have halfop
(`+h`, `%`) or higher.
Atheme and Anope (1.8 and 2.0) modules are included in the source tree of
Elemental-IRCd. For most cases the default `protocol/elemental-ircd` module in
Atheme should be fine, but this version will always be more up-to-date.
To report bugs, please use the GitHub issue tracker.

42
TODO
View File

@ -1,42 +0,0 @@
/ = in progress, x = done, ? = to be discussed, F = charybdis3.1 or next releases
[/] finish legacy code removal
[x] remove 2.8 report_error() in ratbox imported stuff
[F] client.c, channel.c is very 2.8 style still. it'd be nice to pack them into their own
namespace and such. moreover, the other 2.8 code needs similar rewriting/reworking too...
[ ] rewrite s_auth.c
[ ] authentication state/lock manager
[ ] move resolver/auth checker code into separated modules
[x] port to libratbox
[x] get it running
[x] clean up maxconnections kludges &c
[x] in-process SSL
[x] port and use ratbox ssld for server links
[/] ssl stuff
[x] client-to-client ssl
[x] server-to-server ssl
[x] ssl usermode (+Z)
[x] ssl channelmode (done by extban and chm_compat)
[ ] acknowledgement message for SSL users like '* *** You are connected using SSL cipher "DHE RSA-AES 128 CBC-SHA"'
[ ] ssl stuff files generator in ./configure time
[x] merge some stuff from ircd-seven directly (to be determined what)
[x] remote d:lines support
[F] kline/xline/resv sync
[F] make an ability of using bandb instead of .conf files as bans storage
[F] drop non-TS6 (legacy protocol) support
[F] Doxygen code documentation
[F] module engine rework
[F] more beautiful way of adding new channel modes by module
[F] make nick/user/host validation functions/match tables able to work in separated modules,
this will help us making support for native characters sets/slashes in host etc
[F] auth checker module
[F] resolver module
[x] Remove glines entirely
--- other stuff
[?] PASS selector:password for auth{} from ircd-seven? (useful for dynamic IPs)
[?] +C (noctcp) channel/usermode from ircd-seven?
[?] internally split out +o/+v "ranks" into a series of permissions. this could allow for configure-defined
special access levels, halfops, etc. (would need to match globally, somehow. extra SVINFO param?)
[?] somehow hide channel operators like ircnet can do?
[x] merge m_join.c and m_sjoin.c in one module (same functions, done in ratbox3)
[x] create chmode.h and put there all declarations of chm_* - this will make some modules clean

23
TODO.markdown Normal file
View File

@ -0,0 +1,23 @@
# TODO
## elemental-ircd 6.7
- [ ] Finish websocket support
- [x] Configuration for websocket ports
- [x] HTTP parsing of websocket data
- [ ] Client connections via websockets
- [x] Send cloaked host as METADATA
- [x] Fix a flaw in the kick permission logic
- [x] Fix segfault on `autojoin_opers`
- [x] Update many of the helpfiles with the proper permissions
- [ ] extban by certfp
### Services Modules
- [ ] Support METADATA for the cloaked host
- [ ] Anope 2.0
- [ ] Atheme
- [ ] Have /hs off re-set the cloaked host instead of the user's real hostmask
- [ ] Anope 2.0
- [ ] Atheme

13
aclocal.m4 vendored
View File

@ -2,8 +2,17 @@
AC_DEFUN([AC_DEFINE_DIR], [
test "x$prefix" = xNONE && prefix="$ac_default_prefix"
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
ac_define_dir=`eval echo [$]$2`
ac_define_dir=`eval echo [$]ac_define_dir`
last_ac_define_dir=`eval echo [$]$2`
ac_define_dir=`eval echo [$]last_ac_define_dir`
ac_define_dir_counter=0
while test "x[$]last_ac_define_dir" != "x[$]ac_define_dir"; do
last_ac_define_dir="[$]ac_define_dir"
ac_define_dir=`eval echo [$]last_ac_define_dir`
AS_VAR_ARITH([ac_define_dir_counter], [$ac_define_dir_counter + 1])
AS_VAR_IF([ac_define_dir_counter], [128],
[AC_MSG_ERROR([detected recusive directory expansion when expanding $1=[$]$2: [$]ac_define_dir])
break])
done
$1="$ac_define_dir"
AC_SUBST($1)
ifelse($3, ,

108
bandb/Makefile.in Normal file
View File

@ -0,0 +1,108 @@
#
# Makefile.in for bandb/src
#
# $Id: Makefile.in 1285 2006-05-05 15:03:53Z nenolod $
#
CC = @CC@
INSTALL = @INSTALL@
INSTALL_BIN = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SUID = @INSTALL_PROGRAM@ -o root -m 4755
RM = @RM@
LEX = @LEX@
LEXLIB = @LEXLIB@
CFLAGS = @IRC_CFLAGS@ -DIRCD_PREFIX=\"@prefix@\"
LDFLAGS = @LDFLAGS@
MKDEP = @MKDEP@ -DIRCD_PREFIX=\"@prefix@\"
MV = @MV@
RM = @RM@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
libdir = @libdir@
libexecdir = @libexecdir@
pkglibexecdir = @pkglibexecdir@
sysconfdir = @sysconfdir@
localstatedir = @localstatedir@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PROGRAM_PREFIX = @PROGRAM_PREFIX@
ZIP_LIB = @ZLIB_LD@
IRCDLIBS = @MODULES_LIBS@ -L../libratbox/src/.libs -lratbox @LIBS@ $(SSL_LIBS) $(ZIP_LIB)
INCLUDES = -I. -I../include -I../libratbox/include $(SSL_INCLUDES)
CPPFLAGS = ${INCLUDES} @CPPFLAGS@
CFLAGS += -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION=1
pkglibexec_PROGS = bandb
bin_PROGS = bantool
PROGS = $(pkglibexec_PROGS) $(bin_PROGS)
BANDB_SOURCES = \
bandb.c \
rsdb_snprintf.c \
rsdb_sqlite3.c \
sqlite3.c
BANDB_OBJECTS = ${BANDB_SOURCES:.c=.o}
BANTOOL_SOURCES = \
bantool.c \
rsdb_snprintf.c \
rsdb_sqlite3.c \
sqlite3.c
BANTOOL_OBJECTS = ${BANTOOL_SOURCES:.c=.o}
all: bandb bantool
build: all
bandb: ${BANDB_OBJECTS}
${CC} ${CFLAGS} ${LDFLAGS} -o $@ ${BANDB_OBJECTS} ${IRCDLIBS}
bantool: ${BANTOOL_OBJECTS}
${CC} ${CFLAGS} ${LDFLAGS} -o $@ ${BANTOOL_OBJECTS} ${IRCDLIBS}
install: build
@echo "ircd: installing bandb ($(PROGS))"
@for i in $(bin_PROGS); do \
if test -f $(DESTDIR)$(bindir)/$(PROGRAM_PREFIX)$$i; then \
$(MV) $(DESTDIR)$(bindir)/$(PROGRAM_PREFIX)$$i $(DESTDIR)$(bindir)/$(PROGRAM_PREFIX)$$i.old; \
fi; \
$(INSTALL_BIN) $$i $(DESTDIR)$(bindir)/$(PROGRAM_PREFIX)$$i; \
done
@for i in $(pkglibexec_PROGS); do \
if test -f '$(DESTDIR)$(pkglibexecdir)/'$$i; then \
$(MV) '$(DESTDIR)$(pkglibexecdir)/'$$i '$(DESTDIR)$(pkglibexecdir)/'$$i.old; \
fi; \
$(INSTALL_BIN) $$i '$(DESTDIR)$(pkglibexecdir)/'$$i; \
done
.c.o:
${CC} ${CPPFLAGS} ${CFLAGS} -c $<
.PHONY: depend clean distclean
depend:
@${MKDEP} ${CPPFLAGS} ${SOURCES} > .depend.tmp
@sed -e '/^# DO NOT DELETE THIS LINE/,$$d' <Makefile >Makefile.depend
@echo '# DO NOT DELETE THIS LINE!!!' >>Makefile.depend
@echo '# make depend needs it.' >>Makefile.depend
@cat .depend.tmp >>Makefile.depend
@mv Makefile.depend Makefile
@rm -f .depend.tmp
clean:
${RM} -f *.o *~ *.core core bandb
lint:
lint -aacgprxhH $(CPPFLAGS) -DIRCD_PREFIX=\"@prefix@\" $(SOURCES) >>../lint.out
distclean: clean
${RM} -f Makefile
# End of Makefile

324
bandb/bandb.c Normal file
View File

@ -0,0 +1,324 @@
/* bandb/bandb.c
*
* Copyright (C) 2006 Lee Hardy <lee -at- leeh.co.uk>
* Copyright (C) 2006-2008 ircd-ratbox development team
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* 1.Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2.Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3.The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* $Id: bandb.c 26094 2008-09-19 15:33:46Z androsyn $
*/
#include "setup.h"
#include <ratbox_lib.h>
#include <stdio.h>
#include "rsdb.h"
#include "common.h"
#define MAXPARA 10
#define COMMIT_INTERVAL 3 /* seconds */
typedef enum {
BANDB_KLINE,
BANDB_DLINE,
BANDB_XLINE,
BANDB_RESV,
LAST_BANDB_TYPE
} bandb_type;
static char bandb_letter[LAST_BANDB_TYPE] = {
'K', 'D', 'X', 'R'
};
static const char *bandb_table[LAST_BANDB_TYPE] = {
"kline", "dline", "xline", "resv"
};
static rb_helper *bandb_helper;
static int in_transaction;
static void check_schema(void);
static void
bandb_commit(void *unused)
{
rsdb_transaction(RSDB_TRANS_END);
in_transaction = 0;
}
static void
parse_ban(bandb_type type, char *parv[], int parc)
{
const char *mask1 = NULL;
const char *mask2 = NULL;
const char *oper = NULL;
const char *curtime = NULL;
const char *reason = NULL;
const char *perm = NULL;
int para = 1;
if(type == BANDB_KLINE) {
if(parc != 7)
return;
} else if(parc != 6)
return;
mask1 = parv[para++];
if(type == BANDB_KLINE)
mask2 = parv[para++];
oper = parv[para++];
curtime = parv[para++];
perm = parv[para++];
reason = parv[para++];
if(!in_transaction) {
rsdb_transaction(RSDB_TRANS_START);
in_transaction = 1;
rb_event_addonce("bandb_commit", bandb_commit, NULL,
COMMIT_INTERVAL);
}
rsdb_exec(NULL,
"INSERT INTO %s (mask1, mask2, oper, time, perm, reason) VALUES('%Q', '%Q', '%Q', %s, %s, '%Q')",
bandb_table[type], mask1, mask2 ? mask2 : "", oper, curtime, perm, reason);
}
static void
parse_unban(bandb_type type, char *parv[], int parc)
{
const char *mask1 = NULL;
const char *mask2 = NULL;
if(type == BANDB_KLINE) {
if(parc != 3)
return;
} else if(parc != 2)
return;
mask1 = parv[1];
if(type == BANDB_KLINE)
mask2 = parv[2];
if(!in_transaction) {
rsdb_transaction(RSDB_TRANS_START);
in_transaction = 1;
rb_event_addonce("bandb_commit", bandb_commit, NULL,
COMMIT_INTERVAL);
}
rsdb_exec(NULL, "DELETE FROM %s WHERE mask1='%Q' AND mask2='%Q'",
bandb_table[type], mask1, mask2 ? mask2 : "");
}
static void
list_bans(void)
{
static char buf[512];
struct rsdb_table table;
int i, j;
/* schedule a clear of anything already pending */
rb_helper_write_queue(bandb_helper, "C");
for(i = 0; i < LAST_BANDB_TYPE; i++) {
rsdb_exec_fetch(&table, "SELECT mask1,mask2,oper,reason FROM %s WHERE 1",
bandb_table[i]);
for(j = 0; j < table.row_count; j++) {
if(i == BANDB_KLINE)
snprintf(buf, sizeof(buf), "%c %s %s %s :%s",
bandb_letter[i], table.row[j][0],
table.row[j][1], table.row[j][2], table.row[j][3]);
else
snprintf(buf, sizeof(buf), "%c %s %s :%s",
bandb_letter[i], table.row[j][0],
table.row[j][2], table.row[j][3]);
rb_helper_write_queue(bandb_helper, "%s", buf);
}
rsdb_exec_fetch_end(&table);
}
rb_helper_write(bandb_helper, "F");
}
static void
parse_request(rb_helper *helper)
{
static char *parv[MAXPARA + 1];
static char readbuf[READBUF_SIZE];
int parc;
int len;
while((len = rb_helper_read(helper, readbuf, sizeof(readbuf))) > 0) {
parc = rb_string_to_array(readbuf, parv, MAXPARA);
if(parc < 1)
continue;
switch (parv[0][0]) {
case 'K':
parse_ban(BANDB_KLINE, parv, parc);
break;
case 'D':
parse_ban(BANDB_DLINE, parv, parc);
break;
case 'X':
parse_ban(BANDB_XLINE, parv, parc);
break;
case 'R':
parse_ban(BANDB_RESV, parv, parc);
break;
case 'k':
parse_unban(BANDB_KLINE, parv, parc);
break;
case 'd':
parse_unban(BANDB_DLINE, parv, parc);
break;
case 'x':
parse_unban(BANDB_XLINE, parv, parc);
break;
case 'r':
parse_unban(BANDB_RESV, parv, parc);
break;
case 'L':
list_bans();
break;
default:
break;
}
}
}
static void
error_cb(rb_helper *helper)
{
if(in_transaction)
rsdb_transaction(RSDB_TRANS_END);
exit(1);
}
#ifndef WINDOWS
static void
dummy_handler(int sig)
{
return;
}
#endif
static void
setup_signals()
{
#ifndef WINDOWS
struct sigaction act;
act.sa_flags = 0;
act.sa_handler = SIG_IGN;
sigemptyset(&act.sa_mask);
sigaddset(&act.sa_mask, SIGPIPE);
sigaddset(&act.sa_mask, SIGALRM);
#ifdef SIGTRAP
sigaddset(&act.sa_mask, SIGTRAP);
#endif
#ifdef SIGWINCH
sigaddset(&act.sa_mask, SIGWINCH);
sigaction(SIGWINCH, &act, 0);
#endif
sigaction(SIGPIPE, &act, 0);
#ifdef SIGTRAP
sigaction(SIGTRAP, &act, 0);
#endif
act.sa_handler = dummy_handler;
sigaction(SIGALRM, &act, 0);
#endif
}
static void
db_error_cb(const char *errstr)
{
char buf[256];
snprintf(buf, sizeof(buf), "! :%s", errstr);
rb_helper_write(bandb_helper, buf);
rb_sleep(2 << 30, 0);
exit(1);
}
int
main(int argc, char *argv[])
{
setup_signals();
bandb_helper = rb_helper_child(parse_request, error_cb, NULL, NULL, NULL, 256, 256, 256, 256); /* XXX fix me */
if(bandb_helper == NULL) {
fprintf(stderr,
"This is ircd-ratbox bandb. You aren't supposed to run me directly. Maybe you want bantool?\n");
fprintf(stderr,
"However I will print my Id tag $Id: bandb.c 26094 2008-09-19 15:33:46Z androsyn $\n");
fprintf(stderr, "Have a nice day\n");
exit(1);
}
rsdb_init(db_error_cb);
check_schema();
rb_helper_loop(bandb_helper, 0);
return 0;
}
static void
check_schema(void)
{
struct rsdb_table table;
int i;
for(i = 0; i < LAST_BANDB_TYPE; i++) {
rsdb_exec_fetch(&table,
"SELECT name FROM sqlite_master WHERE type='table' AND name='%s'",
bandb_table[i]);
rsdb_exec_fetch_end(&table);
if(!table.row_count)
rsdb_exec(NULL,
"CREATE TABLE %s (mask1 TEXT, mask2 TEXT, oper TEXT, time INTEGER, perm INTEGER, reason TEXT)",
bandb_table[i]);
}
}

855
bandb/bantool.c Normal file
View File

@ -0,0 +1,855 @@
/**
* ircd-ratbox: A slightly useful ircd.
* bantool.c: The ircd-ratbox database managment tool.
*
* Copyright (C) 1990 Jarkko Oikarinen and University of Oulu, Co Center
* Copyright (C) 1996-2002 Hybrid Development Team
* Copyright (C) 2002-2008 ircd-ratbox development team
* Copyright (C) 2008 Daniel J Reidy <dubkat@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: bantool.c 26164 2008-10-26 19:52:43Z androsyn $
*
*
* The following server admins have either contributed various configs to test against,
* or helped with debugging and feature requests. Many thanks to them.
* stevoo / efnet.port80.se
* AndroSyn / irc2.choopa.net, irc.igs.ca
* Salvation / irc.blessed.net
* JamesOff / efnet.demon.co.uk
*
* Thanks to AndroSyn for challenging me to learn C on the fly :)
* BUGS Direct Question, Bug Reports, and Feature Requests to #ratbox on EFnet.
* BUGS Complaints >/dev/null
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "stdinc.h"
#include "common.h"
#include "rsdb.h"
#define EmptyString(x) ((x == NULL) || (*(x) == '\0'))
#define CheckEmpty(x) EmptyString(x) ? "" : x
#define BT_VERSION "0.4.1"
typedef enum {
BANDB_KLINE,
BANDB_KLINE_PERM,
BANDB_DLINE,
BANDB_DLINE_PERM,
BANDB_XLINE,
BANDB_XLINE_PERM,
BANDB_RESV,
BANDB_RESV_PERM,
LAST_BANDB_TYPE
} bandb_type;
static char bandb_letter[LAST_BANDB_TYPE] = {
'K', 'K', 'D', 'D', 'X', 'X', 'R', 'R'
};
static const char *bandb_table[LAST_BANDB_TYPE] = {
"kline", "kline", "dline", "dline", "xline", "xline", "resv", "resv"
};
static const char *bandb_suffix[LAST_BANDB_TYPE] = {
"", ".perm",
"", ".perm",
"", ".perm",
"", ".perm"
};
static char me[PATH_MAX];
/* *INDENT-OFF* */
/* report counters */
struct counter {
unsigned int klines;
unsigned int dlines;
unsigned int xlines;
unsigned int resvs;
unsigned int error;
} count = {0, 0, 0, 0, 0};
/* flags set by command line options */
struct flags {
int none;
int export;
int import;
int verify;
int vacuum;
int pretend;
int verbose;
int wipe;
int dupes_ok;
} flag = {YES, NO, NO, NO, NO, NO, NO, NO, NO};
/* *INDENT-ON* */
static int table_has_rows(const char *table);
static int table_exists(const char *table);
static const char *clean_gecos_field(const char *gecos);
static char *bt_smalldate(const char *string);
static char *getfield(char *newline);
static char *strip_quotes(const char *string);
static char *mangle_reason(const char *string);
static char *escape_quotes(const char *string);
static void db_error_cb(const char *errstr);
static void db_reclaim_slack(void);
static void export_config(const char *conf, int id);
static void import_config(const char *conf, int id);
static void check_schema(void);
static void print_help(int i_exit);
static void wipe_schema(void);
static void drop_dupes(const char *user, const char *host, const char *t);
/**
* swing your pants
*/
int
main(int argc, char *argv[])
{
char etc[PATH_MAX];
char conf[PATH_MAX];
int opt;
int i;
rb_strlcpy(me, argv[0], sizeof(me));
while((opt = getopt(argc, argv, "hieuspvwd")) != -1) {
switch (opt) {
case 'h':
print_help(EXIT_SUCCESS);
break;
case 'i':
flag.none = NO;
flag.import = YES;
break;
case 'e':
flag.none = NO;
flag.export = YES;
break;
case 'u':
flag.none = NO;
flag.verify = YES;
break;
case 's':
flag.none = NO;
flag.vacuum = YES;
break;
case 'p':
flag.pretend = YES;
break;
case 'v':
flag.verbose = YES;
break;
case 'w':
flag.wipe = YES;
break;
case 'd':
flag.dupes_ok = YES;
break;
default: /* '?' */
print_help(EXIT_FAILURE);
}
}
/* they should really read the help. */
if(flag.none)
print_help(EXIT_FAILURE);
if((flag.import && flag.export) || (flag.export && flag.wipe)
|| (flag.verify && flag.pretend) || (flag.export && flag.pretend)) {
fprintf(stderr, "* Error: Conflicting flags.\n");
if(flag.export && flag.pretend)
fprintf(stderr, "* There is nothing to 'pretend' when exporting.\n");
fprintf(stderr, "* For an explination of commands, run: %s -h\n", me);
exit(EXIT_FAILURE);
}
if(argv[optind] != NULL)
rb_strlcpy(etc, argv[optind], sizeof(etc));
else
rb_strlcpy(etc, ETCPATH, sizeof(ETCPATH));
fprintf(stdout,
"* ircd-ratbox bantool v.%s ($Id: bantool.c 26164 2008-10-26 19:52:43Z androsyn $)\n",
BT_VERSION);
if(flag.pretend == NO) {
if(rsdb_init(db_error_cb) == -1) {
fprintf(stderr, "* Error: Unable to open database\n");
exit(EXIT_FAILURE);
}
check_schema();
if(flag.vacuum)
db_reclaim_slack();
if(flag.import && flag.wipe) {
flag.dupes_ok = YES; /* dont check for dupes if we are wiping the db clean */
for(i = 0; i < 3; i++)
fprintf(stdout,
"* WARNING: YOU ARE ABOUT TO WIPE YOUR DATABASE!\n");
fprintf(stdout, "* Press ^C to abort! ");
fflush(stdout);
rb_sleep(10, 0);
fprintf(stdout, "Carrying on...\n");
wipe_schema();
}
}
if(flag.verbose && flag.dupes_ok == YES)
fprintf(stdout, "* Allowing duplicate bans...\n");
/* checking for our files to import or export */
for(i = 0; i < LAST_BANDB_TYPE; i++) {
snprintf(conf, sizeof(conf), "%s/%s.conf%s",
etc, bandb_table[i], bandb_suffix[i]);
if(flag.import && flag.pretend == NO)
rsdb_transaction(RSDB_TRANS_START);
if(flag.import)
import_config(conf, i);
if(flag.export)
export_config(conf, i);
if(flag.import && flag.pretend == NO)
rsdb_transaction(RSDB_TRANS_END);
}
if(flag.import) {
if(count.error && flag.verbose)
fprintf(stderr, "* I was unable to locate %i config files to import.\n",
count.error);
fprintf(stdout, "* Import Stats: Klines: %i, Dlines: %i, Xlines: %i, Resvs: %i \n",
count.klines, count.dlines, count.xlines, count.resvs);
fprintf(stdout,
"*\n* If your IRC server is currently running, newly imported bans \n* will not take effect until you issue the command: /quote rehash bans\n");
if(flag.pretend)
fprintf(stdout,
"* Pretend mode engaged. Nothing was actually entered into the database.\n");
}
return 0;
}
/**
* export the database to old-style flat files
*/
static void
export_config(const char *conf, int id)
{
struct rsdb_table table;
static char sql[BUFSIZE * 2];
static char buf[512];
FILE *fd = NULL;
int j;
/* for sanity sake */
const int mask1 = 0;
const int mask2 = 1;
const int reason = 2;
const int oper = 3;
const int ts = 4;
/* const int perm = 5; */
if(!table_has_rows(bandb_table[id]))
return;
if(strstr(conf, ".perm") != 0)
snprintf(sql, sizeof(sql),
"SELECT DISTINCT mask1,mask2,reason,oper,time FROM %s WHERE perm = 1 ORDER BY time",
bandb_table[id]);
else
snprintf(sql, sizeof(sql),
"SELECT DISTINCT mask1,mask2,reason,oper,time FROM %s WHERE perm = 0 ORDER BY time",
bandb_table[id]);
rsdb_exec_fetch(&table, sql);
if(table.row_count <= 0) {
rsdb_exec_fetch_end(&table);
return;
}
if(flag.verbose)
fprintf(stdout, "* checking for %s: ", conf); /* debug */
/* open config for reading, or skip to the next */
if(!(fd = fopen(conf, "w"))) {
if(flag.verbose)
fprintf(stdout, "\tmissing.\n");
count.error++;
return;
}
for(j = 0; j < table.row_count; j++) {
switch (id) {
case BANDB_DLINE:
case BANDB_DLINE_PERM:
snprintf(buf, sizeof(buf),
"\"%s\",\"%s\",\"\",\"%s\",\"%s\",%s\n",
table.row[j][mask1],
mangle_reason(table.row[j][reason]),
bt_smalldate(table.row[j][ts]),
table.row[j][oper], table.row[j][ts]);
break;
case BANDB_XLINE:
case BANDB_XLINE_PERM:
snprintf(buf, sizeof(buf),
"\"%s\",\"0\",\"%s\",\"%s\",%s\n",
escape_quotes(table.row[j][mask1]),
mangle_reason(table.row[j][reason]),
table.row[j][oper], table.row[j][ts]);
break;
case BANDB_RESV:
case BANDB_RESV_PERM:
snprintf(buf, sizeof(buf),
"\"%s\",\"%s\",\"%s\",%s\n",
table.row[j][mask1],
mangle_reason(table.row[j][reason]),
table.row[j][oper], table.row[j][ts]);
break;
default: /* Klines */
snprintf(buf, sizeof(buf),
"\"%s\",\"%s\",\"%s\",\"\",\"%s\",\"%s\",%s\n",
table.row[j][mask1], table.row[j][mask2],
mangle_reason(table.row[j][reason]),
bt_smalldate(table.row[j][ts]), table.row[j][oper],
table.row[j][ts]);
break;
}
fprintf(fd, "%s", buf);
}
rsdb_exec_fetch_end(&table);
if(flag.verbose)
fprintf(stdout, "\twritten.\n");
fclose(fd);
}
/**
* attempt to condense the individual conf functions into one
*/
static void
import_config(const char *conf, int id)
{
FILE *fd;
char line[BUFSIZE];
char *p;
int i = 0;
char f_perm = 0;
const char *f_mask1 = NULL;
const char *f_mask2 = NULL;
const char *f_oper = NULL;
const char *f_time = NULL;
const char *f_reason = NULL;
const char *f_oreason = NULL;
char newreason[REASONLEN];
if(flag.verbose)
fprintf(stdout, "* checking for %s: ", conf); /* debug */
/* open config for reading, or skip to the next */
if(!(fd = fopen(conf, "r"))) {
if(flag.verbose)
fprintf(stdout, "%*s", strlen(bandb_suffix[id]) > 0 ? 10 : 15,
"missing.\n");
count.error++;
return;
}
if(strstr(conf, ".perm") != 0)
f_perm = 1;
/* xline
* "SYSTEM","0","banned","stevoo!stevoo@efnet.port80.se{stevoo}",1111080437
* resv
* "OseK","banned nickname","stevoo!stevoo@efnet.port80.se{stevoo}",1111031619
* dline
* "194.158.192.0/19","laptop scammers","","2005/3/17 05.33","stevoo!stevoo@efnet.port80.se{stevoo}",1111033988
*/
while(fgets(line, sizeof(line), fd)) {
if((p = strpbrk(line, "\r\n")) != NULL)
*p = '\0';
if((*line == '\0') || (*line == '#'))
continue;
/* mask1 */
f_mask1 = getfield(line);
if(EmptyString(f_mask1))
continue;
/* mask2 */
switch (id) {
case BANDB_XLINE:
case BANDB_XLINE_PERM:
f_mask1 = escape_quotes(clean_gecos_field(f_mask1));
getfield(NULL); /* empty field */
break;
case BANDB_RESV:
case BANDB_RESV_PERM:
case BANDB_DLINE:
case BANDB_DLINE_PERM:
break;
default:
f_mask2 = getfield(NULL);
if(EmptyString(f_mask2))
continue;
break;
}
/* reason */
f_reason = getfield(NULL);
if(EmptyString(f_reason))
continue;
/* oper comment */
switch (id) {
case BANDB_KLINE:
case BANDB_KLINE_PERM:
case BANDB_DLINE:
case BANDB_DLINE_PERM:
f_oreason = getfield(NULL);
getfield(NULL);
break;
default:
break;
}
f_oper = getfield(NULL);
f_time = strip_quotes(f_oper + strlen(f_oper) + 2);
if(EmptyString(f_oper))
f_oper = "unknown";
/* meh */
if(id == BANDB_KLINE || id == BANDB_KLINE_PERM) {
if(strstr(f_mask1, "!") != NULL) {
fprintf(stderr,
"* SKIPPING INVALID KLINE %s@%s set by %s\n",
f_mask1, f_mask2, f_oper);
fprintf(stderr, " You may wish to re-apply it correctly.\n");
continue;
}
}
/* append operreason_field to reason_field */
if(!EmptyString(f_oreason))
snprintf(newreason, sizeof(newreason), "%s | %s", f_reason, f_oreason);
else
snprintf(newreason, sizeof(newreason), "%s", f_reason);
if(flag.pretend == NO) {
if(flag.dupes_ok == NO)
drop_dupes(f_mask1, f_mask2, bandb_table[id]);
rsdb_exec(NULL,
"INSERT INTO %s (mask1, mask2, oper, time, perm, reason) VALUES('%Q','%Q','%Q','%Q','%d','%Q')",
bandb_table[id], f_mask1, f_mask2, f_oper, f_time, f_perm,
newreason);
}
if(flag.pretend && flag.verbose)
fprintf(stdout,
"%s: perm(%d) mask1(%s) mask2(%s) oper(%s) reason(%s) time(%s)\n",
bandb_table[id], f_perm, f_mask1, f_mask2, f_oper, newreason,
f_time);
i++;
}
switch (bandb_letter[id]) {
case 'K':
count.klines += i;
break;
case 'D':
count.dlines += i;
break;
case 'X':
count.xlines += i;
break;
case 'R':
count.resvs += i;
break;
default:
break;
}
if(flag.verbose)
fprintf(stdout, "%*s\n", strlen(bandb_suffix[id]) > 0 ? 10 : 15, "imported.");
return;
}
/**
* getfield
*
* inputs - input buffer
* output - next field
* side effects - field breakup for ircd.conf file.
*/
char *
getfield(char *newline)
{
static char *line = NULL;
char *end, *field;
if(newline != NULL)
line = newline;
if(line == NULL)
return (NULL);
field = line;
/* XXX make this skip to first " if present */
if(*field == '"')
field++;
else
return (NULL); /* mal-formed field */
end = strchr(line, ',');
while(1) {
/* no trailing , - last field */
if(end == NULL) {
end = line + strlen(line);
line = NULL;
if(*end == '"') {
*end = '\0';
return field;
} else
return NULL;
} else {
/* look for a ", to mark the end of a field.. */
if(*(end - 1) == '"') {
line = end + 1;
end--;
*end = '\0';
return field;
}
/* search for the next ',' */
end++;
end = strchr(end, ',');
}
}
return NULL;
}
/**
* strip away "quotes" from around strings
*/
static char *
strip_quotes(const char *string)
{
static char buf[14]; /* int(11) + 2 + \0 */
char *str = buf;
if(string == NULL)
return NULL;
while(*string) {
if(*string != '"') {
*str++ = *string;
}
string++;
}
*str = '\0';
return buf;
}
/**
* escape quotes in a string
*/
static char *
escape_quotes(const char *string)
{
static char buf[BUFSIZE * 2];
char *str = buf;
if(string == NULL)
return NULL;
while(*string) {
if(*string == '"') {
*str++ = '\\';
*str++ = '"';
} else {
*str++ = *string;
}
string++;
}
*str = '\0';
return buf;
}
static char *
mangle_reason(const char *string)
{
static char buf[BUFSIZE * 2];
char *str = buf;
if(string == NULL)
return NULL;
while(*string) {
switch (*string) {
case '"':
*str = '\'';
break;
case ':':
*str = ' ';
break;
default:
*str = *string;
}
string++;
str++;
}
*str = '\0';
return buf;
}
/**
* change spaces to \s in gecos field
*/
static const char *
clean_gecos_field(const char *gecos)
{
static char buf[BUFSIZE * 2];
char *str = buf;
if(gecos == NULL)
return NULL;
while(*gecos) {
if(*gecos == ' ') {
*str++ = '\\';
*str++ = 's';
} else
*str++ = *gecos;
gecos++;
}
*str = '\0';
return buf;
}
/**
* verify the database integrity, and if necessary create apropriate tables
*/
static void
check_schema(void)
{
int i, j;
char type[8]; /* longest string is 'INTEGER\0' */
if(flag.verify || flag.verbose)
fprintf(stdout, "* Verifying database.\n");
const char *columns[] = {
"perm",
"mask1",
"mask2",
"oper",
"time",
"reason",
NULL
};
for(i = 0; i < LAST_BANDB_TYPE; i++) {
if(!table_exists(bandb_table[i])) {
rsdb_exec(NULL,
"CREATE TABLE %s (mask1 TEXT, mask2 TEXT, oper TEXT, time INTEGER, perm INTEGER, reason TEXT)",
bandb_table[i]);
}
/*
* i can't think of any better way to do this, other then attempt to
* force the creation of column that may, or may not already exist. --dubkat
*/
else {
for(j = 0; columns[j] != NULL; j++) {
if(!strcmp(columns[j], "time") && !strcmp(columns[j], "perm"))
rb_strlcpy(type, "INTEGER", sizeof(type));
else
rb_strlcpy(type, "TEXT", sizeof(type));
/* attempt to add a column with extreme prejudice, errors are ignored */
rsdb_exec(NULL, "ALTER TABLE %s ADD COLUMN %s %s", bandb_table[i],
columns[j], type);
}
}
i++; /* skip over .perm */
}
}
static void
db_reclaim_slack(void)
{
fprintf(stdout, "* Reclaiming free space.\n");
rsdb_exec(NULL, "VACUUM");
}
/**
* check that appropriate tables exist.
*/
static int
table_exists(const char *dbtab)
{
struct rsdb_table table;
rsdb_exec_fetch(&table, "SELECT name FROM sqlite_master WHERE type='table' AND name='%s'",
dbtab);
rsdb_exec_fetch_end(&table);
return table.row_count;
}
/**
* check that there are actual entries in a table
*/
static int
table_has_rows(const char *dbtab)
{
struct rsdb_table table;
rsdb_exec_fetch(&table, "SELECT * FROM %s", dbtab);
rsdb_exec_fetch_end(&table);
return table.row_count;
}
/**
* completly wipes out an existing ban.db of all entries.
*/
static void
wipe_schema(void)
{
int i;
rsdb_transaction(RSDB_TRANS_START);
for(i = 0; i < LAST_BANDB_TYPE; i++) {
rsdb_exec(NULL, "DROP TABLE %s", bandb_table[i]);
i++; /* double increment to skip over .perm */
}
rsdb_transaction(RSDB_TRANS_END);
check_schema();
}
/**
* remove pre-existing duplicate bans from the database.
* we favor the new, imported ban over the one in the database
*/
void
drop_dupes(const char *user, const char *host, const char *t)
{
rsdb_exec(NULL, "DELETE FROM %s WHERE mask1='%Q' AND mask2='%Q'", t, user, host);
}
static void
db_error_cb(const char *errstr)
{
return;
}
/**
* convert unix timestamp to human readable (small) date
*/
static char *
bt_smalldate(const char *string)
{
static char buf[MAX_DATE_STRING];
struct tm *lt;
time_t t;
t = strtol(string, NULL, 10);
lt = gmtime(&t);
if(lt == NULL)
return NULL;
snprintf(buf, sizeof(buf), "%d/%d/%d %02d.%02d",
lt->tm_year + 1900, lt->tm_mon + 1, lt->tm_mday, lt->tm_hour, lt->tm_min);
return buf;
}
/**
* you are here ->.
*/
void
print_help(int i_exit)
{
fprintf(stderr, "bantool v.%s - the ircd-ratbox database tool.\n", BT_VERSION);
fprintf(stderr, "Copyright (C) 2008 Daniel J Reidy <dubkat@gmail.com>\n");
fprintf(stderr, "$Id: bantool.c 26164 2008-10-26 19:52:43Z androsyn $\n\n");
fprintf(stderr, "This program is distributed in the hope that it will be useful,\n"
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
"GNU General Public License for more details.\n\n");
fprintf(stderr, "Usage: %s <-i|-e> [-p] [-v] [-h] [-d] [-w] [path]\n", me);
fprintf(stderr, " -h : Display some slightly useful help.\n");
fprintf(stderr, " -i : Actually import configs into your database.\n");
fprintf(stderr, " -e : Export your database to old-style flat files.\n");
fprintf(stderr,
" This is suitable for redistrubuting your banlists, or creating backups.\n");
fprintf(stderr, " -s : Reclaim empty slack space the database may be taking up.\n");
fprintf(stderr, " -u : Update the database tables to support any new features.\n");
fprintf(stderr,
" This is automaticlly done if you are importing or exporting\n");
fprintf(stderr, " but should be run whenever you upgrade the ircd.\n");
fprintf(stderr,
" -p : pretend, checks for the configs, and parses them, then tells you some data...\n");
fprintf(stderr, " but does not touch your database.\n");
fprintf(stderr,
" -v : Be verbose... and it *is* very verbose! (intended for debugging)\n");
fprintf(stderr, " -d : Enable checking for redunant entries.\n");
fprintf(stderr, " -w : Completly wipe your database clean. May be used with -i \n");
fprintf(stderr,
" path : An optional directory containing old ratbox configs for import, or export.\n");
fprintf(stderr, " If not specified, it looks in PREFIX/etc.\n");
exit(i_exit);
}

39
bandb/rsdb.h Normal file
View File

@ -0,0 +1,39 @@
#ifndef INCLUDED_rsdb_h
#define INCLUDED_rsdb_h
/* error handler callback */
typedef void rsdb_error_cb(const char *);
typedef int (*rsdb_callback) (int, const char **);
typedef enum rsdb_transtype {
RSDB_TRANS_START,
RSDB_TRANS_END
}
rsdb_transtype;
struct rsdb_table {
char ***row;
int row_count;
int col_count;
void *arg;
};
int rsdb_init(rsdb_error_cb *);
void rsdb_shutdown(void);
const char *rsdb_quote(const char *src);
void rsdb_exec(rsdb_callback cb, const char *format, ...);
void rsdb_exec_fetch(struct rsdb_table *data, const char *format, ...);
void rsdb_exec_fetch_end(struct rsdb_table *data);
void rsdb_transaction(rsdb_transtype type);
/* rsdb_snprintf.c */
int rs_vsnprintf(char *dest, const size_t bytes, const char *format, va_list args);
int rs_snprintf(char *dest, const size_t bytes, const char *format, ...);
#endif

589
bandb/rsdb_snprintf.c Normal file
View File

@ -0,0 +1,589 @@
/*
* libString, Copyright (C) 1999 Patrick Alken
* This library comes with absolutely NO WARRANTY
*
* Should you choose to use and/or modify this source code, please
* do so under the terms of the GNU General Public License under which
* this library is distributed.
*
*/
#include "stdinc.h"
#include "rsdb.h"
/*
* This table is arranged in chronological order from 0-999,
* however the numbers are written backwards, so the number 100
* is expressed in this table as "001".
* It's purpose is to ensure fast conversions from integers to
* ASCII strings. When an integer variable is encountered, a
* simple hash algorithm is used to determine where to look
* in this array for the corresponding string.
* This outperforms continually dividing by 10 and using the
* digit obtained as a character, because we can now divide by
* 1000 and use the remainder directly, thus cutting down on
* the number of costly divisions needed. For an integer's worst
* case, 2 divisions are needed because it can only go up to
* 32767, so after 2 divisions by 1000, and some algebra, we will
* be left with 327 which we can get from this table. This is much
* better than the 5 divisions by 10 that we would need if we did
* it the conventional way. Of course, if we made this table go
* from 0-9999, only 1 division would be needed.
* Longs and unsigned ints of course, are another matter :-).
*
* Patrick Alken <wnder@underworld.net>
*/
/*
* Set this to the number of indices (numbers) in our table
*/
#define TABLE_MAX 1000
static const char *IntTable[] = {
"000", "100", "200", "300", "400",
"500", "600", "700", "800", "900",
"010", "110", "210", "310", "410",
"510", "610", "710", "810", "910",
"020", "120", "220", "320", "420",
"520", "620", "720", "820", "920",
"030", "130", "230", "330", "430",
"530", "630", "730", "830", "930",
"040", "140", "240", "340", "440",
"540", "640", "740", "840", "940",
"050", "150", "250", "350", "450",
"550", "650", "750", "850", "950",
"060", "160", "260", "360", "460",
"560", "660", "760", "860", "960",
"070", "170", "270", "370", "470",
"570", "670", "770", "870", "970",
"080", "180", "280", "380", "480",
"580", "680", "780", "880", "980",
"090", "190", "290", "390", "490",
"590", "690", "790", "890", "990",
"001", "101", "201", "301", "401",
"501", "601", "701", "801", "901",
"011", "111", "211", "311", "411",
"511", "611", "711", "811", "911",
"021", "121", "221", "321", "421",
"521", "621", "721", "821", "921",
"031", "131", "231", "331", "431",
"531", "631", "731", "831", "931",
"041", "141", "241", "341", "441",
"541", "641", "741", "841", "941",
"051", "151", "251", "351", "451",
"551", "651", "751", "851", "951",
"061", "161", "261", "361", "461",
"561", "661", "761", "861", "961",
"071", "171", "271", "371", "471",
"571", "671", "771", "871", "971",
"081", "181", "281", "381", "481",
"581", "681", "781", "881", "981",
"091", "191", "291", "391", "491",
"591", "691", "791", "891", "991",
"002", "102", "202", "302", "402",
"502", "602", "702", "802", "902",
"012", "112", "212", "312", "412",
"512", "612", "712", "812", "912",
"022", "122", "222", "322", "422",
"522", "622", "722", "822", "922",
"032", "132", "232", "332", "432",
"532", "632", "732", "832", "932",
"042", "142", "242", "342", "442",
"542", "642", "742", "842", "942",
"052", "152", "252", "352", "452",
"552", "652", "752", "852", "952",
"062", "162", "262", "362", "462",
"562", "662", "762", "862", "962",
"072", "172", "272", "372", "472",
"572", "672", "772", "872", "972",
"082", "182", "282", "382", "482",
"582", "682", "782", "882", "982",
"092", "192", "292", "392", "492",
"592", "692", "792", "892", "992",
"003", "103", "203", "303", "403",
"503", "603", "703", "803", "903",
"013", "113", "213", "313", "413",
"513", "613", "713", "813", "913",
"023", "123", "223", "323", "423",
"523", "623", "723", "823", "923",
"033", "133", "233", "333", "433",
"533", "633", "733", "833", "933",
"043", "143", "243", "343", "443",
"543", "643", "743", "843", "943",
"053", "153", "253", "353", "453",
"553", "653", "753", "853", "953",
"063", "163", "263", "363", "463",
"563", "663", "763", "863", "963",
"073", "173", "273", "373", "473",
"573", "673", "773", "873", "973",
"083", "183", "283", "383", "483",
"583", "683", "783", "883", "983",
"093", "193", "293", "393", "493",
"593", "693", "793", "893", "993",
"004", "104", "204", "304", "404",
"504", "604", "704", "804", "904",
"014", "114", "214", "314", "414",
"514", "614", "714", "814", "914",
"024", "124", "224", "324", "424",
"524", "624", "724", "824", "924",
"034", "134", "234", "334", "434",
"534", "634", "734", "834", "934",
"044", "144", "244", "344", "444",
"544", "644", "744", "844", "944",
"054", "154", "254", "354", "454",
"554", "654", "754", "854", "954",
"064", "164", "264", "364", "464",
"564", "664", "764", "864", "964",
"074", "174", "274", "374", "474",
"574", "674", "774", "874", "974",
"084", "184", "284", "384", "484",
"584", "684", "784", "884", "984",
"094", "194", "294", "394", "494",
"594", "694", "794", "894", "994",
"005", "105", "205", "305", "405",
"505", "605", "705", "805", "905",
"015", "115", "215", "315", "415",
"515", "615", "715", "815", "915",
"025", "125", "225", "325", "425",
"525", "625", "725", "825", "925",
"035", "135", "235", "335", "435",
"535", "635", "735", "835", "935",
"045", "145", "245", "345", "445",
"545", "645", "745", "845", "945",
"055", "155", "255", "355", "455",
"555", "655", "755", "855", "955",
"065", "165", "265", "365", "465",
"565", "665", "765", "865", "965",
"075", "175", "275", "375", "475",
"575", "675", "775", "875", "975",
"085", "185", "285", "385", "485",
"585", "685", "785", "885", "985",
"095", "195", "295", "395", "495",
"595", "695", "795", "895", "995",
"006", "106", "206", "306", "406",
"506", "606", "706", "806", "906",
"016", "116", "216", "316", "416",
"516", "616", "716", "816", "916",
"026", "126", "226", "326", "426",
"526", "626", "726", "826", "926",
"036", "136", "236", "336", "436",
"536", "636", "736", "836", "936",
"046", "146", "246", "346", "446",
"546", "646", "746", "846", "946",
"056", "156", "256", "356", "456",
"556", "656", "756", "856", "956",
"066", "166", "266", "366", "466",
"566", "666", "766", "866", "966",
"076", "176", "276", "376", "476",
"576", "676", "776", "876", "976",
"086", "186", "286", "386", "486",
"586", "686", "786", "886", "986",
"096", "196", "296", "396", "496",
"596", "696", "796", "896", "996",
"007", "107", "207", "307", "407",
"507", "607", "707", "807", "907",
"017", "117", "217", "317", "417",
"517", "617", "717", "817", "917",
"027", "127", "227", "327", "427",
"527", "627", "727", "827", "927",
"037", "137", "237", "337", "437",
"537", "637", "737", "837", "937",
"047", "147", "247", "347", "447",
"547", "647", "747", "847", "947",
"057", "157", "257", "357", "457",
"557", "657", "757", "857", "957",
"067", "167", "267", "367", "467",
"567", "667", "767", "867", "967",
"077", "177", "277", "377", "477",
"577", "677", "777", "877", "977",
"087", "187", "287", "387", "487",
"587", "687", "787", "887", "987",
"097", "197", "297", "397", "497",
"597", "697", "797", "897", "997",
"008", "108", "208", "308", "408",
"508", "608", "708", "808", "908",
"018", "118", "218", "318", "418",
"518", "618", "718", "818", "918",
"028", "128", "228", "328", "428",
"528", "628", "728", "828", "928",
"038", "138", "238", "338", "438",
"538", "638", "738", "838", "938",
"048", "148", "248", "348", "448",
"548", "648", "748", "848", "948",
"058", "158", "258", "358", "458",
"558", "658", "758", "858", "958",
"068", "168", "268", "368", "468",
"568", "668", "768", "868", "968",
"078", "178", "278", "378", "478",
"578", "678", "778", "878", "978",
"088", "188", "288", "388", "488",
"588", "688", "788", "888", "988",
"098", "198", "298", "398", "498",
"598", "698", "798", "898", "998",
"009", "109", "209", "309", "409",
"509", "609", "709", "809", "909",
"019", "119", "219", "319", "419",
"519", "619", "719", "819", "919",
"029", "129", "229", "329", "429",
"529", "629", "729", "829", "929",
"039", "139", "239", "339", "439",
"539", "639", "739", "839", "939",
"049", "149", "249", "349", "449",
"549", "649", "749", "849", "949",
"059", "159", "259", "359", "459",
"559", "659", "759", "859", "959",
"069", "169", "269", "369", "469",
"569", "669", "769", "869", "969",
"079", "179", "279", "379", "479",
"579", "679", "779", "879", "979",
"089", "189", "289", "389", "489",
"589", "689", "789", "889", "989",
"099", "199", "299", "399", "499",
"599", "699", "799", "899", "999"
};
/*
* Since we calculate the right-most digits for %d %u etc first,
* we need a temporary buffer to store them in until we get
* to the left-most digits
*/
#define TEMPBUF_MAX 20
static char TempBuffer[TEMPBUF_MAX];
/*
vSnprintf()
Backend to Snprintf() - performs the construction of 'dest'
using the string 'format' and the given arguments. Also makes sure
not more than 'bytes' characters are copied to 'dest'
We always allow room for a terminating \0 character, so at most,
bytes - 1 characters will be written to dest.
Return: Number of characters written, NOT including the terminating
\0 character which is *always* placed at the end of the string
NOTE: This function handles the following flags only:
%s %d %c %u %ld %lu
In addition, this function performs *NO* precision, padding,
or width formatting. If it receives an unknown % character,
it will call vsprintf() to complete the remainder of the
string.
*/
int
rs_vsnprintf(char *dest, const size_t bytes, const char *format, va_list args)
{
char ch;
int written = 0; /* bytes written so far */
int maxbytes = bytes - 1;
while((ch = *format++) && (written < maxbytes)) {
if(ch == '%') {
/*
* Advance past the %
*/
ch = *format++;
/*
* Put the most common cases first - %s %d etc
*/
if(ch == 's') {
const char *str = va_arg(args, const char *);
while((*dest = *str)) {
++dest;
++str;
if(++written >= maxbytes)
break;
}
continue;
}
if(ch == 'd') {
int num = va_arg(args, int);
int quotient;
const char *str;
char *digitptr = TempBuffer;
/*
* We have to special-case "0" unfortunately
*/
if(num == 0) {
*dest++ = '0';
++written;
continue;
}
if(num < 0) {
*dest++ = '-';
if(++written >= maxbytes)
continue;
num = -num;
}
do {
quotient = num / TABLE_MAX;
/*
* We'll start with the right-most digits of 'num'.
* Dividing by TABLE_MAX cuts off all but the X
* right-most digits, where X is such that:
*
* 10^X = TABLE_MAX
*
* For example, if num = 1200, and TABLE_MAX = 1000,
* quotient will be 1. Multiplying this by 1000 and
* subtracting from 1200 gives: 1200 - (1 * 1000) = 200.
* We then go right to slot 200 in our array and behold!
* The string "002" (200 backwards) is conveniently
* waiting for us. Then repeat the process with the
* digits left.
*
* The reason we need to have the integers written
* backwards, is because we don't know how many digits
* there are. If we want to express the number 12130
* for example, our first pass would leave us with 130,
* whose slot in the array yields "031", which we
* plug into our TempBuffer[]. The next pass gives us
* 12, whose slot yields "21" which we append to
* TempBuffer[], leaving us with "03121". This is the
* exact number we want, only backwards, so it is
* a simple matter to reverse the string. If we used
* straightfoward numbers, we would have a TempBuffer
* looking like this: "13012" which would be a nightmare
* to deal with.
*/
str = IntTable[num - (quotient * TABLE_MAX)];
while((*digitptr = *str)) {
++digitptr;
++str;
}
} while((num = quotient) != 0);
/*
* If the last quotient was a 1 or 2 digit number, there
* will be one or more leading zeroes in TempBuffer[] -
* get rid of them.
*/
while(*(digitptr - 1) == '0')
--digitptr;
while(digitptr != TempBuffer) {
*dest++ = *--digitptr;
if(++written >= maxbytes)
break;
}
continue;
} /* if (ch == 'd') */
if(ch == 'c') {
*dest++ = va_arg(args, int);
++written;
continue;
} /* if (ch == 'c') */
if(ch == 'u') {
unsigned int num = va_arg(args, unsigned int);
unsigned int quotient;
const char *str;
char *digitptr = TempBuffer;
if(num == 0) {
*dest++ = '0';
++written;
continue;
}
do {
quotient = num / TABLE_MAX;
/*
* Very similar to case 'd'
*/
str = IntTable[num - (quotient * TABLE_MAX)];
while((*digitptr = *str)) {
++digitptr;
++str;
}
} while((num = quotient) != 0);
while(*(digitptr - 1) == '0')
--digitptr;
while(digitptr != TempBuffer) {
*dest++ = *--digitptr;
if(++written >= maxbytes)
break;
}
continue;
} /* if (ch == 'u') */
if(ch == 'Q') {
const char *arg = va_arg(args, const char *);
if(arg == NULL)
continue;
const char *str = rsdb_quote(arg);
while((*dest = *str)) {
++dest;
++str;
if(++written >= maxbytes)
break;
}
continue;
}
if(ch == 'l') {
if(*format == 'u') {
unsigned long num = va_arg(args, unsigned long);
unsigned long quotient;
const char *str;
char *digitptr = TempBuffer;
++format;
if(num == 0) {
*dest++ = '0';
++written;
continue;
}
do {
quotient = num / TABLE_MAX;
/*
* Very similar to case 'u'
*/
str = IntTable[num - (quotient * TABLE_MAX)];
while((*digitptr = *str)) {
++digitptr;
++str;
}
} while((num = quotient) != 0);
while(*(digitptr - 1) == '0')
--digitptr;
while(digitptr != TempBuffer) {
*dest++ = *--digitptr;
if(++written >= maxbytes)
break;
}
continue;
} else
/* if (*format == 'u') */ if(*format == 'd') {
long num = va_arg(args, long);
long quotient;
const char *str;
char *digitptr = TempBuffer;
++format;
if(num == 0) {
*dest++ = '0';
++written;
continue;
}
if(num < 0) {
*dest++ = '-';
if(++written >= maxbytes)
continue;
num = -num;
}
do {
quotient = num / TABLE_MAX;
str = IntTable[num - (quotient * TABLE_MAX)];
while((*digitptr = *str)) {
++digitptr;
++str;
}
} while((num = quotient) != 0);
while(*(digitptr - 1) == '0')
--digitptr;
while(digitptr != TempBuffer) {
*dest++ = *--digitptr;
if(++written >= maxbytes)
break;
}
continue;
} else { /* if (*format == 'd') */
/* XXX error */
exit(1);
}
} /* if (ch == 'l') */
if(ch != '%') {
/* XXX error */
exit(1);
} /* if (ch != '%') */
} /* if (ch == '%') */
*dest++ = ch;
++written;
} /* while ((ch = *format++) && (written < maxbytes)) */
/*
* Terminate the destination buffer with a \0
*/
*dest = '\0';
return (written);
} /* vSnprintf() */
/*
rs_snprintf()
Optimized version of snprintf().
Inputs: dest - destination string
bytes - number of bytes to copy
format - formatted string
args - args to 'format'
Return: number of characters copied, NOT including the terminating
NULL which is always placed at the end of the string
*/
int
rs_snprintf(char *dest, const size_t bytes, const char *format, ...)
{
va_list args;
int count;
va_start(args, format);
count = rs_vsnprintf(dest, bytes, format, args);
va_end(args);
return (count);
} /* Snprintf() */

246
bandb/rsdb_sqlite3.c Normal file
View File

@ -0,0 +1,246 @@
/* src/rsdb_sqlite.h
* Contains the code for the sqlite database backend.
*
* Copyright (C) 2003-2006 Lee Hardy <leeh@leeh.co.uk>
* Copyright (C) 2003-2006 ircd-ratbox development team
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* 1.Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2.Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3.The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#include "stdinc.h"
#include "rsdb.h"
#include <sqlite3.h>
struct sqlite3 *rb_bandb;
rsdb_error_cb *error_cb;
static void
mlog(const char *errstr, ...)
{
if(error_cb != NULL) {
char buf[256];
va_list ap;
va_start(ap, errstr);
vsnprintf(buf, sizeof(buf), errstr, ap);
va_end(ap);
error_cb(buf);
} else
exit(1);
}
int
rsdb_init(rsdb_error_cb * ecb)
{
const char *bandb_dbpath_env;
char dbpath[PATH_MAX];
char errbuf[128];
error_cb = ecb;
/* try a path from the environment first, useful for basedir overrides */
bandb_dbpath_env = getenv("BANDB_DBPATH");
if(bandb_dbpath_env != NULL)
rb_strlcpy(dbpath, bandb_dbpath_env, sizeof(dbpath));
else
rb_strlcpy(dbpath, DBPATH, sizeof(dbpath));
if(sqlite3_open(dbpath, &rb_bandb) != SQLITE_OK) {
snprintf(errbuf, sizeof(errbuf), "Unable to open sqlite database: %s",
sqlite3_errmsg(rb_bandb));
mlog(errbuf);
return -1;
}
if(access(dbpath, W_OK)) {
snprintf(errbuf, sizeof(errbuf), "Unable to open sqlite database for write: %s", strerror(errno));
mlog(errbuf);
return -1;
}
return 0;
}
void
rsdb_shutdown(void)
{
if(rb_bandb)
sqlite3_close(rb_bandb);
}
const char *
rsdb_quote(const char *src)
{
static char buf[BUFSIZE * 4];
char *p = buf;
/* cheap and dirty length check.. */
if(strlen(src) >= (sizeof(buf) / 2))
return NULL;
while(*src) {
if(*src == '\'')
*p++ = '\'';
*p++ = *src++;
}
*p = '\0';
return buf;
}
static int
rsdb_callback_func(void *cbfunc, int argc, char **argv, char **colnames)
{
rsdb_callback cb = (rsdb_callback)((uintptr_t)cbfunc);
(cb) (argc, (const char **)argv);
return 0;
}
void
rsdb_exec(rsdb_callback cb, const char *format, ...)
{
static char buf[BUFSIZE * 4];
va_list args;
char *errmsg;
unsigned int i;
int j;
va_start(args, format);
i = rs_vsnprintf(buf, sizeof(buf), format, args);
va_end(args);
if(i >= sizeof(buf)) {
mlog("fatal error: length problem with compiling sql");
}
if((i = sqlite3_exec(rb_bandb, buf, (cb ? rsdb_callback_func : NULL), (void *)((uintptr_t)cb), &errmsg))) {
switch (i) {
case SQLITE_BUSY:
for(j = 0; j < 5; j++) {
rb_sleep(0, 500000);
if(!sqlite3_exec
(rb_bandb, buf, (cb ? rsdb_callback_func : NULL), (void *)((uintptr_t)cb), &errmsg))
return;
}
/* failed, fall through to default */
mlog("fatal error: problem with db file: %s", errmsg);
break;
default:
mlog("fatal error: problem with db file: %s", errmsg);
break;
}
}
}
void
rsdb_exec_fetch(struct rsdb_table *table, const char *format, ...)
{
static char buf[BUFSIZE * 4];
va_list args;
char *errmsg;
char **data;
int pos;
unsigned int retval;
int i, j;
va_start(args, format);
retval = rs_vsnprintf(buf, sizeof(buf), format, args);
va_end(args);
if(retval >= sizeof(buf)) {
mlog("fatal error: length problem with compiling sql");
}
if((retval =
sqlite3_get_table(rb_bandb, buf, &data, &table->row_count, &table->col_count, &errmsg))) {
int success = 0;
switch (retval) {
case SQLITE_BUSY:
for(i = 0; i < 5; i++) {
rb_sleep(0, 500000);
if(!sqlite3_get_table
(rb_bandb, buf, &data, &table->row_count, &table->col_count,
&errmsg)) {
success++;
break;
}
}
if(success)
break;
mlog("fatal error: problem with db file: %s", errmsg);
break;
default:
mlog("fatal error: problem with db file: %s", errmsg);
break;
}
}
/* we need to be able to free data afterward */
table->arg = data;
if(table->row_count == 0) {
table->row = NULL;
return;
}
/* sqlite puts the column names as the first row */
pos = table->col_count;
table->row = rb_malloc(sizeof(char **) * table->row_count);
for(i = 0; i < table->row_count; i++) {
table->row[i] = rb_malloc(sizeof(char *) * table->col_count);
for(j = 0; j < table->col_count; j++) {
table->row[i][j] = data[pos++];
}
}
}
void
rsdb_exec_fetch_end(struct rsdb_table *table)
{
int i;
for(i = 0; i < table->row_count; i++) {
rb_free(table->row[i]);
}
rb_free(table->row);
sqlite3_free_table((char **)table->arg);
}
void
rsdb_transaction(rsdb_transtype type)
{
if(type == RSDB_TRANS_START)
rsdb_exec(NULL, "BEGIN TRANSACTION");
else if(type == RSDB_TRANS_END)
rsdb_exec(NULL, "COMMIT TRANSACTION");
}

99221
bandb/sqlite3.c Normal file

File diff suppressed because it is too large Load Diff

5637
bandb/sqlite3.h Normal file

File diff suppressed because it is too large Load Diff

15257
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -8,9 +8,9 @@ dnl said functions need to be just about as complex as they already are.
AC_PREREQ(2.57)
dnl Sneaky way to get an Id tag into the configure script
AC_COPYRIGHT([$Id: configure.ac 3516 2007-06-10 16:14:03Z jilles $])
AC_COPYRIGHT([2014 elemental-ircd Team])
AC_INIT([charybdis],[3.0.0-RC1])
AC_INIT([elemental-ircd],[6.6.1])
AC_CONFIG_HEADER(include/setup.h)
@ -81,7 +81,7 @@ esac
fi
AC_MSG_CHECKING([uname -s for Cygwin, Solaris, AIX or HPUX])
AC_MSG_CHECKING([uname -s for Solaris, AIX or HPUX])
OSNAME=`uname -s`
case "$OSNAME" in
HP-UX*)
@ -96,10 +96,6 @@ case "$OSNAME" in
AC_MSG_RESULT(already using newer HPUX)
fi
;;
CYGWIN*)
AC_MSG_RESULT(Cygwin)
CYGWIN=yes
;;
SunOS*)
AC_MSG_RESULT(SunOS or Solaris)
AC_DEFINE(__EXTENSIONS__, 1, [This is needed to use strtok_r on Solaris.])
@ -229,12 +225,37 @@ if test "$LEX" = ":"; then
AC_MSG_ERROR([could not locate a suitable lexical generator, install flex or lex.])
fi
AC_ARG_ENABLE([fhs-paths],
[AS_HELP_STRING([--enable-fhs-paths], [Use more FHS-like pathnames (for packagers).])],
[],
[dnl detect if the user appears to want --enable-fhs-paths
AS_IF([test "$libexecdir" = '${exec_prefix}/libexec' && \
test "$localstatedir" = '${prefix}/var' && \
test "$libdir" = '${exec_prefix}/lib'],
[enable_fhs_paths=no],
[enable_fhs_paths=yes])
])
dnl use directory structure of cached as default (hack)
if test "$libexecdir" = '${exec_prefix}/libexec' &&
test "$localstatedir" = '${prefix}/var'; then
libexecdir='${bindir}'
AS_IF([test "x$enable_fhs_paths" = "xyes"],
[dnl Avoid name collisions.
pkglibexecdir='${libexecdir}/${PACKAGE_TARNAME}'
rundir=${rundir-'${prefix}/run'}
pkgrundir='${rundir}/${PACKAGE_TARNAME}'
pkglocalstatedir='${localstatedir}/${PACKAGE_TARNAME}'],
[libexecdir='${bindir}'
pkglibexecdir='${libexecdir}'
rundir='${sysconfdir}'
pkgrundir='${rundir}'
localstatedir='${prefix}'
fi
pkglocalstatedir='${sysconfdir}'])
pkglibdir='${libdir}/${PACKAGE_TARNAME}'
AC_SUBST([pkglibdir])
AC_SUBST([rundir])
AC_SUBST([pkgrundir])
AC_SUBST([pkglocalstatedir])
AC_DEFINE_DIR([PKGLOCALSTATEDIR], [pkglocalstatedir], [[Directory in which to store state, such as ban database]])
AC_SUBST([pkglibexecdir])
AC_DEFINE_DIR([PKGLIBEXECDIR], [pkglibexecdir], [Directory where binaries the IRCd itself spawns live])
dnl Checks for header files.
AC_HEADER_STDC
@ -315,7 +336,7 @@ fi
AC_C_BIGENDIAN
dnl Check for stdarg.h - if we can't find it, halt configure
AC_CHECK_HEADER(stdarg.h, , [AC_MSG_ERROR([** stdarg.h could not be found - ircd-ratbox will not compile without it **])])
AC_CHECK_HEADER(stdarg.h, , [AC_MSG_ERROR([** stdarg.h could not be found - charybdis will not compile without it **])])
dnl Checks for the existence of strlcat, strlcpy, basename...
dnl This more reliable test only works with gcc though.
@ -588,22 +609,15 @@ AC_ARG_ENABLE(epoll, AC_HELP_STRING([--enable-epoll],[Force sys_epoll usage (Lin
],)
dnl **********************************************************************
dnl Check for --with-confdir
dnl Check for --with-confdir [deprecated, use --sysconfdir instead]
dnl **********************************************************************
AC_MSG_CHECKING([whether to modify confdir])
AC_ARG_WITH(confdir,
AC_HELP_STRING([--with-confdir=DIR],
[Directory to install config files.]),
[ confdir=`echo $withval | sed 's/\/$//'`
AC_MSG_RESULT(yes)
AC_DEFINE_DIR(ETC_DIR, confdir, [Prefix where config files are installed.])
AC_SUBST_DIR([confdir]) ],
[ confdir='${prefix}/etc'
AC_MSG_RESULT(no)
AC_DEFINE_DIR(ETC_DIR, confdir, [Prefix where config files are installed.])
AC_SUBST_DIR([confdir])]
)
AC_ARG_WITH([confdir],
[AC_HELP_STRING([--with-confdir=DIR],
[Directory to install config files [deprecated, use --sysconfdir instead].])],
[ sysconfdir=`echo $withval | sed 's/\/$//'` ],
[ confdir='${sysconfdir}' ])
AC_DEFINE_DIR([ETC_DIR], [sysconfdir], [Prefix where config files are installed.])
dnl **********************************************************************
dnl Check for --with-logdir
@ -614,14 +628,13 @@ AC_ARG_WITH(logdir,
AC_HELP_STRING([--with-logdir=DIR],
[Directory where to write logfiles.]),
[ logdir=`echo $withval | sed 's/\/$//'`
AC_MSG_RESULT(yes)
AC_DEFINE_DIR(LOG_DIR, logdir, [Prefix where to write logfiles.])
AC_SUBST_DIR([logdir]) ],
[ logdir='${prefix}/logs'
AC_MSG_RESULT(no)
AC_DEFINE_DIR(LOG_DIR, logdir, [Prefix where to write logfiles.])
AC_SUBST_DIR([logdir])]
)
AC_MSG_RESULT(yes)],
[ AS_IF([test "x$enable_fhs_paths" = "xyes"],
[logdir='${localstatedir}/log/${PACKAGE_TARNAME}'],
[logdir='${prefix}/logs'])
AC_MSG_RESULT(no)])
AC_DEFINE_DIR([LOG_DIR], [logdir], [Prefix where to write logfiles.])
AC_SUBST_DIR([logdir])
dnl **********************************************************************
dnl Check for --with-helpdir
@ -632,14 +645,13 @@ AC_ARG_WITH(helpdir,
AC_HELP_STRING([--with-helpdir=DIR],
[Directory to install help files.]),
[ helpdir=`echo $withval | sed 's/\/$//'`
AC_MSG_RESULT(yes)
AC_DEFINE_DIR(HELP_DIR, helpdir, [Prefix where help files are installed.])
AC_SUBST_DIR([helpdir]) ],
[ helpdir='${prefix}/help'
AC_MSG_RESULT(no)
AC_DEFINE_DIR(HELP_DIR, helpdir, [Prefix where help file are installed.])
AC_SUBST_DIR([helpdir])]
)
AC_MSG_RESULT(yes) ],
[ AS_IF([test "x$enable_fhs_paths" = "xyes"],
[helpdir='${datadir}/${PACKAGE_TARNAME}/help'],
[helpdir='${prefix}/help'])
AC_MSG_RESULT(no) ])
AC_DEFINE_DIR([HELP_DIR], [helpdir], [Prefix where help files are installed.])
AC_SUBST_DIR([helpdir])
dnl **********************************************************************
dnl Check for --with-moduledir
@ -647,17 +659,44 @@ dnl **********************************************************************
AC_MSG_CHECKING([whether to modify moduledir])
AC_ARG_WITH(moduledir,
AC_HELP_STRING([--with-moduledir=DIR],
[Directory to install modules.]),
[AC_HELP_STRING([--with-moduledir=DIR],
[Directory to install modules.])],
[ moduledir=`echo $withval | sed 's/\/$//'`
AC_MSG_RESULT(yes)
AC_DEFINE_DIR(MODULE_DIR, moduledir, [Prefix where modules are installed.])
AC_SUBST_DIR([moduledir]) ],
[ moduledir='${prefix}/modules'
AC_MSG_RESULT(yes)],
[ AS_IF([test "x$enable_fhs_paths" = "xyes"],
[moduledir='${pkglibdir}/modules'],
[moduledir='${prefix}/modules'])
AC_MSG_RESULT(no)
AC_DEFINE_DIR(MODULE_DIR, moduledir, [Prefix where modules are installed.])
AC_SUBST_DIR([moduledir])]
)
])
AC_DEFINE_DIR(MODULE_DIR, moduledir, [Prefix where modules are installed.])
AC_SUBST_DIR([moduledir])
dnl Check for --with-rundir
AC_MSG_CHECKING([whether or modify rundir])
AC_ARG_WITH([rundir],
[AC_HELP_STRING([--with-rundir=DIR],
[Directory in which to store pidfile.])],
[AC_MSG_RESULT([yes])
rundir=`echo $withval | sed 's/\/$//'`],
[AC_MSG_RESULT([no])
AS_IF([test "x$enable_fhs_paths" = "xyes"],
[rundir='${prefix}/run'],
[rundir='${sysconfdir}'])])
AC_SUBST([rundir])
AC_DEFINE_DIR([PKGRUNDIR], [pkgrundir], [Directory to store pidfile in.])
dnl Installed utility program prefixes (does not affect binaries
dnl installed into pkglibexecdir)
AC_MSG_CHECKING([for program prefix])
AC_ARG_WITH([program-prefix],
[AS_HELP_STRING([--with-program-prefix=], [If set, programs installed into PATH will be installed with names prefixed by this prefix.])],
[test "x$with_program_prefix" = "xno" && with_program_prefix=],
[with_program_prefix=])
AC_MSG_RESULT(["$with_program_prefix"])
PROGRAM_PREFIX="$with_program_prefix"
AC_SUBST([PROGRAM_PREFIX])
AC_DEFINE_UNQUOTED([PROGRAM_PREFIX], ["$with_program_prefix"], [String with which all programs intended to be in PATH are prefixed.])
if test ! -z "$SELECT_TYPE_EXPLICIT"; then
SELECT_TYPE="$SELECT_TYPE_EXPLICIT";
@ -823,8 +862,8 @@ if test "$balloc" = no; then
fi
AC_ARG_ENABLE(small-net,
AC_HELP_STRING([--enable-small-net],[Enable small network support.]),
[small_net=$enableval], [small_net=no])
AC_HELP_STRING([--disable-small-net],[Disable small network support.]),
[small_net=$enableval], [small_net=yes])
if test "$small_net" = yes; then
dnl AC_DEFINE([HASHSIZE], 4096, [Max number of buckets in hash tables.])
@ -866,15 +905,18 @@ dnl so enable small net unless you really need this much support
fi
AC_ARG_WITH(nicklen,
AC_HELP_STRING([--with-nicklen=LENGTH],[Set the nick length to LENGTH (default 15, max 50)]),
AC_HELP_STRING([--with-nicklen=LENGTH],[Set the nick length to LENGTH (default 31, max 50)]),
[
if ! expr "$withval" + 0 >/dev/null 2>&1; then
AC_ERROR([NICKLEN must be a numeric value])
fi
if test $withval -ge 50; then
NICKLEN=50
AC_MSG_WARN([NICKLEN has a hard limit of 50. Setting NICKLEN=50])
else
NICKLEN="$withval"
fi
], [NICKLEN=15])
], [NICKLEN=31])
AC_ARG_WITH(topiclen,
AC_HELP_STRING([--with-topiclen=NUMBER],[Set the max topic length to NUMBER (default 390, max 390)]),
@ -893,12 +935,6 @@ AC_DEFINE_UNQUOTED(NICKLEN, (${NICKLEN}+1), [Nickname length])
shared_modules="yes"
dnl Some first-stage sanity checks.
if test "$shared_modules" = yes; then
if test "$CYGWIN" = yes; then
AC_MSG_WARN([disabling shared modules; Cygwin is at present unable to build them.])
shared_modules="no"
fi
dnl TenDRA's cc is called tcc too.
if test "$CC" = tcc -a "$TenDRA" = "no"; then
AC_MSG_WARN([disabling shared modules: Tiny C Compiler can't create PIC])
@ -1020,6 +1056,17 @@ if test "$shared_modules" = yes; then
fi
fi
# rpath, for finding libratbox.so at run time
hold_ldflags=$LDFLAGS
AC_MSG_CHECKING(for the ld -rpath flag)
LDFLAGS="${LDFLAGS} -Wl,-rpath=${libdir}"
AC_LINK_IFELSE(AC_LANG_PROGRAM([],[int i;]), found=yes, found=no)
LDFLAGS=$hold_ldflags
AC_MSG_RESULT($found)
if test "$found" = yes; then
LDFLAGS="${LDFLAGS} -Wl,-rpath=\${libdir}"
fi
# This must be down here, or it will mess up checks like the ones
# for -Wl,-export-dynamic
# -- jilles
@ -1035,7 +1082,8 @@ CHARYBDIS_C_GCC_TRY_FLAGS([-Wpointer-arith], charybdis_cv_c_gcc_w_pointer_arith)
CHARYBDIS_C_GCC_TRY_FLAGS([-Wimplicit -Wnested-externs], charybdis_cv_c_gcc_w_implicit)
CHARYBDIS_C_GCC_TRY_FLAGS([-Wcast-align], charybdis_cv_c_gcc_w_cast_align)
CHARYBDIS_C_GCC_TRY_FLAGS([-Wcast-qual], charybdis_cv_c_gcc_w_cast_qual)
CHARYBDIS_C_GCC_TRY_FLAGS([-Wwrite-strings], charybdis_cv_c_gcc_w_float_equal)
CHARYBDIS_C_GCC_TRY_FLAGS([-Wwrite-strings], charybdis_cv_c_gcc_w_write_strings)
CHARYBDIS_C_GCC_TRY_FLAGS([-Werror-implicit-function-declaration], charybdis_cv_c_gcc_w_error_implicit_function_declaration)
CHARYBDIS_C_GCC_TRY_FLAGS([-Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations], charybdis_cv_c_gcc_prototypes)
CHARYBDIS_C_GCC_TRY_FLAGS([-Wparenthesis], charybdis_cv_c_gcc_parenthesis)
CHARYBDIS_C_GCC_TRY_FLAGS([-W -Wno-unused], charybdis_cv_c_gcc_w)
@ -1045,12 +1093,10 @@ CHARYBDIS_C_GCC_TRY_FLAGS([-Wmissing-noreturn], charybdis_cv_c_gcc_w_missing_nor
CHARYBDIS_C_GCC_TRY_FLAGS([-Wundef], charybdis_cv_c_gcc_w_undef)
CHARYBDIS_C_GCC_TRY_FLAGS([-Wpacked], charybdis_cv_c_gcc_w_packed)
CHARYBDIS_C_GCC_TRY_FLAGS([-Wnested-externs], charybdis_cv_c_gcc_w_nested_externs)
CHARYBDIS_C_GCC_TRY_FLAGS([-Wbad-function-cast], charybdis_cv_c_gcc_w_bad_function_cast)
CHARYBDIS_C_GCC_TRY_FLAGS([-Wunused-function -Wunused-label -Wunused-value -Wunused-variable], charybdis_cv_c_gcc_w_unused)
CHARYBDIS_C_GCC_TRY_FLAGS([-Wredundant-decls], charybdis_cv_c_gcc_w_redundant_decls)
CHARYBDIS_C_GCC_TRY_FLAGS([-Wfloat-equal], charybdis_cv_c_gcc_w_float_equal)
CHARYBDIS_C_GCC_TRY_FLAGS([-Wformat -Wformat-y2k -Wformat-security], charybdis_cv_c_gcc_w_format)
CHARYBDIS_C_GCC_TRY_FLAGS([-pedantic], charybdis_cv_c_gcc_pedantic)
CHARYBDIS_C_GCC_TRY_FLAGS([-Wformat -Wformat-y2k -Wno-format-security], charybdis_cv_c_gcc_w_format)
IRC_CFLAGS="$CFLAGS"
],[])
@ -1154,15 +1200,18 @@ fi
AC_CONFIG_FILES( \
Makefile \
bandb/Makefile \
ssld/Makefile \
extensions/Makefile \
unsupported/Makefile \
src/Makefile \
modules/Makefile \
tools/Makefile \
tools/genssl.sh \
doc/Makefile \
help/Makefile \
)
AC_CONFIG_COMMANDS([tools/genssl.sh_chmod], [chmod 755 tools/genssl.sh])
AC_OUTPUT
@ -1191,5 +1240,5 @@ Configuration:
Nickname length : $NICKLEN
Topic length : $TOPICLEN
Use (g)make to compile Charybdis, then (g)make install to install it.
Use (g)make to compile elemental-ircd, then (g)make install to install it.
"

View File

@ -1,4 +1,3 @@
$Id: CIDR.txt 6 2005-09-10 01:02:21Z nenolod $
CIDR Information
----------------

View File

@ -15,12 +15,14 @@ RM = @RM@
CP = @CP@
TOUCH = @TOUCH@
PROGRAM_PREFIX = @PROGRAM_PREFIX@
prefix = @prefix@
exec_prefix = @exec_prefix@
exec_suffix = @exec_suffix@
bindir = @bindir@
libexecdir = @libexecdir@
confdir = @confdir@
sysconfdir = @sysconfdir@
localstatedir = @localstatedir@
# Change this later! -- adrian
moduledir = @moduledir@
@ -31,7 +33,6 @@ mandir = @mandir@/man8
MANPAGES = ircd.8
CONFS = example.conf reference.conf
DEFAULTCONFS = kline.conf dline.conf xline.conf resv.conf
SSL_LIBS = @SSL_LIBS@
SSL_INCLUDES = @SSL_INCLUDES@
@ -40,11 +41,13 @@ IRCDLIBS = @LIBS@ $(SSL_LIBS)
INCLUDES = -I../include $(SSL_INCLUDES)
CPPFLAGS = ${INCLUDES} @CPPFLAGS@
all: build
install-mkdirs:
-@if test ! -d $(DESTDIR)$(confdir); then \
echo "mkdir -p $(confdir)"; \
mkdir -p $(DESTDIR)$(confdir); \
-@if test ! -d $(DESTDIR)$(sysconfdir); then \
echo "mkdir -p $(sysconfdir)"; \
mkdir -p $(DESTDIR)$(sysconfdir); \
fi
-@if test ! -d $(DESTDIR)$(mandir); then \
@ -55,32 +58,25 @@ install-mkdirs:
install: install-mkdirs build
@echo "ircd: installing example config files ($(CONFS))"
@for i in $(CONFS); do \
if test -f $(DESTDIR)$(confdir)/$$i; then \
$(MV) $(DESTDIR)$(confdir)/$$i $(DESTDIR)$(confdir)/$$i.old; \
if test -f $(DESTDIR)$(sysconfdir)/$$i; then \
$(MV) $(DESTDIR)$(sysconfdir)/$$i $(DESTDIR)$(sysconfdir)/$$i.old; \
fi; \
$(INSTALL_DATA) $$i $(DESTDIR)$(confdir); \
$(INSTALL_DATA) $$i $(DESTDIR)$(sysconfdir); \
done
@for i in $(DEFAULTCONFS); do \
if test ! -f $(DESTDIR)$(confdir)/$$i; then \
echo "ircd: creating config file ($$i)"; \
${TOUCH} $(DESTDIR)$(confdir)/$$i; \
fi; \
done
-@if test ! -f $(DESTDIR)$(confdir)/ircd.motd; then \
-@if test ! -f $(DESTDIR)$(sysconfdir)/ircd.motd; then \
echo "ircd: installing motd file (ircd.motd)"; \
$(INSTALL_DATA) ircd.motd $(DESTDIR)$(confdir); \
$(INSTALL_DATA) ircd.motd $(DESTDIR)$(sysconfdir); \
fi
-@if test -f $(DESTDIR)$(confdir)/links.txt; then \
$(RM) $(DESTDIR)$(confdir)/links.txt; \
-@if test -f $(DESTDIR)$(sysconfdir)/links.txt; then \
$(RM) $(DESTDIR)$(sysconfdir)/links.txt; \
fi
@echo "ircd: installing manpage"
@for i in $(MANPAGES); do \
if test ! -f $(DESTDIR)$(mandir)/$$i; then \
$(INSTALL_DATA) $$i $(DESTDIR)$(mandir); \
if test ! -f $(DESTDIR)$(mandir)/$(PROGRAM_PREFIX)$$i; then \
$(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/$(PROGRAM_PREFIX)$$i; \
fi; \
done

View File

@ -83,4 +83,3 @@ A number of scripts for clients have already been written to automate this
process, see client-scripts/README for more information.
--
$Id: challenge.txt 678 2006-02-03 20:25:01Z jilles $

View File

@ -44,4 +44,3 @@ nick changes their nick but is collided again (the server detecting the
collision will not propagate the nick change further).
--
$Id: collision_fnc.txt 3422 2007-04-22 14:35:28Z jilles $

View File

@ -3,6 +3,7 @@
* Copyright (C) 2000-2002 Hybrid Development Team
* Copyright (C) 2002-2005 ircd-ratbox development team
* Copyright (C) 2005-2006 charybdis development team
* Copyright (C) 2014 Elemental-IRCd development team
*
* $Id: example.conf 3582 2007-11-17 21:55:48Z jilles $
*
@ -10,34 +11,50 @@
*/
/* Extensions */
#loadmodule "extensions/chm_adminonly.so";
loadmodule "extensions/chm_operonly.so";
#loadmodule "extensions/chm_sslonly.so";
#loadmodule "extensions/chm_operonly_compat.so";
#loadmodule "extensions/chm_quietunreg_compat.so";
#loadmodule "extensions/chm_sslonly_compat.so";
#loadmodule "extensions/createauthonly.so";
#loadmodule "extensions/extb_account.so";
#loadmodule "extensions/extb_canjoin.so";
#loadmodule "extensions/extb_channel.so";
#loadmodule "extensions/extb_extgecos.so";
#loadmodule "extensions/extb_oper.so";
#loadmodule "extensions/extb_realname.so";
loadmodule "extensions/extb_account.so";
loadmodule "extensions/extb_canjoin.so";
loadmodule "extensions/extb_channel.so";
loadmodule "extensions/extb_extgecos.so";
loadmodule "extensions/extb_oper.so";
loadmodule "extensions/extb_realname.so";
#loadmodule "extensions/extb_server.so";
#loadmodule "extensions/extb_ssl.so";
#loadmodule "extensions/hurt.so";
#loadmodule "extensions/ip_cloaking.so";
loadmodule "extensions/ip_cloaking.so";
#loadmodule "extensions/m_findforwards.so";
#loadmodule "extensions/m_identify.so";
loadmodule "extensions/m_identify.so";
loadmodule "extensions/m_mkpasswd.so";
loadmodule "extensions/m_webirc.so";
#loadmodule "extensions/m_cycle.so";
#loadmodule "extensions/m_oaccept.so";
#loadmodule "extensions/m_opme.so";
#loadmodule "extensions/m_ojoin.so";
#loadmodule "extensions/m_omode.so";
#loadmodule "extensions/m_olist.so";
#loadmodule "extensions/m_okick.so";
#loadmodule "extensions/m_force.so";
#loadmodule "extensions/m_roleplay.so";
#loadmodule "extensions/no_oper_invis.so";
#loadmodule "extensions/sno_farconnect.so";
#loadmodule "extensions/sno_globalkline.so";
#loadmodule "extensions/sno_globaloper.so";
loadmodule "extensions/sno_farconnect.so";
loadmodule "extensions/sno_globalkline.so";
loadmodule "extensions/sno_globaloper.so";
#loadmodule "extensions/sno_whois.so";
serverinfo {
name = "hades.arpa";
name = "hostname.domain.tld";
sid = "42X";
description = "charybdis test server";
network_name = "AthemeNET";
description = "elemental-ircd test server";
network_name = "ShadowNET";
network_desc = "Your IRC network.";
helpchan = "#help";
helpurl = "http://www.mynet.net/help";
hub = yes;
/* On multi-homed hosts you may need the following. These define
@ -46,18 +63,21 @@ serverinfo {
#vhost = "192.169.0.1";
/* for IPv6 */
#vhost6 = "3ffe:80e8:546::2";
/* ssl_private_key: our ssl private key */
ssl_private_key = "etc/test.key";
ssl_private_key = "etc/ssl.key";
/* ssl_cert: certificate for our ssl server */
ssl_cert = "etc/test.cert";
ssl_cert = "etc/ssl.cert";
/* ssl_dh_params: DH parameters, generate with openssl dhparam -out dh.pem 1024 */
ssl_dh_params = "etc/dh.pem";
/* ssld_count: number of ssld processes you want to start, if you have a really busy
* server, using N-1 where N is the number of cpu/cpu cores you have might be useful
/* ssld_count: number of ssld processes you want to start, if you
* have a really busy server, using N-1 where N is the number of
* cpu/cpu cores you have might be useful. A number greater than one
* can also be useful in case of bugs in ssld and because ssld needs
* two file descriptors per SSL connection.
*/
ssld_count = 1;
@ -71,7 +91,7 @@ serverinfo {
admin {
name = "Lazy admin (lazya)";
description = "AthemeNET client server";
description = "ShadowNET client server";
email = "nobody@127.0.0.1";
};
@ -92,11 +112,12 @@ log {
*/
class "users" {
ping_time = 2 minutes;
number_per_ident = 10;
number_per_ident = 10;
number_per_ip = 10;
number_per_ip_global = 50;
cidr_bitlen = 64;
number_per_cidr = 8;
number_per_ip_global = 50;
cidr_ipv4_bitlen = 24;
cidr_ipv6_bitlen = 64;
number_per_cidr = 200;
max_number = 3000;
sendq = 400 kbytes;
};
@ -116,17 +137,25 @@ class "server" {
};
listen {
/* defer_accept: wait for clients to send IRC handshake data before
* accepting them. if you intend to use software which depends on the
* server replying first, such as BOPM, you should disable this feature.
* otherwise, you probably want to leave it on. Disabling this will not
* update on a rehash.
*/
defer_accept = yes;
/* If you want to listen on a specific IP only, specify host.
* host definitions apply only to the following port line.
*/
#host = "192.169.0.1";
port = 5000, 6665 .. 6669;
sslport = 9999;
sslport = 6697;
/* Listen on IPv6 (if you used host= above). */
#host = "3ffe:1234:a:b:c::d";
#port = 5000, 6665 .. 6669;
#sslport = 9999;
#port = 5000, 6665 .. 6669;
#sslport = 9999;
};
/* auth {}: allow users to connect to the ircd (OLD I:)
@ -144,20 +173,35 @@ auth {
user = "*@172.16.0.0/12";
user = "*test@123D:B567:*";
/* auth_user: The username (authenticated via SASL or PASS) allowed
* to connect. You are able to put multiple auth_user lines. If people
* are authenticating via SASL in this way, it is recommended to comment
* out the password option below. You will also *NEED* to specify a user
* line above auth_user, this can safely be "*@*", however.
*/
auth_user = "jilles";
auth_user = "jdhore";
/* password: an optional password that is required to use this block.
* By default this is not encrypted, specify the flag "encrypted" in
* flags = ...; below if it is.
*/
password = "letmein";
/* spoof: fake the users user@host to be be this. You may either
* specify a host or a user@host to spoof to. This is free-form,
* just do everyone a favour and dont abuse it. (OLD I: = flag)
*/
spoof = "I.still.hate.packets";
/* autojoin: Channel (or channels, comma-seperated) to join users
* in this auth block to on connect. Note that this won't join
* the user through any bans or otherwise restrictive chmodes.
*/
autojoin = "#shadowircd,#test";
/* Possible flags in auth:
*
*
* encrypted | password is encrypted with mkpasswd
* spoof_notice | give a notice when spoofing hosts
* exceed_limit (old > flag) | allow user to exceed class user limits
@ -168,23 +212,65 @@ auth {
* jupe_exempt | exempt this user from generating
* warnings joining juped channels
* resv_exempt | exempt this user from resvs
* flood_exempt | exempt this user from flood limits
* USE WITH CAUTION.
* flood_exempt | exempt this user from flood limits
* USE WITH CAUTION.
* no_tilde (old - flag) | don't prefix ~ to username if no ident
* need_ident (old + flag) | require ident for user in this class
* need_ssl | require SSL/TLS for user in this class
* need_sasl | require SASL id for user in this class
*/
flags = kline_exempt, exceed_limit;
/* class: the class the user is placed in */
class = "opers";
};
/* Example WEBIRC authblock */
auth {
/* user: webirc@IP.OF.YOUR.WEBIRC . the webirc@ part is required */
user = "webirc@192.168.1.1";
/* password: password the webirc client sends in the WEBIRC command.
* You can use a encrypted password here (see above auth block).
*/
password = "<password>";
/* spoof: This is required to keep it what it is currently if you
* want the webirc client to show the users' real host as their
* host on IRC.
*/
spoof = "webirc.";
class = "users";
};
auth {
user = "*@*";
class = "users";
};
/* privset {} blocks MUST be specified before anything that uses them. That
* means they must be defined before operator {}.
*/
privset "local_op" {
privs = oper:local_kill, oper:operwall;
};
privset "server_bot" {
extends = "local_op";
privs = oper:kline, oper:remoteban, snomask:nick_changes;
};
privset "global_op" {
extends = "local_op";
privs = oper:global_kill, oper:routing, oper:kline, oper:unkline, oper:xline,
oper:resv, oper:mass_notice, oper:remoteban;
};
privset "admin" {
extends = "global_op";
privs = oper:admin, oper:die, oper:rehash, oper:spy, oper:override;
};
operator "god" {
/* name: the name of the oper must go above */
@ -195,13 +281,13 @@ operator "god" {
user = "*god@127.0.0.1";
/* password: the password required to oper. Unless ~encrypted is
* contained in flags = ...; this will need to be encrypted using
* contained in flags = ...; this will need to be encrypted using
* mkpasswd, MD5 is supported
*/
password = "etcnjl8juSU1E";
/* rsa key: the public key for this oper when using Challenge.
* A password should not be defined when this is used, see
* A password should not be defined when this is used, see
* doc/challenge.txt for more information.
*/
#rsa_public_key_file = "/usr/local/ircd/etc/oper.pub";
@ -212,47 +298,48 @@ operator "god" {
*/
#umodes = locops, servnotice, operwall, wallop;
/* fingerprint: if specified, the oper's client certificate
* fingerprint will be checked against the specified fingerprint
* below.
*/
#fingerprint = "c77106576abf7f9f90cca0f63874a60f2e40a64b";
/* snomask: specific server notice mask on oper up.
* If this is specified an oper will not be given oper_snomask.
*/
snomask = "+Zbfkrsuy";
/* privileges: controls the activities and commands an oper is
* allowed to do on the server. You may prefix an option with ~ to
* disable it, ie ~operwall
/* vhost: defines the vhost that this oper will get on oper up.
* this must be a valid hostmask. If this is specified the oper
* will not be given default_operhost.
*/
vhost = "is.an.oper";
/* swhois: defines an additional line that will be displayed
* whenever someone does /whois on the oper in question.
*/
swhois = "is wearing pants.";
/* operstring: defines a custom operstring for this oper,
* which will be shown in whois instead of default_operstring
* or default_adminstring.
*/
operstring = "is a lazy IRC Operator";
/* flags: misc options for the operator. You may prefix an option
* with ~ to disable it, e.g. ~encrypted.
*
* Default flags are operwall, remoteban and encrypted.
* Default flags are encrypted.
*
* Available options:
*
* encrypted: the password above is encrypted [DEFAULT]
* local_kill: allows local users to be /KILL'd
* global_kill: allows local and remote users to be
* /KILL'd (OLD 'O' flag)
* remote: allows remote SQUIT and CONNECT (OLD 'R' flag)
* kline: allows KLINE and DLINE (OLD 'K' flag)
* unkline: allows UNKLINE and UNDLINE (OLD 'U' flag)
* nick_changes: allows oper to see nickchanges (OLD 'N' flag)
* via snomask +n
* rehash: allows oper to REHASH config (OLD 'H' flag)
* die: allows DIE and RESTART (OLD 'D' flag)
* admin: gives admin privileges. admins
* may (un)load modules and see the
* real IPs of servers.
* hidden_admin: gives admin privileges except
* will not have the admin lines in
* stats p and whois.
* xline: allows use of /quote xline/unxline
* resv: allows /quote resv/unresv and cmode +LP [DEFAULT]
* operwall: allows the oper to send/receive operwalls [DEFAULT]
* oper_spy: allows 'operspy' features to see through +s
* channels etc. see /quote help operspy
* hidden_oper: hides the oper from /stats p (OLD UMODE +p)
* remoteban: allows remote kline etc [DEFAULT]
* mass_notice: allows sending wallops and mass notices [DEFAULT]
* need_ssl: must be using SSL/TLS to oper up
*/
flags = global_kill, remote, kline, unkline,
die, rehash, admin, xline, operwall;
flags = encrypted;
/* privset: privileges set to grant */
privset = "admin";
};
connect "irc.uplink.com" {
@ -264,6 +351,8 @@ connect "irc.uplink.com" {
class = "server";
flags = compressed, topicburst;
#fingerprint = "c77106576abf7f9f90cca0f63874a60f2e40a64b";
/* If the connection is IPv6, uncomment below.
* Use 0::1, not ::1, for IPv6 localhost. */
#aftype = ipv6;
@ -290,7 +379,7 @@ cluster {
shared {
oper = "*@*", "*";
flags = all, rehash;
flags = all;
};
/* exempt {}: IPs that are exempt from Dlines and rejectcache. (OLD d:) */
@ -299,21 +388,31 @@ exempt {
};
channel {
use_invex = yes;
use_except = yes;
#disabledmodes = "ME";
autochanmodes = "nt";
admin_on_channel_create = no;
exemptchanops = "NT";
use_halfop = yes;
use_admin = yes;
use_owner = yes;
use_knock = yes;
use_forward = yes;
use_local_channels = yes;
knock_delay = 5 minutes;
knock_delay_channel = 1 minute;
max_chans_per_user = 15;
max_bans = 100;
max_bans_large = 500;
max_bans = 100;
max_bans_large = 500;
default_split_user_count = 0;
default_split_server_count = 0;
no_create_on_split = no;
no_join_on_split = no;
burst_topicwho = yes;
kick_on_split_riding = no;
only_ascii_channels = no;
cycle_host_change = yes;
host_in_topic = yes;
resv_forcepart = yes;
channel_target_change = yes;
};
serverhide {
@ -325,10 +424,10 @@ serverhide {
/* These are the blacklist settings.
* You can have multiple combinations of host and rejection reasons.
* They are used in pairs of one host/rejection reason, or multiple hosts/rejection reason.
* They are used in pairs of one host/rejection reason.
*
* These settings should be adequate for most networks, and are (presently)
* required for use on AthemeNet.
* required for use on ShadowNet.
*
* Word to the wise: Do not use blacklists like SPEWS for blocking IRC
* connections.
@ -342,19 +441,16 @@ serverhide {
* ${nick} - the user's nickname
* ${network-name} - the name of the network
*
* Note: AHBL (the providers of the below *.ahbl.org BLs) request that they be
* contacted, via email, at admins@2mbit.com before using these BLs.
* See <http://www.ahbl.org/services.php> for more information.
*/
blacklist {
host = "rbl.efnetrbl.org";
reject_reason = "${nick}, your IP (${ip}) is listed in EFnet's RBL. For assistance, see http://efnetrbl.org/?i=${ip}";
host = "dnsbl.dronebl.org";
reject_reason = "${nick}, your IP (${ip}) is listed in DroneBL. For assistance, see http://dronebl.org/lookup_branded.do?ip=${ip}&network=${network-name}";
# host = "ircbl.ahbl.org";
# reject_reason = "${nick}, your IP (${ip}) is listed in ${dnsbl-host} for having an open proxy. In order to protect ${network-name} from abuse, we are not allowing connections with open proxies to connect.";
#
# host = "tor.ahbl.org";
# reject_reason = "${nick}, your IP (${ip}) is listed as a TOR exit node. In order to protect ${network-name} from tor-based abuse, we are not allowing TOR exit nodes to connect to our network.";
host = "torexit.dan.me.uk";
reject_reason = "${nick}, your IP (${ip}) is listed as a TOR exit node. In order to protect ${network-name} from TOR-based abuse, we are not allowing TOR exit nodes to connect to our network.";
};
alias "NickServ" {
@ -373,6 +469,22 @@ alias "MemoServ" {
target = "MemoServ";
};
alias "HostServ" {
target = "HostServ";
};
alias "BotServ" {
target = "BotServ";
};
alias "InfoServ" {
target = "InfoServ";
};
alias "GroupServ" {
target = "GroupServ";
};
alias "NS" {
target = "NickServ";
};
@ -389,34 +501,54 @@ alias "MS" {
target = "MemoServ";
};
alias "HS" {
target = "HostServ";
};
alias "BS" {
target = "BotServ";
};
alias "IS" {
target = "InfoServ";
};
alias "GS" {
target = "GroupServ";
};
general {
hide_error_messages = opers;
hide_spoof_ips = yes;
/*
* default_umodes: umodes to enable on connect.
* If you have enabled the ip_cloaking module, and you want
* to make use of it, add +h to this option, i.e.:
* default_umodes = "+ih";
* default umodes: umodes to set upon connection
* If you have enabled the ip_cloaking extension, and you wish for
* incoming clients to be cloaked upon connection, +x must be in
* the umode string below.
*/
default_umodes = "+i";
default_umodes = "+ix";
default_operstring = "is an IRC Operator";
default_adminstring = "is a Server Administrator";
#default_operhost = "staff.testnet.net";
#static_quit = "I like turtles!";
servicestring = "is a Network Service";
disable_fake_channels = no;
tkline_expire_notices = no;
default_floodcount = 10;
hide_channel_below_users = 3;
tkline_expire_notices = no;
default_floodcount = 10;
failed_oper_notice = yes;
dots_in_ident=2;
min_nonwildcard = 4;
min_nonwildcard_simple = 3;
max_accept = 100;
max_accept = 100;
max_monitor = 100;
anti_nick_flood = yes;
max_nick_time = 20 seconds;
max_nick_changes = 5;
anti_spam_exit_message_time = 5 minutes;
anti_spam_exit_message_time = 5 minutes;
use_part_messages = yes;
ts_warn_delta = 30 seconds;
ts_max_delta = 5 minutes;
client_exit = yes;
@ -430,6 +562,7 @@ general {
identify_command = "IDENTIFY";
non_redundant_klines = yes;
warn_no_nline = yes;
use_propagated_bans = yes;
stats_e_disabled = no;
stats_c_oper_only=no;
stats_h_oper_only=no;
@ -438,29 +571,35 @@ general {
stats_P_oper_only=no;
stats_i_oper_only=masked;
stats_k_oper_only=masked;
map_oper_only = no;
map_oper_only = no;
operspy_admin_only = no;
operspy_dont_care_user_info = no;
secret_channels_in_whois = no;
caller_id_wait = 1 minute;
pace_wait_simple = 1 second;
pace_wait = 10 seconds;
short_motd = no;
ping_cookie = no;
connect_timeout = 30 seconds;
default_ident_timeout = 5;
disable_auth = no;
no_oper_flood = yes;
true_no_oper_flood = no;
max_targets = 4;
client_flood = 20;
use_whois_actually = no;
use_whois_actually = no;
oper_only_umodes = operwall, locops, servnotice;
oper_umodes = locops, servnotice, operwall, wallop;
oper_snomask = "+s";
burst_away = yes;
burst_away = yes;
nick_delay = 0 seconds; # 15 minutes if you want to enable this
reject_ban_time = 1 minute;
reject_after_count = 3;
reject_duration = 5 minutes;
max_unknown_ip = 2;
throttle_duration = 60;
throttle_count = 4;
expire_override_time = 5 minutes;
away_interval = 30;
};
modules {

View File

@ -89,4 +89,3 @@ a +bqeI entry of the given extban type, and whenever a local client tries to
add such an entry. (Clients are allowed to add bans matching themselves.)
--
$Id: extban.txt 1639 2006-06-04 23:26:47Z jilles $

View File

@ -121,4 +121,3 @@ community.
"iorecv"
"iorecvctrl"
$Id: hooks.txt 3414 2007-04-15 16:54:50Z jilles $

View File

@ -1,5 +1,4 @@
# $Id: index.txt 6 2005-09-10 01:02:21Z nenolod $
Here is the overview of the documents in the doc/ directory.
CIDR.txt - Description of CIDR in IPv4

View File

@ -1,2 +1,2 @@
This is charybdis MOTD you might replace it, but if not your friends will
laugh at you.
This is the Elemental-IRCd MOTD. You can use this if you like;
but if you do, your teacher may send you to magic kindergarten.

View File

@ -1,5 +1,4 @@
ircd-ratbox logfiles - Lee H <lee -at- leeh.co.uk>
$Id: logfiles.txt 6 2005-09-10 01:02:21Z nenolod $
---------------------------
fname_killlog

View File

@ -215,4 +215,3 @@ which is ambiguous if the user may contain a [ and in the author's opinion ugly.
--
W. Campbell
updated by J. Tjoelker
$Id: modeg.txt 3556 2007-08-18 14:45:10Z jilles $

View File

@ -7,4 +7,3 @@ The sgml docs have more detailed descriptions.
User mode +h (hide hostname) is provided by contrib/ip_cloaking.so
Server notice mask +F (far connects) is provided by contrib/sno_farconnect.so
# $Id: modes.txt 996 2006-03-09 01:14:34Z jilles $

View File

@ -1,6 +1,5 @@
MONITOR - Protocol for notification of when clients become online/offline
Lee Hardy <lee -at- leeh.co.uk>
$Id: monitor.txt 3520 2007-06-30 22:15:35Z jilles $
-------------------------------------------------------------------------
Currently, ISON requests by clients use a large amount of bandwidth. It is

View File

@ -365,4 +365,3 @@ Vuurwerk Internet '|.|' PGP - 0xD68A7AAB
And on the seventh day, He exited from append mode.
# $Id: operguide.txt 6 2005-09-10 01:02:21Z nenolod $

1476
doc/reference.charybdis.conf Executable file

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,10 @@
/* doc/reference.conf - charybdis Example configuration file
/* doc/reference.conf - shadowircd Example configuration file
*
* Copyright (C) 2000-2002 Hybrid Development Team
* Copyright (C) 2002-2005 ircd-ratbox development team
* Copyright (C) 2005-2006 charybdis development team
*
* Written by ejb, wcampbel, db, leeh and others
* Written by ejb, wcampbel, db, leeh, Taros, jdhore and others
*
* $Id: reference.conf 3582 2007-11-17 21:55:48Z jilles $
*/
@ -18,6 +18,9 @@
* that matches a user will be used. So place spoofs first, then specials,
* then general access, then restricted.
*
* privset {} blocks MUST be specified before anything that uses them. That
* means they must be defined before operator {}.
*
* Both shell style (#) and C style comments are supported.
*
* Files may be included by either:
@ -38,9 +41,13 @@
/* Extensions:
*
* Charybdis contains several extensions that are not enabled by default.
* To use them, uncomment the lines below.
* ShadowIRCd contains several extensions that are not enabled by default.
* To use them, uncomment the lines below. More information on each extension
* can be found in extensions/README
*
* Channel mode +-A (admin only) -- chm_adminonly.so
* Channel mode +-O (oper only) -- chm_operonly.so
* Channel mode +-S (ssl only) -- chm_sslonly.so
* Emulates channel mode +-O (oper only) (+-iI $o) -- chm_operonly_compat.so
* Emulates channel mode +-R (quiet unreg) (+-q $~a) -- chm_quietunreg_compat.so
* Emulates channel mode +-S (ssl only) (+-b $~z) -- chm_sslonly_compat.so
@ -54,36 +61,62 @@
* Server bans (+b $s:mask) -- extb_server.so
* SSL bans (+b $z) -- extb_ssl.so
* HURT system -- hurt.so
* Host mangling (umode +h) -- ip_cloaking.so
* New host mangling (umode +x) -- ip_cloaking.so
* Find channel forwards -- m_findforwards.so
* /identify support -- m_identify.so
* /mkpassword support -- m_mkpasswd.so
* WEBIRC support -- m_webirc.so
* Server-side /CYCLE -- m_cycle.so
* /oaccept - add to target's accept list, oper only -- m_oaccept.so
* /opme - op self in opless channels, admin only -- m_opme.so
* /ojoin - join despite restrictions, admin only -- m_ojoin.so
* /omode - force modes in channels, admin only -- m_omode.so
* /olist - see all channels in /list, oper only -- m_olist.so
* /okick - kick users without having ops, oper only -- m_okick.so
* /forcejoin - force join users, admin only -- m_force.so
* roleplay commands - send msgs from fake users -- m_roleplay.so
* Opers cannot be invisible (umode +i) -- no_oper_invis.so
* Far connection notices (snomask +F) -- sno_farconnect.so
* Remote k/d/x line active notices -- sno_globalkline.so
* Remote oper up notices -- sno_globaloper.so
* /whois notifications (snomask +W) -- sno_whois.so
*/
#loadmodule "extensions/chm_adminonly.so";
loadmodule "extensions/chm_operonly.so";
#loadmodule "extensions/chm_sslonly.so";
#loadmodule "extensions/chm_operonly_compat.so";
#loadmodule "extensions/chm_quietunreg_compat.so";
#loadmodule "extensions/chm_sslonly_compat.so";
#loadmodule "extensions/createauthonly.so";
#loadmodule "extensions/extb_account.so";
#loadmodule "extensions/extb_canjoin.so";
#loadmodule "extensions/extb_channel.so";
#loadmodule "extensions/extb_extgecos.so";
#loadmodule "extensions/extb_oper.so";
#loadmodule "extensions/extb_realname.so";
loadmodule "extensions/extb_account.so";
loadmodule "extensions/extb_canjoin.so";
loadmodule "extensions/extb_channel.so";
loadmodule "extensions/extb_extgecos.so";
loadmodule "extensions/extb_oper.so";
loadmodule "extensions/extb_realname.so";
#loadmodule "extensions/extb_server.so";
#loadmodule "extensions/extb_ssl.so";
#loadmodule "extensions/hurt.so";
#loadmodule "extensions/ip_cloaking.so";
loadmodule "extensions/ip_cloaking.so";
#loadmodule "extensions/m_findforwards.so";
#loadmodule "extensions/m_identify.so";
loadmodule "extensions/m_identify.so";
loadmodule "extensions/m_mkpasswd.so";
loadmodule "extensions/m_webirc.so";
#loadmodule "extensions/m_cycle.so";
#loadmodule "extensions/m_oaccept.so";
#loadmodule "extensions/m_opme.so";
#loadmodule "extensions/m_ojoin.so";
#loadmodule "extensions/m_omode.so";
#loadmodule "extensions/m_olist.so";
#loadmodule "extensions/m_okick.so";
#loadmodule "extensions/m_force.so";
#loadmodule "extensions/m_roleplay.so";
#loadmodule "extensions/no_oper_invis.so";
#loadmodule "extensions/sno_farconnect.so";
#loadmodule "extensions/sno_globalkline.so";
#loadmodule "extensions/sno_globaloper.so";
loadmodule "extensions/sno_farconnect.so";
loadmodule "extensions/sno_globalkline.so";
loadmodule "extensions/sno_globaloper.so";
#loadmodule "extensions/sno_whois.so";
/* serverinfo {}: Contains information about the server. (OLD M:) */
serverinfo {
@ -101,7 +134,7 @@ serverinfo {
/* description: the description of our server. '[' and ']' may not
* be used here for compatibility with older servers.
*/
description = "charybdis test server";
description = "shadowircd test server";
/* network info: the name and description of the network this server
* is on. Shown in the 005 reply and used with serverhiding.
@ -109,6 +142,14 @@ serverinfo {
network_name = "MyNet";
network_desc = "This is My Network";
/* helpchan/helpurl: These 2 items are shown when a user does
* /quote help with no additional parameters to direct them
* to a channel/URL where they can get more or network-specific help.
* They can be commented out and will not show to users if they are.
*/
helpchan = "#help";
helpurl = "http://www.mynet.net/help";
/* hub: allow this server to act as a hub and have multiple servers
* connected to it.
*/
@ -125,16 +166,19 @@ serverinfo {
#vhost6 = "3ffe:80e8:546::2";
/* ssl_private_key: our ssl private key */
ssl_private_key = "etc/test.key";
ssl_private_key = "etc/ssl.key";
/* ssl_cert: certificate for our ssl server */
ssl_cert = "etc/test.cert";
ssl_cert = "etc/ssl.cert";
/* ssl_dh_params: DH parameters, generate with openssl dhparam -out dh.pem 1024 */
ssl_dh_params = "etc/dh.pem";
/* ssld_count: number of ssld processes you want to start, if you have a really busy
* server, using N-1 where N is the number of cpu/cpu cores you have might be useful
/* ssld_count: number of ssld processes you want to start, if you
* have a really busy server, using N-1 where N is the number of
* cpu/cpu cores you have might be useful. A number greater than one
* can also be useful in case of bugs in ssld and because ssld needs
* two file descriptors per SSL connection.
*/
ssld_count = 1;
@ -204,19 +248,19 @@ class "users" {
*/
number_per_ip_global = 5;
/* cidr_bitlen: Limits numbers of connections from a subnet size
/* cidr_ipv4_bitlen: Limits numbers of connections from a subnet size
*/
cidr_ipv4_bitlen = 24;
/* cidr_ipv6_bitlen: Limits numbers of connections from a subnet size
* the following example makes the subnet /64 this is useful
* for IPv6 connections in particular
* Also note that the way charybdis is written if you have
* compiled support for IPv6, IPv4 cidr bitlens need to be modified
* Basically to get the approriate length add 96 to the IPv4 length
* For example for a /24 do 96+24 = 120
*
*/
cidr_bitlen = 64;
cidr_ipv6_bitlen = 64;
/* number_per_cidr: Number of connections to allow from a subnet of the
* size given in cidr_bitlen. 4 seems to be a good default to me.
* size given in cidr_ipv4_bitlen/cidr_ipv6_bitlen.
* 4 seems to be a good default to me.
*/
number_per_cidr = 4;
@ -260,6 +304,13 @@ class "server" {
/* listen {}: contain information about the ports ircd listens on (OLD P:) */
listen {
/* defer_accept: wait for clients to send IRC handshake data before
* accepting them. if you intend to use software which depends on the
* server replying first, such as BOPM, you should disable this feature.
* otherwise, you probably want to leave it on.
*/
defer_accept = yes;
/* port: the specific port to listen on. if no host is specified
* before, it will listen on all available IPs.
*
@ -298,6 +349,15 @@ auth {
user = "*@172.16.0.0/12";
user = "*test@123D:B567:*";
/* auth_user: The username (authenticated via SASL or PASS) allowed
* to connect. You are able to put multiple auth_user lines. If people
* are authenticating via SASL in this way, it is recommended to comment
* out the password option below. You will also *NEED* to specify a user
* line above auth_user, this can safely be "*@*", however.
*/
auth_user = "jilles";
auth_user = "jdhore";
/* password: an optional password that is required to use this block.
* By default this is not encrypted, specify the flag "encrypted" in
* flags = ...; below if it is.
@ -310,6 +370,12 @@ auth {
*/
spoof = "I.still.hate.packets";
/* autojoin: Channel (or channels, comma-seperated) to join users
* in this auth block to on connect. Note that this won't join
* the user through any bans or otherwise restrictive chmodes.
*/
autojoin = "#shadowircd,#test";
/* Possible flags in auth:
*
* encrypted | password is encrypted with mkpasswd
@ -326,6 +392,7 @@ auth {
* USE WITH CAUTION.
* no_tilde (old - flag) | don't prefix ~ to username if no ident
* need_ident (old + flag) | require ident for user in this class
* need_ssl | require SSL/TLS for user in this class
* need_sasl | require SASL id for user in this class
*/
flags = kline_exempt, exceed_limit;
@ -334,6 +401,24 @@ auth {
class = "opers";
};
/* Example WEBIRC authblock */
auth {
/* user: webirc@IP.OF.YOUR.WEBIRC . the webirc@ part is required */
user = "webirc@192.168.1.1";
/* password: password the webirc client sends in the WEBIRC command.
* You can use a encrypted password here (see above auth block).
*/
password = "<password>";
/* spoof: This is required to keep it what it is currently if you
* want the webirc client to show the users' real host as their
* host on IRC.
*/
spoof = "webirc.";
class = "users";
};
auth {
/* redirect: the server and port to redirect a user to. A user does
* not have to obey the redirection, the ircd just suggests to them
@ -355,10 +440,60 @@ auth {
flags = need_ident;
};
/* operator {}: defines ircd operators. (OLD O:)
* charybdis no longer supports local operators, privileges are
* controlled via flags.
*/
/* privset{}: defines operator privilege sets. */
privset "local_op" {
/* privs: controls the activities and commands an oper is
* allowed to do on the server
*
* Available options:
*
* oper:local_kill: allows local users to be /KILL'd
* oper:global_kill: allows local and remote users to be /KILL'd
* oper:routing: allows remote SQUIT and CONNECT
* oper:kline: allows KLINE and DLINE
* oper:unkline: allows UNKLINE and UNDLINE
* snomask:nick_changes: allows oper to see nickchanges via snomask +n
* oper:rehash: allows oper to REHASH config
* oper:die: allows DIE and RESTART
* oper:admin: gives admin privileges. admins
* may (un)load modules and see various
* additional information.
* oper:hidden_admin: gives admin privileges except
* will not have the admin lines in
* whois.
* oper:xline: allows use of /quote xline/unxline
* oper:resv: allows /quote resv/unresv and cmode +LP
* oper:operwall: allows the oper to send/receive operwalls
* oper:override: allows the oper to set umode +p on themself
which grants the ability to have implicit
operator access in all channels.
* oper:spy: allows 'operspy' features to see through +s
* channels etc. see /quote help operspy
* oper:hidden: hides the oper from /stats p
* oper:remoteban: allows remote kline etc
* oper:mass_notice: allows sending wallops and mass notices
*/
privs = oper:local_kill, oper:operwall;
};
privset "server_bot" {
/* extends: a privset to inherit in this privset */
extends = "local_op";
privs = oper:kline, oper:remoteban, snomask:nick_changes;
};
privset "global_op" {
extends = "local_op";
privs = oper:global_kill, oper:routing, oper:kline, oper:unkline, oper:xline,
oper:resv, oper:mass_notice, oper:remoteban;
};
privset "admin" {
extends = "global_op";
privs = oper:admin, oper:die, oper:rehash, oper:spy, oper:override;
};
/* operator {}: defines ircd operators. (OLD O:) */
operator "god" {
/* name: the name of the oper must go above */
@ -381,6 +516,12 @@ operator "god" {
*/
#rsa_public_key_file = "/usr/local/ircd/etc/oper.pub";
/* fingerprint: if specified, the oper's client certificate
* fingerprint will be checked against the specified fingerprint
* below.
*/
#fingerprint = "c77106576abf7f9f90cca0f63874a60f2e40a64b";
/* umodes: the specific umodes this oper gets when they oper.
* If this is specified an oper will not be given oper_umodes
* These are described above oper_only_umodes in general {};
@ -390,44 +531,39 @@ operator "god" {
/* snomask: specific server notice mask on oper up.
* If this is specified an oper will not be given oper_snomask.
*/
snomask = "+Zbfkrsuy";
snomask = "+FZbcfkrsuy";
/* privileges: controls the activities and commands an oper is
* allowed to do on the server. You may prefix an option with ~ to
* disable it, ie ~operwall
/* vhost: defines the vhost that this oper will get on oper up.
* this must be a valid hostmask. If this is specified the oper
* will not be given default_operhost.
*/
vhost = "is.an.oper";
/* swhois: defines an additional line that will be displayed
* whenever someone does /whois on the oper in question.
*/
swhois = "is wearing pants.";
/* operstring: defines a custom operstring for this oper,
* which will be shown in whois instead of default_operstring
* or default_adminstring.
*/
operstring = "is a lazy IRC Operator";
/* flags: misc options for the operator. You may prefix an option
* with ~ to disable it, e.g. ~encrypted.
*
* Default flags are operwall, remoteban and encrypted.
* Default flags are encrypted.
*
* Available options:
*
* encrypted: the password above is encrypted [DEFAULT]
* local_kill: allows local users to be /KILL'd
* global_kill: allows local and remote users to be
* /KILL'd (OLD 'O' flag)
* remote: allows remote SQUIT and CONNECT (OLD 'R' flag)
* kline: allows KLINE and DLINE (OLD 'K' flag)
* unkline: allows UNKLINE and UNDLINE (OLD 'U' flag)
* nick_changes: allows oper to see nickchanges (OLD 'N' flag)
* via snomask +n
* rehash: allows oper to REHASH config (OLD 'H' flag)
* die: allows DIE and RESTART (OLD 'D' flag)
* admin: gives admin privileges. admins
* may (un)load modules and see the
* real IPs of servers.
* hidden_admin: gives admin privileges except
* will not have the admin lines in
* stats p and whois.
* xline: allows use of /quote xline/unxline
* resv: allows /quote resv/unresv and cmode +LP [DEFAULT]
* operwall: allows the oper to send/receive operwalls [DEFAULT]
* oper_spy: allows 'operspy' features to see through +s
* channels etc. see /quote help operspy
* hidden_oper: hides the oper from /stats p (OLD UMODE +p)
* remoteban: allows remote kline etc [DEFAULT]
* mass_notice: allows sending wallops and mass notices [DEFAULT]
* need_ssl: must be using SSL/TLS to oper up
*/
flags = global_kill, remote, kline, unkline,
die, rehash, admin, xline, operwall;
flags = encrypted;
/* privset: privileges set to grant */
privset = "admin";
};
/* connect {}: controls servers we connect to (OLD C:, N:, H:, L:) */
@ -450,6 +586,12 @@ connect "irc.uplink.com" {
send_password = "password";
accept_password = "anotherpassword";
/* fingerprint: if specified, the server's client certificate
* fingerprint will be checked against the specified fingerprint
* below.
*/
#fingerprint = "c77106576abf7f9f90cca0f63874a60f2e40a64b";
/* port: the port to connect to this server on */
port = 6666;
@ -577,9 +719,11 @@ shared {
* resv - allow setting perm/temp resvs
* tresv - allow setting temp resvs
* unresv - allow removing xlines
* rehash - allow rehashing
* all - allow oper/server to do all of above.
* locops - allow locops - only used for servers who cluster
* rehash - allow rehashing
* die - allow restarting/dying of servers
* modules - allow loading/unloading/reloading of modules
* dline - allow setting perm/temp dlines
* tdline - allow setting temp dlines
* undline - allow removing dlines
@ -615,20 +759,62 @@ exempt {
/* The channel block contains options pertaining to channels */
channel {
/* invex: Enable/disable channel mode +I, a n!u@h list of masks
* that can join a +i channel without an invite.
/* disabledmodes: Modes that will be disabled, users will not be
* able to set them. This is only read on startup, you need to
* restart the ircd for this to have any effect. This only prevents
* local users/opers from setting these modes. This does not prevent
* remote servers/users (ex: services) from setting them. Make sure
* your services and remote servers are properly configured when
* using this option!
* Valid parameters are: CLPFQITDENGJKMrczgqefj
*/
use_invex = yes;
#disabledmodes = "ME";
/* except: Enable/disable channel mode +e, a n!u@h list of masks
* that can join a channel through a ban (+b).
/* autochanmodes: Modes that will be set on a unregistered channel
* when the first user joins it.
*/
use_except = yes;
autochanmodes = "nt";
/* forward: Enable/disable channel mode +f, a channel to forward
* users to if they can't join because of +i etc.
/* admin_on_channel_create: If set to yes, users joining new channels
* will be given +ao instead of just +o. Requires use_admin.
*/
use_forward = yes;
admin_on_channel_create = no;
/* exemptchanops: Channel modes that any form of channel ops (+aoh)
* will be exempt from. Even if the mode is set, it will not apply to the
* channel ops if it is listed in this option. Valid modes are cCDTNGK.
*/
exemptchanops = "NT";
/* halfop: Enable/disable channel mode +h, which adds halfop,
* a channel status below op that has op powers (kick, ban, mode, etc.)
* halfops can only kick/devoice/etc people who are +v or
* do not have any channel status. Disabling this via rehash will
* cause things which are rather confusing to occur, it is highly
* recommended to restart if you wish to disable this option, though
* it may be enabled by rehash with no problems.
*/
use_halfop = yes;
/* admin: Enable/disable channel mode +a, which adds admin,
* a channel status above op that has op powers (kick, ban, mode, etc.)
* admins can only be kicked/deadmined by other admins, and may kick
* or deop anyone. Disabling this via rehash will cause things which
* are rather confusing to occur, it is highly recommended to restart
* if you wish to disable this option, though it may be enabled
* by rehash with no problems.
*/
use_admin = yes;
/* owner: Enable/disable channel mode +y, which adds owner,
* a channel status above admin that has op powers (kick, ban, mode, etc.)
* owners can only be kicked/deadmined by other owners, and may kick
* or deop anyone. Disabling this via rehash will cause things which
* are rather confusing to occur, it is highly recommended to restart
* if you wish to disable this option, though it may be enabled
* by rehash with no problems.
*/
use_owner = yes;
/* knock: Allows users to request an invite to a channel that
* is locked somehow (+ikl). If the channel is +p or you are banned
@ -636,6 +822,12 @@ channel {
*/
use_knock = yes;
/* local channels: &Channel - a channel that exists only on one server
* people on other servers will not be able to see or join local channels
* from another server.
*/
use_local_channels = yes;
/* knock delay: The amount of time a user must wait between issuing
* the knock command.
*/
@ -650,7 +842,7 @@ channel {
max_chans_per_user = 15;
/* max bans: maximum number of +b/e/I/q modes in a channel */
max_bans = 25;
max_bans = 100;
/* max bans: maximum number of +b/e/I/q modes in a +L channel */
max_bans_large = 500;
@ -698,6 +890,35 @@ channel {
* ratbox-services does.
*/
kick_on_split_riding = no;
/* only ascii channels: disable local users joining channels
* containing characters outside the range 33-126 (non-printable
* or non-ASCII).
*/
only_ascii_channels = no;
/* cycle_host_change: Should a user be cycled in the channels
* they're in when their host changes. If set to no, this may
* cause client desyncs.
*/
cycle_host_change = yes;
/* host_in_topic: Defines whether or not the topicsetter's
* host is shown when users request the TOPIC. If this option
* is set to no, it will only show the nick of the topicsetter.
*/
host_in_topic = yes;
/* resv_forcepart: force any local users to part a channel
* when a RESV is issued.
*/
resv_forcepart = yes;
/* channel target change: restrict how many channels users can
* message per unit of time. IRC operators, channel operators and
* voiced users are exempt.
*/
channel_target_change = yes;
};
@ -705,7 +926,7 @@ channel {
serverhide {
/* flatten links: this option will hide various routing information
* and make all servers in /links appear that they are linked to
* this server.
* this server. This option also disallows non-opers from using /map
*/
flatten_links = no;
@ -727,7 +948,7 @@ serverhide {
/* These are the blacklist settings.
* You can have multiple combinations of host and rejection reasons.
* They are used in pairs of one host/rejection reason, or multiple hosts/rejection reason.
* They are used in pairs of one host/rejection reason.
*
* These settings should be adequate for most networks, and are (presently)
* required for use on AthemeNet.
@ -744,19 +965,13 @@ serverhide {
* ${nick} - the user's nickname
* ${network-name} - the name of the network
*
* Note: AHBL (the providers of the below *.ahbl.org BLs) request that they be
* contacted, via email, at admins@2mbit.com before using these BLs.
* See <http://www.ahbl.org/services.php> for more information.
*/
blacklist {
host = "rbl.efnetrbl.org";
reject_reason = "${nick}, your IP (${ip}) is listed in EFnet's RBL. For assistance, see http://efnetrbl.org/?i=${ip}";
host = "dnsbl.dronebl.org";
reject_reason = "${nick}, your IP (${ip}) is listed in DroneBL. For assistance, see http://dronebl.org/lookup_branded.do?ip=${ip}&network=${network-name}";
# host = "ircbl.ahbl.org";
# reject_reason = "${nick}, your IP (${ip}) is listed in ${dnsbl-host} for having an open proxy. In order to protect ${network-name} from abuse, we are not allowing connections with open proxies to connect.";
#
# host = "tor.ahbl.org";
# reject_reason = "${nick}, your IP (${ip}) is listed as a TOR exit node. In order to protect ${network-name} from tor-based abuse, we are not allowing TOR exit nodes to connect to our network.";
};
/*
@ -787,6 +1002,22 @@ alias "MemoServ" {
target = "MemoServ";
};
alias "HostServ" {
target = "HostServ";
};
alias "BotServ" {
target = "BotServ";
};
alias "InfoServ" {
target = "InfoServ";
};
alias "GroupServ" {
target = "GroupServ";
};
alias "NS" {
target = "NickServ";
};
@ -803,6 +1034,22 @@ alias "MS" {
target = "MemoServ";
};
alias "HS" {
target = "HostServ";
};
alias "BS" {
target = "BotServ";
};
alias "IS" {
target = "InfoServ";
};
alias "GS" {
target = "GroupServ";
};
/* The general block contains many of the options that were once compiled
* in options in config.h. The general block is read at start time.
*/
@ -829,10 +1076,10 @@ general {
/* default umodes: umodes to set upon connection
* If you have enabled the ip_cloaking extension, and you wish for
* incoming clients to be set +h upon connection, add +h to the umode
* string below.
* incoming clients to be cloaked upon connection, +x must be in
* the umode string below.
*/
default_umodes = "+i";
default_umodes = "+ix";
/* default operstring: defines the default oper response
* in /whois queries, eg "is an IRC Operator".
@ -846,6 +1093,18 @@ general {
*/
default_adminstring = "is a Server Administrator";
/* default operhost: defines the default virtual host that
* operators will receiving upon opering up. Can be overriden
* by the vhost option in individual operator blocks. This
* must be a valid hostmask.
*/
default_operhost = "staff.testnet.net";
/* static quit: Quit message to display for all users (not opers)
* on QUIT.
*/
#static_quit = "I like turtles!";
/* servicestring: defines the response for opered services (+S)
* in /whois queries, eg "is a Network Service".
* This is updated on rehash.
@ -858,6 +1117,12 @@ general {
*/
disable_fake_channels = no;
/* hide_channel_below_users: Amount of users a channel must have in it
* before it is shown in a standard LIST. This can be overridden by
* invoking LIST like: /LIST <3
*/
hide_channel_below_users = 3;
/* tkline_expire_notices: give a notice to opers when a tkline
* expires
*/
@ -891,7 +1156,7 @@ general {
*/
min_nonwildcard_simple = 3;
/* max accept: maximum allowed /accept's for +g usermode */
/* max accept: maximum allowed /accept's for +gGR usermodes */
max_accept = 20;
/* max monitor: the maximum amount of nicknames a client may have in
@ -906,10 +1171,16 @@ general {
max_nick_time = 20 seconds;
max_nick_changes = 5;
/* anti spam time: the minimum time a user must be connected before
/* anti spam time: the minimum time a user must be connected before
* custom quit messages are allowed.
*/
anti_spam_exit_message_time = 5 minutes;
anti_spam_exit_message_time = 5 minutes;
/* use part messages: This option controls whether users should be
* allowed to send PART messages to channels. It should probably
* be set to no if static_quit is set.
*/
use_part_messages = yes;
/* ts delta: the time delta allowed between server clocks before
* a warning is given, or before the link is dropped. all servers
@ -954,7 +1225,7 @@ general {
/* kline reason: make the users quit message on channels this
* reason instead of the oper's reason.
*/
kline_reason = "Connection closed";
kline_reason = "K-Lined";
/* identify to services via server password
* if auth{} block had no password but the user specified a
@ -973,6 +1244,13 @@ general {
*/
warn_no_nline = yes;
/* use propagated bans: KLINE, XLINE and RESV set fully propagated bans.
* That means the bans are part of the netburst and restarted/split
* servers will get them, but they will not apply to 3.2 and older
* servers at all.
*/
use_propagated_bans = yes;
/* stats e disabled: disable stats e. useful if server ips are
* exempted and you dont want them listing on irc.
*/
@ -1022,6 +1300,12 @@ general {
* protected. */
operspy_dont_care_user_info = no;
/* secret channels in whois: display secret channels in /whois
* even if operspy was not used, as long as the oper doing the
* whois has the oper:spy priv. this will not send any kind of
* server notice. */
secret_channels_in_whois = no;
/* caller id wait: time between notifying a +g user that somebody
* is messaging them.
*/
@ -1052,12 +1336,29 @@ general {
*/
connect_timeout = 30 seconds;
/* ident timeout: Amount of time (in seconds) that the IRCd will
* wait for a user to respond to an ident request.
*/
default_ident_timeout = 5;
/* disable auth: disables identd checking */
disable_auth = no;
/* no oper flood: increase flood limits for opers. */
/* no oper flood: increase flood limits for opers.
* This option quadruples the user command flood limits, it
* DOES NOT affect PRIVMSG/NOTICE usage.
*/
no_oper_flood = yes;
/* true no oper flood: Allow opers to NEVER hit flood limits.
* With the above setting, flood limits are set to 4x what they
* are for normal users. With this setting, they're removed entirely.
* For this setting to work, you need to have no_oper_flood enabled as well.
* This option DOES allow PRIVMSG/NOTICE flooding.
* ENABLE THIS SETTING WITH CAUTION.
*/
true_no_oper_flood = no;
/* REMOVE ME. The following line checks you've been reading. */
havent_read_conf = yes;
@ -1088,6 +1389,11 @@ general {
* +s - servnotice - See server notices
* +w - wallop - See oper and server generated WALLOPS
* +z - operwall - See operwalls
* +C - noctcp - Block CTCPs to user.
* +V - noinvite - Block INVITE to user.
* +B - bot - Marks as a bot.
* +p - override - Implicit operator access in all channels.
* This is oper-only and requires the oper:override priv.
*/
/* oper only umodes: usermodes only opers may set */
@ -1100,13 +1406,6 @@ general {
* provided they have umode +s set */
oper_snomask = "+s";
/* servlink path: path to 'servlink' program used by ircd to handle
* encrypted/compressed server <-> server links.
*
* only define if servlink is not in same directory as ircd itself.
*/
#servlink_path = "/usr/local/ircd/bin/servlink";
/* use egd: if your system does not have *random devices yet you
* want to use OpenSSL and encrypted links, enable this. Beware -
* EGD is *very* CPU intensive when gathering data for its pool
@ -1153,10 +1452,25 @@ general {
/* reject duration: the amount of time to cache the rejection */
reject_duration = 5 minutes;
/* max_unknown_ip: maximum number of pending connections to the server
* that are allowed per IP address
/* throttle_duration: Amount of time that throttling will be applied to an IP
* address.
*/
max_unknown_ip = 2;
throttle_duration = 60;
/* throttle_count: Number of connections within throttle_duration that it takes
* for throttling to take effect */
throttle_count = 4;
/* expire_override_time: User mode +p will be automatically unset
* this long after it is set. 0 disables this. Default is 5 minutes.
*/
expire_override_time = 5 minutes;
/* away_interval: the minimum interval between AWAY commands. One
* additional AWAY command is allowed, and only marking as away
* counts.
*/
away_interval = 30;
};
modules {

View File

@ -116,4 +116,3 @@ See also http://sasl.charybdis.be/ and
http://wiki.atheme.net/index.php/PR:SASL_Authentication (these links are
currently dead but may be resurrected in the future).
$Id: sasl.txt 3169 2007-01-28 22:13:18Z jilles $

View File

@ -42,9 +42,6 @@ following features to ircd:
When users are logged in, WHOIS will also give numeric 330:
:<server> 330 <yournick> <targetnick> <loginname> :is logged in as
Note this needs to be a remote whois to work when the target is
on a different server.
6. Forced nick change
When using nickname services and a client requests they regain a
@ -52,4 +49,14 @@ following features to ircd:
This forcibly changes the clients nickname to the one they requested
they regain, ensuring they can always regain their nickname.
# $Id: services.txt 6 2005-09-10 01:02:21Z nenolod $
7. User mode +R
This user mode will require users are logged in with user services
before they may send private messages or notices to the user.
As with user mode +g, IRC operators and accepted users can send even
if they are not logged in.
Gives numeric 486 to users sending a PRIVMSG who are not logged in:
:<server> 486 <nick> <targetnick> :You must log in with services to message this user

View File

@ -9,7 +9,7 @@
]>
<book id="charybdis-oper-guide">
<bookinfo>
<date>24 November 2005</date>
<date>2009</date>
<title>Operators guide for the charybdis IRC server</title>
<author>
<firstname>William</firstname>
@ -20,7 +20,7 @@
<surname>Tjoelker</surname>
</author>
<copyright>
<year>2005-2008</year>
<year>2005-2009</year>
<holder>William Pitcock and Jilles Tjoelker</holder>
</copyright>
<legalnotice>

View File

@ -296,11 +296,11 @@
<sect2>
<title>+z, reduced moderation</title>
<para>
When +z is set, the effects of +m are relaxed. For each message, if that message
would normally be blocked by moderation, it is instead sent to all channel operators. This is intended for use in moderated debates.
When +z is set, the effects of +m, +b and +q are relaxed. For each message, if that message
would normally be blocked by one of these modes, it is instead sent to all channel operators. This is intended for use in moderated debates.
</para>
<para>
Note that +n and channel bans/quiets are unaffected by this. To silence a given user completely,
Note that +n is unaffected by this. To silence a given user completely,
remove them from the channel.
</para>
</sect2>

View File

@ -4,7 +4,9 @@
<title>Network management commands</title>
<note>
<para>
Except STATS letters, all commands and names are case insensitive.
All commands and names are case insensitive.
Parameters consisting of one or more separate letters,
such as in MODE, STATS and WHO, are case sensitive.
</para>
</note>
<sect2>
@ -20,6 +22,10 @@
<replaceable class=parameter>source</replaceable> is given, tell that server to initiate the connection
attempt, otherwise it will be made from the server you are attached to.
</para>
<para>
To use the default port with <replaceable class=parameter>source</replaceable>,
specify 0 for <replaceable class=parameter>port</replaceable>.
</para>
</sect2>
<sect2>
<title>SQUIT</title>
@ -152,66 +158,144 @@
<cmdsynopsis>
<command>SET</command>
<group>
<arg>LOG</arg>
<arg>ADMINSTRING</arg>
<arg>AUTOCONN</arg>
<arg>AUTOCONNALL</arg>
<arg>FLOODCOUNT</arg>
<arg>IDENTTIMEOUT</arg>
<arg>MAX</arg>
<arg>SPLITDELAY</arg>
<arg>SMALLNET</arg>
<arg>OPERSTRING</arg>
<arg>SPAMNUM</arg>
<arg>SPAMTIME</arg>
<arg>SPLITMODE</arg>
<arg>SPLITNUM</arg>
<arg>SPLITUSERS</arg>
</group>
<arg choice=plain><replaceable>value</replaceable></arg>
</cmdsynopsis>
<para>The SET command sets a runtime-configurable value</para>
<para>The SET command sets a runtime-configurable value.</para>
<para>
Most of the <filename>ircd.conf</filename> equivalents have
a default_ prefix and are only read on startup. SET is the only
way to change these at run time.
</para>
<para>
Most of the values can be queried by omitting
<replaceable>value</replaceable>.
</para>
<variablelist>
<varlistentry>
<term>LOG</term>
<listitem>
<para>Logging level for ircd.log and syslog</para>
</listitem>
<term>ADMINSTRING</term>
<listitem><para>
Sets string shown in WHOIS for admins.
(umodes +o and +a set, umode +S not set).
</para></listitem>
</varlistentry>
<varlistentry>
<term>AUTOCONN</term>
<listitem><para>
Sets auto-connect on or off for a particular server.
Takes two parameters, server name and new state.
</para><para>
To see these values, use /stats c.
Changes to this are lost on a rehash.
</para></listitem>
</varlistentry>
<varlistentry>
<term>AUTOCONNALL</term>
<listitem><para>
Globally sets auto-connect on or off. If disabled, no automatic
connections are done; if enabled, automatic connections are done
following the rules for them.
</para></listitem>
</varlistentry>
<varlistentry>
<term>FLOODCOUNT</term>
<listitem><para>
The number of lines allowed to be sent to a connection before
throttling it due to flooding.
Note that this variable is used for both
channels and clients.
</para><para>
For channels, op or voice overrides this; for users, IRC
operator status or op or voice on a common channel overrides
this.
</para></listitem>
</varlistentry>
<varlistentry>
<term>IDENTTIMEOUT</term>
<listitem><para>
Timeout for requesting ident from a client.
</para></listitem>
</varlistentry>
</variablelist>
<variablelist>
<varlistentry>
<term>MAX</term>
<listitem>
<para>Set the maximum connections allowed (may not exceed the compiled-in value HARD_FDLIMIT)</para>
</listitem>
<listitem><para>
Sets the maximum number of connections
to <replaceable>value</replaceable>.
</para><para>
This number cannot exceed maxconnections - MAX_BUFFER.
maxconnections is the rlimit for number of open files.
MAX_BUFFER is defined in config.h, normally 60.
</para><para>
MAXCLIENTS is an alias for this.
</para></listitem>
</varlistentry>
<varlistentry>
<term>DRONETIME</term>
<listitem>
<para>Number of seconds in which DRONECOUNT messages must occur to trip the drone alarm</para>
</listitem>
</varlistentry>
<varlistentry>
<term>DRONECOUNT</term>
<listitem>
<para>Number of messages which constitutes a drone flood. 0 disables drone flood checking.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>SPLITDELAY</term>
<listitem>
<para>Number of minutes after a connect burst begins until joining an empty channel will give you ops</para>
</listitem>
</varlistentry>
<varlistentry>
<term>SMALLNET</term>
<listitem>
<para>Sets the number of servers which are needed to constitute <quote>attached to the network</quote>, as opposed to <quote>split</quote></para>
</listitem>
<term>OPERSTRING</term>
<listitem><para>
Sets string shown in WHOIS for opers
(umode +o set, umodes +a and +S not set).
</para></listitem>
</varlistentry>
<varlistentry>
<term>SPAMNUM</term>
<listitem>
<para>Sets the number of JOINs/PARTs which constitutes a possible spambot</para>
</listitem>
<listitem><para>
Sets how many join/parts to channels
constitutes a possible spambot.
</para></listitem>
</varlistentry>
<varlistentry>
<term>SPAMTIME</term>
<listitem>
<para>Staying on a channel for less than this length of time adds to the SPAMNUM count</para>
</listitem>
<listitem><para>
Below this time on a channel
counts as a join/part as above.
</para></listitem>
</varlistentry>
<varlistentry>
<term>SPLITMODE</term>
<listitem><para>
Sets splitmode to <replaceable>value</replaceable>:
<variablelist>
<varlistentry>
<term>ON</term>
<listitem><para>splitmode is permanently on</para></listitem>
</varlistentry>
<varlistentry>
<term>OFF</term>
<listitem><para>splitmode is permanently off (default if no_create_on_split and no_join_on_split are disabled)</para></listitem>
</varlistentry>
<varlistentry>
<term>AUTO</term>
<listitem><para>ircd chooses splitmode based on SPLITUSERS and SPLITNUM (default if no_create_on_split or no_join_on_split are enabled)</para></listitem>
</varlistentry>
</variablelist>
</para></listitem>
</varlistentry>
<varlistentry>
<term>SPLITUSERS</term>
<listitem><para>
Sets the minimum amount of users needed to
deactivate automatic splitmode.
</para></listitem>
</varlistentry>
<varlistentry>
<term>SPLITNUM</term>
<listitem><para>
Sets the minimum amount of servers needed to
deactivate automatic splitmode.
Only servers that have finished bursting count for this.
</para></listitem>
</varlistentry>
</variablelist>
</sect2>
@ -304,11 +388,7 @@
Works similarly to KLINE, but matches against the real name field.
The wildcards are * (any sequence), ? (any character),
# (a digit) and @ (a letter); wildcard characters can be
escaped with a backslash.
</para>
<para>
Use \s for a space; this currently interferes with the
check whether the mask is already xlined and UNXLINE.
escaped with a backslash. The sequence \s matches a space.
</para>
<para>
All clients matching the X:line will be disconnected from the server immediately.
@ -631,6 +711,27 @@
no target is specified.
</para>
</sect2>
<sect2>
<title>PRIVS</title>
<cmdsynopsis>
<command>PRIVS</command>
<arg><replaceable>nick</replaceable></arg>
</cmdsynopsis>
<para>
Displays effective operator privileges for
the specified nick, or for yourself if no nick is
given. This includes all privileges from the operator
block, the name of the operator block and those
privileges from the auth block that have an effect
after the initial connection.
</para>
<para>
The exact output depends on the server the nick is on,
see the matching version of this document.
If the remote server does not support this extension, you will not
receive a reply.
</para>
</sect2>
<sect2>
<title>MASKTRACE</title>
<cmdsynopsis>
@ -704,7 +805,7 @@
is hidden (auth{} spoof).
</para>
<para>
Network searches where a listing is given or the mask option is used
Network searches where a listing is given
are operspy commands.
</para>
</sect2>
@ -909,6 +1010,12 @@
<para>Show operator blocks</para>
</listitem>
</varlistentry>
<varlistentry>
<term>O</term>
<listitem>
<para>Show privset blocks</para>
</listitem>
</varlistentry>
<varlistentry>
<term>p</term>
<listitem>

View File

@ -170,7 +170,8 @@ class "<replaceable>name</replaceable>" {
number_per_ident = <replaceable>number</replaceable>;
number_per_ip = <replaceable>number</replaceable>;
number_per_ip_global = <replaceable>number</replaceable>;
cidr_bitlen = <replaceable>number</replaceable>;
cidr_ipv4_bitlen = <replaceable>number</replaceable>;
cidr_ipv6_bitlen = <replaceable>number</replaceable>;
number_per_cidr = <replaceable>number</replaceable>;
max_number = <replaceable>number</replaceable>;
sendq = <replaceable>size</replaceable>;
@ -219,15 +220,22 @@ class "<replaceable>name</replaceable>" {
</listitem>
</varlistentry>
<varlistentry>
<term>cidr_bitlen</term>
<term>cidr_ipv4_bitlen</term>
<listitem>
<para>The netblock length to use with CIDR-based client limiting for this class.</para>
<para>The netblock length to use with CIDR-based client limiting for IPv4 users in this class (between 0 and 32).</para>
</listitem>
</varlistentry>
<varlistentry>
<term>cidr_ipv6_bitlen</term>
<listitem>
<para>The netblock length to use with CIDR-based client limiting for IPv6 users in this class (between 0 and 128).</para>
</listitem>
</varlistentry>
<varlistentry>
<term>number_per_cidr</term>
<listitem>
<para>The amount of clients which may be connected from a single netblock.</para>
<para>If this needs to differ between IPv4 and IPv6, make different classes for IPv4 and IPv6 users.</para>
</listitem>
</varlistentry>
<varlistentry>
@ -410,6 +418,12 @@ auth {
<para>Users in this auth{} block must have identd, otherwise they will be rejected.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>need_ssl</term>
<listitem>
<para>Users in this auth{} block must be connected via SSL/TLS, otherwise they will be rejected.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>need_sasl</term>
<listitem>
@ -442,6 +456,33 @@ exempt {
</varlistentry>
</variablelist>
</sect2>
<sect2>
<title>privset {} block</title>
<synopsis>
privset {
extends = "<replaceable>name</replaceable>";
privs = <replaceable>list</replaceable>;
};</synopsis>
<para>
A privset (privilege set) block specifies a set of
operator privileges.
</para>
<variablelist>
<title>privset {} variables</title>
<varlistentry>
<term>extends</term>
<listitem>
<para>An optional privset to inherit. The new privset will have all privileges that the given privset has.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>privs</term>
<listitem>
<para>Privileges to grant to this privset. These are described in the operator privileges section.</para>
</listitem>
</varlistentry>
</variablelist>
</sect2>
<sect2>
<title>operator {} block</title>
<synopsis>
@ -510,19 +551,35 @@ operator "<replaceable>name</replaceable>" {
</listitem>
</varlistentry>
<varlistentry>
<term>flags</term>
<term>privset</term>
<listitem>
<para>
A listing of privileges granted to operators using this block.
By default, the mass_notice, operwall, remoteban and resv privileges are granted;
use ~mass_notice, ~operwall, ~remoteban and ~resv to disable them if necessary.
</para>
<para>
In addition, a flag designating if the password is encrypted is here.
Privileges are documented elsewhere in this guide.
The privilege set granted to successfully opered clients.
This must be defined before this operator{} block.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>flags</term>
<listitem>
<para>A list of flags to apply to this operator{} block. They are listed below.</para>
</listitem>
</varlistentry>
</variablelist>
<variablelist>
<title>operator {} flags</title>
<varlistentry>
<term>encrypted</term>
<listitem>
<para>The password used has been encrypted. This is enabled by default, use ~encrypted to disable it.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>need_ssl</term>
<listitem>
<para>Restricts use of this operator{} block to SSL/TLS connections only.</para>
</listitem>
</varlistentry>
</variablelist>
</sect2>
<sect2>
@ -549,8 +606,6 @@ connect "<replaceable>name</replaceable>" {
<listitem>
<para>The hostname or IP to connect to.</para>
<note><para>
Charybdis uses solely DNS for all hostname/address lookups
(no <filename>/etc/hosts</filename> or anything else).
Furthermore, if a hostname is used, it must have an A or AAAA
record (no CNAME) and it must be the primary
hostname for inbound connections to work.
@ -1094,6 +1149,28 @@ service {
</variablelist>
</sect2>
</sect1>
<sect1>
<title>Hostname resolution (DNS)</title>
<para>
Charybdis uses solely DNS for all hostname/address lookups
(no <filename>/etc/hosts</filename> or anything else).
The DNS servers are taken from <filename>/etc/resolv.conf</filename>.
If this file does not exist or no valid IP addresses are listed in it,
the local host (127.0.0.1) is used. (Note that the latter part
did not work in older versions of Charybdis.)
</para>
<para>
IPv4 as well as IPv6 DNS servers are supported, but it is not
possible to use both IPv4 and IPv6 in
<filename>/etc/resolv.conf</filename>.
</para>
<para>
For both security and performance reasons, it is recommended
that a caching nameserver such as BIND be run on the same machine
as Charybdis and that <filename>/etc/resolv.conf</filename> only
list 127.0.0.1.
</para>
</sect1>
</chapter>
<!-- Keep this comment at the end of the file
Local variables:

View File

@ -4,7 +4,7 @@
<title>Scope of this document</title>
<para>
This document describes the commands and functions available to operators in
the charybdis ircd, as used on <ulink url="http://www.atheme.net">AthemeNet</ulink>.
shadowircd, as used on <ulink url="http://www.thinstack.net">Thinstack</ulink>.
</para>
<para>
This document, and various ideas for features of charybdis, have
@ -16,9 +16,9 @@
it is intended as a reference for network staff.
</para>
<para>
Charybdis is based on ircd-ratbox 2.1.4, although much has changed.
<ulink url="http://www.ircd-ratbox.org">ircd-ratbox</ulink> is commonly used
on efnet, and some other networks.
ShadowIRCd is based on Charybdis which is based on ircd-ratbox 3.0.0,
although much has changed. <ulink url="http://www.ircd-ratbox.org">ircd-ratbox</ulink>
is commonly used on efnet, and some other networks.
</para>
</sect1>
</chapter>

View File

@ -3,12 +3,10 @@
<sect1 id="oprivlist">
<title>Meanings of oper privileges</title>
<para>
These are flags in operator{}.
The letter appears after opering up and in /stats o; an uppercase
letter means the privilege is possessed, lowercase means it is not.
These are specified in privset{}.
</para>
<sect2>
<title>admin (A), server administrator</title>
<title>oper:admin, server administrator</title>
<para>
Various privileges intended for server administrators.
Among other things, this automatically sets umode +a and allows
@ -16,56 +14,50 @@
</para>
</sect2>
<sect2>
<title>remoteban (B), set remote bans</title>
<para>
This grants the ability to use the ON argument on KLINE/XLINE/RESV
and UNKLINE/UNXLINE/UNRESV to set and unset bans on other servers,
and the server argument on REHASH.
This is only allowed if the oper may perform the action locally,
and if the remote server has a shared{} block.
</para>
<note><para>
If a cluster{} block is present, bans are sent remotely even
if the oper does not have remoteban privilege.
</para></note>
</sect2>
<sect2>
<title>local_kill (C), kill local users</title>
<para>
This grants permission to use KILL on users on the same server,
disconnecting them from the network.
</para>
</sect2>
<sect2>
<title>die (D), die and restart</title>
<title>oper:die, die and restart</title>
<para>
This grants permission to use DIE and RESTART, shutting down
or restarting the server.
</para>
</sect2>
<sect2>
<title>rehash (H), rehash</title>
<title>oper:global_kill, global kill</title>
<para>
Allows using the REHASH command, to rehash various configuration
files or clear certain lists.
Allows using KILL on users on any server.
</para>
</sect2>
<sect2>
<title>kline (K), kline and dline</title>
<title>oper:hidden, hide from /stats p</title>
<para>
This privilege currently does nothing, but was designed
to hide bots from /stats p so users will not message them
for help.
</para>
</sect2>
<sect2>
<title>oper:hidden_admin, hidden administrator</title>
<para>
This grants everything granted to the oper:admin privilege,
except the ability to set umode +a. If both oper:admin and oper:hidden_admin
are possessed, umode +a can still not be used.
</para>
</sect2>
<sect2>
<title>oper:kline, kline and dline</title>
<para>
Allows using KLINE and DLINE, to ban users by user@host mask
or IP address.
</para>
</sect2>
<sect2>
<title>operwall (L), send/receive operwall</title>
<title>oper:local_kill, kill local users</title>
<para>
Allows using the OPERWALL command and umode +z to send and
receive operwalls.
This grants permission to use KILL on users on the same server,
disconnecting them from the network.
</para>
</sect2>
<sect2>
<title>mass_notice (M), global notices and wallops</title>
<title>oper:mass_notice, global notices and wallops</title>
<para>
Allows using server name ($$mask) and hostname ($#mask) masks in
NOTICE and PRIVMSG to send a message to all matching users, and
@ -74,35 +66,42 @@
</para>
</sect2>
<sect2>
<title>nick_changes (N), see nick changes</title>
<title>oper:operwall, send/receive operwall</title>
<para>
Allows using snomask +n to see local client nick changes.
This is designed for monitor bots.
Allows using the OPERWALL command and umode +z to send and
receive operwalls.
</para>
</sect2>
<sect2>
<title>global_kill (O), global kill</title>
<title>oper:rehash, rehash</title>
<para>
Allows using KILL on users on any server.
Allows using the REHASH command, to rehash various configuration
files or clear certain lists.
</para>
</sect2>
<sect2>
<title>hidden_oper (P), hide from /stats p</title>
<title>oper:remoteban, set remote bans</title>
<para>
This privilege currently does nothing, but was designed
to hide bots from /stats p so users will not message them
for help.
This grants the ability to use the ON argument on
DLINE/KLINE/XLINE/RESV and UNDLINE/UNKLINE/UNXLINE/UNRESV to set
and unset bans on other servers, and the server argument on REHASH.
This is only allowed if the oper may perform the action locally,
and if the remote server has a shared{} block.
</para>
<note><para>
If a cluster{} block is present, bans are sent remotely even
if the oper does not have oper:remoteban privilege.
</para></note>
</sect2>
<sect2>
<title>resv (Q), channel control</title>
<title>oper:resv, channel control</title>
<para>
This allows using /resv, /unresv and changing the channel
modes +L and +P.
</para>
</sect2>
<sect2>
<title>remote (R), remote routing</title>
<title>oper:routing, remote routing</title>
<para>
This allows using the third argument of the CONNECT command, to
instruct another server to connect somewhere, and using SQUIT
@ -110,13 +109,21 @@
(In both cases all opers with +w set will be notified.)
</para>
</sect2>
<sect2>
<title>oper:override, operator access in all channels</title>
<para>
This allows the operator to have implicit operator access
in all channels. It is enabled by setting user mode +p which
will automatically expire after a period of time set in the
configuration file.
</para>
<sect2>
<title>oper_spy (S), use operspy</title>
<title>oper:spy, use operspy</title>
<para>
This allows using /mode !#channel, /whois !nick, /who !#channel,
/chantrace !#channel, /who !mask, /masktrace !user@host :gecos
and /scan umodes +modes-modes global list to see through secret
channels, invisible users, etc.
/chantrace !#channel, /topic !#channel, /who !mask,
/masktrace !user@host :gecos and /scan umodes +modes-modes global list
to see through secret channels, invisible users, etc.
</para>
<para>
All operspy usage is broadcasted to opers with snomask +Z set
@ -133,27 +140,23 @@
</para>
</sect2>
<sect2>
<title>unkline (U), unkline</title>
<title>oper:unkline, unkline and undline</title>
<para>
Allows using UNKLINE and UNDLINE.
</para>
</sect2>
<sect2>
<title>xline (X), xline and unxline</title>
<title>oper:xline, xline and unxline</title>
<para>
Allows using XLINE and UNXLINE, to ban/unban users by realname.
</para>
</sect2>
<sect2>
<title>hidden_admin, hidden administrator</title>
<title>snomask:nick_changes, see nick changes</title>
<para>
This grants everything granted to the admin privilege,
except the ability to set umode +a. If both admin and hidden_admin
are possessed, umode +a can still not be used.
Allows using snomask +n to see local client nick changes.
This is designed for monitor bots.
</para>
<note><para>
This privilege does not appear in /stats o or oper up notices.
</para></note>
</sect2>
</sect1>
</chapter>

View File

@ -51,6 +51,10 @@
you should probably use this command, for example sending a
notice to every user joining a certain channel.
</para>
<para>
As of charybdis 3.1, NOTICE automatically behaves as CNOTICE
if you are in a channel fulfilling the conditions.
</para>
<para>
Support of this command is indicated by the CNOTICE token in
RPL_ISUPPORT (005).
@ -74,11 +78,34 @@
If you get <quote>Targets changing too fast, message dropped</quote>,
you should probably use this command.
</para>
<para>
As of charybdis 3.1, PRIVMSG automatically behaves as CPRIVMSG
if you are in a channel fulfilling the conditions.
</para>
<para>
Support of this command is indicated by the CPRIVMSG token in
RPL_ISUPPORT (005).
</para>
</sect2>
<sect2>
<title>FINDFORWARDS</title>
<cmdsynopsis><command>FINDFORWARDS</command>
<arg choice=plain><replaceable>channel</replaceable></arg>
</cmdsynopsis>
<para>
<note>
<para>
This command is only available if the <filename>m_findforwards.so</filename> extension is loaded.
</para>
</note>
Displays which channels forward to the given channel (via cmode +f).
If there are very many channels the list will be truncated.
</para>
<para>
You must be a channel operator on the channel or an IRC operator
to use this command.
</para>
</sect2>
<sect2>
<title>HELP</title>
<cmdsynopsis><command>HELP</command>
@ -93,6 +120,30 @@
UHELP to query the user help files.
</para>
</sect2>
<sect2>
<title>IDENTIFY</title>
<cmdsynopsis><command>IDENTIFY</command>
<arg choice=plain><replaceable>parameters...</replaceable></arg>
</cmdsynopsis>
<para>
<note>
<para>
This command is only available if the <filename>m_identify.so</filename> extension is loaded.
</para>
</note>
Sends an identify command to either NickServ or ChanServ.
If the first parameter starts with #, the command is sent to
ChanServ, otherwise to NickServ.
The word IDENTIFY, a space and all parameters are concatenated
and sent as a PRIVMSG to the service.
If the service is not online or does not have umode +S set,
no message will be sent.
</para>
<para>
The exact syntax for this command depends on the services package
in use.
</para>
</sect2>
<sect2>
<title>KNOCK</title>
<cmdsynopsis><command>KNOCK</command>

View File

@ -43,8 +43,9 @@
wishes to speak to them.
</para>
<para>
Network operators are not affected by the callerid whitelist system in the event
that they need to speak to users who have it enabled.
If a network operator needs to speak to a user who has +g set,
the operator can use the OACCEPT command to be able to speak to
the user.
</para>
<para>
Support of this umode is indicated by the CALLERID token in
@ -147,8 +148,10 @@
</note>
This umode grants various features useful for services. For example,
clients with this umode cannot be kicked or deopped on channels,
do not show channels the querying user is not on in WHOIS,
and do not appear in /stats p.
can send to any channel, do not show channels in WHOIS,
can be the target of services aliases and do not appear in /stats p.
No server notices are sent for hostname changes by services clients;
server notices about kills are sent to snomask +k instead of +s.
</para>
<para>
The exact effects of this umode are variable; no user or oper on
@ -165,7 +168,8 @@
</note>
Users with the +w umode set will receive WALLOPS messages sent by opers.
Opers with +w additionally receive WALLOPS sent by servers (e.g.
remote CONNECT, remote SQUIT, many services packages).
remote CONNECT, remote SQUIT, various severe misconfigurations,
many services packages).
</para>
</sect2>
<sect2>
@ -253,6 +257,28 @@
limit settable with /quote set max).
</para>
</sect2>
<sect2>
<title>+F, far client connection notices</title>
<para>
<note>
<para>
This snomask is only available if the <filename>sno_farconnect.so</filename> extension is loaded.
</para>
</note>
Opers with +F receive server notices when clients connect or
disconnect on other servers. The notices have the same format
as those from the +c snomask, except that the class is ? and
the source server of the notice is the server the user is/was on.
</para>
<para>
No notices are generated for netsplits and netjoins.
Hence, these notices cannot be used to keep track of all
clients on the network.
</para>
<para>
There is no far equivalent of the +C snomask.
</para>
</sect2>
<sect2>
<title>+k, server kill notices</title>
<para>
@ -291,6 +317,18 @@
available auth{} block.
</para>
</sect2>
<sect2>
<title>+W, whois notifications</title>
<para>
<note>
<para>
This snomask is only available if the <filename>sno_whois.so</filename> extension is loaded.
</para>
</note>
Opers with +W receive notices when a WHOIS is executed on them
on their server (showing idle time).
</para>
</sect2>
<sect2>
<title>+x, extra routing notices</title>
<para>
@ -306,8 +344,7 @@
<para>
Opers with +y receive notices when users try to join RESV'ed (<quote>juped</quote>) channels.
Additionally, if certain extension modules are loaded, they will
receive notices when special commands are used and/or when they
are whoised.
receive notices when special commands are used.
</para>
</sect2>
<sect2>

View File

@ -1,4 +1,3 @@
$Id: cluster.txt 6 2005-09-10 01:02:21Z nenolod $
Short description of how remote kline and friends are propagated under
the old hyb7 style (CAP_KLN etc) and under the new style over ENCAP.

View File

@ -0,0 +1,68 @@
## Elemental-ircd specific deviations from the normal TS6 protocol
As a general rule of thumb and for compatibility reasons, protocol changes are
made as infrequently and minimally as possible. However there are some things
that have been changed in how elemental handles the server to server protocol
that are worth mentioning.
For readability's sake, any lines that a server sends are prefixed by `>>>` and
any lines it expects to recieve are prefixed by `<<<`.
### Changes
#### Channel owner mode
If enabled, a new mode will be added to the channel prefix list. This mode (+y)
has a prefix of "~" and in most IRC services packages is used to signify the
owner of a specific channel. If enabled, it will show up in SJOIN lines as such:
>>> :[sid] SJOIN [channel-ts] #opers + :~[ts6-uid]
A more practical example would be:
>>> :420 SJOIN 13840003504 #opers + :~@42000000A
As the mode for this channel is `+y`, all `TMODE` changes adding or removing `+y`
from a client in a channel should set and unset this mode accordingly. An example
of adding the mode follows:
>>> :47GAAAAAB TMODE 13840003504 #opers +y 42000000A
Handling removal is similar.
Currently, the only way to detect if a remote server supports these extended
modes is to remotely query a server's `VERSION` and read out the `005` reply.
### Things added to existing commands
#### Server notice mask broadcasts
Currently the NEEDSASL, DNSBL hit, hunted command flooding and `m_post` rejections
are globally broadcast server notices. They will show up in TS6 lines such as:
<<< :[sid] ENCAP * SNOTE [snomask] :[server name] :[message]
For a more practical example:
<<< :47G ENCAP * SNOTE b :rarity.shadownet.int :Client floodbot (~a@127.0.0.1) is attempting to flood ADMIN
These broadcasts are there for IRC operators on more centrally managed networks
to better see what is going on on other ends of the network without having to hop
servers and check. Bots or pseudoservices may also uses these lines to perform
additional actions (such as `AKILL`s or logging to channels) as needed by the
bot author.
#### METADATA
The old ShadowIRCD implementation of METADATA used `ADD` and `DELETE` verbs for
adding and deleting metadata to channels and clients. This, in practice looks
something like:
<<< :45X ENCAP * METADATA ADD 1NRAAAABR OPERSTRING :is an IRC Administrator
<<< :45X ENCAP * METADATA DELETE 1NRAAAABR OPERSTRING
Functionality is identical to the new `SET` and `CLEAR` verbs, but this deviates
from the spec by being **only** a server to server command. Support for client
to server and server to client metadata setting/getting will come in a future
version of elemental-ircd.

View File

@ -1,4 +1,3 @@
$Id: euid.txt 1863 2006-08-27 13:40:37Z jilles $
Extended UID command proposal
Jilles Tjoelker <jilles@stack.nl>

View File

@ -1,7 +1,6 @@
Overview of the event subsystem
Adrian Chadd <adrian@creative.net.au>
$Id: event.txt 6 2005-09-10 01:02:21Z nenolod $
One of the things that immediately struck me whilst first looking at the

View File

@ -1,7 +1,6 @@
Overview of the filedescriptor subsystem
Adrian Chadd <adrian@creative.net.au>
$Id: fd-management.txt 6 2005-09-10 01:02:21Z nenolod $
Filedescriptor lists

View File

@ -1,6 +1,5 @@
The hostmask/netmask system.
Copyright(C) 2001 by Andrew Miller(A1kmm)<a1kmm@mware.virtualave.net>
$Id: hostmask.txt 6 2005-09-10 01:02:21Z nenolod $
Contents
========

View File

@ -16,4 +16,3 @@ rfc1459.txt - The IRC RFC
send.txt - Document on all of the send_to functions
whats-new-code.txt - Whats changed in the code
# $Id: index.txt 6 2005-09-10 01:02:21Z nenolod $

View File

@ -3,7 +3,6 @@ linebuf - a dbuf replacement for the New World Order(tm)
By Adrian Chadd <adrian@creative.net.au>
$Id: linebuf.txt 6 2005-09-10 01:02:21Z nenolod $
History

View File

@ -1,7 +1,6 @@
Overview of the network subsystem
Adrian Chadd <adrian@creative.net.au>
$Id: network.txt 6 2005-09-10 01:02:21Z nenolod $
This document is an overview of the new and hopefully improved network

View File

@ -250,4 +250,3 @@ sendto_wallops_flags()
-- Diane Bruce
Updated Jan 2006 by jilles with ratbox and late hybrid7 changes
$Id: send.txt 587 2006-01-27 19:45:11Z jilles $

View File

@ -1,151 +0,0 @@
Overview of the TS5 system
Lee H <lee@leeh.co.uk>
$Id: ts5.txt 6 2005-09-10 01:02:21Z nenolod $
For the purposes of this document, ircd versions:
hybrid6.0
ircd-comstud-1.12
CSr31pl4
and prior, are TS3.
ircd-hybrid-6.2 and later support TS5.
Whats TS5?
----------
The difference between TS5 and TS3 is what happened on opless channels. TS
works by establishing which server has the oldest version of the channel,
the version that is oldest, keeps its modes and ops, the version that is
youngest, removes their modes and ops, and accepts the older version.
There was an exception to this rule with opless channels, if a channel was
opless, TS3 would allow anybody to keep their ops and modes on the channel.
TS5 aims to stop this, by removing this exception.
Example1:
An irc network, with server A (every server is ts3)
UserA is on ServerA, in channel #broken. This channel is opless, and has a
TS of 800000000. ServerA splits, and whilst it is split, UserA cycles
channel #broken, recreates the channel and is given ops. On ServerA #broken
now has a TS of 900000000 and has ops. ServerA rejoins with the network,
via HubB. HubB realises #broken is opless, so allows UserA to retain ops.
The TS is moved forward to 900000000.
The network now sees #broken as having a TS of 900000000, with UserA being
opped.
Example2:
An irc network, with server C (every server is ts5)
Same scenario as above. ServerC splits and UserC cycles channel #broken,
recreating it with a TS of 900000000. ServerC rejoins with the network via
HubD. HubD realises #broken has a TS of 800000000 locally, and ServerC is
showing a TS of 900000000, it ignores ServerC's modes and ops. The channel
remains opless. ServerC receives HubD's modes, and it notices HubD has a
lower TS of channel #broken. It removes UserC's ops, removes the channel
modes on #broken, and accepts HubD's status.
The network version of #broken hasnt changed. It is still opless, with a TS
of 800000000.
As you can see, TS5 makes splitting a server to regain ops useless, as it
cannot be abused to give ops after a netsplit.
The problem with TS5 however, is what happens on a mixed TS5/TS3 network.
Channels where the older TS has ops will behave the same way on TS5 and TS3,
however an opless channel will behave differently, as you can see above.
The result of TS5/TS3 mixed can be a desync:
Example1:
As per Example1 above, except the rest of the network is TS5, ServerA is
TS3. ServerA would keep its modes and ops, whilst the rest of the network
would remove them. This means only ServerA would see UserA as opped. The
desync can be abused, as UserA can send modes. Hybrid6.0 servers will
accept these modes from the unopped client, so if UserA ops UserB, who then
ops UserA, the channel will be the same across all Hybrid6.0 and Hybrid6.1
servers.
Example2:
As per Example2 above, except the rest of the network is TS3. ServerC is
TS5. ServerC would remove its modes and ops, therefore UserC would not be
opped on ServerC, therefore it could not send any mode changes to the
channel. Although it is opped elsewhere, it isnt opped locally, so the
desync cannot be abused.
As you can see, the desync's that can occur can either be resynced, or are
useless to the user, so a mixed TS5/TS3 network is not a huge problem,
although a desync is NOT a good thing to have.
Why TS5?
--------
We have jumped to TS5 from TS3, because there was a version of ircd that was
TS4, so it was thought better to avoid a clash with an existing version.
Advantages
----------
Its a realistic event that a server will be attacked so it splits off a
network, then used to regain ops in a channel. TS5 makes this pointless,
the server will never give ops on a netsplit. TS5 is network wide, so it
leaves individual servers free to choose options like NO_JOIN_ON_SPLIT,
whilst keeping splits useless to users.
Disadvantages
-------------
Its virtually impossible for a user to actively regain ops themselves (some
regard this as an advantage..) because on a large sized channel, its
impossible to get people to leave so it can be recreated, therefore if a
network did not have some form of services, it could possibly end up
requiring oper intervention, as you cant get everybody to leave, and you
cant use splits to regain ops, therefore if the channel is open (an
invite-only channel would gradually destroy itself as noone new can join) it
could be impossible for a user to regain ops.
On a network that has some form of services, The effect of TS5 would be
minimal, however the services must be of sufficient quality to fix opless
channels, as TS5 renders netsplits for ops worthless.
Recommendations
---------------
If your network has good stable services, we recommend TS5 is enabled, as
people have no reason to abuse netsplits anyway.
If your network has no services at all, then TS5 may cause problems with
users being left with a permanently opless channel.
If your network occupies the middle ground, then its a choice between users
needing to be able to use splits to regain ops, or making netsplits that are
caused to regain ops worthless.
If TS5 is chosen, the FULL network must upgrade and this should be done in a
relatively short space of time to minimise the possible desync effects.
Alternatives
------------
There is also NO_JOIN_ON_SPLIT and NO_OP_ON_SPLIT, however these use the
configuration of minimum servers and users, and sometimes a split that is
above these limits is enough to be abused to regain ops, whereas if the
limits are too high, clients will never be able to join anything or be opped
when they create a channel.
EOF

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,3 @@
$Id: ts6.txt 3211 2007-02-20 00:34:28Z jilles $
TS6 Proposal (v8)
Written by Lee H <lee@leeh.co.uk>

View File

@ -2,37 +2,44 @@ Target Change for Messages
Lee H <lee -at- leeh.co.uk>
---------------------------
Reworked by Jilles Tjoelker, February 2010.
Channel target change added by Jilles Tjoelker, August 2010.
If the server you are using uses the target change mechanism, then
restrictions are placed on how many different users you can message in a set
timeframe.
restrictions are placed on how many different users and/or channels you can
message in a set timeframe. This also applies to invites (for the target
user) and topic changes.
Target change does not apply to channels, ctcp replies or messages to
yourself.
Target change does not apply to ctcp replies, messages to yourself, messages
to services and joins.
You will have a set number of 'slots', each different client you message
You will have a set number of 'slots', each different target you message
will take up one slot. A client doing a nick change will not use a new slot,
however a client disconnecting from the server it is on and reconnecting
will. You will receive 1 new slot roughly every minute.
When all slots are filled, messages to new clients will not be accepted.
Messages to clients already filling a slot will be accepted. If all slots
Additionally, clients that message or invite you are placed in one of a
small number of special slots, in many cases allowing replies without using
a slot.
When all slots are filled, messages to new targets will not be accepted.
Messages to targets already filling a slot will be accepted. If all slots
are full, you will receive the ERR_TARGCHANGE numeric, number 707 in the
form:
:<server> 707 <yournick> <targetnick> :Targets changing too fast, message dropped
:<server> 707 <yournick> <target> :Targets changing too fast, message dropped
The slots are operated as a FIFO (first in, first out), so the first person
you message will be the first person removed from a slot, even if you are
still talking to this person.
The slots are operated in an LRU (least recently used), so the person or
channel you have talked to least recently will be replaced.
The number of slots in use will be kept through a reconnection, though the
information in those slots will be dropped. However, you will always
receive one free slot on a reconnection. Other servers using this mechanism
will also be made aware of details about slots.
Target change can be avoided via the CNOTICE and CPRIVMSG commands, when you
are opped or voiced in a channel, and you are messaging a client within that
channel. See /quote help cnotice and /quote help cprivmsg for more
information.
Target change does not apply if you are opped or voiced in a channel, and
you are messaging that channel or a client within that channel. The latter
can be done explicitly using the CNOTICE and CPRIVMSG commands, see
/quote help cnotice and /quote help cprivmsg, but is also implicit in a
normal /msg, /notice or /invite.
--
$Id: tgchange.txt 6 2005-09-10 01:02:21Z nenolod $

View File

@ -1,113 +0,0 @@
$Id: whats-new-2.0.txt 6 2005-09-10 01:02:21Z nenolod $
The following is a list of major changes between ircd-ratbox-1.x and
ircd-ratbox-2.0
Config File
-----------
- name="foo"; is no longer supported in connect {}; operator {}; and
class {};. You must now use connect "irc.foo.com" { ... }; etc.
- operator {}; no longer contains a class
- kline_with_connection_closed is gone, replaced with
kline_reason = "Connection closed";
- logging {}; is gone, replaced with more advanced log system - see
example.conf log {}; for more info. Note, by default only very basic
information will be logged.
- support for a specific opers initial umodes on /oper, by umodes = ...;
in operator {};
- added stats_e_disabled = yes|no; to general {};, controlling whether stats
e (which can contain server ips) is never shown to anyone
- support for compressed|encrypted|topicburst|autoconn = yes|no; is gone,
replaced with flags = compressed, encrypted, topicburst, autoconn;
- support for individual auth flags "kline_exempt = yes"; etc removed, now
must use flags = ...; method
- support for individual oper flags "kline = yes;" etc removed, now must use
flags = ...; method.
- extended flags = ...; method to allow negation, so you may prefix a flag
with '~' to negate it. Default oper flags are operwall, remoteban and
encrypted (indicates password is encrypted with mkpasswd)
- new flags in shared {};, tkline, txline and tresv, allowing temp only of
kline, xline and resv respectively.
- new flags in cluster {}; tkline, txline and tresv which will cluster
only the temp of each type. kline, xline and resv will now only
cluster the permanent ones of each type.
- cluster {}; no longer allows a server to place klines etc locally, it
simply dictates who we send to.
- shared {}; is now ordered top-down and the first one that matches the
user@host and server will be used, and the flags taken from this. This
means if a remote oper matches a shared block without kline privs, even
though there is a shared {}; block they match under it with kline privs
they will not be able to place klines.
- added invite_ops_only to channel {}; which will restrict the use of INVITE
to chanops on that channel always, rather than just to +i chans.
Client
------
- /help is now available for all users, as its now cached in memory.
removes config option use_help from general {};
- default CHANNELLEN for local clients is now 50
- AWAYLEN added to 005, default is 90
- kick/part/quit now use REASONLEN (120) rather than TOPICLEN
- umode +g now exempts users messaging themselves
Oper
----
- kline/dline <nick> is no longer supported
- oper reasons are now more fully supported
- opers can now be hidden from stats p, by flag "invisible"
- XLINEs no longer contain a type field, theyll now all just silently reject
- xlines are now 'tracked' - stats X shows how many times each xline has
rejected a client
- temp xlines and resvs
- klines set against spoofed users will now take effect when the user
connects as well, if the user is not kline_exempt
- trace spy now contains target param if its against a single user
- the old "you need xline=yes;" notices have been replaced by ERR_NOPRIVS
(numeric 723)
- umode +C, machine parsable client connect/exit notices which includes the
two unused fields sent in the USER command
Channels
--------
- persistent channels have been removed
- quiet_on_ban now uses a cache, which should speed it up
Server <-> Server Protocol
--------------------------
- support for bursting away messages on connect, controlled by
burst_away = yes|no; in general {};
- TS6, the new server <-> server protocol. As part of this you *must*
specify a "sid" in serverinfo {}; that is three alphanumeric characters,
and must start with a digit. use_ts6 = yes|no; in general controls
whether it is actually used or not. For more information, see:
http://www.ircd-ratbox.org/TS6.txt
- fakename in connect {}; is gone, you can no longer mask servers.
- support for encrypted links are gone
- global capabilities. The server will now inform the rest of the network
over ENCAP about the capabilities of other servers.
Misc
----
- support for message translation has been removed. If you want these,
modify messages.tab and distribute that.
- most of server hiding is gone, only thing that is left is flattened links
- flattened links cache is now stored in memory instead of a file
- nick delay. any client which splits will have their nick 'locked', until
a remote client uses this nick, or until it expires after the time nick_delay
in general {}. This prevents the masses of kills from clients 'regaining'
nicknames on a short split.
- support for disabling bold chars etc in channel names for local users, to
prevent faking channels. disable_fake_channels = <yes|no>; in general {};
Code cleanups
-------------
- remove mapped ipv4 in ipv6 sockets, the correct native socket will now be
used for each.
- module API has been rewritten, 1.x modules will no longer work.
- hook API has been rewritten
- proper handlers for ENCAP commands
- support for vms ast i/o
- connect {}; and operator {}; are now in their own structs, saving memory
in ConfItem
- shared/cluster now use the same struct and flags
- various other code cleanups thatd take all year to list ;)

View File

@ -1,69 +0,0 @@
# $Id: whats-new-2.1.txt 6 2005-09-10 01:02:21Z nenolod $
The following is a list of the major changes between ircd-ratbox-2.0 and
ircd-ratbox-2.1.
Config file
-----------
- IP entries within exempt {}; can now be stacked, eg:
exempt { ip = "127.0.0.1"; ip = "192.168.0.0/24"; };
- shared {}; has been completely reworked so that it allows stacking.
shared {}; blocks for 2.0 and earlier will no longer work.
See example.conf for the new format.
- cluster {}; has been reworked to allow stacking.
cluster {}; blocks for 2.0 and earlier will no longer work.
See example.conf for the new format.
- New auth flag, jupe_exempt. When set on a client, that client will not
generate jupe warning notices when they try to join juped channels.
- You may no longer specify klines, dlines, xlines and resvs in ircd.conf.
Instead, there is no support for banconfigs with a ".perm" extension,
eg kline.conf.perm. Anything within a .perm file will be read, but
cannot be removed via the ircd. The format of these files is the same
format as their normal non-permanent counterpart. So kline.conf.perm
takes the same format as kline.conf, and so on.
- rehash and kill -HUP no longer reread the ban configs kline.conf etc.
You must now use /rehash bans, or kill -USR2
- New config option to general {};, dline_with_reason = yes|no;. Default no.
Traditionally, when a client connects and is dlined, the reason is never
shown. Enabling this will output the reason to clients.
Client
------
- Support for "deaf", umode +D. When a client is 'deaf', they will not
receive any messages sent towards channels. They will still receive joins
etc, but normal channel chat will not be sent. Any private messages
will still be sent.
- Target change anti-spam system. Restrictions are now placed upon how many
different clients (not channels) can be messaged within a specific time
period.
- Server-side notify lists. These allow a client to request a server
notifies them when a nickname comes online or goesoffline. See
doc/monitor.txt for more information.
- Client capabilities. These allow clients to negotiate capabilities with
the server. Currently supports:
- multi-prefix: A +ov client will have "@+" shown in names/who replies.
Oper
----
- RESVs are now tracked. Stats q/Q have been modified so that the first
field of the output is now a number indicating how many times the RESV
has been hit.
ratbox-services support (non-efnet)
-----------------------------------
- For those of you using ratbox-services, there is now compatibility code
within ircd, enabled by passing '--enable-services' to configure.
See doc/services.txt for more information.
Code cleanups
-------------
- Removed the custom file implementation, use the system one instead.
- The hook system has been redesigned, theres now a more thorough set of
hooks that may be used. See docs/hooks.txt
- Removed support for VMS. It hasnt worked for a long time.
- Cleanups to the expiry of temp klines/dlines.
- Various other things ;-).
- Better splitcode, it now works on how many servers have notified
us of burst finishing, rather than how many servers are linked to the
network.

View File

@ -16,7 +16,14 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SUID = @INSTALL_PROGRAM@ -o root -m 4755
SHELL = /bin/sh
AUTOMODULEDIR = @moduledir@/extensions
prefix = @prefix@
exec_prefix = @exec_prefix@
libdir = @libdir@
pkglibdir = @pkglibdir@
moduledir = @moduledir@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
AUTOMODULEDIR = $(moduledir)/extensions
SSL_LIBS = @SSL_LIBS@
SSL_INCLUDES = @SSL_INCLUDES@
@ -27,8 +34,11 @@ INCLUDES = -I. -I../include -I../libratbox/include $(SSL_INCLUDES)
CPPFLAGS = ${INCLUDES} @CPPFLAGS@
SRCS = \
chm_adminonly.c \
chm_operonly.c \
chm_operonly_compat.c \
chm_quietunreg_compat.c \
chm_sslonly.c \
chm_sslonly_compat.c \
createauthonly.c \
createoperonly.c \
@ -43,24 +53,29 @@ SRCS = \
force_user_invis.c \
hurt.c \
ip_cloaking.c \
ip_cloaking_old.c \
ip_cloaking-5.c \
sno_farconnect.c \
sno_globalkline.c \
sno_globaloper.c \
sno_whois.c \
m_42.c \
m_adminwall.c \
m_cycle.c \
m_findforwards.c \
m_force.c \
m_identify.c \
m_mkpasswd.c \
m_oaccept.c \
m_ojoin.c \
m_olist.c \
m_okick.c \
m_omode.c \
m_opme.c \
m_sendbans.c \
m_webirc.c \
no_locops.c \
no_oper_invis.c \
m_roleplay.c \
spy_admin_notice.c \
spy_info_notice.c \
spy_links_notice.c \
@ -88,7 +103,7 @@ install: all
.SUFFIXES: .so
.c.so:
${CC} ${PICFLAGS} ${CPPFLAGS} ${CFLAGS} $< -o $@
${CC} ${PICFLAGS} ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} $< -o $@
.PHONY: depend clean distclean
depend:

View File

@ -11,7 +11,7 @@ Modules
createauthonly.c - Only allow authenticated (identified) users to create
channels.
ip_cloaking.c - Cloak (spoof) the host for users that have umode +h.
ip_cloaking.c - Cloak (spoof) the host for users that have umode +x.
m_42.c - The Answer to Life, the Universe, and Everything.
Syntax: 42
@ -19,6 +19,9 @@ m_42.c - The Answer to Life, the Universe, and Everything.
m_adminwall.c - Sends a message to all admins network-wide (umode +a)
Syntax: ADMINWALL :<message>
m_cycle - Server-side /CYCLE (also called /HOP in some clients/servers).
Syntax: CYCLE <#channel>
m_findforwards.c - Find channels that forward (+f) to a given channel.
Syntax: FINDFORWARDS <channel>
@ -28,8 +31,12 @@ m_identify.c - Identifies to NickServ or ChanServ
m_mkpasswd.c - MKPASSWD - generate a DES or MD5 encryption of a password
Syntax: MKPASSWD <plaintext> [MD5|DES]
m_oaccept.c - OACCEPT - Add metadata to a user that will allow you to
message them even if they are +gGR.
Syntax: OACCEPT <nick>
m_ojoin.c - OJOIN - Join a channel through any modes or limits with
an optional status (@+)
an optional status (!@%+)
Syntax: OJOIN [status]<channel>
m_olist.c - OLIST - Lists channels like LIST, but shows hidden
@ -41,9 +48,21 @@ m_opme.c - OPME - Allows an admin to op themselves in an opless channel
m_omode.c - OMODE - Allows an admin to do all sorts of evil upon a
channel, sets modes with extreme prejudice
m_okick.c - OKICK - Allows an oper to kick a user from a channel
regardless of if they have ops or not.
Syntax: OKICK <channel> <nick> :<message>
m_roleplay.c - ROLEPLAY - Allows a variety of roleplaying commands.
no_oper_invis.c - Disallow opers setting marking themselves as invisible
(+i) unless they have the hidden_oper flag.
m_force.c - Allows opers to FORCEJOIN users to any channel they
so desire, regardless of bans or restricting modes
that may be keeping them out. Similar to the SAJOIN
command in other ircds.
Syntax: FORCEJOIN <user> <channel>
example_module.c - An example module to be used for creating your own.
Syntax: TEST

View File

@ -0,0 +1,51 @@
#include "stdinc.h"
#include "modules.h"
#include "hook.h"
#include "client.h"
#include "ircd.h"
#include "send.h"
#include "s_conf.h"
#include "s_user.h"
#include "s_serv.h"
#include "numeric.h"
#include "chmode.h"
static void h_can_join(hook_data_channel *);
mapi_hfn_list_av1 adminonly_hfnlist[] = {
{ "can_join", (hookfn) h_can_join },
{ NULL, NULL }
};
static unsigned int mymode;
static int
_modinit(void)
{
mymode = cflag_add('A', chm_staff);
if (mymode == 0)
return -1;
return 0;
}
static void
_moddeinit(void)
{
cflag_orphan('A');
}
DECLARE_MODULE_AV1(chm_adminonly, _modinit, _moddeinit, NULL, NULL, adminonly_hfnlist, "$Revision$");
static void
h_can_join(hook_data_channel *data)
{
struct Client *source_p = data->client;
struct Channel *chptr = data->chptr;
if((chptr->mode.mode & mymode) && !IsAdmin(source_p)) {
sendto_one_numeric(source_p, 519, "%s :Cannot join channel (+A) - you are not an IRC server administrator", chptr->chname);
data->approved = ERR_CUSTOM;
}
}

56
extensions/chm_operonly.c Normal file
View File

@ -0,0 +1,56 @@
#include "stdinc.h"
#include "modules.h"
#include "hook.h"
#include "client.h"
#include "ircd.h"
#include "send.h"
#include "s_conf.h"
#include "s_user.h"
#include "s_serv.h"
#include "numeric.h"
#include "chmode.h"
static void h_can_join(hook_data_channel *);
mapi_hfn_list_av1 operonly_hfnlist[] = {
{ "can_join", (hookfn) h_can_join },
{ NULL, NULL }
};
static unsigned int mymode;
/* This is a simple example of how to use dynamic channel modes.
* Not tested enough yet, use at own risk.
* -- dwr
*/
static int
_modinit(void)
{
mymode = cflag_add('O', chm_staff);
if (mymode == 0)
return -1;
return 0;
}
static void
_moddeinit(void)
{
cflag_orphan('O');
}
DECLARE_MODULE_AV1(chm_operonly, _modinit, _moddeinit, NULL, NULL, operonly_hfnlist, "$Revision$");
static void
h_can_join(hook_data_channel *data)
{
struct Client *source_p = data->client;
struct Channel *chptr = data->chptr;
if((chptr->mode.mode & mymode) && !IsOper(source_p)) {
sendto_one_numeric(source_p, 520, "%s :Cannot join channel (+O) - you are not an IRC operator", chptr->chname);
data->approved = ERR_CUSTOM;
}
}

View File

@ -12,41 +12,41 @@
static int _modinit(void);
static void _moddeinit(void);
static void chm_operonly(struct Client *source_p, struct Channel *chptr,
int alevel, int parc, int *parn,
const char **parv, int *errors, int dir, char c, long mode_type);
int alevel, int parc, int *parn,
const char **parv, int *errors, int dir, char c, long mode_type);
DECLARE_MODULE_AV1(chm_operonly_compat, _modinit, _moddeinit, NULL, NULL, NULL, "$Revision$");
static int
_modinit(void)
{
chmode_table['O'].set_func = chm_operonly;
chmode_table['O'].mode_type = 0;
chmode_table['O'].set_func = chm_operonly;
chmode_table['O'].mode_type = 0;
return 0;
return 0;
}
static void
_moddeinit(void)
{
chmode_table['O'].set_func = chm_nosuch;
chmode_table['O'].mode_type = 0;
chmode_table['O'].set_func = chm_nosuch;
chmode_table['O'].mode_type = 0;
}
static void
chm_operonly(struct Client *source_p, struct Channel *chptr,
int alevel, int parc, int *parn,
const char **parv, int *errors, int dir, char c, long mode_type)
int alevel, int parc, int *parn,
const char **parv, int *errors, int dir, char c, long mode_type)
{
int newparn = 0;
const char *newparv[] = { "$o" };
int newparn = 0;
const char *newparv[] = { "$o" };
if (MyClient(source_p)) {
chm_simple(source_p, chptr, alevel, parc, parn, parv,
errors, dir, 'i', MODE_INVITEONLY);
chm_ban(source_p, chptr, alevel, 1, &newparn, newparv,
errors, dir, 'I', CHFL_INVEX);
} else
chm_nosuch(source_p, chptr, alevel, parc, parn, parv,
errors, dir, c, mode_type);
if (MyClient(source_p)) {
chm_simple(source_p, chptr, alevel, parc, parn, parv,
errors, dir, 'i', MODE_INVITEONLY);
chm_ban(source_p, chptr, alevel, 1, &newparn, newparv,
errors, dir, 'I', CHFL_INVEX);
} else
chm_nosuch(source_p, chptr, alevel, parc, parn, parv,
errors, dir, c, mode_type);
}

View File

@ -13,39 +13,39 @@
static int _modinit(void);
static void _moddeinit(void);
static void chm_quietunreg(struct Client *source_p, struct Channel *chptr,
int alevel, int parc, int *parn,
const char **parv, int *errors, int dir, char c, long mode_type);
int alevel, int parc, int *parn,
const char **parv, int *errors, int dir, char c, long mode_type);
DECLARE_MODULE_AV1(chm_quietunreg_compat, _modinit, _moddeinit, NULL, NULL, NULL, "$Revision$");
static int
_modinit(void)
{
chmode_table['R'].set_func = chm_quietunreg;
chmode_table['R'].mode_type = 0;
chmode_table['R'].set_func = chm_quietunreg;
chmode_table['R'].mode_type = 0;
return 0;
return 0;
}
static void
_moddeinit(void)
{
chmode_table['R'].set_func = chm_nosuch;
chmode_table['R'].mode_type = 0;
chmode_table['R'].set_func = chm_nosuch;
chmode_table['R'].mode_type = 0;
}
static void
chm_quietunreg(struct Client *source_p, struct Channel *chptr,
int alevel, int parc, int *parn,
const char **parv, int *errors, int dir, char c, long mode_type)
int alevel, int parc, int *parn,
const char **parv, int *errors, int dir, char c, long mode_type)
{
int newparn = 0;
const char *newparv[] = { "$~a" };
int newparn = 0;
const char *newparv[] = { "$~a" };
if (MyClient(source_p))
chm_ban(source_p, chptr, alevel, 1, &newparn, newparv,
errors, dir, 'q', CHFL_QUIET);
else
chm_nosuch(source_p, chptr, alevel, parc, parn, parv,
errors, dir, c, mode_type);
if (MyClient(source_p))
chm_ban(source_p, chptr, alevel, 1, &newparn, newparv,
errors, dir, 'q', CHFL_QUIET);
else
chm_nosuch(source_p, chptr, alevel, parc, parn, parv,
errors, dir, c, mode_type);
}

52
extensions/chm_sslonly.c Normal file
View File

@ -0,0 +1,52 @@
#include "stdinc.h"
#include "modules.h"
#include "hook.h"
#include "client.h"
#include "ircd.h"
#include "send.h"
#include "s_conf.h"
#include "s_user.h"
#include "s_serv.h"
#include "numeric.h"
#include "chmode.h"
static void h_can_join(hook_data_channel *);
mapi_hfn_list_av1 sslonly_hfnlist[] = {
{ "can_join", (hookfn) h_can_join },
{ NULL, NULL }
};
static unsigned int mymode;
static int
_modinit(void)
{
mymode = cflag_add('S', chm_simple);
if (mymode == 0)
return -1;
return 0;
}
static void
_moddeinit(void)
{
cflag_orphan('S');
}
DECLARE_MODULE_AV1(chm_sslonly, _modinit, _moddeinit, NULL, NULL, sslonly_hfnlist, "$Revision$");
static void
h_can_join(hook_data_channel *data)
{
struct Client *source_p = data->client;
struct Channel *chptr = data->chptr;
if((chptr->mode.mode & mymode) && !IsSSLClient(source_p)) {
sendto_one_notice(source_p, ":Only users using SSL can join this channel!");
data->approved = ERR_CUSTOM;
}
}

View File

@ -12,39 +12,39 @@
static int _modinit(void);
static void _moddeinit(void);
static void chm_sslonly(struct Client *source_p, struct Channel *chptr,
int alevel, int parc, int *parn,
const char **parv, int *errors, int dir, char c, long mode_type);
int alevel, int parc, int *parn,
const char **parv, int *errors, int dir, char c, long mode_type);
DECLARE_MODULE_AV1(chm_sslonly_compat, _modinit, _moddeinit, NULL, NULL, NULL, "$Revision$");
static int
_modinit(void)
{
chmode_table['S'].set_func = chm_sslonly;
chmode_table['S'].mode_type = 0;
chmode_table['S'].set_func = chm_sslonly;
chmode_table['S'].mode_type = 0;
return 0;
return 0;
}
static void
_moddeinit(void)
{
chmode_table['S'].set_func = chm_nosuch;
chmode_table['S'].mode_type = 0;
chmode_table['S'].set_func = chm_nosuch;
chmode_table['S'].mode_type = 0;
}
static void
chm_sslonly(struct Client *source_p, struct Channel *chptr,
int alevel, int parc, int *parn,
const char **parv, int *errors, int dir, char c, long mode_type)
int alevel, int parc, int *parn,
const char **parv, int *errors, int dir, char c, long mode_type)
{
int newparn = 0;
const char *newparv[] = { "$~z" };
int newparn = 0;
const char *newparv[] = { "$~z" };
if (MyClient(source_p))
chm_ban(source_p, chptr, alevel, 1, &newparn, newparv,
errors, dir, 'b', CHFL_BAN);
else
chm_nosuch(source_p, chptr, alevel, parc, parn, parv,
errors, dir, c, mode_type);
if (MyClient(source_p))
chm_ban(source_p, chptr, alevel, 1, &newparn, newparv,
errors, dir, 'b', CHFL_BAN);
else
chm_nosuch(source_p, chptr, alevel, parc, parn, parv,
errors, dir, c, mode_type);
}

View File

@ -5,7 +5,6 @@
* problems. It will return ERR_NEEDREGGEDNICK on failure.
* -- nenolod
*
* $Id: createauthonly.c 833 2006-02-15 00:27:59Z jilles $
*/
#include "stdinc.h"
@ -21,8 +20,8 @@
static void h_can_create_channel_authenticated(hook_data_client_approval *);
mapi_hfn_list_av1 restrict_hfnlist[] = {
{ "can_create_channel", (hookfn) h_can_create_channel_authenticated },
{ NULL, NULL }
{ "can_create_channel", (hookfn) h_can_create_channel_authenticated },
{ NULL, NULL }
};
DECLARE_MODULE_AV1(createauthonly, NULL, NULL, NULL, NULL, restrict_hfnlist, "$Revision: 833 $");
@ -30,8 +29,8 @@ DECLARE_MODULE_AV1(createauthonly, NULL, NULL, NULL, NULL, restrict_hfnlist, "$R
static void
h_can_create_channel_authenticated(hook_data_client_approval *data)
{
struct Client *source_p = data->client;
struct Client *source_p = data->client;
if (*source_p->user->suser == '\0' && !IsOper(source_p))
data->approved = ERR_NEEDREGGEDNICK;
if (*source_p->user->suser == '\0' && !IsOper(source_p))
data->approved = ERR_NEEDREGGEDNICK;
}

View File

@ -5,7 +5,6 @@
* return ERR_NEEDREGGEDNICK on failure.
* -- nenolod
*
* $Id: createoperonly.c 3476 2007-05-24 04:28:36Z nenolod $
*/
#include "stdinc.h"
@ -21,8 +20,8 @@
static void h_can_create_channel_authenticated(hook_data_client_approval *);
mapi_hfn_list_av1 restrict_hfnlist[] = {
{ "can_create_channel", (hookfn) h_can_create_channel_authenticated },
{ NULL, NULL }
{ "can_create_channel", (hookfn) h_can_create_channel_authenticated },
{ NULL, NULL }
};
DECLARE_MODULE_AV1(createoperonly, NULL, NULL, NULL, NULL, restrict_hfnlist, "$Revision: 3476 $");
@ -30,11 +29,10 @@ DECLARE_MODULE_AV1(createoperonly, NULL, NULL, NULL, NULL, restrict_hfnlist, "$R
static void
h_can_create_channel_authenticated(hook_data_client_approval *data)
{
struct Client *source_p = data->client;
struct Client *source_p = data->client;
if (!IsOper(source_p))
{
sendto_one_notice(source_p, ":*** Channel creation is restricted to network staff only.");
data->approved = ERR_NEEDREGGEDNICK;
}
if (!IsOper(source_p)) {
sendto_one_notice(source_p, ":*** Channel creation is restricted to network staff only.");
data->approved = ERR_NEEDREGGEDNICK;
}
}

View File

@ -16,7 +16,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Id: example_module.c 3161 2007-01-25 07:23:01Z nenolod $
*/
/* List of ircd includes from ../include/ */
@ -48,25 +47,25 @@ static int moper_test(struct Client *client_p, struct Client *source_p, int parc
*/
struct Message test_msgtab = {
"TEST", /* the /COMMAND you want */
0, /* SET TO ZERO -- number of times command used by clients */
0, /* SET TO ZERO -- number of times command used by clients */
0, /* SET TO ZERO -- number of times command used by clients */
MFLG_SLOW, /* ALWAYS SET TO MFLG_SLOW */
"TEST", /* the /COMMAND you want */
0, /* SET TO ZERO -- number of times command used by clients */
0, /* SET TO ZERO -- number of times command used by clients */
0, /* SET TO ZERO -- number of times command used by clients */
MFLG_SLOW, /* ALWAYS SET TO MFLG_SLOW */
/* the functions to call for each handler. If not using the generic
* handlers, the first param is the function to call, the second is the
* required number of parameters. NOTE: If you specify a min para of 2,
* then parv[1] must *also* be non-empty.
*/
{
{munreg_test, 0}, /* function call for unregistered clients, 0 parms required */
{mclient_test, 0}, /* function call for local clients, 0 parms required */
{mrclient_test, 0}, /* function call for remote clients, 0 parms required */
{mserver_test, 0}, /* function call for servers, 0 parms required */
mg_ignore, /* function call for ENCAP, unused in this test */
{moper_test, 0} /* function call for operators, 0 parms required */
}
/* the functions to call for each handler. If not using the generic
* handlers, the first param is the function to call, the second is the
* required number of parameters. NOTE: If you specify a min para of 2,
* then parv[1] must *also* be non-empty.
*/
{
{munreg_test, 0}, /* function call for unregistered clients, 0 parms required */
{mclient_test, 0}, /* function call for local clients, 0 parms required */
{mrclient_test, 0}, /* function call for remote clients, 0 parms required */
{mserver_test, 0}, /* function call for servers, 0 parms required */
mg_ignore, /* function call for ENCAP, unused in this test */
{moper_test, 0} /* function call for operators, 0 parms required */
}
};
/*
* There are also some macros for the above function calls and parameter counts.
@ -94,9 +93,9 @@ mapi_clist_av1 test_clist[] = { &test_msgtab, NULL };
* terminated with NULLs.
*/
int doing_example_hook;
mapi_hlist_av1 test_hlist[] = {
{ "doing_example_hook", &doing_example_hook, },
{ NULL, NULL }
mapi_hlist_av1 test_hlist[] = {
{ "doing_example_hook", &doing_example_hook, },
{ NULL, NULL }
};
/* The mapi_hfn_list_av1 declares the hook functions which other modules can
@ -107,51 +106,50 @@ mapi_hlist_av1 test_hlist[] = {
static void show_example_hook(void *unused);
mapi_hfn_list_av1 test_hfnlist[] = {
{ "doing_example_hook", (hookfn) show_example_hook },
{ NULL, NULL }
{ "doing_example_hook", (hookfn) show_example_hook },
{ NULL, NULL }
};
/* Here we tell it what to do when the module is loaded */
static int
modinit(void)
{
/* Nothing to do for the example module. */
/* The init function should return -1 on failure,
which will cause the module to be unloaded,
otherwise 0 to indicate success. */
return 0;
/* Nothing to do for the example module. */
/* The init function should return -1 on failure,
which will cause the module to be unloaded,
otherwise 0 to indicate success. */
return 0;
}
/* here we tell it what to do when the module is unloaded */
static void
moddeinit(void)
{
/* Again, nothing to do. */
/* Again, nothing to do. */
}
/* DECLARE_MODULE_AV1() actually declare the MAPI header. */
DECLARE_MODULE_AV1(
/* The first argument is the name */
example,
/* The second argument is the function to call on load */
modinit,
/* And the function to call on unload */
moddeinit,
/* Then the MAPI command list */
test_clist,
/* Next the hook list, if we have one. */
test_hlist,
/* Then the hook function list, if we have one */
test_hfnlist,
/* And finally the version number of this module. */
"$Revision: 3161 $");
/* The first argument is the name */
example,
/* The second argument is the function to call on load */
modinit,
/* And the function to call on unload */
moddeinit,
/* Then the MAPI command list */
test_clist,
/* Next the hook list, if we have one. */
test_hlist,
/* Then the hook function list, if we have one */
test_hfnlist,
/* And finally the version number of this module. */
"$Revision: 3161 $");
/* Any of the above arguments can be NULL to indicate they aren't used. */
/*
* mr_test
* parv[0] = sender prefix
* parv[1] = parameter
*/
@ -161,105 +159,86 @@ DECLARE_MODULE_AV1(
static int
munreg_test(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
if(parc < 2)
{
sendto_one_notice(source_p, ":You are unregistered and sent no parameters");
}
else
{
sendto_one_notice(source_p, ":You are unregistered and sent parameter: %s", parv[1]);
}
if(parc < 2) {
sendto_one_notice(source_p, ":You are unregistered and sent no parameters");
} else {
sendto_one_notice(source_p, ":You are unregistered and sent parameter: %s", parv[1]);
}
/* illustration of how to call a hook function */
call_hook(doing_example_hook, NULL);
/* illustration of how to call a hook function */
call_hook(doing_example_hook, NULL);
return 0;
return 0;
}
/*
* mclient_test
* parv[0] = sender prefix
* parv[1] = parameter
*/
static int
mclient_test(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
if(parc < 2)
{
sendto_one_notice(source_p, ":You are a normal user, and sent no parameters");
}
else
{
sendto_one_notice(source_p, ":You are a normal user, and send parameters: %s", parv[1]);
}
if(parc < 2) {
sendto_one_notice(source_p, ":You are a normal user, and sent no parameters");
} else {
sendto_one_notice(source_p, ":You are a normal user, and send parameters: %s", parv[1]);
}
/* illustration of how to call a hook function */
call_hook(doing_example_hook, NULL);
/* illustration of how to call a hook function */
call_hook(doing_example_hook, NULL);
return 0;
return 0;
}
/*
* mrclient_test
* parv[0] = sender prefix
* parv[1] = parameter
*/
static int
mrclient_test(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
if(parc < 2)
{
sendto_one_notice(source_p, ":You are a remote client, and sent no parameters");
}
else
{
sendto_one_notice(source_p, ":You are a remote client, and sent parameters: %s", parv[1]);
}
return 0;
if(parc < 2) {
sendto_one_notice(source_p, ":You are a remote client, and sent no parameters");
} else {
sendto_one_notice(source_p, ":You are a remote client, and sent parameters: %s", parv[1]);
}
return 0;
}
/*
* mserver_test
* parv[0] = sender prefix
* parv[1] = parameter
*/
static int
mserver_test(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
if(parc < 2)
{
sendto_one_notice(source_p, ":You are a server, and sent no parameters");
}
else
{
sendto_one_notice(source_p, ":You are a server, and sent parameters: %s", parv[1]);
}
return 0;
if(parc < 2) {
sendto_one_notice(source_p, ":You are a server, and sent no parameters");
} else {
sendto_one_notice(source_p, ":You are a server, and sent parameters: %s", parv[1]);
}
return 0;
}
/*
* moper_test
* parv[0] = sender prefix
* parv[1] = parameter
*/
static int
moper_test(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
if(parc < 2)
{
sendto_one_notice(source_p, ":You are an operator, and sent no parameters");
}
else
{
sendto_one_notice(source_p, ":You are an operator, and sent parameters: %s", parv[1]);
}
return 0;
if(parc < 2) {
sendto_one_notice(source_p, ":You are an operator, and sent no parameters");
} else {
sendto_one_notice(source_p, ":You are an operator, and sent parameters: %s", parv[1]);
}
return 0;
}
static void
show_example_hook(void *unused)
{
sendto_realops_snomask(SNO_GENERAL, L_ALL, "Called example hook!");
sendto_realops_snomask(SNO_GENERAL, L_ALL, "Called example hook!");
}
/* END OF EXAMPLE MODULE */

View File

@ -2,7 +2,6 @@
* Account extban type: bans all users with any/matching account
* -- jilles
*
* $Id: extb_account.c 1299 2006-05-11 15:43:03Z jilles $
*/
#include "stdinc.h"
@ -19,25 +18,25 @@ DECLARE_MODULE_AV1(extb_account, _modinit, _moddeinit, NULL, NULL, NULL, "$Revis
static int
_modinit(void)
{
extban_table['a'] = eb_account;
extban_table['a'] = eb_account;
return 0;
return 0;
}
static void
_moddeinit(void)
{
extban_table['a'] = NULL;
extban_table['a'] = NULL;
}
static int eb_account(const char *data, struct Client *client_p,
struct Channel *chptr, long mode_type)
struct Channel *chptr, long mode_type)
{
(void)chptr;
/* $a alone matches any logged in user */
if (data == NULL)
return EmptyString(client_p->user->suser) ? EXTBAN_NOMATCH : EXTBAN_MATCH;
/* $a:MASK matches users logged in under matching account */
return match(data, client_p->user->suser) ? EXTBAN_MATCH : EXTBAN_NOMATCH;
(void)chptr;
/* $a alone matches any logged in user */
if (data == NULL)
return EmptyString(client_p->user->suser) ? EXTBAN_NOMATCH : EXTBAN_MATCH;
/* $a:MASK matches users logged in under matching account */
return match(data, client_p->user->suser) ? EXTBAN_MATCH : EXTBAN_NOMATCH;
}

View File

@ -3,7 +3,6 @@
* specified channel.
* -- nenolod/jilles
*
* $Id: extb_canjoin.c 1841 2006-08-22 17:30:03Z jilles $
*/
#include "stdinc.h"
@ -22,46 +21,46 @@ DECLARE_MODULE_AV1(extb_canjoin, _modinit, _moddeinit, NULL, NULL, NULL, "$Revis
static int
_modinit(void)
{
extban_table['j'] = eb_canjoin;
extban_table['j'] = eb_canjoin;
return 0;
return 0;
}
static void
_moddeinit(void)
{
extban_table['j'] = NULL;
extban_table['j'] = NULL;
}
static int eb_canjoin(const char *data, struct Client *client_p,
struct Channel *chptr, long mode_type)
struct Channel *chptr, long mode_type)
{
struct Channel *chptr2;
int ret;
static int recurse = 0;
struct Channel *chptr2;
int ret;
static int recurse = 0;
(void)mode_type;
/* don't process a $j in a $j'ed list */
if (recurse)
return EXTBAN_INVALID;
if (data == NULL)
return EXTBAN_INVALID;
chptr2 = find_channel(data);
/* must exist, and no point doing this with the same channel */
if (chptr2 == NULL || chptr2 == chptr)
return EXTBAN_INVALID;
/* require consistent target */
if (chptr->chname[0] == '#' && data[0] == '&')
return EXTBAN_INVALID;
/* this allows getting some information about ban exceptions
* but +s/+p doesn't seem the right criterion */
(void)mode_type;
/* don't process a $j in a $j'ed list */
if (recurse)
return EXTBAN_INVALID;
if (data == NULL)
return EXTBAN_INVALID;
chptr2 = find_channel(data);
/* must exist, and no point doing this with the same channel */
if (chptr2 == NULL || chptr2 == chptr)
return EXTBAN_INVALID;
/* require consistent target */
if (chptr->chname[0] == '#' && data[0] == '&')
return EXTBAN_INVALID;
/* this allows getting some information about ban exceptions
* but +s/+p doesn't seem the right criterion */
#if 0
/* privacy! don't allow +s/+p channels to influence another channel */
if (!PubChannel(chptr2))
return EXTBAN_INVALID;
/* privacy! don't allow +s/+p channels to influence another channel */
if (!PubChannel(chptr2))
return EXTBAN_INVALID;
#endif
recurse = 1;
ret = is_banned(chptr2, client_p, NULL, NULL, NULL) == CHFL_BAN ? EXTBAN_MATCH : EXTBAN_NOMATCH;
recurse = 0;
return ret;
recurse = 1;
ret = is_banned(chptr2, client_p, NULL, NULL, NULL) == CHFL_BAN ? EXTBAN_MATCH : EXTBAN_NOMATCH;
recurse = 0;
return ret;
}

View File

@ -2,7 +2,6 @@
* Channel extban type: matches users who are in a certain public channel
* -- jilles
*
* $Id: extb_channel.c 1723 2006-07-06 15:23:58Z jilles $
*/
#include "stdinc.h"
@ -21,34 +20,34 @@ DECLARE_MODULE_AV1(extb_channel, _modinit, _moddeinit, NULL, NULL, NULL, "$Revis
static int
_modinit(void)
{
extban_table['c'] = eb_channel;
extban_table['c'] = eb_channel;
return 0;
return 0;
}
static void
_moddeinit(void)
{
extban_table['c'] = NULL;
extban_table['c'] = NULL;
}
static int eb_channel(const char *data, struct Client *client_p,
struct Channel *chptr, long mode_type)
struct Channel *chptr, long mode_type)
{
struct Channel *chptr2;
struct Channel *chptr2;
(void)chptr;
(void)mode_type;
if (data == NULL)
return EXTBAN_INVALID;
chptr2 = find_channel(data);
if (chptr2 == NULL)
return EXTBAN_INVALID;
/* require consistent target */
if (chptr->chname[0] == '#' && data[0] == '&')
return EXTBAN_INVALID;
/* privacy! don't allow +s/+p channels to influence another channel */
if (!PubChannel(chptr2))
return EXTBAN_INVALID;
return IsMember(client_p, chptr2) ? EXTBAN_MATCH : EXTBAN_NOMATCH;
(void)chptr;
(void)mode_type;
if (data == NULL)
return EXTBAN_INVALID;
chptr2 = find_channel(data);
if (chptr2 == NULL)
return EXTBAN_INVALID;
/* require consistent target */
if (chptr->chname[0] == '#' && data[0] == '&')
return EXTBAN_INVALID;
/* privacy! don't allow +s/+p channels to influence another channel */
if (!PubChannel(chptr2))
return EXTBAN_INVALID;
return IsMember(client_p, chptr2) ? EXTBAN_MATCH : EXTBAN_NOMATCH;
}

View File

@ -3,7 +3,6 @@
* Requested by Lockwood.
* - nenolod
*
* $Id: extb_realname.c 1339 2006-05-17 00:45:40Z nenolod $
*/
#include "stdinc.h"
@ -20,40 +19,39 @@ DECLARE_MODULE_AV1(extb_extended, _modinit, _moddeinit, NULL, NULL, NULL, "$Revi
static int
_modinit(void)
{
extban_table['x'] = eb_extended;
extban_table['x'] = eb_extended;
return 0;
return 0;
}
static void
_moddeinit(void)
{
extban_table['x'] = NULL;
extban_table['x'] = NULL;
}
static int eb_extended(const char *data, struct Client *client_p,
struct Channel *chptr, long mode_type)
struct Channel *chptr, long mode_type)
{
char buf[BUFSIZE];
int ret;
char buf[BUFSIZE];
int ret;
(void)chptr;
(void)chptr;
if (data == NULL)
return EXTBAN_INVALID;
if (data == NULL)
return EXTBAN_INVALID;
rb_snprintf(buf, BUFSIZE, "%s!%s@%s#%s",
client_p->name, client_p->username, client_p->host, client_p->info);
snprintf(buf, BUFSIZE, "%s!%s@%s#%s",
client_p->name, client_p->username, client_p->host, client_p->info);
ret = match(data, buf) ? EXTBAN_MATCH : EXTBAN_NOMATCH;
ret = match(data, buf) ? EXTBAN_MATCH : EXTBAN_NOMATCH;
if (ret == EXTBAN_NOMATCH && IsDynSpoof(client_p))
{
rb_snprintf(buf, BUFSIZE, "%s!%s@%s#%s",
client_p->name, client_p->username, client_p->orighost, client_p->info);
if (ret == EXTBAN_NOMATCH && IsDynSpoof(client_p)) {
snprintf(buf, BUFSIZE, "%s!%s@%s#%s",
client_p->name, client_p->username, client_p->orighost, client_p->info);
ret = match(data, buf) ? EXTBAN_MATCH : EXTBAN_NOMATCH;
}
ret = match(data, buf) ? EXTBAN_MATCH : EXTBAN_NOMATCH;
}
return ret;
return ret;
}

View File

@ -2,7 +2,6 @@
* Oper extban type: matches opers
* -- jilles
*
* $Id: extb_oper.c 1299 2006-05-11 15:43:03Z jilles $
*/
#include "stdinc.h"
@ -19,26 +18,26 @@ DECLARE_MODULE_AV1(extb_oper, _modinit, _moddeinit, NULL, NULL, NULL, "$Revision
static int
_modinit(void)
{
extban_table['o'] = eb_oper;
extban_table['o'] = eb_oper;
return 0;
return 0;
}
static void
_moddeinit(void)
{
extban_table['o'] = NULL;
extban_table['o'] = NULL;
}
static int eb_oper(const char *data, struct Client *client_p,
struct Channel *chptr, long mode_type)
struct Channel *chptr, long mode_type)
{
(void)chptr;
(void)mode_type;
/* perhaps use data somehow? (opernick/flags?) */
/* so deny any bans with data for now */
if (data != NULL)
return EXTBAN_INVALID;
return IsOper(client_p) ? EXTBAN_MATCH : EXTBAN_NOMATCH;
(void)chptr;
(void)mode_type;
/* perhaps use data somehow? (opernick/flags?) */
/* so deny any bans with data for now */
if (data != NULL)
return EXTBAN_INVALID;
return IsOper(client_p) ? EXTBAN_MATCH : EXTBAN_NOMATCH;
}

View File

@ -2,7 +2,6 @@
* Realname extban type: bans all users with matching gecos
* -- jilles
*
* $Id: extb_realname.c 1299 2006-05-11 15:43:03Z jilles $
*/
#include "stdinc.h"
@ -19,26 +18,26 @@ DECLARE_MODULE_AV1(extb_realname, _modinit, _moddeinit, NULL, NULL, NULL, "$Revi
static int
_modinit(void)
{
extban_table['r'] = eb_realname;
extban_table['r'] = eb_realname;
return 0;
return 0;
}
static void
_moddeinit(void)
{
extban_table['r'] = NULL;
extban_table['r'] = NULL;
}
static int eb_realname(const char *data, struct Client *client_p,
struct Channel *chptr, long mode_type)
struct Channel *chptr, long mode_type)
{
(void)chptr;
/* This type is not safe for exceptions */
if (mode_type == CHFL_EXCEPTION || mode_type == CHFL_INVEX)
return EXTBAN_INVALID;
if (data == NULL)
return EXTBAN_INVALID;
return match(data, client_p->info) ? EXTBAN_MATCH : EXTBAN_NOMATCH;
(void)chptr;
/* This type is not safe for exceptions */
if (mode_type == CHFL_EXCEPTION || mode_type == CHFL_INVEX)
return EXTBAN_INVALID;
if (data == NULL)
return EXTBAN_INVALID;
return match(data, client_p->info) ? EXTBAN_MATCH : EXTBAN_NOMATCH;
}

View File

@ -2,7 +2,6 @@
* Server name extban type: bans all users using a certain server
* -- jilles
*
* $Id: extb_server.c 1299 2006-05-11 15:43:03Z jilles $
*/
#include "stdinc.h"
@ -19,26 +18,26 @@ DECLARE_MODULE_AV1(extb_server, _modinit, _moddeinit, NULL, NULL, NULL, "$Revisi
static int
_modinit(void)
{
extban_table['s'] = eb_server;
extban_table['s'] = eb_server;
return 0;
return 0;
}
static void
_moddeinit(void)
{
extban_table['s'] = NULL;
extban_table['s'] = NULL;
}
static int eb_server(const char *data, struct Client *client_p,
struct Channel *chptr, long mode_type)
struct Channel *chptr, long mode_type)
{
(void)chptr;
/* This type is not safe for exceptions */
if (mode_type == CHFL_EXCEPTION || mode_type == CHFL_INVEX)
return EXTBAN_INVALID;
if (data == NULL)
return EXTBAN_INVALID;
return match(data, me.name) ? EXTBAN_MATCH : EXTBAN_NOMATCH;
(void)chptr;
/* This type is not safe for exceptions */
if (mode_type == CHFL_EXCEPTION || mode_type == CHFL_INVEX)
return EXTBAN_INVALID;
if (data == NULL)
return EXTBAN_INVALID;
return match(data, me.name) ? EXTBAN_MATCH : EXTBAN_NOMATCH;
}

View File

@ -14,24 +14,24 @@ DECLARE_MODULE_AV1(extb_ssl, _modinit, _moddeinit, NULL, NULL, NULL, "$Revision$
static int
_modinit(void)
{
extban_table['z'] = eb_ssl;
extban_table['z'] = eb_ssl;
return 0;
return 0;
}
static void
_moddeinit(void)
{
extban_table['z'] = NULL;
extban_table['z'] = NULL;
}
static int eb_ssl(const char *data, struct Client *client_p,
struct Channel *chptr, long mode_type)
struct Channel *chptr, long mode_type)
{
(void)chptr;
(void)mode_type;
if (data != NULL)
return EXTBAN_INVALID;
return IsSSLClient(client_p) ? EXTBAN_MATCH : EXTBAN_NOMATCH;
(void)chptr;
(void)mode_type;
if (data != NULL)
return EXTBAN_INVALID;
return IsSSLClient(client_p) ? EXTBAN_MATCH : EXTBAN_NOMATCH;
}

View File

@ -18,8 +18,8 @@
static void h_noi_umode_changed(hook_data_umode_changed *);
mapi_hfn_list_av1 noi_hfnlist[] = {
{ "umode_changed", (hookfn) h_noi_umode_changed },
{ NULL, NULL }
{ "umode_changed", (hookfn) h_noi_umode_changed },
{ NULL, NULL }
};
DECLARE_MODULE_AV1(force_user_invis, NULL, NULL, NULL, NULL, noi_hfnlist, "1.0.0");
@ -27,9 +27,9 @@ DECLARE_MODULE_AV1(force_user_invis, NULL, NULL, NULL, NULL, noi_hfnlist, "1.0.0
static void
h_noi_umode_changed(hook_data_umode_changed *hdata)
{
struct Client *source_p = hdata->client;
struct Client *source_p = hdata->client;
if (MyClient(source_p) && !IsOper(source_p) && !IsInvisible(source_p)) {
SetInvisible(source_p);
}
if (MyClient(source_p) && !IsOper(source_p) && !IsInvisible(source_p)) {
SetInvisible(source_p);
}
}

View File

@ -4,7 +4,6 @@
* Copyright (C) 2006 charybdis development team
* All rights reserved
*
* $Id: hurt.c 3161 2007-01-25 07:23:01Z nenolod $
*/
#include "stdinc.h"
#include "modules.h"
@ -24,25 +23,25 @@
#define HURT_EXIT_REASON "Hurt: Failed to identify to services"
enum {
HEAL_NICK = 0,
HEAL_IP
HEAL_NICK = 0,
HEAL_IP
};
typedef struct _hurt_state {
time_t start_time;
uint32_t n_hurts;
rb_dlink_list hurt_clients;
uint16_t cutoff;
time_t default_expire;
const char *exit_reason;
time_t start_time;
uint32_t n_hurts;
rb_dlink_list hurt_clients;
uint16_t cutoff;
time_t default_expire;
const char *exit_reason;
} hurt_state_t;
typedef struct _hurt {
char *ip;
struct sockaddr *saddr;
int saddr_bits;
char *reason;
time_t expire;
char *ip;
struct sockaddr *saddr;
int saddr_bits;
char *reason;
time_t expire;
} hurt_t;
/* }}} */
@ -83,45 +82,45 @@ rb_dlink_list hurt_confs = { NULL, NULL, 0 };
/* {{{ Messages */
struct Message hurt_msgtab = {
"HURT", 0, 0, 0, MFLG_SLOW, {
mg_ignore, mg_ignore, mg_ignore,
mg_ignore, {me_hurt, 0}, {mo_hurt, 3}
}
"HURT", 0, 0, 0, MFLG_SLOW, {
mg_ignore, mg_ignore, mg_ignore,
mg_ignore, {me_hurt, 0}, {mo_hurt, 3}
}
};
struct Message heal_msgtab = {
"HEAL", 0, 0, 0, MFLG_SLOW, {
mg_ignore, mg_ignore, mg_ignore,
mg_ignore, {me_heal, 0}, {mo_heal, 2}
}
"HEAL", 0, 0, 0, MFLG_SLOW, {
mg_ignore, mg_ignore, mg_ignore,
mg_ignore, {me_heal, 0}, {mo_heal, 2}
}
};
/* }}} */
/* {{{ Misc module stuff */
mapi_hfn_list_av1 hurt_hfnlist[] = {
{"client_exit", (hookfn) client_exit_hook},
{"new_local_user", (hookfn) new_local_user_hook},
{"doing_stats", (hookfn) doing_stats_hook},
{NULL, NULL},
{"client_exit", (hookfn) client_exit_hook},
{"new_local_user", (hookfn) new_local_user_hook},
{"doing_stats", (hookfn) doing_stats_hook},
{NULL, NULL},
};
mapi_clist_av1 hurt_clist[] = { &hurt_msgtab, &heal_msgtab, NULL };
DECLARE_MODULE_AV1(
hurt,
modinit,
modfini,
hurt_clist,
NULL,
hurt_hfnlist,
"$Revision: 3161 $"
hurt,
modinit,
modfini,
hurt_clist,
NULL,
hurt_hfnlist,
"$Revision: 3161 $"
);
/* }}} */
hurt_state_t hurt_state = {
.cutoff = HURT_CUTOFF,
.default_expire = HURT_DEFAULT_EXPIRE,
.exit_reason = HURT_EXIT_REASON,
.cutoff = HURT_CUTOFF,
.default_expire = HURT_DEFAULT_EXPIRE,
.exit_reason = HURT_EXIT_REASON,
};
/*
@ -136,14 +135,14 @@ struct ev_entry *hurt_check_ev = NULL;
static int
modinit(void)
{
/* set-up hurt_state. */
hurt_state.start_time = rb_current_time();
/* set-up hurt_state. */
hurt_state.start_time = rb_current_time();
/* add our event handlers. */
hurt_expire_ev = rb_event_add("hurt_expire", hurt_expire_event, NULL, 60);
hurt_check_ev = rb_event_add("hurt_check", hurt_check_event, NULL, 5);
/* add our event handlers. */
hurt_expire_ev = rb_event_add("hurt_expire", hurt_expire_event, NULL, 60);
hurt_check_ev = rb_event_add("hurt_check", hurt_check_event, NULL, 5);
return 0;
return 0;
}
/* }}} */
@ -151,16 +150,15 @@ modinit(void)
static void
modfini(void)
{
rb_dlink_node *ptr, *next_ptr;
rb_dlink_node *ptr, *next_ptr;
/* and delete our events. */
rb_event_delete(hurt_expire_ev);
rb_event_delete(hurt_check_ev);
/* and delete our events. */
rb_event_delete(hurt_expire_ev);
rb_event_delete(hurt_check_ev);
RB_DLINK_FOREACH_SAFE (ptr, next_ptr, hurt_state.hurt_clients.head)
{
rb_dlinkDestroy(ptr, &hurt_state.hurt_clients);
}
RB_DLINK_FOREACH_SAFE (ptr, next_ptr, hurt_state.hurt_clients.head) {
rb_dlinkDestroy(ptr, &hurt_state.hurt_clients);
}
}
/* }}} */
@ -171,84 +169,79 @@ modfini(void)
/* {{{ static int mo_hurt()
*
* HURT [<expire>] <ip> <reason>
*
*
* parv[1] - expire or ip
* parv[2] - ip or reason
* parv[3] - reason or NULL
*/
static int
mo_hurt(struct Client *client_p, struct Client *source_p,
int parc, const char **parv)
int parc, const char **parv)
{
const char *ip, *expire, *reason;
int expire_time;
hurt_t *hurt;
struct Client *target_p;
const char *ip, *expire, *reason;
int expire_time;
hurt_t *hurt;
struct Client *target_p;
if (!IsOperK(source_p)) {
sendto_one(source_p, form_str(ERR_NOPRIVS), me.name,
source_p->name, "kline");
return 0;
}
if (!IsOperK(source_p)) {
sendto_one(source_p, form_str(ERR_NOPRIVS), me.name,
source_p->name, "kline");
return 0;
}
if (parc == 3)
expire = NULL, ip = parv[1], reason = parv[2];
else
expire = parv[1], ip = parv[2], reason = parv[3];
if (parc == 3)
expire = NULL, ip = parv[1], reason = parv[2];
else
expire = parv[1], ip = parv[2], reason = parv[3];
if (!expire)
expire_time = HURT_DEFAULT_EXPIRE;
if (expire && (expire_time = valid_temp_time(expire)) < 1) {
sendto_one_notice(source_p, ":Permanent HURTs are not supported");
return 0;
}
if (EmptyString(reason)) {
sendto_one_notice(source_p, ":Empty HURT reasons are bad for business");
return 0;
}
if (!expire)
expire_time = HURT_DEFAULT_EXPIRE;
if (expire && (expire_time = valid_temp_time(expire)) < 1) {
sendto_one_notice(source_p, ":Permanent HURTs are not supported");
return 0;
}
if (EmptyString(reason)) {
sendto_one_notice(source_p, ":Empty HURT reasons are bad for business");
return 0;
}
/* Is this a client? */
if (strchr(ip, '.') == NULL && strchr(ip, ':') == NULL)
{
target_p = find_named_person(ip);
if (target_p == NULL)
{
sendto_one_numeric(source_p, ERR_NOSUCHNICK,
form_str(ERR_NOSUCHNICK), ip);
return 0;
}
ip = target_p->orighost;
}
else
{
if (!strncmp(ip, "*@", 2))
ip += 2;
if (strchr(ip, '!') || strchr(ip, '@'))
{
sendto_one_notice(source_p, ":Invalid HURT mask [%s]",
ip);
return 0;
}
}
/* Is this a client? */
if (strchr(ip, '.') == NULL && strchr(ip, ':') == NULL) {
target_p = find_named_person(ip);
if (target_p == NULL) {
sendto_one_numeric(source_p, ERR_NOSUCHNICK,
form_str(ERR_NOSUCHNICK), ip);
return 0;
}
ip = target_p->orighost;
} else {
if (!strncmp(ip, "*@", 2))
ip += 2;
if (strchr(ip, '!') || strchr(ip, '@')) {
sendto_one_notice(source_p, ":Invalid HURT mask [%s]",
ip);
return 0;
}
}
if (hurt_find(ip) != NULL) {
sendto_one(source_p, ":[%s] already HURT", ip);
return 0;
}
if (hurt_find(ip) != NULL) {
sendto_one(source_p, ":[%s] already HURT", ip);
return 0;
}
/*
* okay, we've got this far, now it's time to add the the HURT locally
* and propagate it to other servers on the network.
*/
sendto_realops_snomask(SNO_GENERAL, L_ALL,
"%s added HURT on [%s] for %ld minutes with reason [%s]",
get_oper_name(source_p), ip, (long) expire_time / 60, reason);
/*
* okay, we've got this far, now it's time to add the the HURT locally
* and propagate it to other servers on the network.
*/
sendto_realops_snomask(SNO_GENERAL, L_ALL,
"%s added HURT on [%s] for %ld minutes with reason [%s]",
get_oper_name(source_p), ip, (long) expire_time / 60, reason);
hurt = hurt_new(expire_time, ip, reason);
hurt_add(hurt);
hurt_propagate(NULL, source_p, hurt);
hurt = hurt_new(expire_time, ip, reason);
hurt_add(hurt);
hurt_propagate(NULL, source_p, hurt);
return 0;
return 0;
}
/* }}} */
@ -262,32 +255,32 @@ mo_hurt(struct Client *client_p, struct Client *source_p,
*/
static int
me_hurt(struct Client *client_p, struct Client *source_p,
int parc, const char **parv)
int parc, const char **parv)
{
time_t expire_time;
hurt_t *hurt;
time_t expire_time;
hurt_t *hurt;
/*
* right... if we don't get enough arguments, or if we get any invalid
* arguments, just ignore this request - shit happens, and it's not worth
* dropping a server over.
*/
if (parc < 4 || !IsPerson(source_p))
return 0;
if ((expire_time = atoi(parv[1])) < 1)
return 0;
if (hurt_find(parv[2]) != NULL)
return 0;
if (EmptyString(parv[3]))
return 0;
/*
* right... if we don't get enough arguments, or if we get any invalid
* arguments, just ignore this request - shit happens, and it's not worth
* dropping a server over.
*/
if (parc < 4 || !IsPerson(source_p))
return 0;
if ((expire_time = atoi(parv[1])) < 1)
return 0;
if (hurt_find(parv[2]) != NULL)
return 0;
if (EmptyString(parv[3]))
return 0;
sendto_realops_snomask(SNO_GENERAL, L_ALL,
"%s added HURT on [%s] for %ld minutes with reason [%s]",
get_oper_name(source_p), parv[2], (long) expire_time / 60, parv[3]);
hurt = hurt_new(expire_time, parv[2], parv[3]);
hurt_add(hurt);
sendto_realops_snomask(SNO_GENERAL, L_ALL,
"%s added HURT on [%s] for %ld minutes with reason [%s]",
get_oper_name(source_p), parv[2], (long) expire_time / 60, parv[3]);
hurt = hurt_new(expire_time, parv[2], parv[3]);
hurt_add(hurt);
return 0;
return 0;
}
/* }}} */
@ -299,88 +292,76 @@ me_hurt(struct Client *client_p, struct Client *source_p,
*/
static int
mo_heal(struct Client *client_p, struct Client *source_p,
int parc, const char **parv)
int parc, const char **parv)
{
struct Client *target_p;
struct Client *target_p;
if (!IsOperUnkline(source_p))
{
sendto_one(source_p, form_str(ERR_NOPRIVS),
me.name, source_p->name, "unkline");
return 0;
}
if (!IsOperUnkline(source_p)) {
sendto_one(source_p, form_str(ERR_NOPRIVS),
me.name, source_p->name, "unkline");
return 0;
}
if (nick_is_valid(parv[1]))
{
target_p = find_named_person(parv[1]);
if (target_p == NULL)
{
sendto_one_numeric(source_p, ERR_NOSUCHNICK,
form_str(ERR_NOSUCHNICK), parv[1]);
return 0;
}
if (MyConnect(target_p))
heal_nick(source_p, target_p);
else
sendto_one(target_p, ":%s ENCAP %s HEAL %s",
get_id(source_p, target_p),
target_p->servptr->name,
get_id(target_p, target_p));
}
else if (strchr(parv[1], '.'))
{
if (hurt_find_exact(parv[1]) == NULL)
{
sendto_one_notice(source_p, ":Mask [%s] is not HURT", parv[1]);
return 0;
}
hurt_remove(parv[1]);
sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s removed HURT on %s",
get_oper_name(source_p), parv[1]);
sendto_server(NULL, NULL, NOCAPS, NOCAPS, ":%s ENCAP * HEAL %s",
source_p->name, parv[1]);
}
else
{
sendto_one(source_p, ":[%s] is not a valid IP address/nick", parv[1]);
return 0;
}
if (nick_is_valid(parv[1])) {
target_p = find_named_person(parv[1]);
if (target_p == NULL) {
sendto_one_numeric(source_p, ERR_NOSUCHNICK,
form_str(ERR_NOSUCHNICK), parv[1]);
return 0;
}
if (MyConnect(target_p))
heal_nick(source_p, target_p);
else
sendto_one(target_p, ":%s ENCAP %s HEAL %s",
get_id(source_p, target_p),
target_p->servptr->name,
get_id(target_p, target_p));
} else if (strchr(parv[1], '.')) {
if (hurt_find_exact(parv[1]) == NULL) {
sendto_one_notice(source_p, ":Mask [%s] is not HURT", parv[1]);
return 0;
}
hurt_remove(parv[1]);
sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s removed HURT on %s",
get_oper_name(source_p), parv[1]);
sendto_server(NULL, NULL, NOCAPS, NOCAPS, ":%s ENCAP * HEAL %s",
source_p->name, parv[1]);
} else {
sendto_one(source_p, ":[%s] is not a valid IP address/nick", parv[1]);
return 0;
}
return 0;
return 0;
}
/* }}} */
static int
me_heal(struct Client *client_p, struct Client *source_p,
int parc, const char **parv)
int parc, const char **parv)
{
struct Client *target_p;
struct Client *target_p;
/* as noted in me_hurt(), if we don't get sufficient arguments...
* *poof*, it's dropped...
*/
if (parc < 2)
return 0;
/* as noted in me_hurt(), if we don't get sufficient arguments...
* *poof*, it's dropped...
*/
if (parc < 2)
return 0;
if (nick_is_valid(parv[1]))
{
target_p = find_person(parv[1]);
if (target_p != NULL && MyConnect(target_p))
heal_nick(source_p, target_p);
}
else if (strchr(parv[1], '.')) /* host or mask to remove ban for */
{
if (hurt_find_exact(parv[1]) == NULL)
return 0;
if (nick_is_valid(parv[1])) {
target_p = find_person(parv[1]);
if (target_p != NULL && MyConnect(target_p))
heal_nick(source_p, target_p);
} else if (strchr(parv[1], '.')) { /* host or mask to remove ban for */
if (hurt_find_exact(parv[1]) == NULL)
return 0;
hurt_remove(parv[1]);
sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s removed HURT on %s",
get_oper_name(source_p), parv[1]);
}
else
return 0;
hurt_remove(parv[1]);
sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s removed HURT on %s",
get_oper_name(source_p), parv[1]);
} else
return 0;
return 0;
return 0;
}
/*
@ -391,21 +372,18 @@ me_heal(struct Client *client_p, struct Client *source_p,
static void
hurt_check_event(void *arg)
{
rb_dlink_node *ptr, *next_ptr;
struct Client *client_p;
rb_dlink_node *ptr, *next_ptr;
struct Client *client_p;
RB_DLINK_FOREACH_SAFE (ptr, next_ptr, hurt_state.hurt_clients.head) {
client_p = ptr->data;
if (!EmptyString(client_p->user->suser))
{
rb_dlinkDestroy(ptr, &hurt_state.hurt_clients);
sendto_one_notice(client_p, ":HURT restriction removed for this session");
USED_TARGETS(client_p) = 0;
client_p->localClient->target_last = rb_current_time(); /* don't ask --nenolod */
}
else if (client_p->localClient->receiveM > hurt_state.cutoff)
exit_client(NULL, client_p, &me, hurt_state.exit_reason);
}
RB_DLINK_FOREACH_SAFE (ptr, next_ptr, hurt_state.hurt_clients.head) {
client_p = ptr->data;
if (!EmptyString(client_p->user->suser)) {
rb_dlinkDestroy(ptr, &hurt_state.hurt_clients);
sendto_one_notice(client_p, ":HURT restriction removed for this session");
client_p->localClient->target_last = rb_current_time(); /* don't ask --nenolod */
} else if (client_p->localClient->receiveM > hurt_state.cutoff)
exit_client(NULL, client_p, &me, hurt_state.exit_reason);
}
}
/* }}} */
@ -413,19 +391,17 @@ hurt_check_event(void *arg)
static void
hurt_expire_event(void *unused)
{
rb_dlink_node *ptr, *next_ptr;
hurt_t *hurt;
rb_dlink_node *ptr, *next_ptr;
hurt_t *hurt;
RB_DLINK_FOREACH_SAFE (ptr, next_ptr, hurt_confs.head)
{
hurt = (hurt_t *) ptr->data;
RB_DLINK_FOREACH_SAFE (ptr, next_ptr, hurt_confs.head) {
hurt = (hurt_t *) ptr->data;
if (hurt->expire <= rb_current_time())
{
rb_dlinkFindDestroy(hurt, &hurt_confs);
hurt_destroy(hurt);
}
}
if (hurt->expire <= rb_current_time()) {
rb_dlinkFindDestroy(hurt, &hurt_confs);
hurt_destroy(hurt);
}
}
}
/* }}} */
@ -437,10 +413,10 @@ hurt_expire_event(void *unused)
static void
client_exit_hook(hook_data_client_exit *data)
{
s_assert(data != NULL);
s_assert(data->target != NULL);
s_assert(data != NULL);
s_assert(data->target != NULL);
rb_dlinkFindDestroy(data->target, &hurt_state.hurt_clients);
rb_dlinkFindDestroy(data->target, &hurt_state.hurt_clients);
}
/* }}} */
@ -448,18 +424,16 @@ client_exit_hook(hook_data_client_exit *data)
static void
new_local_user_hook(struct Client *source_p)
{
if (IsAnyDead(source_p) || !EmptyString(source_p->user->suser) ||
IsExemptKline(source_p))
return;
if (IsAnyDead(source_p) || !EmptyString(source_p->user->suser) ||
IsExemptKline(source_p))
return;
if (hurt_find(source_p->sockhost) || hurt_find(source_p->orighost))
{
USED_TARGETS(source_p) = 10;
source_p->localClient->target_last = rb_current_time() + 600; /* don't ask --nenolod */
SetTGChange(source_p);
rb_dlinkAddAlloc(source_p, &hurt_state.hurt_clients);
sendto_one_notice(source_p, ":You are hurt. Please identify to services immediately, or use /stats p for assistance.");
}
if (hurt_find(source_p->sockhost) || hurt_find(source_p->orighost)) {
source_p->localClient->target_last = rb_current_time() + 600; /* don't ask --nenolod */
SetTGChange(source_p);
rb_dlinkAddAlloc(source_p, &hurt_state.hurt_clients);
sendto_one_notice(source_p, ":You are hurt. Please identify to services immediately, or use /stats p for assistance.");
}
}
/* }}} */
@ -467,47 +441,43 @@ new_local_user_hook(struct Client *source_p)
static void
doing_stats_hook(hook_data_int *hdata)
{
rb_dlink_node *ptr;
hurt_t *hurt;
struct Client *source_p;
rb_dlink_node *ptr;
hurt_t *hurt;
struct Client *source_p;
s_assert(hdata);
s_assert(hdata->client);
s_assert(hdata);
s_assert(hdata->client);
source_p = hdata->client;
if(hdata->arg2 != (int) 's')
return;
if((ConfigFileEntry.stats_k_oper_only == 2) && !IsOper(source_p))
return;
if ((ConfigFileEntry.stats_k_oper_only == 1) && !IsOper(source_p))
{
hurt = hurt_find(source_p->sockhost);
if (hurt != NULL)
{
sendto_one_numeric(source_p, RPL_STATSKLINE,
form_str(RPL_STATSKLINE), 's',
"*", hurt->ip, hurt->reason, "", "");
return;
}
source_p = hdata->client;
if(hdata->arg2 != (int) 's')
return;
if((ConfigFileEntry.stats_k_oper_only == 2) && !IsOper(source_p))
return;
if ((ConfigFileEntry.stats_k_oper_only == 1) && !IsOper(source_p)) {
hurt = hurt_find(source_p->sockhost);
if (hurt != NULL) {
sendto_one_numeric(source_p, RPL_STATSKLINE,
form_str(RPL_STATSKLINE), 's',
"*", hurt->ip, hurt->reason, "", "");
return;
}
hurt = hurt_find(source_p->orighost);
if (hurt != NULL)
{
sendto_one_numeric(source_p, RPL_STATSKLINE,
form_str(RPL_STATSKLINE), 's',
"*", hurt->ip, hurt->reason, "", "");
return;
}
return;
}
hurt = hurt_find(source_p->orighost);
if (hurt != NULL) {
sendto_one_numeric(source_p, RPL_STATSKLINE,
form_str(RPL_STATSKLINE), 's',
"*", hurt->ip, hurt->reason, "", "");
return;
}
return;
}
RB_DLINK_FOREACH(ptr, hurt_confs.head)
{
hurt = (hurt_t *) ptr->data;
sendto_one_numeric(source_p, RPL_STATSKLINE,
form_str(RPL_STATSKLINE), 's',
"*", hurt->ip, hurt->reason, "", "");
}
RB_DLINK_FOREACH(ptr, hurt_confs.head) {
hurt = (hurt_t *) ptr->data;
sendto_one_numeric(source_p, RPL_STATSKLINE,
form_str(RPL_STATSKLINE), 's',
"*", hurt->ip, hurt->reason, "", "");
}
}
/* }}} */
@ -521,18 +491,18 @@ doing_stats_hook(hook_data_int *hdata)
static void
hurt_propagate(struct Client *client_p, struct Client *source_p, hurt_t *hurt)
{
if (client_p)
sendto_one(client_p,
":%s ENCAP %s HURT %ld %s :%s",
source_p->name, client_p->name,
(long)(hurt->expire - rb_current_time()),
hurt->ip, hurt->reason);
else
sendto_server(&me, NULL, NOCAPS, NOCAPS,
":%s ENCAP * HURT %ld %s :%s",
source_p->name,
(long)(hurt->expire - rb_current_time()),
hurt->ip, hurt->reason);
if (client_p)
sendto_one(client_p,
":%s ENCAP %s HURT %ld %s :%s",
source_p->name, client_p->name,
(long)(hurt->expire - rb_current_time()),
hurt->ip, hurt->reason);
else
sendto_server(&me, NULL, NOCAPS, NOCAPS,
":%s ENCAP * HURT %ld %s :%s",
source_p->name,
(long)(hurt->expire - rb_current_time()),
hurt->ip, hurt->reason);
}
/* }}} */
@ -540,15 +510,15 @@ hurt_propagate(struct Client *client_p, struct Client *source_p, hurt_t *hurt)
static hurt_t *
hurt_new(time_t expire, const char *ip, const char *reason)
{
hurt_t *hurt;
hurt_t *hurt;
hurt = rb_malloc(sizeof(hurt_t));
hurt = rb_malloc(sizeof(hurt_t));
hurt->ip = rb_strdup(ip);
hurt->reason = rb_strdup(reason);
hurt->expire = rb_current_time() + expire;
hurt->ip = rb_strdup(ip);
hurt->reason = rb_strdup(reason);
hurt->expire = rb_current_time() + expire;
return hurt;
return hurt;
}
/* }}} */
@ -556,86 +526,80 @@ hurt_new(time_t expire, const char *ip, const char *reason)
static void
hurt_destroy(void *hurt)
{
hurt_t *h;
hurt_t *h;
if (!hurt)
return;
if (!hurt)
return;
h = (hurt_t *) hurt;
rb_free(h->ip);
rb_free(h->reason);
rb_free(h);
h = (hurt_t *) hurt;
rb_free(h->ip);
rb_free(h->reason);
rb_free(h);
}
/* }}} */
static void
hurt_add(hurt_t *hurt)
{
rb_dlinkAddAlloc(hurt, &hurt_confs);
rb_dlinkAddAlloc(hurt, &hurt_confs);
}
static hurt_t *
hurt_find_exact(const char *ip)
{
rb_dlink_node *ptr;
hurt_t *hurt;
rb_dlink_node *ptr;
hurt_t *hurt;
RB_DLINK_FOREACH(ptr, hurt_confs.head)
{
hurt = (hurt_t *) ptr->data;
RB_DLINK_FOREACH(ptr, hurt_confs.head) {
hurt = (hurt_t *) ptr->data;
if (!strcasecmp(ip, hurt->ip))
return hurt;
}
if (!strcasecmp(ip, hurt->ip))
return hurt;
}
return NULL;
return NULL;
}
static hurt_t *
hurt_find(const char *ip)
{
rb_dlink_node *ptr;
hurt_t *hurt;
rb_dlink_node *ptr;
hurt_t *hurt;
RB_DLINK_FOREACH(ptr, hurt_confs.head)
{
hurt = (hurt_t *) ptr->data;
RB_DLINK_FOREACH(ptr, hurt_confs.head) {
hurt = (hurt_t *) ptr->data;
if (match(hurt->ip, ip))
return hurt;
}
if (match(hurt->ip, ip))
return hurt;
}
return NULL;
return NULL;
}
static void
hurt_remove(const char *ip)
{
hurt_t *hurt = hurt_find_exact(ip);
hurt_t *hurt = hurt_find_exact(ip);
rb_dlinkFindDestroy(hurt, &hurt_confs);
hurt_destroy(hurt);
rb_dlinkFindDestroy(hurt, &hurt_confs);
hurt_destroy(hurt);
}
/* {{{ static int heal_nick() */
static int
heal_nick(struct Client *source_p, struct Client *target_p)
{
if (rb_dlinkFindDestroy(target_p, &hurt_state.hurt_clients))
{
sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s used HEAL on %s",
get_oper_name(source_p), get_client_name(target_p, HIDE_IP));
sendto_one_notice(target_p, ":HURT restriction temporarily removed by operator");
sendto_one_notice(source_p, ":HURT restriction on %s temporarily removed", target_p->name);
USED_TARGETS(target_p) = 0;
target_p->localClient->target_last = rb_current_time(); /* don't ask --nenolod */
return 1;
}
else
{
sendto_one_notice(source_p, ":%s was not hurt", target_p->name);
return 0;
}
if (rb_dlinkFindDestroy(target_p, &hurt_state.hurt_clients)) {
sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s used HEAL on %s",
get_oper_name(source_p), get_client_name(target_p, HIDE_IP));
sendto_one_notice(target_p, ":HURT restriction temporarily removed by operator");
sendto_one_notice(source_p, ":HURT restriction on %s temporarily removed", target_p->name);
target_p->localClient->target_last = rb_current_time(); /* don't ask --nenolod */
return 1;
} else {
sendto_one_notice(source_p, ":%s was not hurt", target_p->name);
return 0;
}
}
/* }}} */
@ -647,14 +611,14 @@ heal_nick(struct Client *source_p, struct Client *target_p)
static int
nick_is_valid(const char *nick)
{
const char *s = nick;
const char *s = nick;
for (; *s != '\0'; s++) {
if (!IsNickChar(*s))
return 0;
}
for (; *s != '\0'; s++) {
if (!IsNickChar(*s))
return 0;
}
return 1;
return 1;
}
/* }}} */

160
extensions/ip_cloaking-5.c Normal file
View File

@ -0,0 +1,160 @@
/*
* Charybdis: an advanced ircd
* ip_cloaking.c: provide user hostname cloaking
*
* Written originally by nenolod, altered to use FNV by Elizabeth in 2008
* altered some more by groente
*/
#include <openssl/hmac.h>
#include "stdinc.h"
#include "modules.h"
#include "hook.h"
#include "client.h"
#include "ircd.h"
#include "send.h"
#include "hash.h"
#include "s_conf.h"
#include "s_user.h"
#include "s_serv.h"
#include "numeric.h"
#include "newconf.h"
char *secretsalt = "32qwnqoWI@DpMd&w";
static void
conf_set_secretsalt(void *data)
{
secretsalt = rb_strdup(data);
}
static int
_modinit(void)
{
/* add the usermode to the available slot */
user_modes['x'] = find_umode_slot();
construct_umodebuf();
add_top_conf("cloaking", NULL, NULL, NULL);
add_conf_item("cloaking", "secretsalt", CF_QSTRING, conf_set_secretsalt);
return 0;
}
static void
_moddeinit(void)
{
/* disable the umode and remove it from the available list */
user_modes['x'] = 0;
construct_umodebuf();
add_top_conf("cloaking", NULL, NULL, NULL);
add_conf_item("cloaking", "secretsalt", CF_QSTRING, conf_set_secretsalt);
}
static void check_umode_change(void *data);
static void check_new_user(void *data);
mapi_hfn_list_av1 ip_cloaking_hfnlist[] = {
{ "umode_changed", (hookfn) check_umode_change },
{ "new_local_user", (hookfn) check_new_user },
{ NULL, NULL }
};
DECLARE_MODULE_AV1(ip_cloaking, _modinit, _moddeinit, NULL, NULL,
ip_cloaking_hfnlist, "$Revision: 3526 $");
static void
distribute_hostchange(struct Client *client_p, char *newhost)
{
if (newhost != client_p->orighost)
sendto_one_numeric(client_p, RPL_HOSTHIDDEN, "%s :is now your hidden host",
newhost);
else
sendto_one_numeric(client_p, RPL_HOSTHIDDEN, "%s :hostname reset",
newhost);
sendto_server(NULL, NULL,
CAP_EUID | CAP_TS6, NOCAPS, ":%s CHGHOST %s :%s",
use_id(&me), use_id(client_p), newhost);
sendto_server(NULL, NULL,
CAP_TS6, CAP_EUID, ":%s ENCAP * CHGHOST %s :%s",
use_id(&me), use_id(client_p), newhost);
change_nick_user_host(client_p, client_p->name, client_p->username, newhost, 0, "Changing host");
if (newhost != client_p->orighost)
SetDynSpoof(client_p);
else
ClearDynSpoof(client_p);
}
static void
do_host_cloak(const char *inbuf, char *outbuf)
{
unsigned char *hash;
char buf[3];
char output[HOSTLEN+1];
int i;
hash = HMAC(EVP_sha256(), secretsalt, strlen(secretsalt), (unsigned char*)inbuf, strlen(inbuf), NULL, NULL);
output[0]=0;
for (i = 0; i < 32; i++) {
sprintf(buf, "%.2x", hash[i]);
strcat(output,buf);
}
rb_strlcpy(outbuf,output,HOSTLEN+1);
}
static void
check_umode_change(void *vdata)
{
hook_data_umode_changed *data = (hook_data_umode_changed *)vdata;
struct Client *source_p = data->client;
if (!MyClient(source_p))
return;
/* didn't change +h umode, we don't need to do anything */
if (!((data->oldumodes ^ source_p->umodes) & user_modes['x']))
return;
if (source_p->umodes & user_modes['h']) {
if (IsIPSpoof(source_p) || source_p->localClient->mangledhost == NULL || (IsDynSpoof(source_p) && strcmp(source_p->host, source_p->localClient->mangledhost))) {
source_p->umodes &= ~user_modes['x'];
return;
}
if (strcmp(source_p->host, source_p->localClient->mangledhost)) {
distribute_hostchange(source_p, source_p->localClient->mangledhost);
} else /* not really nice, but we need to send this numeric here */
sendto_one_numeric(source_p, RPL_HOSTHIDDEN, "%s :is now your hidden host",
source_p->host);
} else if (!(source_p->umodes & user_modes['x'])) {
if (source_p->localClient->mangledhost != NULL &&
!strcmp(source_p->host, source_p->localClient->mangledhost)) {
distribute_hostchange(source_p, source_p->orighost);
}
}
}
static void
check_new_user(void *vdata)
{
struct Client *source_p = (void *)vdata;
if (IsIPSpoof(source_p)) {
source_p->umodes &= ~user_modes['x'];
return;
}
source_p->localClient->mangledhost = rb_malloc(HOSTLEN + 1);
do_host_cloak(source_p->orighost, source_p->localClient->mangledhost);
if (IsDynSpoof(source_p))
source_p->umodes &= ~user_modes['x'];
if (source_p->umodes & user_modes['x']) {
rb_strlcpy(source_p->host, source_p->localClient->mangledhost, sizeof(source_p->host));
if (irccmp(source_p->host, source_p->orighost))
SetDynSpoof(source_p);
}
}

View File

@ -1,4 +1,9 @@
/* $Id: ip_cloaking.c 3526 2007-07-06 07:56:14Z nenolod $ */
/*
* Charybdis: an advanced ircd
* ip_cloaking.c: provide user hostname cloaking
*
* Written originally by nenolod, altered to use FNV by Elizabeth in 2008
*/
#include "stdinc.h"
#include "modules.h"
@ -6,214 +11,200 @@
#include "client.h"
#include "ircd.h"
#include "send.h"
#include "hash.h"
#include "s_conf.h"
#include "s_user.h"
#include "s_serv.h"
#include "numeric.h"
/* if you're modifying this module, you'll probably to change this */
#define KEY 0x13748cfa
static int
_modinit(void)
{
/* add the usermode to the available slot */
user_modes['h'] = find_umode_slot();
construct_umodebuf();
/* add the usermode to the available slot */
user_modes['x'] = find_umode_slot();
construct_umodebuf();
return 0;
return 0;
}
static void
_moddeinit(void)
{
/* disable the umode and remove it from the available list */
user_modes['h'] = 0;
construct_umodebuf();
/* disable the umode and remove it from the available list */
user_modes['x'] = 0;
construct_umodebuf();
}
static void check_umode_change(void *data);
static void check_new_user(void *data);
mapi_hfn_list_av1 ip_cloaking_hfnlist[] = {
{ "umode_changed", (hookfn) check_umode_change },
{ "new_local_user", (hookfn) check_new_user },
{ NULL, NULL }
{ "umode_changed", (hookfn) check_umode_change },
{ "new_local_user", (hookfn) check_new_user },
{ NULL, NULL }
};
DECLARE_MODULE_AV1(ip_cloaking, _modinit, _moddeinit, NULL, NULL,
ip_cloaking_hfnlist, "$Revision: 3526 $");
ip_cloaking_hfnlist, "$Revision: 3526 $");
static void
distribute_hostchange(struct Client *client)
distribute_hostchange(struct Client *client_p, char *newhost)
{
if (irccmp(client->host, client->orighost))
sendto_one_numeric(client, RPL_HOSTHIDDEN, "%s :is now your hidden host",
client->host);
else
sendto_one_numeric(client, RPL_HOSTHIDDEN, "%s :hostname reset",
client->host);
if (newhost != client_p->orighost)
sendto_one_numeric(client_p, RPL_HOSTHIDDEN, "%s :is now your hidden host",
newhost);
else
sendto_one_numeric(client_p, RPL_HOSTHIDDEN, "%s :hostname reset",
newhost);
sendto_server(NULL, NULL,
CAP_EUID | CAP_TS6, NOCAPS, ":%s CHGHOST %s :%s",
use_id(&me), use_id(client), client->host);
sendto_server(NULL, NULL,
CAP_TS6, CAP_EUID, ":%s ENCAP * CHGHOST %s :%s",
use_id(&me), use_id(client), client->host);
sendto_server(NULL, NULL,
NOCAPS, CAP_TS6, ":%s ENCAP * CHGHOST %s :%s",
me.name, client->name, client->host);
if (irccmp(client->host, client->orighost))
SetDynSpoof(client);
else
ClearDynSpoof(client);
}
sendto_server(NULL, NULL,
CAP_EUID | CAP_TS6, NOCAPS, ":%s CHGHOST %s :%s",
use_id(&me), use_id(client_p), newhost);
sendto_server(NULL, NULL,
CAP_TS6, CAP_EUID, ":%s ENCAP * CHGHOST %s :%s",
use_id(&me), use_id(client_p), newhost);
#define Nval 0x8c3a48ac
#define HOSTLEN 63
#define INITDATA "98fwqefnoiqefv03f423t34gbv3vb89tg432t3b8" /* change this */
change_nick_user_host(client_p, client_p->name, client_p->username, newhost, 0, "Changing host");
static inline unsigned int
get_string_entropy(const char *inbuf)
{
unsigned int accum = 1;
while(*inbuf != '\0')
accum += *inbuf++;
return accum;
}
/* calls get_string_entropy() and toasts it against INITDATA */
static inline unsigned int
get_string_weighted_entropy(const char *inbuf)
{
static int base_entropy = 0;
unsigned int accum = get_string_entropy(inbuf);
/* initialize the algorithm if it is not yet ready */
if (base_entropy == 0)
base_entropy = get_string_entropy(INITDATA);
return (Nval * accum) ^ base_entropy;
if (newhost != client_p->orighost)
SetDynSpoof(client_p);
else
ClearDynSpoof(client_p);
}
static void
do_host_cloak_ip(const char *inbuf, char *outbuf)
{
char *tptr;
unsigned int accum = get_string_weighted_entropy(inbuf);
char buf[HOSTLEN];
/* None of the characters in this table can be valid in an IP */
char chartable[] = "ghijklmnopqrstuvwxyz";
char *tptr;
uint32_t accum = fnv_hash((const unsigned char*) inbuf, 32);
int sepcount = 0;
int totalcount = 0;
int ipv6 = 0;
strncpy(buf, inbuf, HOSTLEN);
tptr = strrchr(buf, '.');
rb_strlcpy(outbuf, inbuf, HOSTLEN + 1);
if (tptr == NULL)
{
strncpy(outbuf, inbuf, HOSTLEN);
return;
}
if (strchr(outbuf, ':')) {
ipv6 = 1;
*tptr++ = '\0';
/* Damn you IPv6...
* We count the number of colons so we can calculate how much
* of the host to cloak. This is because some hostmasks may not
* have as many octets as we'd like.
*
* We have to do this ahead of time because doing this during
* the actual cloaking would get ugly
*/
for (tptr = outbuf; *tptr != '\0'; tptr++)
if (*tptr == ':')
totalcount++;
} else if (!strchr(outbuf, '.'))
return;
snprintf(outbuf, HOSTLEN, "%s.%x", buf, accum);
for (tptr = outbuf; *tptr != '\0'; tptr++) {
if (*tptr == ':' || *tptr == '.') {
sepcount++;
continue;
}
if (ipv6 && sepcount < totalcount / 2)
continue;
if (!ipv6 && sepcount < 2)
continue;
*tptr = chartable[(*tptr + accum) % 20];
accum = (accum << 1) | (accum >> 31);
}
}
static void
do_host_cloak_host(const char *inbuf, char *outbuf)
{
char b26_alphabet[] = "abcdefghijklmnopqrstuvwxyz";
char *tptr;
unsigned int accum = get_string_weighted_entropy(inbuf);
char b26_alphabet[] = "abcdefghijklmnopqrstuvwxyz";
char *tptr;
uint32_t accum = fnv_hash((const unsigned char*) inbuf, 32);
strncpy(outbuf, inbuf, HOSTLEN);
rb_strlcpy(outbuf, inbuf, HOSTLEN + 1);
/* pass 1: scramble first section of hostname using base26
* alphabet toasted against the weighted entropy of the string.
*
* numbers are not changed at this time, only letters.
*/
for (tptr = outbuf; *tptr != '\0'; tptr++)
{
if (*tptr == '.')
break;
/* pass 1: scramble first section of hostname using base26
* alphabet toasted against the FNV hash of the string.
*
* numbers are not changed at this time, only letters.
*/
for (tptr = outbuf; *tptr != '\0'; tptr++) {
if (*tptr == '.')
break;
if (isdigit(*tptr) || *tptr == '-')
continue;
if (isdigit(*tptr) || *tptr == '-')
continue;
*tptr = b26_alphabet[(*tptr * accum) % 26];
}
*tptr = b26_alphabet[(*tptr + accum) % 26];
/* pass 2: scramble each number in the address */
for (tptr = outbuf; *tptr != '\0'; tptr++)
{
if (isdigit(*tptr))
{
*tptr = 48 + ((*tptr * accum) % 10);
}
}
/* Rotate one bit to avoid all digits being turned odd or even */
accum = (accum << 1) | (accum >> 31);
}
/* pass 2: scramble each number in the address */
for (tptr = outbuf; *tptr != '\0'; tptr++) {
if (isdigit(*tptr))
*tptr = '0' + (*tptr + accum) % 10;
accum = (accum << 1) | (accum >> 31);
}
}
static void
check_umode_change(void *vdata)
{
hook_data_umode_changed *data = (hook_data_umode_changed *)vdata;
struct Client *source_p = data->client;
hook_data_umode_changed *data = (hook_data_umode_changed *)vdata;
struct Client *source_p = data->client;
if (!MyClient(source_p))
return;
if (!MyClient(source_p))
return;
/* didn't change +h umode, we don't need to do anything */
if (!((data->oldumodes ^ source_p->umodes) & user_modes['h']))
return;
/* didn't change +h umode, we don't need to do anything */
if (!((data->oldumodes ^ source_p->umodes) & user_modes['x']))
return;
if (source_p->umodes & user_modes['h'])
{
if (IsIPSpoof(source_p) || source_p->localClient->mangledhost == NULL || (IsDynSpoof(source_p) && strcmp(source_p->host, source_p->localClient->mangledhost)))
{
source_p->umodes &= ~user_modes['h'];
return;
}
if (strcmp(source_p->host, source_p->localClient->mangledhost))
{
rb_strlcpy(source_p->host, source_p->localClient->mangledhost, HOSTLEN);
distribute_hostchange(source_p);
}
else /* not really nice, but we need to send this numeric here */
sendto_one_numeric(source_p, RPL_HOSTHIDDEN, "%s :is now your hidden host",
source_p->host);
}
else if (!(source_p->umodes & user_modes['h']))
{
if (source_p->localClient->mangledhost != NULL &&
!strcmp(source_p->host, source_p->localClient->mangledhost))
{
rb_strlcpy(source_p->host, source_p->orighost, HOSTLEN);
distribute_hostchange(source_p);
}
}
if (source_p->umodes & user_modes['x']) {
if (IsIPSpoof(source_p) || source_p->localClient->mangledhost == NULL || (IsDynSpoof(source_p) && strcmp(source_p->host, source_p->localClient->mangledhost))) {
source_p->umodes &= ~user_modes['x'];
return;
}
if (strcmp(source_p->host, source_p->localClient->mangledhost)) {
distribute_hostchange(source_p, source_p->localClient->mangledhost);
} else /* not really nice, but we need to send this numeric here */
sendto_one_numeric(source_p, RPL_HOSTHIDDEN, "%s :is now your hidden host",
source_p->host);
} else if (!(source_p->umodes & user_modes['x'])) {
if (source_p->localClient->mangledhost != NULL &&
!strcmp(source_p->host, source_p->localClient->mangledhost)) {
distribute_hostchange(source_p, source_p->orighost);
}
}
}
static void
check_new_user(void *vdata)
{
struct Client *source_p = (void *)vdata;
struct Client *source_p = (void *)vdata;
if (IsIPSpoof(source_p))
{
source_p->umodes &= ~user_modes['h'];
return;
}
source_p->localClient->mangledhost = rb_malloc(HOSTLEN);
if (!irccmp(source_p->orighost, source_p->sockhost))
do_host_cloak_ip(source_p->orighost, source_p->localClient->mangledhost);
else
do_host_cloak_host(source_p->orighost, source_p->localClient->mangledhost);
if (IsDynSpoof(source_p))
source_p->umodes &= ~user_modes['h'];
if (source_p->umodes & user_modes['h'])
{
rb_strlcpy(source_p->host, source_p->localClient->mangledhost, sizeof(source_p->host));
if (irccmp(source_p->host, source_p->orighost))
SetDynSpoof(source_p);
}
if (IsIPSpoof(source_p)) {
source_p->umodes &= ~user_modes['x'];
return;
}
source_p->localClient->mangledhost = rb_malloc(HOSTLEN + 1);
if (!irccmp(source_p->orighost, source_p->sockhost))
do_host_cloak_ip(source_p->orighost, source_p->localClient->mangledhost);
else
do_host_cloak_host(source_p->orighost, source_p->localClient->mangledhost);
if (IsDynSpoof(source_p))
source_p->umodes &= ~user_modes['x'];
if (source_p->umodes & user_modes['x']) {
rb_strlcpy(source_p->host, source_p->localClient->mangledhost, sizeof(source_p->host));
if (irccmp(source_p->host, source_p->orighost))
SetDynSpoof(source_p);
}
}

View File

@ -1,175 +0,0 @@
/* $Id: ip_cloaking_old.c 3522 2007-07-06 07:48:28Z nenolod $ */
#include "stdinc.h"
#include "modules.h"
#include "hook.h"
#include "client.h"
#include "ircd.h"
#include "send.h"
#include "s_conf.h"
#include "s_user.h"
#include "s_serv.h"
#include "numeric.h"
/* if you're modifying this module, you'll probably to change this */
#define KEY 0x13748cfa
static int
_modinit(void)
{
/* add the usermode to the available slot */
user_modes['h'] = find_umode_slot();
construct_umodebuf();
return 0;
}
static void
_moddeinit(void)
{
/* disable the umode and remove it from the available list */
user_modes['h'] = 0;
construct_umodebuf();
}
static void check_umode_change(void *data);
static void check_new_user(void *data);
mapi_hfn_list_av1 ip_cloaking_hfnlist[] = {
{ "umode_changed", (hookfn) check_umode_change },
{ "new_local_user", (hookfn) check_new_user },
{ NULL, NULL }
};
DECLARE_MODULE_AV1(ip_cloaking, _modinit, _moddeinit, NULL, NULL,
ip_cloaking_hfnlist, "$Revision: 3522 $");
static void
distribute_hostchange(struct Client *client)
{
if (irccmp(client->host, client->orighost))
sendto_one_numeric(client, RPL_HOSTHIDDEN, "%s :is now your hidden host",
client->host);
else
sendto_one_numeric(client, RPL_HOSTHIDDEN, "%s :hostname reset",
client->host);
sendto_server(NULL, NULL,
CAP_EUID | CAP_TS6, NOCAPS, ":%s CHGHOST %s :%s",
use_id(&me), use_id(client), client->host);
sendto_server(NULL, NULL,
CAP_TS6, CAP_EUID, ":%s ENCAP * CHGHOST %s :%s",
use_id(&me), use_id(client), client->host);
sendto_server(NULL, NULL,
NOCAPS, CAP_TS6, ":%s ENCAP * CHGHOST %s :%s",
me.name, client->name, client->host);
if (irccmp(client->host, client->orighost))
SetDynSpoof(client);
else
ClearDynSpoof(client);
}
static void
do_host_cloak(const char *inbuf, char *outbuf, int ipmask)
{
int cyc;
unsigned int hosthash = 1, hosthash2 = 1;
unsigned int maxcycle = strlen(inbuf);
int len1;
const char *rest, *next;
for (cyc = 0; cyc < maxcycle - 2; cyc += 2)
hosthash *= (unsigned int) inbuf[cyc];
/* safety: decrement ourselves two steps back */
for (cyc = maxcycle - 1; cyc >= 1; cyc -= 2)
hosthash2 *= (unsigned int) inbuf[cyc];
/* lets do some bitshifting -- this pretty much destroys the IP
* sequence, while still providing a checksum. exactly what
* we're shooting for. --nenolod
*/
hosthash += (hosthash2 / KEY);
hosthash2 += (hosthash / KEY);
if (ipmask == 0)
{
rb_snprintf(outbuf, HOSTLEN, "%s-%X%X",
ServerInfo.network_name, hosthash2, hosthash);
len1 = strlen(outbuf);
rest = strchr(inbuf, '.');
if (rest == NULL)
rest = ".";
/* try to avoid truncation -- jilles */
while (len1 + strlen(rest) >= HOSTLEN && (next = strchr(rest + 1, '.')) != NULL)
rest = next;
rb_strlcat(outbuf, rest, HOSTLEN);
}
else
rb_snprintf(outbuf, HOSTLEN, "%X%X.%s",
hosthash2, hosthash, ServerInfo.network_name);
}
static void
check_umode_change(void *vdata)
{
hook_data_umode_changed *data = (hook_data_umode_changed *)vdata;
struct Client *source_p = data->client;
if (!MyClient(source_p))
return;
/* didn't change +h umode, we don't need to do anything */
if (!((data->oldumodes ^ source_p->umodes) & user_modes['h']))
return;
if (source_p->umodes & user_modes['h'])
{
if (IsIPSpoof(source_p) || source_p->localClient->mangledhost == NULL || (IsDynSpoof(source_p) && strcmp(source_p->host, source_p->localClient->mangledhost)))
{
source_p->umodes &= ~user_modes['h'];
return;
}
if (strcmp(source_p->host, source_p->localClient->mangledhost))
{
rb_strlcpy(source_p->host, source_p->localClient->mangledhost, HOSTLEN);
distribute_hostchange(source_p);
}
else /* not really nice, but we need to send this numeric here */
sendto_one_numeric(source_p, RPL_HOSTHIDDEN, "%s :is now your hidden host",
source_p->host);
}
else if (!(source_p->umodes & user_modes['h']))
{
if (source_p->localClient->mangledhost != NULL &&
!strcmp(source_p->host, source_p->localClient->mangledhost))
{
rb_strlcpy(source_p->host, source_p->orighost, HOSTLEN);
distribute_hostchange(source_p);
}
}
}
static void
check_new_user(void *vdata)
{
struct Client *source_p = (void *)vdata;
if (IsIPSpoof(source_p))
{
source_p->umodes &= ~user_modes['h'];
return;
}
source_p->localClient->mangledhost = rb_malloc(HOSTLEN);
if (!irccmp(source_p->orighost, source_p->sockhost))
do_host_cloak(source_p->orighost, source_p->localClient->mangledhost, 1);
else
do_host_cloak(source_p->orighost, source_p->localClient->mangledhost, 0);
if (IsDynSpoof(source_p))
source_p->umodes &= ~user_modes['h'];
if (source_p->umodes & user_modes['h'])
{
rb_strlcpy(source_p->host, source_p->localClient->mangledhost, sizeof(source_p->host));
if (irccmp(source_p->host, source_p->orighost))
SetDynSpoof(source_p);
}
}

View File

@ -1,8 +1,7 @@
/*
* Copyright (C) infinity-infinity God <God@Heaven>
*
* Bob was here
* $Id: m_42.c 3161 2007-01-25 07:23:01Z nenolod $
* Bob was here
*/
#include "stdinc.h"
@ -14,9 +13,10 @@
static int mclient_42(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]);
struct Message hgtg_msgtab = {
"42", 0, 0, 0, MFLG_SLOW,
{ mg_ignore, {mclient_42, 0}, mg_ignore, mg_ignore, mg_ignore, {mclient_42, 0}
}
"42", 0, 0, 0, MFLG_SLOW,
{
mg_ignore, {mclient_42, 0}, mg_ignore, mg_ignore, mg_ignore, {mclient_42, 0}
}
};
mapi_clist_av1 hgtg_clist[] = { &hgtg_msgtab, NULL };
@ -28,8 +28,8 @@ DECLARE_MODULE_AV1(42, NULL, NULL, hgtg_clist, NULL, NULL, "Revision 0.42");
static int
mclient_42(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
sendto_one_notice(source_p, ":The Answer to Life, the Universe, and Everything.");
return 0;
sendto_one_notice(source_p, ":The Answer to Life, the Universe, and Everything.");
return 0;
}

View File

@ -21,7 +21,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: m_wallops.c 20702 2005-08-31 20:59:02Z leeh $
*/
#include "stdinc.h"
@ -42,10 +41,10 @@ static int mo_adminwall(struct Client *, struct Client *, int, const char **);
static int me_adminwall(struct Client *, struct Client *, int, const char **);
struct Message adminwall_msgtab = {
"ADMINWALL", 0, 0, 0, MFLG_SLOW,
{mg_unreg, mg_not_oper, mg_ignore, mg_ignore, {me_adminwall, 2}, {mo_adminwall, 2}}
"ADMINWALL", 0, 0, 0, MFLG_SLOW,
{mg_unreg, mg_not_oper, mg_ignore, mg_ignore, {me_adminwall, 2}, {mo_adminwall, 2}}
};
mapi_clist_av1 adminwall_clist[] = { &adminwall_msgtab, NULL };
DECLARE_MODULE_AV1(adminwall, NULL, NULL, adminwall_clist, NULL, NULL, "$Revision: 20702 $");
@ -57,22 +56,21 @@ DECLARE_MODULE_AV1(adminwall, NULL, NULL, adminwall_clist, NULL, NULL, "$Revisio
*/
static int
mo_adminwall(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
if(!IsAdmin(source_p))
{
sendto_one(source_p, form_str(ERR_NOPRIVS),
me.name, source_p->name, "adminwall");
return 0;
}
sendto_wallops_flags(UMODE_ADMIN, source_p, "ADMINWALL - %s", parv[1]);
sendto_match_servs(source_p, "*", CAP_ENCAP, NOCAPS, "ENCAP * ADMINWALL :%s", parv[1]);
mo_adminwall(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
if(!IsAdmin(source_p)) {
sendto_one(source_p, form_str(ERR_NOPRIVS),
me.name, source_p->name, "adminwall");
return 0;
}
}
sendto_wallops_flags(UMODE_ADMIN, source_p, "ADMINWALL - %s", parv[1]);
sendto_match_servs(source_p, "*", CAP_ENCAP, NOCAPS, "ENCAP * ADMINWALL :%s", parv[1]);
return 0;
}
static int
me_adminwall(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
sendto_wallops_flags(UMODE_ADMIN, source_p, "ADMINWALL - %s", parv[1]);
return 0;
me_adminwall(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
sendto_wallops_flags(UMODE_ADMIN, source_p, "ADMINWALL - %s", parv[1]);
return 0;
}

92
extensions/m_cycle.c Normal file
View File

@ -0,0 +1,92 @@
/*
* m_cycle.c: server-side CYCLE
*
* Copyright (c) 2010 The ShadowIRCd team
*/
#include "stdinc.h"
#include "common.h"
#include "channel.h"
#include "client.h"
#include "hash.h"
#include "match.h"
#include "ircd.h"
#include "numeric.h"
#include "send.h"
#include "s_conf.h"
#include "s_serv.h"
#include "msg.h"
#include "parse.h"
#include "modules.h"
#include "packet.h"
#include "hook.h"
extern struct module **modlist;
static int m_cycle(struct Client *, struct Client *, int, const char **);
struct Message cycle_msgtab = {
"CYCLE", 0, 0, 0, MFLG_SLOW,
{mg_unreg, {m_cycle, 2}, {m_cycle, 2}, mg_ignore, mg_ignore, {m_cycle, 2}}
};
mapi_clist_av1 cycle_clist[] = { &cycle_msgtab, NULL };
DECLARE_MODULE_AV1(cycle, NULL, NULL, cycle_clist, NULL, NULL, "$Revision$");
static int
m_cycle(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
char *p, *name;
char *s = LOCAL_COPY(parv[1]);
struct Channel *chptr;
struct membership *msptr;
name = rb_strtok_r(s, ",", &p);
/* Finish the flood grace period... */
if(MyClient(source_p) && !IsFloodDone(source_p))
flood_endgrace(source_p);
while(name) {
if((chptr = find_channel(name)) == NULL) {
sendto_one_numeric(source_p, ERR_NOSUCHCHANNEL, form_str(ERR_NOSUCHCHANNEL), name);
return 0;
}
msptr = find_channel_membership(chptr, source_p);
if(msptr == NULL) {
sendto_one_numeric(source_p, ERR_NOTONCHANNEL, form_str(ERR_NOTONCHANNEL), name);
return 0;
}
if(MyConnect(source_p) && !IsOper(source_p) && !IsExemptSpambot(source_p))
check_spambot_warning(source_p, NULL);
if((is_any_op(msptr) || !MyConnect(source_p) ||
((can_send(chptr, source_p, msptr) > 0 &&
(source_p->localClient->firsttime +
ConfigFileEntry.anti_spam_exit_message_time) < rb_current_time())))) {
sendto_server(client_p, chptr, CAP_TS6, NOCAPS,
":%s PART %s :Cycling", use_id(source_p), chptr->chname);
sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s PART %s :Cycling",
source_p->name, source_p->username,
source_p->host, chptr->chname);
} else {
sendto_server(client_p, chptr, CAP_TS6, NOCAPS,
":%s PART %s", use_id(source_p), chptr->chname);
sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s PART %s",
source_p->name, source_p->username,
source_p->host, chptr->chname);
}
remove_user_from_channel(msptr);
chptr = NULL;
msptr = NULL;
name = rb_strtok_r(NULL, ",", &p);
}
user_join(client_p, source_p, parv[1], parc > 2 ? parv[2] : NULL);
return 0;
}

View File

@ -17,7 +17,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Id: m_findforwards.c 986 2006-03-08 00:10:46Z jilles $
*/
#include "stdinc.h"
#include "channel.h"
@ -36,11 +35,11 @@
#include "packet.h"
static int m_findforwards(struct Client *client_p, struct Client *source_p,
int parc, const char *parv[]);
int parc, const char *parv[]);
struct Message findforwards_msgtab = {
"FINDFORWARDS", 0, 0, 0, MFLG_SLOW,
{mg_unreg, {m_findforwards, 2}, mg_ignore, mg_ignore, mg_ignore, {m_findforwards, 2}}
"FINDFORWARDS", 0, 0, 0, MFLG_SLOW,
{mg_unreg, {m_findforwards, 2}, mg_ignore, mg_ignore, mg_ignore, {m_findforwards, 2}}
};
mapi_clist_av1 findforwards_clist[] = { &findforwards_msgtab, NULL };
@ -49,68 +48,59 @@ DECLARE_MODULE_AV1(findforwards, NULL, NULL, findforwards_clist, NULL, NULL, "$R
/*
** mo_findforwards
** parv[0] = sender prefix
** parv[1] = channel
*/
static int
m_findforwards(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
static time_t last_used = 0;
struct Channel *chptr;
struct membership *msptr;
rb_dlink_node *ptr;
char buf[414];
char *p = buf, *end = buf + sizeof buf - 1;
*p = '\0';
static time_t last_used = 0;
struct Channel *chptr;
struct membership *msptr;
rb_dlink_node *ptr;
char buf[414];
char *p = buf, *end = buf + sizeof buf - 1;
*p = '\0';
/* Allow ircops to search for forwards to nonexistent channels */
if(!IsOper(source_p))
{
if((chptr = find_channel(parv[1])) == NULL || (msptr = find_channel_membership(chptr, source_p)) == NULL)
{
sendto_one_numeric(source_p, ERR_NOTONCHANNEL,
form_str(ERR_NOTONCHANNEL), parv[1]);
return 0;
}
/* Allow ircops to search for forwards to nonexistent channels */
if(!IsOper(source_p)) {
if((chptr = find_channel(parv[1])) == NULL || (msptr = find_channel_membership(chptr, source_p)) == NULL) {
sendto_one_numeric(source_p, ERR_NOTONCHANNEL,
form_str(ERR_NOTONCHANNEL), parv[1]);
return 0;
}
if(!is_chanop(msptr))
{
sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED),
me.name, source_p->name, parv[1]);
return 0;
}
if(!is_any_op(msptr)) {
sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED),
me.name, source_p->name, parv[1]);
return 0;
}
if((last_used + ConfigFileEntry.pace_wait) > rb_current_time())
{
sendto_one(source_p, form_str(RPL_LOAD2HI),
me.name, source_p->name, "FINDFORWARDS");
return 0;
}
else
last_used = rb_current_time();
}
RB_DLINK_FOREACH(ptr, global_channel_list.head)
{
chptr = ptr->data;
if(chptr->mode.forward && !irccmp(chptr->mode.forward, parv[1]))
{
if(p + strlen(chptr->chname) >= end - 13)
{
strcpy(p, "<truncated> ");
p += 12;
break;
}
strcpy(p, chptr->chname);
p += strlen(chptr->chname);
*p++ = ' ';
}
}
if((last_used + ConfigFileEntry.pace_wait) > rb_current_time()) {
sendto_one(source_p, form_str(RPL_LOAD2HI),
me.name, source_p->name, "FINDFORWARDS");
return 0;
} else
last_used = rb_current_time();
}
if(buf[0])
*(--p) = '\0';
RB_DLINK_FOREACH(ptr, global_channel_list.head) {
chptr = ptr->data;
if(chptr->mode.forward && !irccmp(chptr->mode.forward, parv[1])) {
if(p + strlen(chptr->chname) >= end - 13) {
strcpy(p, "<truncated> ");
p += 12;
break;
}
strcpy(p, chptr->chname);
p += strlen(chptr->chname);
*p++ = ' ';
}
}
sendto_one_notice(source_p, ":Forwards for %s: %s", parv[1], buf);
if(buf[0])
*(--p) = '\0';
return 0;
sendto_one_notice(source_p, ":Forwards for %s: %s", parv[1], buf);
return 0;
}

203
extensions/m_force.c Normal file
View File

@ -0,0 +1,203 @@
/* contrib/m_force.c
* Copyright (C) 1996-2002 Hybrid Development Team
* Copyright (C) 2004 ircd-ratbox Development Team
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* 1.Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2.Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3.The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#include "stdinc.h"
#include "channel.h"
#include "class.h"
#include "client.h"
#include "common.h"
#include "match.h"
#include "ircd.h"
#include "hostmask.h"
#include "numeric.h"
#include "s_conf.h"
#include "s_newconf.h"
#include "logger.h"
#include "send.h"
#include "hash.h"
#include "s_serv.h"
#include "msg.h"
#include "parse.h"
#include "modules.h"
static int mo_forcejoin(struct Client *client_p, struct Client *source_p,
int parc, const char *parv[]);
struct Message forcejoin_msgtab = {
"FORCEJOIN", 0, 0, 0, MFLG_SLOW,
{mg_unreg, mg_not_oper, mg_ignore, mg_ignore, mg_ignore, {mo_forcejoin, 3}}
};
mapi_clist_av1 force_clist[] = { &forcejoin_msgtab, NULL };
DECLARE_MODULE_AV1(force, NULL, NULL, force_clist, NULL, NULL, "$Revision: 3297 $");
/*
* m_forcejoin
* parv[1] = user to force
* parv[2] = channel to force them into
*/
static int
mo_forcejoin(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
struct Client *target_p;
struct Channel *chptr;
int type;
char mode;
char sjmode;
char *newch;
if(!IsOperAdmin(source_p)) {
sendto_one(source_p, form_str(ERR_NOPRIVS), me.name, source_p->name, "admin");
return 0;
}
if((hunt_server(client_p, source_p, ":%s FORCEJOIN %s %s", 1, parc, parv)) != HUNTED_ISME)
return 0;
/* if target_p is not existant, print message
* to source_p and bail - scuzzy
*/
if((target_p = find_client(parv[1])) == NULL) {
sendto_one(source_p, form_str(ERR_NOSUCHNICK), me.name, source_p->name, parv[1]);
return 0;
}
if(!IsPerson(target_p))
return 0;
sendto_wallops_flags(UMODE_WALLOP, &me,
"FORCEJOIN called for %s %s by %s!%s@%s",
parv[1], parv[2], source_p->name, source_p->username, source_p->host);
ilog(L_MAIN, "FORCEJOIN called for %s %s by %s!%s@%s",
parv[1], parv[2], source_p->name, source_p->username, source_p->host);
sendto_server(NULL, NULL, NOCAPS, NOCAPS,
":%s WALLOPS :FORCEJOIN called for %s %s by %s!%s@%s",
me.name, parv[1], parv[2],
source_p->name, source_p->username, source_p->host);
/* select our modes from parv[2] if they exist... (chanop) */
if(*parv[2] == '@') {
type = CHFL_CHANOP;
mode = 'o';
sjmode = '@';
} else if(*parv[2] == '+') {
type = CHFL_VOICE;
mode = 'v';
sjmode = '+';
} else {
type = CHFL_PEON;
mode = sjmode = '\0';
}
if(mode != '\0')
parv[2]++;
if((chptr = find_channel(parv[2])) != NULL) {
if(IsMember(target_p, chptr)) {
/* debugging is fun... */
sendto_one_notice(source_p, ":*** Notice -- %s is already in %s",
target_p->name, chptr->chname);
return 0;
}
add_user_to_channel(chptr, target_p, type);
sendto_server(target_p, chptr, NOCAPS, NOCAPS,
":%s SJOIN %ld %s + :%c%s",
me.name, (long) chptr->channelts,
chptr->chname, type ? sjmode : ' ', target_p->name);
sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s JOIN :%s",
target_p->name, target_p->username,
target_p->host, chptr->chname);
if(type)
sendto_channel_local(ALL_MEMBERS, chptr, ":%s MODE %s +%c %s",
me.name, chptr->chname, mode, target_p->name);
if(chptr->topic != NULL) {
sendto_one(target_p, form_str(RPL_TOPIC), me.name,
target_p->name, chptr->chname, chptr->topic);
sendto_one(target_p, form_str(RPL_TOPICWHOTIME),
me.name, source_p->name, chptr->chname,
chptr->topic_info, chptr->topic_time);
}
channel_member_names(chptr, target_p, 1);
} else {
newch = LOCAL_COPY(parv[2]);
if(!check_channel_name(newch)) {
sendto_one(source_p, form_str(ERR_BADCHANNAME), me.name,
source_p->name, (unsigned char *) newch);
return 0;
}
/* channel name must begin with & or # */
if(!IsChannelName(newch)) {
sendto_one(source_p, form_str(ERR_BADCHANNAME), me.name,
source_p->name, (unsigned char *) newch);
return 0;
}
/* newch can't be longer than CHANNELLEN */
if(strlen(newch) > CHANNELLEN) {
sendto_one_notice(source_p, ":Channel name is too long");
return 0;
}
chptr = get_or_create_channel(target_p, newch, NULL);
add_user_to_channel(chptr, target_p, CHFL_CHANOP);
/* send out a join, make target_p join chptr */
sendto_server(target_p, chptr, NOCAPS, NOCAPS,
":%s SJOIN %ld %s +nt :@%s", me.name,
(long) chptr->channelts, chptr->chname, target_p->name);
sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s JOIN :%s",
target_p->name, target_p->username,
target_p->host, chptr->chname);
chptr->mode.mode |= MODE_TOPICLIMIT;
chptr->mode.mode |= MODE_NOPRIVMSGS;
sendto_channel_local(ALL_MEMBERS, chptr, ":%s MODE %s +nt", me.name, chptr->chname);
target_p->localClient->last_join_time = rb_current_time();
channel_member_names(chptr, target_p, 1);
/* we do this to let the oper know that a channel was created, this will be
* seen from the server handling the command instead of the server that
* the oper is on.
*/
sendto_one_notice(source_p, ":*** Notice -- Creating channel %s", chptr->chname);
}
return 0;
}

View File

@ -28,7 +28,6 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* $Id: m_identify.c 2729 2006-11-09 23:52:06Z jilles $
*/
#include "stdinc.h"
@ -53,49 +52,45 @@ char *reconstruct_parv(int parc, const char *parv[]);
static int m_identify(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]);
struct Message identify_msgtab = {
"IDENTIFY", 0, 0, 0, MFLG_SLOW,
{mg_unreg, {m_identify, 0}, mg_ignore, mg_ignore, mg_ignore, {m_identify, 0}}
"IDENTIFY", 0, 0, 0, MFLG_SLOW,
{mg_unreg, {m_identify, 0}, mg_ignore, mg_ignore, mg_ignore, {m_identify, 0}}
};
mapi_clist_av1 identify_clist[] = {
&identify_msgtab,
NULL
&identify_msgtab,
NULL
};
DECLARE_MODULE_AV1(identify, NULL, NULL, identify_clist, NULL, NULL, "$Revision: 2729 $");
char *reconstruct_parv(int parc, const char *parv[])
{
static char tmpbuf[BUFSIZE]; int i;
static char tmpbuf[BUFSIZE];
int i;
rb_strlcpy(tmpbuf, parv[0], BUFSIZE);
for (i = 1; i < parc; i++)
{
rb_strlcat(tmpbuf, " ", BUFSIZE);
rb_strlcat(tmpbuf, parv[i], BUFSIZE);
}
return tmpbuf;
rb_strlcpy(tmpbuf, parv[0], BUFSIZE);
for (i = 1; i < parc; i++) {
rb_strlcat(tmpbuf, " ", BUFSIZE);
rb_strlcat(tmpbuf, parv[i], BUFSIZE);
}
return tmpbuf;
}
static int m_identify(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
const char *nick;
struct Client *target_p;
const char *nick;
struct Client *target_p;
if (parc < 2 || EmptyString(parv[1]))
{
sendto_one(source_p, form_str(ERR_NOTEXTTOSEND), me.name, source_p->name);
return 0;
}
if (parc < 2 || EmptyString(parv[1])) {
sendto_one(source_p, form_str(ERR_NOTEXTTOSEND), me.name, source_p->name);
return 0;
}
nick = parv[1][0] == '#' ? SVS_chanserv_NICK : SVS_nickserv_NICK;
if ((target_p = find_named_person(nick)) && IsService(target_p))
{
sendto_one(target_p, ":%s PRIVMSG %s :IDENTIFY %s", get_id(source_p, target_p), get_id(target_p, target_p), reconstruct_parv(parc - 1, &parv[1]));
}
else
{
sendto_one_numeric(source_p, ERR_SERVICESDOWN, form_str(ERR_SERVICESDOWN), nick);
}
return 0;
nick = parv[1][0] == '#' ? SVS_chanserv_NICK : SVS_nickserv_NICK;
if ((target_p = find_named_person(nick)) && IsService(target_p)) {
sendto_one(target_p, ":%s PRIVMSG %s :IDENTIFY %s", get_id(source_p, target_p), get_id(target_p, target_p), reconstruct_parv(parc - 1, &parv[1]));
} else {
sendto_one_numeric(source_p, ERR_SERVICESDOWN, form_str(ERR_SERVICESDOWN), nick);
}
return 0;
}

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