1
0
mirror of https://github.com/anope/anope.git synced 2026-06-18 23:44:46 +02:00

Compare commits

..

749 Commits

Author SHA1 Message Date
Adam c0dea5ef30 Anope 1.9.9 Release 2013-10-12 15:28:49 -04:00
Adam fd4ac7f6fc Update version.log 2013-10-12 15:28:49 -04:00
Adam e635f547d6 Update language files 2013-10-12 15:28:48 -04:00
Adam 7167cff703 Update changes and changes.conf sort of 2013-10-12 15:05:42 -04:00
DukePyrolator b844154857 fixed a typo in the last commit, reported by Robby 2013-10-10 18:12:48 +02:00
DukePyrolator 5e56dfdb1a replaced the country name in the Language header in the language files by four letter codes 2013-10-10 07:51:35 +02:00
Adam e1d460e211 Call OnBotPrivmsg after checking if the message is a ctcp, not before. fix typo in opersrev.example.conf 2013-10-09 16:27:16 -04:00
DukePyrolator 9ea6fb25b9 set the Language header in the language files so msgfmt doesnt complain 2013-10-09 22:10:08 +02:00
DukePyrolator 7755668679 updated docs/EVENTS 2013-10-06 22:07:01 +02:00
Adam 569efbb66b Fix Windows build 2013-10-05 13:29:34 -04:00
Robby- 696801430b anope.nl_NL.po: Translate newly added string, and fix some spelling/grammar. 2013-10-05 13:22:56 -04:00
Adam 1b08ba8f41 Always show expire time for nicks in /ns info to opers, even if the user is online
Make Anope::strftime show "now" if the time is now
Fix typo in nickalias.cpp for the type of the last_seen field, spotted by grawity
2013-10-05 13:21:28 -04:00
Adam 277f735505 Hide expires in /cs info if the channel is actively in use as it confuses people 2013-10-05 01:07:51 -04:00
Robby- f63a2bdfb4 Big update of the Dutch language file.
cs_ban: Merge the syntaxes into one.
2013-10-05 00:49:12 -04:00
Robby- feb412bdb1 cs_mode: Fix override in /cs mode set. 2013-10-05 00:33:03 -04:00
Robby- ab856683c7 os_news: Add some logging. 2013-10-05 00:33:03 -04:00
Robby- 97d7c21193 Fix logging for log type 'other'.
os_ignore: Log expired ignores to the normal log level.
cs_drop: Allow Services Operators to actually drop channels in Read-Only mode.
os_akill, os_sxline, cs_akick: Log deletions by number.
2013-10-05 00:33:03 -04:00
Adam e5b8435769 Fix not setting -r when channels are deleted 2013-10-05 00:33:03 -04:00
Adam e589080827 Fix /ns alist showing a header/column header if the user has no access 2013-10-05 00:33:03 -04:00
Adam 257b10ee91 Hide privileged commands in ns help set and cs help set if configured 2013-10-05 00:33:03 -04:00
Adam 353ee5cc93 Fix xline uid generation when the one chosen already exists 2013-10-05 00:33:03 -04:00
Adam b094132c9d Log akill deleteions by number 2013-10-05 00:33:03 -04:00
Robby- 82006b868f cs_entrymsg: Check for the correct override privilege.
Make some more commands check if Read-Only mode is active.
cs_flags: Show a meaningful message when a user is not found on the access list.
os_set: Add missing capabilities to the readonly help output.
OperServ: Add logging to certain commands.
NickServ: Undo logging for listings.
2013-10-05 00:33:03 -04:00
Robby- ba5a3f5f00 Don't explicitly reference services nicks.
os_forbid: If NickServ is available, have it send the forbid reason instead of OperServ.
2013-10-05 00:33:02 -04:00
Adam 7b6c08b53a Exempt ulines/myself from bounce mode check 2013-09-29 17:22:25 -04:00
Robby- 47b692f9ae os_session: Add some empty lines to the session help command to improve readability. 2013-09-29 15:42:22 -04:00
Robby- ed06609ae1 NickServ: Change a few log wordings and add missing log calls to some commands.
ns_suspend and cs_suspend: Fix log wording, and correct syntax to show the reason is optional.
2013-09-29 15:42:22 -04:00
Robby- 32a57150ec ns_access: Allow LIST by Services Operators on suspended nicks. Change wording.
ns_ajoin: Fix the number of command parameters. Check for nick suspension. Do not allow just any Services Operator to access other users' AJOIN, require nickserv/ajoin. Change wording.
ns_cert: Add ability for Services Operators to modify other users' certificate lists.
2013-09-29 15:42:22 -04:00
Robby- 2a5e8f1890 cs_akick: Make the default autokick reason translatable.
os_forbid: It is required to specify a reason.
2013-09-29 15:42:22 -04:00
Robby- a04c320b4b cs_set: Fix showing expiry time in INFO output.
cs_sync: Check for the correct override privilege.
2013-09-29 15:42:22 -04:00
Robby- 4221a507cc Fix NickServ default nick expiry time. 2013-09-29 15:42:22 -04:00
Adam 44dd8d07d9 Add chanserv:always_lower_ts config option to always lower registered
channels timestamps to the creation time which fixes some race
conditions regarding users joining empty registered channels and doing
things prior to the -o from services coming through.

Without always_lower_ts attempt to bounce mode changes from bad users,
which will work okay in most cases.
2013-09-29 15:41:32 -04:00
Adam f7aa69b596 Correct expiretmeout and updatetimeout descriptions in example.conf, it is no longer triggerd by /os update 2013-09-29 13:04:12 -04:00
DukePyrolator d5ecc39104 display modechars instead of modenames in cpanel channelmodes 2013-09-29 04:23:33 +02:00
Adam 84a02d2709 Remove "Nick" reference from the /os ignore del message, as it can only contain hostmasks 2013-09-27 20:11:51 -04:00
Adam 4b059beb24 Replace this silly random code generation code with something more sane looking 2013-09-27 20:07:07 -04:00
Adam b319fb089c Fix compile warnings and errors found by clang 2013-09-27 19:11:02 -04:00
Adam 17196887ad Allow modifying mlock on nonexistant (but registered) channels 2013-09-27 19:11:02 -04:00
Adam 02d67f682a Allow /os forbid list <type> 2013-09-27 19:11:02 -04:00
Adam b306108740 Fix /os ignore del on nicks 2013-09-27 19:11:02 -04:00
Robby- 12a0311aaa Add missing columns to os_forbid. Make most lists with dates use the shorter output format. 2013-09-27 19:11:02 -04:00
Adam cf653fc084 Fix ms del all not actually deleting some memos
Fix numbering of memos in ms list
2013-09-27 19:11:02 -04:00
Adam 5cc7fc0387 Fix ms list crash 2013-09-27 19:11:02 -04:00
Robby- 832bc35135 Fix a few more modules to look in the right places for certain settings. 2013-09-27 19:11:02 -04:00
Robby- 06c5914820 Fix akillids to work again. os_session: Add missing num to del syntax and add missing expiry column. 2013-09-27 19:11:02 -04:00
Robby- bf67b9ee5c Make column titles in listings translatable.
Make some more strings translatable, and remove some that don't need translation at all.

Make expirytimes and units translatable.

Make predefined messages in listings also translatable.

Make the remaining command descriptions translatable.

Make some ns/cs info strings equal to dedupe in translation file. Add missing no-autoop setting to cs info output. Make some strings translatable.
2013-09-27 19:11:02 -04:00
Adam 829c169063 Translate strftime correctly 2013-09-27 19:11:02 -04:00
Adam 4948120b69 Translate SendSyntax() and spacify it properly 2013-09-27 19:11:02 -04:00
Adam 994471f5a7 Align info formatters with translated keys? 2013-09-27 19:11:02 -04:00
Adam 80c02740d0 Translate listformatter properly 2013-09-27 19:11:02 -04:00
Adam df3c0b7b52 Fix various commands to properly report a given expiry time is invalid 2013-09-27 19:11:02 -04:00
Robby- 45702992ac ns_cert, ns_set: Make strings equal for one translation instance 2013-09-27 19:11:02 -04:00
Robby- 9756f96b85 example.conf: nickserv:emailregistration -> nickserv:registration 2013-09-27 19:11:02 -04:00
Robby- 6ac0364f74 Fix os_stats to display SQLINEs and SNLINEs on non-supporting IRCds 2013-09-27 19:11:02 -04:00
Robby- 4f820a7d41 Fix typos, remove dead language defines.
os_set: Add missing debug text in help output.
2013-09-27 19:11:02 -04:00
Adam 5f7127dd92 Don't send regex qlines and nlines to the IRCd 2013-09-27 19:11:01 -04:00
Adam dcb3ff7d34 Dont send BURST twice on inspircd
Drop matching nicks on forbid.
2013-09-27 19:10:49 -04:00
Adam 1107b92699 Drop matching channels on forbid, and enforce nick forbids even on IRCds
with no qlines
2013-09-27 18:02:26 -04:00
Adam 3b0b1bc80e Don't send SQLines unless the IRCd supports it 2013-09-27 18:02:26 -04:00
Adam b60b23fd48 Only allow using os_oper add and del if you have the privileges for what
you are giving or taking.
2013-09-27 17:21:46 -04:00
Robby- 5aac6377c2 Correctly detect override in cs_ban on masks 2013-09-27 17:21:31 -04:00
Adam 20856fb59c Remove +r etc when channels are deleted 2013-09-27 17:21:20 -04:00
Robby- 7545763cd4 Added missing override capabilities and log calls to some ChanServ commands 2013-09-27 17:21:20 -04:00
Adam 1818b19eba Fix cs_mode lock reply if nothing is done
Fix not clearing forbids when os_forbid is unloaded
Apply nick and chan forbids when added
Fix loading forbids until after the service is constructed
2013-09-27 16:33:56 -04:00
Adam abc7e4b423 Fix os_news to not load items until the news service is constructed
Fix session exceptions not expirigin
2013-09-27 16:33:03 -04:00
Adam e5ece18ee7 Readonlyize many commands 2013-09-20 21:09:35 -04:00
Adam 8641b995c4 Merge the two memo del events into one. Since they had the same name it was confusing the event system 2013-09-20 15:21:32 -04:00
Adam b880240d72 Make os_session akill ip ranges and not individual user's ips 2013-09-19 13:35:52 -04:00
Adam 5ce90ba7d1 Fix not updating last_seen on expire nick for nicks with secure off. Don't show Expires in /ns info if the nick is online currently as it confuses people 2013-09-19 12:38:28 -04:00
Adam 98bae827e1 Require confirmation in /cs drop by requesting the channel name twice 2013-09-16 15:54:09 -04:00
Adam e3c05efe5e Remove static variables from functions in modules which causes them to be marked as gnu unique objects, which breaks dlclose()/dlopen() on g++ 4.5+ 2013-09-16 06:47:42 -04:00
Adam 8cbaf7e990 Update Spanish translation, from Isaac Fontal <i_fontal@hotmail.com> 2013-09-12 07:20:26 -04:00
Adam 339f41aebc Fix allowing duplicate entries on the snline list
Have proto mods recognize cidr ranges as zlineable IPs
Remove operserv/global from global.conf because its dumb
Fix example config ~botserv/set example to work as expected
2013-09-08 21:53:06 -04:00
Adam 55e4ef9d3a Fix logging /os set list. Enforce snlines on ircds that can't have snlines set by just killing the user. Fix double call to OnMatch() when a user matches an xline 2013-09-08 06:02:35 -04:00
Adam f63e4ceebe Alpabetize channels in /ns alist and on webcpanels chanserv page 2013-09-08 04:55:03 -04:00
Adam b005089f2f Dont allow multiple list modes with the same param on the mode list at once 2013-09-03 19:58:40 -04:00
Adam 1b42e26642 Cap mode stacker max line length 2013-09-03 19:40:03 -04:00
Adam 4691351167 Cleanup previous commit
Fix log messages from commands send through webpanel
Don't show OperServ section to non opers
2013-09-03 18:51:18 -04:00
DukePyrolator 404debf789 updated the chanserv section in webcpanel 2013-09-03 04:37:09 +02:00
DukePyrolator 752a5ca1b7 add vhost support for hybrid 2013-08-31 08:46:56 +02:00
Adam e1a1cf0e6f Dont crash on HasPriv() on an empty access group 2013-08-29 23:22:48 -04:00
Adam 3fabc2f831 Fix ns_ajoin on unregisterd +i channels 2013-08-29 23:13:29 -04:00
Adam 59ea36c831 Move Serialize::Types to construct after the corresponding extensible items they require when unserializing 2013-08-27 03:18:43 -04:00
Adam fac880664c Make chanserv:require not default to r 2013-08-27 02:56:54 -04:00
Adam 7f890ce98d Log parameters given to /cs mode set. Add logging to /os ignore. 2013-08-26 02:05:41 -04:00
Adam 50e1a3e96c Fix status mlocks. Fix reply from lock add. 2013-08-26 02:00:25 -04:00
Adam 6b79349e6c Fix User::IsIdentified with check_nick, do not remove +r on bursting clients until after server sync 2013-08-25 23:26:45 -04:00
Adam 678f54903d Fix not resetting channel status modes on our clients when a channel ts lowers 2013-08-25 22:57:26 -04:00
Adam 714a4a3004 Remove unnecesary mlock code in cs_mode, change mode set events to never bounce modes set by bots or servers, as it was possible to get modules to fight with each other 2013-08-25 21:33:52 -04:00
Adam 34826f71c7 Merge pull request #22 from fgsch/misc
Better ngIRCd support
2013-08-25 01:49:42 -07:00
Adam 847cceaba3 Create persistent channels on startup, which used to work and got lost somewhere
Fix some oddities with using persistent channels with no botserv
Send list modes to uplink when bursting
Fix issues with persist + keepmodes
Fix /os modes clear all not clearing all status modes
Fix operwall on ratbox/plexus
Dont apply mlock in SetCorrectModes since that just recursively calls itself unncessarially
Change command logging to show the command name and not the service name
2013-08-25 04:48:43 -04:00
Adam 09046e3c99 Show what kind of nick protection is enabled in /ns info 2013-08-25 04:48:43 -04:00
Adam 00a19529c3 Add logging to several operserv commands 2013-08-25 04:48:43 -04:00
Adam 446b3a910d Save unconfirmed status and passcodes in the database.
Fix db_sql_live to not reinsert all records if there are extra columns.
Plexus has no chmode +r
2013-08-25 04:48:43 -04:00
Federico G. Schwindt 76f5d4b316 Sort parameters and correct comments 2013-08-25 04:54:35 +01:00
Federico G. Schwindt 9b59925144 For ngIRCd, on nick change set mode -R 2013-08-25 04:54:32 +01:00
Federico G. Schwindt 243d781e99 Add login support for ngIRCd
This is implemented via the accountname METADATA command
2013-08-24 17:56:46 +01:00
Jens Voß 8be5f53f1f Merge pull request #21 from Phr33d0m/1.9
Use CDN for the rest of the .js files
2013-08-23 09:59:28 -07:00
Denis M. (Phr33d0m) cd49bb40c2 Use CDN for the rest of the .js files 2013-08-23 11:57:32 +02:00
Adam ef3d115bae Merge branch '1.9' of github.com:anope/anope into 1.9 2013-08-23 04:42:24 -04:00
Adam 9f1178ec58 Remove SSL cert verification because we dont use it 2013-08-23 04:36:02 -04:00
Adam 3bc2db561b Fix reading post data in m_httpd 2013-08-23 04:13:08 -04:00
Adam fad603e7a4 Merge pull request #20 from Phr33d0m/1.9
Redesign body of the pages.
2013-08-23 00:03:58 -07:00
n0kS Phr33d0m 5f006bf139 Fixed an incorrect layout, a couple of typos and a wrong form action 2013-08-23 08:42:45 +02:00
n0kS Phr33d0m aaa12cc018 Use a local copy of the background image 2013-08-23 08:11:24 +02:00
n0kS Phr33d0m 2238db8338 Make the navbar brand a different font to distinguish it from the rest of the navbar links. 2013-08-23 08:06:47 +02:00
Adam 4d1492d444 Remove webpanel:ssl configuration option because its dumb 2013-08-23 01:14:00 -04:00
n0kS Phr33d0m 5c4414e4a5 Removed innecessary logo width, the img-responsive will take care of that. 2013-08-23 07:05:57 +02:00
n0kS Phr33d0m 6f9b77e336 Don't use an external svg logo anymore, but a local png one. 2013-08-23 07:04:09 +02:00
Adam 154fa25e8f Fix m_httpd handling fragmented http requests 2013-08-23 00:57:36 -04:00
n0kS Phr33d0m 9793062007 Merge branch '1.9' of github.com:anope/anope into 1.9 2013-08-23 06:43:57 +02:00
n0kS Phr33d0m f86dc247e5 Redesign body of the pages. Now they have a distiguished panel heading and panel body. Also added background colour to currently selected section. 2013-08-23 06:39:23 +02:00
Adam 2b1f75a313 Fix m_httpd enabling ssl if m_ssl is loaded after it 2013-08-22 22:45:20 -04:00
Adam 5ac0c9a327 Fix previous commit 2013-08-22 17:33:16 -04:00
Adam e8763d5b3c Always set +o on users who have access for it, even if higher modes have a prefix 2013-08-22 01:48:17 -04:00
Adam ce7a32a994 Do not have cs_access try to represent non levels access entries as levels access entries. Sometimes it cant accurately be done and it confuses people. 2013-08-22 01:13:28 -04:00
Adam 0c1cc08e28 Update readme more 2013-08-21 23:22:27 -04:00
Adam e12e4e6956 Update readme 2013-08-21 23:20:05 -04:00
Adam 52535cf6fb Merge pull request #19 from Phr33d0m/1.9
A completely rewritten Control Panel
2013-08-21 20:17:20 -07:00
n0kS Phr33d0m 121d0a6e5b Fix a typo and remove unnecessary 'effects' 2013-08-22 03:27:29 +02:00
n0kS Phr33d0m 34535814e4 A completely rewritten Control Panel using some bootstrapping, jquery and lots of CSS 2013-08-22 02:37:43 +02:00
n0kS Phr33d0m 8bcc6840ce Nuking the old design with fire 2013-08-22 02:36:01 +02:00
n0kS Phr33d0m 08d113332c Fix incorrect GET method as we are submitting POST data 2013-08-22 02:32:04 +02:00
Adam 765943062e Always require the registered channel mode is set. Comment out default config requiring "r" as some ircds use it for registered users only 2013-08-21 01:35:57 -04:00
Adam 17cca42d48 Make maxaliases=0 really mean no limit 2013-08-21 01:27:14 -04:00
Adam 760fdc4049 Fix not setting vhost on nickserv update 2013-08-18 14:42:59 -04:00
Adam ead4aa7ed9 Fix 318 raw being sent for uids on ts6 ircds 2013-08-17 14:05:01 -04:00
Adam 65911dd1be Replace some get calls on <bool> extenisble types with hasext 2013-08-14 19:50:08 -04:00
Adam 4abfdcbb9c Do not default mlock +r, it is unnecessray and only clutters up the mlock list 2013-08-14 18:24:04 -04:00
Adam de5c8c0d38 Fix some issues with suspend 2013-08-12 15:45:50 -04:00
Adam 8e011bbb78 Respond to remote whois on inspircd for users on us that aren't service bots 2013-08-12 15:44:28 -04:00
Adam f15a9749f9 Use less strict valid ident checks on hybrid, unreal, and inspircd 2013-08-12 14:36:49 -04:00
Adam f1956b039d Remove channels from accesss lists when they expire/drop 2013-08-11 17:14:39 -04:00
Adam 53d5b7c29e Fix chanserv opersonly setting 2013-08-11 16:04:10 -04:00
Adam 812cb04fde Add DNS Notify support 2013-08-11 15:48:46 -04:00
Adam 1314d5b4f1 Fix cs_kee_pmodes default 2013-08-11 15:38:09 -04:00
Adam 490601de3a Fix chghost on charybdis 2013-08-11 12:25:58 -04:00
Adam c7aab50bff Support DNS ANY query type 2013-08-10 23:28:58 -04:00
Adam c507c78d5a Do not have ratbox or plexus pull modes from hybrid, it is entirely too confusing. Also fix cs_mode config 2013-08-10 17:59:31 -04:00
Adam 58c05687bf Add "simple seen" mode to cs_seen 2013-08-10 17:43:13 -04:00
Adam f8cdcc65c6 Merge pull request #18 from fgsch/1.9
Add certificate fingerprint support for ngIRCd
2013-08-10 14:26:27 -07:00
Adam 10a918f9e1 Default some listmax config settings to 50 2013-08-10 12:33:27 -04:00
Adam e4d1769a8b Add os_info 2013-08-10 12:29:12 -04:00
Adam 7cd80a2131 Fix logging LOG_NORMAL logs in m_sqllog. Fix/add more compat extensible items to ChannelInfo::Unserialize 2013-08-08 03:03:57 +00:00
Federico G. Schwindt 9d6f88de39 Add certificate fingerprint support for ngIRCd 2013-08-07 23:44:58 +01:00
Adam b93d650b1f Revert "Shrink to fit module event vectors when modules are removed from them"
Sometimes the events call the function the event is in, which causes a resize
while the original function is iterating.

This reverts commit 7f1b5552dc.
2013-08-07 21:19:49 +00:00
Adam c480695369 Fix db_sql to not remove objects when shutting down, as some modules that unload before it when shutting down remove their items then 2013-08-07 19:40:05 +00:00
Adam 7f1b5552dc Shrink to fit module event vectors when modules are removed from them 2013-08-07 17:27:18 +00:00
Adam 4865a8cfff Add m_sql_log 2013-08-07 16:44:35 +00:00
Adam 1efd289488 Fix inspircd jupe mess again, it wasn't working when juping servers that didn't already exist 2013-08-07 15:03:11 +00:00
Adam 83e4b183ea Add keepmodes setting 2013-08-01 14:07:56 +00:00
Adam 1e625b6837 Use MessageSource as the source for many IRCDProto funcs
Keep track of what user modes are oper only/server only/etc
2013-08-01 13:39:35 +00:00
Adam 402c624e45 Move chanstats stuff to stats/ 2013-07-29 12:02:40 +00:00
Adam fde83f6564 Rethink jupe/squit thing somewhat. Workaround for the inspircd rsquit/squit mess 2013-07-26 21:40:16 -04:00
Adam f0f43cf426 Fix build on late versions of cmake 2.4 2013-07-26 12:57:36 -04:00
Adam 3dc64bac4d Fix issues with 'Me' related to previous commit 2013-07-26 08:45:44 -04:00
Adam 2450a64bf4 Interally quit servers when juped 2013-07-26 07:38:42 -04:00
Adam b48293a632 Merge pull request #17 from fgsch/1.9
Fix levels on the ngircd module
2013-07-23 10:04:44 -07:00
Federico G. Schwindt e908dc0dc7 Make ChannelModeStatus level mandatory
Levels are used in Channel::SetCorrectModes() when removing modes.
2013-07-23 18:03:32 +01:00
Federico G. Schwindt 378c9203df Squashed commit of the following from Federico G. Schwindt <fgsch@lodoss.net>:
Date:   Mon Jul 22 22:40:07 2013 +0100

    Correct pasto

    Use proper name for included file.

Date:   Mon Jul 22 22:30:23 2013 +0100

    Indent defaults

Date:   Mon Jul 22 22:28:50 2013 +0100

    Correct option name

    signkicklevel is really signkick_level.

Date:   Mon Jul 22 22:25:24 2013 +0100

    Ensure some of the options are persisted

    Correct type for memo_signon, memo_receive, memo_mail and memo_hardmax so
    they're serialized.

Date:   Mon Jul 22 22:23:36 2013 +0100

    Add missing newline

plus additional suggestions from fgs
2013-07-22 23:45:08 -04:00
Adam 779f3788c9 More validation stuff from fgs 2013-07-21 18:29:35 -04:00
Adam 604da89813 More basic config validation, and fix crash when no uplinks are configured. spotted by fgs 2013-07-21 03:59:59 -04:00
Adam e11abdc4f0 Fix m_ldap service names from defaulting ldap/ldap/main 2013-07-21 00:37:21 -04:00
Adam 5aac04dffe Move SendLogin() back to User::Identify, it was moved at some point? but doesn't as intended in ::Login 2013-07-21 00:23:24 -04:00
Adam 7480fbda2b Fix removing old connections in m_ldap and m_mysql 2013-07-20 23:36:20 -04:00
Adam 9629ccb374 Fix more compile warnings found on newer g++ versions 2013-07-20 19:46:13 -04:00
Adam cb70d976ba Change cs_xop access check to use command order 2013-07-20 09:19:52 -04:00
Adam 6db0186947 Fix not setting the correct compile flags on modules and fix the resulting warnings 2013-07-20 03:06:20 -04:00
Adam 492eac20a8 Fix restoring topics on uplink sync 2013-07-20 03:06:20 -04:00
Adam c8511a625d Fix unserializaing seeninfos 2013-07-20 03:06:20 -04:00
DukePyrolator f6b915a169 added whois support to the ngircd protocol module, thanks to fgs for sending the patch 2013-07-19 22:28:33 +02:00
DukePyrolator 02c1724d75 some updates to the german langfile, thanks to kaylee for translating 2013-07-19 22:11:40 +02:00
Adam 7e87bb69fc Default xlines to be set by me 2013-07-15 23:59:19 -04:00
Adam aae522d72b Fix ModeManager::GetStatusChar 2013-07-15 23:23:54 -04:00
Adam 0a821640bb Fix deleting seeninfos 2013-07-14 20:37:42 -04:00
Adam 37733dea65 Fix Extensible<bool>::Set with a value (which is redundant due to the bool specailization) 2013-07-14 03:16:23 -04:00
Adam eabb9c0c11 Fix deleting badwords/modes/logs etc 2013-07-08 20:35:04 -04:00
Adam b103d16eb1 Fix loading some older compat flags and showing noexpire on /ns info 2013-07-08 15:48:37 -04:00
DukePyrolator e3b6ae3649 added missing NOTICE support to hybrid. sorry 2013-07-08 07:42:35 +02:00
Adam 0ff48e1538 Move op/deop/etc back to an actual command, its too hard to use cs_log with it as rewrites. Allow cs_log to work with either command names or service names. 2013-07-07 23:13:29 -04:00
Adam 53038d83bf Wipe services's module dir prior to make install 2013-07-07 23:13:16 -04:00
DukePyrolator 2ea594d677 added protocol support for incoming NOTICEs 2013-07-08 05:05:13 +02:00
DukePyrolator e957c7b2d2 m_dnsbl: updated the url to DroneBL in modules.example.conf 2013-07-08 05:04:04 +02:00
Adam 9a4f27e0a3 Only set stuff in ExtensibleUnserialize if there is something to set 2013-07-05 02:19:06 -04:00
Adam fccc4a4fa6 Fix sometimes not unloading all modules on shutdown 2013-07-05 02:09:43 -04:00
Adam 4325073524 Fix ns_set_misc and cs_set_misc 2013-07-05 02:09:27 -04:00
Adam 55199f0a4c Read most of the old common flags for compat 2013-07-04 23:05:30 -04:00
Adam 7edc76f7fb Fix deleting mode locks 2013-07-04 23:05:30 -04:00
Adam 3fbdde5e18 Fix Extensible dtor 2013-07-04 20:04:51 -04:00
Adam 9f8b4ac382 Allow access and flags to take privilege names 2013-07-04 01:21:14 -04:00
Adam 998925c90a Fix rehashing via SIGHUP and m_mysql 2013-07-04 01:19:40 -04:00
Adam 7f971043bc Allow channels on access lists 2013-07-03 22:45:00 -04:00
Adam c2e1a8a3e2 Fix some warnings and errors reported by valgrind 2013-07-03 19:44:13 -04:00
Adam c62b3cb275 Fix a few issues found by Attila (invalid array access in channel set events, os_chankill inf loop) 2013-07-02 01:56:13 -04:00
Adam 1a3d9a016d Change extensible keys to require explicitly having a type defined for it. Completely modularize more features like bs_kick, entrymsg, log, mode, etc. Move fantasy to its own module. Move greet to its own module. 2013-07-01 22:17:52 -04:00
DukePyrolator 518182ac92 m_mysql: handle multiple result sets returned from multiple statements or procedure calls 2013-06-30 05:28:01 +02:00
DukePyrolator 7d0e063300 added the missing accessmax option to the ns_cert configuration block 2013-06-22 17:06:48 +02:00
DukePyrolator 5e36d848d5 pseudoclients now trigger OnJoinChannel and OnPartChannel 2013-06-22 13:41:05 +02:00
DukePyrolator fee461f3d0 added support for CertFP on hybrid 2013-06-22 13:40:19 +02:00
Adam 1773eef143 Don't enforce usestrictprivmsg on TS6 IRCds and cache the value of usestrictprivmsg 2013-06-19 20:53:40 -04:00
KindOne 7704ee7107 Removed inspircd 1.1 reference from conf. Corrected a few spelling issues. 2013-06-19 20:07:15 -04:00
Adam 5ac1e9175d Set vhosts when users id to an account (and not a nick), add account arg to user ctor to ease handling users who connect already identified 2013-06-19 19:03:56 -04:00
DukePyrolator 5695c9e079 fixed a typo in the last commit. sorry. 2013-06-18 08:01:36 +02:00
DukePyrolator f92b0d6ea0 added support for hybrids new umode +S (client is connected via SSL/TLS) 2013-06-18 07:48:07 +02:00
DukePyrolator fc527b464a checking for ssl users when ajoining ssl only channels on inspircd, fixes 1466 2013-06-18 07:35:47 +02:00
Adam a93b315bd3 Fix cidr::match with odd cidr ranges 2013-06-15 23:27:01 -04:00
DukePyrolator 5246424dc0 added an 'extras' script to enable/disable extra modules before compile 2013-06-15 07:11:50 +02:00
Adam 1316147a8c Update Spanish translation, courtesy of Isaac Fontal 2013-06-15 00:09:25 +00:00
Adam 70319ab8be Fix usestrictprivmsg /msg vs / logic 2013-06-13 20:50:59 -04:00
Adam 7dd358972a Fix possible crash in Extensible::ExtensibleUnserialize if a null entry is in it 2013-06-12 02:33:30 +00:00
Adam d463ae3b1e Allow users to change their language to english when the default language is not 2013-06-12 02:30:21 +00:00
lethality ebda113f44 Made the message for unconfirmed nicks relevant to the ns_register registration setting 2013-06-06 17:28:59 +01:00
lethality 6ab6eca0a6 fixed typo, though I doubt it affects anyone/anything 2013-06-05 20:56:16 +01:00
Adam b1ba1ec8ac Made sepstream::GetToken less recursiveish 2013-06-01 21:58:08 -04:00
Adam 9956da18e3 Move OnJoinChannel event to trigger after the user has completely joined and document it more about what you should and shouldnt do in it 2013-06-01 21:56:52 -04:00
Adam b56e71ab14 Move CheckKick event to Channel and make os_forbid use it instead of kicking users in the join event, which does bad things 2013-06-01 14:55:45 -04:00
Adam 6f45d72497 Made m_mysql's Escape() function safe against escaping strings > BUFSIZE 2013-05-31 18:34:21 -04:00
Adam f5c01bf617 Fix /hs waiting 2013-05-31 01:44:32 -04:00
Adam 06bad31b18 Fix Channel::SetCorrectModes to never remove modes <= voice (currently secureops enforces everything, inclurding voice) 2013-05-28 22:17:22 -04:00
Adam 576aaff3da Don't compare system time to a users timestamp to determine when to collide with a user, if the time on services vs the ircd are different it does weird things 2013-05-28 21:07:07 -04:00
Adam c5bc8fab32 Include <iterator> in services.h as now more than one file uses it 2013-05-28 13:51:23 -04:00
Adam f6e2ebe145 Fixup last commit. We have events in log's destructor so we cant log messages from it, and this check in modulemanager is bogus/has a typo 2013-05-28 13:43:45 -04:00
Adam 37b3535543 Initially attach all modules to all events, and detach them as the events are run if they are not implemented per module 2013-05-27 19:36:37 -04:00
Adam c21e8d9204 Fix webcpanel build 2013-05-26 19:34:58 -04:00
Adam 22658d63bd Get rid of the remaining references in the core to specific services. Move more stuff out of the core to the proper modules. 2013-05-26 17:13:11 -04:00
Adam f2dee1e1d6 Update INSTALL and place some example link configurations in example.conf 2013-05-26 15:27:28 -04:00
Michael Wobst 968ef349d6 Update Hybrid protocol module for Hybrid 8.1 2013-05-25 15:47:56 -04:00
Adam d6640ed5ee Give an error message when the configuration file ends with an unterminated block 2013-05-25 14:08:50 -04:00
Adam aabc217a6b Fix /join 0 2013-05-20 23:45:41 -04:00
DukePyrolator d82391e46d made our database backup filenames more readable 2013-05-20 06:42:38 +02:00
Adam 7aa02864d2 Mark service:channels as a "botchannel" and don't try to hold them on sync, as the client should always be in the channel 2013-05-19 01:11:55 -04:00
Adam 2a8202c832 Give botserv bots assigned by persist the same botmodes as normal bots, fix some typos, remove unused variable 2013-05-18 23:45:10 -04:00
Adam be4a39ceb6 Fix desync when empty permanent channels are dropped on ircds that no have permanent channel mode 2013-05-18 15:47:26 -04:00
Adam a3dc75c61c Ignore define{} blocks defining directives to itself 2013-05-18 14:46:42 -04:00
Adam 14dc142a92 Add botserv bot usermode config option 2013-05-18 14:26:18 -04:00
Adam 51b7d53108 Add a config option for the default log bot 2013-05-18 13:08:26 -04:00
Adam 3253455792 Tabify some stuff in config.cpp 2013-05-18 12:25:26 -04:00
Adam 879b310580 Fix Windows build 2013-05-18 00:27:03 -04:00
Adam 5ff3aa7209 Yet another variable shadowing error which only show on newer gcc versions 2013-05-17 23:45:02 -04:00
Adam ca93122a68 You would think my compiler would at least warn me about this. but no. 2013-05-17 23:20:24 -04:00
Adam 2428264315 Add Redis database support 2013-05-17 23:04:18 -04:00
Adam cc4a14b0ba Removed some hard coded command names in help output 2013-05-17 22:53:55 -04:00
DukePyrolator 934b584374 do not validate nicks from ulined servers. this also fixes bug #1521 2013-05-15 03:23:20 +02:00
DukePyrolator 4237d49d41 improved handling of mlocks and topiclocks on inspircd 2013-05-12 11:09:34 +02:00
Charles Kingsley 1c36de5ab1 Fix config to default prepend_channel true for fantasy 2013-05-11 17:13:01 +01:00
Charles Kingsley da948be089 Update botserv.example.conf for xop fantasy commands 2013-05-11 17:06:16 +01:00
Adam 9384a4f088 Fix ChannelMode::CanSet 2013-05-10 16:17:24 -04:00
Charles Kingsley 4d62c673fa Fix typo in example.conf - thx rodr1go 2013-05-10 20:18:48 +01:00
Adam 7426b3b04a Readd check for users.size() == 1 before holding channels 2013-05-08 20:53:28 -04:00
Adam 735e234c2c Fixed some issues and desyncs with creating empty permanent channels on startup & dropping empty channels 2013-05-08 20:26:45 -04:00
Adam 735f0ba6cf Fix crash when we kill users because of a double free 2013-05-08 18:26:23 -04:00
Adam 9ee7c825e1 Check for peace being on before denying a mode change in cs_mode 2013-05-08 18:15:39 -04:00
Adam 912103ec13 Allow using sxlines on ircds that do not support them, since we always enforce them anyway 2013-05-08 11:31:20 -04:00
Adam f843e7bd90 Fix suspend info output in info and improved it 2013-05-08 11:13:48 -04:00
Adam d7e2ab688b Add activate_on_set option for hostserv 2013-05-08 10:40:46 -04:00
Adam 5e7085130e Fix reading multi line quotes from the conf with blank lines or lines with only whitespace 2013-05-08 10:12:31 -04:00
Adam 9b07e163c0 Make sockaddrs/cidr not throw on invalid ips to give us an easier/cheaper way to test for a valid IP 2013-05-08 09:50:43 -04:00
Adam 6859decfb8 Fix setting some default flags, reading fantasy blocks, and minusers setting being off by 1 2013-05-07 00:24:37 -04:00
Adam e23baf4297 Allow /os exception to contain CIDR masks 2013-05-07 00:06:02 -04:00
Adam c7f77b3b66 Fix a few issues with the poll socketengine 2013-05-06 23:48:18 -04:00
Adam 6578829fa6 Use I_OnUserQuit for os_session because I_OnPreUserLogoff gets called too late, after the users server can be gone. Fix a couple other small things 2013-05-06 22:18:38 -04:00
Adam ef06226521 Update the rest of modules.example.conf, default inspircd status modes to a sane rank incase they are prefixless, and 50 other things 2013-05-06 07:40:43 -04:00
Adam 4c669b947f Merge pull request #14 from attilamolnar/1.9+inspmodes
InspIRCd: Recognize a few more channel modes that weren't recognized
2013-05-05 22:49:29 -07:00
Adam 3fbb493d57 Fix extras build 2013-05-06 01:38:27 -04:00
DukePyrolator 223aa65cfa removed an unused variable 2013-05-06 07:28:23 +02:00
Adam fe54dfb37f Don't forget to CloseHandle threads on win32, spotted by Attila 2013-05-05 23:47:45 -04:00
Adam 3f5f84c92c The const char* specialization of this no longer works 2013-05-05 21:18:47 -04:00
Adam 5b3f81ea78 That doesn't work either, just don't use references.
find ./ -name '*.cpp' -exec sed -i 's/Get<const Anope::string\&>/Get<const Anope::string>/g' {} \;
2013-05-05 21:05:43 -04:00
Adam 3e8752fe66 The default arguments are references to temporaries which fall out of scope once the function returns, so we can't use them. gcc is just nice. cronus sucks. also validate a few more config options 2013-05-05 20:38:57 -04:00
Adam 57c2b65f08 Move module header files to include/modules to fix naming conflicts with system headers 2013-05-05 03:30:08 -04:00
Adam a118946e65 Fix Windows 2013-05-05 03:04:01 -04:00
Adam ee2dcf11b8 Cache timeoutcheck and fix a typo in example.conf 2013-05-05 02:49:32 -04:00
Adam e91de41278 Add an option to sepstream to allow it to return empty tokens if multiple separators are found in a row 2013-05-05 02:00:33 -04:00
Adam 10b5b00db4 Dont check for noquit/quitstorm, check and be sure all users are gone regardless 2013-05-05 01:58:45 -04:00
Adam 2044b4d3ad Cleanup of dns stuff based on stuff found making inspircd's module 2013-05-05 01:57:24 -04:00
Adam 1d0bb9b26b Rework the config file reader to be much more flexible and move many configuration directives to the actual modules they are used in. 2013-05-05 01:55:04 -04:00
Adam 781defb707 Move extras header files out of extras so when users copy modules out they dont need the headers too 2013-04-16 01:58:29 -05:00
Adam 16c124d34e Rewrote modules/CMakeLists.txt and do not build the 'extras' modules, if users want them built they should copy or symlink them out of extras 2013-04-15 01:00:45 -05:00
Adam f08dbced60 Allow assigning service bots via /invite 2013-04-14 17:39:01 -05:00
Adam baabc91ead Fix a few of the earlier changes to os_forbid 2013-04-13 16:36:39 -05:00
Adam 81483ae5e7 Fix build on Solaris 2013-04-13 06:05:17 +00:00
Adam 003140bf60 Fix Windows build 2013-04-12 16:20:51 -05:00
Adam b405484fb9 Fix OSX buld and a warning in modulemanager.cpp 2013-04-12 17:19:29 -04:00
Adam 9a45626379 Hack around calculate_depends not able to find libintl.h, since we deal with that later 2013-04-12 15:45:52 -05:00
Adam 10d10d057e Update Win32 build instructions slightly 2013-04-12 15:44:54 -05:00
Adam aa2844a3fc Fix not attaching cs_xop to I_OnReload 2013-04-12 02:48:24 -05:00
Adam 42c640a9b5 /ns drop help was pretty much a complete lie, so fixed it. Also require a nick param to /ns drop 2013-04-12 01:32:53 -05:00
Adam 066fc5801b Fix m_ssl 2013-04-12 01:14:56 -05:00
Adam 416eaa1e66 Explain how privileges associate themselves with modes 2013-04-11 15:58:59 -05:00
Adam ac19a5c24b Fix memoserv/rsend reply 2013-04-11 15:35:39 -05:00
Adam 6f9dd282d2 Use SetCorrectModes to set the inital modes on a founder once they register a channel 2013-04-11 15:28:53 -05:00
Adam c56d72ba84 Remove more OPDEOP references 2013-04-11 02:28:36 -05:00
Adam db4ed1cfaf Merge chanserv saset and set back into one command since it no longer needs to be separated... replace chanserv/set privilege with chanserv/administration. Dont tell users to use 'help' for more help if there is no help. 2013-04-11 00:51:08 -05:00
Adam cb64d806c1 Remove the need for having to set syntax to "" for commands with no syntax 2013-04-11 00:20:24 -05:00
Adam 4f9b7874d6 Pass new config and the new config reader to the OnReload event, aswell as call it on module load on modules that hook to it 2013-04-11 00:08:28 -05:00
Adam 207c46c871 Move some of the modules in extras/ that arent really extra out of extras. Mark our modules as VENDOR and allow modules to have multple types. 2013-04-10 22:26:40 -05:00
Adam 957cb2bf93 Use the mode names inspircd gives us to add modes if we don't recognize it 2013-04-09 16:27:25 -05:00
Adam b244c74479 Allow privilege descs to be read from the config to override the defaults 2013-04-09 14:51:39 -05:00
Adam b76b2e11c8 Made privilege names case insensitive 2013-04-09 14:48:24 -05:00
Adam b35665bb54 Rename OPDEOP and OPDEOPME privileges to be similar to the other status privileges 2013-04-09 14:33:54 -05:00
Adam c3eb5b885d And my bots initially start with no server.. 2013-04-09 04:23:29 -05:00
Adam 6faf4e3823 'Me' can not exist when channels are created 2013-04-09 04:13:49 -05:00
Adam 325b018ed0 Add a default method for user's SendModeInternal 2013-04-09 00:00:52 -05:00
Adam 0a3d27a91f Made XOP privileges configurable 2013-04-08 23:37:42 -05:00
Adam bcd85ca682 Fix OperType::GetCommands 2013-04-08 01:05:25 -05:00
Adam ac40c53fe4 Fix /ns set display 2013-04-08 01:02:45 -05:00
Adam 2eae82da5c Check the channel secure option isn't set in ChannelInfo::AccessFor too 2013-04-08 01:01:27 -05:00
Adam 72493b7305 Fix secureops 2013-04-08 00:42:07 -05:00
Adam 1a37e1c048 Made auto* chanserv privileges not hard coded.
Made cs_statusupdate not remove status on users if they still match other entries.
Move privilege descriptions out of the config
2013-04-08 00:19:07 -05:00
Adam fb7fef7a84 Optimizations of much of the more commonly used code 2013-04-07 23:46:44 -05:00
Adam 36602224b8 Remove the runtime module directory on non-windows because we no longer overwrite modules on install without deleting them first 2013-04-06 19:34:35 -05:00
Adam ccecfdf445 Made the missing dependencies message from cmake more descriptive for modules 2013-04-06 19:03:07 -05:00
Adam 32d1184c00 Use the return from BufferedSocket::ProcessRead() and don't just assume its true 2013-04-06 17:08:25 -05:00
Adam 6a46a08a85 This worked before but is a little weird 2013-04-06 16:58:04 -05:00
Adam 7a2e6aa5c2 Add more logging to bs_set, cs_set, and ns_set 2013-04-06 16:43:56 -05:00
attilamolnar 34b5f9ce6e InspIRCd: Recognize a few more channel modes that weren't recognized 2013-04-06 23:10:26 +02:00
Adam f77eb0a282 Let non founders still /cs ban by wildcard mask, but limit the number of people it will kick 2013-04-06 15:59:38 -05:00
Adam 302a409136 Unset +P from perm channels when expiring 2013-04-06 15:44:03 -05:00
Adam 0b3b9fe128 Fix toggling topiclock when the channel setting is changed 2013-04-06 15:26:52 -05:00
Adam f71c7865fc Fix generic mode support 2013-04-06 15:06:39 -05:00
Adam 4ecf20b3f5 Fix ns_lists command group 2013-04-05 16:59:27 -05:00
Adam a5b8788014 Made the securefounder checks in cs_set more consistent 2013-04-05 16:27:12 -05:00
Adam 3cc7950c4b Fix not constructing the /bs set greet command 2013-04-05 15:45:03 -05:00
Adam 854bc4db0c Move around some of Init() to fork() before initing the socket engine, as some engines cant survive a fork() 2013-04-04 22:12:48 -05:00
Adam dbc77279bf Fix applying some sxlines to users on add 2013-04-04 18:52:35 -05:00
Adam c4ef566a65 Fix /hs reject syntax 2013-04-04 18:45:45 -05:00
Adam 66376335ab Fix defcon taking action on new clients 2013-04-04 15:14:17 -05:00
DukePyrolator 823bc01f66 mentioned the charybdis protocol support in the readme and example config 2013-04-02 07:02:38 +02:00
DukePyrolator 947ad6f73a fixed using language files for third party modules 2013-04-01 10:26:19 +02:00
DukePyrolator 06c8a1ef50 Revert "added include/version.h to .gitignore"
This reverts commit b3fd861b3e.
2013-04-01 09:46:55 +02:00
DukePyrolator b3fd861b3e added include/version.h to .gitignore 2013-04-01 09:42:59 +02:00
Adam 62262f4b0d Fix typo in Mode message handler 2013-03-31 00:43:11 -05:00
Adam 6e0dc0e210 Add networkinfo:modelistsize config option to set the max size of b/e/I lists 2013-03-31 00:43:11 -05:00
Adam 7e7556f064 Merge usefulness of Timer and CallBack classes into Timer, and fix it to really work 2013-03-30 23:39:43 -05:00
Adam 111d6a9178 Fix loading ttb from databases 2013-03-30 22:40:20 -05:00
Adam d23817604c Add /bs set banexpire command to configure if/when botserv bans expire 2013-03-30 22:08:51 -05:00
Adam 4694c7afb4 Split up bs_kick subcommands into real subcommands 2013-03-30 19:08:07 -05:00
Adam a52293336f This reference to see if nickcores go away during command execution is no longer necessary 2013-03-29 23:51:45 -05:00
Adam f24e17f8b4 Fix /bs set private 2013-03-29 23:50:51 -05:00
Adam 2b208de02f Fix detecting module langauge files 2013-03-29 23:50:51 -05:00
DukePyrolator 4eb5d153c0 uuups, we already have the year 2013 2013-03-30 05:42:17 +01:00
DukePyrolator 0451dd3d0d added charybdis protocol support 2013-03-30 05:21:54 +01:00
Adam c3e4f1bf7e Fix build from earlier merge 2013-03-22 18:41:23 -05:00
Adam f122f104c4 Merge remote branch 'attila/1.9+timermanager' into 1.9 2013-03-22 11:52:42 -05:00
Adam deedb3bdd7 Dont call SetCloakedHost in users constructor, just set chost, because SetCloakedHost logs a message like the user just changed their host 2013-03-22 11:46:30 -05:00
Adam d27aa03500 Merge branch '1.9' of github.com:anope/anope into 1.9 2013-03-21 23:40:16 -05:00
Adam dcffa5da6f Properly cleanup after entrymsglists and ajoinlists when destructed 2013-03-21 23:39:39 -05:00
Adam 221e79f50d Check for null pointers in HasMLock/SetMLock/RemoveMLock, cs_register can pass it some sometimes/possibly other places 2013-03-21 23:33:40 -05:00
attilamolnar d5a453b663 Improve TimerManager
Instead of adding timers into a vector and sorting them every time a timer is added, use a multimap
2013-03-20 19:42:50 +01:00
Adam a2d69fa431 Merge pull request #13 from attilamolnar/1.9+inspversionfix
InspIRCd: Don't reply to VERSION
2013-03-20 09:45:40 -07:00
Adam 6a0e4418f4 Check that channels still exist before nulling their ci pointer in channelinfos destructor
Change the persist setting on a channel to mean only that it is being
enforced ircd-side
2013-03-20 11:39:16 -05:00
attilamolnar 68eeac67c9 InspIRCd: Don't reply to VERSION
InspIRCd sends all known version strings at burst and remembers the version strings sent to it. When a client does a /version <server> the cached version string is sent.
2013-03-19 19:16:13 +01:00
Adam 731912f01e Add db_sql:import config option so we can know for sure whether or not we want a database import 2013-03-18 12:16:51 -05:00
Adam 51963915ba Remove remaining disable_ns_register references in example config 2013-03-16 21:53:03 -05:00
Adam 810685cb73 Have db_flatfile store object ids if they are set, even though it doesn't use them, so that if other database modules that use them are loaded they can keep track of objects properly 2013-03-16 20:08:39 -05:00
Adam 1a0e6b0be3 Allow autokicking real names, extbans, and channels 2013-03-15 12:27:08 -05:00
Adam 81c89bb708 Fix missing dependencies message to include the source folder, there is no specific source file on modules with multiple source files 2013-03-15 07:43:17 -05:00
Adam 01620e849a Update nickserv defult names for kill/killquick, hide email, usermask, and quit 2013-03-14 20:51:28 -05:00
Adam 4c74020a69 Add group and hide setings to fantasy{} blocks 2013-03-14 09:03:48 -05:00
Adam b95b8f0aae Fix setting BSDefFlags from the config 2013-03-14 09:03:48 -05:00
Adam 1ff7a7c1f1 Refactor mask/entry code, allow full matching (against users real host/ip) if their displayed host is their real real host. Also match against cloaked host even if full matching is not being done 2013-03-13 14:40:49 -05:00
Adam 1d16629a6d Allow opers to override chanserv kick/ban, botserv say/act, and akick's peace setting 2013-03-13 09:45:15 -05:00
Adam 72aa27ede5 Allow m_ldap_authentication to block email changes if emails are controlled by ldap, don't tell users they must change their email during initial user registration 2013-03-13 09:02:31 -05:00
Adam 05223dbe6d Identify requests hold command sources and users can disconnect between the request being dispatched and when it returns, so don't assume the source user pointer is always valid 2013-03-10 03:23:00 -05:00
DukePyrolator 06d43baf93 update the users password after a successful ldap authentication 2013-03-03 10:58:39 +01:00
DukePyrolator 5f74662100 improved the operserv mode command 2013-03-03 10:57:53 +01:00
Adam 2c68312d72 Bump for Anope 1.9.9-git 2013-03-03 02:04:33 -05:00
Adam ce094f4d01 Anope 1.9.8 Release 2013-03-02 23:42:01 -05:00
Adam 178056096f Regenerate language files 2013-03-02 23:42:00 -05:00
Adam a32c897bf9 Update Changes and Changes.conf 2013-03-02 23:42:00 -05:00
Adam 367b662c83 Fix compile warning in webcpanel/memos 2013-03-02 23:42:00 -05:00
Adam 75999e05b9 Fix Anope::Duration showing years failing 2013-03-02 23:42:00 -05:00
Adam 45c02f8e4e Fix build with -std=c++11 2013-03-02 23:42:00 -05:00
Adam ae4421b8a2 Unset founder/successors when channels are deleted 2013-03-02 23:42:00 -05:00
Adam 2d309da0f6 Fix /ns drop nick showing "your nick" and not the nick you specified if the nick isn't registered 2013-03-02 18:52:15 -05:00
Adam b9bbb3747b Fixed logic fail in /ns resend 2013-03-02 18:46:56 -05:00
Adam 0b05eaa020 Only shrink extensible items that are metadata in ExtensibleUnserialize 2013-03-01 01:40:14 -05:00
Adam 91ad9d22ca Fix Windows build 2013-03-01 00:57:24 -05:00
Adam 6aa9ad938a Don't have cs_seen update data for users on syncing servers 2013-03-01 00:56:47 -05:00
Adam 6808498ead Fix entrymsg's creation time being reset from restarts 2013-02-28 23:09:03 -05:00
Adam 8561941e22 Don't enforce session limit on clients with no IP on Unreal, fix typo in /cs down syntax, fix os_session messages to reference ip 2013-02-25 00:26:49 -05:00
Adam 5d4db2b854 Allow /cs up and /cs down to take an optional nick arg 2013-02-24 20:15:49 -05:00
Adam 501503b7a5 On startup check all object types 2013-02-24 20:14:15 -05:00
DukePyrolator a980e32581 fixed wrong parameter count in cs_updown 2013-02-24 21:07:10 +01:00
DukePyrolator da2fea338a fixed some stupid typos in the german language file 2013-02-24 09:48:20 +01:00
DukePyrolator 7cb70f5fa1 some updates to the german langfile 2013-02-24 08:14:13 +01:00
Adam d04db3d38b Add SVSNICK and SVSHOLD to hybrid 2013-02-23 17:41:52 -05:00
DukePyrolator 35c260877f Revert "do not send RESV from operserv when its not introduced"
This reverts commit 2336b4723c.
2013-02-23 11:20:31 +01:00
Adam 8cf7ec9cfe Add missing SVSHold funcs to plexus protocol module 2013-02-23 04:32:41 -05:00
Adam c67087d750 Fix akick list/view not showing masks sometimes 2013-02-23 04:32:41 -05:00
DukePyrolator 2336b4723c do not send RESV from operserv when its not introduced 2013-02-23 09:54:03 +01:00
Adam da61734860 Made FindService less dumb and able to do aliases to aliases 2013-02-22 04:42:08 -05:00
Adam a911354f24 Fix "leave" channel log level 2013-02-22 00:39:13 -05:00
Adam ae902443db Merge branch '1.9' of github.com:anope/anope into 1.9 2013-02-22 00:30:22 -05:00
Adam 5547c3ed24 This OnServerSync event hook in inspircd20 can go away (it does nothing currently) 2013-02-22 00:29:00 -05:00
Charles Kingsley e844cdf4f6 Update COPYING 2013-02-21 07:38:42 +00:00
Adam 2fa5cfa508 Add Matthew to webpanel credits, fix alignment of akill list 2013-02-20 18:00:46 -05:00
Adam 59792173e7 Merge pull request #12 from MatthewM/webcpanel
Web Panel Modifications
2013-02-20 14:58:59 -08:00
Adam ed68482b4e Add /cs mode clear command that behaves like the old /cs clear modes/bans/etc 2013-02-20 15:51:40 -05:00
Adam 32592987c8 Allow /os mode clear [all] to unset modes, similar to old clearmodes 2013-02-19 04:07:53 -05:00
Adam a1f92638e3 Merge branch '1.9' of github.com:anope/anope into 1.9 2013-02-19 01:28:27 -05:00
Adam 7d50818ee1 Fix some OpenBSD build issues, and bugs #1485 #1486 #1487 2013-02-19 00:48:21 -05:00
DukePyrolator d0e1f3b66a fixed a typo in the last SASL commit 2013-02-19 05:21:01 +01:00
Adam cb91f991a3 Made the mode bouncing detector harder to hit and ignore syncing channels 2013-02-18 22:10:57 -05:00
Jens Voß a49d7b12cb Merge pull request #11 from grawity/mailmap
Add mailmap for Git
2013-02-17 05:31:04 -08:00
Mantas Mikulėnas eda7b55bac Add mailmap for Git
...to clean up `git shortlog -nes` (and `git log` in future git
versions).
2013-02-17 15:19:11 +02:00
DukePyrolator bcf99d5998 SASL sends AUTHFAIL on unsupported mechanisms, fixes bug #1482 2013-02-17 12:26:51 +01:00
Adam 3ab6706993 InsIRCd only sends QUIT on KILL for users 1 hop from us, so always internally kill users that we kill. Bug #1481 2013-02-16 03:59:28 -05:00
Adam c40e9c3996 Fix missing CheckInit check in db_sql_live 2013-02-16 00:31:42 -05:00
Adam 7be23b7e37 Fix setting modes on botserv bots in channels that have other bots in them on startup 2013-02-15 23:18:34 -05:00
Adam d9c18a6072 Store hashes of the last commit instead of the last commit 2013-02-15 19:01:46 -05:00
Adam 73099b82e8 Fixed unserializing servers in dns zones 2013-02-15 18:32:06 -05:00
Adam fc1d7ea89b Switch Destroy methods to delete 2013-02-14 20:58:01 -05:00
Adam 391f2822c8 This Serialize::Destroy method isn't actually needed anymore. Fixes weirdness from a few Serializable items we had on the stack. Added a comment about why operator< in Reference fails. 2013-02-14 20:57:40 -05:00
Adam f0875c5d85 Iterators suck 2013-02-14 20:11:52 -05:00
Adam f6ef706909 Magiobiwan is silly 2013-02-14 01:24:29 -05:00
Adam 7656c25e38 Made chanserv/unban with no parameters unban you in every channel you have access in 2013-02-14 01:20:18 -05:00
Adam 5cf1edeb6e Fix CommandCSMode::CanSet letting everyone set voice 2013-02-14 01:20:18 -05:00
Adam 9e544a6443 Store what channels have references to accounts in NickCore to prevent having to iterate over all channels and then all access entries when nicks expire or from nickserv/alist 2013-02-14 01:20:18 -05:00
Adam 225b7c38c1 Make NickCore::aliases a vector 2013-02-14 01:20:18 -05:00
Adam 994866461c Update obj ts when constructed in db_sql 2013-02-14 01:20:18 -05:00
Adam fc4b884d0e Sort output in ns_list and cs_list 2013-02-10 12:31:37 -05:00
Adam 9b3ecfe777 Fixed sepstream::GetToken logic fail 2013-02-09 22:48:05 -05:00
Adam 20794981b3 (re?)add mlock set as a simple way to clear all mlocks and add new ones at once 2013-02-09 00:24:15 -05:00
Adam 01413dd3cc Use channel mode +r to determine if a channel has either been newly created or
created while we were offline (eg, during the inital burst to the
uplink). Fixes not knowing whether or not channels ops in non-secureop
non-persistent channels obtained op while we were offline by creating
the channel or legitimately by being set op by another channel op.
2013-02-07 21:49:49 -05:00
Adam 9d1fe6102c Made DNSServer::Find case insensitive 2013-02-07 21:49:49 -05:00
Adam 2472a41561 Merge pull request #9 from Robby-/1.9-ns_set_misc
Fixed ns_set_misc not showing help for its SASET commands
2013-02-05 08:04:45 -08:00
Robby- 65fbdcfa87 Fixed ns_set_misc not showing help for its SASET commands.
Added descriptions and SASETs for the remaining commented ns_set_misc examples, without a description they won't show up in HELP if someone actually enabled those.
2013-02-05 16:31:14 +01:00
Adam 25cec015e8 Made access del by nick and other functions from 326f1a really delete objects 2013-02-05 09:45:48 -05:00
Adam 62e3c8c4f8 Merge pull request #7 from artemiiav/patch-2
Fix validating nickserv:registration when it is set to disable.
2013-02-02 10:53:05 -08:00
Adam 8902c1f038 Merge pull request #8 from Robby-/1.9
Some more typo and help text fixes, missing privileges, settings corrections, and cs_enforce changes
2013-02-02 10:51:08 -08:00
Robby- 6c43bcc3e0 cs_enforce: Make the logging also show the channel it was used on, added 2 missing log calls, can now handle overrides by services operators. 2013-02-02 07:32:32 +01:00
Robby- 15b37c1e38 Some more typo and help text fixes, proper formatting of control codes, missing privileges, and settings corrections. 2013-02-02 07:30:53 +01:00
MatthewM 29fcdc5f40 Updated jquery API to v1.9.0 2013-01-31 21:24:48 -05:00
artemiiav 1075bb1dbc Update src/config.cpp 2013-01-31 22:33:14 +03:00
Jens Voß dccb0ee313 Merge pull request #5 from Robby-/1.9
Config file updates: text changes, ...
2013-01-30 22:50:11 -08:00
Robby- aea86906f4 Some configuration file updates: Removed now non-existing settings. Redid some existing settings to look more consistent/uniform. Added some missing commands/permissions.
Merged operserv/modlist permission into operserv/modinfo.
Fixed ChanServ INFO privilege to actually work for /BotServ INFO too for those users who have it, instead of only for founders.
Fixed some typos aswell as removed whitespaces along the way.
2013-01-31 06:19:14 +01:00
Adam a62698a14a Remove sendpass from the configs and the config reader since it no longer exists 2013-01-30 17:44:07 -05:00
Adam 47af43c281 Made Anope::Duration also show years 2013-01-30 11:24:57 -05:00
Adam ae2c82adbc Don't expire session exceptions if in noexpire mode 2013-01-30 10:39:52 -05:00
Adam 594b1a136d Evidently Persistant is not a word 2013-01-30 10:39:52 -05:00
DukePyrolator ae46cc7f73 fixed an infinite loop in ns_recover, caused by a very small typo. 2013-01-30 09:18:56 +01:00
Adam 6b2aad734e Fixed SQL::Data::IsEqual to really only return if the two are completely equal. Fixes oddities with caching objects that are actually updated. 2013-01-27 13:55:42 -05:00
Adam 98ccbe2b06 Old botserv flags need BS_ prepended to them 2013-01-27 10:50:55 -05:00
Adam 5ae100fea2 Add nickserv/alist priv, merge botserv/botlist and botserev/assign/private to botserv/administration 2013-01-27 05:00:00 -05:00
Adam 0052dd29a7 Fix db_flatfile not clearing databases on save if there are no objects left of that type (it will leave the old database with old objects currently) 2013-01-27 01:59:38 -05:00
Adam 50a42d2cbf Fix os_session to work with sql properly 2013-01-26 22:17:25 -05:00
Adam 49cb6a07a2 Fixed db_sql etc being confused on empty vs not set metadata 2013-01-26 20:52:49 -05:00
Adam ed7c4dc2e1 Made Anope::DoTime default to seconds to fix os_akill etc defaulting expiries to days 2013-01-25 04:05:38 -05:00
Adam c376fb0a2b I forgot to add this change to a634c7be65 2013-01-25 03:31:35 -05:00
Adam 76d9e58ae5 mysql_insert_id doesn't return an id if one isnt generated, so
check that it really returns a value before using it.
Also fix memos to cleanup after themselves when deleted.
2013-01-25 03:09:51 -05:00
Adam 3769cc1a35 Fix memo signon and memo receive default flag names 2013-01-24 08:53:35 -05:00
CuleX 74ace7d4b9 Channel::HasUserStatus: Don't just return false if cms is NULL. 2013-01-24 00:34:41 -05:00
Adam 647245a71f Add missing KeySet() func to SQL::Data 2013-01-23 22:16:01 -05:00
Adam a634c7be65 Fix some compile errors 2013-01-22 21:20:05 -05:00
Adam f656e3195f Add hidenetsplitquit config option to not show splits in /ns info's last quit field 2013-01-22 19:47:16 -05:00
lethality 8811545472 Fixed few minor typos 2013-01-22 17:32:23 +00:00
Adam cad3850f3d Move channel mode set and unset events to be after the action has been done internally to allow easially canceling it 2013-01-22 01:23:55 -05:00
Adam 7de058ba35 Fix crash trying to unset the permanent channel mode during channel syncs of empty channels 2013-01-22 00:24:58 -05:00
Adam ddaa001daf Merge usefulness of Flags and Extensible classes into Extensible, made most flags we have juse strings instead of defines/enums 2013-01-21 22:31:16 -05:00
Adam 51c049e1a7 Really fix Channel::GetModes 2013-01-21 18:03:31 -05:00
Adam 93472f84bd Revert "Fix Channel::GetModes, we can never have a negative mode set on a channel so this check is unnecessary"
This reverts commit 678d27fdb7.
2013-01-21 17:59:22 -05:00
Adam 678d27fdb7 Fix Channel::GetModes, we can never have a negative mode set on a channel so this check is unnecessary 2013-01-21 17:55:27 -05:00
Adam 369ca89c2e Allow channels that have users in them that are not the access list to expire while in use. 2013-01-21 06:46:28 -05:00
Adam 421db75528 Fix not logging debug info to the logfile when debug mode is enabled 2013-01-21 06:38:13 -05:00
Adam 846b56c724 Fix defcon timeout timer 2013-01-21 02:31:28 -05:00
DukePyrolator e62d2fe56e removed old cs_modes fantasy{} command blocks 2013-01-21 07:15:16 +01:00
DukePyrolator bb3abab784 removed loading of ns_set_chanstats and cs_set_chanstats from the chanstats.example.conf, this functionality is now part of ns_set/cs_set 2013-01-20 15:03:15 +01:00
Adam da6543d17b Allow grouping commands to make help output easier to comprehend 2013-01-13 22:07:27 -05:00
Adam 29a018088e Add svsjoin and svspart commands 2013-01-13 22:07:27 -05:00
Adam 7e7fc757d5 Allow ns_set_misc/cs_set_misc to have configurable help descriptions 2013-01-13 22:07:27 -05:00
Adam d3a6bdc68b Allow the config parser to skip over gettext's _() to allow translating config values 2013-01-13 22:07:27 -05:00
DukePyrolator 402e42fd15 check if the database exists before we try to backup it 2013-01-12 09:01:44 +01:00
Adam 5007b72b28 Update copyright to 2013. This was done with:
find include/ src/ lang/ docs/ modules/ *.* Config -exec sed -i 's/-2012 Anope Team/-2013 Anope Team/i' {} \;
2013-01-09 04:20:55 -05:00
Adam 9931ec2994 Use m_rewrite to rewrite op, deop, halfop, ... etc 2013-01-08 20:25:01 -05:00
Adam 5f3dfc2960 Track +g on inspircd, fix saving/loading mode locks for generic modes 2013-01-07 21:30:07 -05:00
Adam dc9e81a6fc Fix deleting access by number 2013-01-06 18:38:04 -05:00
Adam ed719c80e7 Buggy compilers are buggy 2013-01-06 16:13:35 -05:00
Adam 77dc2e4746 And really check for them using ssl... 2013-01-06 01:46:53 -05:00
Adam c5f4c8d174 Fixed enforce ssl to not ban users if the channel is ssl only 2013-01-06 01:19:25 -05:00
Adam 6ba49642d0 Fix fmode handling on inspircd20 2013-01-06 00:48:50 -05:00
Adam 9a2ef9dc00 Add sslonly, bans, and limit to /cs enforce 2013-01-05 22:42:07 -05:00
Adam 6ccf0a3428 Fixed os_dns not readding connected servers if configured 2013-01-03 13:39:50 -05:00
Adam 23e303aaa2 Move enforcer checks on nick and logout to nickserv.cpp 2013-01-03 13:20:10 -05:00
Adam 098157dca8 Don't delete users immediately when quit or killed, instead wait until message processing is done 2013-01-03 12:34:01 -05:00
Adam 827469600e Move nickserv validate stuff to an event in nickserv.cpp 2013-01-02 13:59:33 -05:00
Adam bf718e8698 Evidently not specifying NOT NULL is not enough to allow null timestamps 2012-12-30 10:30:29 -05:00
Adam 326f1a9c8b Cleanup after mode locks, badwords, akick, access, if destructed 2012-12-29 20:29:41 -05:00
Adam 793c438286 Remove clearuser references from configs 2012-12-29 11:09:54 -05:00
Adam 6b1f323bb5 Move some of CheckKick to the respective modules 2012-12-28 15:59:33 -05:00
Adam 761849083d Dumb iterators 2012-12-28 13:00:36 -05:00
Adam ae6ddf295a fixup part of 379b2c, dont use iterators after theyre erased 2012-12-28 11:17:01 -05:00
Adam b591e8cdc8 Use the same object for chanusercontainer and userchancontainer 2012-12-28 10:43:30 -05:00
Adam 379b2ccf92 The timestamp column in SQL should actually be null sometimes, and fixed some valgrind errors with db_sql_live 2012-12-28 10:43:30 -05:00
Adam 3fb4cf56b6 Merge pull request #4 from alexbarton/ngircd-fix-NJOIN
ngircd protocol module: Fix NJOIN, actually join users to the channel
2012-12-27 13:25:33 -08:00
Alexander Barton fdc62daa8b ngircd protocol module: Fix NJOIN, actually join users to the channel
Bug introduced by commit d33a0f75: "Pretty large coding style cleanup,
in source doc cleanup, and allow protocol mods to depend on each other":
Since then, the NJOIN command has been "ignored", no users were added
to channels at all while linking ...
2012-12-27 22:15:33 +01:00
Adam 05094b0da5 When processing many modes don't enforce mlock until all are set 2012-12-27 15:03:38 -05:00
Adam 4ab8a70b21 Add an expiry option to /cs ban 2012-12-27 11:06:00 -05:00
Adam c88a3fffd5 Remove clearusers. There is still kick * for this. 2012-12-27 09:50:44 -05:00
Adam 7b1ae9602d Put appendtopic and topiclock into /cs topic 2012-12-27 09:43:19 -05:00
Adam c7a22dff87 Add register type to os_forbid to prevent users from registering nicks or channels 2012-12-26 19:42:37 -05:00
Naram Qashat 45ee7c12d0 Clean up the logic in adding extra library directories, adding to LDFLAGS isn't needed. 2012-12-25 17:10:43 -05:00
Adam 392b591d09 Allow modules loaded after startup to magically reobtain their database objects. Fix os_dns for sql(live) 2012-12-25 15:52:58 -05:00
Adam 556a4375e2 Cleanup after os_dns on unload 2012-12-25 12:40:09 -05:00
Adam eab583310d Don't check userlimit when servers first connect, servers wont have any users at that point anyway 2012-12-25 12:36:58 -05:00
Naram Qashat 077ae27369 Fix linking libraries so their rpath is set correctly and isn't stripped on install. 2012-12-25 02:20:00 -05:00
Adam d4e1c958e2 packet->answers isnt always empty initially, like with axfrs 2012-12-25 01:09:03 -05:00
Adam 33ae442aa1 We can svsjoin on plexus 2012-12-24 18:15:38 -05:00
Adam 1285c7f0ca Allow os_dns to manage multiple zones 2012-12-23 15:30:08 -05:00
MatthewM 8c72892de1 Made the overlay resize and the alert box reposition when the window is resized 2012-12-23 14:56:02 -05:00
Adam dc751bd2f1 Combine all of the set modules now that having them split apart is almost completely pointless 2012-12-22 14:49:48 -05:00
Adam 0cde0aee34 Fixed memo mail messages, and allow %N to be in them. Bug #1462 2012-12-22 09:10:32 -05:00
MatthewM 503bda5b28 Move the var to set the time out into the same javascript tag that is used for the modal as it's related 2012-12-20 23:48:20 -05:00
MatthewM a4d5c40d63 Added the overlay to the vHost request function 2012-12-20 16:22:58 -05:00
MatthewM 8e219bdd77 Moved the javascript to header.html from memos.html to make it easier to intergrate the overlay feedback and do tweaks 2012-12-20 16:12:16 -05:00
MatthewM 5acc93dd34 Made the table cells for the memo table have no spacing and color the read and unread memos different colors 2012-12-20 01:19:04 -05:00
Adam 276247b463 Add a command flag to require that a user is executing the command 2012-12-19 16:03:53 -05:00
MatthewM d277f49423 Minor style tweaks to make the links look more like a button 2012-12-19 13:17:44 -05:00
Adam 67bd2c6b2d Add version flags for debug, git, and Windows 2012-12-19 09:21:25 -05:00
Adam 784683a68d Having these references to bots bugged out older compilers, so simplify this by just moving pointers to the core 2012-12-19 08:48:23 -05:00
Adam 3b2094301d Fixed typo in b6407afa06 2012-12-18 10:35:11 -05:00
MatthewM 6572754c10 Cleaned up the overlay layout, added some minor visual and js fixes 2012-12-18 10:34:33 -05:00
MatthewM f157ea3fdb Added a click reply function to the MemoServ memos page that autofills the senders name 2012-12-18 10:04:26 -05:00
MatthewM ddd7fe6f05 Bug that was experinced seems to be somewhat related to Windows 8 and maybe an extension on chrome. Reverting to previous commit 2012-12-17 22:03:21 -05:00
MatthewM 47a351acb2 Fixed a minor bug that overlapped the nav links and the content from .content in Chrome on Windows 2012-12-17 19:26:07 -05:00
MatthewM ff9f670871 Give the overlay window a rounded edge to make it look a bit nicer and fade the main content a little less 2012-12-17 18:28:15 -05:00
MatthewM f33f7d98c4 Added a modal window interface to MemoServs page that will automaticly fade out after a give time (currently 5s) 2012-12-17 14:32:28 -05:00
Adam c49f03f985 Allow escaping brackets in webpanel templates and redirect users to the homepage when their session is not found 2012-12-15 23:51:25 -05:00
MatthewM 6b5f583ff3 Merge Adams commit to allow escaping of brackets 2012-12-15 21:46:14 -05:00
Adam 8e3ab0d10b Made all langauges default to the UTF-8 charset 2012-12-15 21:35:38 -05:00
MatthewM a049092526 Merge branch '1.9' into webcpanel 2012-12-15 21:05:05 -05:00
Adam b6407afa06 Fix chghost/chgident/etc on inspircd20 2012-12-15 05:13:09 -05:00
Adam fbd3cda320 Merge pull request #2 from czaks/conv-languages-to-utf-8/1.9
Convert locales to utf-8 charset
2012-12-15 01:15:03 -08:00
Marcin Łabanowski 05341828b5 Convert the language files to utf-8 encoding.
The files have been converted using the following script:

for i in *.po; do
  cat $i | grep charset | cut -d= -f2 | cut -d\\ -f1 > charset
  echo Converting $i from `cat charset` to UTF-8
  iconv -f `cat charset` -t UTF-8 < $i | sed "s/`cat charset`/UTF-8/g" > $i~
  mv -f $i~ $i
  rm -f charset
done
2012-12-15 09:39:12 +01:00
Marcin Łabanowski 280ba89b26 Fix the language files to state the correct charset. 2012-12-15 09:28:19 +01:00
Adam fe7fcc2dc3 Check for NOJOIN being < 0 but restricted on in db_old 2012-12-15 02:44:53 -05:00
Adam dcd34d3728 Move DNS handling to a module 2012-12-15 01:33:31 -05:00
MatthewM dced01fc24 Added a large scroll box for the chanserv main page 2012-12-15 01:14:52 -05:00
Adam cdec0a3f96 Fixed some html errors in the last commit 2012-12-14 16:47:45 -05:00
MatthewM 1075f3b457 Allow opers to drop channels
Added chanserv drop to web panel
Allow long lists of akills to scroll
2012-12-14 16:44:14 -05:00
Adam c1077faa28 Optimize much of the database code and serialize code. 2012-12-13 06:12:56 -05:00
Adam 76ba147c22 Unregister operserv_akill page on unload in cpanel 2012-12-12 02:28:19 -05:00
Adam 1c1a216df1 Only allow non-user sources to register nonexistant channels 2012-12-12 01:33:58 -05:00
Adam 04f96a54b8 Some small improvements to last few commits, and fixed some problems with the template engine 2012-12-12 01:30:50 -05:00
Adam 5f72d1fda5 Squashed commit of the following:
commit 317ead6b39
Author: MatthewM <mcm@they-got.us>
Date:   Tue Dec 11 02:14:06 2012 -0500

    Added the HostServ link to the navigation bar

commit 6b15d7fc5e
Author: MatthewM <mcm@they-got.us>
Date:   Tue Dec 11 01:58:18 2012 -0500

    Correct some slight over sights that was missed eariler

commit b356a46789
Author: MatthewM <mcm@they-got.us>
Date:   Mon Dec 10 23:44:51 2012 -0500

    Started work on adding HostServ to the web panel
2012-12-12 01:04:08 -05:00
Adam dfff54425b Fixed webpanel fail on nondebug builds 2012-12-12 00:49:16 -05:00
DukePyrolator 0edd26467e IsNickValid() now accepts '[' and ']' in the nickname 2012-12-11 05:27:56 +01:00
DukePyrolator e71c890cf5 added a missing permission for operserv/global to the Services Administrator block in example.conf 2012-12-09 14:32:16 +01:00
DukePyrolator eada35df36 fixed a problem with the webcpanel logout when using apache + mod_proxy 2012-12-09 14:21:42 +01:00
DukePyrolator 8d4a08ccc1 fixed a log message showing the wrong IP 2012-12-09 14:19:30 +01:00
Naram Qashat 9dec093676 Modified the Config scripts to ask the user explicitly for additional include and library directories. 2012-12-07 03:02:15 -05:00
DukePyrolator f711dd3460 ngircd protocol module: improved vhost support 2012-12-05 06:18:36 +01:00
Adam 7a865b6b28 Only bad-password users when the account theyre trying to identify for actually exists 2012-12-02 04:31:50 -05:00
DukePyrolator faaaae365a enc_sha256: the length of the digest is SHA256_DIGEST_SIZE, not SHA256_BLOCK_SIZE. also removed an unneeded trailing NULL byte. 2012-12-02 09:16:40 +01:00
Adam 705d1efeab Allow services to return more than one NS record 2012-11-30 20:49:59 -05:00
Adam c0f60d56a1 Change /os reload to not unnecessarially rebuild httpd servers. Change m_httpds Log methods to the module version. 2012-11-30 20:44:21 -05:00
Adam a4468dd56e Allow modules to use the encryption modules to encrypt arbitrary things.
Made enc_old depend on enc_md5.
Allow not loading any encryption modules if you want to only use an
external mechanism.
Removed ns_sendpass since it's just a bad idea.
2012-11-30 02:53:03 -05:00
Adam 337f361526 Fix warnings from classes with virtual functions not having virtual destructors 2012-11-29 17:03:53 -05:00
Adam 26a048e5c4 Rewrite/simplify some of m_httpd 2012-11-28 22:54:26 -05:00
Adam ccd41e7efe Use signon for svid on bahamut, not timestamp 2012-11-28 00:42:07 -05:00
Adam a1a5ba0723 Use signon for svid on unreal, not timestamp 2012-11-27 21:43:17 -05:00
Adam 8a6962fc36 Keep track on what ircds we can svsjoin, add an svspart method 2012-11-26 23:09:26 -05:00
Adam f23bad140b Revert a small part of 90930619bc, evidently this was important 2012-11-26 19:50:29 -05:00
Adam 1bfafd9eb6 Fixed rehasing doing weird things to botmodes due to trying to set on nick not uid 2012-11-26 04:30:30 -05:00
Adam 1bdb756b25 Restrict the length of kick reasons in cs_kick, cs_ban, and cs_akick 2012-11-25 22:37:54 -05:00
Adam 80c573eed7 Merge remote branch 'cronus/1.9+unrealtokens' into 1.9 2012-11-25 21:47:10 -05:00
Cronus 78607ea60c Remove UnrealIRCd's TOKENS, they are kinda useless 2012-11-25 20:35:45 -06:00
Adam 0110214abc Fix build the last arg on fantasy commands to chanserv 2012-11-25 20:58:35 -05:00
Adam 54d8695e70 Add commented command{} blocks for how 1.8 worked, don't show saset in the help list to registered users. 2012-11-25 20:36:57 -05:00
Adam a2441fd326 Rename restoreonghost in nickserv.conf 2012-11-25 19:47:09 -05:00
Adam 831a1d15d5 Merge ns_ghost, ns_recover, and ns_release. Fix svskilling users on Unreal. 2012-11-25 19:41:36 -05:00
DukePyrolator 6b5df8e62f added a config block for cs_seen in chanserv.example.conf 2012-11-25 05:44:31 +01:00
Adam 0210cf2b17 Make the actual clients into services too 2012-11-24 21:22:32 -05:00
Adam f0708340ef Fix parsing fjoin on inspircd 2012-11-24 19:10:07 -05:00
Adam a44bf31d27 Helps to name ping right 2012-11-24 17:19:08 -05:00
Adam 002f00d7eb Add IP.Board m_sql_authentication query to modules.example.conf, from Genesis2001 2012-11-24 02:15:19 -05:00
Adam ded89b0d49 Made IRCDProto a Service 2012-11-23 23:10:41 -05:00
Adam 36b1166cf6 Change the return type of ircdmessage to void now that we don't use it, add an ircd message module event, and a few more fixups 2012-11-23 16:56:06 -05:00
Adam 0e7bd9f3ba Fix compile/pch generation 2012-11-22 20:27:42 -05:00
DukePyrolator 7963534940 fixed some compile errors 2012-11-22 21:44:51 +01:00
Adam d33a0f75a5 Pretty large coding style cleanup, in source doc
cleanup, and allow protocol mods to depend on each
other
2012-11-22 00:50:33 -05:00
DukePyrolator 368d469631 added METADATA and vhost support to the ngircd protocol module 2012-11-18 10:34:35 +01:00
DukePyrolator efd3c04f37 fixed a typo in IRCDMessageSetName in the unreal protocol module 2012-11-18 09:50:23 +01:00
Adam 5fe6f0b2ec This should be find, not find_first_of 2012-11-16 00:06:07 -05:00
Adam 5d6fb2427e Fixed some stuff spotted by Cronus, made db_old convert ACCESS_INVALID levels to ACCESS_FOUNDER, fix cs_enforce +R from an earlier commit, fixed ChangeModeInternal TS checking when IRCds don't send TS on mode 2012-11-16 00:03:15 -05:00
Adam ad3d1d381a Never log debug levels >= 2 using a log block 2012-11-10 13:57:06 -05:00
Adam b51f60cc1e Fix user account logout message 2012-11-10 13:57:06 -05:00
DukePyrolator 504232b388 added support for the ngircd SQUERY command 2012-11-10 18:29:35 +01:00
Adam 8f36f65f39 Made access del and xop del behave like access add/xop add by using a users mask if given an unregistered nick 2012-11-09 19:20:17 -05:00
Adam ff3e396e92 Add a config option to disable sasl 2012-11-09 19:13:33 -05:00
Adam 2fe387b4f0 Update bi->lastmsg in cs_log when something is logged via privmsg 2012-11-07 23:23:02 -05:00
Adam 9ec482b7c2 I haven't a clue why this was here but its not even remotely right.. fixes #1448 2012-11-07 22:20:48 -05:00
Adam 53e8cd18dc Duplicate check some of these larger hashmaps on insert, just incase 2012-11-07 21:57:31 -05:00
Adam ac57f41c87 We no longer have to use the rungroup provided at build time, it is specified in the config now 2012-11-07 19:36:59 -05:00
Adam 8b78b6bb10 Fix crash on suspend etc if kicking a user causes the service bot to part when the service bot is next in the userlist (as we have an iterator to it) 2012-11-07 15:41:49 -05:00
Adam 52fa66820c Give suspend the correct permission in botserv.conf, fix pch build 2012-11-07 15:17:58 -05:00
Adam 72eb2ccf50 Sometimes capab is sent as one parameter 2012-11-06 11:02:12 -05:00
Adam 4cfd468863 Made os_noop more useful 2012-11-06 11:02:12 -05:00
Adam 0cf8d73395 Added log messages for all of the other chanserv commands that should be logged 2012-11-06 11:02:12 -05:00
Adam 53b2bdfe5e Use std::tr1::unordered_map for a few of the larger maps 2012-11-06 11:02:12 -05:00
Adam 27ab6a686c Windows fixes 2012-11-06 11:02:12 -05:00
lethality 22c8297a03 Added chanserv/status to fantasy commands 2012-11-06 15:19:56 +00:00
Adam d22e86376b Catch the exception from /os session view invalidip 2012-11-05 15:59:11 -05:00
Adam fb56b3a53f Made m_xmlrpc use m_httpd 2012-11-03 22:04:19 -04:00
DukePyrolator 0c47017046 added support for SVSNICK in the ngircd protocol module 2012-11-03 09:40:01 +01:00
DukePyrolator 792091b23c cs_seen: do not read duplicate SeenInfo entries from the database 2012-11-02 18:35:33 +01:00
Adam b917361de8 Fix pch generation 2012-11-01 16:26:59 -04:00
Adam a0a54fdfe0 Expand options:hideprivilegedcommands to not show commands requiring authentication to unidentified users 2012-11-01 16:15:44 -04:00
Adam d90d5d538b Fixed operserv/umode serv help entry 2012-11-01 14:54:14 -04:00
Adam c2ae76248e Made db_old load exceptions.db 2012-11-01 14:47:23 -04:00
Adam 9aa71af1e5 Accept 1.8s svid ts on plexus too 2012-11-01 14:47:23 -04:00
Adam b64abebd24 Made os_logsearch search oldest logs first so the newest entries are at the bottom of the list 2012-11-01 14:47:23 -04:00
Adam 90930619bc Fixed quite a bit of dumbness with m_ssl. Had to
modify socketengines to allow polling for write &
no read, but is it cleaner now. Made m_httpd able
to listen using SSL.
2012-11-01 14:47:23 -04:00
DukePyrolator 5b1c823019 fixed importing mode locks in db_old 2012-11-01 05:28:57 +01:00
Adam b2b4f21e39 Clarify the path given to Config isnt actually the bin path, but the path Anope is installed to 2012-10-31 23:11:06 -04:00
Adam 22e55165c9 Fixed anopesmtp logging 2012-10-31 22:57:11 -04:00
Adam 35c2256849 Apparently sending this all at once didn't work that great, so wait for the events before sending the joins/modes etc 2012-10-31 17:37:19 -04:00
Adam 3a10fca75f Fix ns_ghost and ns_recover, add nicksev:restoreonghost 2012-10-31 12:37:43 -04:00
Adam a39947cd3c Made os_forbid honor nssecureadmins 2012-10-30 22:07:15 -04:00
Adam 1730bfb2bc Send uids everywhere when setting modes on clients 2012-10-30 21:22:10 -04:00
Adam 26a4a13cdf Made os_mode a bit smarter 2012-10-30 20:40:42 -04:00
Adam 36f357c354 Fixed build errors and warnings with -std=c++11 2012-10-30 17:10:31 -04:00
Adam b07928eea9 Clean up ngircd proto mod slightly, and send sqlines before introducing clients 2012-10-30 15:50:39 -04:00
Adam 1ef7480380 Fix inspircd mode message for channel modes. It never actually uses this, but other pseudoservers may send modes using this and not fmode (it has no timestamp) 2012-10-30 15:21:47 -04:00
Adam e4c2dcc0c7 Made db_old load up most of the old mode locks 2012-10-29 21:51:34 -04:00
Adam 7bdad857e4 Only show mode lock in /cs info if there really is a mode lock 2012-10-29 21:28:43 -04:00
Adam c2a8ad26af Fix formatting fail in cs_status 2012-10-29 17:47:26 -04:00
Adam fedf235c83 Update Config.cs for VS 2012 and fix it failing if the source directory path has spaces in it 2012-10-29 17:07:10 -04:00
Naram Qashat e88d2c2031 Make it so CMake doesn't complain if packing on a system using Visual Studio Express. 2012-10-29 16:40:19 -04:00
Adam 20e4685057 Readd cs_status 2012-10-29 14:54:49 -04:00
Naram Qashat ca55e15d44 Fix building under Mac OS X via Makefiles if not using an Xcode project. This is a hack but CMake currently provides no other way to determine if the detected C++ compiler was identified as Clang. 2012-10-29 14:06:42 -04:00
Adam bb5e4127d7 Made MailThread completely threadsafe, currently theres a race condition with config reload + sending mail at once 2012-10-29 13:51:38 -04:00
Adam 30028a2404 This include is unncessary 2012-10-29 13:46:21 -04:00
Adam 6883309927 Made anopesmtp less hard to debug 2012-10-29 13:46:21 -04:00
DukePyrolator 9c8570ac68 readded ngircd protocol support 2012-10-29 04:17:24 +01:00
Naram Qashat 4dfc0f952f Fix cmake generation due to this if not being updated. 2012-10-27 12:09:07 -04:00
Adam d6e1b92059 Add a module log type 2012-10-27 08:12:04 -04:00
Adam bb5f4555dc Ues timestamp for dns serial not yyyymmddnn.. there are too many problems with this (restarts, >99 zone updates/day, etc) 2012-10-27 05:34:36 -04:00
Adam 32d33ca8e5 Expand single digit serial revisions to match nn 2012-10-27 04:44:10 -04:00
Adam e1dcf24c98 Add nickserv:modesonid config option to set what modes users get on identify 2012-10-26 17:30:41 -04:00
Adam 3b24311db6 Sometimes zone transfers can be really big 2012-10-26 12:57:25 -04:00
Adam 8fd3fc7c13 Add sasl support to unreal, inspircd 2012-10-26 10:46:19 -04:00
Adam 8d27b25bf8 Don't attempt to process any query packets if we aren't explicitly given permission to bind to a port (we do anyway currently for m_dnsbl to get replies) 2012-10-26 00:55:04 -04:00
Adam 727b35536f This code isn't used 2012-10-25 23:44:34 -04:00
Adam bbe667dc74 Fixed two memory leaks in cs_seen 2012-10-25 22:29:10 -04:00
Naram Qashat 3608d42ae9 This version needs a better tag than "-git", so there. 2012-10-25 22:26:59 -04:00
Adam 8f33933dd8 Default xlines to be set by OperServ 2012-10-25 21:31:58 -04:00
Adam e5efe42ecb Fixed showing users from the right server on unreal/bahamut 2012-10-25 04:30:22 -04:00
Adam 10e21bfeda Fix handling clients on unreal that have no ip (it sends a *) 2012-10-25 01:30:41 -04:00
Adam 00256fdba8 Made access provider modules permanent. They don't cleanup their access entries currently and if they did it would delete them. 2012-10-24 23:30:21 -04:00
Adam 3b8fb7bb88 When db_sql_live gets new objects immediately update cache on them to prevent rewriting later if they aren't changed 2012-10-24 22:48:12 -04:00
Adam 1057fa8421 BIND's forward ability did not work as I expected
because it will not forward non recursive queries.
So, added support for SOA, NS, and AXFR requests.
2012-10-24 19:32:26 -04:00
attilamolnar fca9ec085e InspIRCd: Add handler for FIDENT to 2.0 protocol, so we know when someone changes ident on the network 2012-10-24 07:40:16 -04:00
DukePyrolator ef5c6684c7 Merge branch '1.9' of ssh://anope.git.sourceforge.net/gitroot/anope/anope into 1.9 2012-10-24 05:12:47 +02:00
DukePyrolator e0438e3a7e fixed calculating the correct channelcount for an user when loading the db. fixes bug #1450 2012-10-24 05:12:13 +02:00
Adam 04632bd381 Cleanup of last few commits/warning fix 2012-10-22 17:02:01 -04:00
Adam 0b9db15efc Add os_dns, a way to control your DNS zone via services 2012-10-22 00:54:30 -04:00
DukePyrolator d5b2f9cfa7 Base has to destruct before Extensible does because objects that destruct due to Extensible destructing don't have their references to the already destroyed object for Base invalidated. (fixed for NickAlias and NickCore) 2012-10-21 18:29:10 +02:00
Adam 727c3d5b75 Base has to destruct before Extensible does because objects that destruct due to Extensible destructing don't have their references to the already destroyed object for Base invalidated 2012-10-18 20:06:02 -04:00
Adam eddb7684c1 Fixed protoctl parsing on Unreal + fix SendLogout now the usage has changed 2012-10-17 20:22:44 -04:00
Adam 484baba6ad Actually show the correct number of entries on /os logsearch output 2012-10-15 03:54:26 -04:00
DukePyrolator 88f10a2c3c Updated the hybrid protocol module, patch provided by Michael
- Change mode handler to use UIDs within SVSMODE messages
- The IP can be 0 in UID messages depending whether or not a client is spoofed
- Removed SendGlobopsInternal handler. Anope is using GLOBOPS by default
- Set user's services timestamp/account to 0 instead of 1 on /ns logout, otherwise the UID message handler will
2012-10-14 20:13:41 +02:00
Adam ffa1c976f5 Use account name for svid on hybrid 2012-10-14 01:50:14 -04:00
Adam 4fdc157f68 Better clarify signon vs timestamp and allow updating users timestamp to an ircd given value from NICK 2012-10-14 01:05:24 -04:00
Adam 0a950669cb Add a hybrid 8 protocol module courtesy of Michael <michael@wobst.at> 2012-10-13 23:49:15 -04:00
Adam 1232018332 Allow services operators to modify/view other users autojoin lists 2012-10-13 06:21:53 -04:00
Adam 6237613439 And update modules.example.conf 2012-10-13 00:40:44 -04:00
Adam 4424abd15d Add m_sql_oper 2012-10-13 00:37:10 -04:00
Adam 76a0471c29 Simplify the db_sql_live code since this isn't actually necessary. Fixes a problem internally ovwrwriting data on objects that we have modified and are queued because of assigning something to a serialize_obj reference 2012-10-13 00:37:10 -04:00
DukePyrolator e08422a4ea fixed MODE handling in the ratbox protocol module 2012-10-12 22:47:35 +02:00
Adam 757ff06011 Fix m_ldap to reconnect automatically if the ldap server goes away 2012-10-10 23:08:00 -04:00
Adam 06defe014b Merge remote branch 'attila/1.9+topiclockmsg' into 1.9 2012-10-09 19:34:24 -04:00
Adam 63bf134321 Merge remote branch 'attila/1.9+msgfix' into 1.9 2012-10-09 19:34:11 -04:00
Adam 2113494274 Send privmsgs and notices to uids if applicable 2012-10-09 19:33:24 -04:00
attilamolnar 912f068fe4 Fix wrong error message when --dbdir has no argument 2012-10-09 23:31:20 +02:00
Adam 8f5d786f0e Cleanup ok if modules with pending identify requests are unloaded 2012-10-09 05:22:02 -04:00
Adam 1dacc648a0 Made the warnings given by cmake for not having
the dependencies for modules look less scary as
they confuse dumb people currently
2012-10-09 04:13:04 -04:00
Adam 3af786d4c9 Fix fantasy !help & give it its own help header, not ChanServ's 2012-10-08 20:58:47 -04:00
Adam e57b470e83 Made fantasy commands configurable 2012-10-08 04:16:23 -04:00
Adam b8b63ff115 Remove the asynchronous identifing hack and replace it with something better. Fixes m_*_authentication only being able to properly work when people identify normally using nickserv/identify 2012-10-07 22:39:58 -04:00
attilamolnar 959a3f3cca InspIRCd: Log when server-side topiclocking is enabled in the config but the module is not loaded 2012-10-07 11:49:38 +02:00
Adam 0a111c1976 Fix compile from bda3b1fa3a 2012-10-07 02:13:14 -04:00
DukePyrolator 4b68f0447c updated docs/LANGUAGE to point to the right directory where users should put module language files 2012-10-07 08:00:31 +02:00
Adam 31914b200b Merge remote branch 'remotes/attila/1.9+addline' into 1.9 2012-10-07 01:46:44 -04:00
Adam ebb3fca698 Release holds on a nick on identify, if there is one 2012-10-07 01:45:43 -04:00
Adam 7f72b466ac Set sane default last_topic_setter and last_topic_time in the event an empty topic is locked right after registering a channel without previously being set 2012-10-07 01:29:49 -04:00
Adam 4751c735ec Fixed module language file path 2012-10-06 22:54:52 -04:00
attilamolnar bda3b1fa3a InspIRCd: Make functions that send ADDLINE and DELLINE, call them from the rest of the module 2012-10-07 03:15:42 +02:00
Adam 4ec10d798b Fixups and cleanup for the last few commits 2012-10-06 20:11:47 -04:00
attilamolnar 3dd21e4dcd InspIRCd: Add support for server side topic locks using METADATA topiclock 2012-10-07 01:35:14 +02:00
attilamolnar 682d76835e InspIRCd: Add support for sending detecting m_topiclock and sending SVSTOPIC when it is available 2012-10-07 01:33:49 +02:00
attilamolnar 42aa367f16 InspIRCd: Send channel METADATA using a dedicated function 2012-10-07 01:32:31 +02:00
attilamolnar ec8a1bcc82 Add a config option for server side topic locks 2012-10-07 00:59:49 +02:00
attilamolnar 2d9541c4c8 Parse and store the spanningtree protocol version for InspIRCd 2012-10-06 02:18:48 -04:00
attilamolnar e747ba6c26 InspIRCd: Add metadata handler to recognize when a module is loaded or unloaded on the ircd side and adjust our behavior accordingly 2012-10-06 02:06:23 -04:00
attilamolnar 4431a34987 InspIRCd: Allow METADATA handler to differentiate between user, channel and other/server metadata 2012-10-06 02:06:23 -04:00
attilamolnar 14d7de0cf3 InspIRCd: Remove has_svshold, use IRCDProto::CanSVSHold 2012-10-06 02:06:18 -04:00
Adam cd28fdc192 Show the correct reciever nick when use strict privmsg is enabled 2012-10-06 01:01:45 -04:00
Adam 25fe9c7084 Do not process() socket engine on shutdown 2012-10-05 16:23:40 -04:00
lethality 94fc2ba9c9 Merge branch '1.9' of ssh://anope.git.sf.net/gitroot/anope/anope into 1.9 2012-10-05 15:15:50 +01:00
lethality 2f87b8e430 Revert this strangeness I created ;) 2012-10-05 15:14:19 +01:00
Adam eff61c7a97 Add an event for when nick or channel options are set 2012-10-05 05:03:55 -04:00
Adam 7c96227cd3 Use memcpy for Anope::Unhex not strcpy 2012-10-05 01:20:32 -04:00
lethality dcfae6332e Some minor fixes/typos 2012-10-03 21:22:03 +01:00
Adam 69437bb324 Fixed parsing squit (it has a reason) 2012-10-03 05:17:32 -04:00
Adam 7551245f57 Attempt #2 at silly topic ts thing, this is actually must cleaner 2012-10-02 23:30:31 -04:00
Adam 47bc551485 Revert "Fix topiclock on inspircd"
This reverts commit 87478187af.
2012-10-02 22:59:20 -04:00
Adam 87478187af Fix topiclock on inspircd 2012-10-02 22:16:35 -04:00
Adam 7042223f2e Somehow the kick handler got lost in the confusion. Send the topic time with ftopic on inspircd not the current time. Removed some unneeded protocol functions 2012-10-02 21:21:37 -04:00
Adam 93698f0d61 Added operserv/logsearch 2012-10-02 05:18:42 -04:00
Adam f7aa837696 Don't unassociate accounts with users on nick changes 2012-10-02 01:30:35 -04:00
DukePyrolator e1d1d18288 added an operserv/akill page to webcpanel 2012-10-02 05:36:31 +02:00
DukePyrolator 20a6f82753 modified the nickserv alist command to return nc->display instead of the parameter provided by the user 2012-10-02 05:35:44 +02:00
DukePyrolator aec6cac8ca Merge branch '1.9' of ssh://anope.git.sourceforge.net/gitroot/anope/anope into 1.9 2012-10-02 04:14:50 +02:00
DukePyrolator ffca6a762d fixed a small bug in the inspircd protocol modules 2012-10-02 04:11:52 +02:00
Adam 2d2ab4fec4 Fixed handling TOPIC on unreal, dont set topics in Channel::Reset unless we are synced, and fixed ts checking in Channel::SetModesInternal 2012-10-01 21:26:41 -04:00
Adam a434baed91 Allow modules to store data in their own databases. 2012-10-01 18:50:29 -04:00
Adam f14a3dfb8a Fix a few problems found by Cronusa and KindOne 2012-10-01 04:35:36 -04:00
Adam b19a3af4db Add networkinfo:chanlen config directive 2012-10-01 02:29:31 -04:00
Adam 89428a9d10 Cleanup of all of the protocol modules, rewrote message handling system to be a bit more C++ ish 2012-10-01 01:56:57 -04:00
Adam b937d6310d timestamp column is a special case too 2012-09-30 21:36:49 -04:00
Adam ad37bc9639 Bug #1445 - Empty out columns in SQL we have no data for on
insert. This is caused from serialize() only setting a key on
certain conditions and otherwise doing nothing at all.
2012-09-30 20:30:27 -04:00
Adam 56df1abdd8 Place runtime module binaries in data/runtime instead of lib/ incase of a system wide install where lib/ is not writable 2012-09-30 20:30:27 -04:00
Adam 0ea5e57298 Use RTLD_NOW when loading modules to resolve all symbols immediately.
This prevents modules with unresolved symbols from loading instead
of loading and crashing later.
2012-09-30 20:30:27 -04:00
Adam 3838eb1f05 Add webpanel contributors to readme and remove todo since its way out of date and has nothing more in it we want 2012-09-30 20:30:27 -04:00
Adam 9ba7196881 Make CommandSource use references, sometimes we hold them for awhile 2012-09-30 20:30:27 -04:00
DukePyrolator 1e71303ffa fixed nickserv alist 2012-09-30 13:58:17 +02:00
lethality 74117a1e1e added some example sql queries 2012-09-29 23:55:55 +01:00
Naram Qashat 38ad523f91 Fix a few oddball warnings that came up from clang, and also make it so webcpanel.so can be compiled under Mac OS X. 2012-09-24 15:54:49 -04:00
DukePyrolator a71e2fb64e make nickserv glist check if the given nickname is in the group of the user before checking for services oper 2012-09-23 20:57:35 +02:00
Naram Qashat 1b20ec8747 Forgot to delete a line in the last commit. 2012-09-22 04:18:41 -04:00
Naram Qashat d30e53ee2c OK, so the FIND sub-command of string() in CMake was only added with 2.8.5, change this to use the REGEX sub-commands instead. Also while I'm at it, make -pthread only get added when not on Mac OS X, it's auto-included there. 2012-09-22 03:45:51 -04:00
Naram Qashat aa57ad6082 Fix issues with CMake trying to add /System/Library/Frameworks/Kernel.framework/Headers/sys to the include paths. 2012-09-22 02:10:49 -04:00
lethality 097893bfbf Updated example query to include a valid value 2012-09-13 15:29:04 +01:00
Adam 16019c9827 Add m_sql_authentication to allow authenticating users against an external SQL database 2012-09-12 21:10:02 -04:00
Adam f391100586 Fixed gettext on freebsd/any other system that uses LANG not LANGUAGE 2012-09-10 21:39:04 -04:00
Adam c4a1e1bb0c Fixed os_defcon too 2012-09-08 04:51:44 -04:00
Adam 7e3b5bed50 Add chanserv/set/autoop, like nickserv/set/autoop but for channels 2012-09-07 23:44:15 -04:00
Adam c9c477ff9d These saset command stubs can go away 2012-09-07 22:27:28 -04:00
Adam 4eb7db80a6 Fix os_session to really use ips for quits, don't enforce session for spoofed users/other users who have no ip, clean up warnings 2012-09-07 21:22:19 -04:00
Adam 9d6626f70c Made session tracking ip based, not host based, and allow using CIDR to group multiple ips from one subnet to one session 2012-09-07 12:04:25 -04:00
Adam 5c07863ad5 Allow configuring killquick and kill delays 2012-09-07 08:46:28 -04:00
Adam 3060375251 Fixed m_ldap_authentication not returning anything if the search for an account game back empty 2012-09-07 06:52:56 -04:00
Adam 3c63e44d32 Allow ; and } in quoted strings 2012-09-07 05:59:28 -04:00
Adam 02d943bfb0 Not quite sure what I was thinking here 2012-09-05 02:56:59 -04:00
DukePyrolator 4c8fef264e updated example.conf 2012-09-03 11:05:17 +02:00
Adam 082cf8ace8 Windows cares this is escaped + chmod too 2012-09-02 22:56:17 -04:00
Adam 1fd193840d Fix CMake to actually make directories on install ..... 2012-09-02 22:39:05 -04:00
Adam b1f8e910eb Version bump for 1.9.8-git 2012-09-02 09:48:13 -04:00
464 changed files with 113865 additions and 101544 deletions
+37
View File
@@ -0,0 +1,37 @@
Adam <adam@anope.org> <adam-@5417fbe8-f217-4b02-8779-1006273d7864>
Adam <adam@anope.org> <adam@adam-laptop.(none)>
Adam <adam@anope.org> <Adam@anope.org>
Adam <adam@anope.org> <Adam@drink-coca-cola.info>
Adam <adam@anope.org> <Adam@sigterm.info>
Adam Kramer <ribosome@anope.org> <ribosome ribosome@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
Alvaro Toledo <atoledo@keldon.org> <atoledo atoledo@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
Björn Stiddien <keeper@anope.org> <keeper keeper@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
Charles Kingsley <chaz@anope.org>
Charles Kingsley <chaz@anope.org> <sjaz@5417fbe8-f217-4b02-8779-1006273d7864>
Daniel Engel <dane@zero.org> <dane dane@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
David Robson <rob@anope.org> <robbeh@5417fbe8-f217-4b02-8779-1006273d7864>
David Robson <rob@anope.org> <rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
Dennis Friis <peavey@inspircd.org> <peavey peavey@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864>
Fabio Scotoni <cculex@gmail.com>
Florian Schulze <certus@anope.org> <certus certus@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
Gabriel Acevedo H. <drstein@anope.org> <drstein drstein@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
Jan Milants <viper@anope.org>
Jan Milants <viper@anope.org> <jantje_85@5417fbe8-f217-4b02-8779-1006273d7864>
Jan Milants <viper@anope.org> <viper viper@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
Jens Voss <dukepyrolator@anope.org> <anope@s15355730.onlinehome-server.info>
Jens Voss <dukepyrolator@anope.org> <DukePyrolator@5417fbe8-f217-4b02-8779-1006273d7864>
Jens Voss <dukepyrolator@anope.org> <DukePyrolator@anope.org>
Jens Voss <dukepyrolator@anope.org> Jens Voß <jens@pyrobook.(none)>
Lee Holmes <lethality@anope.org>
Mark Summers <mark@goopler.net> <mark mark@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
Naram Qashat <cyberbotx@anope.org> <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>
Naram Qashat <cyberbotx@anope.org> <cyberbotx@cyberbotx.com>
Naram Qashat <cyberbotx@anope.org> <Naram Qashat cyberbotx@cyberbotx.com@5417fbe8-f217-4b02-8779-1006273d7864>
Pieter Bootsma <geniusdex@anope.org> <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
Robby <robby@chat.be>
Robin Burchell <w00t@inspircd.org> <rburchell@5417fbe8-f217-4b02-8779-1006273d7864>
Robin Burchell <w00t@inspircd.org> <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864>
Sebastian V. <hal9000@denorastats.org>
Sebastian V. <hal9000@denorastats.org> <pimpmylinux@5417fbe8-f217-4b02-8779-1006273d7864>
(svnadmin) <svn@localhost> <svn svn@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
Trystan S. Lee <trystan@nomadirc.net> <trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
+29 -22
View File
@@ -80,7 +80,7 @@ set(DEFAULT_LIBRARY_DIRS)
set(DEFAULT_INCLUDE_DIRS)
# If we are using a GNU compiler (have to use CXX because it seems to fail on C), we will be able to determine it's default paths for libraries and includes
if(CMAKE_COMPILER_IS_GNUCXX)
if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
# First look for the compiler's default library directories
execute_process(COMMAND ${CMAKE_C_COMPILER} -print-search-dirs OUTPUT_VARIABLE LINES OUTPUT_STRIP_TRAILING_WHITESPACE)
# Find only the part after "libraries: "
@@ -132,6 +132,8 @@ if(CMAKE_COMPILER_IS_GNUCXX)
string(LENGTH ${LINE} LINE_LENGTH)
math(EXPR LINE_LENGTH "${LINE_LENGTH} - 1")
string(SUBSTRING ${LINE} 1 ${LINE_LENGTH} INCLUDE)
# For systems like Mac OS X, look for include paths that say " (framework directory)" at the end of them and strip that off
string(REGEX REPLACE " \\(framework directory\\)$" "" INCLUDE ${INCLUDE})
# Convert the path to an absolute one, just in case it wasn't
get_filename_component(INCLUDE ${INCLUDE} ABSOLUTE)
# Add that directory to the list of default include directories
@@ -144,7 +146,7 @@ if(CMAKE_COMPILER_IS_GNUCXX)
if(DEFAULT_INCLUDE_DIRS)
remove_list_duplicates(DEFAULT_INCLUDE_DIRS)
endif(DEFAULT_INCLUDE_DIRS)
endif(CMAKE_COMPILER_IS_GNUCXX)
endif(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
# If we are using Visual Studio, locate the path of the Windows Server 2008 SDK or Windows Server 2003 Platform SDK, depending on which is installed
if(MSVC)
@@ -160,12 +162,12 @@ if(MSVC)
if(WSDK2008_PATH STREQUAL "/registry")
# If not found, look for the 2003 SDK under HKCU
get_filename_component(WSDK2003_PATH "[HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\MicrosoftSDK\\InstalledSDKs\\D2FF9F89-8AA2-4373-8A31-C838BF4DBBE1;Install Dir]" ABSOLUTE CACHE)
if(WSDK2003_PATH STREQUAL "/regsitry")
if(WSDK2003_PATH STREQUAL "/registry")
# The SDK was never found, set the path to nothing
set(WSDK_PATH "")
else(WSDK2003_PATH STREQUAL "/regsitry")
else(WSDK2003_PATH STREQUAL "/registry")
set(WSDK_PATH "${WSDK2003_PATH}")
endif(WSDK2003_PATH STREQUAL "/regsitry")
endif(WSDK2003_PATH STREQUAL "/registry")
else(WSDK2008_PATH STREQUAL "/registry")
set(WSDK_PATH "${WSDK2008_PATH}")
endif(WSDK2008_PATH STREQUAL "/registry")
@@ -207,12 +209,16 @@ else(CMAKE244_OR_BETTER)
include(TestCXXAcceptsFlag)
endif(CMAKE244_OR_BETTER)
# If extra directories were specified, tell cmake about them.
# If extra include directories were specified, tell cmake about them.
if(EXTRA_INCLUDE)
include_directories(${EXTRA_INCLUDE})
link_directories(${EXTRA_INCLUDE})
endif(EXTRA_INCLUDE)
# If extra library directories were specified, tell cmake about them.
if(EXTRA_LIBS)
link_directories(${EXTRA_LIBS})
endif(EXTRA_LIBS)
# Find gettext
find_package(Gettext)
@@ -308,7 +314,9 @@ if(NOT MSVC)
# Check if pthread_create is within the pthread library (if the library exists), and add it to the linker flags if needed
check_library_exists(pthread pthread_create "" HAVE_PTHREAD)
if(HAVE_PTHREAD)
set(LDFLAGS "${LDFLAGS} -pthread")
if(NOT APPLE)
set(LDFLAGS "${LDFLAGS} -pthread")
endif(NOT APPLE)
else(HAVE_PTHREAD)
message(FATAL_ERROR "The pthread library is required to build Anope")
endif(HAVE_PTHREAD)
@@ -335,7 +343,6 @@ check_include_file(stdint.h HAVE_STDINT_H)
check_include_file(strings.h HAVE_STRINGS_H)
# Check for the existance of the following functions
check_function_exists(setgrent HAVE_SETGRENT)
check_function_exists(strcasecmp HAVE_STRCASECMP)
check_function_exists(stricmp HAVE_STRICMP)
check_function_exists(umask HAVE_UMASK)
@@ -343,13 +350,6 @@ check_function_exists(epoll_wait HAVE_EPOLL)
check_function_exists(poll HAVE_POLL)
check_function_exists(kqueue HAVE_KQUEUE)
# Check if eventfd works
try_run(EVENTFD_TEST_RUN_RESULT EVENTFD_TEST_COMPILE_RESULT ${CMAKE_CURRENT_BINARY_DIR} ${Anope_SOURCE_DIR}/cmake/eventfd_test.cpp)
set(HAVE_EVENTFD FALSE)
if (EVENTFD_TEST_COMPILE_RESULT AND EVENTFD_TEST_RUN_RESULT EQUAL 1)
set(HAVE_EVENTFD TRUE)
endif(EVENTFD_TEST_COMPILE_RESULT AND EVENTFD_TEST_RUN_RESULT EQUAL 1)
# Strip the leading and trailing spaces from the compile flags
if(CXXFLAGS)
strip_string(${CXXFLAGS} CXXFLAGS)
@@ -481,14 +481,15 @@ get_target_property(SERVICES_BINARY ${PROGRAM_NAME} LOCATION)
get_filename_component(SERVICES_BINARY ${SERVICES_BINARY} NAME)
# At install time, create the following additional directories
install(CODE "file(MAKE_DIRECTORY \"${DB_DIR}/backups\")")
install(CODE "file(MAKE_DIRECTORY \"${LOGS_DIR}\")")
install(CODE "file(MAKE_DIRECTORY \"${LIB_DIR}/modules/runtime\")")
install(CODE "file(MAKE_DIRECTORY \"\${CMAKE_INSTALL_PREFIX}/${DB_DIR}/backups\")")
install(CODE "file(MAKE_DIRECTORY \"\${CMAKE_INSTALL_PREFIX}/${LOGS_DIR}\")")
if(WIN32)
install(CODE "file(MAKE_DIRECTORY \"\${CMAKE_INSTALL_PREFIX}/${DB_DIR}/runtime\")")
endif(WIN32)
# On non-Windows platforms, if RUNGROUP is set, change the permissions of the below directories, as well as the group of the data directory
if(NOT WIN32 AND RUNGROUP)
install(CODE "execute_process(COMMAND ${CHMOD} 2775 \"\${DB_DIR}/backups\")")
install(CODE "execute_process(COMMAND ${CHMOD} 2775 \"\${LOGS_DIR}\")")
install(CODE "execute_process(COMMAND ${CHMOD} 2775 \"\${LIB_DIR}/modules/runtime\")")
install(CODE "execute_process(COMMAND ${CHMOD} 2775 \"\${CMAKE_INSTALL_PREFIX}/\${DB_DIR}/backups\")")
install(CODE "execute_process(COMMAND ${CHMOD} 2775 \"\${CMAKE_INSTALL_PREFIX}/\${LOGS_DIR}\")")
install(CODE "execute_process(COMMAND ${CHGRP} -R ${RUNGROUP} \"\${CMAKE_INSTALL_PREFIX}\")")
endif(NOT WIN32 AND RUNGROUP)
# On Windows platforms, install extra files
@@ -498,6 +499,8 @@ if(WIN32)
)
endif(WIN32)
install(CODE "file(REMOVE_RECURSE \"${CMAKE_INSTALL_PREFIX}/${LIB_DIR}/modules\")")
# Only process the CPack section if we have CPack
if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
# Various options for CPack
@@ -512,6 +515,10 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
#set(CPACK_RESOURCE_FILE_README "${Anope_SOURCE_DIR}/docs/README")
# The following is primarily for NSIS
if(WIN32)
# By default, do not warn when built on machines using only VS Express:
IF(NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)
ENDIF(NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
# Also for Windows, include installing the MSVCRT library
include(InstallRequiredSystemLibraries)
set(CPACK_GENERATOR "NSIS")
+59 -8
View File
@@ -40,7 +40,8 @@ Run_Build_System () {
WITH_INST=""
WITH_RUN=""
WITH_PERM=""
RUN_CC_PL=""
EXTRA_INCLUDE=""
EXTRA_LIBS=""
GEN_TYPE=""
if [ "$INSTDIR" != "" ] ; then
@@ -73,6 +74,14 @@ Run_Build_System () {
PCH="-DUSE_PCH:BOOLEAN=OFF"
fi
if [ "$EXTRA_INCLUDE_DIRS" != "" ] ; then
EXTRA_INCLUDE="-DEXTRA_INCLUDE:STRING=$EXTRA_INCLUDE_DIRS"
fi
if [ "$EXTRA_LIB_DIRS" != "" ] ; then
EXTRA_LIBS="-DEXTRA_LIBS:STRING=$EXTRA_LIB_DIRS"
fi
case `uname -s` in
MINGW*)
GEN_TYPE="-G\"MSYS Makefiles\""
@@ -88,9 +97,9 @@ Run_Build_System () {
REAL_SOURCE_DIR="$SOURCE_DIR"
fi
echo "cmake $GEN_TYPE $WITH_INST $WITH_RUN $WITH_PERM $BUILD_TYPE $RUN_CC_PL $PCH $EXTRA_CONFIG_ARGS $REAL_SOURCE_DIR"
echo "cmake $GEN_TYPE $WITH_INST $WITH_RUN $WITH_PERM $BUILD_TYPE $RUN_CC_PL $PCH $EXTRA_INCLUDE $EXTRA_LIBS $EXTRA_CONFIG_ARGS $REAL_SOURCE_DIR"
cmake $GEN_TYPE $WITH_INST $WITH_RUN $WITH_PERM $BUILD_TYPE $RUN_CC_PL $PCH $EXTRA_CONFIG_ARGS $REAL_SOURCE_DIR
cmake $GEN_TYPE $WITH_INST $WITH_RUN $WITH_PERM $BUILD_TYPE $RUN_CC_PL $PCH $EXTRA_INCLUDE $EXTRA_LIBS $EXTRA_CONFIG_ARGS $REAL_SOURCE_DIR
echo ""
if [ "$SOURCE_DIR" = "." ] ; then
@@ -124,6 +133,8 @@ UMASK=
DEBUG="yes"
USE_RUN_CC_PL="no"
USE_PCH="no"
EXTRA_INCLUDE_DIRS=
EXTRA_LIB_DIRS=
EXTRA_CONFIG_ARGS=
CAN_QUICK="no"
SOURCE_DIR=`dirname $0`
@@ -240,7 +251,7 @@ export ok INPUT
####
ok=0
echo "In what directory do you want the binaries to be installed?"
echo "In what directory should Anope be installed?"
while [ $ok -eq 0 ] ; do
echo2 "[$INSTDIR] "
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
@@ -386,14 +397,52 @@ echo ""
####
echo "Are there any extra arguments you wish to pass to cmake?"
echo "You may only need to do this if cmake is unable to locate"
echo "Are there any extra include directories you wish to use?"
echo "You may only need to do this if CMake is unable to locate"
echo "missing dependencies without hints."
echo "You can do this by: -DEXTRA_INCLUDE:STRING=/path/to/files;/path/to/more/files"
echo "Separate directories with semicolons."
echo "If you need no extra include directories, enter NONE in all caps."
echo2 "[$EXTRA_INCLUDE_DIRS] "
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
if [ "$INPUT" ] ; then
if [ "$INPUT" = "NONE" ] ; then
EXTRA_INCLUDE_DIRS=""
else
EXTRA_INCLUDE_DIRS=$INPUT
fi
fi
echo ""
####
echo "Are there any extra library directories you wish to use?"
echo "You may only need to do this if CMake is unable to locate"
echo "missing dependencies without hints."
echo "Separate directories with semicolons."
echo "If you need no extra library directories, enter NONE in all caps."
echo2 "[$EXTRA_LIB_DIRS] "
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
if [ "$INPUT" ] ; then
if [ "$INPUT" = "NONE" ] ; then
EXTRA_LIB_DIRS=""
else
EXTRA_LIB_DIRS=$INPUT
fi
fi
echo ""
####
echo "Are there any extra arguments you wish to pass to CMake?"
echo "If you need no extra arugments to CMake, enter NONE in all caps."
echo2 "[$EXTRA_CONFIG_ARGS] "
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
if [ "$INPUT" ] ; then
EXTRA_CONFIG_ARGS=$INPUT
if [ "$INPUT" = "NONE" ] ; then
EXTRA_CONFIG_ARGS=""
else
EXTRA_CONFIG_ARGS=$INPUT
fi
fi
echo ""
@@ -412,6 +461,8 @@ UMASK=$UMASK
DEBUG="$DEBUG"
USE_RUN_CC_PL="$USE_RUN_CC_PL"
USE_PCH="$USE_PCH"
EXTRA_INCLUDE_DIRS="$EXTRA_INCLUDE_DIRS"
EXTRA_LIB_DIRS="$EXTRA_LIB_DIRS"
EXTRA_CONFIG_ARGS="$EXTRA_CONFIG_ARGS"
EOT
echo "done."
BIN
View File
Binary file not shown.
+47 -45
View File
@@ -208,7 +208,7 @@ macro(read_from_file FILE REGEX STRINGS)
endif(REGEX STREQUAL "")
else(CMAKE26_OR_BETTER)
# For CMake 2.4.x, we need to do this manually, firstly we read the file in
execute_process(COMMAND ${CMAKE_COMMAND} -DFILE:STRING=${FILE} -P ${Anope_SOURCE_DIR}/ReadFile.cmake ERROR_VARIABLE ALL_STRINGS)
execute_process(COMMAND ${CMAKE_COMMAND} -DFILE:STRING=${FILE} -P ${Anope_SOURCE_DIR}/cmake/ReadFile.cmake ERROR_VARIABLE ALL_STRINGS)
# Next we replace all newlines with semicolons
string(REGEX REPLACE "\n" ";" ALL_STRINGS ${ALL_STRINGS})
if(REGEX STREQUAL "")
@@ -359,24 +359,22 @@ macro(find_includes SRC INCLUDES)
endmacro(find_includes)
###############################################################################
# calculate_depends(<source filename> <output variable set to TRUE on fail> [<optional output variable for includes>])
# calculate_depends(<source filename> [<optional output variable for includes>])
#
# This macro is used in most of the src (sub)directories to calculate the
# header file dependencies for the given source file.
###############################################################################
macro(calculate_depends SRC SKIP)
# Temporarily set that we didn't get a 3nd argument before we actually check if we did get one or not
macro(calculate_depends SRC)
# Temporarily set that we didn't get a 3rd argument before we actually check if we did get one or not
set(CHECK_ANGLE_INCLUDES FALSE)
# Check for a third argument
if(${ARGC} GREATER 2)
if(${ARGC} GREATER 1)
set(CHECK_ANGLE_INCLUDES TRUE)
endif(${ARGC} GREATER 2)
endif(${ARGC} GREATER 1)
# Find all the lines in the given source file that have any form of #include on them, regardless of whitespace, but only if they are valid for the platform we are on
find_includes(${SRC} INCLUDES)
# Reset the list of headers to empty
set(HEADERS)
# Reset skip
set(${SKIP} FALSE)
# Iterate through the strings containing #include (if any)
foreach(INCLUDE ${INCLUDES})
# Extract the filename from the #include line
@@ -392,16 +390,26 @@ macro(calculate_depends SRC SKIP)
endif(DEFAULT_INCLUDE_DIRS OR WSDK_PATH OR DEFINED $ENV{VCINSTALLDIR})
# If the include file was found, add it's path to the list of include paths, but only if it doesn't already exist and isn't in the defaults for the compiler
if(FOUND_${FILENAME}_INCLUDE)
find_in_list(DEFAULT_INCLUDE_DIRS "${FOUND_${FILENAME}_INCLUDE}" FOUND_IN_DEFAULTS)
# This used to be find_in_list, but it was changed to this loop to do a find on each default include directory, this fixes Mac OS X trying to get it's framework directories in here
set(FOUND_IN_DEFAULTS -1)
foreach(DEFAULT_INCLUDE_DIR ${DEFAULT_INCLUDE_DIRS})
string(REGEX REPLACE "\\+" "\\\\+" DEFAULT_INCLUDE_DIR ${DEFAULT_INCLUDE_DIR})
string(REGEX MATCH ${DEFAULT_INCLUDE_DIR} FOUND_DEFAULT ${FOUND_${FILENAME}_INCLUDE})
if(FOUND_DEFAULT)
set(FOUND_IN_DEFAULTS 0)
endif(FOUND_DEFAULT)
endforeach(DEFAULT_INCLUDE_DIR)
if(FOUND_IN_DEFAULTS EQUAL -1)
find_in_list(${ARGV2} "${FOUND_${FILENAME}_INCLUDE}" FOUND_IN_INCLUDES)
find_in_list(${ARGV1} "${FOUND_${FILENAME}_INCLUDE}" FOUND_IN_INCLUDES)
if(FOUND_IN_INCLUDES EQUAL -1)
append_to_list(${ARGV2} "${FOUND_${FILENAME}_INCLUDE}")
append_to_list(${ARGV1} "${FOUND_${FILENAME}_INCLUDE}")
endif(FOUND_IN_INCLUDES EQUAL -1)
endif(FOUND_IN_DEFAULTS EQUAL -1)
else(FOUND_${FILENAME}_INCLUDE)
set(${SKIP} TRUE)
message("${SRC} needs header file ${FILENAME} but we were unable to locate that header file! Check that the header file is within the search path of your OS.")
# XXX
if(NOT ${FILENAME} STREQUAL "libintl.h")
message(FATAL_ERROR "${SRC} needs header file ${FILENAME} but we were unable to locate that header file! Check that the header file is within the search path of your OS.")
endif(NOT ${FILENAME} STREQUAL "libintl.h")
endif(FOUND_${FILENAME}_INCLUDE)
endif(CHECK_ANGLE_INCLUDES)
endif(QUOTE_TYPE STREQUAL "angle brackets")
@@ -409,12 +417,12 @@ macro(calculate_depends SRC SKIP)
endmacro(calculate_depends)
###############################################################################
# calculate_libraries(<source filename> <output variable set to TRUE on fail> <output variable for linker flags> <output variable for extra depends>)
# calculate_libraries(<source filename> <output variable for linker flags> <output variable for extra depends>)
#
# This macro is used in most of the module (sub)directories to calculate the
# library dependencies for the given source file.
###############################################################################
macro(calculate_libraries SRC SKIP SRC_LDFLAGS EXTRA_DEPENDS)
macro(calculate_libraries SRC SRC_LDFLAGS EXTRA_DEPENDS)
# Set up a temporary LDFLAGS for this file
set(THIS_LDFLAGS "${LDFLAGS}")
# Reset extra dependencies
@@ -423,8 +431,6 @@ macro(calculate_libraries SRC SKIP SRC_LDFLAGS EXTRA_DEPENDS)
set(LIBRARY_PATHS)
# Reset libraries
set(LIBRARIES)
# Default to not skipping this file
set(${SKIP} FALSE)
# Check to see if there are any lines matching: /* RequiredLibraries: [something] */
read_from_file(${SRC} "/\\\\*[ \t]*RequiredLibraries:[ \t]*.*[ \t]*\\\\*/" REQUIRED_LIBRARIES)
# Iterate through those lines
@@ -437,9 +443,9 @@ macro(calculate_libraries SRC SKIP SRC_LDFLAGS EXTRA_DEPENDS)
foreach(LIBRARY ${REQUIRED_LIBRARY})
# Locate the library to see if it exists
if(DEFAULT_LIBRARY_DIRS OR WSDK_PATH OR DEFINED $ENV{VCINSTALLDIR})
find_library(FOUND_${LIBRARY}_LIBRARY NAMES ${LIBRARY} PATHS ${DEFAULT_LIBRARY_DIRS} ${WSDK_PATH}/lib $ENV{VCINSTALLDIR}/lib ${EXTRA_INCLUDE})
find_library(FOUND_${LIBRARY}_LIBRARY NAMES ${LIBRARY} PATHS ${DEFAULT_LIBRARY_DIRS} ${WSDK_PATH}/lib $ENV{VCINSTALLDIR}/lib ${EXTRA_INCLUDE} ${EXTRA_LIBS})
else(DEFAULT_LIBRARY_DIRS OR WSDK_PATH OR DEFINED $ENV{VCINSTALLDIR})
find_library(FOUND_${LIBRARY}_LIBRARY NAMES ${LIBRARY} ${EXTRA_INCLUDE})
find_library(FOUND_${LIBRARY}_LIBRARY NAMES ${LIBRARY} ${EXTRA_INCLUDE} ${EXTRA_LIBS})
endif(DEFAULT_LIBRARY_DIRS OR WSDK_PATH OR DEFINED $ENV{VCINSTALLDIR})
# If the library was found, we will add it to the linker flags
if(FOUND_${LIBRARY}_LIBRARY)
@@ -454,36 +460,32 @@ macro(calculate_libraries SRC SKIP SRC_LDFLAGS EXTRA_DEPENDS)
append_to_list(LIBRARIES "${LIBRARY}")
endif(MSVC)
else(FOUND_${LIBRARY}_LIBRARY)
# Skip this file
set(${SKIP} TRUE)
# In the case of the library not being found, we fatally error so CMake stops trying to generate
message("${SRC} needs library ${LIBRARY} but we were unable to locate that library! Check that the library is within the search path of your OS.")
message(FATAL_ERROR "${SRC} needs library ${LIBRARY} but we were unable to locate that library! Check that the library is within the search path of your OS.")
endif(FOUND_${LIBRARY}_LIBRARY)
endforeach(LIBRARY)
endforeach(REQUIRED_LIBRARY)
if(NOT ${SKIP})
# Remove duplicates from the library paths
if(LIBRARY_PATHS)
remove_list_duplicates(LIBRARY_PATHS)
endif(LIBRARY_PATHS)
# Remove diplicates from the libraries
if(LIBRARIES)
remove_list_duplicates(LIBRARIES)
endif(LIBRARIES)
# Iterate through library paths and add them to the linker flags
foreach(LIBRARY_PATH ${LIBRARY_PATHS})
find_in_list(DEFAULT_LIBRARY_DIRS "${LIBRARY_PATH}" FOUND_IN_DEFAULTS)
if(FOUND_IN_DEFAULTS EQUAL -1)
set(THIS_LDFLAGS "${THIS_LDFLAGS} -L${LIBRARY_PATH}")
endif(FOUND_IN_DEFAULTS EQUAL -1)
endforeach(LIBRARY_PATH)
# Iterate through libraries and add them to the linker flags
foreach(LIBRARY ${LIBRARIES})
append_to_list(EXTRA_DEPENDENCIES "${LIBRARY}")
endforeach(LIBRARY)
set(${SRC_LDFLAGS} "${THIS_LDFLAGS}")
set(${EXTRA_DEPENDS} "${EXTRA_DEPENDENCIES}")
endif(NOT ${SKIP})
# Remove duplicates from the library paths
if(LIBRARY_PATHS)
remove_list_duplicates(LIBRARY_PATHS)
endif(LIBRARY_PATHS)
# Remove diplicates from the libraries
if(LIBRARIES)
remove_list_duplicates(LIBRARIES)
endif(LIBRARIES)
# Iterate through library paths and add them to the linker flags
foreach(LIBRARY_PATH ${LIBRARY_PATHS})
find_in_list(DEFAULT_LIBRARY_DIRS "${LIBRARY_PATH}" FOUND_IN_DEFAULTS)
if(FOUND_IN_DEFAULTS EQUAL -1)
set(THIS_LDFLAGS "${THIS_LDFLAGS} -L${LIBRARY_PATH}")
endif(FOUND_IN_DEFAULTS EQUAL -1)
endforeach(LIBRARY_PATH)
# Iterate through libraries and add them to the linker flags
foreach(LIBRARY ${LIBRARIES})
append_to_list(EXTRA_DEPENDENCIES "${LIBRARY}")
endforeach(LIBRARY)
set(${SRC_LDFLAGS} "${THIS_LDFLAGS}")
set(${EXTRA_DEPENDS} "${EXTRA_DEPENDENCIES}")
endmacro(calculate_libraries)
###############################################################################
+7 -6
View File
@@ -1,17 +1,18 @@
# Find the header files, libs, and executables for gettext
if(NOT WIN32)
find_path(GETTEXT_INCLUDE libintl.h /usr/include /usr/local/include ${EXTRA_INCLUDE})
find_library(GETTEXT_LIBRARY intl PATHS /usr/lib /usr/lib64 ${EXTRA_INCLUDE})
find_library(GETTEXT_LIBRARY intl PATHS /usr/lib /usr/lib64 ${EXTRA_LIBS})
find_library(ICONV_LIBRARY iconv PATHS /usr/lib /usr/lib64 ${EXTRA_LIBS})
find_program(GETTEXT_MSGFMT msgfmt PATHS /usr/bin/ /usr/local/bin ${EXTRA_INCLUDE})
if(GETTEXT_INCLUDE AND GETTEXT_MSGFMT)
set(GETTEXT_FOUND TRUE)
endif(GETTEXT_INCLUDE AND GETTEXT_MSGFMT)
else(NOT WIN32)
find_path(GETTEXT_INCLUDE libintl.h ${DEFAULT_INCLUDE_DIRS} ${WSDK_PATH}/include $ENV{VCINSTALLDIR}/include gettext/include ${EXTRA_INCLUDE})
find_library(GETTEXT_LIBRARY libintl PATHS ${DEFAULT_LIBRARY_DIRS} ${WSDK_PATH}/lib $ENV{VCINSTALLDIR}/lib gettext/lib ${EXTRA_INCLUDE})
find_library(ICONV_LIBRARY libiconv PATHS ${DEFAULT_LIBRARY_DIRS} ${WSDK_PATH}/lib $ENV{VCINSTALLDIR}/lib gettext/lib ${EXTRA_INCLUDE})
find_library(MINGWEX_LIBRARY libmingwex PATHS ${DEFAULT_LIBRARY_DIRS} ${WSDK_PATH}/lib $ENV{VCINSTALLDIR}/lib gettext/lib ${EXTRA_INCLUDE})
find_library(GCC_LIBRARY libgcc PATHS ${DEFAULT_LIBRARY_DIRS} ${WSDK_PATH}/lib $ENV{VCINSTALLDIR}/lib gettext/lib ${EXTRA_INCLUDE})
find_library(GETTEXT_LIBRARY libintl PATHS ${DEFAULT_LIBRARY_DIRS} ${WSDK_PATH}/lib $ENV{VCINSTALLDIR}/lib gettext/lib ${EXTRA_LIBS})
find_library(ICONV_LIBRARY libiconv PATHS ${DEFAULT_LIBRARY_DIRS} ${WSDK_PATH}/lib $ENV{VCINSTALLDIR}/lib gettext/lib ${EXTRA_LIBS})
find_library(MINGWEX_LIBRARY libmingwex PATHS ${DEFAULT_LIBRARY_DIRS} ${WSDK_PATH}/lib $ENV{VCINSTALLDIR}/lib gettext/lib ${EXTRA_LIBS})
find_library(GCC_LIBRARY libgcc PATHS ${DEFAULT_LIBRARY_DIRS} ${WSDK_PATH}/lib $ENV{VCINSTALLDIR}/lib gettext/lib ${EXTRA_LIBS})
find_program(GETTEXT_MSGFMT msgfmt PATHS ${DEFAULT_INCLUDE_DIRS} ${WSDK_PATH}/bin $ENV{VCINSTALLDIR}/bin gettext/bin ${EXTRA_INCLUDE})
if(GETTEXT_INCLUDE AND GETTEXT_MSGFMT AND ICONV_LIBRARY AND MINGWEX_LIBRARY AND GCC_LIBRARY)
set(GETTEXT_FOUND TRUE)
@@ -27,7 +28,7 @@ if(GETTEXT_FOUND)
set(GETTEXT_LIBRARIES libiconv libintl libmingwex libgcc)
else(WIN32)
if(GETTEXT_LIBRARY)
set(GETTEXT_LIBRARIES ${GETTEXT_LIBRARY})
set(GETTEXT_LIBRARIES ${GETTEXT_LIBRARY} ${ICONV_LIBRARY})
endif(GETTEXT_LIBRARY)
endif(WIN32)
endif(GETTEXT_FOUND)
+1 -1
View File
@@ -525,7 +525,7 @@ FunctionEnd
!insertmacro MUI_PAGE_INSTFILES
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\docs\README.txt"
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\doc\README.txt"
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_UNPAGE_CONFIRM
-8
View File
@@ -1,8 +0,0 @@
#include <sys/eventfd.h>
int main()
{
int i = eventfd(0, EFD_NONBLOCK);
return i >= 0 ? 1 : 0;
}
+168 -88
View File
@@ -9,7 +9,7 @@
service
{
/*
* The name of the BotServ client
* The name of the BotServ client.
*/
nick = "BotServ"
@@ -35,8 +35,8 @@ service
* These modes are very IRCd specific. If left commented, sane defaults
* are used based on what protocol module you have loaded.
*
* Note that setting this option incorrectly could potentially BREAK some if
* not all usefulness of the client. We will not support you if this client is
* Note that setting this option incorrectly could potentially BREAK some, if
* not all, usefulness of the client. We will not support you if this client is
* unable to do certain things if this option is enabled.
*/
#modes = "+o"
@@ -46,7 +46,7 @@ service
* of log channels this is not very useful, as the service will just idle in the
* specified channels, and will not accept any types of commands.
*
* Prefixes may be given to the channels in the form of mode character or prefix symbol.
* Prefixes may be given to the channels in the form of mode characters or prefix symbols.
*/
#channels = "@#services,#mychan"
}
@@ -56,17 +56,14 @@ service
*
* Provides essential functionality for BotServ.
*/
module { name = "botserv" }
/*
* Configuration for BotServ provided by bs_main.
*/
botserv
module
{
name = "botserv"
/*
* The name of the client that should be BotServ.
*/
name = "BotServ"
client = "BotServ"
/*
* The default bot options for newly registered channels. Note that changing these options
@@ -82,7 +79,7 @@ botserv
*
* This directive is optional, if left blank, there will be no defaults.
*/
defaults="greet fantasy"
defaults = "greet fantasy"
/*
* The minimum number of users there must be in a channel before the bot joins it. The best
@@ -91,19 +88,6 @@ botserv
*/
minusers = 1
/*
* The maximum number of entries a single bad words list can have. Setting it too high can
* reduce performance slightly.
*/
badwordsmax = 32
/*
* The amount of time that data for a user is valid in BotServ. If the data exceeds this time,
* it is reset or deleted depending on the case. Do not set it too high, otherwise your
* resources will be slightly affected.
*/
keepdata = 10m
/*
* The bots are currently not affected by any modes or bans when they try to join a channel.
* But some people may want to make it act like a real bot, that is, for example, remove all
@@ -116,26 +100,17 @@ botserv
#smartjoin = yes
/*
* If set, the bots will use a kick reason that does not state the word when it is kicking.
* This is especially useful if you have young people on your network.
* Modes to set on service bots when they join channels, comment this out for no modes
*
* This directive is optional.
*/
gentlebadwordreason = yes
botmodes = "ao"
/*
* If set, BotServ will use case sensitive checking for badwords.
*
* This directive is optional.
* User modes to set on service bots. Read the comment about the service:modes directive
* on why this can be a bad idea to set.
*/
#casesensitive = yes
/*
* Defines the prefixs for fantasy commands in channels. One of these characters will have to be prepended
* to all fantasy commands. If you choose "!", for example, fantasy commands will be "!kick",
* "!op", etc. This directive is optional, if left out, the default fantasy character is "!".
*/
#fantasycharacter = "!."
#botumodes = "i"
}
/*
@@ -149,19 +124,23 @@ botserv
* Sane defaults are provided below that do not need to be edited unless you wish to change the default behavior.
*/
/* Give it a help command */
/* Give it a help command. */
command { service = "BotServ"; name = "HELP"; command = "generic/help"; }
/*
* bs_assign
*
* Provides the commands botserv/assign and botserv/unassign.
* Provides the commands:
* botserv/assign - Used to assign BotServ bots to channels
* botserv/unassign - Used to unassign BotServ bots
* botserv/set/nobot - Used to prohibit channels from being assigned BotServ bots.
*
* Used for assigning and unassigning bots to channels.
*/
module { name = "bs_assign" }
command { service = "BotServ"; name = "ASSIGN"; command = "botserv/assign"; }
command { service = "BotServ"; name = "UNASSIGN"; command = "botserv/unassign"; }
command { service = "BotServ"; name = "SET NOBOT"; command = "botserv/set/nobot"; permission = "botserv/set/nobot"; }
/*
* bs_autoassign
@@ -184,7 +163,22 @@ bs_autoassign
*
* Used for controlling the channel badword list.
*/
module { name = "bs_badwords" }
module
{
name = "bs_badwords"
/*
* The maximum number of entries a single bad words list can have.
*/
badwordsmax = 32
/*
* If set, BotServ will use case sensitive checking for badwords.
*
* This directive is optional.
*/
#casesensitive = yes
}
command { service = "BotServ"; name = "BADWORDS"; command = "botserv/badwords"; }
/*
@@ -231,80 +225,166 @@ command { service = "BotServ"; name = "INFO"; command = "botserv/info"; }
/*
* bs_kick
*
* Provides the command botserv/kick.
* Provides the commands:
* botserv/kick - Dummy help wrapper for the KICK command.
* botserv/kick/amsg - Configures BotServ's AMSG kicker.
* botserv/kick/badwords - Configures BotServ's badwords kicker.
* botserv/kick/bolds - Configures BotServ's bold text kiceker.
* botserv/kick/caps - Configures BotServ's capital letters kicker.
* botserv/kick/colors - Configures BotServ's color kicker.
* botserv/kick/flood - Configures BotServ's flood kicker.
* botserv/kick/italics - Configures BotServ's italics kicker.
* botserv/kick/repeat - Configures BotServ's repeat kicker.
* botserv/kick/reverses - Configures BotServ's reverse kicker.
* botserv/kick/underlines - Configures BotServ's reverse kicker.
* botserv/set/dontkickops - Used for preventing BotServ from kicking channel operators.
* botserv/set/dontkickvoices - Used for preventing BotServ from kicking voices.
*
* Used for configuring what bots should kick for.
*/
module { name = "bs_kick" }
module
{
name = "bs_kick"
/*
* The amount of time that data for a user is valid in BotServ. If the data exceeds this time,
* it is reset or deleted depending on the case. Do not set it too high, otherwise your
* resources will be slightly affected.
*/
keepdata = 10m
/*
* If set, the bots will use a kick reason that does not state the word when it is kicking.
* This is especially useful if you have young people on your network.
*
* This directive is optional.
*/
gentlebadwordreason = yes
}
command { service = "BotServ"; name = "KICK"; command = "botserv/kick"; }
command { service = "BotServ"; name = "KICK AMSG"; command = "botserv/kick/amsg"; }
command { service = "BotServ"; name = "KICK BADWORDS"; command = "botserv/kick/badwords"; }
command { service = "BotServ"; name = "KICK BOLDS"; command = "botserv/kick/bolds"; }
command { service = "BotServ"; name = "KICK CAPS"; command = "botserv/kick/caps"; }
command { service = "BotServ"; name = "KICK COLORS"; command = "botserv/kick/colors"; }
command { service = "BotServ"; name = "KICK FLOOD"; command = "botserv/kick/flood"; }
command { service = "BotServ"; name = "KICK ITALICS"; command = "botserv/kick/italics"; }
command { service = "BotServ"; name = "KICK REPEAT"; command = "botserv/kick/repeat"; }
command { service = "BotServ"; name = "KICK REVERSES"; command = "botserv/kick/reverses"; }
command { service = "BotServ"; name = "KICK UNDERLINES"; command = "botserv/kick/underlines"; }
command { service = "BotServ"; name = "SET DONTKICKOPS"; command = "botserv/set/dontkickops"; }
command { service = "BotServ"; name = "SET DONTKICKVOICES"; command = "botserv/set/dontkickvoices"; }
/*
* bs_set
*
* Provides the command botserv/set.
*
* Used for setting options such as kickers and fantasy replies.
* Provides the commands:
* botserv/set/private - Used to prohibit specific BotServ bots from being assigned to channels.
*/
module { name = "bs_set" }
command { service = "BotServ"; name = "SET"; command = "botserv/set"; }
command { service = "BotServ"; name = "SET BANEXPIRE"; command = "botserv/set/banexpire"; }
command { service = "BotServ"; name = "SET PRIVATE"; command = "botserv/set/private"; permission = "botserv/set/private"; }
/*
* bs_set_dontkickops
* greet
*
* Provides the command botserv/set/dontkickops.
*
* Used for preventing BotServ from kicking channel operators.
* Provides the commands:
* botserv/set/greet - Used for enabling or disabling BotServ's greet messages in a channel.
* nickserv/set/greet, nickserv/saset/greet - Used for changing a users greet message, which is displayed when they enter channels.
*/
module { name = "bs_set_dontkickops" }
command { service = "BotServ"; name = "SET DONTKICKOPS"; command = "botserv/set/dontkickops"; }
module { name = "greet" }
command { service = "BotServ"; name = "SET GREET"; command = "botserv/set/greet"; }
command { service = "NickServ"; name = "SET GREET"; command = "nickserv/set/greet"; }
command { service = "NickServ"; name = "SASET GREET"; command = "nickserv/saset/greet"; permission = "nickserv/saset/greet"; }
/*
* bs_set_dontkickvoices
* GREET privilege.
*
* Provides the command botserv/set/dontkickvoices.
* Used by 'greet'.
*
* Used for preventing BotServ from kicking voices.
* Users with this privilege have their greet shown when they join channels.
*/
module { name = "bs_set_dontkickvoices" }
command { service = "BotServ"; name = "SET DONTKICKVOICES"; command = "botserv/set/dontkickvoices"; }
privilege
{
name = "GREET"
rank = 40
level = 5
flag = "g"
xop = "AOP"
}
/*
* bs_set_fantasy
* fantasy
*
* Provides the command botserv/set/fantasy.
* Allows 'fantaisist' commands to be used in channels.
*
* Used for enabling or disabling BotServ's fantaisist commands.
* Provides the commands:
* botserv/set/fantasy - Used for enabling or disabling BotServ's fantasist commands.
*/
module { name = "bs_set_fantasy" }
module
{
name = "fantasy"
/*
* Defines the prefixes for fantasy commands in channels. One of these characters will have to be prepended
* to all fantasy commands. If you choose "!", for example, fantasy commands will be "!kick",
* "!op", etc. This directive is optional, if left out, the default fantasy character is "!".
*/
#fantasycharacter = "!."
}
command { service = "BotServ"; name = "SET FANTASY"; command = "botserv/set/fantasy"; }
/*
* bs_set_greet
* Fantasy commands
*
* Provides the command botserv/set/greet.
* Fantasy commands can be executed in channels that have a BotServ bot by prefixing the
* command with one of the fantasy characters configured in botserv's fantasycharacter
* directive.
*
* Used for enabling or disabling BotServ's greet messages in a channel.
* Sane defaults are provided below that do not need to be edited unless you wish to change the default behavior.
*/
module { name = "bs_set_greet" }
command { service = "BotServ"; name = "SET GREET"; command = "botserv/set/greet"; }
/*
* bs_set_nobot
*
* Provides the command botserv/set/nobot.
*
* Used by Services Operators to prohibit specific channels from being assigned BotServ bots.
*/
module { name = "bs_set_nobot" }
command { service = "BotServ"; name = "SET NOBOT"; command = "botserv/set/nobot"; }
/*
* bs_set_private
*
* Provides the command botserv/set/private.
*
* Used by Services Operators to prohibit specific BotServ bots from being assigned to channels.
*/
module { name = "bs_set_private" }
command { service = "BotServ"; name = "SET PRIVATE"; command = "botserv/set/private"; }
fantasy { name = "ACCESS"; command = "chanserv/access"; }
fantasy { name = "AKICK"; command = "chanserv/akick"; }
fantasy { name = "AOP"; command = "chanserv/xop"; }
fantasy { name = "BAN"; command = "chanserv/ban"; }
fantasy { name = "CLONE"; command = "chanserv/clone"; }
fantasy { name = "DEHALFOP"; command = "chanserv/modes"; }
fantasy { name = "DEOP"; command = "chanserv/modes"; }
fantasy { name = "DEOWNER"; command = "chanserv/modes"; }
fantasy { name = "DEPROTECT"; command = "chanserv/modes"; }
fantasy { name = "DEVOICE"; command = "chanserv/modes"; }
fantasy { name = "DOWN"; command = "chanserv/down"; }
fantasy { name = "ENFORCE"; command = "chanserv/enforce"; }
fantasy { name = "ENTRYMSG"; command = "chanserv/entrymsg"; }
fantasy { name = "FLAGS"; command = "chanserv/flags"; }
fantasy { name = "HALFOP"; command = "chanserv/modes"; }
fantasy { name = "HELP"; command = "generic/help"; prepend_channel = false; }
fantasy { name = "HOP"; command = "chanserv/xop"; }
fantasy { name = "INFO"; command = "chanserv/info"; prepend_channel = false; }
fantasy { name = "INVITE"; command = "chanserv/invite"; }
fantasy { name = "K"; command = "chanserv/kick"; }
fantasy { name = "KB"; command = "chanserv/ban"; }
fantasy { name = "KICK"; command = "chanserv/kick"; }
fantasy { name = "LEVELS"; command = "chanserv/levels"; }
fantasy { name = "LIST"; command = "chanserv/list"; prepend_channel = false; }
fantasy { name = "LOG"; command = "chanserv/log"; }
fantasy { name = "MODE"; command = "chanserv/mode"; }
fantasy { name = "OP"; command = "chanserv/modes"; }
fantasy { name = "OWNER"; command = "chanserv/modes"; }
fantasy { name = "PROTECT"; command = "chanserv/modes"; }
fantasy { name = "QOP"; command = "chanserv/xop"; }
fantasy { name = "SEEN"; command = "chanserv/seen"; prepend_channel = false; }
fantasy { name = "SOP"; command = "chanserv/xop"; }
fantasy { name = "STATUS"; command = "chanserv/status"; }
fantasy { name = "SUSPEND"; command = "chanserv/suspend"; permission = "chanserv/suspend"; }
fantasy { name = "SYNC"; command = "chanserv/sync"; }
fantasy { name = "TOPIC"; command = "chanserv/topic"; }
fantasy { name = "UNBAN"; command = "chanserv/unban"; }
fantasy { name = "UNSUSPEND"; command = "chanserv/unsuspend"; permission = "chanserv/suspend"; }
fantasy { name = "UP"; command = "chanserv/up"; }
fantasy { name = "VOICE"; command = "chanserv/modes"; }
fantasy { name = "VOP"; command = "chanserv/xop"; }
+351 -415
View File
File diff suppressed because it is too large Load Diff
+11 -15
View File
@@ -1,15 +1,15 @@
/*
* Example configuration file for chanstats
* Example configuration file for Chanstats.
* Make sure BotServ, ChanServ and NickServ are running.
*/
module { name = "m_chanstats" }
chanstats
module
{
/*
name = "m_chanstats"
/*
* The name of this engine.
* This must match with the name of a SQL engine block
* This must match with the name of an SQL engine block.
*/
engine = "mysql/main"
@@ -20,24 +20,20 @@ chanstats
*/
prefix = "anope_"
smileyshappy = ":) :-) ;) :D :-D"
smileyshappy = ":) :-) ;) ;-) :D :-D :P :-P"
smileyssad = ":( :-( ;( ;-("
smileysother = ":/"
smileysother = ":/ :-/"
/*
* Enable Chanstats for new registered nicks / channels
* set it to 0 to disable it.
* Enable Chanstats for newly registered nicks / channels.
* Set it to 0 to disable it.
*/
NSDefChanstats = 1
CSDefChanstats = 1
}
module { name = "cs_set_chanstats" }
command { service = "ChanServ"; name = "SET CHANSTATS"; command = "chanserv/set/chanstats"; }
module { name = "ns_set_chanstats" }
command { service = "NickServ"; name = "SET CHANSTATS"; command = "nickserv/set/chanstats"; }
command { service = "NickServ"; name = "SASET CHANSTATS"; command = "nickserv/saset/chanstats"; }
module { name = "cs_fantasy_stats" }
command { service = "ChanServ"; name = "STATS"; command = "chanserv/stats"; }
+344 -240
View File
File diff suppressed because it is too large Load Diff
+18 -28
View File
@@ -9,7 +9,7 @@
service
{
/*
* The name of the Global client
* The name of the Global client.
*/
nick = "Global"
@@ -35,8 +35,8 @@ service
* These modes are very IRCd specific. If left commented, sane defaults
* are used based on what protocol module you have loaded.
*
* Note that setting this option incorrectly could potentially BREAK some if
* not all usefulness of the client. We will not support you if this client is
* Note that setting this option incorrectly could potentially BREAK some, if
* not all, usefulness of the client. We will not support you if this client is
* unable to do certain things if this option is enabled.
*/
#modes = "+o"
@@ -46,7 +46,7 @@ service
* of log channels this is not very useful, as the service will just idle in the
* specified channels, and will not accept any types of commands.
*
* Prefixes may be given to the channels in the form of mode character or prefix symbol.
* Prefixes may be given to the channels in the form of mode characters or prefix symbols.
*/
#channels = "@#services,#mychan"
}
@@ -56,41 +56,33 @@ service
*
* Provides essential functionality for Global.
*/
module { name = "global" }
/*
* Configuration for Global provided by gl_main.
*/
global
module
{
name = "global"
/*
* The name of the client that should be Global.
*/
name = "Global"
/*
* If set, Services will send global messages on starting up and shutting
* down/restarting.
*
* This directive is optional.
*/
#globaloncycle = yes
client = "Global"
/*
* This is the global message that will be sent when Services are being
* shutdown/restarted. This directive is only required if you enable
* globaloncycle above.
* shutdown/restarted.
*
* This directive is optional.
*/
globaloncycledown = "Services are restarting, they will be back shortly - please be good while we're gone"
#globaloncycledown = "Services are restarting, they will be back shortly - please be good while we're gone"
/*
* This is the global message that will be sent when Services (re)join the
* network. This directive is only required if you enable globaloncycle above.
* network.
*
* This directive is optional.
*/
globaloncycleup = "Services are now back online - have a nice day"
#globaloncycleup = "Services are now back online - have a nice day"
/*
* If set, Services will hide the IRC operator's nick in a global
* If set, Services will hide the IRC Operator's nick in a global
* message/notice.
*
* This directive is optional.
@@ -109,7 +101,7 @@ global
* Sane defaults are provided below that do not need to be edited unless you wish to change the default behavior.
*/
/* Give it a help command */
/* Give it a help command. */
command { service = "Global"; name = "HELP"; command = "generic/help"; }
/*
@@ -120,6 +112,4 @@ command { service = "Global"; name = "HELP"; command = "generic/help"; }
* Used for sending a message to every online user.
*/
module { name = "gl_global" }
command { service = "OperServ"; name = "GLOBAL"; command = "global/global"; permission = "operserv/global"; }
command { service = "Global"; name = "GLOBAL"; command = "global/global"; permission = "global/global"; }
+21 -47
View File
@@ -9,7 +9,7 @@
service
{
/*
* The name of the HostServ client
* The name of the HostServ client.
*/
nick = "HostServ"
@@ -35,8 +35,8 @@ service
* These modes are very IRCd specific. If left commented, sane defaults
* are used based on what protocol module you have loaded.
*
* Note that setting this option incorrectly could potentially BREAK some if
* not all usefulness of the client. We will not support you if this client is
* Note that setting this option incorrectly could potentially BREAK some, if
* not all, usefulness of the client. We will not support you if this client is
* unable to do certain things if this option is enabled.
*/
#modes = "+o"
@@ -46,7 +46,7 @@ service
* of log channels this is not very useful, as the service will just idle in the
* specified channels, and will not accept any types of commands.
*
* Prefixes may be given to the channels in the form of mode character or prefix symbol.
* Prefixes may be given to the channels in the form of mode characters or prefix symbols.
*/
#channels = "@#services,#mychan"
}
@@ -56,45 +56,19 @@ service
*
* Provides essential functionality for HostServ.
*/
module { name = "hostserv" }
/*
* Configuration for HostServ provided by hs_main.
*/
hostserv
module
{
name = "hostserv"
/*
* The name of the client that should be HostServ.
*/
name = "HostServ"
client = "HostServ"
/*
* The characters allowed in a vhost. Changing this is not recommended unless
* you know for sure your IRCd supports whatever characters you are wanting to use.
* Telling services to set a vhost containing characters your IRCd disallows could
* potentially break the IRCd and/or Services. Note these are 1 byte characters, so
* UTF-8 characters will not work.
*
* It is recommended you DON'T change this.
* If enabled, vhosts are activated on users immediately when they are set.
*/
vhost_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-"
/*
* If set, allows vhosts to not contain dots (.).
* Newer IRCds generally do not have a problem with this, but the same warning as
* vhost_chars applies.
*
* It is recommended you DON'T change this.
*/
allow_undotted_vhosts = false
/*
* The characters that are not allowed to be at the very beginning or very ending
* of a vhost. The same warning as vhost_chars applies.
*
* It is recommended you DON'T change this.
*/
disallow_start_or_end = ".-"
activate_on_set = false
}
/*
@@ -108,7 +82,7 @@ hostserv
* Sane defaults are provided below that do not need to be edited unless you wish to change the default behavior.
*/
/* Give it a help command */
/* Give it a help command. */
command { service = "HostServ"; name = "HELP"; command = "generic/help"; }
/*
@@ -116,7 +90,7 @@ command { service = "HostServ"; name = "HELP"; command = "generic/help"; }
*
* Provides the commands hostserv/del and hostserv/delall.
*
* Used for removing users vHosts.
* Used for removing users' vHosts.
*/
module { name = "hs_del" }
command { service = "HostServ"; name = "DEL"; command = "hostserv/del"; permission = "hostserv/del"; }
@@ -167,15 +141,12 @@ command { service = "HostServ"; name = "ON"; command = "hostserv/on"; }
*
* Provides the commands hostserv/request, hostserv/active, hostserv/reject, and hostserv/waiting.
*
* Used to manage vhosts requested by users.
* Used to manage vHosts requested by users.
*/
module { name = "hs_request" }
command { service = "HostServ"; name = "REQUEST"; command = "hostserv/request"; }
command { service = "HostServ"; name = "ACTIVATE"; command = "hostserv/activate"; permission = "hostserv/set"; }
command { service = "HostServ"; name = "REJECT"; command = "hostserv/reject"; permission = "hostserv/set"; }
command { service = "HostServ"; name = "WAITING"; command = "hostserv/waiting"; permission = "hostserv/set"; }
hs_request
module
{
name = "hs_request"
/*
* If set, Services will send a memo to the user requesting a vHost when it's been
* approved or rejected.
@@ -187,15 +158,18 @@ hs_request
*/
#memooper = yes
}
command { service = "HostServ"; name = "REQUEST"; command = "hostserv/request"; }
command { service = "HostServ"; name = "ACTIVATE"; command = "hostserv/activate"; permission = "hostserv/set"; }
command { service = "HostServ"; name = "REJECT"; command = "hostserv/reject"; permission = "hostserv/set"; }
command { service = "HostServ"; name = "WAITING"; command = "hostserv/waiting"; permission = "hostserv/set"; }
/*
* hs_set
*
* Provides the commands hostserv/set and hostserv/setall.
*
* Used for setting users vhosts.
* Used for setting users' vHosts.
*/
module { name = "hs_set" }
command { service = "HostServ"; name = "SET"; command = "hostserv/set"; permission = "hostserv/set"; }
command { service = "HostServ"; name = "SETALL"; command = "hostserv/setall"; permission = "hostserv/set"; }
+22 -27
View File
@@ -9,7 +9,7 @@
service
{
/*
* The name of the MemoServ client
* The name of the MemoServ client.
*/
nick = "MemoServ"
@@ -35,8 +35,8 @@ service
* These modes are very IRCd specific. If left commented, sane defaults
* are used based on what protocol module you have loaded.
*
* Note that setting this option incorrectly could potentially BREAK some if
* not all usefulness of the client. We will not support you if this client is
* Note that setting this option incorrectly could potentially BREAK some, if
* not all, usefulness of the client. We will not support you if this client is
* unable to do certain things if this option is enabled.
*/
#modes = "+o"
@@ -46,7 +46,7 @@ service
* of log channels this is not very useful, as the service will just idle in the
* specified channels, and will not accept any types of commands.
*
* Prefixes may be given to the channels in the form of mode character or prefix symbol.
* Prefixes may be given to the channels in the form of mode characters or prefix symbols.
*/
#channels = "@#services,#mychan"
}
@@ -56,18 +56,14 @@ service
*
* Provides essential functionality for MemoServ.
*/
module { name = "memoserv" }
/*
* Configuration for MemoServ provided by ms_main.
*/
memoserv
module
{
name = "memoserv"
/*
* The name of the client that should be MemoServ. Clients are configured
* with the service blocks.
*/
name = "MemoServ"
client = "MemoServ"
/*
* The maximum number of memos a user is allowed to keep by default. Normal users may set the
@@ -88,16 +84,6 @@ memoserv
* This directive is optional, but recommended.
*/
senddelay = 3s
/*
* Allow the use of memo receipts for the following groups:
*
* 1 - Opers Only
* 2 - Everybody
*
* This directive is optional.
*/
#memoreceipt = 1
}
/*
@@ -111,7 +97,7 @@ memoserv
* Sane defaults are provided below that do not need to be edited unless you wish to change the default behavior.
*/
/* Give it a help command */
/* Give it a help command. */
command { service = "MemoServ"; name = "HELP"; command = "generic/help"; }
/*
@@ -190,16 +176,26 @@ command { service = "MemoServ"; name = "READ"; command = "memoserv/read"; }
* Provides the command memoserv/rsend.
*
* Used to send a memo requiring a receipt be sent back once it is read.
*
*
* Requires configuring memoserv:memoreceipt.
*/
#module { name = "ms_rsend" }
#module
{
name = "ms_rsend"
/*
* Only allow Services Operators to use ms_rsend.
*
* This directive is optional.
*/
operonly = false
}
#command { service = "MemoServ"; name = "RSEND"; command = "memoserv/rsend"; }
/*
* ms_send
*
* Provides the command memoserv/send
* Provides the command memoserv/send.
*
* Used to send memos.
*/
@@ -209,7 +205,7 @@ command { service = "MemoServ"; name = "SEND"; command = "memoserv/send"; }
/*
* ms_sendall
*
* Provides the command memoserv/sendall
* Provides the command memoserv/sendall.
*
* Used to send a mass memo to every registered user.
*/
@@ -235,4 +231,3 @@ command { service = "MemoServ"; name = "SET"; command = "memoserv/set"; }
*/
module { name = "ms_staff" }
command { service = "MemoServ"; name = "STAFF"; command = "memoserv/staff"; permission = "memoserv/staff"; }
+346 -168
View File
@@ -1,4 +1,3 @@
/*
* [OPTIONAL] Non-Core Modules
*
@@ -10,12 +9,73 @@
/*
* help
*
* Provides commands generic/help
* Provides the command generic/help.
*
* Is a generic help command that can be used with any client.
* This is a generic help command that can be used with any client.
*/
module { name = "help" }
/*
* m_dns
*
* Adds support for the DNS protocol. By itself this module does nothing useful,
* but other modules such as m_dnsbl and os_dns require this.
*/
#module
{
name = "m_dns"
/*
* The nameserver to use for resolving hostnames, must be an IP or a resolver configuration file.
* The below should work fine on all unix like systems. Windows users will have to find their nameservers
* from ipconfig /all and put the IP here.
*/
nameserver = "/etc/resolv.conf"
#nameserver = "127.0.0.1"
/*
* How long to wait in seconds before a DNS query has timed out.
*/
timeout = 5
/* Only edit below if you are expecting to use os_dns or otherwise answer DNS queries. */
/*
* The IP and port services use to listen for DNS queries.
* Note that ports less than 1024 are privileged on UNIX/Linux systems, and
* require Anope to be started as root. If you do this, it is recommended you
* set options:user and options:group so Anope can change users after binding
* to this port.
*/
ip = "0.0.0.0"
port = 53
/*
* SOA record information.
*/
/* E-mail address of the DNS administrator. */
admin = "admin@example.com"
/* This should be the names of the public facing nameservers serving the records. */
nameservers = "ns1.example.com ns2.example.com"
/* The time slave servers are allowed to cache. This should be reasonably low
* if you want your records to be updated without much delay.
*/
refresh = 3600
/* A notify block. There should probably be one per nameserver listed in 'nameservers'.
*/
notify
{
ip = "192.0.2.0"
port = 53
}
}
/*
* m_dnsbl
*
@@ -23,9 +83,10 @@ module { name = "help" }
* is found on the blacklist they will be immediately banned. This is a crucial module
* to prevent bot attacks.
*/
module { name = "m_dnsbl" }
m_dnsbl
#module
{
name = "m_dnsbl"
/*
* If set, Services will check clients against the DNSBLs when services connect to its uplink.
* This is not recommended, and on large networks will open a very large amount of DNS queries.
@@ -45,39 +106,41 @@ m_dnsbl
* a timed G/K-line to the IRCd and forgets about it. Can be useful if your akill list is being fill up by bots.
*/
add_to_akill = yes
}
blacklist
{
/* Name of the blacklist */
name = "rbl.efnetrbl.org"
/* How long to set the ban for */
time = 4h
blacklist
{
/* Name of the blacklist. */
name = "rbl.efnetrbl.org"
/* Reason for akill.
* %n is the nick of the user
* %u is the ident/username of the user
* %g is the realname of the user
* %h is the hostname of the user
* %i is the IP of the user
* %r is the reason (configured below). Will be nothing if not configured.
* %N is the network name set in networkinfo:networkname
*/
reason = "You are listed in the efnet RBL, visit http://rbl.efnetrbl.org/?i=%i for info"
/* How long to set the ban for. */
time = 4h
/* Replies to ban and their reason. If this is totally ommited all replies get banned */
1 = "Open Proxy"
/* Don't ban for result 2 or 3 */
#2 = "spamtrap666"
#3 = "spamtrap50"
4 = "TOR"
5 = "Drones / Flooding"
}
blacklist
{
name = "dnsbl.dronebl.org"
time = 4h
reason = "You have a host listed in the DroneBL. For more information, visit http://dronebl.org/lookup_branded.do?ip=%i&network=%N"
/* Reason for akill.
* %n is the nick of the user
* %u is the ident/username of the user
* %g is the realname of the user
* %h is the hostname of the user
* %i is the IP of the user
* %r is the reason (configured below). Will be nothing if not configured.
* %N is the network name set in networkinfo:networkname
*/
reason = "You are listed in the efnet RBL, visit http://rbl.efnetrbl.org/?i=%i for info"
/* Replies to ban and their reason. If this is totally omitted all replies get banned. */
1 = "Open Proxy"
/* Don't ban for result 2 or 3 */
#2 = "spamtrap666"
#3 = "spamtrap50"
4 = "TOR"
5 = "Drones / Flooding"
}
blacklist
{
name = "dnsbl.dronebl.org"
time = 4h
reason = "You have a host listed in the DroneBL. For more information, visit http://dronebl.org/lookup_branded?ip=%i&network=%N"
}
}
/*
@@ -85,9 +148,10 @@ blacklist
*
* Gives users who are op in the specified help channel usermode +h (helpop).
*/
#module { name = "m_helpchan" }
m_helpchan
#module
{
name = "m_helpchan"
helpchannel = "#help"
}
@@ -99,28 +163,37 @@ m_helpchan
* Note that using this will allow users to get the IP of your services.
* To prevent this we recommend using a reverse proxy or a tunnel.
*/
#module { name = "m_httpd" }
httpd
#module
{
/* Name of this service */
name = "httpd/main"
/* IP to listen on */
ip = "0.0.0.0"
/* Port to listen on */
port = 8080
/* Time before connections to this server are timed out */
timeout = 30
name = "m_httpd"
/* If you are using a reverse proxy that sends one of the
* extforward_headers set below, set this to its IP.
* This allows services to obtain the real IP of users by
* reading the forwarded-for HTTP header.
*/
#extforward_ip = "192.168.0.255"
httpd
{
/* Name of this service. */
name = "httpd/main"
/* The header to look for. These probably work as is. */
extforward_header = "X-Forwarded-For Forwarded-For"
/* IP to listen on. */
ip = "0.0.0.0"
/* Port to listen on. */
port = 8080
/* Time before connections to this server are timed out. */
timeout = 30
/* Listen using SSL. Requires m_ssl. */
#ssl = yes
/* If you are using a reverse proxy that sends one of the
* extforward_headers set below, set this to its IP.
* This allows services to obtain the real IP of users by
* reading the forwarded-for HTTP header.
*/
#extforward_ip = "192.168.0.255"
/* The header to look for. These probably work as is. */
extforward_header = "X-Forwarded-For Forwarded-For"
}
}
/*
@@ -128,17 +201,21 @@ httpd
*
* This module allows other modules to use LDAP. By itself, this module does nothing useful.
*/
#module { name = "m_ldap" }
ldap
#module
{
server = "ldap://127.0.0.1"
port = 389
name = "m_ldap"
/*
* Admin credentials used for performing searches and adding users.
*/
admin_binddn = "cn=Manager,dc=anope,dc=org"
admin_password = "secret"
ldap
{
server = "ldap://127.0.0.1"
port = 389
/*
* Admin credentials used for performing searches and adding users.
*/
admin_binddn = "cn=Manager,dc=anope,dc=org"
admin_password = "secret"
}
}
/*
@@ -147,9 +224,10 @@ ldap
* This module allows many commands such as IDENTIFY, RELEASE, RECOVER, GHOST, etc. use
* LDAP to authenticate users. Requires m_ldap.
*/
#module { name = "m_ldap_authentication" }
m_ldap_authentication
#module
{
name = "m_ldap_authentication"
/*
* The distinguished name used for searching for users's accounts.
*/
@@ -157,14 +235,14 @@ m_ldap_authentication
/*
* The search filter used to look up users's accounts.
* %account is replaced with the user's account
* %account is replaced with the user's account.
* %object_class is replaced with the object_class configured below.
*/
search_filter = "(&(uid=%account)(objectClass=%object_class))"
/*
* The object class used by LDAP to store user account information.
* Used for adding new users to LDAP if disable_ns_register is false
* This is used for adding new users to LDAP if registration is allowed.
*/
object_class = "anopeUser"
@@ -186,15 +264,16 @@ m_ldap_authentication
password_attribute = "userPassword"
/*
* Enable to have this module disable /nickserv register.
* If set, the reason to give the users who try to "/msg NickServ REGISTER".
* If not set, then registration is not blocked.
*/
disable_ns_register = false
#disable_register_reason = "To register on this network visit http://some.misconfigured.site/register"
/*
* The reason to give the users who try to /ns register if
* disable_ns_register is enabled.
* If set, the reason to give the users who try to "/msg NickServ SET EMAIL".
* If not set, then email changing is not blocked.
*/
#disable_reason = "To register on this network visit http://some.misconfigured.site/register"
#disable_email_reason = "To change your email address visit http://some.misconfigured.site"
}
/*
@@ -205,9 +284,10 @@ m_ldap_authentication
*
* Note that this doesn't give the user privileges on the IRCd, only in Services.
*/
#module { name = "m_ldap_oper" }
m_ldap_oper
#module
{
name = "m_ldap_oper"
/*
* An optional binddn to use when searching for groups.
* %a is replaced with the account name of the user.
@@ -242,16 +322,20 @@ m_ldap_oper
*
* This module allows other modules to use MySQL.
*/
#module { name = "m_mysql" }
mysql
#module
{
/* The name of this service */
name = "mysql/main"
database = "anope"
server = "127.0.0.1"
username = "anope"
password = "mypassword"
port = 3306
name = "m_mysql"
mysql
{
/* The name of this service. */
name = "mysql/main"
database = "anope"
server = "127.0.0.1"
username = "anope"
password = "mypassword"
port = 3306
}
}
/*
@@ -267,15 +351,16 @@ mysql
* back to services. If services are able to connect through the proxy to itself
* then it knows it is an insecure proxy, and will ban it.
*/
#module { name = "m_proxyscan" }
m_proxyscan
#module
{
name = "m_proxyscan"
/*
* The target IP services tells the proxy to connect back to. This must be a publicly
* avaiable IP that remote proxies can connect to.
* available IP that remote proxies can connect to.
*/
#target_ip = "127.0.0.1"
/*
* The port services tells the proxy to connect to.
*/
@@ -296,7 +381,7 @@ m_proxyscan
/*
* An optional notice sent to clients upon connect.
*/
#connect_notice = "We will now scan your host for insecure proxies. If you do not consent to this scan please disconnect immediately"
#connect_notice = "We will now scan your host for insecure proxies. If you do not consent to this scan please disconnect immediately."
/*
* Who the notice should be sent from.
@@ -305,7 +390,7 @@ m_proxyscan
/*
* If set, OperServ will add infected clients to the akill list. Without it, OperServ simply sends
* a timed G/K-line to the IRCd and forgets about it. Can be useful if your akill list is being fill up by bots.
* a timed G/K-line to the IRCd and forgets about it. Can be useful if your akill list is being filled up by bots.
*/
add_to_akill = yes
@@ -313,30 +398,117 @@ m_proxyscan
* How long before connections should be timed out.
*/
timeout = 5
proxyscan
{
/* The type of proxy to check for. A comma separated list is allowed. */
type = "HTTP"
/* The ports to check. */
port = "80,8080"
/* How long to set the ban for. */
time = 4h
/*
* The reason to ban the user for.
* %h is replaced with the type of proxy found.
* %i is replaced with the IP of proxy found.
* %p is replaced with the port.
*/
reason = "You have an open proxy running on your host (%t:%i:%p)"
}
}
/*
* A proxyscan block (must have m_proxyscan loaded).
* You may have multiple proxyscan blocks.
* m_sql_authentication
*
* This module allows authenticating users against an external SQL database using a custom
* query.
*/
proxyscan
#module
{
/* The type of proxy to check for. A comma separated list is allowed */
type = "HTTP"
name = "m_sql_authentication"
/* The ports to check */
port = "80,8080"
/* SQL engine to use. Should be configured elsewhere with m_mysql, m_sqlite, etc. */
engine = "mysql/main"
/* How long to set the ban for */
time = 4h
/* Query to execute to authenticate. A non empty result from this query is considered a success,
* and the user will be authenticated.
*
* @a@ is replaced with the user's account name
* @p@ is replaced with the user's password
* @n@ is replaced with the user's nickname
* @i@ is replaced with the user's IP
*
* Note that @n@ and @i@ may not always exist in the case of a user identifying outside of the normal
* nickserv/identify command, such as through the web panel.
*
* Furthermore, if a field named email is returned from this query the user's email is
* set to its value.
*
*
* We've included some example queries for some popular website/forum systems.
*
* Drupal 6: "SELECT `mail` AS `email` FROM `users` WHERE `name` = @a@ AND `pass` = MD5(@p@) AND `status` = 1"
* e107 cms: "SELECT `user_email` AS `email` FROM `e107_user` WHERE `user_loginname` = @a@ AND `user_password` = MD5(@p@)"
* SMF Forum: "SELECT `email_address` AS `email` FROM `smf_members` WHERE `member_name` = @a@ AND `passwd` = SHA1(CONCAT(LOWER(@a@), @p@))"
* vBulletin: "SELECT `email` FROM `user` WHERE `username` = @a@ AND `password` = MD5(CONCAT(MD5(@p@), `salt`))"
* IP.Board: "SELECT `email` FROM `ibf_members` WHERE `name` = @a@ AND `members_pass_hash` = MD5(CONCAT(MD5(`members_pass_salt`), MD5(@p@)))"
*/
query = "SELECT `email_addr` AS `email` FROM `my_users` WHERE `username` = @a@ AND `password` = MD5(CONCAT('salt', @p@))"
/*
* The reason to ban the user for.
* %h is replaced with the type of proxy found.
* %i is replaced with the IP of proxy found.
* %p is replaced with the port.
* If set, the reason to give the users who try to "/msg NickServ REGISTER".
* If not set, then registration is not blocked.
*/
reason = "You have an open proxy running on your host (%t:%i:%p)"
#disable_reason = "To register on this network visit http://some.misconfigured.site/register"
}
/*
* m_sql_log
*
* This module adds an additional target option to log{} blocks
* that allows logging Service's logs to SQL. To log to SQL, add
* the SQL service name to log:targets prefixed by sql_log:. For
* example:
*
* log
* {
* targets = "services.log sql_log:mysql/main"
* ...
* }
*
* By default this module logs to the table `logs`, and will create
* it if it doesn't exist. This module does not create any indexes (keys)
* on the table and it is recommended you add them yourself as necessary.
*/
#module { name = "m_sql_log" }
/*
* m_sql_oper
*
* This module allows granting users services operator privileges and possibly IRC Operator
* privileges based on an external SQL database using a custom query.
*/
#module
{
name = "m_sql_oper"
/* SQL engine to use. Should be configured elsewhere with m_mysql, m_sqlite, etc. */
engine = "mysql/main"
/* Query to execute to determine if a user should have operator privileges.
* A field named opertype must be returned in order to link the user to their oper type.
* The oper types must be configured earlier in services.conf.
*
* If a field named modes is returned from this query then those modes are set on the user.
* Without this, only a simple +o is sent.
*
* @a@ is replaced with the user's account name
* @i@ is replaced with the user's IP
*/
query = "SELECT `opertype` FROM `my_users` WHERE `user_name` = @a@"
}
/*
@@ -344,13 +516,44 @@ proxyscan
*
* This module allows other modules to use SQLite.
*/
#module { name = "m_sqlite" }
sqlite
#module
{
/* The name of this service */
name = "sqlite/main"
/* The database name, it will be created if it does not exist. */
database = "anope.db"
name = "m_sqlite"
/* A SQLite database */
sqlite
{
/* The name of this service. */
name = "sqlite/main"
/* The database name, it will be created if it does not exist. */
database = "anope.db"
}
}
/*
* m_redis
*
* This module allows other modules to use Redis.
*/
#module
{
name = "m_redis"
/* A redis database */
redis
{
/* The name of this service */
name = "redis/main"
/*
* The redis database to use. New connections default to 0.
*/
db = 0
ip = "127.0.0.1"
port = 6379
}
}
/*
@@ -358,7 +561,7 @@ sqlite
*
* Provides the regex engine regex/pcre, which uses the Perl Compatible Regular Expressions library.
*/
module { name = "m_regex_pcre" }
#module { name = "m_regex_pcre" }
/*
* m_regex_posix
@@ -378,32 +581,42 @@ module { name = "m_regex_pcre" }
/*
* m_rewrite
*
* Allows rewriting commands sent to clients.
* Allows rewriting commands sent to/from clients.
*/
#module { name = "m_rewrite" }
rewrite
#command
{
/* The client to apply this rewrite to. */
client = "ChanServ"
service = "ChanServ"; name = "CLEAR"; command = "rewrite"
/* Enable m_rewrite. */
rewrite = true
/* Source message to match. A $ can be used to match anything. */
source_message = "CLEAR $ USERS"
rewrite_source = "CLEAR $ USERS"
/*
* Message to rewrite the source message to. A $ followed by a number, eg $0, gets
* replaced by the number-th word from the source_message, starting from 0.
*/
target_message = "CLEARUSERS $1"
rewrite_target = "KICK $1 *"
/*
* The command description. This only shows up in HELP's output.
* Comment this option to prevent the command from showing in the
* HELP command.
*/
rewrite_description = "Clears all users from a channel"
}
/*
* m_ssl
*
* This module uses SSL to connect to the uplink server(s)
* This module uses SSL to connect to the uplink server(s).
*/
module { name = "m_ssl" }
ssl
#module
{
name = "m_ssl"
/*
* An optional certificate and key for m_ssl to give to the uplink.
*
@@ -417,34 +630,17 @@ ssl
}
/*
* m_statusupdate
*
* This module automatically updates users status on channels when the
* channel's access list is modified.
*/
module { name = "m_statusupdate" }
/*
* m_xmlrpc
*
* Allows remote applications (websites) to execute queries in real time to retrieve data from Anope.
* By itself this module does nothing, but allows other modules (m_xmlrpc_main) to receive and send XMLRPC queries.
*/
#module { name = "m_xmlrpc" }
m_xmlrpc
#module
{
/* IP to listen on */
bindip = "127.0.0.1"
/* Port to listen on */
port = 26673
/* Enable for IPv6 */
ipv6 = no
/* If enabled, requires m_ssl to be loaded */
ssl = no
/* IPs allowed to connect (separate with spaces), this should be secured. We also recommend you firewall this
* with an outside program to increase security.
*/
allowed = "127.0.0.0/24"
name = "m_xmlrpc"
/* Web service to use. Requires m_httpd. */
server = "httpd/main"
}
/*
@@ -455,23 +651,6 @@ m_xmlrpc
*/
#module { name = "m_xmlrpc_main" }
/*
* ns_maxemail
*
* Limits how many times the same email address may be used in Anope
* to register accounts.
*/
module { name = "ns_maxemail" }
ns_maxemail
{
/*
* The limit to how many registered nicks can use the same e-mail address. If set to 0 or left
* commented, there will be no limit enforced when registering new accounts or using
* /msg NickServ SET EMAIL.
*/
#maxemails = 1
}
/*
* webcpanel
*
@@ -481,17 +660,16 @@ ns_maxemail
*
* This module requires m_httpd.
*/
#module { name = "webcpanel" }
webcpanel
#module
{
/* Web server to use */
name = "webcpanel"
/* Web server to use. */
server = "httpd/main";
/* Template to use */
/* Template to use. */
template = "default";
/* Page title */
/* Page title. */
title = "Anope IRC Services";
}
+272 -310
View File
@@ -9,7 +9,7 @@
service
{
/*
* The name of the NickServ client
* The name of the NickServ client.
*/
nick = "NickServ"
@@ -35,8 +35,8 @@ service
* These modes are very IRCd specific. If left commented, sane defaults
* are used based on what protocol module you have loaded.
*
* Note that setting this option incorrectly could potentially BREAK some if
* not all usefulness of the client. We will not support you if this client is
* Note that setting this option incorrectly could potentially BREAK some, if
* not all, usefulness of the client. We will not support you if this client is
* unable to do certain things if this option is enabled.
*/
#modes = "+o"
@@ -46,7 +46,7 @@ service
* of log channels this is not very useful, as the service will just idle in the
* specified channels, and will not accept any types of commands.
*
* Prefixes may be given to the channels in the form of mode character or prefix symbol.
* Prefixes may be given to the channels in the form of mode characters or prefix symbols.
*/
#channels = "@#services,#mychan"
}
@@ -56,44 +56,34 @@ service
*
* Provides essential functionality for NickServ.
*/
module { name = "nickserv" }
/*
* Configuration for NickServ provided by ns_main.
*/
nickserv
module
{
name = "nickserv"
/*
* The name of the client that should be NickServ.
*/
name = "NickServ"
client = "NickServ"
/*
* Force users to give an e-mail address when they register a nick.
*
* This directive is recommended to be enabled, and required if e-mail registration is enabled.
*
* This directive defaults to "yes" and is recommended to be enabled. This is required if e-mail registration is enabled.
*/
forceemail = yes
/*
* Require users who change their email address to confirm they
* own it.
* own their new email.
*/
confirmemailchanges = no
/*
* Registration confirmation setting. Set to "none" for no registration confirmation,
* "mail" for email confirmation, and "admin" to have services operators manually confirm
* every registration. Set to "disable" to completely disable all registrations.
*/
registration = "none"
/*
* A message sent to users on connect if they user an unregistered nick.
* A message sent to users on connect if they use an unregistered nick.
*
* This directive is optional.
*/
#unregistered_notice = "Your nickname is not registered. To register it use /nickserv register password email."
#unregistered_notice = "Your nickname is not registered. To register it, use: /msg NickServ REGISTER password email"
/*
* The default options for newly registered nicks. Note that changing these options
@@ -101,38 +91,26 @@ nickserv
* by spaces.
*
* The options are:
* - kill: Kill nick if not identified within 60 seconds
* - killquick: Kill nick if not identified within 20 seconds, this one overrides the above
* option and the above must be specified with this one
* - secure: Enable nickname security, requiring the nick's password before any operations
* can be done on it
* - private: Hide the nick from NickServ's LIST command
* - hideemail: Hide's the nick's e-mail address from NickServ's INFO command
* - hideusermask: Hide's the nick's last or current user@host from NickServ's INFO command
* - hidequit: Hide's the nick's last quit message
* - memosignon: Notify user if they have a new memo when they sign into the nick
* - memoreceive: Notify user if they have a new memo as soon as it's received
* - autoop: User will be automatically opped in channels they enter and have access to
* - msg: Services messages will be sent as PRIVMSGs instead of NOTICEs, requires UsePrivmsg
* to be enabled as well
* - killprotect: Kill nick if not identified within 60 seconds
* - kill_quick: Kill nick if not identified within 20 seconds, this one overrides the above
* option and the above must be specified with this one
* - ns_secure: Enable nickname security, requiring the nick's password before any operations
* can be done on it
* - ns_private: Hide the nick from NickServ's LIST command
* - hide_email: Hide's the nick's e-mail address from NickServ's INFO command
* - hide_mask: Hide's the nick's last or current user@host from NickServ's INFO command
* - hide_quit: Hide's the nick's last quit message
* - memo_signon: Notify user if they have a new memo when they sign into the nick
* - memo_receive: Notify user if they have a new memo as soon as it's received
* - autoop: User will be automatically opped in channels they enter and have access to
* - msg: Services messages will be sent as PRIVMSGs instead of NOTICEs, requires
* options:useprivmsg to be enabled as well
* - ns_keepmodes: Enables keepmodes, which retains user modes across sessions
*
* This directive is optional, if left blank, the options will default to secure, memosignon, and
* memoreceive. If you really want no defaults, use "none" by itself as the option.
* This directive is optional, if left blank, the options will default to ns_secure, memo_signon, and
* memo_receive. If you really want no defaults, use "none" by itself as the option.
*/
defaults="secure private hideemail hideusermask memosignon memoreceive autoop"
/*
* A list of languages to load on startup that will be available in /nickserv set language.
* Useful if you translate Anope to your language. (Explained further in docs/LANGUAGE).
* Note that english should not be listed here because it is the base language.
*/
languages = "ca_ES de_DE el_GR es_ES fr_FR hu_HU it_IT nl_NL pl_PL pt_PT ru_RU tr_TR"
/*
* Default language that non- and newly-registered nicks will receive messages in.
* Leave empty to default to English.
*/
#defaultlanguage = "es_ES"
defaults = "ns_secure ns_private hide_email hide_mask memo_signon memo_receive autoop"
/*
* The minimum length of time between consecutive uses of NickServ's REGISTER command. This
@@ -141,101 +119,20 @@ nickserv
regdelay = 30s
/*
* The minimum length of time between consecutive uses of NickServ's RESEND command.
*
* This directive is optional, but recommended. If not set, this restriction will be disabled.
*/
resenddelay = 90s
/*
* The length of time before a nick registration expires.
* The length of time before a nick's registration expires.
*
* This directive is optional, but recommended. If not set, the default is 21 days.
*/
expire = 21d
/*
* The length of time before a suspended nick becomes unsuspended.
*
* This directive is optional. If not set, the default is to never.
*/
#suspendexpire = 90d
/*
* The length of time a user using an unconfirmed account has
* before the account will be released for general use again.
*
* This directive is only required if the e-mail registration option is enabled.
*/
#unconfirmedexpire = 1d
/*
* The maximum number of nicks allowed in a group.
*
* This directive is optional, but recommended. If not set or set to 0, no limits will be applied.
*/
maxaliases = 16
/*
* The maximum number of entries allowed on a nickname's access list.
*/
accessmax = 32
/*
* The username (and possibly hostname) used for the fake user created when NickServ collides
* a user. Should be in the user@host format.
*/
enforceruser = "enforcer"
enforcerhost = "localhost.net"
/*
* The delay before a NickServ collided nick is released.
*/
releasetimeout = 1m
/*
* Allow the use of the IMMED option in the NickServ SET KILL command.
*
* This directive is optional.
*/
#allowkillimmed = yes
/*
* If set, the NickServ GROUP command won't allow any group change. This is recommended for
* better performance and to protect against nick stealing, however users will have less
* flexibility.
*
* This directive is optional, but recommended.
*/
#nogroupchange = yes
/*
* The maximum number of nicks to be returned for a NickServ LIST command.
*/
listmax = 50
/*
* When a user's nick is forcibly changed to enforce a "nick kill", their new nick will start
* with this value. The rest will be made up of 6 or 7 digits.
*/
guestnickprefix = "Guest"
/*
* Prevents the use of the ACCESS (excluding the LIST subcommand), DROP, FORBID, SUSPEND,
* Prevents the use of the ACCESS and CERT (excluding their LIST subcommand), DROP, FORBID, SUSPEND,
* GETPASS and SET PASSWORD commands by services operators on other services operators.
*
* This directive is optional, but recommended.
*/
secureadmins = yes
/*
* If set, any user wanting to use the privileges of Services Root, Services Admin, or Services
* Operator must have been logged as an IRC Operator with the /oper command.
*
* This directive is optional, but recommended.
*/
strictprivileges = yes
/*
* If set, Services will set the channel modes a user has access to upon identifying, assuming
* they are not already set.
@@ -245,17 +142,38 @@ nickserv
modeonid = yes
/*
* If set, Services will add the usermask of registering users to the access list of their
* newly created account. If not set, users will always have to identify to NickServ before
* being recognized, unless they manually add an address to the access list of their account.
* If set, Services will set these user modes on any user who identifies.
*
* This directive is optional.
*/
addaccessonreg = yes
#modesonid = "+R"
/*
* The maximum number of channels a user can have on NickServ's AJOIN command.
* If set, Services will not show netsplits in the last quit message field
* of NickServ's INFO command.
*/
ajoinmax = 10
hidenetsplitquit = no
/*
* If set, is the length of time NickServ's killquick and kill options wait before
* forcing users off of protected nicknames.
*/
killquick = 20s
kill = 60s
/*
* If set, forbids the registration of nicks that contain an existing
* nick with Services access. For example, if Tester is a Services Oper,
* you can't register NewTester or Tester123 unless you are an IRC
* Operator.
*
* NOTE: If you enable this, you will have to be logged in as an IRC
* operator in order to register a Services Root nick when setting up
* Anope for the first time.
*
* This directive is optional.
*/
#restrictopernicks = yes
}
/*
@@ -266,10 +184,21 @@ nickserv
*
* Additionally, you may provide a permission name that must be in the opertype of users executing the command.
*
* Sane defaults are provided below that do not need to be edited unless you wish to change the default behaviour.
* Sane defaults are provided below that do not need to be edited unless you wish to change the default behavior.
*/
/* Give it a help command */
/* Command group configuration for NickServ.
*
* Commands may optionally be placed into groups to make NickServ's HELP output easier to understand.
* Remove the following groups to use the old behavior of simply listing all NickServ commands from HELP.
*/
command_group
{
name = "nickserv/admin"
description = "Services Operator commands"
}
/* Give it a help command. */
command { service = "NickServ"; name = "HELP"; command = "generic/help"; }
/*
@@ -279,7 +208,24 @@ command { service = "NickServ"; name = "HELP"; command = "generic/help"; }
*
* Used for configuring what hosts have access to your account.
*/
module { name = "ns_access" }
module
{
name = "ns_access"
/*
* The maximum number of entries allowed on a nickname's access list.
*/
accessmax = 32
/*
* If set, Services will add the usermask of registering users to the access list of their
* newly created account. If not set, users will always have to identify to NickServ before
* being recognized, unless they manually add an address to the access list of their account.
* This directive is optional.
*/
addaccessonreg = yes
}
command { service = "NickServ"; name = "ACCESS"; command = "nickserv/access"; }
/*
@@ -289,7 +235,15 @@ command { service = "NickServ"; name = "ACCESS"; command = "nickserv/access"; }
*
* Used for configuring channels to join once you identify.
*/
module { name = "ns_ajoin" }
module
{
name = "ns_ajoin"
/*
* The maximum number of channels a user can have on NickServ's AJOIN command.
*/
ajoinmax = 10
}
command { service = "NickServ"; name = "AJOIN"; command = "nickserv/ajoin"; }
/*
@@ -309,7 +263,7 @@ command { service = "NickServ"; name = "ALIST"; command = "nickserv/alist"; }
*
* Used for configuring your SSL certificate list, which can be used to automatically identify you.
*/
module { name = "ns_cert" }
module { name = "ns_cert"; accessmax = 5; }
command { service = "NickServ"; name = "CERT"; command = "nickserv/cert"; }
/*
@@ -330,7 +284,7 @@ command { service = "NickServ"; name = "DROP"; command = "nickserv/drop"; }
* Used for getting registered accounts by searching for emails.
*/
module { name = "ns_getemail" }
command { service = "NickServ"; name = "GETEMAIL"; command = "nickserv/getemail"; permission = "nickserv/getemail"; }
command { service = "NickServ"; name = "GETEMAIL"; command = "nickserv/getemail"; permission = "nickserv/getemail"; group = "nickserv/admin"; }
/*
* ns_getpass
@@ -344,16 +298,6 @@ command { service = "NickServ"; name = "GETEMAIL"; command = "nickserv/getemail"
#module { name = "ns_getpass" }
#command { service = "NickServ"; name = "GETPASS"; command = "nickserv/getpass"; permission = "nickserv/getpass"; }
/*
* ns_ghost
*
* Provides the command nickserv/ghost.
*
* Used for disconnecting "ghost" sessions.
*/
module { name = "ns_ghost" }
command { service = "NickServ"; name = "GHOST"; command = "nickserv/ghost"; }
/*
* ns_group
*
@@ -361,7 +305,26 @@ command { service = "NickServ"; name = "GHOST"; command = "nickserv/ghost"; }
*
* Used for controlling nick groups.
*/
module { name = "ns_group" }
module
{
name = "ns_group"
/*
* The maximum number of nicks allowed in a group.
*
* This directive is optional, but recommended. If not set or set to 0, no limits will be applied.
*/
maxaliases = 16
/*
* If set, the NickServ GROUP command won't allow any group change. This is recommended for
* better performance and to protect against nick stealing, however users will have less
* flexibility.
*
* This directive is optional, but recommended.
*/
#nogroupchange = yes
}
command { service = "NickServ"; name = "GLIST"; command = "nickserv/glist"; }
command { service = "NickServ"; name = "GROUP"; command = "nickserv/group"; }
command { service = "NickServ"; name = "UNGROUP"; command = "nickserv/ungroup"; }
@@ -374,28 +337,44 @@ command { service = "NickServ"; name = "UNGROUP"; command = "nickserv/ungroup";
* Used for identifying to accounts.
*/
module { name = "ns_identify" }
command { service = "NickServ"; name = "ID"; command = "nickserv/identify"; }
command { service = "NickServ"; name = "ID"; command = "nickserv/identify"; hide = true; }
command { service = "NickServ"; name = "IDENTIFY"; command = "nickserv/identify"; }
/*
* ns_info
*
* Provides the command nickserv/info.
* Provides the commands:
* nickserv/info. - Used for gathering information about an account.
* nickserv/set/hide, nickserv/saset/hide - Used for configuring which options are publically shown in nickserv/info.
*
* Used for gathering information about an account.
*/
module { name = "ns_info" }
command { service = "NickServ"; name = "INFO"; command = "nickserv/info"; }
command { service = "NickServ"; name = "SET HIDE"; command = "nickserv/set/hide"; }
command { service = "NickServ"; name = "SASET HIDE"; command = "nickserv/saset/hide"; permission = "nickserv/saset/hide"; }
/*
* ns_list
*
* Provides the command nickserv/list.
* Provides the commands:
* nickserv/list - Used for retrieving and searching the registered account list.
* nickserv/set/private, nickserv/saset/private - Used for configuring whether or a users account shows up in nickserv/list.
*
* Used for retrieving and searching the registered account list.
*/
module { name = "ns_list" }
command { service = "NickServ"; name = "LIST"; command = "nickserv/list"; }
module
{
name = "ns_list"
/*
* The maximum number of nicks to be returned for a NickServ LIST command.
*/
listmax = 50
}
command { service = "NickServ"; name = "LIST"; command = "nickserv/list"; group = "nickserv/admin"; }
command { service = "NickServ"; name = "SET PRIVATE"; command = "nickserv/set/private"; }
command { service = "NickServ"; name = "SASET PRIVATE"; command = "nickserv/saset/private"; permission = "nickserv/saset/private"; }
/*
* ns_logout
@@ -412,10 +391,24 @@ command { service = "NickServ"; name = "LOGOUT"; command = "nickserv/logout"; }
*
* Provides the command nickserv/recover.
*
* Used for forcing someone on your nick to a guest nick.
* Used for recovering your nick from services or another user.
*/
module { name = "ns_recover" }
module
{
name = "ns_recover"
/*
* If set, Services will svsnick and svsjoin users who use the recover
* command on an identified user to the nick and channels of the recovered user.
*
* This directive is opional.
*/
restoreonrecover = yes
}
command { service = "NickServ"; name = "RECOVER"; command = "nickserv/recover"; }
# Uncomment below to emulate 1.8's behavior of ghost and release.
#command { service = "NickServ"; name = "GHOST"; command = "nickserv/recover"; }
#command { service = "NickServ"; name = "RELEASE"; command = "nickserv/recover"; }
/*
* ns_register
@@ -424,21 +417,43 @@ command { service = "NickServ"; name = "RECOVER"; command = "nickserv/recover";
*
* Used for registering accounts.
*/
module { name = "ns_register" }
module
{
name = "ns_register"
/*
* Registration confirmation setting. Set to "none" for no registration confirmation,
* "mail" for email confirmation, and "admin" to have services operators manually confirm
* every registration. Set to "disable" to completely disable all registrations.
*/
registration = "none"
/*
* The minimum length of time between consecutive uses of NickServ's RESEND command.
*
* This directive is optional, but recommended. If not set, this restriction will be disabled.
*/
resenddelay = 90s
/*
* Prevents users from registering their nick if they are not connected
* for at least the given number of seconds.
*
* This directive is optional.
*/
#nickregdelay = 30s
/*
* The length of time a user using an unconfirmed account has
* before the account will be released for general use again.
*/
#unconfirmedexpire = 1d
}
command { service = "NickServ"; name = "CONFIRM"; command = "nickserv/confirm"; }
command { service = "NickServ"; name = "REGISTER"; command = "nickserv/register"; }
command { service = "NickServ"; name = "RESEND"; command = "nickserv/resend"; }
/*
* ns_release
*
* Provides the command nickserv/release.
*
* Used for releasing names held by nickserv/recover.
*/
module { name = "ns_release" }
command { service = "NickServ"; name = "RELEASE"; command = "nickserv/release"; }
/*
* ns_resetpass
*
@@ -449,159 +464,66 @@ command { service = "NickServ"; name = "RELEASE"; command = "nickserv/release";
module { name = "ns_resetpass" }
command { service = "NickServ"; name = "RESETPASS"; command = "nickserv/resetpass"; }
/*
* ns_saset
*
* Provides commands nickserv/saset, nickserv/saset/password.
*
* Used as a help wrapper for SASET commands, and used to force change users password.
*/
module { name = "ns_saset" }
command { service = "NickServ"; name = "SASET"; command = "nickserv/saset"; }
command { service = "NickServ"; name = "SASET PASSWORD"; command = "nickserv/saset/password"; }
/*
* ns_saset_noexpire
*
* Provides the command nickserv/saset/noexpire.
*
* Used for configuring noexpire, which prevents nicks from expiring.
*/
module { name = "ns_saset_noexpire" }
command { service = "NickServ"; name = "SASET NOEXPIRE"; command = "nickserv/saset/noexpire"; permission = "nickserv/saset/noexpire" }
/*
* ns_set
*
* Provides the commands nickserv/set, nickserv/set/password.
*
* Used as a help wrapper for SET commands, and used for users to change their password.
* Provides the commands:
* nickserv/set, nickserv/saset - Dummy help wrappers for the SET and SASET commands.
* nickserv/set/autoop, nickserv/saset/autoop - Determines whether or not modes are automatically set users when joining a channel.
* nickserv/set/display, nickserv/saset/display - Used for setting a users display name.
* nickserv/set/email, nickserv/saset/email - Used for setting a users email address.
* nickserv/set/keepmodes, nickserv/saset/keepmodes - Configure whether or not services should retain a user's modes across sessions.
* nickserv/set/kill, nickserv/saset/kill - Used for configuring nickname protection.
* nickserv/set/language, nickserv/saset/language - Used for configuring what language services use.
* nickserv/set/message, nickserv/saset/message - Used to configure how services send messages to you.
* nickserv/set/password, nickserv/saset/password - Used for changing a users password.
* nickserv/set/secure, nickserv/saset/secure - Used for configuring whether a user can identify by simply being recognized by nickserv/access.
* nickserv/saset/noexpire - Used for configuring noexpire, which prevents nicks from expiring.
*/
module { name = "ns_set" }
command { service = "NickServ"; name = "SET"; command = "nickserv/set"; }
command { service = "NickServ"; name = "SET PASSWORD"; command = "nickserv/set/password"; }
module
{
name = "ns_set"
/*
* Allow the use of the IMMED option in the NickServ SET KILL command.
*
* This directive is optional.
*/
#allowkillimmed = yes
}
command { service = "NickServ"; name = "SET"; command = "nickserv/set"; }
command { service = "NickServ"; name = "SASET"; command = "nickserv/saset"; permission = "nickserv/saset/"; group = "nickserv/admin"; }
/*
* ns_set_autoop
*
* Provides the commands nickserv/set/autoop and nickserv/saset/autoop.
*
* Used for setting autoop, which determines whether or not modes are automatically set on you when joining a channel.
*/
module { name = "ns_set_autoop" }
command { service = "NickServ"; name = "SET AUTOOP"; command = "nickserv/set/autoop"; }
command { service = "NickServ"; name = "SASET AUTOOP"; command = "nickserv/saset/autoop"; permission = "nickserv/saset/autoop"; }
/*
* ns_set_display
*
* Provides the commands nickserv/set/display and nickserv/saset/display.
*
* Used for setting users display names.
*/
module { name = "ns_set_display" }
command { service = "NickServ"; name = "SET DISPLAY"; command = "nickserv/set/display"; }
command { service = "NickServ"; name = "SASET DISPLAY"; command = "nickserv/saset/display"; permission = "nickserv/saset/display"; }
/*
* ns_set_email
*
* Provides the commands nickserv/set/email and nickserv/saset/email.
*
* Used for setting users email addresses.
*/
module { name = "ns_set_email" }
command { service = "NickServ"; name = "SET EMAIL"; command = "nickserv/set/email"; }
command { service = "NickServ"; name = "SASET EMAIL"; command = "nickserv/saset/email"; permission = "nickserv/saset/email"; }
/*
* ns_set_greet
*
* Provides the commands nickserv/set/greet and nickserv/saset/greet.
*
* Used for changing users greet message, which is displayed when they enter channels.
*/
module { name = "ns_set_greet" }
command { service = "NickServ"; name = "SET GREET"; command = "nickserv/set/greet"; }
command { service = "NickServ"; name = "SASET GREET"; command = "nickserv/saset/greet"; permission = "nickserv/saset/greet"; }
command { service = "NickServ"; name = "SET KEEPMODES"; command = "nickserv/set/keepmodes"; }
command { service = "NickServ"; name = "SASET KEEPMODES"; command = "nickserv/saset/keepmodes"; permission = "nickserv/saset/keepmodes"; }
/*
* ns_set_hide
*
* Provides the commands nickserv/set/hide and nickserv/saset/hide.
*
* Used for configuring which options are publically shown in nickserv/info for your account.
*/
module { name = "ns_set_hide" }
command { service = "NickServ"; name = "SET HIDE"; command = "nickserv/set/hide"; }
command { service = "NickServ"; name = "SASET HIDE"; command = "nickserv/saset/hide"; permission = "nickserv/saset/hide"; }
/*
* ns_set_kill
*
* Provides the commands nickserv/set/kill and nickserv/saset/kill.
*
* Used for configuring if and for how long other users are allowed to use your nick.
*/
module { name = "ns_set_kill" }
command { service = "NickServ"; name = "SET KILL"; command = "nickserv/set/kill"; }
command { service = "NickServ"; name = "SASET KILL"; command = "nickserv/saset/kill"; permission = "nickserv/saset/kill"; }
/*
* ns_set_language
*
* Provides the commands nickserv/set/language and nickserv/saset/language.
*
* Used for configuring what language services use when messaging you.
*/
module { name = "ns_set_language" }
command { service = "NickServ"; name = "SET LANGUAGE"; command = "nickserv/set/language"; }
command { service = "NickServ"; name = "SASET LANGUAGE"; command = "nickserv/saset/language"; permission = "nickserv/saset/language"; }
/*
* ns_set_message
*
* Provides the commands nickserv/set/message and nickserv/saset/message.
*
* Used to configure how services send messages to you.
*/
module { name = "ns_set_message" }
command { service = "NickServ"; name = "SET MESSAGE"; command = "nickserv/set/message"; }
command { service = "NickServ"; name = "SASET MESSAGE"; command = "nickserv/saset/message"; permission = "nickserv/saset/message"; }
/*
* ns_set_private
*
* Provides the commands nickserv/set/private and nickserv/saset/private.
*
* Used for configuring whether or not your account shows up in nickserv/list.
*/
module { name = "ns_set_private" }
command { service = "NickServ"; name = "SET PRIVATE"; command = "nickserv/set/private"; }
command { service = "NickServ"; name = "SASET PRIVATE"; command = "nickserv/saset/private"; permission = "nickserv/saset/private"; }
command { service = "NickServ"; name = "SET PASSWORD"; command = "nickserv/set/password"; }
command { service = "NickServ"; name = "SASET PASSWORD"; command = "nickserv/saset/password"; permission = "nickserv/saset/password"; }
/*
* ns_set_secure
*
* Provides the commands nickserv/set/secure and nickserv/saset/secure.
*
* Used for configuring whether you can gain access to your nick by simply being recognized by nickserv/access.
*/
module { name = "ns_set_secure" }
command { service = "NickServ"; name = "SET SECURE"; command = "nickserv/set/secure"; }
command { service = "NickServ"; name = "SASET SECURE"; command = "nickserv/saset/secure"; permission = "nickserv/saset/secure"; }
/*
* ns_sendpass
*
* Provides the command nickserv/sendpass.
*
* Used to send users their password via email.
*
* Requires that no encryption is being used.
*/
module { name = "ns_sendpass" }
command { service = "NickServ"; name = "SENDPASS"; command = "nickserv/sendpass"; permission = "nickserv/sendpass"; }
command { service = "NickServ"; name = "SASET NOEXPIRE"; command = "nickserv/saset/noexpire"; permission = "nickserv/saset/noexpire"; }
/*
* ns_set_misc
@@ -609,10 +531,17 @@ command { service = "NickServ"; name = "SENDPASS"; command = "nickserv/sendpass"
* Provides the command nickserv/set/misc.
*
* Allows you to create arbitrary commands to set data, and have that data show up in nickserv/info.
* A field named misc_description may be given for use with help output.
*/
module { name = "ns_set_misc" }
command { service = "NickServ"; name = "SET URL"; command = "nickserv/set/misc"; }
command { service = "NickServ"; name = "SET ICQ"; command = "nickserv/set/misc"; }
command { service = "NickServ"; name = "SET URL"; command = "nickserv/set/misc"; misc_description = _("Associate a URL with your account"); }
command { service = "NickServ"; name = "SASET URL"; command = "nickserv/saset/misc"; misc_description = _("Associate a URL with this account"); permission = "nickserv/saset/url"; group = "nickserv/admin"; }
#command { service = "NickServ"; name = "SET ICQ"; command = "nickserv/set/misc"; misc_description = _("Associate an ICQ account with your account"); }
#command { service = "NickServ"; name = "SASET ICQ"; command = "nickserv/saset/misc"; misc_description = _("Associate an ICQ account with this account"); permission = "nickserv/saset/icq"; group = "nickserv/admin"; }
#command { service = "NickServ"; name = "SET TWITTER"; command = "nickserv/set/misc"; misc_description = _("Associate a Twitter account with your account"); }
#command { service = "NickServ"; name = "SASET TWITTER"; command = "nickserv/saset/misc"; misc_description = _("Associate a Twitter account with this account"); permission = "nickserv/saset/twitter"; group = "nickserv/admin"; }
#command { service = "NickServ"; name = "SET FACEBOOK"; command = "nickserv/set/misc"; misc_description = _("Associate a Facebook URL with your account"); }
#command { service = "NickServ"; name = "SASET FACEBOOK"; command = "nickserv/saset/misc"; misc_description = _("Associate a Facebook URL with this account"); permission = "nickserv/saset/facebook"; group = "nickserv/admin"; }
/*
* ns_status
@@ -629,11 +558,22 @@ command { service = "NickServ"; name = "STATUS"; command = "nickserv/status"; }
*
* Provides the commands nickserv/suspend and nickserv/unsuspend.
*
* Used to suspend and unsuspend nicknames. Suspended nicknames can not be used but their settings are stored.
* Used to suspend and unsuspend nicknames. Suspended nicknames can not be used but their settings are preserved.
*/
module { name = "ns_suspend" }
command { service = "NickServ"; name = "SUSPEND"; command = "nickserv/suspend"; permission = "nickserv/suspend"; }
command { service = "NickServ"; name = "UNSUSPEND"; command = "nickserv/unsuspend"; permission = "nickserv/suspend"; }
module
{
name = "ns_suspend"
/*
* The length of time before a suspended nick becomes unsuspended.
*
* This directive is optional. If not set, the default is never.
*/
#suspendexpire = 90d
}
command { service = "NickServ"; name = "SUSPEND"; command = "nickserv/suspend"; permission = "nickserv/suspend"; group = "nickserv/admin"; }
command { service = "NickServ"; name = "UNSUSPEND"; command = "nickserv/unsuspend"; permission = "nickserv/suspend"; group = "nickserv/admin"; }
/*
* ns_update
@@ -645,3 +585,25 @@ command { service = "NickServ"; name = "UNSUSPEND"; command = "nickserv/unsuspen
module { name = "ns_update" }
command { service = "NickServ"; name = "UPDATE"; command = "nickserv/update"; }
/*
* Extra NickServ related modules.
*/
/*
* ns_maxemail
*
* Limits how many times the same email address may be used in Anope
* to register accounts.
*/
module
{
name = "ns_maxemail"
/*
* The limit to how many registered nicks can use the same e-mail address. If set to 0 or left
* commented, there will be no limit enforced when registering new accounts or using
* /msg NickServ SET EMAIL.
*/
#maxemails = 1
}
+238 -128
View File
@@ -9,7 +9,7 @@
service
{
/*
* The name of the OperServ client
* The name of the OperServ client.
*/
nick = "OperServ"
@@ -35,8 +35,8 @@ service
* These modes are very IRCd specific. If left commented, sane defaults
* are used based on what protocol module you have loaded.
*
* Note that setting this option incorrectly could potentially BREAK some if
* not all usefulness of the client. We will not support you if this client is
* Note that setting this option incorrectly could potentially BREAK some, if
* not all, usefulness of the client. We will not support you if this client is
* unable to do certain things if this option is enabled.
*/
#modes = "+o"
@@ -46,7 +46,7 @@ service
* of log channels this is not very useful, as the service will just idle in the
* specified channels, and will not accept any types of commands.
*
* Prefixes may be given to the channels in the form of mode character or prefix symbol.
* Prefixes may be given to the channels in the form of mode characters or prefix symbols.
*/
#channels = "@#services,#mychan"
}
@@ -56,25 +56,14 @@ service
*
* Provides essential functionality for OperServ.
*/
module { name = "operserv" }
/*
* Configuration for OperServ provided by os_main.
*/
operserv
module
{
name = "operserv"
/*
* The name of the client that should be OperServ.
*/
name = "OperServ"
/*
* If set, Services Admins will be able to use SUPERADMIN [ON|OFF] which will temporarily grant
* them extra privileges such as being a founder on ALL channels.
*
* This directive is optional.
*/
#superadmin = yes
client = "OperServ"
/*
* These define the default expiration times for, respectively, AKILLs, CHANKILLs, SNLINEs,
@@ -84,7 +73,6 @@ operserv
chankillexpiry = 30d
snlineexpiry = 30d
sqlineexpiry = 30d
szlineexpiry = 30d
/*
* If set, this option will make Services send an AKILL command immediately after it has been
@@ -99,9 +87,9 @@ operserv
* If set, this option will make Services send an (SVS)KILL command immediately after SNLINE ADD.
* This eliminates the need for killing the user after the SNLINE has been added.
*
*This directive is optional.
* This directive is optional.
*/
#killonsnline = yes
killonsnline = yes
/*
* If set, this option will make Services send an (SVS)KILL command immediately after SQLINE ADD.
@@ -109,80 +97,7 @@ operserv
*
* This directive is optional.
*/
#killonsqline = yes
/*
* Enables session limiting. Session limiting prevents users from connecting more than a certain
* number of times from the same host at the same time - thus preventing most types of cloning.
* Once a host reaches it's session limit, all clients attempting to connect from that host will
* be killed. Exceptions to the default session limit can be defined via the exception list. It
* should be noted that session limiting, along with a large exception list, can degrade Services'
* performance.
*
* See the online help for more information about session limiting.
*
* This directive is optional.
*/
limitsessions = yes
/*
* Default session limit per host. Once a host reaches it's session limit, all clients attempting
* to connect from that host will be killed. A value of zero means an unlimited session limit.
*
* This directive is optional.
* If not given and session limiting is enabled, it will default to no limit.
*/
defaultsessionlimit = 3
/*
* The maximum session limit that may be set for a host in an exception.
*
* This directive is only required if session limiting is enabled.
*/
maxsessionlimit = 100
/*
* Sets the default expiry time for session exceptions.
*
* This directive is only required if session limiting is enabled.
*/
exceptionexpiry = 1d
/*
* The message that will be NOTICE'd to a user just before they are removed from the network because
* their host's session limit has been exceeded. It may be used to give a slightly more descriptive
* reason for the impending kill as opposed to simply "Session limit exceeded".
*
* This directive is optional, if not set, nothing will be sent.
*/
sessionlimitexceeded = "The session limit for your host %s has been exceeded."
/*
* Same as above, but should be used to provide a website address where users can find out more
* about session limits and how to go about applying for an exception.
*
* Note: This directive has been intentionally commented out in an effort to remind you to change
* the URL it contains. It is recommended that you supply an address/URL where people can get help
* regarding session limits.
*
* This directive is optional, if not set, nothing will be sent.
*/
#sessionlimitdetailsloc = "Please visit http://your.website.url/ for more information about session limits."
/*
* If set and is not 0, this directive tells Services to add an AKILL the number of subsequent kills
* for the same host exceeds this value, preventing the network from experiencing KILL floods.
*
* This directive is optional.
*/
maxsessionkill = 15
/*
* Sets the expiry time for AKILLs set for hosts exceeding the maxsessionkill directive limit.
*
* This directive is optional, if not set, defaults to 30 minutes.
*/
sessionautokillexpiry = 30m
killonsqline = yes
/*
* Adds the nickname of the IRC Operator issuing an AKILL to the kill reason.
@@ -198,8 +113,7 @@ operserv
akillids = yes
/*
* If set, only IRC Operators will be permitted to use OperServ, regardless of module-based command
* access restrictions.
* If set, only IRC Operators will be permitted to use OperServ, regardless of command access restrictions.
*
* This directive is optional, but recommended.
*/
@@ -217,7 +131,7 @@ operserv
* Sane defaults are provided below that do not need to be edited unless you wish to change the default behavior.
*/
/* Give it a help command */
/* Give it a help command. */
command { service = "OperServ"; name = "HELP"; command = "generic/help"; }
/*
@@ -248,10 +162,10 @@ command { service = "OperServ"; name = "CHANKILL"; command = "operserv/chankill"
* Allows you to set services in defcon mode, which can be used to restrict services access
* during bot attacks.
*/
#module { name = "os_defcon" }
#command { service = "OperServ"; name = "DEFCON"; command = "operserv/defcon"; }
defcon
#module
{
name = "os_defcon"
/*
* Default DefCon level (1-5) to use when starting Services up. Level 5 constitutes normal operation
* while level 1 constitutes the most restrictive operation. If this setting is left out or set to
@@ -298,7 +212,7 @@ defcon
* the mode setting selected, Services will set the reverse on all channels, e.g. if this setting
* is +RN when DefCon is used, all channels will be set to +RN, when DefCon is removed, all
* channels will be set to -RN. You don't want to set this to +k for example, because when DefCon
* is removed all channels with -k.
* is removed, all channels are set -k, removing the key from previously keyed channels.
*
* Note 2: MLOCKed modes will not be lost.
*/
@@ -332,7 +246,7 @@ defcon
*
* This directive is required only when globalondefconmore is set.
*/
#message = "Put your message to send your users here. Dont forget to uncomment globalondefconmore"
#message = "Put your message to send your users here. Don't forget to uncomment globalondefconmore"
/*
* Defines the message that will be sent when DefCon is returned to level 5. This directive is optional,
@@ -344,19 +258,70 @@ defcon
* Defines the reason to use when clients are KILLed or AKILLed from the network while the proper
* DefCon operation is in effect.
*/
#akillreason = "This network is currently not accepting connections, please try again later"
#akillreason = "This network is currently not accepting connections, please try again later."
}
#command { service = "OperServ"; name = "DEFCON"; command = "operserv/defcon"; }
/*
* os_list
* os_dns
*
* Provides the commands operserv/chanlist and operserv/userlist.
* Provides the command operserv/dns.
*
* Used to list and search the channels and users currently on the network.
* This module requires that m_dns is loaded.
*
* This module allows controlling a DNS zone. This is useful for
* controlling what servers users are placed on for load balancing,
* and to automatically remove split servers.
*
* To use this module you must set a nameserver record for services
* so that DNS queries go to services.
*
* Alternatively, you may use a slave DNS server to hide service's IP,
* provide query caching, and provide better fault tolerance.
*
* To do this using BIND, configure similar to:
*
* options { max-refresh-time 60; };
* zone "irc.example.com" IN {
* type slave;
* masters { 127.0.0.1 port 5353; };
* };
*
* Where 127.0.0.1:5353 is the IP and port services are listening on.
* We recommend you externally firewall both UDP and TCP to the port
* Anope is listening on.
*
* Finally set a NS record for irc.example.com. to BIND or services.
*/
module { name = "os_list" }
command { service = "OperServ"; name = "CHANLIST"; command = "operserv/chanlist"; }
command { service = "OperServ"; name = "USERLIST"; command = "operserv/userlist"; }
#module
{
name = "os_dns"
/* TTL for records. This should be very low if your records change often. */
ttl = 1m
/* If a server drops this many users the server is automatically removed from the DNS zone.
* This directive is optional.
*/
user_drop_mark = 50
/* The time used for user_drop_mark. */
user_drop_time = 1m
/* When a server is removed from the zone for dropping users, it is readded after this time.
* This directive is optional.
*/
user_drop_readd_time = 5m
/* If set, when a server splits, it is automatically removed from the zone. */
remove_split_servers = yes
/* If set, when a server connects to the network, it will be automatically added to
* the zone if it is a known server.
*/
readd_connected_servers = no
}
#command { service = "OperServ"; name = "DNS"; command = "operserv/dns"; permission = "operserv/dns"; }
/*
* os_config
@@ -388,6 +353,16 @@ command { service = "OperServ"; name = "FORBID"; command = "operserv/forbid"; pe
module { name = "os_ignore" }
command { service = "OperServ"; name = "IGNORE"; command = "operserv/ignore"; permission = "operserv/ignore"; }
/*
* os_info
*
* Provides the command operserv/info.
*
* Used to add oper only notes to users and channels.
*/
module { name = "os_info" }
command { service = "OperServ"; name = "INFO"; command = "operserv/info"; permission = "operserv/info"; }
/*
* os_jupe
*
@@ -418,6 +393,17 @@ command { service = "OperServ"; name = "KICK"; command = "operserv/kick"; permis
module { name = "os_kill" }
command { service = "OperServ"; name = "KILL"; command = "operserv/kill"; permission = "operserv/kill"; }
/*
* os_list
*
* Provides the commands operserv/chanlist and operserv/userlist.
*
* Used to list and search the channels and users currently on the network.
*/
module { name = "os_list" }
command { service = "OperServ"; name = "CHANLIST"; command = "operserv/chanlist"; permission = "operserv/chanlist"; }
command { service = "OperServ"; name = "USERLIST"; command = "operserv/userlist"; permission = "operserv/userlist"; }
/*
* os_login
*
@@ -429,6 +415,24 @@ module { name = "os_login" }
command { service = "OperServ"; name = "LOGIN"; command = "operserv/login"; }
command { service = "OperServ"; name = "LOGOUT"; command = "operserv/logout"; }
/*
* os_logsearch
*
* Provides the command operserv/logsearch.
*
* Used to search services log files.
*/
module
{
name = "os_logsearch"
/* The log file name to search. There should be a log{} block configured to log
* to a file of this name.
*/
logname = "services.log"
}
command { service = "OperServ"; name = "LOGSEARCH"; command = "operserv/logsearch"; permission = "operserv/logsearch"; }
/*
* os_mode
*
@@ -437,8 +441,8 @@ command { service = "OperServ"; name = "LOGOUT"; command = "operserv/logout"; }
* Used to change user and channel modes.
*/
module { name = "os_mode" }
command { service = "OperServ"; name = "MODE"; command = "operserv/mode"; permission = "operserv/mode"; }
command { service = "OperServ"; name = "UMODE"; command = "operserv/umode"; permission = "operserv/umode"; }
command { service = "OperServ"; name = "MODE"; command = "operserv/mode"; permission = "operserv/mode"; }
/*
* os_modinfo
@@ -448,8 +452,8 @@ command { service = "OperServ"; name = "UMODE"; command = "operserv/umode"; perm
* Used to show information about loaded modules.
*/
module { name = "os_modinfo" }
command { service = "OperServ"; name = "MODINFO"; command = "operserv/modinfo"; }
command { service = "OperServ"; name = "MODLIST"; command = "operserv/modlist"; permission = "operserv/modlist"; }
command { service = "OperServ"; name = "MODINFO"; command = "operserv/modinfo"; permission = "operserv/modinfo"; }
command { service = "OperServ"; name = "MODLIST"; command = "operserv/modlist"; permission = "operserv/modinfo"; }
/*
* os_module
@@ -470,7 +474,25 @@ command { service = "OperServ"; name = "MODUNLOAD"; command = "operserv/modunloa
*
* Used to configure news notices shown to users when they connect, and opers when they oper.
*/
module { name = "os_news" }
module
{
name = "os_news"
/*
* The service bot names to use to send news to users on connection
* and to opers when they oper.
*/
announcer = "Global"
oper_announcer = "OperServ"
/*
* The number of LOGON/OPER news items to display when a user logs on.
*
* This directive is optional, if no set it will default to 3.
*/
#newscount = 3
}
command { service = "OperServ"; name = "LOGONNEWS"; command = "operserv/logonnews"; permission = "operserv/news"; }
command { service = "OperServ"; name = "OPERNEWS"; command = "operserv/opernews"; permission = "operserv/news"; }
command { service = "OperServ"; name = "RANDOMNEWS"; command = "operserv/randomnews"; permission = "operserv/news"; }
@@ -498,7 +520,7 @@ command { service = "OperServ"; name = "OLINE"; command = "operserv/oline"; perm
/*
* os_oper
*
*
* Provides the command operserv/oper.
*
* Used to configure opers and show information about opertypes.
@@ -509,7 +531,7 @@ command { service = "OperServ"; name = "OPER"; command = "operserv/oper"; permis
/*
* os_reload
*
* Provides the command operserv/relad.
* Provides the command operserv/reload.
*
* Used to reload the services.conf configuration file.
*/
@@ -521,9 +543,84 @@ command { service = "OperServ"; name = "RELOAD"; command = "operserv/reload"; pe
*
* Provides the commands operserv/exception and operserv/session.
*
* This module enables session limiting. Session limiting prevents users from connecting more than a certain
* number of times from the same IP at the same time - thus preventing most types of cloning.
* Once a host reaches it's session limit, all clients attempting to connect from that host will
* be killed. Exceptions to the default session limit can be defined via the exception list.
*
* Used to manage the session limit exception list, and view currently active sessions.
*/
module { name = "os_session" }
module
{
name = "os_session"
/*
* Default session limit per host. Once a host reaches it's session limit, all clients attempting
* to connect from that host will be killed.
*
* This directive is require if os_session is loaded.
*/
defaultsessionlimit = 3
/*
* The maximum session limit that may be set for a host in an exception.
*
* This directive is require if os_session is loaded.
*/
maxsessionlimit = 100
/*
* Sets the default expiry time for session exceptions.
*
* This directive is require if os_session is loaded.
*/
exceptionexpiry = 1d
/*
* The message that will be NOTICE'd to a user just before they are removed from the network because
* their host's session limit has been exceeded. It may be used to give a slightly more descriptive
* reason for the impending kill as opposed to simply "Session limit exceeded".
*
* This directive is optional, if not set, nothing will be sent.
*/
sessionlimitexceeded = "The session limit for your IP %IP% has been exceeded."
/*
* Same as above, but should be used to provide a website address where users can find out more
* about session limits and how to go about applying for an exception.
*
* Note: This directive has been intentionally commented out in an effort to remind you to change
* the URL it contains. It is recommended that you supply an address/URL where people can get help
* regarding session limits.
*
* This directive is optional, if not set, nothing will be sent.
*/
#sessionlimitdetailsloc = "Please visit http://your.website.url/ for more information about session limits."
/*
* If set and is not 0, this directive tells Services to add an AKILL if the number of subsequent kills
* for the same host exceeds this value, preventing the network from experiencing KILL floods.
*
* This directive is optional.
*/
maxsessionkill = 15
/*
* Sets the expiry time for AKILLs set for hosts exceeding the maxsessionkill directive limit.
*
* This directive is optional, if not set, defaults to 30 minutes.
*/
sessionautokillexpiry = 30m
/*
* Sets the CIDR value used to determine which IP addresses represent the same person.
* By default this would limit 3 connections per IPv4 IP and 3 connections per IPv6 IP.
* If you are receiving IPv6 clone attacks it may be useful to set session_ipv6_cidr to
* 64 or 48.
*/
session_ipv4_cidr = 32
session_ipv6_cidr = 128
}
command { service = "OperServ"; name = "EXCEPTION"; command = "operserv/exception"; permission = "operserv/exception"; }
command { service = "OperServ"; name = "SESSION"; command = "operserv/session"; permission = "operserv/session"; }
@@ -534,7 +631,19 @@ command { service = "OperServ"; name = "SESSION"; command = "operserv/session";
*
* Used to set various settings such as superadmin, debug mode, etc.
*/
module { name = "os_set" }
module
{
name = "os_set"
/*
* If set, Services Admins will be able to use SUPERADMIN [ON|OFF] which will temporarily grant
* them extra privileges such as being a founder on ALL channels.
*
* This directive is optional.
*/
#superadmin = yes
}
command { service = "OperServ"; name = "SET"; command = "operserv/set"; permission = "operserv/set"; }
/*
@@ -560,21 +669,23 @@ module { name = "os_stats" }
command { service = "OperServ"; name = "STATS"; command = "operserv/stats"; permission = "operserv/stats"; }
/*
* os_svsnick
*
* Provides the operserv/svsnick command.
* os_svs
*
* Used to force change user's nicks.
* Provides the commands operserv/svsnick, operserv/svsjoin, and operserv/svspart.
*
* Used to force users to change nicks, join and part channels.
*/
module { name = "os_svsnick" }
command { service = "OperServ"; name = "SVSNICK"; command = "operserv/svsnick"; permission = "operserv/svsnick"; }
module { name = "os_svs" }
command { service = "OperServ"; name = "SVSNICK"; command = "operserv/svsnick"; permission = "operserv/svs"; }
command { service = "OperServ"; name = "SVSJOIN"; command = "operserv/svsjoin"; permission = "operserv/svs"; }
command { service = "OperServ"; name = "SVSPART"; command = "operserv/svspart"; permission = "operserv/svs"; }
/*
* os_sxline
*
* Provides the operserv/snline and operserv/sqline commands.
*
* Used to ban different things such as realnames, nicknames, and IPs.
* Used to ban real names, nick names, and possibly channels.
*/
module { name = "os_sxline" }
command { service = "OperServ"; name = "SNLINE"; command = "operserv/snline"; permission = "operserv/snline"; }
@@ -583,10 +694,9 @@ command { service = "OperServ"; name = "SQLINE"; command = "operserv/sqline"; pe
/*
* os_update
*
* Provides the opersev/update command.
* Provides the operserv/update command.
*
* Use to immediately update the databases.
*/
module { name = "os_update" }
command { service = "OperServ"; name = "UPDATE"; command = "operserv/update"; permission = "operserv/update"; }
+749
View File
@@ -1,3 +1,752 @@
Revision e3e0da3 - Sat, 12 Oct 2013 15:11:09 -0400 - Update language files
Revision 7167cff - Sat, 12 Oct 2013 15:05:42 -0400 - Update changes and changes.conf sort of
Revision b844154 - Thu, 10 Oct 2013 18:12:48 +0200 - fixed a typo in the last commit, reported by Robby
Revision 5e56dfd - Thu, 10 Oct 2013 07:51:35 +0200 - replaced the country name in the Language header in the language files by four letter codes
Revision e1d460e - Wed, 9 Oct 2013 16:27:16 -0400 - Call OnBotPrivmsg after checking if the message is a ctcp, not before. fix typo in opersrev.example.conf
Revision 9ea6fb2 - Wed, 9 Oct 2013 22:10:08 +0200 - set the Language header in the language files so msgfmt doesnt complain
Revision 7755668 - Sun, 6 Oct 2013 22:07:01 +0200 - updated docs/EVENTS
Revision 569efbb - Sat, 5 Oct 2013 13:29:34 -0400 - Fix Windows build
Revision 6968014 - Sat, 5 Oct 2013 13:22:56 -0400 - anope.nl_NL.po: Translate newly added string, and fix some spelling/grammar.
Revision 1b08ba8 - Sat, 5 Oct 2013 13:21:28 -0400 - Always show expire time for nicks in /ns info to opers, even if the user is online Make Anope::strftime show "now" if the time is now Fix typo in nickalias.cpp for the type of the last_seen field, spotted by grawity
Revision 277f735 - Sat, 5 Oct 2013 01:07:51 -0400 - Hide expires in /cs info if the channel is actively in use as it confuses people
Revision f63a2bd - Sat, 5 Oct 2013 00:49:12 -0400 - Big update of the Dutch language file. cs_ban: Merge the syntaxes into one.
Revision feb412b - Sat, 5 Oct 2013 00:33:03 -0400 - cs_mode: Fix override in /cs mode set.
Revision ab85668 - Sat, 5 Oct 2013 00:33:03 -0400 - os_news: Add some logging.
Revision 97d7c21 - Sat, 5 Oct 2013 00:33:03 -0400 - Fix logging for log type 'other'. os_ignore: Log expired ignores to the normal log level. cs_drop: Allow Services Operators to actually drop channels in Read-Only mode. os_akill, os_sxline, cs_akick: Log deletions by number.
Revision e5b8435 - Sat, 5 Oct 2013 00:33:03 -0400 - Fix not setting -r when channels are deleted
Revision e589080 - Sat, 5 Oct 2013 00:33:03 -0400 - Fix /ns alist showing a header/column header if the user has no access
Revision 257b10e - Sat, 5 Oct 2013 00:33:03 -0400 - Hide privileged commands in ns help set and cs help set if configured
Revision 353ee5c - Sat, 5 Oct 2013 00:33:03 -0400 - Fix xline uid generation when the one chosen already exists
Revision b094132 - Sat, 5 Oct 2013 00:33:03 -0400 - Log akill deleteions by number
Revision 82006b8 - Sat, 5 Oct 2013 00:33:03 -0400 - cs_entrymsg: Check for the correct override privilege. Make some more commands check if Read-Only mode is active. cs_flags: Show a meaningful message when a user is not found on the access list. os_set: Add missing capabilities to the readonly help output. OperServ: Add logging to certain commands. NickServ: Undo logging for listings.
Revision ba5a3f5 - Sat, 5 Oct 2013 00:33:02 -0400 - Don't explicitly reference services nicks. os_forbid: If NickServ is available, have it send the forbid reason instead of OperServ.
Revision 7b6c08b - Sun, 29 Sep 2013 17:22:25 -0400 - Exempt ulines/myself from bounce mode check
Revision 47b692f - Sun, 29 Sep 2013 15:42:22 -0400 - os_session: Add some empty lines to the session help command to improve readability.
Revision ed06609 - Sun, 29 Sep 2013 15:42:22 -0400 - NickServ: Change a few log wordings and add missing log calls to some commands. ns_suspend and cs_suspend: Fix log wording, and correct syntax to show the reason is optional.
Revision 32a5715 - Sun, 29 Sep 2013 15:42:22 -0400 - ns_access: Allow LIST by Services Operators on suspended nicks. Change wording. ns_ajoin: Fix the number of command parameters. Check for nick suspension. Do not allow just any Services Operator to access other users' AJOIN, require nickserv/ajoin. Change wording. ns_cert: Add ability for Services Operators to modify other users' certificate lists.
Revision 2a5e8f1 - Sun, 29 Sep 2013 15:42:22 -0400 - cs_akick: Make the default autokick reason translatable. os_forbid: It is required to specify a reason.
Revision a04c320 - Sun, 29 Sep 2013 15:42:22 -0400 - cs_set: Fix showing expiry time in INFO output. cs_sync: Check for the correct override privilege.
Revision 4221a50 - Sun, 29 Sep 2013 15:42:22 -0400 - Fix NickServ default nick expiry time.
Revision 44dd8d0 - Sun, 29 Sep 2013 15:41:32 -0400 - Add chanserv:always_lower_ts config option to always lower registered channels timestamps to the creation time which fixes some race conditions regarding users joining empty registered channels and doing things prior to the -o from services coming through.
Revision f7aa69b - Sun, 29 Sep 2013 13:04:12 -0400 - Correct expiretmeout and updatetimeout descriptions in example.conf, it is no longer triggerd by /os update
Revision d5ecc39 - Sun, 29 Sep 2013 04:23:33 +0200 - display modechars instead of modenames in cpanel channelmodes
Revision 84a02d2 - Fri, 27 Sep 2013 20:11:51 -0400 - Remove "Nick" reference from the /os ignore del message, as it can only contain hostmasks
Revision 4b059be - Fri, 27 Sep 2013 20:07:07 -0400 - Replace this silly random code generation code with something more sane looking
Revision b319fb0 - Fri, 27 Sep 2013 19:11:02 -0400 - Fix compile warnings and errors found by clang
Revision 1719688 - Fri, 27 Sep 2013 19:11:02 -0400 - Allow modifying mlock on nonexistant (but registered) channels
Revision 02d67f6 - Fri, 27 Sep 2013 19:11:02 -0400 - Allow /os forbid list <type>
Revision b306108 - Fri, 27 Sep 2013 19:11:02 -0400 - Fix /os ignore del on nicks
Revision 12a0311 - Fri, 27 Sep 2013 19:11:02 -0400 - Add missing columns to os_forbid. Make most lists with dates use the shorter output format.
Revision cf653fc - Fri, 27 Sep 2013 19:11:02 -0400 - Fix ms del all not actually deleting some memos Fix numbering of memos in ms list
Revision 5cc7fc0 - Fri, 27 Sep 2013 19:11:02 -0400 - Fix ms list crash
Revision 832bc35 - Fri, 27 Sep 2013 19:11:02 -0400 - Fix a few more modules to look in the right places for certain settings.
Revision 06c5914 - Fri, 27 Sep 2013 19:11:02 -0400 - Fix akillids to work again. os_session: Add missing num to del syntax and add missing expiry column.
Revision bf67b9e - Fri, 27 Sep 2013 19:11:02 -0400 - Make column titles in listings translatable.
Revision 829c169 - Fri, 27 Sep 2013 19:11:02 -0400 - Translate strftime correctly
Revision 4948120 - Fri, 27 Sep 2013 19:11:02 -0400 - Translate SendSyntax() and spacify it properly
Revision 994471f - Fri, 27 Sep 2013 19:11:02 -0400 - Align info formatters with translated keys?
Revision 80c0274 - Fri, 27 Sep 2013 19:11:02 -0400 - Translate listformatter properly
Revision df3c0b7 - Fri, 27 Sep 2013 19:11:02 -0400 - Fix various commands to properly report a given expiry time is invalid
Revision 4570299 - Fri, 27 Sep 2013 19:11:02 -0400 - ns_cert, ns_set: Make strings equal for one translation instance
Revision 9756f96 - Fri, 27 Sep 2013 19:11:02 -0400 - example.conf: nickserv:emailregistration -> nickserv:registration
Revision 6ac0364 - Fri, 27 Sep 2013 19:11:02 -0400 - Fix os_stats to display SQLINEs and SNLINEs on non-supporting IRCds
Revision 4f820a7 - Fri, 27 Sep 2013 19:11:02 -0400 - Fix typos, remove dead language defines. os_set: Add missing debug text in help output.
Revision 5f7127d - Fri, 27 Sep 2013 19:11:01 -0400 - Don't send regex qlines and nlines to the IRCd
Revision dcb3ff7 - Fri, 27 Sep 2013 19:10:49 -0400 - Dont send BURST twice on inspircd Drop matching nicks on forbid.
Revision 1107b92 - Fri, 27 Sep 2013 18:02:26 -0400 - Drop matching channels on forbid, and enforce nick forbids even on IRCds with no qlines
Revision 3b0b1bc - Fri, 27 Sep 2013 18:02:26 -0400 - Don't send SQLines unless the IRCd supports it
Revision b60b23f - Fri, 27 Sep 2013 17:21:46 -0400 - Only allow using os_oper add and del if you have the privileges for what you are giving or taking.
Revision 5aac637 - Fri, 27 Sep 2013 17:21:31 -0400 - Correctly detect override in cs_ban on masks
Revision 20856fb - Fri, 27 Sep 2013 17:21:20 -0400 - Remove +r etc when channels are deleted
Revision 7545763 - Fri, 27 Sep 2013 17:21:20 -0400 - Added missing override capabilities and log calls to some ChanServ commands
Revision 1818b19 - Fri, 27 Sep 2013 16:33:56 -0400 - Fix cs_mode lock reply if nothing is done Fix not clearing forbids when os_forbid is unloaded Apply nick and chan forbids when added Fix loading forbids until after the service is constructed
Revision abc7e4b - Fri, 27 Sep 2013 16:33:03 -0400 - Fix os_news to not load items until the news service is constructed Fix session exceptions not expirigin
Revision e5ece18 - Fri, 20 Sep 2013 21:09:35 -0400 - Readonlyize many commands
Revision 8641b99 - Fri, 20 Sep 2013 15:21:32 -0400 - Merge the two memo del events into one. Since they had the same name it was confusing the event system
Revision b880240 - Thu, 19 Sep 2013 13:35:52 -0400 - Make os_session akill ip ranges and not individual user's ips
Revision 5ce90ba - Thu, 19 Sep 2013 12:38:28 -0400 - Fix not updating last_seen on expire nick for nicks with secure off. Don't show Expires in /ns info if the nick is online currently as it confuses people
Revision 98bae82 - Mon, 16 Sep 2013 15:54:09 -0400 - Require confirmation in /cs drop by requesting the channel name twice
Revision e3c05ef - Mon, 16 Sep 2013 06:47:42 -0400 - Remove static variables from functions in modules which causes them to be marked as gnu unique objects, which breaks dlclose()/dlopen() on g++ 4.5+
Revision 8cbaf7e - Thu, 12 Sep 2013 07:20:26 -0400 - Update Spanish translation, from Isaac Fontal <i_fontal@hotmail.com>
Revision 339f41a - Sun, 8 Sep 2013 21:53:06 -0400 - Fix allowing duplicate entries on the snline list Have proto mods recognize cidr ranges as zlineable IPs Remove operserv/global from global.conf because its dumb Fix example config ~botserv/set example to work as expected
Revision 55e4ef9 - Sun, 8 Sep 2013 06:02:35 -0400 - Fix logging /os set list. Enforce snlines on ircds that can't have snlines set by just killing the user. Fix double call to OnMatch() when a user matches an xline
Revision f63e4ce - Sun, 8 Sep 2013 04:55:03 -0400 - Alpabetize channels in /ns alist and on webcpanels chanserv page
Revision b005089 - Tue, 3 Sep 2013 19:58:40 -0400 - Dont allow multiple list modes with the same param on the mode list at once
Revision 1b42e26 - Tue, 3 Sep 2013 19:40:03 -0400 - Cap mode stacker max line length
Revision 4691351 - Tue, 3 Sep 2013 18:51:18 -0400 - Cleanup previous commit Fix log messages from commands send through webpanel Don't show OperServ section to non opers
Revision 404debf - Tue, 3 Sep 2013 04:37:09 +0200 - updated the chanserv section in webcpanel
Revision 752a5ca - Sat, 31 Aug 2013 08:46:56 +0200 - add vhost support for hybrid
Revision e1a1cf0 - Thu, 29 Aug 2013 23:22:48 -0400 - Dont crash on HasPriv() on an empty access group
Revision 3fabc2f - Thu, 29 Aug 2013 23:13:29 -0400 - Fix ns_ajoin on unregisterd +i channels
Revision 59ea36c - Tue, 27 Aug 2013 03:18:43 -0400 - Move Serialize::Types to construct after the corresponding extensible items they require when unserializing
Revision fac8806 - Tue, 27 Aug 2013 02:56:54 -0400 - Make chanserv:require not default to r
Revision 7f890ce - Mon, 26 Aug 2013 02:05:41 -0400 - Log parameters given to /cs mode set. Add logging to /os ignore.
Revision 50e1a3e - Mon, 26 Aug 2013 02:00:25 -0400 - Fix status mlocks. Fix reply from lock add.
Revision 6b79349 - Sun, 25 Aug 2013 23:26:45 -0400 - Fix User::IsIdentified with check_nick, do not remove +r on bursting clients until after server sync
Revision 678f549 - Sun, 25 Aug 2013 22:57:26 -0400 - Fix not resetting channel status modes on our clients when a channel ts lowers
Revision 714a4a3 - Sun, 25 Aug 2013 21:33:52 -0400 - Remove unnecesary mlock code in cs_mode, change mode set events to never bounce modes set by bots or servers, as it was possible to get modules to fight with each other
Revision 34826f7 - Sun, 25 Aug 2013 01:49:42 -0700 - Merge pull request #22 from fgsch/misc
Revision 847ccea - Sun, 25 Aug 2013 04:48:43 -0400 - Create persistent channels on startup, which used to work and got lost somewhere Fix some oddities with using persistent channels with no botserv Send list modes to uplink when bursting Fix issues with persist + keepmodes Fix /os modes clear all not clearing all status modes Fix operwall on ratbox/plexus Dont apply mlock in SetCorrectModes since that just recursively calls itself unncessarially Change command logging to show the command name and not the service name
Revision 09046e3 - Sun, 25 Aug 2013 04:48:43 -0400 - Show what kind of nick protection is enabled in /ns info
Revision 00a1952 - Sun, 25 Aug 2013 04:48:43 -0400 - Add logging to several operserv commands
Revision 446b3a9 - Sun, 25 Aug 2013 04:48:43 -0400 - Save unconfirmed status and passcodes in the database. Fix db_sql_live to not reinsert all records if there are extra columns. Plexus has no chmode +r
Revision 76f5d4b - Sun, 25 Aug 2013 04:54:35 +0100 - Sort parameters and correct comments
Revision 9b59925 - Sun, 25 Aug 2013 04:54:32 +0100 - For ngIRCd, on nick change set mode -R
Revision 243d781 - Sat, 24 Aug 2013 17:56:46 +0100 - Add login support for ngIRCd
Revision 8be5f53 - Fri, 23 Aug 2013 09:59:28 -0700 - Merge pull request #21 from Phr33d0m/1.9
Revision cd49bb4 - Fri, 23 Aug 2013 11:57:32 +0200 - Use CDN for the rest of the .js files
Revision ef3d115 - Fri, 23 Aug 2013 04:42:24 -0400 - Merge branch '1.9' of github.com:anope/anope into 1.9
Revision 9f1178e - Fri, 23 Aug 2013 04:36:02 -0400 - Remove SSL cert verification because we dont use it
Revision 3bc2db5 - Fri, 23 Aug 2013 04:13:08 -0400 - Fix reading post data in m_httpd
Revision fad603e - Fri, 23 Aug 2013 00:03:58 -0700 - Merge pull request #20 from Phr33d0m/1.9
Revision 5f006bf - Fri, 23 Aug 2013 08:42:45 +0200 - Fixed an incorrect layout, a couple of typos and a wrong form action
Revision aaa12cc - Fri, 23 Aug 2013 08:11:24 +0200 - Use a local copy of the background image
Revision 2238db8 - Fri, 23 Aug 2013 08:06:47 +0200 - Make the navbar brand a different font to distinguish it from the rest of the navbar links.
Revision 4d1492d - Fri, 23 Aug 2013 01:14:00 -0400 - Remove webpanel:ssl configuration option because its dumb
Revision 5c4414e - Fri, 23 Aug 2013 07:05:57 +0200 - Removed innecessary logo width, the img-responsive will take care of that.
Revision 6f9b77e - Fri, 23 Aug 2013 07:04:09 +0200 - Don't use an external svg logo anymore, but a local png one.
Revision 154fa25 - Fri, 23 Aug 2013 00:57:36 -0400 - Fix m_httpd handling fragmented http requests
Revision 9793062 - Fri, 23 Aug 2013 06:43:57 +0200 - Merge branch '1.9' of github.com:anope/anope into 1.9
Revision f86dc24 - Fri, 23 Aug 2013 06:39:23 +0200 - Redesign body of the pages. Now they have a distiguished panel heading and panel body. Also added background colour to currently selected section.
Revision 2b1f75a - Thu, 22 Aug 2013 22:45:20 -0400 - Fix m_httpd enabling ssl if m_ssl is loaded after it
Revision 5ac0c9a - Thu, 22 Aug 2013 17:33:16 -0400 - Fix previous commit
Revision e8763d5 - Thu, 22 Aug 2013 01:48:17 -0400 - Always set +o on users who have access for it, even if higher modes have a prefix
Revision ce7a32a - Thu, 22 Aug 2013 01:13:28 -0400 - Do not have cs_access try to represent non levels access entries as levels access entries. Sometimes it cant accurately be done and it confuses people.
Revision 0c1cc08 - Wed, 21 Aug 2013 23:22:27 -0400 - Update readme more
Revision e12e4e6 - Wed, 21 Aug 2013 23:20:05 -0400 - Update readme
Revision 52535cf - Wed, 21 Aug 2013 20:17:20 -0700 - Merge pull request #19 from Phr33d0m/1.9
Revision 121d0a6 - Thu, 22 Aug 2013 03:27:29 +0200 - Fix a typo and remove unnecessary 'effects'
Revision 3453581 - Thu, 22 Aug 2013 02:37:43 +0200 - A completely rewritten Control Panel using some bootstrapping, jquery and lots of CSS
Revision 8bcc684 - Thu, 22 Aug 2013 02:36:01 +0200 - Nuking the old design with fire
Revision 08d1133 - Thu, 22 Aug 2013 02:32:04 +0200 - Fix incorrect GET method as we are submitting POST data
Revision 7659430 - Wed, 21 Aug 2013 01:35:57 -0400 - Always require the registered channel mode is set. Comment out default config requiring "r" as some ircds use it for registered users only
Revision 17cca42 - Wed, 21 Aug 2013 01:27:14 -0400 - Make maxaliases=0 really mean no limit
Revision 760fdc4 - Sun, 18 Aug 2013 14:42:59 -0400 - Fix not setting vhost on nickserv update
Revision ead4aa7 - Sat, 17 Aug 2013 14:05:01 -0400 - Fix 318 raw being sent for uids on ts6 ircds
Revision 65911dd - Wed, 14 Aug 2013 19:50:08 -0400 - Replace some get calls on <bool> extenisble types with hasext
Revision 4abfdcb - Wed, 14 Aug 2013 18:24:04 -0400 - Do not default mlock +r, it is unnecessray and only clutters up the mlock list
Revision de5c8c0 - Mon, 12 Aug 2013 15:45:50 -0400 - Fix some issues with suspend
Revision 8e011bb - Mon, 12 Aug 2013 15:44:28 -0400 - Respond to remote whois on inspircd for users on us that aren't service bots
Revision f15a974 - Mon, 12 Aug 2013 14:36:49 -0400 - Use less strict valid ident checks on hybrid, unreal, and inspircd
Revision f1956b0 - Sun, 11 Aug 2013 17:14:39 -0400 - Remove channels from accesss lists when they expire/drop
Revision 53d5b7c - Sun, 11 Aug 2013 16:04:10 -0400 - Fix chanserv opersonly setting
Revision 812cb04 - Sun, 11 Aug 2013 15:48:46 -0400 - Add DNS Notify support
Revision 1314d5b - Sun, 11 Aug 2013 15:38:09 -0400 - Fix cs_kee_pmodes default
Revision 490601d - Sun, 11 Aug 2013 12:25:58 -0400 - Fix chghost on charybdis
Revision c7aab50 - Sat, 10 Aug 2013 23:28:58 -0400 - Support DNS ANY query type
Revision c507c78 - Sat, 10 Aug 2013 17:59:31 -0400 - Do not have ratbox or plexus pull modes from hybrid, it is entirely too confusing. Also fix cs_mode config
Revision 58c0568 - Sat, 10 Aug 2013 17:43:13 -0400 - Add "simple seen" mode to cs_seen
Revision f8cdcc6 - Sat, 10 Aug 2013 14:26:27 -0700 - Merge pull request #18 from fgsch/1.9
Revision 10a918f - Sat, 10 Aug 2013 12:33:27 -0400 - Default some listmax config settings to 50
Revision e4d1769 - Sat, 10 Aug 2013 12:29:12 -0400 - Add os_info
Revision 7cd80a2 - Thu, 8 Aug 2013 03:03:57 +0000 - Fix logging LOG_NORMAL logs in m_sqllog. Fix/add more compat extensible items to ChannelInfo::Unserialize
Revision 9d6f88d - Wed, 7 Aug 2013 23:44:58 +0100 - Add certificate fingerprint support for ngIRCd
Revision b93d650 - Wed, 7 Aug 2013 21:19:49 +0000 - Revert "Shrink to fit module event vectors when modules are removed from them" Sometimes the events call the function the event is in, which causes a resize while the original function is iterating.
Revision c480695 - Wed, 7 Aug 2013 19:40:05 +0000 - Fix db_sql to not remove objects when shutting down, as some modules that unload before it when shutting down remove their items then
Revision 7f1b555 - Wed, 7 Aug 2013 17:27:18 +0000 - Shrink to fit module event vectors when modules are removed from them
Revision 4865a8c - Wed, 7 Aug 2013 16:44:35 +0000 - Add m_sql_log
Revision 1efd289 - Wed, 7 Aug 2013 15:03:11 +0000 - Fix inspircd jupe mess again, it wasn't working when juping servers that didn't already exist
Revision 83e4b18 - Thu, 1 Aug 2013 14:07:56 +0000 - Add keepmodes setting
Revision 1e625b6 - Thu, 1 Aug 2013 13:39:35 +0000 - Use MessageSource as the source for many IRCDProto funcs Keep track of what user modes are oper only/server only/etc
Revision 402c624 - Mon, 29 Jul 2013 12:02:40 +0000 - Move chanstats stuff to stats/
Revision fde83f6 - Fri, 26 Jul 2013 21:40:16 -0400 - Rethink jupe/squit thing somewhat. Workaround for the inspircd rsquit/squit mess
Revision f0f43cf - Fri, 26 Jul 2013 12:57:36 -0400 - Fix build on late versions of cmake 2.4
Revision 3dc64ba - Fri, 26 Jul 2013 08:45:44 -0400 - Fix issues with 'Me' related to previous commit
Revision 2450a64 - Fri, 26 Jul 2013 07:38:42 -0400 - Interally quit servers when juped
Revision b48293a - Tue, 23 Jul 2013 10:04:44 -0700 - Merge pull request #17 from fgsch/1.9
Revision e908dc0 - Tue, 23 Jul 2013 18:03:32 +0100 - Make ChannelModeStatus level mandatory
Revision 378c920 - Mon, 22 Jul 2013 23:45:08 -0400 - Squashed commit of the following from Federico G. Schwindt <fgsch@lodoss.net>: Date: Mon Jul 22 22:40:07 2013 +0100
Revision 779f378 - Sun, 21 Jul 2013 18:29:35 -0400 - More validation stuff from fgs
Revision 604da89 - Sun, 21 Jul 2013 03:59:59 -0400 - More basic config validation, and fix crash when no uplinks are configured. spotted by fgs
Revision e11abdc - Sun, 21 Jul 2013 00:37:21 -0400 - Fix m_ldap service names from defaulting ldap/ldap/main
Revision 5aac04d - Sun, 21 Jul 2013 00:23:24 -0400 - Move SendLogin() back to User::Identify, it was moved at some point? but doesn't as intended in ::Login
Revision 7480fbd - Sat, 20 Jul 2013 23:36:20 -0400 - Fix removing old connections in m_ldap and m_mysql
Revision 9629ccb - Sat, 20 Jul 2013 19:46:13 -0400 - Fix more compile warnings found on newer g++ versions
Revision cb70d97 - Sat, 20 Jul 2013 09:19:52 -0400 - Change cs_xop access check to use command order
Revision 6db0186 - Sat, 20 Jul 2013 03:06:20 -0400 - Fix not setting the correct compile flags on modules and fix the resulting warnings
Revision 492eac2 - Sat, 20 Jul 2013 03:06:20 -0400 - Fix restoring topics on uplink sync
Revision c8511a6 - Sat, 20 Jul 2013 03:06:20 -0400 - Fix unserializaing seeninfos
Revision f6b915a - Fri, 19 Jul 2013 22:28:33 +0200 - added whois support to the ngircd protocol module, thanks to fgs for sending the patch
Revision 02c1724 - Fri, 19 Jul 2013 22:11:40 +0200 - some updates to the german langfile, thanks to kaylee for translating
Revision 7e87bb6 - Mon, 15 Jul 2013 23:59:19 -0400 - Default xlines to be set by me
Revision aae522d - Mon, 15 Jul 2013 23:23:54 -0400 - Fix ModeManager::GetStatusChar
Revision 0a82164 - Sun, 14 Jul 2013 20:37:42 -0400 - Fix deleting seeninfos
Revision 37733de - Sun, 14 Jul 2013 03:16:23 -0400 - Fix Extensible<bool>::Set with a value (which is redundant due to the bool specailization)
Revision eabb9c0 - Mon, 8 Jul 2013 20:35:04 -0400 - Fix deleting badwords/modes/logs etc
Revision b103d16 - Mon, 8 Jul 2013 15:48:37 -0400 - Fix loading some older compat flags and showing noexpire on /ns info
Revision e3b6ae3 - Mon, 8 Jul 2013 07:42:35 +0200 - added missing NOTICE support to hybrid. sorry
Revision 0ff48e1 - Sun, 7 Jul 2013 23:13:29 -0400 - Move op/deop/etc back to an actual command, its too hard to use cs_log with it as rewrites. Allow cs_log to work with either command names or service names.
Revision 53038d8 - Sun, 7 Jul 2013 23:13:16 -0400 - Wipe services's module dir prior to make install
Revision 2ea594d - Mon, 8 Jul 2013 05:05:13 +0200 - added protocol support for incoming NOTICEs
Revision e957c7b - Mon, 8 Jul 2013 05:04:04 +0200 - m_dnsbl: updated the url to DroneBL in modules.example.conf
Revision 9a4f27e - Fri, 5 Jul 2013 02:19:06 -0400 - Only set stuff in ExtensibleUnserialize if there is something to set
Revision fccc4a4 - Fri, 5 Jul 2013 02:09:43 -0400 - Fix sometimes not unloading all modules on shutdown
Revision 4325073 - Fri, 5 Jul 2013 02:09:27 -0400 - Fix ns_set_misc and cs_set_misc
Revision 55199f0 - Thu, 4 Jul 2013 23:05:30 -0400 - Read most of the old common flags for compat
Revision 7edc76f - Thu, 4 Jul 2013 23:05:30 -0400 - Fix deleting mode locks
Revision 3fbdde5 - Thu, 4 Jul 2013 20:04:51 -0400 - Fix Extensible dtor
Revision 9f8b4ac - Thu, 4 Jul 2013 01:21:14 -0400 - Allow access and flags to take privilege names
Revision 998925c - Thu, 4 Jul 2013 01:19:40 -0400 - Fix rehashing via SIGHUP and m_mysql
Revision 7f97104 - Wed, 3 Jul 2013 22:45:00 -0400 - Allow channels on access lists
Revision c2e1a8a - Wed, 3 Jul 2013 19:44:13 -0400 - Fix some warnings and errors reported by valgrind
Revision c62b3cb - Tue, 2 Jul 2013 01:56:13 -0400 - Fix a few issues found by Attila (invalid array access in channel set events, os_chankill inf loop)
Revision 1a3d9a0 - Mon, 1 Jul 2013 22:17:52 -0400 - Change extensible keys to require explicitly having a type defined for it. Completely modularize more features like bs_kick, entrymsg, log, mode, etc. Move fantasy to its own module. Move greet to its own module.
Revision 518182a - Sun, 30 Jun 2013 05:28:01 +0200 - m_mysql: handle multiple result sets returned from multiple statements or procedure calls
Revision 7d0e063 - Sat, 22 Jun 2013 17:06:48 +0200 - added the missing accessmax option to the ns_cert configuration block
Revision 5e36d84 - Sat, 22 Jun 2013 13:41:05 +0200 - pseudoclients now trigger OnJoinChannel and OnPartChannel
Revision fee461f - Sat, 22 Jun 2013 13:40:19 +0200 - added support for CertFP on hybrid
Revision 1773eef - Wed, 19 Jun 2013 20:53:40 -0400 - Don't enforce usestrictprivmsg on TS6 IRCds and cache the value of usestrictprivmsg
Revision 7704ee7 - Wed, 19 Jun 2013 20:07:15 -0400 - Removed inspircd 1.1 reference from conf. Corrected a few spelling issues.
Revision 5ac1e91 - Wed, 19 Jun 2013 19:03:56 -0400 - Set vhosts when users id to an account (and not a nick), add account arg to user ctor to ease handling users who connect already identified
Revision 5695c9e - Tue, 18 Jun 2013 08:01:36 +0200 - fixed a typo in the last commit. sorry.
Revision f92b0d6 - Tue, 18 Jun 2013 07:48:07 +0200 - added support for hybrids new umode +S (client is connected via SSL/TLS)
Revision fc527b4 - Tue, 18 Jun 2013 07:35:47 +0200 - checking for ssl users when ajoining ssl only channels on inspircd, fixes 1466
Revision a93b315 - Sat, 15 Jun 2013 23:27:01 -0400 - Fix cidr::match with odd cidr ranges
Revision 5246424 - Sat, 15 Jun 2013 07:11:50 +0200 - added an 'extras' script to enable/disable extra modules before compile
Revision 1316147 - Sat, 15 Jun 2013 00:09:25 +0000 - Update Spanish translation, courtesy of Isaac Fontal
Revision 70319ab - Thu, 13 Jun 2013 20:50:59 -0400 - Fix usestrictprivmsg /msg vs / logic
Revision 7dd3589 - Wed, 12 Jun 2013 02:33:30 +0000 - Fix possible crash in Extensible::ExtensibleUnserialize if a null entry is in it
Revision d463ae3 - Wed, 12 Jun 2013 02:30:21 +0000 - Allow users to change their language to english when the default language is not
Revision ebda113 - Thu, 6 Jun 2013 17:28:59 +0100 - Made the message for unconfirmed nicks relevant to the ns_register registration setting
Revision 6ab6eca - Wed, 5 Jun 2013 20:56:16 +0100 - fixed typo, though I doubt it affects anyone/anything
Revision b1ba1ec - Sat, 1 Jun 2013 21:58:08 -0400 - Made sepstream::GetToken less recursiveish
Revision 9956da1 - Sat, 1 Jun 2013 21:56:52 -0400 - Move OnJoinChannel event to trigger after the user has completely joined and document it more about what you should and shouldnt do in it
Revision b56e71a - Sat, 1 Jun 2013 14:55:45 -0400 - Move CheckKick event to Channel and make os_forbid use it instead of kicking users in the join event, which does bad things
Revision 6f45d72 - Fri, 31 May 2013 18:34:21 -0400 - Made m_mysql's Escape() function safe against escaping strings > BUFSIZE
Revision f5c01bf - Fri, 31 May 2013 01:44:32 -0400 - Fix /hs waiting
Revision 06bad31 - Tue, 28 May 2013 22:17:22 -0400 - Fix Channel::SetCorrectModes to never remove modes <= voice (currently secureops enforces everything, inclurding voice)
Revision 576aaff - Tue, 28 May 2013 21:07:07 -0400 - Don't compare system time to a users timestamp to determine when to collide with a user, if the time on services vs the ircd are different it does weird things
Revision c5bc8fa - Tue, 28 May 2013 13:51:23 -0400 - Include <iterator> in services.h as now more than one file uses it
Revision f6e2ebe - Tue, 28 May 2013 13:43:45 -0400 - Fixup last commit. We have events in log's destructor so we cant log messages from it, and this check in modulemanager is bogus/has a typo
Revision 37b3535 - Mon, 27 May 2013 19:36:37 -0400 - Initially attach all modules to all events, and detach them as the events are run if they are not implemented per module
Revision c21e8d9 - Sun, 26 May 2013 19:34:58 -0400 - Fix webcpanel build
Revision 22658d6 - Sun, 26 May 2013 17:13:11 -0400 - Get rid of the remaining references in the core to specific services. Move more stuff out of the core to the proper modules.
Revision f2dee1e - Sun, 26 May 2013 15:27:28 -0400 - Update INSTALL and place some example link configurations in example.conf
Revision 968ef34 - Sat, 25 May 2013 15:47:56 -0400 - Update Hybrid protocol module for Hybrid 8.1
Revision d6640ed - Sat, 25 May 2013 14:08:50 -0400 - Give an error message when the configuration file ends with an unterminated block
Revision aabc217 - Mon, 20 May 2013 23:45:41 -0400 - Fix /join 0
Revision d82391e - Mon, 20 May 2013 06:42:38 +0200 - made our database backup filenames more readable
Revision 7aa0286 - Sun, 19 May 2013 01:11:55 -0400 - Mark service:channels as a "botchannel" and don't try to hold them on sync, as the client should always be in the channel
Revision 2a8202c - Sat, 18 May 2013 23:45:10 -0400 - Give botserv bots assigned by persist the same botmodes as normal bots, fix some typos, remove unused variable
Revision be4a39c - Sat, 18 May 2013 15:47:26 -0400 - Fix desync when empty permanent channels are dropped on ircds that no have permanent channel mode
Revision a3dc75c - Sat, 18 May 2013 14:46:42 -0400 - Ignore define{} blocks defining directives to itself
Revision 14dc142 - Sat, 18 May 2013 14:26:18 -0400 - Add botserv bot usermode config option
Revision 51b7d53 - Sat, 18 May 2013 13:08:26 -0400 - Add a config option for the default log bot
Revision 3253455 - Sat, 18 May 2013 12:25:26 -0400 - Tabify some stuff in config.cpp
Revision 879b310 - Sat, 18 May 2013 00:27:03 -0400 - Fix Windows build
Revision 5ff3aa7 - Fri, 17 May 2013 23:45:02 -0400 - Yet another variable shadowing error which only show on newer gcc versions
Revision ca93122 - Fri, 17 May 2013 23:20:24 -0400 - You would think my compiler would at least warn me about this. but no.
Revision 2428264 - Fri, 17 May 2013 23:04:18 -0400 - Add Redis database support
Revision cc4a14b - Fri, 17 May 2013 22:53:55 -0400 - Removed some hard coded command names in help output
Revision 934b584 - Wed, 15 May 2013 03:23:20 +0200 - do not validate nicks from ulined servers. this also fixes bug #1521
Revision 4237d49 - Sun, 12 May 2013 11:09:34 +0200 - improved handling of mlocks and topiclocks on inspircd
Revision 1c36de5 - Sat, 11 May 2013 17:13:01 +0100 - Fix config to default prepend_channel true for fantasy
Revision da948be - Sat, 11 May 2013 17:06:16 +0100 - Update botserv.example.conf for xop fantasy commands
Revision 9384a4f - Fri, 10 May 2013 16:17:24 -0400 - Fix ChannelMode::CanSet
Revision 4d62c67 - Fri, 10 May 2013 20:18:48 +0100 - Fix typo in example.conf - thx rodr1go
Revision 7426b3b - Wed, 8 May 2013 20:53:28 -0400 - Readd check for users.size() == 1 before holding channels
Revision 735e234 - Wed, 8 May 2013 20:26:45 -0400 - Fixed some issues and desyncs with creating empty permanent channels on startup & dropping empty channels
Revision 735f0ba - Wed, 8 May 2013 18:26:23 -0400 - Fix crash when we kill users because of a double free
Revision 9ee7c82 - Wed, 8 May 2013 18:15:39 -0400 - Check for peace being on before denying a mode change in cs_mode
Revision 912103e - Wed, 8 May 2013 11:31:20 -0400 - Allow using sxlines on ircds that do not support them, since we always enforce them anyway
Revision f843e7b - Wed, 8 May 2013 11:13:48 -0400 - Fix suspend info output in info and improved it
Revision d7e2ab6 - Wed, 8 May 2013 10:40:46 -0400 - Add activate_on_set option for hostserv
Revision 5e70851 - Wed, 8 May 2013 10:12:31 -0400 - Fix reading multi line quotes from the conf with blank lines or lines with only whitespace
Revision 9b07e16 - Wed, 8 May 2013 09:50:43 -0400 - Make sockaddrs/cidr not throw on invalid ips to give us an easier/cheaper way to test for a valid IP
Revision 6859dec - Tue, 7 May 2013 00:24:37 -0400 - Fix setting some default flags, reading fantasy blocks, and minusers setting being off by 1
Revision e23baf4 - Tue, 7 May 2013 00:06:02 -0400 - Allow /os exception to contain CIDR masks
Revision c7f77b3 - Mon, 6 May 2013 23:48:18 -0400 - Fix a few issues with the poll socketengine
Revision 6578829 - Mon, 6 May 2013 22:18:38 -0400 - Use I_OnUserQuit for os_session because I_OnPreUserLogoff gets called too late, after the users server can be gone. Fix a couple other small things
Revision ef06226 - Mon, 6 May 2013 07:40:43 -0400 - Update the rest of modules.example.conf, default inspircd status modes to a sane rank incase they are prefixless, and 50 other things
Revision 4c669b9 - Sun, 5 May 2013 22:49:29 -0700 - Merge pull request #14 from attilamolnar/1.9+inspmodes
Revision 3fbb493 - Mon, 6 May 2013 01:38:27 -0400 - Fix extras build
Revision 223aa65 - Mon, 6 May 2013 07:28:23 +0200 - removed an unused variable
Revision fe54dfb - Sun, 5 May 2013 23:47:45 -0400 - Don't forget to CloseHandle threads on win32, spotted by Attila
Revision 3f5f84c - Sun, 5 May 2013 21:18:47 -0400 - The const char* specialization of this no longer works
Revision 5b3f81e - Sun, 5 May 2013 21:05:43 -0400 - That doesn't work either, just don't use references. find ./ -name '*.cpp' -exec sed -i 's/Get<const Anope::string\&>/Get<const Anope::string>/g' {} \;
Revision 3e8752f - Sun, 5 May 2013 20:38:57 -0400 - The default arguments are references to temporaries which fall out of scope once the function returns, so we can't use them. gcc is just nice. cronus sucks. also validate a few more config options
Revision 57c2b65 - Sun, 5 May 2013 03:30:08 -0400 - Move module header files to include/modules to fix naming conflicts with system headers
Revision a118946 - Sun, 5 May 2013 03:04:01 -0400 - Fix Windows
Revision ee2dcf1 - Sun, 5 May 2013 02:49:32 -0400 - Cache timeoutcheck and fix a typo in example.conf
Revision e91de41 - Sun, 5 May 2013 02:00:33 -0400 - Add an option to sepstream to allow it to return empty tokens if multiple separators are found in a row
Revision 10b5b00 - Sun, 5 May 2013 01:58:45 -0400 - Dont check for noquit/quitstorm, check and be sure all users are gone regardless
Revision 2044b4d - Sun, 5 May 2013 01:57:24 -0400 - Cleanup of dns stuff based on stuff found making inspircd's module
Revision 1d0bb9b - Sun, 5 May 2013 01:55:04 -0400 - Rework the config file reader to be much more flexible and move many configuration directives to the actual modules they are used in.
Revision 781defb - Tue, 16 Apr 2013 01:58:29 -0500 - Move extras header files out of extras so when users copy modules out they dont need the headers too
Revision 16c124d - Mon, 15 Apr 2013 01:00:45 -0500 - Rewrote modules/CMakeLists.txt and do not build the 'extras' modules, if users want them built they should copy or symlink them out of extras
Revision f08dbce - Sun, 14 Apr 2013 17:39:01 -0500 - Allow assigning service bots via /invite
Revision baabc91 - Sat, 13 Apr 2013 16:36:39 -0500 - Fix a few of the earlier changes to os_forbid
Revision 81483ae - Sat, 13 Apr 2013 06:05:17 +0000 - Fix build on Solaris
Revision 003140b - Fri, 12 Apr 2013 16:20:51 -0500 - Fix Windows build
Revision b405484 - Fri, 12 Apr 2013 17:19:29 -0400 - Fix OSX buld and a warning in modulemanager.cpp
Revision 9a45626 - Fri, 12 Apr 2013 15:45:52 -0500 - Hack around calculate_depends not able to find libintl.h, since we deal with that later
Revision 10d10d0 - Fri, 12 Apr 2013 15:44:54 -0500 - Update Win32 build instructions slightly
Revision aa2844a - Fri, 12 Apr 2013 02:48:24 -0500 - Fix not attaching cs_xop to I_OnReload
Revision 42c640a - Fri, 12 Apr 2013 01:32:53 -0500 - /ns drop help was pretty much a complete lie, so fixed it. Also require a nick param to /ns drop
Revision 066fc58 - Fri, 12 Apr 2013 01:14:56 -0500 - Fix m_ssl
Revision 416eaa1 - Thu, 11 Apr 2013 15:58:59 -0500 - Explain how privileges associate themselves with modes
Revision ac19a5c - Thu, 11 Apr 2013 15:35:39 -0500 - Fix memoserv/rsend reply
Revision 6f9dd28 - Thu, 11 Apr 2013 15:28:53 -0500 - Use SetCorrectModes to set the inital modes on a founder once they register a channel
Revision c56d72b - Thu, 11 Apr 2013 02:28:36 -0500 - Remove more OPDEOP references
Revision db4ed1c - Thu, 11 Apr 2013 00:51:08 -0500 - Merge chanserv saset and set back into one command since it no longer needs to be separated... replace chanserv/set privilege with chanserv/administration. Dont tell users to use 'help' for more help if there is no help.
Revision cb64d80 - Thu, 11 Apr 2013 00:20:24 -0500 - Remove the need for having to set syntax to "" for commands with no syntax
Revision 4f9b787 - Thu, 11 Apr 2013 00:08:28 -0500 - Pass new config and the new config reader to the OnReload event, aswell as call it on module load on modules that hook to it
Revision 207c46c - Wed, 10 Apr 2013 22:26:40 -0500 - Move some of the modules in extras/ that arent really extra out of extras. Mark our modules as VENDOR and allow modules to have multple types.
Revision 957cb2b - Tue, 9 Apr 2013 16:27:25 -0500 - Use the mode names inspircd gives us to add modes if we don't recognize it
Revision b244c74 - Tue, 9 Apr 2013 14:51:39 -0500 - Allow privilege descs to be read from the config to override the defaults
Revision b76b2e1 - Tue, 9 Apr 2013 14:48:24 -0500 - Made privilege names case insensitive
Revision b35665b - Tue, 9 Apr 2013 14:33:54 -0500 - Rename OPDEOP and OPDEOPME privileges to be similar to the other status privileges
Revision c3eb5b8 - Tue, 9 Apr 2013 04:23:29 -0500 - And my bots initially start with no server..
Revision 6faf4e3 - Tue, 9 Apr 2013 04:13:49 -0500 - 'Me' can not exist when channels are created
Revision 325b018 - Tue, 9 Apr 2013 00:00:52 -0500 - Add a default method for user's SendModeInternal
Revision 0a3d27a - Mon, 8 Apr 2013 23:37:42 -0500 - Made XOP privileges configurable
Revision bcd85ca - Mon, 8 Apr 2013 01:05:25 -0500 - Fix OperType::GetCommands
Revision ac40c53 - Mon, 8 Apr 2013 01:02:45 -0500 - Fix /ns set display
Revision 2eae82d - Mon, 8 Apr 2013 01:01:27 -0500 - Check the channel secure option isn't set in ChannelInfo::AccessFor too
Revision 72493b7 - Mon, 8 Apr 2013 00:42:07 -0500 - Fix secureops
Revision 1a37e1c - Mon, 8 Apr 2013 00:19:07 -0500 - Made auto* chanserv privileges not hard coded. Made cs_statusupdate not remove status on users if they still match other entries. Move privilege descriptions out of the config
Revision fb7fef7 - Sun, 7 Apr 2013 23:46:44 -0500 - Optimizations of much of the more commonly used code
Revision 3660222 - Sat, 6 Apr 2013 19:34:35 -0500 - Remove the runtime module directory on non-windows because we no longer overwrite modules on install without deleting them first
Revision ccecfdf - Sat, 6 Apr 2013 19:03:07 -0500 - Made the missing dependencies message from cmake more descriptive for modules
Revision 32d1184 - Sat, 6 Apr 2013 17:08:25 -0500 - Use the return from BufferedSocket::ProcessRead() and don't just assume its true
Revision 6a46a08 - Sat, 6 Apr 2013 16:58:04 -0500 - This worked before but is a little weird
Revision 7a2e6aa - Sat, 6 Apr 2013 16:43:56 -0500 - Add more logging to bs_set, cs_set, and ns_set
Revision 34b5f9c - Sat, 6 Apr 2013 23:10:26 +0200 - InspIRCd: Recognize a few more channel modes that weren't recognized
Revision f77eb0a - Sat, 6 Apr 2013 15:59:38 -0500 - Let non founders still /cs ban by wildcard mask, but limit the number of people it will kick
Revision 302a409 - Sat, 6 Apr 2013 15:44:03 -0500 - Unset +P from perm channels when expiring
Revision 0b3b9fe - Sat, 6 Apr 2013 15:26:52 -0500 - Fix toggling topiclock when the channel setting is changed
Revision f71c786 - Sat, 6 Apr 2013 15:06:39 -0500 - Fix generic mode support
Revision 4ecf20b - Fri, 5 Apr 2013 16:59:27 -0500 - Fix ns_lists command group
Revision a5b8788 - Fri, 5 Apr 2013 16:27:12 -0500 - Made the securefounder checks in cs_set more consistent
Revision 3cc7950 - Fri, 5 Apr 2013 15:45:03 -0500 - Fix not constructing the /bs set greet command
Revision 854bc4d - Thu, 4 Apr 2013 22:12:48 -0500 - Move around some of Init() to fork() before initing the socket engine, as some engines cant survive a fork()
Revision dbc7727 - Thu, 4 Apr 2013 18:52:35 -0500 - Fix applying some sxlines to users on add
Revision c4ef566 - Thu, 4 Apr 2013 18:45:45 -0500 - Fix /hs reject syntax
Revision 6637633 - Thu, 4 Apr 2013 15:14:17 -0500 - Fix defcon taking action on new clients
Revision 823bc01 - Tue, 2 Apr 2013 07:02:38 +0200 - mentioned the charybdis protocol support in the readme and example config
Revision 947ad6f - Mon, 1 Apr 2013 10:26:19 +0200 - fixed using language files for third party modules
Revision 06c8a1e - Mon, 1 Apr 2013 09:46:55 +0200 - Revert "added include/version.h to .gitignore"
Revision b3fd861 - Mon, 1 Apr 2013 09:42:59 +0200 - added include/version.h to .gitignore
Revision 62262f4 - Sun, 31 Mar 2013 00:43:11 -0500 - Fix typo in Mode message handler
Revision 6e0dc0e - Sun, 31 Mar 2013 00:43:11 -0500 - Add networkinfo:modelistsize config option to set the max size of b/e/I lists
Revision 7e7556f - Sat, 30 Mar 2013 23:39:43 -0500 - Merge usefulness of Timer and CallBack classes into Timer, and fix it to really work
Revision 111d6a9 - Sat, 30 Mar 2013 22:40:20 -0500 - Fix loading ttb from databases
Revision d238176 - Sat, 30 Mar 2013 22:08:51 -0500 - Add /bs set banexpire command to configure if/when botserv bans expire
Revision 4694c7a - Sat, 30 Mar 2013 19:08:07 -0500 - Split up bs_kick subcommands into real subcommands
Revision a522933 - Fri, 29 Mar 2013 23:51:45 -0500 - This reference to see if nickcores go away during command execution is no longer necessary
Revision f24e17f - Fri, 29 Mar 2013 23:50:51 -0500 - Fix /bs set private
Revision 2b208de - Fri, 29 Mar 2013 23:50:51 -0500 - Fix detecting module langauge files
Revision 4eb5d15 - Sat, 30 Mar 2013 05:42:17 +0100 - uuups, we already have the year 2013
Revision 0451dd3 - Sat, 30 Mar 2013 05:21:54 +0100 - added charybdis protocol support
Revision c3e4f1b - Fri, 22 Mar 2013 18:41:23 -0500 - Fix build from earlier merge
Revision f122f10 - Fri, 22 Mar 2013 11:52:42 -0500 - Merge remote branch 'attila/1.9+timermanager' into 1.9
Revision deedb3b - Fri, 22 Mar 2013 11:46:30 -0500 - Dont call SetCloakedHost in users constructor, just set chost, because SetCloakedHost logs a message like the user just changed their host
Revision d27aa03 - Thu, 21 Mar 2013 23:40:16 -0500 - Merge branch '1.9' of github.com:anope/anope into 1.9
Revision dcffa5d - Thu, 21 Mar 2013 23:39:39 -0500 - Properly cleanup after entrymsglists and ajoinlists when destructed
Revision 221e79f - Thu, 21 Mar 2013 23:33:40 -0500 - Check for null pointers in HasMLock/SetMLock/RemoveMLock, cs_register can pass it some sometimes/possibly other places
Revision d5a453b - Wed, 20 Mar 2013 19:42:50 +0100 - Improve TimerManager
Revision a2d69fa - Wed, 20 Mar 2013 09:45:40 -0700 - Merge pull request #13 from attilamolnar/1.9+inspversionfix
Revision 6a0e441 - Wed, 20 Mar 2013 11:39:16 -0500 - Check that channels still exist before nulling their ci pointer in channelinfos destructor Change the persist setting on a channel to mean only that it is being enforced ircd-side
Revision 68eeac6 - Tue, 19 Mar 2013 19:16:13 +0100 - InspIRCd: Don't reply to VERSION
Revision 731912f - Mon, 18 Mar 2013 12:16:51 -0500 - Add db_sql:import config option so we can know for sure whether or not we want a database import
Revision 5196391 - Sat, 16 Mar 2013 21:53:03 -0500 - Remove remaining disable_ns_register references in example config
Revision 810685c - Sat, 16 Mar 2013 20:08:39 -0500 - Have db_flatfile store object ids if they are set, even though it doesn't use them, so that if other database modules that use them are loaded they can keep track of objects properly
Revision 1a0e6b0 - Fri, 15 Mar 2013 12:27:08 -0500 - Allow autokicking real names, extbans, and channels
Revision 81c89bb - Fri, 15 Mar 2013 07:43:17 -0500 - Fix missing dependencies message to include the source folder, there is no specific source file on modules with multiple source files
Revision 01620e8 - Thu, 14 Mar 2013 20:51:28 -0500 - Update nickserv defult names for kill/killquick, hide email, usermask, and quit
Revision 4c74020 - Thu, 14 Mar 2013 09:03:48 -0500 - Add group and hide setings to fantasy{} blocks
Revision b95b8f0 - Thu, 14 Mar 2013 09:03:48 -0500 - Fix setting BSDefFlags from the config
Revision 1ff7a7c - Wed, 13 Mar 2013 14:40:49 -0500 - Refactor mask/entry code, allow full matching (against users real host/ip) if their displayed host is their real real host. Also match against cloaked host even if full matching is not being done
Revision 1d16629 - Wed, 13 Mar 2013 09:45:15 -0500 - Allow opers to override chanserv kick/ban, botserv say/act, and akick's peace setting
Revision 72aa27e - Wed, 13 Mar 2013 09:02:31 -0500 - Allow m_ldap_authentication to block email changes if emails are controlled by ldap, don't tell users they must change their email during initial user registration
Revision 05223db - Sun, 10 Mar 2013 03:23:00 -0500 - Identify requests hold command sources and users can disconnect between the request being dispatched and when it returns, so don't assume the source user pointer is always valid
Revision 06d43ba - Sun, 3 Mar 2013 10:58:39 +0100 - update the users password after a successful ldap authentication
Revision 5f74662 - Sun, 3 Mar 2013 10:57:53 +0100 - improved the operserv mode command
Revision 2c68312 - Sun, 3 Mar 2013 02:04:33 -0500 - Bump for Anope 1.9.9-git
Revision ce094f4 - Sat, 2 Mar 2013 23:42:01 -0500 - Anope 1.9.8 Release
Revision 1780560 - Sat, 2 Mar 2013 23:42:00 -0500 - Regenerate language files
Revision a32c897 - Sat, 2 Mar 2013 23:42:00 -0500 - Update Changes and Changes.conf
Revision 367b662 - Sat, 2 Mar 2013 23:42:00 -0500 - Fix compile warning in webcpanel/memos
Revision 75999e0 - Sat, 2 Mar 2013 23:42:00 -0500 - Fix Anope::Duration showing years failing
Revision 45c02f8 - Sat, 2 Mar 2013 23:42:00 -0500 - Fix build with -std=c++11
Revision ae4421b - Sat, 2 Mar 2013 23:42:00 -0500 - Unset founder/successors when channels are deleted
Revision 2d309da - Sat, 2 Mar 2013 18:52:15 -0500 - Fix /ns drop nick showing "your nick" and not the nick you specified if the nick isn't registered
Revision b9bbb37 - Sat, 2 Mar 2013 18:46:56 -0500 - Fixed logic fail in /ns resend
Revision 0b05eaa - Fri, 1 Mar 2013 01:40:14 -0500 - Only shrink extensible items that are metadata in ExtensibleUnserialize
Revision 91ad9d2 - Fri, 1 Mar 2013 00:57:24 -0500 - Fix Windows build
Revision 6aa9ad9 - Fri, 1 Mar 2013 00:56:47 -0500 - Don't have cs_seen update data for users on syncing servers
Revision 6808498 - Thu, 28 Feb 2013 23:09:03 -0500 - Fix entrymsg's creation time being reset from restarts
Revision 8561941 - Mon, 25 Feb 2013 00:26:49 -0500 - Don't enforce session limit on clients with no IP on Unreal, fix typo in /cs down syntax, fix os_session messages to reference ip
Revision 5d4db2b - Sun, 24 Feb 2013 20:15:49 -0500 - Allow /cs up and /cs down to take an optional nick arg
Revision 501503b - Sun, 24 Feb 2013 20:14:15 -0500 - On startup check all object types
Revision a980e32 - Sun, 24 Feb 2013 21:07:10 +0100 - fixed wrong parameter count in cs_updown
Revision da2fea3 - Sun, 24 Feb 2013 09:48:20 +0100 - fixed some stupid typos in the german language file
Revision 7cb70f5 - Sun, 24 Feb 2013 08:14:13 +0100 - some updates to the german langfile
Revision d04db3d - Sat, 23 Feb 2013 17:41:52 -0500 - Add SVSNICK and SVSHOLD to hybrid
Revision 35c2608 - Sat, 23 Feb 2013 11:20:31 +0100 - Revert "do not send RESV from operserv when its not introduced"
Revision 8cf7ec9 - Sat, 23 Feb 2013 04:32:41 -0500 - Add missing SVSHold funcs to plexus protocol module
Revision c67087d - Sat, 23 Feb 2013 04:32:41 -0500 - Fix akick list/view not showing masks sometimes
Revision 2336b47 - Sat, 23 Feb 2013 09:54:03 +0100 - do not send RESV from operserv when its not introduced
Revision da61734 - Fri, 22 Feb 2013 04:42:08 -0500 - Made FindService less dumb and able to do aliases to aliases
Revision a911354 - Fri, 22 Feb 2013 00:39:13 -0500 - Fix "leave" channel log level
Revision ae90244 - Fri, 22 Feb 2013 00:30:22 -0500 - Merge branch '1.9' of github.com:anope/anope into 1.9
Revision 5547c3e - Fri, 22 Feb 2013 00:29:00 -0500 - This OnServerSync event hook in inspircd20 can go away (it does nothing currently)
Revision e844cdf - Thu, 21 Feb 2013 07:38:42 +0000 - Update COPYING
Revision 2fa5cfa - Wed, 20 Feb 2013 18:00:46 -0500 - Add Matthew to webpanel credits, fix alignment of akill list
Revision 5979217 - Wed, 20 Feb 2013 14:58:59 -0800 - Merge pull request #12 from MatthewM/webcpanel
Revision ed68482 - Wed, 20 Feb 2013 15:51:40 -0500 - Add /cs mode clear command that behaves like the old /cs clear modes/bans/etc
Revision 3259298 - Tue, 19 Feb 2013 04:07:53 -0500 - Allow /os mode clear [all] to unset modes, similar to old clearmodes
Revision a1f9263 - Tue, 19 Feb 2013 01:28:27 -0500 - Merge branch '1.9' of github.com:anope/anope into 1.9
Revision 7d50818 - Tue, 19 Feb 2013 00:48:21 -0500 - Fix some OpenBSD build issues, and bugs #1485 #1486 #1487
Revision d0e1f3b - Tue, 19 Feb 2013 05:21:01 +0100 - fixed a typo in the last SASL commit
Revision cb91f99 - Mon, 18 Feb 2013 22:10:57 -0500 - Made the mode bouncing detector harder to hit and ignore syncing channels
Revision a49d7b1 - Sun, 17 Feb 2013 05:31:04 -0800 - Merge pull request #11 from grawity/mailmap
Revision eda7b55 - Sun, 17 Feb 2013 15:19:11 +0200 - Add mailmap for Git
Revision bcf99d5 - Sun, 17 Feb 2013 12:26:51 +0100 - SASL sends AUTHFAIL on unsupported mechanisms, fixes bug #1482
Revision 3ab6706 - Sat, 16 Feb 2013 03:59:28 -0500 - InsIRCd only sends QUIT on KILL for users 1 hop from us, so always internally kill users that we kill. Bug #1481
Revision c40e9c3 - Sat, 16 Feb 2013 00:31:42 -0500 - Fix missing CheckInit check in db_sql_live
Revision 7be23b7 - Fri, 15 Feb 2013 23:18:34 -0500 - Fix setting modes on botserv bots in channels that have other bots in them on startup
Revision d9c18a6 - Fri, 15 Feb 2013 19:01:46 -0500 - Store hashes of the last commit instead of the last commit
Revision 73099b8 - Fri, 15 Feb 2013 18:32:06 -0500 - Fixed unserializing servers in dns zones
Revision fc1d7ea - Thu, 14 Feb 2013 20:58:01 -0500 - Switch Destroy methods to delete
Revision 391f282 - Thu, 14 Feb 2013 20:57:40 -0500 - This Serialize::Destroy method isn't actually needed anymore. Fixes weirdness from a few Serializable items we had on the stack. Added a comment about why operator< in Reference fails.
Revision f0875c5 - Thu, 14 Feb 2013 20:11:52 -0500 - Iterators suck
Revision f6ef706 - Thu, 14 Feb 2013 01:24:29 -0500 - Magiobiwan is silly
Revision 7656c25 - Thu, 14 Feb 2013 01:20:18 -0500 - Made chanserv/unban with no parameters unban you in every channel you have access in
Revision 5cf1ede - Thu, 14 Feb 2013 01:20:18 -0500 - Fix CommandCSMode::CanSet letting everyone set voice
Revision 9e544a6 - Thu, 14 Feb 2013 01:20:18 -0500 - Store what channels have references to accounts in NickCore to prevent having to iterate over all channels and then all access entries when nicks expire or from nickserv/alist
Revision 225b7c3 - Thu, 14 Feb 2013 01:20:18 -0500 - Make NickCore::aliases a vector
Revision 9948664 - Thu, 14 Feb 2013 01:20:18 -0500 - Update obj ts when constructed in db_sql
Revision fc4b884 - Sun, 10 Feb 2013 12:31:37 -0500 - Sort output in ns_list and cs_list
Revision 9b3ecfe - Sat, 9 Feb 2013 22:48:05 -0500 - Fixed sepstream::GetToken logic fail
Revision 2079498 - Sat, 9 Feb 2013 00:24:15 -0500 - (re?)add mlock set as a simple way to clear all mlocks and add new ones at once
Revision 01413dd - Thu, 7 Feb 2013 21:49:49 -0500 - Use channel mode +r to determine if a channel has either been newly created or created while we were offline (eg, during the inital burst to the uplink). Fixes not knowing whether or not channels ops in non-secureop non-persistent channels obtained op while we were offline by creating the channel or legitimately by being set op by another channel op.
Revision 9d1fe61 - Thu, 7 Feb 2013 21:49:49 -0500 - Made DNSServer::Find case insensitive
Revision 2472a41 - Tue, 5 Feb 2013 08:04:45 -0800 - Merge pull request #9 from Robby-/1.9-ns_set_misc
Revision 65fbdcf - Tue, 5 Feb 2013 16:31:14 +0100 - Fixed ns_set_misc not showing help for its SASET commands. Added descriptions and SASETs for the remaining commented ns_set_misc examples, without a description they won't show up in HELP if someone actually enabled those.
Revision 25cec01 - Tue, 5 Feb 2013 09:45:48 -0500 - Made access del by nick and other functions from 326f1a really delete objects
Revision 62e3c8c - Sat, 2 Feb 2013 10:53:05 -0800 - Merge pull request #7 from artemiiav/patch-2
Revision 8902c1f - Sat, 2 Feb 2013 10:51:08 -0800 - Merge pull request #8 from Robby-/1.9
Revision 6c43bcc - Sat, 2 Feb 2013 07:32:32 +0100 - cs_enforce: Make the logging also show the channel it was used on, added 2 missing log calls, can now handle overrides by services operators.
Revision 15b37c1 - Sat, 2 Feb 2013 07:30:53 +0100 - Some more typo and help text fixes, proper formatting of control codes, missing privileges, and settings corrections.
Revision 29fcdc5 - Thu, 31 Jan 2013 21:24:48 -0500 - Updated jquery API to v1.9.0
Revision 1075bb1 - Thu, 31 Jan 2013 22:33:14 +0300 - Update src/config.cpp
Revision dccb0ee - Wed, 30 Jan 2013 22:50:11 -0800 - Merge pull request #5 from Robby-/1.9
Revision aea8690 - Thu, 31 Jan 2013 06:19:14 +0100 - Some configuration file updates: Removed now non-existing settings. Redid some existing settings to look more consistent/uniform. Added some missing commands/permissions. Merged operserv/modlist permission into operserv/modinfo. Fixed ChanServ INFO privilege to actually work for /BotServ INFO too for those users who have it, instead of only for founders. Fixed some typos aswell as removed whitespaces along the way.
Revision a62698a - Wed, 30 Jan 2013 17:44:07 -0500 - Remove sendpass from the configs and the config reader since it no longer exists
Revision 47af43c - Wed, 30 Jan 2013 11:24:57 -0500 - Made Anope::Duration also show years
Revision ae2c82a - Wed, 30 Jan 2013 10:39:52 -0500 - Don't expire session exceptions if in noexpire mode
Revision 594b1a1 - Wed, 30 Jan 2013 10:39:52 -0500 - Evidently Persistant is not a word
Revision ae46cc7 - Wed, 30 Jan 2013 09:18:56 +0100 - fixed an infinite loop in ns_recover, caused by a very small typo.
Revision 6b2aad7 - Sun, 27 Jan 2013 13:55:42 -0500 - Fixed SQL::Data::IsEqual to really only return if the two are completely equal. Fixes oddities with caching objects that are actually updated.
Revision 98ccbe2 - Sun, 27 Jan 2013 10:50:55 -0500 - Old botserv flags need BS_ prepended to them
Revision 5ae100f - Sun, 27 Jan 2013 05:00:00 -0500 - Add nickserv/alist priv, merge botserv/botlist and botserev/assign/private to botserv/administration
Revision 0052dd2 - Sun, 27 Jan 2013 01:59:38 -0500 - Fix db_flatfile not clearing databases on save if there are no objects left of that type (it will leave the old database with old objects currently)
Revision 50a42d2 - Sat, 26 Jan 2013 22:17:25 -0500 - Fix os_session to work with sql properly
Revision 49cb6a0 - Sat, 26 Jan 2013 20:52:49 -0500 - Fixed db_sql etc being confused on empty vs not set metadata
Revision ed7c4dc - Fri, 25 Jan 2013 04:05:38 -0500 - Made Anope::DoTime default to seconds to fix os_akill etc defaulting expiries to days
Revision c376fb0 - Fri, 25 Jan 2013 03:31:35 -0500 - I forgot to add this change to a634c7be65113c74736be0fb98f31b0c83ec2882
Revision 76d9e58 - Fri, 25 Jan 2013 03:09:51 -0500 - mysql_insert_id doesn't return an id if one isnt generated, so check that it really returns a value before using it. Also fix memos to cleanup after themselves when deleted.
Revision 3769cc1 - Thu, 24 Jan 2013 08:53:35 -0500 - Fix memo signon and memo receive default flag names
Revision 74ace7d - Thu, 24 Jan 2013 00:34:41 -0500 - Channel::HasUserStatus: Don't just return false if cms is NULL.
Revision 647245a - Wed, 23 Jan 2013 22:16:01 -0500 - Add missing KeySet() func to SQL::Data
Revision a634c7b - Tue, 22 Jan 2013 21:20:05 -0500 - Fix some compile errors
Revision f656e31 - Tue, 22 Jan 2013 19:47:16 -0500 - Add hidenetsplitquit config option to not show splits in /ns info's last quit field
Revision 8811545 - Tue, 22 Jan 2013 17:32:23 +0000 - Fixed few minor typos
Revision cad3850 - Tue, 22 Jan 2013 01:23:55 -0500 - Move channel mode set and unset events to be after the action has been done internally to allow easially canceling it
Revision 7de058b - Tue, 22 Jan 2013 00:24:58 -0500 - Fix crash trying to unset the permanent channel mode during channel syncs of empty channels
Revision ddaa001 - Mon, 21 Jan 2013 22:31:16 -0500 - Merge usefulness of Flags and Extensible classes into Extensible, made most flags we have juse strings instead of defines/enums
Revision 51c049e - Mon, 21 Jan 2013 18:03:31 -0500 - Really fix Channel::GetModes
Revision 93472f8 - Mon, 21 Jan 2013 17:59:22 -0500 - Revert "Fix Channel::GetModes, we can never have a negative mode set on a channel so this check is unnecessary"
Revision 678d27f - Mon, 21 Jan 2013 17:55:27 -0500 - Fix Channel::GetModes, we can never have a negative mode set on a channel so this check is unnecessary
Revision 369ca89 - Mon, 21 Jan 2013 06:46:28 -0500 - Allow channels that have users in them that are not the access list to expire while in use.
Revision 421db75 - Mon, 21 Jan 2013 06:38:13 -0500 - Fix not logging debug info to the logfile when debug mode is enabled
Revision 846b56c - Mon, 21 Jan 2013 02:31:28 -0500 - Fix defcon timeout timer
Revision e62d2fe - Mon, 21 Jan 2013 07:15:16 +0100 - removed old cs_modes fantasy{} command blocks
Revision bb3abab - Sun, 20 Jan 2013 15:03:15 +0100 - removed loading of ns_set_chanstats and cs_set_chanstats from the chanstats.example.conf, this functionality is now part of ns_set/cs_set
Revision da6543d - Sun, 13 Jan 2013 22:07:27 -0500 - Allow grouping commands to make help output easier to comprehend
Revision 29a0180 - Sun, 13 Jan 2013 22:07:27 -0500 - Add svsjoin and svspart commands
Revision 7e7fc75 - Sun, 13 Jan 2013 22:07:27 -0500 - Allow ns_set_misc/cs_set_misc to have configurable help descriptions
Revision d3a6bdc - Sun, 13 Jan 2013 22:07:27 -0500 - Allow the config parser to skip over gettext's _() to allow translating config values
Revision 402e42f - Sat, 12 Jan 2013 09:01:44 +0100 - check if the database exists before we try to backup it
Revision 5007b72 - Wed, 9 Jan 2013 04:20:55 -0500 - Update copyright to 2013. This was done with: find include/ src/ lang/ docs/ modules/ *.* Config -exec sed -i 's/-2012 Anope Team/-2013 Anope Team/i' {} \;
Revision 9931ec2 - Tue, 8 Jan 2013 20:25:01 -0500 - Use m_rewrite to rewrite op, deop, halfop, ... etc
Revision 5f3dfc2 - Mon, 7 Jan 2013 21:30:07 -0500 - Track +g on inspircd, fix saving/loading mode locks for generic modes
Revision dc9e81a - Sun, 6 Jan 2013 18:38:04 -0500 - Fix deleting access by number
Revision ed719c8 - Sun, 6 Jan 2013 16:13:35 -0500 - Buggy compilers are buggy
Revision 77dc2e4 - Sun, 6 Jan 2013 01:46:53 -0500 - And really check for them using ssl...
Revision c5f4c8d - Sun, 6 Jan 2013 01:19:25 -0500 - Fixed enforce ssl to not ban users if the channel is ssl only
Revision 6ba4964 - Sun, 6 Jan 2013 00:48:50 -0500 - Fix fmode handling on inspircd20
Revision 9a2ef9d - Sat, 5 Jan 2013 22:42:07 -0500 - Add sslonly, bans, and limit to /cs enforce
Revision 6ccf0a3 - Thu, 3 Jan 2013 13:39:50 -0500 - Fixed os_dns not readding connected servers if configured
Revision 23e303a - Thu, 3 Jan 2013 13:20:10 -0500 - Move enforcer checks on nick and logout to nickserv.cpp
Revision 098157d - Thu, 3 Jan 2013 12:34:01 -0500 - Don't delete users immediately when quit or killed, instead wait until message processing is done
Revision 8274696 - Wed, 2 Jan 2013 13:59:33 -0500 - Move nickserv validate stuff to an event in nickserv.cpp
Revision bf718e8 - Sun, 30 Dec 2012 10:30:29 -0500 - Evidently not specifying NOT NULL is not enough to allow null timestamps
Revision 326f1a9 - Sat, 29 Dec 2012 20:29:41 -0500 - Cleanup after mode locks, badwords, akick, access, if destructed
Revision 793c438 - Sat, 29 Dec 2012 11:09:54 -0500 - Remove clearuser references from configs
Revision 6b1f323 - Fri, 28 Dec 2012 15:59:33 -0500 - Move some of CheckKick to the respective modules
Revision 7618490 - Fri, 28 Dec 2012 13:00:36 -0500 - Dumb iterators
Revision ae6ddf2 - Fri, 28 Dec 2012 11:17:01 -0500 - fixup part of 379b2c, dont use iterators after theyre erased
Revision b591e8c - Fri, 28 Dec 2012 10:43:30 -0500 - Use the same object for chanusercontainer and userchancontainer
Revision 379b2cc - Fri, 28 Dec 2012 10:43:30 -0500 - The timestamp column in SQL should actually be null sometimes, and fixed some valgrind errors with db_sql_live
Revision 3fb4cf5 - Thu, 27 Dec 2012 13:25:33 -0800 - Merge pull request #4 from alexbarton/ngircd-fix-NJOIN
Revision fdc62da - Thu, 27 Dec 2012 22:15:33 +0100 - ngircd protocol module: Fix NJOIN, actually join users to the channel
Revision 05094b0 - Thu, 27 Dec 2012 15:03:38 -0500 - When processing many modes don't enforce mlock until all are set
Revision 4ab8a70 - Thu, 27 Dec 2012 11:06:00 -0500 - Add an expiry option to /cs ban
Revision c88a3ff - Thu, 27 Dec 2012 09:50:44 -0500 - Remove clearusers. There is still kick * for this.
Revision 7b1ae96 - Thu, 27 Dec 2012 09:43:19 -0500 - Put appendtopic and topiclock into /cs topic
Revision c7a22df - Wed, 26 Dec 2012 19:42:37 -0500 - Add register type to os_forbid to prevent users from registering nicks or channels
Revision 45ee7c1 - Tue, 25 Dec 2012 17:10:43 -0500 - Clean up the logic in adding extra library directories, adding to LDFLAGS isn't needed.
Revision 392b591 - Tue, 25 Dec 2012 15:52:58 -0500 - Allow modules loaded after startup to magically reobtain their database objects. Fix os_dns for sql(live)
Revision 556a437 - Tue, 25 Dec 2012 12:40:09 -0500 - Cleanup after os_dns on unload
Revision eab5833 - Tue, 25 Dec 2012 12:36:58 -0500 - Don't check userlimit when servers first connect, servers wont have any users at that point anyway
Revision 077ae27 - Tue, 25 Dec 2012 02:20:00 -0500 - Fix linking libraries so their rpath is set correctly and isn't stripped on install.
Revision d4e1c95 - Tue, 25 Dec 2012 01:09:03 -0500 - packet->answers isnt always empty initially, like with axfrs
Revision 33ae442 - Mon, 24 Dec 2012 18:15:38 -0500 - We can svsjoin on plexus
Revision 1285c7f - Sun, 23 Dec 2012 15:30:08 -0500 - Allow os_dns to manage multiple zones
Revision 8c72892 - Sun, 23 Dec 2012 14:56:02 -0500 - Made the overlay resize and the alert box reposition when the window is resized
Revision dc751bd - Sat, 22 Dec 2012 14:49:48 -0500 - Combine all of the set modules now that having them split apart is almost completely pointless
Revision 0cde0ae - Sat, 22 Dec 2012 09:10:32 -0500 - Fixed memo mail messages, and allow %N to be in them. Bug #1462
Revision 503bda5 - Thu, 20 Dec 2012 23:48:20 -0500 - Move the var to set the time out into the same javascript tag that is used for the modal as it's related
Revision a4d5c40 - Thu, 20 Dec 2012 16:22:58 -0500 - Added the overlay to the vHost request function
Revision 8e219bd - Thu, 20 Dec 2012 16:12:16 -0500 - Moved the javascript to header.html from memos.html to make it easier to intergrate the overlay feedback and do tweaks
Revision 5acc93d - Thu, 20 Dec 2012 01:19:04 -0500 - Made the table cells for the memo table have no spacing and color the read and unread memos different colors
Revision 276247b - Wed, 19 Dec 2012 16:03:53 -0500 - Add a command flag to require that a user is executing the command
Revision d277f49 - Wed, 19 Dec 2012 13:17:44 -0500 - Minor style tweaks to make the links look more like a button
Revision 67bd2c6 - Wed, 19 Dec 2012 09:21:25 -0500 - Add version flags for debug, git, and Windows
Revision 784683a - Wed, 19 Dec 2012 08:48:23 -0500 - Having these references to bots bugged out older compilers, so simplify this by just moving pointers to the core
Revision 3b20943 - Tue, 18 Dec 2012 10:35:11 -0500 - Fixed typo in b6407afa06917910732966ea3c49ac4bd7850fe4
Revision 6572754 - Tue, 18 Dec 2012 10:34:33 -0500 - Cleaned up the overlay layout, added some minor visual and js fixes
Revision f157ea3 - Tue, 18 Dec 2012 10:04:26 -0500 - Added a click reply function to the MemoServ memos page that autofills the senders name
Revision ddd7fe6 - Mon, 17 Dec 2012 22:03:21 -0500 - Bug that was experinced seems to be somewhat related to Windows 8 and maybe an extension on chrome. Reverting to previous commit
Revision 47a351a - Mon, 17 Dec 2012 19:26:07 -0500 - Fixed a minor bug that overlapped the nav links and the content from .content in Chrome on Windows
Revision ff9f670 - Mon, 17 Dec 2012 18:28:15 -0500 - Give the overlay window a rounded edge to make it look a bit nicer and fade the main content a little less
Revision f33f7d9 - Mon, 17 Dec 2012 14:32:28 -0500 - Added a modal window interface to MemoServs page that will automaticly fade out after a give time (currently 5s)
Revision c49f03f - Sat, 15 Dec 2012 23:51:25 -0500 - Allow escaping brackets in webpanel templates and redirect users to the homepage when their session is not found
Revision 6b5f583 - Sat, 15 Dec 2012 21:46:14 -0500 - Merge Adams commit to allow escaping of brackets
Revision 8e3ab0d - Sat, 15 Dec 2012 21:35:38 -0500 - Made all langauges default to the UTF-8 charset
Revision a049092 - Sat, 15 Dec 2012 21:05:05 -0500 - Merge branch '1.9' into webcpanel
Revision b6407af - Sat, 15 Dec 2012 05:13:09 -0500 - Fix chghost/chgident/etc on inspircd20
Revision fbd3cda - Sat, 15 Dec 2012 01:15:03 -0800 - Merge pull request #2 from czaks/conv-languages-to-utf-8/1.9
Revision 0534182 - Sat, 15 Dec 2012 09:39:12 +0100 - Convert the language files to utf-8 encoding.
Revision 280ba89 - Sat, 15 Dec 2012 09:28:19 +0100 - Fix the language files to state the correct charset.
Revision fe7fcc2 - Sat, 15 Dec 2012 02:44:53 -0500 - Check for NOJOIN being < 0 but restricted on in db_old
Revision dcd34d3 - Sat, 15 Dec 2012 01:33:31 -0500 - Move DNS handling to a module
Revision dced01f - Sat, 15 Dec 2012 01:14:52 -0500 - Added a large scroll box for the chanserv main page
Revision cdec0a3 - Fri, 14 Dec 2012 16:47:45 -0500 - Fixed some html errors in the last commit
Revision 1075f3b - Fri, 14 Dec 2012 16:44:14 -0500 - Allow opers to drop channels Added chanserv drop to web panel Allow long lists of akills to scroll
Revision c1077fa - Thu, 13 Dec 2012 06:12:56 -0500 - Optimize much of the database code and serialize code.
Revision 76ba147 - Wed, 12 Dec 2012 02:28:19 -0500 - Unregister operserv_akill page on unload in cpanel
Revision 1c1a216 - Wed, 12 Dec 2012 01:33:58 -0500 - Only allow non-user sources to register nonexistant channels
Revision 04f96a5 - Wed, 12 Dec 2012 01:30:50 -0500 - Some small improvements to last few commits, and fixed some problems with the template engine
Revision 5f72d1f - Wed, 12 Dec 2012 01:04:08 -0500 - Squashed commit of the following:
Revision dfff544 - Wed, 12 Dec 2012 00:49:16 -0500 - Fixed webpanel fail on nondebug builds
Revision 0edd264 - Tue, 11 Dec 2012 05:27:56 +0100 - IsNickValid() now accepts '[' and ']' in the nickname
Revision e71c890 - Sun, 9 Dec 2012 14:32:16 +0100 - added a missing permission for operserv/global to the Services Administrator block in example.conf
Revision eada35d - Sun, 9 Dec 2012 14:21:42 +0100 - fixed a problem with the webcpanel logout when using apache + mod_proxy
Revision 8d4a08c - Sun, 9 Dec 2012 14:19:30 +0100 - fixed a log message showing the wrong IP
Revision 9dec093 - Fri, 7 Dec 2012 03:02:15 -0500 - Modified the Config scripts to ask the user explicitly for additional include and library directories.
Revision f711dd3 - Wed, 5 Dec 2012 06:18:36 +0100 - ngircd protocol module: improved vhost support
Revision 7a865b6 - Sun, 2 Dec 2012 04:31:50 -0500 - Only bad-password users when the account theyre trying to identify for actually exists
Revision faaaae3 - Sun, 2 Dec 2012 09:16:40 +0100 - enc_sha256: the length of the digest is SHA256_DIGEST_SIZE, not SHA256_BLOCK_SIZE. also removed an unneeded trailing NULL byte.
Revision 705d1ef - Fri, 30 Nov 2012 20:49:59 -0500 - Allow services to return more than one NS record
Revision c0f60d5 - Fri, 30 Nov 2012 20:44:21 -0500 - Change /os reload to not unnecessarially rebuild httpd servers. Change m_httpds Log methods to the module version.
Revision a4468dd - Fri, 30 Nov 2012 02:53:03 -0500 - Allow modules to use the encryption modules to encrypt arbitrary things. Made enc_old depend on enc_md5. Allow not loading any encryption modules if you want to only use an external mechanism. Removed ns_sendpass since it's just a bad idea.
Revision 337f361 - Thu, 29 Nov 2012 17:03:53 -0500 - Fix warnings from classes with virtual functions not having virtual destructors
Revision 26a048e - Wed, 28 Nov 2012 22:54:26 -0500 - Rewrite/simplify some of m_httpd
Revision ccd41e7 - Wed, 28 Nov 2012 00:42:07 -0500 - Use signon for svid on bahamut, not timestamp
Revision a1a5ba0 - Tue, 27 Nov 2012 21:43:17 -0500 - Use signon for svid on unreal, not timestamp
Revision 8a6962f - Mon, 26 Nov 2012 23:09:26 -0500 - Keep track on what ircds we can svsjoin, add an svspart method
Revision f23bad1 - Mon, 26 Nov 2012 19:50:29 -0500 - Revert a small part of 90930619bc124e94bac5048c0b13c3f4748b559d, evidently this was important
Revision 1bfafd9 - Mon, 26 Nov 2012 04:30:30 -0500 - Fixed rehasing doing weird things to botmodes due to trying to set on nick not uid
Revision 1bdb756 - Sun, 25 Nov 2012 22:37:54 -0500 - Restrict the length of kick reasons in cs_kick, cs_ban, and cs_akick
Revision 80c573e - Sun, 25 Nov 2012 21:47:10 -0500 - Merge remote branch 'cronus/1.9+unrealtokens' into 1.9
Revision 78607ea - Sun, 25 Nov 2012 20:35:45 -0600 - Remove UnrealIRCd's TOKENS, they are kinda useless
Revision 0110214 - Sun, 25 Nov 2012 20:58:35 -0500 - Fix build the last arg on fantasy commands to chanserv
Revision 54d8695 - Sun, 25 Nov 2012 20:36:57 -0500 - Add commented command{} blocks for how 1.8 worked, don't show saset in the help list to registered users.
Revision a2441fd - Sun, 25 Nov 2012 19:47:09 -0500 - Rename restoreonghost in nickserv.conf
Revision 831a1d1 - Sun, 25 Nov 2012 19:41:36 -0500 - Merge ns_ghost, ns_recover, and ns_release. Fix svskilling users on Unreal.
Revision 6b5df8e - Sun, 25 Nov 2012 05:44:31 +0100 - added a config block for cs_seen in chanserv.example.conf
Revision 0210cf2 - Sat, 24 Nov 2012 21:22:32 -0500 - Make the actual clients into services too
Revision f070834 - Sat, 24 Nov 2012 19:10:07 -0500 - Fix parsing fjoin on inspircd
Revision a44bf31 - Sat, 24 Nov 2012 17:19:08 -0500 - Helps to name ping right
Revision 002f00d - Sat, 24 Nov 2012 02:15:19 -0500 - Add IP.Board m_sql_authentication query to modules.example.conf, from Genesis2001
Revision ded89b0 - Fri, 23 Nov 2012 23:10:41 -0500 - Made IRCDProto a Service
Revision 36b1166 - Fri, 23 Nov 2012 16:56:06 -0500 - Change the return type of ircdmessage to void now that we don't use it, add an ircd message module event, and a few more fixups
Revision 0e7bd9f - Thu, 22 Nov 2012 20:27:42 -0500 - Fix compile/pch generation
Revision 7963534 - Thu, 22 Nov 2012 21:44:51 +0100 - fixed some compile errors
Revision d33a0f7 - Thu, 22 Nov 2012 00:50:33 -0500 - Pretty large coding style cleanup, in source doc cleanup, and allow protocol mods to depend on each other
Revision 368d469 - Sun, 18 Nov 2012 10:34:35 +0100 - added METADATA and vhost support to the ngircd protocol module
Revision efd3c04 - Sun, 18 Nov 2012 09:50:23 +0100 - fixed a typo in IRCDMessageSetName in the unreal protocol module
Revision 5fe6f0b - Fri, 16 Nov 2012 00:06:07 -0500 - This should be find, not find_first_of
Revision 5d6fb24 - Fri, 16 Nov 2012 00:03:15 -0500 - Fixed some stuff spotted by Cronus, made db_old convert ACCESS_INVALID levels to ACCESS_FOUNDER, fix cs_enforce +R from an earlier commit, fixed ChangeModeInternal TS checking when IRCds don't send TS on mode
Revision ad3d1d3 - Sat, 10 Nov 2012 13:57:06 -0500 - Never log debug levels >= 2 using a log block
Revision b51f60c - Sat, 10 Nov 2012 13:57:06 -0500 - Fix user account logout message
Revision 504232b - Sat, 10 Nov 2012 18:29:35 +0100 - added support for the ngircd SQUERY command
Revision 8f36f65 - Fri, 9 Nov 2012 19:20:17 -0500 - Made access del and xop del behave like access add/xop add by using a users mask if given an unregistered nick
Revision ff3e396 - Fri, 9 Nov 2012 19:13:33 -0500 - Add a config option to disable sasl
Revision 2fe387b - Wed, 7 Nov 2012 23:23:02 -0500 - Update bi->lastmsg in cs_log when something is logged via privmsg
Revision 9ec482b - Wed, 7 Nov 2012 22:20:48 -0500 - I haven't a clue why this was here but its not even remotely right.. fixes #1448
Revision 53e8cd1 - Wed, 7 Nov 2012 21:57:31 -0500 - Duplicate check some of these larger hashmaps on insert, just incase
Revision ac57f41 - Wed, 7 Nov 2012 19:36:59 -0500 - We no longer have to use the rungroup provided at build time, it is specified in the config now
Revision 8b78b6b - Wed, 7 Nov 2012 15:41:49 -0500 - Fix crash on suspend etc if kicking a user causes the service bot to part when the service bot is next in the userlist (as we have an iterator to it)
Revision 52fa668 - Wed, 7 Nov 2012 15:17:58 -0500 - Give suspend the correct permission in botserv.conf, fix pch build
Revision 72eb2cc - Tue, 6 Nov 2012 11:02:12 -0500 - Sometimes capab is sent as one parameter
Revision 4cfd468 - Tue, 6 Nov 2012 11:02:12 -0500 - Made os_noop more useful
Revision 0cf8d73 - Tue, 6 Nov 2012 11:02:12 -0500 - Added log messages for all of the other chanserv commands that should be logged
Revision 53b2bdf - Tue, 6 Nov 2012 11:02:12 -0500 - Use std::tr1::unordered_map for a few of the larger maps
Revision 27ab6a6 - Tue, 6 Nov 2012 11:02:12 -0500 - Windows fixes
Revision 22c8297 - Tue, 6 Nov 2012 15:19:56 +0000 - Added chanserv/status to fantasy commands
Revision d22e863 - Mon, 5 Nov 2012 15:59:11 -0500 - Catch the exception from /os session view invalidip
Revision fb56b3a - Sat, 3 Nov 2012 22:04:19 -0400 - Made m_xmlrpc use m_httpd
Revision 0c47017 - Sat, 3 Nov 2012 09:40:01 +0100 - added support for SVSNICK in the ngircd protocol module
Revision 792091b - Fri, 2 Nov 2012 18:35:33 +0100 - cs_seen: do not read duplicate SeenInfo entries from the database
Revision b917361 - Thu, 1 Nov 2012 16:26:59 -0400 - Fix pch generation
Revision a0a54fd - Thu, 1 Nov 2012 16:15:44 -0400 - Expand options:hideprivilegedcommands to not show commands requiring authentication to unidentified users
Revision d90d5d5 - Thu, 1 Nov 2012 14:54:14 -0400 - Fixed operserv/umode serv help entry
Revision c2ae762 - Thu, 1 Nov 2012 14:47:23 -0400 - Made db_old load exceptions.db
Revision 9aa71af - Thu, 1 Nov 2012 14:47:23 -0400 - Accept 1.8s svid ts on plexus too
Revision b64abeb - Thu, 1 Nov 2012 14:47:23 -0400 - Made os_logsearch search oldest logs first so the newest entries are at the bottom of the list
Revision 9093061 - Thu, 1 Nov 2012 14:47:23 -0400 - Fixed quite a bit of dumbness with m_ssl. Had to modify socketengines to allow polling for write & no read, but is it cleaner now. Made m_httpd able to listen using SSL.
Revision 5b1c823 - Thu, 1 Nov 2012 05:28:57 +0100 - fixed importing mode locks in db_old
Revision b2b4f21 - Wed, 31 Oct 2012 23:11:06 -0400 - Clarify the path given to Config isnt actually the bin path, but the path Anope is installed to
Revision 22e5516 - Wed, 31 Oct 2012 22:57:11 -0400 - Fixed anopesmtp logging
Revision 35c2256 - Wed, 31 Oct 2012 17:37:19 -0400 - Apparently sending this all at once didn't work that great, so wait for the events before sending the joins/modes etc
Revision 3a10fca - Wed, 31 Oct 2012 12:37:43 -0400 - Fix ns_ghost and ns_recover, add nicksev:restoreonghost
Revision a39947c - Tue, 30 Oct 2012 22:07:15 -0400 - Made os_forbid honor nssecureadmins
Revision 1730bfb - Tue, 30 Oct 2012 21:22:10 -0400 - Send uids everywhere when setting modes on clients
Revision 26a4a13 - Tue, 30 Oct 2012 20:40:42 -0400 - Made os_mode a bit smarter
Revision 36f357c - Tue, 30 Oct 2012 17:10:31 -0400 - Fixed build errors and warnings with -std=c++11
Revision b07928e - Tue, 30 Oct 2012 15:50:39 -0400 - Clean up ngircd proto mod slightly, and send sqlines before introducing clients
Revision 1ef7480 - Tue, 30 Oct 2012 15:21:47 -0400 - Fix inspircd mode message for channel modes. It never actually uses this, but other pseudoservers may send modes using this and not fmode (it has no timestamp)
Revision e4c2dcc - Mon, 29 Oct 2012 21:51:34 -0400 - Made db_old load up most of the old mode locks
Revision 7bdad85 - Mon, 29 Oct 2012 21:28:43 -0400 - Only show mode lock in /cs info if there really is a mode lock
Revision c2a8ad2 - Mon, 29 Oct 2012 17:47:26 -0400 - Fix formatting fail in cs_status
Revision fedf235 - Mon, 29 Oct 2012 17:07:10 -0400 - Update Config.cs for VS 2012 and fix it failing if the source directory path has spaces in it
Revision e88d2c2 - Mon, 29 Oct 2012 16:40:19 -0400 - Make it so CMake doesn't complain if packing on a system using Visual Studio Express.
Revision 20e4685 - Mon, 29 Oct 2012 14:54:49 -0400 - Readd cs_status
Revision ca55e15 - Mon, 29 Oct 2012 14:06:42 -0400 - Fix building under Mac OS X via Makefiles if not using an Xcode project. This is a hack but CMake currently provides no other way to determine if the detected C++ compiler was identified as Clang.
Revision bb5e412 - Mon, 29 Oct 2012 13:51:38 -0400 - Made MailThread completely threadsafe, currently theres a race condition with config reload + sending mail at once
Revision 30028a2 - Mon, 29 Oct 2012 13:46:21 -0400 - This include is unncessary
Revision 6883309 - Mon, 29 Oct 2012 13:46:21 -0400 - Made anopesmtp less hard to debug
Revision 9c8570a - Mon, 29 Oct 2012 04:17:24 +0100 - readded ngircd protocol support
Revision 4dfc0f9 - Sat, 27 Oct 2012 12:09:07 -0400 - Fix cmake generation due to this if not being updated.
Revision d6e1b92 - Sat, 27 Oct 2012 08:12:04 -0400 - Add a module log type
Revision bb5f455 - Sat, 27 Oct 2012 05:34:36 -0400 - Ues timestamp for dns serial not yyyymmddnn.. there are too many problems with this (restarts, >99 zone updates/day, etc)
Revision 32d33ca - Sat, 27 Oct 2012 04:44:10 -0400 - Expand single digit serial revisions to match nn
Revision e1dcf24 - Fri, 26 Oct 2012 17:30:41 -0400 - Add nickserv:modesonid config option to set what modes users get on identify
Revision 3b24311 - Fri, 26 Oct 2012 12:57:25 -0400 - Sometimes zone transfers can be really big
Revision 8fd3fc7 - Fri, 26 Oct 2012 10:46:19 -0400 - Add sasl support to unreal, inspircd
Revision 8d27b25 - Fri, 26 Oct 2012 00:55:04 -0400 - Don't attempt to process any query packets if we aren't explicitly given permission to bind to a port (we do anyway currently for m_dnsbl to get replies)
Revision 727b355 - Thu, 25 Oct 2012 23:44:34 -0400 - This code isn't used
Revision bbe667d - Thu, 25 Oct 2012 22:29:10 -0400 - Fixed two memory leaks in cs_seen
Revision 3608d42 - Thu, 25 Oct 2012 22:26:59 -0400 - This version needs a better tag than "-git", so there.
Revision 8f33933 - Thu, 25 Oct 2012 21:31:58 -0400 - Default xlines to be set by OperServ
Revision e5efe42 - Thu, 25 Oct 2012 04:30:22 -0400 - Fixed showing users from the right server on unreal/bahamut
Revision 10e21bf - Thu, 25 Oct 2012 01:30:41 -0400 - Fix handling clients on unreal that have no ip (it sends a *)
Revision 00256fd - Wed, 24 Oct 2012 23:30:21 -0400 - Made access provider modules permanent. They don't cleanup their access entries currently and if they did it would delete them.
Revision 3b8fb7b - Wed, 24 Oct 2012 22:48:12 -0400 - When db_sql_live gets new objects immediately update cache on them to prevent rewriting later if they aren't changed
Revision 1057fa8 - Wed, 24 Oct 2012 19:32:26 -0400 - BIND's forward ability did not work as I expected because it will not forward non recursive queries. So, added support for SOA, NS, and AXFR requests.
Revision fca9ec0 - Wed, 24 Oct 2012 07:40:16 -0400 - InspIRCd: Add handler for FIDENT to 2.0 protocol, so we know when someone changes ident on the network
Revision ef5c668 - Wed, 24 Oct 2012 05:12:47 +0200 - Merge branch '1.9' of ssh://anope.git.sourceforge.net/gitroot/anope/anope into 1.9
Revision e0438e3 - Wed, 24 Oct 2012 05:12:13 +0200 - fixed calculating the correct channelcount for an user when loading the db. fixes bug #1450
Revision 04632bd - Mon, 22 Oct 2012 17:02:01 -0400 - Cleanup of last few commits/warning fix
Revision 0b9db15 - Mon, 22 Oct 2012 00:54:30 -0400 - Add os_dns, a way to control your DNS zone via services
Revision d5b2f9c - Sun, 21 Oct 2012 18:29:10 +0200 - Base has to destruct before Extensible does because objects that destruct due to Extensible destructing don't have their references to the already destroyed object for Base invalidated. (fixed for NickAlias and NickCore)
Revision 727c3d5 - Thu, 18 Oct 2012 20:06:02 -0400 - Base has to destruct before Extensible does because objects that destruct due to Extensible destructing don't have their references to the already destroyed object for Base invalidated
Revision eddb768 - Wed, 17 Oct 2012 20:22:44 -0400 - Fixed protoctl parsing on Unreal + fix SendLogout now the usage has changed
Revision 484baba - Mon, 15 Oct 2012 03:54:26 -0400 - Actually show the correct number of entries on /os logsearch output
Revision 88f10a2 - Sun, 14 Oct 2012 20:13:41 +0200 - Updated the hybrid protocol module, patch provided by Michael - Change mode handler to use UIDs within SVSMODE messages - The IP can be 0 in UID messages depending whether or not a client is spoofed - Removed SendGlobopsInternal handler. Anope is using GLOBOPS by default - Set user's services timestamp/account to 0 instead of 1 on /ns logout, otherwise the UID message handler will
Revision ffa1c97 - Sun, 14 Oct 2012 01:50:14 -0400 - Use account name for svid on hybrid
Revision 4fdc157 - Sun, 14 Oct 2012 01:05:24 -0400 - Better clarify signon vs timestamp and allow updating users timestamp to an ircd given value from NICK
Revision 0a95066 - Sat, 13 Oct 2012 23:49:15 -0400 - Add a hybrid 8 protocol module courtesy of Michael <michael@wobst.at>
Revision 1232018 - Sat, 13 Oct 2012 06:21:53 -0400 - Allow services operators to modify/view other users autojoin lists
Revision 6237613 - Sat, 13 Oct 2012 00:40:44 -0400 - And update modules.example.conf
Revision 4424abd - Sat, 13 Oct 2012 00:37:10 -0400 - Add m_sql_oper
Revision 76a0471 - Sat, 13 Oct 2012 00:37:10 -0400 - Simplify the db_sql_live code since this isn't actually necessary. Fixes a problem internally ovwrwriting data on objects that we have modified and are queued because of assigning something to a serialize_obj reference
Revision e08422a - Fri, 12 Oct 2012 22:47:35 +0200 - fixed MODE handling in the ratbox protocol module
Revision 757ff06 - Wed, 10 Oct 2012 23:08:00 -0400 - Fix m_ldap to reconnect automatically if the ldap server goes away
Revision 06defe0 - Tue, 9 Oct 2012 19:34:24 -0400 - Merge remote branch 'attila/1.9+topiclockmsg' into 1.9
Revision 63bf134 - Tue, 9 Oct 2012 19:34:11 -0400 - Merge remote branch 'attila/1.9+msgfix' into 1.9
Revision 2113494 - Tue, 9 Oct 2012 19:33:24 -0400 - Send privmsgs and notices to uids if applicable
Revision 912f068 - Tue, 9 Oct 2012 23:31:20 +0200 - Fix wrong error message when --dbdir has no argument
Revision 8f5d786 - Tue, 9 Oct 2012 05:22:02 -0400 - Cleanup ok if modules with pending identify requests are unloaded
Revision 1dacc64 - Tue, 9 Oct 2012 04:13:04 -0400 - Made the warnings given by cmake for not having the dependencies for modules look less scary as they confuse dumb people currently
Revision 3af786d - Mon, 8 Oct 2012 20:58:47 -0400 - Fix fantasy !help & give it its own help header, not ChanServ's
Revision e57b470 - Mon, 8 Oct 2012 04:16:23 -0400 - Made fantasy commands configurable
Revision b8b63ff - Sun, 7 Oct 2012 22:39:58 -0400 - Remove the asynchronous identifing hack and replace it with something better. Fixes m_*_authentication only being able to properly work when people identify normally using nickserv/identify
Revision 959a3f3 - Sun, 7 Oct 2012 11:49:38 +0200 - InspIRCd: Log when server-side topiclocking is enabled in the config but the module is not loaded
Revision 0a111c1 - Sun, 7 Oct 2012 02:13:14 -0400 - Fix compile from bda3b1fa3a396e19fb04eda2f66d246e49572c20
Revision 4b68f04 - Sun, 7 Oct 2012 08:00:31 +0200 - updated docs/LANGUAGE to point to the right directory where users should put module language files
Revision 31914b2 - Sun, 7 Oct 2012 01:46:44 -0400 - Merge remote branch 'remotes/attila/1.9+addline' into 1.9
Revision ebb3fca - Sun, 7 Oct 2012 01:45:43 -0400 - Release holds on a nick on identify, if there is one
Revision 7f72b46 - Sun, 7 Oct 2012 01:29:49 -0400 - Set sane default last_topic_setter and last_topic_time in the event an empty topic is locked right after registering a channel without previously being set
Revision 4751c73 - Sat, 6 Oct 2012 22:54:52 -0400 - Fixed module language file path
Revision bda3b1f - Sun, 7 Oct 2012 03:15:42 +0200 - InspIRCd: Make functions that send ADDLINE and DELLINE, call them from the rest of the module
Revision 4ec10d7 - Sat, 6 Oct 2012 20:11:47 -0400 - Fixups and cleanup for the last few commits
Revision 3dd21e4 - Sun, 7 Oct 2012 01:35:14 +0200 - InspIRCd: Add support for server side topic locks using METADATA topiclock
Revision 682d768 - Sun, 7 Oct 2012 01:33:49 +0200 - InspIRCd: Add support for sending detecting m_topiclock and sending SVSTOPIC when it is available
Revision 42aa367 - Sun, 7 Oct 2012 01:32:31 +0200 - InspIRCd: Send channel METADATA using a dedicated function
Revision ec8a1bc - Sun, 7 Oct 2012 00:59:49 +0200 - Add a config option for server side topic locks
Revision 2d9541c - Sat, 6 Oct 2012 02:18:48 -0400 - Parse and store the spanningtree protocol version for InspIRCd
Revision e747ba6 - Sat, 6 Oct 2012 02:06:23 -0400 - InspIRCd: Add metadata handler to recognize when a module is loaded or unloaded on the ircd side and adjust our behavior accordingly
Revision 4431a34 - Sat, 6 Oct 2012 02:06:23 -0400 - InspIRCd: Allow METADATA handler to differentiate between user, channel and other/server metadata
Revision 14d7de0 - Sat, 6 Oct 2012 02:06:18 -0400 - InspIRCd: Remove has_svshold, use IRCDProto::CanSVSHold
Revision cd28fdc - Sat, 6 Oct 2012 01:01:45 -0400 - Show the correct reciever nick when use strict privmsg is enabled
Revision 25fe9c7 - Fri, 5 Oct 2012 16:23:40 -0400 - Do not process() socket engine on shutdown
Revision 94fc2ba - Fri, 5 Oct 2012 15:15:50 +0100 - Merge branch '1.9' of ssh://anope.git.sf.net/gitroot/anope/anope into 1.9
Revision 2f87b8e - Fri, 5 Oct 2012 15:14:19 +0100 - Revert this strangeness I created ;)
Revision eff61c7 - Fri, 5 Oct 2012 05:03:55 -0400 - Add an event for when nick or channel options are set
Revision 7c96227 - Fri, 5 Oct 2012 01:20:32 -0400 - Use memcpy for Anope::Unhex not strcpy
Revision dcfae63 - Wed, 3 Oct 2012 21:22:03 +0100 - Some minor fixes/typos
Revision 69437bb - Wed, 3 Oct 2012 05:17:32 -0400 - Fixed parsing squit (it has a reason)
Revision 7551245 - Tue, 2 Oct 2012 23:30:31 -0400 - Attempt #2 at silly topic ts thing, this is actually must cleaner
Revision 47bc551 - Tue, 2 Oct 2012 22:59:20 -0400 - Revert "Fix topiclock on inspircd"
Revision 8747818 - Tue, 2 Oct 2012 22:16:35 -0400 - Fix topiclock on inspircd
Revision 7042223 - Tue, 2 Oct 2012 21:21:37 -0400 - Somehow the kick handler got lost in the confusion. Send the topic time with ftopic on inspircd not the current time. Removed some unneeded protocol functions
Revision 93698f0 - Tue, 2 Oct 2012 05:18:42 -0400 - Added operserv/logsearch
Revision f7aa837 - Tue, 2 Oct 2012 01:30:35 -0400 - Don't unassociate accounts with users on nick changes
Revision e1d1d18 - Tue, 2 Oct 2012 05:36:31 +0200 - added an operserv/akill page to webcpanel
Revision 20a6f82 - Tue, 2 Oct 2012 05:35:44 +0200 - modified the nickserv alist command to return nc->display instead of the parameter provided by the user
Revision aec6cac - Tue, 2 Oct 2012 04:14:50 +0200 - Merge branch '1.9' of ssh://anope.git.sourceforge.net/gitroot/anope/anope into 1.9
Revision ffca6a7 - Tue, 2 Oct 2012 04:11:52 +0200 - fixed a small bug in the inspircd protocol modules
Revision 2d2ab4f - Mon, 1 Oct 2012 21:26:41 -0400 - Fixed handling TOPIC on unreal, dont set topics in Channel::Reset unless we are synced, and fixed ts checking in Channel::SetModesInternal
Revision a434bae - Mon, 1 Oct 2012 18:50:29 -0400 - Allow modules to store data in their own databases.
Revision f14a3df - Mon, 1 Oct 2012 04:35:36 -0400 - Fix a few problems found by Cronusa and KindOne
Revision b19a3af - Mon, 1 Oct 2012 02:29:31 -0400 - Add networkinfo:chanlen config directive
Revision 89428a9 - Mon, 1 Oct 2012 01:56:57 -0400 - Cleanup of all of the protocol modules, rewrote message handling system to be a bit more C++ ish
Revision b937d63 - Sun, 30 Sep 2012 21:36:49 -0400 - timestamp column is a special case too
Revision ad37bc9 - Sun, 30 Sep 2012 20:30:27 -0400 - Bug #1445 - Empty out columns in SQL we have no data for on insert. This is caused from serialize() only setting a key on certain conditions and otherwise doing nothing at all.
Revision 56df1ab - Sun, 30 Sep 2012 20:30:27 -0400 - Place runtime module binaries in data/runtime instead of lib/ incase of a system wide install where lib/ is not writable
Revision 0ea5e57 - Sun, 30 Sep 2012 20:30:27 -0400 - Use RTLD_NOW when loading modules to resolve all symbols immediately. This prevents modules with unresolved symbols from loading instead of loading and crashing later.
Revision 3838eb1 - Sun, 30 Sep 2012 20:30:27 -0400 - Add webpanel contributors to readme and remove todo since its way out of date and has nothing more in it we want
Revision 9ba7196 - Sun, 30 Sep 2012 20:30:27 -0400 - Make CommandSource use references, sometimes we hold them for awhile
Revision 1e71303 - Sun, 30 Sep 2012 13:58:17 +0200 - fixed nickserv alist
Revision 74117a1 - Sat, 29 Sep 2012 23:55:55 +0100 - added some example sql queries
Revision 38ad523 - Mon, 24 Sep 2012 15:54:49 -0400 - Fix a few oddball warnings that came up from clang, and also make it so webcpanel.so can be compiled under Mac OS X.
Revision a71e2fb - Sun, 23 Sep 2012 20:57:35 +0200 - make nickserv glist check if the given nickname is in the group of the user before checking for services oper
Revision 1b20ec8 - Sat, 22 Sep 2012 04:18:41 -0400 - Forgot to delete a line in the last commit.
Revision d30e53e - Sat, 22 Sep 2012 03:45:51 -0400 - OK, so the FIND sub-command of string() in CMake was only added with 2.8.5, change this to use the REGEX sub-commands instead. Also while I'm at it, make -pthread only get added when not on Mac OS X, it's auto-included there.
Revision aa57ad6 - Sat, 22 Sep 2012 02:10:49 -0400 - Fix issues with CMake trying to add /System/Library/Frameworks/Kernel.framework/Headers/sys to the include paths.
Revision 097893b - Thu, 13 Sep 2012 15:29:04 +0100 - Updated example query to include a valid value
Revision 16019c9 - Wed, 12 Sep 2012 21:10:02 -0400 - Add m_sql_authentication to allow authenticating users against an external SQL database
Revision f391100 - Mon, 10 Sep 2012 21:39:04 -0400 - Fixed gettext on freebsd/any other system that uses LANG not LANGUAGE
Revision c4a1e1b - Sat, 8 Sep 2012 04:51:44 -0400 - Fixed os_defcon too
Revision 7e3b5be - Fri, 7 Sep 2012 23:44:15 -0400 - Add chanserv/set/autoop, like nickserv/set/autoop but for channels
Revision c9c477f - Fri, 7 Sep 2012 22:27:28 -0400 - These saset command stubs can go away
Revision 4eb7db8 - Fri, 7 Sep 2012 21:22:19 -0400 - Fix os_session to really use ips for quits, don't enforce session for spoofed users/other users who have no ip, clean up warnings
Revision 9d6626f - Fri, 7 Sep 2012 12:04:25 -0400 - Made session tracking ip based, not host based, and allow using CIDR to group multiple ips from one subnet to one session
Revision 5c07863 - Fri, 7 Sep 2012 08:46:28 -0400 - Allow configuring killquick and kill delays
Revision 3060375 - Fri, 7 Sep 2012 06:52:56 -0400 - Fixed m_ldap_authentication not returning anything if the search for an account game back empty
Revision 3c63e44 - Fri, 7 Sep 2012 05:59:28 -0400 - Allow ; and } in quoted strings
Revision 02d943b - Wed, 5 Sep 2012 02:56:59 -0400 - Not quite sure what I was thinking here
Revision 4c8fef2 - Mon, 3 Sep 2012 11:05:17 +0200 - updated example.conf
Revision 082cf8a - Sun, 2 Sep 2012 22:56:17 -0400 - Windows cares this is escaped + chmod too
Revision 1fd1938 - Sun, 2 Sep 2012 22:39:05 -0400 - Fix CMake to actually make directories on install .....
Revision b1f8e91 - Sun, 2 Sep 2012 09:48:13 -0400 - Version bump for 1.9.8-git
Revision 81cf9f0 - Sun, 2 Sep 2012 08:31:43 -0400 - Anope 1.9.7 Release
Revision 3264669 - Sun, 2 Sep 2012 08:31:34 -0400 - Update version.log
Revision 271d723 - Sun, 2 Sep 2012 08:31:11 -0400 - Update Changes
Revision a0c4575 - Sun, 2 Sep 2012 08:31:04 -0400 - Regenerate language files
Revision 1af64a9 - Sun, 2 Sep 2012 08:30:54 -0400 - Fix Windows
+260 -252
View File
@@ -1,339 +1,347 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
Preamble
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the entire
whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three years,
to give any third party, for a charge no more than your cost of
physically performing source distribution, a complete machine-readable
copy of the corresponding source code, to be distributed under the terms
of Sections 1 and 2 above on a medium customarily used for software
interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is allowed
only for noncommercial distribution and only if you received the program
in object code or executable form with such an offer, in accord with
Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent license
would not permit royalty-free redistribution of the Program by all those
who receive copies directly or indirectly through you, then the only way
you could satisfy both it and this License would be to refrain entirely
from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is implemented
by public license practices. Many people have made generous contributions
to the wide range of software distributed through that system in reliance
on consistent application of that system; it is up to the author/donor to
decide if he or she is willing to distribute software through any other
system and a licensee cannot impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
This section is intended to make thoroughly clear what is believed to be
a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Programs
END OF TERMS AND CONDITIONS
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
How to Apply These Terms to Your New Programs
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make
it free software which everyone can redistribute and change under
these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
<one line to give the program's name and an idea of what it does.>
Copyright (C) yyyy name of author
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 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.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
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., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
type `show w'. This is free software, and you are welcome
to redistribute it under certain conditions; type `show c'
for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
+24
View File
@@ -1,3 +1,27 @@
Anope Version 1.9.9
--------------------
A Added a better webpanel template, removed the old one
A Added SQL logging support
A Added Redis database support
A Added ability to configure what privileges XOP commands give
U Updated Dutch language file, from Robby <robby@chat.be>
U Updated Spanish langauge file, from Isaac Fontal <i_fontal@hotmail.com>
F Fix build on Solaris and OSX
F Fixed setting BotServ's default settings in the config
F Fixed some names of config items, including NickServ's kill protect
Anope Version 1.9.8
--------------------
A Ability to configure fantasy commands in the config
A Add SVSJOIN and SVSPART commands
F Fix "leave" channel log level from not logging
F Fix users able to "resend" their registration mail with registration set to admin only
F Fix build on OpenBSD
F Fix not logging debug logs to the logfile when debug mode is enabled
F Fix defcon timeout timer
F Fix crash in os_forbid with expiring entries
F Fix several issues with db_sql_live
Anope Version 1.9.7
--------------------
A Added ability for using regex as patterns for various commands
+17
View File
@@ -1,3 +1,20 @@
Anope Version 1.9.9
-------------------
There is not many config changes betewen 1.9.8 and 1.9.9, however many of the
options have been moved around to make more sense, too many to list here,
so get a new config.
Anope Version 1.9.8
-------------------
networkinfo:chanlen added
options:user and options:group added
nickserv:modesonid added to set modes on everyone who identifies
nickserv:kill and nickserv:killquick added to configure NickServ's kill timeout
nickserv:restoreonrecover added to try to restore a user's session after a ghost
command:group added
fantasy block added
dns block has been moved to modules.conf as a part of m_dns
Anope Version 1.9.7
-------------------
operserv:notifications removed in favor of log{} blocks
+14 -21
View File
@@ -9,34 +9,27 @@ Anope Internal Events
Internal Events are setup to give module developers more information
about what the core is doing at different times. This information can
be as complex as data we are feeding to the uplink, to simple triggered
events such as the databases being saved.
events such as the databases being saved.
Additionally there is a module included with the core
which can provide some clue as to how to use the code in your modules.
which can provide some clue as to how to use the code in your modules.
The rest of this document assumes that you are used to writing modules.
2) Using Events
Anope is told about modules wanting to hook to events by the function
ModuleManager::Attach(EventName, Module*);, eg:
ModuleManager::Attach(I_OnJoinChannel, this);
You can also specifcy an array of events:
Implementation i[] = { I_OnJoinChannel, I_OnPartChannel };
ModuleManager::Attach(i, this, 2);
Where 2 is the number of events in the list
You must then overload these functions in your main modules class.
Each Event in Anope calls a function.
You must override these functions in your main modules class.
The full list of functions and parameters are in modules.h. In this
case, you would be overloading OnJoinChannel() and OnPartChannel() like so:
case, you would be overriding OnJoinChannel() and OnPartChannel() like so:
void OnJoinChannel(User *u, Channel *c) { }
void OnPartChannel(User *u, Channel *c) { }
void OnJoinChannel(User *u, Channel *c) anope_override { }
void OnPartChannel(User *u, Channel *c) anope_override { }
Some of these events can be used to prevent or allow things to happen that
would normally not be allowed or denied. You can also use ModuleManager
(not explained here) to set control which order the modules are queried
(when multiple modules hook to the same event).
Some of these event overrides can be used to prevent or allow things to
happen that would normally not be allowed or denied. You can also use
ModuleManager (not explained here) to set control which order the modules
are queried (when multiple modules hook to the same event).
The "anope_override" identifier is for compatibility with C++11.
Its usage is highly recommended.
+8 -61
View File
@@ -80,15 +80,6 @@ Note: You should also read the README and FAQ files!
2) Upgrading Anope
If you got a .diff file and want to patch the old Anope sources with it,
do the following:
* Copy the .diff file into the root Anope sources directory.
* Type patch -p1 <file.diff
Note that upgrading anope with a patchfile isn't recommended. You should
download a new, clean source package, as this will give the best results.
To upgrade Anope, just follow the installation instructions described in
section 1. There are however a few specific guidelines:
@@ -99,63 +90,19 @@ Note: You should also read the README and FAQ files!
3) Setting up the IRCd
Services acts as an IRC server with pseudo-clients on it. To link them to
your network, you'll need to add some lines in the ircd.conf of their hub
server (as stated in the RemoteServer configuration directive).
your network, you'll need to configure your IRCd to allow services to link.
For samples below we'll take services.localhost.net as the name of the
Services (as stated in the ServerName configuration directive). Note that
this samples are made to be as generic as possible, but there might be
small variations, depending on your IRCd. For IRCd-specific help with
configuration, read near the end of this section.
The configuration varies depending on the IRCd, but you will probably need
a link block (also called connect block, or C line), a U line (also called
a shared block), and be sure that the IRCd is listneing on the given port
in the link block.
First, the C/N lines, that allow Services to link. They also need a
Y:line to work correctly.
Y:27:180:0:0:4000000
C:127.0.0.1:mypass:services.localhost.net::30
N:127.0.0.1:mypass:services.localhost.net::30
"mypass" is the same password you mentioned in the RemoteServer
configuration directive. 127.0.0.1 is the IP from which Services connect
from (linking in localhost is the most efficient way to run Services).
Then, you have to set-up an U:line, that will allow Services to change
channel modes, topics, and much more without being opped in the channel.
U:services.localhost.net:*:*
NOTE: if you have more than one server in your network, this line MUST
be added on ALL servers, or things won't work correctly.
Finally, you'll need to add an H:line, to make the OperServ JUPE command
work correctly.
H:*::Services.LocalHost.Net
Example link configurations can be found in example.conf for some of the
popular IRCds.
Don't forget to /rehash your IRCd to apply changes.
A new trend in ircd configuration is popping all over the place, good
examples are the latest Hybrid, Unreal and Bahamut, which use a more
"readable" form of configuration. For those, use something like:
link services.localhost.net
{
username *;
hostname localhost;
bind-ip *;
port 6667;
hub *;
password-connect "mypass";
password-receive "mypass";
class servers;
};
Note that this block-style configuration files differ heavily, depending
on the IRCd. Consult the interactive link maker (link is below) for more
details on the exact configuration used by your IRCd.
If you're unable to get a link with your IRCd after reading this section,
you might try the interactive link maker, which is located at:
You may also try our interactive link maker, which is located at:
http://anope.org/ilm.php
+3 -3
View File
@@ -31,16 +31,16 @@ Anope Mutli Language Support
3) Using langages with modules
Module authors can easially add the ability to have their modules translated by adding _() around the strings they
Module authors can easily add the ability to have their modules translated by adding _() around the strings they
want translated (messages to the user, etc).
If you want to translate a module someone has made, first generate a .pot file if there isn't one already using
`xgettext -s -d modulename -o modulename.pot --from-code=utf-8 modulename.cpp`.
`xgettext -s -d modulename -o modulename.pot --from-code=utf-8 --keyword --keyword=_ modulename.cpp`.
The .pot file is a template of all of the language strings extracted from the source file.
Next, run msginit on the .pot file with
`msginit -l language -o modulename.language.po -i modulename.pot`.
Translate the new .po file and rerun ./Config; make && make install.
All .po and .pot files should be placed in modules/language/third. Additionally an update script is provided there
All .po and .pot files should be placed in modules/third/language. Additionally an update script is provided there
that will create .pot files and merge any changes to it with existing .po files.
+20 -13
View File
@@ -1,7 +1,7 @@
Anope -- a set of IRC services for IRC networks
-----------------------------------------------
Anope is 2003-2012 Anope Team <team@anope.org>.
Anope is 2003-2013 Anope Team <team@anope.org>.
Based on Epona 2000-2002 PegSoft <epona@pegsoft.net>.
Based on Services 1996-1999 Andrew Church <achurch@achurch.org>.
@@ -107,14 +107,18 @@ Table of Contents
Anope Translations:
* GeniusDex <geniusdex@anope.org> (nl.l)
* Kein <kein-of@yandex.ru> (ru.l)
* Maik Funke <Han@mefalcon.org> (de.l)
* Gabriel Acevedo H. <drstein@anope.org> (es.l)
* Janos Kapitany <sarkanyka@cjbchat.hu> (hun.l)
* Szymon S'wierkosz <szymek@adres.pl> (pl.l)
* Christopher N. <saka@epiknet.org> (fr.l)
* Yusuf Kurekci <ysfm.20@gmail.com> (tr.l)
* Robby <robby@chat.be> (nl_NL)
* Kein <kein-of@yandex.ru> (ru_RU)
* Maik Funke <Han@mefalcon.org> (de_DE)
* Isaac Fontal <i_fontal@hotmail.com> (es_ES)
* Janos Kapitany <sarkanyka@cjbchat.hu> (hu_HU)
* Szymon S'wierkosz <szymek@adres.pl> (pl_PL)
* Christopher N. <saka@epiknet.org> (fr_FR)
* Yusuf Kurekci <ysfm.20@gmail.com> (tr_TR)
Anope Web panel:
* Denis M. (Phr33d0m) <god@politeia.in>
2) Presentation
@@ -165,10 +169,13 @@ Table of Contents
Anope currently works with:
* Bahamut 1.4.27 or later (including 1.8)
* InspIRCd 1.1, 1.2, or 2.0
* Charybdis 3.4 or later
* Hybrid 8.1 or later
* InspIRCd 1.2 or 2.0
* ngIRCd 19.2 or later
* Plexus 3 or later
* Ratbox 2.0.6 or later
* UnrealIRCd 3.2 or later
* Plexus 3 or later
Anope could also work with some of the daemons derived by the ones listed
above, but there's no support for them if they work or don't work.
@@ -195,10 +202,10 @@ Table of Contents
--version Display the version of Anope
--nothird Do not load the non-core modules specified
--protocoldebug Debug each incoming message after protocol parsing
--support Used for support, same as -debug -nofork -nothird
--support Used for support, same as --debug --nofork --nothird
Upon starting, Anope will parse its command-line parameters then
(assuming the -nofork option is not given) detach itself and run in the
(assuming the --nofork option is not given) detach itself and run in the
background. If Anope encounters a problem reading the database files or
cannot connect to its uplink server, it will terminate immediately;
otherwise, it will run until the connection is terminated (or a QUIT,
+160
View File
@@ -0,0 +1,160 @@
Starting in Anope 1.9.9, Anope has Redis database support (http://redis.io/).
This document explains the data structure used by Anope, and explains how
keyspace notification works.
This is not a tutorial on how to use Redis, see http://redis.io/documentation
for that.
Table of Contents
-----------------
1) Data structure
2) Keyspace notifications
3) Examples of modifying, deleting, and creating objects
1) Data structure
There are 4 key namespaces in Anope, they are:
id - The keys in id are used to atomically create object ids for new
objects. For example, if I were to create a new BotInfo I would first:
redis 127.0.0.1:6379> INCR id:BotInfo
To get the object ID of the new object.
ids - The keys in ids contain a set of all object ids of the given type.
For example:
redis 127.0.0.1:6379> SMEMBERS ids:BotInfo
Returns "1", "2", "3", "4", "5", "6", "7", "8" because I have 8 bots that
have IDs 1, 2, 3, 4, 5, 6, 7, and 8, respectively.
hash - The keys in hash are the actual objects, stored as hashes. For
example, if I had just looked up all BotInfo ids and wanted to iterate
over all of them, I woulld start by:
redis 127.0.0.1:6379> HGETALL hash:BotInfo:1
Which gets all keys and values from the hash of type BotInfo with id 1.
This may return:
"nick" -> "BotServ"
"user" -> "services"
"host" -> "services.anope.org"
"created" -> "1368704765"
value - The keys in value only exist to aid looking up object IDs. They
are sets of object IDs and are used to map key+value pairs to objects.
For example:
redis 127.0.0.1:6379> SMEMBERS value:NickAlias:nick:Adam
Returns a set of object ids of NickAlias objects that have the key
'nick' set to the value 'Adam' in its hash. Clearly this can only
ever contain at most one object, since it is not possible to have
more than one registered nick with the same name, but other keys
will contain more than one, such as:
redis 127.0.0.1:6379> SMEMBERS value:NickCore:email:adam@anope.org
Which would return all accounts with the email "adam@anope.org".
redis 127.0.0.1:6379> SMEMBERS value:ChanAccess:mask:Adam
Which would return all access entries set on the account "Adam".
Behavior similar to SQL's AND, can be achieved using the
SINTER command, which does set intersection on one or more sets.
2) Keyspace notifications
Redis 2.7 (unstable) and 2.8 (stable) and newer support keyspace notifications
(http://redis.io/topics/notifications). This allows Redis to notify Anope of
any external changes to objects in the database. Once notified, Anope will
immediately update the object. Otherwise, Anope keeps all objects in memory
and will not regularly read from the databaes once started.
You can use this to modify objects in Redis and have them immediately reflected
back into Anope. Additionally you can use this feature to run multiple Anope
instances simultaneously from the same database (see also, Redis database
replication).
To use keyspace notifications you MUST execute
redis 127.0.0.1:6379> CONFIG SET notify-keyspace-events KA
OK
or set notify-keyspace-events in redis.conf properly. Anope always executes
CONFIG SET when it first connects.
If you do not enable keyspace events properly Anope will be UNABLE to see any
object modifications you do.
The key space ids and value are managed entirely by Anope, you do
not (and should not) modify them. Once you modify the object (hash), Anope will
update them for you to correctly refelect any changes made to the object.
Finally, always use atomic operations. If you are inserting a new object with
multiple commands, or inserting multiple objects at once, specifically if the
objects depend on each other, you MUST use a transaction.
3) Examples of modifying, deleting, and creating objects
These examples will ONLY work if you meet the criteria in section 2.
If I want to change the email account 'Adam' to 'Adam@anope.org', I would execute the following:
redis 127.0.0.1:6379> SMEMBERS value:NickCore:display:Adam
Which returns a value of "1", which is the object id I want to modify.
Now to change the email:
redis 127.0.0.1:6379> HSET hash:NickCore:1 email Adam@anope.org
You can now see this in NickServ's INFO command:
-NickServ- Email address: Adam@anope.org
If I want to drop the account "Adam", I would execute the following:
redis 127.0.0.1:6379> SMEMBERS value:NickCore:display:Adam
Which returns a value of "1". I would then check:
redis 127.0.0.1:6379> SMEMBERS value:NickAlias:nc:Adam
To see what nicknames depend on this account to exist, as I will
have to remove those too. This returns the values "2", and "3".
Finally, I can drop the nick using a transaction via:
redis 127.0.0.1:6379> MULTI
OK
redis 127.0.0.1:6379> DEL hash:NickAlias:2
QUEUED
redis 127.0.0.1:6379> DEL hash:NickAlias:3
QUEUED
redis 127.0.0.1:6379> DEL hash:NickCore:1
QUEUED
redis 127.0.0.1:6379> EXEC
Or alternatively simply:
redis 127.0.0.1:6379> DEL hash:NickAlias:2 hash:NickAlias:3 hash:NickCore:1
If I wanted to create a BotServ bot, I would execute the following:
redis 127.0.0.1:6379> INCR id:BotInfo
Which returns a new object ID for me, in this example it will be "8".
Now I can create the object:
HMSET hash:BotInfo:8 nick redis user redis host services.anope.org realname "Services for IRC Networks"
Note if you are using HSET instead of HMSET you will need to use a transaction, as shown in the above example.
If you are watching your services logs you will immediatly see:
USERS: redis!redis@services.anope.org (Services for IRC Networks) connected to the network (services.anope.org)
And the bot redis will be in BotServ's bot list.
Notice how ids:BotInfo and the value keys are updated automatically.
-25
View File
@@ -1,25 +0,0 @@
Legend:
x = done
? = unsure
+ = in progress
Future
------
[ ] NS IDENTIFY changes
[?] Last failed identify? Maybe more useful for sopers only, so users don't get unnecessarily worried
[?] Last successful login time/ip? perhaps both of these should be a new nick setting
[ ] NS SUSPEND: show suspender and reason, probably to sopers only (see CS SUSPEND)
[ ] Allow channel founders to change the fantasy trigger for their channel.
[+] CIDR Akills, session exceptions, etc
[?] Language charset stuff, including collation (1.9.1? phoenix?)
[?] a way for a module to queue itself (or even another module) for unloading
[+] Useful/common "third party" modules to core distro
[x] NS AJOIN
[x] CS ENTRYMSG
[?] Don't allow soper accounts to expire
[?] Reason for CS SET RESTRICTED
[ ] Unique IDs on each AKILL/blah so that networks may use them as ticket IDs
[ ] HS ACTIVATE -ALL (rob sez this all needs reviewing)
[ ] No nickname ownership?
[ ] More commands need to be split up such as /bs bot, /ms set, /bs kick, /bs set, /os set? etc.
[ ] Customize email messages
+2 -3
View File
@@ -16,9 +16,8 @@ Anope Bundled Tools
sendmailpath = "/home/anope/services/bin/anopesmtp 127.0.0.1"
If the SMTP client doesn't send mail, or if there's an other problem with
it, you can compile it in debug mode. To do this, open anopesmtp.cpp, and look
for "smtp_debug" near the top. Change this from 0 to 1 and recompile
the code. This should generate a log file of what happened when it tried
it, you can enable debug mode by passing the --debug flag after the server
address. This should generate a log file of what happened when it tried
to connect to the SMTP server.
Credits:
+5 -8
View File
@@ -25,12 +25,11 @@ Anope for Windows
(NOTE: When installing, tell CMake to add itself to the PATH.)
If you have Visual C++ 10 (2010) skip ahead to step 2, else you
need to download the following free component from Microsoft. Once
downloaded, install these packages.
If you have Visual C++ 10 or 11 (2010/2012) skip ahead to step 2, else you
need to download and install the following free component from Microsoft.
* Microsoft Visual C++ 2010 Express Edition:
http://www.microsoft.com/express/vc/
http://www.microsoft.com/visualstudio/eng/downloads#d-2010-express
2) Unpack the Anope tarball with your favorite uncompression program
(WinZip or WinRAR, etc).
@@ -76,10 +75,8 @@ Anope for Windows
will probably not find them and should be told where they are by passing
additional search paths to the last question in Config, such as:
-DEXTRA_INCLUDES:STRING=c:/openssl/include;c:/openssl/lib
Which would have cmake search both C:\openssl\include and
C:\openssl\lib.
-DEXTRA_INCLUDE:STRING=c:/openssl/include;c:/mysql/include
-DEXTRA_LIBS:STRING=c:/openssl/lib;c:/mysql/lib
Building Anope with gettext requires libintl, libiconv, libgcc and
libmingex. We have precompiled these libraries for you that you may
+10 -21
View File
@@ -1,33 +1,18 @@
<?php
/* XMLRPC Functions
*
* (C) 2003-2012 Anope Team
* (C) 2003-2013 Anope Team
* Contact us at team@anope.org
*
*/
class AnopeXMLRPC
{
private $Host, $Bind, $Port;
private $Host;
private $Socket;
function __construct($Host, $Port, $Bind = NULL)
function __construct($Host)
{
$this->Host = $Host;
$this->Port = $Port;
$this->Bind = $Bind;
$this->Socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
if ($Bind && socket_bind($this->Socket, $this->Bind) == false)
$his->Socket = false;
if (socket_connect($this->Socket, $this->Host, $this->Port) == false)
$this->Socket = false;
}
function __destruct()
{
@socket_close($this->Socket);
}
/** Run an XMLRPC command. Name should be a query name and params an array of parameters, eg:
@@ -40,10 +25,12 @@ class AnopeXMLRPC
function RunXMLRPC($name, $params)
{
$xmlquery = xmlrpc_encode_request($name, $params);
socket_write($this->Socket, $xmlquery);
$context = stream_context_create(array("http" => array(
"method" => "POST",
"header" => "Content-Type: text/xml",
"content" => $xmlquery)));
$inbuf = socket_read($this->Socket, 4096);
$inbuf = substr($inbuf, strpos($inbuf, "\r\n\r\n") + 4);
$inbuf = file_get_contents($this->Host, false, $context);
$response = xmlrpc_decode($inbuf);
if (isset($response[0]))
@@ -98,4 +85,6 @@ class AnopeXMLRPC
}
}
$anopexmlrpc = new AnopeXMLRPC("http://127.0.0.1:8080/xmlrpc");
?>
Executable
+168
View File
@@ -0,0 +1,168 @@
#!/usr/bin/env perl
#
# Script taken from InspIRCd, www.inspircd.org
#
# 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, see <http://www.gnu.org/licenses/>.
#
BEGIN { require 5.8.0; }
use strict;
use warnings FATAL => qw(all);
use File::Copy ();
use Cwd;
sub list_extras ();
sub enable_extras (@);
sub disable_extras (@);
# Routine to list out the extra/ modules that have been enabled.
# Note: when getting any filenames out and comparing, it's important to lc it if the
# file system is not case-sensitive (== Epoc, MacOS, OS/2 (incl DOS/DJGPP), VMS, Win32
# (incl NetWare, Symbian)). Cygwin may or may not be case-sensitive, depending on
# configuration, however, File::Spec does not currently tell us (it assumes Unix behavior).
sub list_extras () {
use File::Spec;
# @_ not used
my $srcdir = File::Spec->catdir("modules");
my $abs_srcdir = File::Spec->rel2abs($srcdir);
local $_;
my $dd;
opendir $dd, File::Spec->catdir($abs_srcdir, "extra") or die (File::Spec->catdir($abs_srcdir, "extra") . ": $!\n");
my @extras = map { File::Spec->case_tolerant() ? lc($_) : $_ } (readdir($dd));
closedir $dd;
undef $dd;
opendir $dd, $abs_srcdir or die "$abs_srcdir: $!\n";
my @sources = map { File::Spec->case_tolerant() ? lc($_) : $_ } (readdir($dd));
closedir $dd;
undef $dd;
my $maxlen = (sort { $b <=> $a } (map {length($_)} (@extras)))[0];
my %extras = ();
EXTRA: for my $extra (@extras) {
next if (File::Spec->curdir() eq $extra || File::Spec->updir() eq $extra);
my $abs_extra = File::Spec->catfile($abs_srcdir, "extra", $extra);
my $abs_source = File::Spec->catfile($abs_srcdir, $extra);
next unless ($extra =~ m/\.(cpp|h)$/ || (-d $abs_extra)); # C++ Source/Header, or directory
if (-l $abs_source) {
# Symlink, is it in the right place?
my $targ = readlink($abs_source);
my $abs_targ = File::Spec->rel2abs($targ, $abs_srcdir);
if ($abs_targ eq $abs_extra) {
$extras{$extra} = "\e[32;1menabled\e[0m";
} else {
$extras{$extra} = sprintf("\e[31;1mwrong symlink target (%s)\e[0m", $abs_targ);
}
} elsif (-e $abs_source) {
my ($devext, $inoext) = stat($abs_extra);
my ($devsrc, $inosrc, undef, $lnksrc) = stat($abs_source);
if ($lnksrc > 1) {
if ($devsrc == $devext && $inosrc == $inoext) {
$extras{$extra} = "\e[32;1menabled\e[0m";
} else {
$extras{$extra} = sprintf("\e[31;1mwrong hardlink target (%d:%d)\e[0m", $devsrc, $inosrc);
}
} else {
open my $extfd, "<", $abs_extra;
open my $srcfd, "<", $abs_source;
local $/ = undef;
if (scalar(<$extfd>) eq scalar(<$srcfd>)) {
$extras{$extra} = "\e[32;1menabled\e[0m";
} else {
$extras{$extra} = sprintf("\e[31;1mout of synch (re-copy)\e[0m");
}
}
} else {
$extras{$extra} = "\e[33;1mdisabled\e[0m";
}
}
for my $extra (sort {$a cmp $b} keys(%extras)) {
my $text = $extras{$extra};
if ($text =~ m/needed by/ && $text !~ m/enabled/) {
printf "\e[31;1;5m%-*s = %s%s\e[0m\n", $maxlen, $extra, $text, ($text =~ m/needed by/ ? ")" : "");
} else {
printf "%-*s = %s%s\n", $maxlen, $extra, $text, ($text =~ m/needed by/ ? "\e[0m)" : "");
}
}
return keys(%extras) if wantarray; # Can be used by manage_extras.
}
sub enable_extras (@) {
my (@extras) = @_;
for my $extra (@extras) {
my $extrapath = "modules/extra/$extra";
if (!-e $extrapath) {
print STDERR "Cannot enable \e[32;1m$extra\e[0m : No such file or directory in modules/extra\n";
next;
}
my $source = "modules/$extra";
if (-e $source) {
print STDERR "Cannot enable \e[32;1m$extra\e[0m : destination in modules exists (might already be enabled?)\n";
next;
}
print "Enabling $extra ... \n";
symlink "extra/$extra", $source or print STDERR "$source: Cannot link to 'extra/$extra': $!\n";
}
}
sub disable_extras (@)
{
opendir my $dd, "modules/extra/";
my @files = readdir($dd);
closedir $dd;
my (@extras) = @_;
EXTRA: for my $extra (@extras) {
my $extrapath = "modules/extra/$extra";
my $source = "modules/$extra";
if (!-e $extrapath) {
print STDERR "Cannot disable \e[32;1m$extra\e[0m : Is not an extra\n";
next;
}
if ((! -l $source) || readlink($source) ne "extra/$extra") {
print STDERR "Cannot disable \e[32;1m$extra\e[0m : Source is not a link or doesn't refer to the right file. Remove manually if this is in error.\n";
next;
}
# Now remove.
print "Disabling $extra ... \n";
unlink "modules/$extra" or print STDERR "Cannot disable \e[32;1m$extra\e[0m : $!\n";
}
}
my $clearscreen = `clear`;
print $clearscreen;
while (1)
{
list_extras; # print the module list
print "\nPlease enter the name of the module or type 'q' to quit.: ";
my $input = <STDIN>;
chop($input); # remove the trailing \n from the user input
if ($input eq "q") {
if (-e "build") {
system("cmake", "build/.");
print "\nNow cd build, then run make to build Anope.\n\n";
} else {
print "\nBuild directory not found. You should run ./Config now.\n\n"
}
exit 0;
}
print $clearscreen;
if ($input eq "") {
next;
}
if (-e "modules/$input") {
disable_extras($input)
} else {
enable_extras($input)
}
}
+80 -15
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2003-2012 Anope Team
* (C) 2003-2013 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -8,7 +8,6 @@
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*
*
*/
#ifndef ACCESS_H
@@ -25,19 +24,25 @@ enum
ACCESS_FOUNDER = 10001
};
/* A privilege, probably configured using a privilege{} block. Most
* commands require specific privileges to be executed. The AccessProvider
* backing each ChanAccess determines whether that ChanAccess has a given
* privilege.
*/
struct CoreExport Privilege
{
Anope::string name;
Anope::string desc;
/* Rank relative to other privileges */
int rank;
Privilege(const Anope::string &n, const Anope::string &d, int r);
Privilege(const Anope::string &name, const Anope::string &desc, int rank);
bool operator==(const Privilege &other) const;
};
class CoreExport PrivilegeManager
{
static std::vector<Privilege> privs;
static std::vector<Privilege> Privileges;
public:
static void AddPrivilege(Privilege p);
static void RemovePrivilege(Privilege &p);
@@ -46,25 +51,43 @@ class CoreExport PrivilegeManager
static void ClearPrivileges();
};
/* A provider of access. Only used for creating ChanAccesses, as
* they contain pure virtual functions.
*/
class CoreExport AccessProvider : public Service
{
public:
AccessProvider(Module *o, const Anope::string &n);
AccessProvider(Module *owner, const Anope::string &name);
virtual ~AccessProvider();
/** Creates a new ChanAccess entry using this provider.
* @return The new entry
*/
virtual ChanAccess *Create() = 0;
private:
static std::list<AccessProvider *> providers;
static std::list<AccessProvider *> Providers;
public:
static const std::list<AccessProvider *>& GetProviders();
};
/* Represents one entry of an access list on a channel. */
class CoreExport ChanAccess : public Serializable
{
public:
typedef std::multimap<const ChanAccess *, const ChanAccess *> Set;
/* shows the 'path' taken to determine if an access entry matches a user
* .first are access entries checked
* .second are access entries which match
*/
typedef std::pair<Set, Set> Path;
/* The provider that created this access entry */
AccessProvider *provider;
serialize_obj<ChannelInfo> ci;
/* Channel this access entry is on */
Serialize::Reference<ChannelInfo> ci;
/* account this access entry is for, if any */
Serialize::Reference<NickCore> nc;
Anope::string mask;
Anope::string creator;
time_t last_seen;
@@ -73,30 +96,72 @@ class CoreExport ChanAccess : public Serializable
ChanAccess(AccessProvider *p);
virtual ~ChanAccess();
const Anope::string serialize_name() const anope_override;
Serialize::Data serialize() const anope_override;
static Serializable* unserialize(Serializable *obj, Serialize::Data &);
void Serialize(Serialize::Data &data) const anope_override;
static Serializable* Unserialize(Serializable *obj, Serialize::Data &);
virtual bool Matches(const User *u, const NickCore *nc) const;
/** Check if this access entry matches the given user or account
* @param u The user
* @param nc The account
* @param p The path to the access object which matches will be put here
*/
virtual bool Matches(const User *u, const NickCore *nc, Path &p) const;
/** Check if this access entry has the given privilege.
* @param name The privilege name
*/
virtual bool HasPriv(const Anope::string &name) const = 0;
virtual Anope::string Serialize() const = 0;
virtual void Unserialize(const Anope::string &data) = 0;
/** Serialize the access given by this access entry into a human
* readable form. chanserv/access will return a number, chanserv/xop
* will be AOP, SOP, etc.
*/
virtual Anope::string AccessSerialize() const = 0;
/** Unserialize this access entry from the given data. This data
* will be fetched from AccessSerialize.
*/
virtual void AccessUnserialize(const Anope::string &data) = 0;
/* Comparison operators to other Access entries */
bool operator>(const ChanAccess &other) const;
bool operator<(const ChanAccess &other) const;
bool operator>=(const ChanAccess &other) const;
bool operator<=(const ChanAccess &other) const;
};
/* A group of access entries. This is used commonly, for example with ChannelInfo::AccessFor,
* to show what access a user has on a channel because users can match multiple access entries.
*/
class CoreExport AccessGroup : public std::vector<ChanAccess *>
{
public:
/* Channel these access entries are on */
const ChannelInfo *ci;
/* Path from these entries to other entries that they depend on */
ChanAccess::Path path;
/* Account these entries affect, if any */
const NickCore *nc;
bool SuperAdmin, Founder;
/* super_admin always gets all privs. founder is a special case where ci->founder == nc */
bool super_admin, founder;
AccessGroup();
/** Check if this access group has a certain privilege. Eg, it
* will check every ChanAccess entry of this group for any that
* has the given privilege.
* @param priv The privilege
* @return true if any entry has the given privilege
*/
bool HasPriv(const Anope::string &priv) const;
/** Get the "highest" access entry from this group of entries.
* The highest entry is determined by the entry that has the privilege
* with the highest rank (see Privilege::rank).
* @return The "highest" entry
*/
const ChanAccess *Highest() const;
/* Comparison operators to other AccessGroups */
bool operator>(const AccessGroup &other) const;
bool operator<(const AccessGroup &other) const;
bool operator>=(const AccessGroup &other) const;
+146 -183
View File
@@ -1,14 +1,13 @@
/*
*
* (C) 2003-2012 Anope Team
* (C) 2003-2013 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*
*
*
*/
#ifndef ACCOUNT_H
@@ -20,135 +19,42 @@
#include "memo.h"
#include "base.h"
typedef Anope::insensitive_map<NickAlias *> nickalias_map;
typedef Anope::insensitive_map<NickCore *> nickcore_map;
typedef Anope::hash_map<NickAlias *> nickalias_map;
typedef Anope::hash_map<NickCore *> nickcore_map;
extern CoreExport serialize_checker<nickalias_map> NickAliasList;
extern CoreExport serialize_checker<nickcore_map> NickCoreList;
extern CoreExport Serialize::Checker<nickalias_map> NickAliasList;
extern CoreExport Serialize::Checker<nickcore_map> NickCoreList;
/* NickServ nickname structures. */
/** Flags set on NickAliases
/* A registered nickname.
* It matters that Base is here before Extensible (it is inherited by Serializable)
*/
enum NickNameFlag
{
NS_BEGIN,
/* Nick never expires */
NS_NO_EXPIRE,
/* This nick is being held after a kill by an enforcer client
* or is being SVSHeld. Used by ns_release to determin if something
* should be allowed to be released
*/
NS_HELD,
/* We are taking over this nick, either by SVSNICK or KILL.
* We are waiting for the confirmation of either of these actions to
* proceed. This is checked in NickAlias::OnCancel
*/
NS_COLLIDED,
NS_END
};
const Anope::string NickNameFlagStrings[] = {
"BEGIN", "NO_EXPIRE", "HELD", "COLLIDED", ""
};
/** Flags set on NickCores
*/
enum NickCoreFlag
{
NI_BEGIN,
/* Kill others who take this nick */
NI_KILLPROTECT,
/* Dont recognize unless IDENTIFIED */
NI_SECURE,
/* Use PRIVMSG instead of NOTICE */
NI_MSG,
/* Don't allow user to change memo limit */
NI_MEMO_HARDMAX,
/* Notify of memos at signon and un-away */
NI_MEMO_SIGNON,
/* Notify of new memos when sent */
NI_MEMO_RECEIVE,
/* Don't show in LIST to non-servadmins */
NI_PRIVATE,
/* Don't show email in INFO */
NI_HIDE_EMAIL,
/* Don't show last seen address in INFO */
NI_HIDE_MASK,
/* Don't show last quit message in INFO */
NI_HIDE_QUIT,
/* Kill in 20 seconds instead of in 60 */
NI_KILL_QUICK,
/* Kill immediatly */
NI_KILL_IMMED,
/* User gets email on memo */
NI_MEMO_MAIL,
/* Don't show services access status */
NI_HIDE_STATUS,
/* Nickname is suspended */
NI_SUSPENDED,
/* Autoop nickname in channels */
NI_AUTOOP,
/* This nickcore is forbidden, which means the nickalias for it is aswell */
NI_FORBIDDEN,
/* If set means the nick core does not have their email addrses confirmed.
*/
NI_UNCONFIRMED,
/* Chanstats are enabled for this user */
NI_STATS,
NI_END
};
const Anope::string NickCoreFlagStrings[] = {
"BEGIN", "KILLPROTECT", "SECURE", "MSG", "MEMO_HARDMAX", "MEMO_SIGNON", "MEMO_RECEIVE",
"PRIVATE", "HIDE_EMAIL", "HIDE_MASK", "HIDE_QUIT", "KILL_QUICK", "KILL_IMMED",
"MEMO_MAIL", "HIDE_STATUS", "SUSPENDED", "AUTOOP", "FORBIDDEN", "UNCONFIRMED", "STATS", ""
};
class CoreExport NickAlias : public Extensible, public Flags<NickNameFlag, NS_END>, public Serializable
class CoreExport NickAlias : public Serializable, public Extensible
{
Anope::string vhost_ident, vhost_host, vhost_creator;
time_t vhost_created;
public:
/** Default constructor
Anope::string nick;
Anope::string last_quit;
Anope::string last_realname;
/* Last usermask this nick was seen on, eg user@host */
Anope::string last_usermask;
/* Last uncloaked usermask, requires nickserv/auspex to see */
Anope::string last_realhost;
time_t time_registered;
time_t last_seen;
/* Account this nick is tied to. Multiple nicks can be tied to a single account. */
Serialize::Reference<NickCore> nc;
/** Constructor
* @param nickname The nick
* @param nickcore The nickcore for this nick
*/
NickAlias(const Anope::string &nickname, NickCore *nickcore);
/** Default destructor
*/
~NickAlias();
Anope::string nick; /* Nickname */
Anope::string last_quit; /* Last quit message */
Anope::string last_realname; /* Last realname */
Anope::string last_usermask; /* Last usermask */
Anope::string last_realhost; /* Last uncloaked usermask, requires nickserv/auspex to see */
time_t time_registered; /* When the nick was registered */
time_t last_seen; /* When it was seen online for the last time */
serialize_obj<NickCore> nc; /* I'm an alias of this */
const Anope::string serialize_name() const anope_override;
Serialize::Data serialize() const anope_override;
static Serializable* unserialize(Serializable *obj, Serialize::Data &);
/** Release a nick
* See the comment in users.cpp
*/
void Release();
/** This function is called when a user on this nick either disconnects or changes nick.
* Note that the user isnt necessarially identified to this nick
* See the comment in users.cpp
* @param u The user
*/
void OnCancel(User *u);
void Serialize(Serialize::Data &data) const anope_override;
static Serializable* Unserialize(Serializable *obj, Serialize::Data &);
/** Set a vhost for the user
* @param ident The ident
@@ -186,41 +92,66 @@ class CoreExport NickAlias : public Extensible, public Flags<NickNameFlag, NS_EN
* @return the time it was created
*/
time_t GetVhostCreated() const;
/** Finds a registered nick
* @param nick The nick to lookup
* @return the nick, if found
*/
static NickAlias *Find(const Anope::string &nick);
};
class CoreExport NickCore : public Extensible, public Flags<NickCoreFlag, NI_END>, public Serializable
/* A registered account. Each account must have a NickAlias with the same nick as the
* account's display.
* It matters that Base is here before Extensible (it is inherited by Serializable)
*/
class CoreExport NickCore : public Serializable, public Extensible
{
/* Channels which reference this core in some way (this is on their access list, akick list, is founder, successor, etc) */
Serialize::Checker<std::map<ChannelInfo *, int> > chanaccess;
public:
/** Default constructor
* @param display The display nick
*/
NickCore(const Anope::string &nickdisplay);
/** Default destructor
*/
~NickCore();
std::list<User *> Users;
Anope::string display; /* How the nick is displayed */
Anope::string pass; /* Password of the nicks */
Anope::string email; /* E-mail associated to the nick */
Anope::string greet; /* Greet associated to the nick */
Anope::string language; /* Language name */
std::vector<Anope::string> access; /* Access list, vector of strings */
std::vector<Anope::string> cert; /* ssl certificate list, vector of strings */
/* Name of the account. Find(display)->nc == this. */
Anope::string display;
/* User password in form of hashm:data */
Anope::string pass;
Anope::string email;
/* Locale name of the language of the user. Empty means default language */
Anope::string language;
/* Access list, contains user@host masks of users who get certain privileges based
* on if NI_SECURE is set and what (if any) kill protection is enabled. */
std::vector<Anope::string> access;
MemoInfo memos;
std::map<Anope::string, Anope::string> last_modes;
/* Nicknames registered that are grouped to this account.
* for n in aliases, n->nc == this.
*/
Serialize::Checker<std::vector<NickAlias *> > aliases;
/* Set if this user is a services operattor. o->ot must exist. */
Oper *o;
/* Unsaved data */
uint16_t channelcount; /* Number of channels currently registered */
time_t lastmail; /* Last time this nick record got a mail */
std::list<serialize_obj<NickAlias> > aliases; /* List of aliases */
const Anope::string serialize_name() const anope_override;
Serialize::Data serialize() const anope_override;
static Serializable* unserialize(Serializable *obj, Serialize::Data &);
/* Number of channels registered by this account */
uint16_t channelcount;
/* Last time an email was sent to this user */
time_t lastmail;
/* Users online now logged into this account */
std::list<User *> users;
/** Constructor
* @param display The display nick
*/
NickCore(const Anope::string &nickdisplay);
~NickCore();
void Serialize(Serialize::Data &data) const anope_override;
static Serializable* Unserialize(Serializable *obj, Serialize::Data &);
/** Changes the display for this account
* @param na The new display, must be grouped to this account.
*/
void SetDisplay(const NickAlias *na);
/** Checks whether this account is a services oper or not.
* @return True if this account is a services oper, false otherwise.
@@ -244,6 +175,10 @@ class CoreExport NickCore : public Extensible, public Flags<NickCoreFlag, NI_END
*/
Anope::string GetAccess(unsigned entry) const;
/** Get the number of entries on the access list for this account.
*/
unsigned GetAccessCount() const;
/** Find an entry in the nick's access list
*
* @param entry The nick!ident@host entry to search for
@@ -267,53 +202,81 @@ class CoreExport NickCore : public Extensible, public Flags<NickCoreFlag, NI_END
*/
void ClearAccess();
/** Add an entry to the nick's certificate list
/** Is the given user on this accounts access list?
*
* @param entry The fingerprint to add to the cert list
* @param u The user
*
* Adds a new entry into the cert list.
* @return true if the user is on the access list
*/
void AddCert(const Anope::string &entry);
bool IsOnAccess(const User *u) const;
/** Get an entry from the nick's cert list by index
*
* @param entry Index in the certificaate list vector to retrieve
* @return The fingerprint entry of the given index if within bounds, an empty string if the vector is empty or the index is out of bounds
*
* Retrieves an entry from the certificate list corresponding to the given index.
/** Finds an account
* @param nick The account name to find
* @return The account, if it exists
*/
Anope::string GetCert(unsigned entry) const;
/** Find an entry in the nick's cert list
*
* @param entry The fingerprint to search for
* @return True if the fingerprint is found in the cert list, false otherwise
*
* Search for an fingerprint within the cert list.
*/
bool FindCert(const Anope::string &entry) const;
/** Erase a fingerprint from the nick's certificate list
*
* @param entry The fingerprint to remove
*
* Removes the specified fingerprint from the cert list.
*/
void EraseCert(const Anope::string &entry);
/** Clears the entire nick's cert list
*
* Deletes all the memory allocated in the certificate list vector and then clears the vector.
*/
void ClearCert();
static NickCore* Find(const Anope::string &nick);
void AddChannelReference(ChannelInfo *ci);
void RemoveChannelReference(ChannelInfo *ci);
void GetChannelReferences(std::deque<ChannelInfo *> &queue);
};
extern CoreExport void change_core_display(NickCore *nc);
extern CoreExport void change_core_display(NickCore *nc, const Anope::string &newdisplay);
/* A request to check if an account/password is valid. These can exist for
* extended periods due to the time some authentication modules take.
*/
class CoreExport IdentifyRequest
{
/* Owner of this request, used to cleanup requests if a module is unloaded
* while a reqyest us pending */
Module *owner;
Anope::string account;
Anope::string password;
extern CoreExport NickAlias *findnick(const Anope::string &nick);
extern CoreExport NickCore *findcore(const Anope::string &nick);
extern CoreExport bool is_on_access(const User *u, const NickCore *nc);
std::set<Module *> holds;
bool dispatched;
bool success;
static std::set<IdentifyRequest *> Requests;
protected:
IdentifyRequest(Module *o, const Anope::string &acc, const Anope::string &pass);
virtual ~IdentifyRequest();
public:
/* One of these is called when the request goes through */
virtual void OnSuccess() = 0;
virtual void OnFail() = 0;
const Anope::string &GetAccount() const { return account; }
const Anope::string &GetPassword() const { return password; }
/* Holds this request. When a request is held it must be Released later
* for the request to complete. Multiple modules may hold a request at any time,
* but the request is not complete until every module has released it. If you do not
* require holding this (eg, your password check is done in this thread and immediately)
* then you don't need to hold the request before Successing it.
* @param m The module holding this request
*/
void Hold(Module *m);
/** Releases a held request
* @param m The module releaseing the hold
*/
void Release(Module *m);
/** Called by modules when this IdentifyRequest has successeded successfully.
* If this request is behind held it must still be Released after calling this.
* @param m The module confirming authentication
*/
void Success(Module *m);
/** Used to either finalize this request or marks
* it as dispatched and begins waiting for the module(s)
* that have holds to finish.
*/
void Dispatch();
static void ModuleUnload(Module *m);
};
#endif // ACCOUNT_H
+242 -165
View File
@@ -1,23 +1,24 @@
/*
* (C) 2003-2012 Anope Team
*
* (C) 2003-2013 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*
*/
#ifndef ANOPE_H
#define ANOPE_H
#include <signal.h>
#include "hashcomp.h"
namespace Anope
{
template<typename T> class map : public std::map<string, T> { };
template<typename T> class insensitive_map : public std::map<string, T, ci::less> { };
/**
* A wrapper string class around all the other string classes, this class will
* allow us to only require one type of string everywhere that can be converted
@@ -49,9 +50,10 @@ namespace Anope
string(char chr) : _string() { _string = chr; }
string(size_type n, char chr) : _string(n, chr) { }
string(const char *_str) : _string(_str) { }
string(const char *_str, size_type n) : _string(_str, n) { }
string(const std::string &_str) : _string(_str) { }
string(const ci::string &_str) : _string(_str.c_str()) { }
string(const string &_str, size_type pos = 0, size_type n = npos) : _string(_str._string, pos, n) { }
string(const string &_str, size_type pos, size_type n = npos) : _string(_str._string, pos, n) { }
template <class InputIterator> string(InputIterator first, InputIterator last) : _string(first, last) { }
/**
@@ -138,6 +140,9 @@ namespace Anope
*/
inline void push_back(char c) { return this->_string.push_back(c); }
inline string& append(const string &s) { this->_string.append(s.str()); return *this; }
inline string& append(const char *s, size_t n) { this->_string.append(s, n); return *this; }
/**
* Resizes the string content to n characters.
*/
@@ -153,12 +158,26 @@ namespace Anope
/**
* Trim leading and trailing white spaces from the string.
*/
inline void trim()
inline string& ltrim()
{
while (!this->_string.empty() && isspace(this->_string[0]))
this->_string.erase(this->_string.begin());
return *this;
}
inline string& rtrim()
{
while (!this->_string.empty() && isspace(this->_string[this->_string.length() - 1]))
this->_string.erase(this->_string.length() - 1);
return *this;
}
inline string& trim()
{
this->ltrim();
this->rtrim();
return *this;
}
/**
@@ -206,7 +225,7 @@ namespace Anope
inline string replace(iterator first, iterator last, const string &_str) { return string(this->_string.replace(first, last, _str._string)); }
inline string replace(iterator first, iterator last, size_type n, char chr) { return string(this->_string.replace(first, last, n, chr)); }
template <class InputIterator> inline string replace(iterator first, iterator last, InputIterator f, InputIterator l) { return string(this->_string.replace(first, last, f, l)); }
inline string replace_all_cs(const string &_orig, const string &_repl)
inline string replace_all_cs(const string &_orig, const string &_repl) const
{
Anope::string new_string = *this;
size_type pos = new_string.find(_orig), orig_length = _orig.length(), repl_length = _repl.length();
@@ -217,7 +236,7 @@ namespace Anope
}
return new_string;
}
inline string replace_all_ci(const string &_orig, const string &_repl)
inline string replace_all_ci(const string &_orig, const string &_repl) const
{
Anope::string new_string = *this;
size_type pos = new_string.find_ci(_orig), orig_length = _orig.length(), repl_length = _repl.length();
@@ -232,22 +251,22 @@ namespace Anope
/**
* Get the string in lowercase.
*/
inline string lower()
inline string lower() const
{
Anope::string new_string = *this;
for (size_type i = 0; i < new_string.length(); ++i)
new_string[i] = std::tolower(new_string[i], Anope::casemap);
new_string[i] = Anope::tolower(new_string[i]);
return new_string;
}
/**
* Get the string in uppercase.
*/
inline string upper()
inline string upper() const
{
Anope::string new_string = *this;
for (size_type i = 0; i < new_string.length(); ++i)
new_string[i] = std::toupper(new_string[i], Anope::casemap);
new_string[i] = Anope::toupper(new_string[i]);
return new_string;
}
@@ -278,37 +297,95 @@ namespace Anope
* Stream insertion operator, must be friend because they cannot be inside the class.
*/
friend std::ostream &operator<<(std::ostream &os, const string &_str);
};
/** Hash an Anope::string for unorderd_map, passed as the third template arg to unordered_map
*/
struct hash
{
/* VS 2008 specific code */
enum { bucket_size = 4, min_buckets = 8 };
bool operator()(const string &s1, const string &s2) const;
/* End of 2008 specific code */
/** Hash an Anope::string for unordered_map
* @param s The string
* @return A hash value for the string
*/
bool operator()(const string &s) const;
friend std::istream &operator>>(std::istream &is, string &_str);
};
inline std::ostream &operator<<(std::ostream &os, const string &_str) { return os << _str._string; }
/* This is not standard to make operator>> behave like operator<< in that it will allow extracting a whole line, not just one word */
inline std::istream &operator>>(std::istream &is, string &_str) { return std::getline(is, _str._string); }
inline const string operator+(char chr, const string &str) { string tmp(chr); tmp += str; return tmp; }
inline const string operator+(const char *_str, const string &str) { string tmp(_str); tmp += str; return tmp; }
inline const string operator+(const std::string &_str, const string &str) { string tmp(_str); tmp += str; return tmp; }
struct hash_ci
{
inline size_t operator()(const string &s) const
{
return TR1NS::hash<std::string>()(s.lower().str());
}
};
struct hash_cs
{
inline size_t operator()(const string &s) const
{
return TR1NS::hash<std::string>()(s.str());
}
};
struct compare
{
inline bool operator()(const string &s1, const string &s2) const
{
return s1.equals_ci(s2);
}
};
template<typename T> class map : public std::map<string, T, ci::less> { };
template<typename T> class multimap : public std::multimap<string, T, ci::less> { };
template<typename T> class hash_map : public TR1NS::unordered_map<string, T, hash_ci, compare> { };
static const char *const compiled = __TIME__ " " __DATE__;
/** The time Anope started.
*/
extern CoreExport time_t StartTime;
/** The value to return from main()
*/
extern int ReturnValue;
extern sig_atomic_t Signal;
extern CoreExport bool Quitting;
extern CoreExport bool Restarting;
extern CoreExport Anope::string QuitReason;
/** The current system time, which is pretty close to being accurate.
* Use this unless you need very specific time checks
*/
extern CoreExport time_t CurTime;
/** The debug level we are running at.
*/
extern CoreExport int Debug;
/** Other comand line options.
*/
extern CoreExport bool ReadOnly, NoFork, NoThird, NoExpire, ProtocolDebug;
/** The root of the services installation. Usually ~/services
*/
extern CoreExport Anope::string ServicesDir;
/** Services binary name (eg services)
*/
extern CoreExport Anope::string ServicesBin;
/** Various directory paths. These can be set at runtime by command line args
*/
extern CoreExport Anope::string ConfigDir;
extern CoreExport Anope::string DataDir;
extern CoreExport Anope::string ModuleDir;
extern CoreExport Anope::string LocaleDir;
extern CoreExport Anope::string LogDir;
/** The uplink we are currently connected to
*/
extern CoreExport int CurrentUplink;
/** Various methods to determine the Anope version running
*/
extern CoreExport string Version();
extern CoreExport string VersionShort();
extern CoreExport string VersionBuildString();
@@ -316,6 +393,33 @@ namespace Anope
extern CoreExport int VersionMinor();
extern CoreExport int VersionPatch();
/** Determines if we are still attached to the terminal, and can print
* messages to the user via stderr/stdout.
* @return true if still attached
*/
extern bool AtTerm();
/** Used to "fork" the process and go into the background during initial startup
* while we are AtTerm(). The actual fork is not done here, but earlier, and this
* simply notifys the parent via kill() to exit().
*/
extern void Fork();
/** Does something with the signal in Anope::Signal
*/
extern void HandleSignal();
/** One of the first functions called, does general initialization such as reading
* command line args, loading the configuration, doing the initial fork() if necessary,
* initializating language support, loading modules, and loading databases.
* @throws CoreException if something bad went wrong
*/
extern void Init(int ac, char **av);
/** Calls the save database event
*/
extern CoreExport void SaveDatabases();
/** Check whether two strings match.
* @param str The string to check against the pattern (e.g. foobar)
* @param mask The pattern to check (e.g. foo*bar)
@@ -324,12 +428,6 @@ namespace Anope
*/
extern CoreExport bool Match(const string &str, const string &mask, bool case_sensitive = false, bool use_regex = false);
/** Find a message in the message table
* @param name The name of the message were looking for
* @return NULL if we cant find it, or a pointer to the Message if we can
*/
extern CoreExport std::vector<Message *> FindMessage(const string &name);
/** Converts a string to hex
* @param the data to be converted
* @return a anope::string containing the hex value
@@ -356,6 +454,20 @@ namespace Anope
*/
extern CoreExport void B64Decode(const string &src, string &target);
/** Encrypts what is in 'src' to 'dest'
* @param src The source string to encrypt
* @param dest The destination where the encrypted string is placed
*/
extern CoreExport void Encrypt(const Anope::string &src, Anope::string &dest);
/** Decrypts what is in 'src' to 'dest'.
* @param src The source string to decrypt
* @param dest The destination where the decrypted string is placed
* @return true if decryption was successful. This is usually not the case
* as most encryption methods we use are one way.
*/
extern CoreExport bool Decrypt(const Anope::string &src, Anope::string &dest);
/** Returns a sequence of data formatted as the format argument specifies.
** After the format parameter, the function expects at least as many
** additional arguments as specified in format.
@@ -374,6 +486,60 @@ namespace Anope
* @return An error message
*/
extern CoreExport const string LastError();
/** Determines if a path is a file
*/
extern CoreExport bool IsFile(const Anope::string &file);
/** Converts a string into seconds
* @param s The string, eg 3d
* @return The time represented by the string, eg 259,200
*/
extern CoreExport time_t DoTime(const Anope::string &s);
/** Retrieves a human readable string representing the time in seconds
* @param seconds The time on seconds, eg 60
* @param nc The account to use langauge settings for to translate this string, if applicable
* @return A human readable string, eg "1 minute"
*/
extern CoreExport Anope::string Duration(time_t seconds, const NickCore *nc = NULL);
/** Generates a human readable string of type "expires in ..."
* @param expires time in seconds
* @param nc The account to use langauge settings for to translate this string, if applicable
* @return A human readable string, eg "expires in 5 days"
*/
extern CoreExport Anope::string Expires(time_t seconds, const NickCore *nc = NULL);
/** Converts a time in seconds (epoch) to a human readable format.
* @param t The time
* @param nc The account to use langauge settings for to translate this string, if applicable
* @param short_output If true, the output is just a date (eg, "Apr 12 20:18:22 2009 MSD"), else it includes the date and how long ago/from now that date is, (eg "Apr 12 20:18:22 2009 MSD (1313 days, 9 hours, 32 minutes ago)"
*/
extern CoreExport Anope::string strftime(time_t t, const NickCore *nc = NULL, bool short_output = false);
/** Normalize buffer, stripping control characters and colors
* @param A string to be parsed for control and color codes
* @return A string stripped of control and color codes
*/
extern CoreExport Anope::string NormalizeBuffer(const Anope::string &);
/** Main processing routine. Parses the message and takes the appropriate action.
* @param Raw message from the uplink
*/
extern void Process(const Anope::string &);
/** Does a blocking dns query and returns the first IP.
* @param host host to look up
* @param type inet addr type
* @return the IP if it was found, else the host
*/
extern Anope::string Resolve(const Anope::string &host, int type);
/** Generate a string of random letters and numbers
* @param len The length of the string returned
*/
extern CoreExport Anope::string Random(size_t len);
}
/** sepstream allows for splitting token seperated lists.
@@ -387,36 +553,65 @@ class CoreExport sepstream
/** Original string.
*/
Anope::string tokens;
/** Last position of a seperator token
*/
Anope::string::iterator last_starting_position;
/** Current string position
*/
Anope::string::iterator n;
/** Seperator value
*/
char sep;
/** Current string position
*/
size_t pos;
/** If set then GetToken() can return an empty string
*/
bool allow_empty;
public:
/** Create a sepstream and fill it with the provided data
*/
sepstream(const Anope::string &source, char seperator);
virtual ~sepstream() { }
sepstream(const Anope::string &source, char seperator, bool allowempty = false);
/** Fetch the next token from the stream
* @param token The next token from the stream is placed here
* @return True if tokens still remain, false if there are none left
*/
virtual bool GetToken(Anope::string &token);
bool GetToken(Anope::string &token);
/** Gets token number 'num' from the stream
* @param token The token is placed here
* @param num The token number to featch
* @return True if the token was able to be fetched
*/
bool GetToken(Anope::string &token, int num);
/** Gets every token from this stream
* @param token Tokens are pushed back here
*/
template<typename T> void GetTokens(T& token)
{
token.clear();
Anope::string t;
while (this->GetToken(t))
token.push_back(t);
}
/** Gets token number 'num' from the stream and all remaining tokens.
* @param token The token is placed here
* @param num The token number to featch
* @return True if the token was able to be fetched
*/
bool GetTokenRemainder(Anope::string &token, int num);
/** Determines the number of tokens in this stream.
* @return The number of tokens in this stream
*/
int NumTokens();
/** Fetch the entire remaining stream, without tokenizing
* @return The remaining part of the stream
*/
virtual const Anope::string GetRemaining();
const Anope::string GetRemaining();
/** Returns true if the end of the stream has been reached
* @return True if the end of the stream has been reached, otherwise false
*/
virtual bool StreamEnd();
bool StreamEnd();
};
/** A derived form of sepstream, which seperates on commas
@@ -484,14 +679,6 @@ class CoreException : public std::exception
}
};
class FatalException : public CoreException
{
public:
FatalException(const Anope::string &reason = "") : CoreException(reason) { }
virtual ~FatalException() throw() { }
};
class ModuleException : public CoreException
{
public:
@@ -534,8 +721,7 @@ template<typename T> inline void convert(const Anope::string &s, T &x, Anope::st
leftover.clear();
std::istringstream i(s.str());
char c;
bool res = i >> x;
if (!res)
if (!(i >> x))
throw ConvertException("Convert fail");
if (failIfLeftoverChars)
{
@@ -571,7 +757,7 @@ template<typename T> inline T convertTo(const Anope::string &s, bool failIfLefto
}
/** Casts to be used instead of dynamic_cast, this uses dynamic_cast
* for debug builds and static_cast/reinterpret_cast on releass builds
* for debug builds and static_cast on releass builds
* to speed up the program because dynamic_cast relies on RTTI.
*/
#ifdef DEBUG_BUILD
@@ -589,113 +775,4 @@ template<typename T, typename O> inline T anope_dynamic_static_cast(O ptr)
#endif
}
template<typename T, typename O> inline T anope_dynamic_reinterpret_cast(O ptr)
{
#ifdef DEBUG_BUILD
T ret = dynamic_cast<T>(ptr);
if (ptr != NULL && ret == NULL)
throw CoreException(Anope::string("anope_dynamic_reinterpret_cast<") + typeid(T).name() + ">(" + typeid(O).name() + ") fail");
return ret;
#else
return reinterpret_cast<T>(ptr);
#endif
}
/*************************************************************************/
/** Class with the ability to keep flags on items, they should extend from this
* where T is an enum.
*/
template<typename T, size_t Size = 32> class Flags
{
protected:
std::bitset<Size> Flag_Values;
const Anope::string *Flag_Strings;
public:
Flags() : Flag_Strings(NULL) { }
Flags(const Anope::string *flag_strings) : Flag_Strings(flag_strings) { }
/** Add a flag to this item
* @param Value The flag
*/
void SetFlag(T Value)
{
Flag_Values[Value] = true;
}
/** Remove a flag from this item
* @param Value The flag
*/
void UnsetFlag(T Value)
{
Flag_Values[Value] = false;
}
/** Check if this item has a flag
* @param Value The flag
* @return true or false
*/
bool HasFlag(T Value) const
{
return Flag_Values.test(Value);
}
/** Check how many flags are set
* @return The number of flags set
*/
size_t FlagCount() const
{
return Flag_Values.count();
}
/** Unset all of the flags
*/
void ClearFlags()
{
Flag_Values.reset();
}
Anope::string ToString() const
{
std::vector<Anope::string> v = ToVector();
Anope::string flag_buf;
for (unsigned i = 0; i < v.size(); ++i)
flag_buf += v[i] + " ";
flag_buf.trim();
return flag_buf;
}
void FromString(const Anope::string &str)
{
spacesepstream sep(str);
Anope::string buf;
std::vector<Anope::string> v;
while (sep.GetToken(buf))
v.push_back(buf);
FromVector(v);
}
std::vector<Anope::string> ToVector() const
{
std::vector<Anope::string> ret;
for (unsigned i = 0; this->Flag_Strings && !this->Flag_Strings[i].empty(); ++i)
if (this->HasFlag(static_cast<T>(i)))
ret.push_back(this->Flag_Strings[i]);
return ret;
}
void FromVector(const std::vector<Anope::string> &strings)
{
this->ClearFlags();
for (unsigned i = 0; this->Flag_Strings && !this->Flag_Strings[i].empty(); ++i)
for (unsigned j = 0; j < strings.size(); ++j)
if (this->Flag_Strings[i] == strings[j])
this->SetFlag(static_cast<T>(i));
}
};
#endif // ANOPE_H
+54 -24
View File
@@ -1,9 +1,10 @@
/*
*
* Copyright (C) 2008-2011 Adam <Adam@anope.org>
* Copyright (C) 2008-2012 Anope Team <team@anope.org>
* Copyright (C) 2008-2013 Anope Team <team@anope.org>
*
* Please read COPYING and README for further details.
*
*/
#ifndef BASE_H
@@ -16,53 +17,78 @@
class CoreExport Base
{
/* References to this base class */
std::set<dynamic_reference_base *> References;
std::set<ReferenceBase *> *references;
public:
Base();
virtual ~Base();
void AddReference(dynamic_reference_base *r);
void DelReference(dynamic_reference_base *r);
/** Adds a reference to this object. Eg, when a Reference
* is created referring to this object this is called. It is used to
* cleanup references when this object is destructed.
*/
void AddReference(ReferenceBase *r);
void DelReference(ReferenceBase *r);
};
class dynamic_reference_base
class ReferenceBase
{
protected:
bool invalid;
public:
dynamic_reference_base() : invalid(false) { }
dynamic_reference_base(const dynamic_reference_base &other) : invalid(other.invalid) { }
virtual ~dynamic_reference_base() { }
ReferenceBase() : invalid(false) { }
ReferenceBase(const ReferenceBase &other) : invalid(other.invalid) { }
virtual ~ReferenceBase() { }
inline void Invalidate() { this->invalid = true; }
};
/** Used to hold pointers to objects that may be deleted. A Reference will
* no longer be valid once the object it refers is destructed.
*/
template<typename T>
class dynamic_reference : public dynamic_reference_base
class Reference : public ReferenceBase
{
protected:
T *ref;
public:
dynamic_reference() : ref(NULL)
Reference() : ref(NULL)
{
}
dynamic_reference(T *obj) : ref(obj)
Reference(T *obj) : ref(obj)
{
if (ref)
ref->AddReference(this);
}
dynamic_reference(const dynamic_reference<T> &other) : dynamic_reference_base(other), ref(other.ref)
Reference(const Reference<T> &other) : ReferenceBase(other), ref(other.ref)
{
if (operator bool())
ref->AddReference(this);
}
virtual ~dynamic_reference()
virtual ~Reference()
{
if (operator bool())
ref->DelReference(this);
}
inline Reference<T>& operator=(const Reference<T> &other)
{
if (this != &other)
{
if (*this)
this->ref->DelReference(this);
this->ref = other.ref;
this->invalid = other.invalid;
if (*this)
this->ref->AddReference(this);
}
return *this;
}
/* We explicitly call operator bool here in several places to prevent other
* operators, such operator T*, from being called instead, which will mess
* with any class inheriting from this that overloads this operator.
@@ -88,22 +114,26 @@ class dynamic_reference : public dynamic_reference_base
return NULL;
}
inline void operator=(T *newref)
inline T* operator*()
{
if (operator bool())
this->ref->DelReference(this);
this->ref = newref;
this->invalid = false;
if (operator bool())
this->ref->AddReference(this);
return this->ref;
return NULL;
}
inline bool operator<(const dynamic_reference<T> &other) const
{
return this < &other;
}
/** Note that we can't have an operator< that returns this->ref < other.ref
* because this function is used to sort objects in containers (such as set
* or map), and if the references themselves can change if the object they
* refer to is invalidated or changed, then this screws with the order that
* the objects would be in the container without properly adjusting the
* container, resulting in weird stuff.
*
* As such, we don't allow storing references in containers that require
* operator<, because they would not be able to compare what the references
* actually referred to.
*/
inline bool operator==(const dynamic_reference<T> &other)
inline bool operator==(const Reference<T> &other)
{
if (!this->invalid)
return this->ref == other;
+37 -43
View File
@@ -1,8 +1,10 @@
/*
*
* Copyright (C) 2008-2011 Robin Burchell <w00t@inspircd.org>
* Copyright (C) 2008-2012 Anope Team <team@anope.org>
* Copyright (C) 2008-2013 Anope Team <team@anope.org>
*
* Please read COPYING and README for further details.
*
*/
#ifndef BOTS_H
@@ -14,40 +16,31 @@
#include "commands.h"
typedef Anope::insensitive_map<BotInfo *> botinfo_map;
typedef Anope::map<BotInfo *> botinfouid_map;
typedef Anope::map<BotInfo *> botinfo_map;
extern CoreExport serialize_checker<botinfo_map> BotListByNick;
extern CoreExport serialize_checker<botinfouid_map> BotListByUID;
extern CoreExport Serialize::Checker<botinfo_map> BotListByNick, BotListByUID;
/** Flags settable on a bot
*/
enum BotFlag
{
BI_BEGIN,
/* This bot is a core bot. NickServ, ChanServ, etc */
BI_CORE,
/* This bot can only be assigned by IRCops */
BI_PRIVATE,
/* This bot is defined in the config */
BI_CONF,
BI_END
};
static const Anope::string BotFlagString[] = { "BEGIN", "CORE", "PRIVATE", "CONF", "" };
class CoreExport BotInfo : public User, public Flags<BotFlag, BI_END>, public Serializable
/* A service bot (NickServ, ChanServ, a BotServ bot, etc). */
class CoreExport BotInfo : public User, public Serializable
{
/* Channels this bot is assigned to */
Serialize::Checker<std::set<ChannelInfo *> > channels;
public:
time_t created; /* Birth date ;) */
time_t lastmsg; /* Last time we said something */
typedef Anope::insensitive_map<CommandInfo> command_map;
command_map commands; /* Commands, actual name to service name */
Anope::string botmodes; /* Modes the bot should have as configured in service:modes */
std::vector<Anope::string> botchannels; /* Channels the bot should be in as configured in service:channels */
bool introduced; /* Whether or not this bot is introduced */
time_t created;
/* Last time this bot said something (via privmsg) */
time_t lastmsg;
/* Map of actual command names -> service name/permission required */
CommandInfo::map commands;
/* Modes the bot should have as configured in service:modes */
Anope::string botmodes;
/* Channels the bot should be in as configured in service:channels */
std::vector<Anope::string> botchannels;
/* Whether or not this bot is introduced to the network */
bool introduced;
/* Bot can only be assigned by irc ops */
bool oper_only;
/* Bot is defined in the configuration file */
bool conf;
/** Create a new bot.
* @param nick The nickname to assign to the bot.
@@ -62,9 +55,8 @@ class CoreExport BotInfo : public User, public Flags<BotFlag, BI_END>, public Se
*/
virtual ~BotInfo();
const Anope::string serialize_name() const;
Serialize::Data serialize() const;
static Serializable* unserialize(Serializable *obj, Serialize::Data &);
void Serialize(Serialize::Data &data) const;
static Serializable* Unserialize(Serializable *obj, Serialize::Data &);
void GenerateUID();
@@ -73,10 +65,9 @@ class CoreExport BotInfo : public User, public Flags<BotFlag, BI_END>, public Se
*/
void SetNewNick(const Anope::string &newnick);
/** Rejoins all channels that this bot is assigned to.
* Used on /kill, rename, etc.
/** Return the channels this bot is assigned to
*/
void RejoinAll();
const std::set<ChannelInfo *> &GetChannels() const;
/** Assign this bot to a given channel, removing the existing assigned bot if one exists.
* @param u The user assigning the bot, or NULL
@@ -122,19 +113,22 @@ class CoreExport BotInfo : public User, public Flags<BotFlag, BI_END>, public Se
* @param cname The command name
* @param sname The service name
* @param permission Permission required to execute the command, if any
* @return The commandinfo for the newly created command
*/
void SetCommand(const Anope::string &cname, const Anope::string &sname, const Anope::string &permission = "");
CommandInfo& SetCommand(const Anope::string &cname, const Anope::string &sname, const Anope::string &permission = "");
/** Get command info for a command
* @param cname The command name
* @return A struct containing service name and permission
*/
CommandInfo *GetCommand(const Anope::string &cname);
/** Find a bot by nick
* @param nick The nick
* @param nick_only True to only look by nick, and not by UID
* @return The bot, if it exists
*/
static BotInfo* Find(const Anope::string &nick, bool nick_only = false);
};
extern CoreExport BotInfo *findbot(const Anope::string &nick);
extern CoreExport void bot_raw_ban(User *requester, ChannelInfo *ci, const Anope::string &nick, const Anope::string &reason);
extern CoreExport void bot_raw_kick(User *requester, ChannelInfo *ci, const Anope::string &nick, const Anope::string &reason);
#endif // BOTS_H
-79
View File
@@ -1,79 +0,0 @@
/*
*
* (C) 2003-2012 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*
*
*/
#ifndef BOTSERV_H
#define BOTSERV_H
#include "anope.h"
/* BotServ SET flags */
enum BotServFlag
{
BS_BEGIN,
/* BotServ won't kick ops */
BS_DONTKICKOPS,
/* BotServ won't kick voices */
BS_DONTKICKVOICES,
/* BotServ bot accepts fantasy commands */
BS_FANTASY,
/* BotServ should show greets */
BS_GREET,
/* BotServ bots are not allowed to be in this channel */
BS_NOBOT,
/* BotServ kicks for bolds */
BS_KICK_BOLDS,
/* BotServ kicks for colors */
BS_KICK_COLORS,
/* BOtServ kicks for reverses */
BS_KICK_REVERSES,
/* BotServ kicks for underlines */
BS_KICK_UNDERLINES,
/* BotServ kicks for badwords */
BS_KICK_BADWORDS,
/* BotServ kicks for caps */
BS_KICK_CAPS,
/* BotServ kicks for flood */
BS_KICK_FLOOD,
/* BotServ kicks for repeating */
BS_KICK_REPEAT,
/* BotServ kicks for italics */
BS_KICK_ITALICS,
/* BotServ kicks for amsgs */
BS_KICK_AMSGS,
BS_END
};
const Anope::string BotServFlagStrings[] = {
"BEGIN", "DONTKICKOPS", "DONTKICKVOICES", "FANTASY", "GREET", "NOBOT",
"KICK_BOLDs", "KICK_COLORS", "KICK_REVERSES", "KICK_UNDERLINES", "KICK_BADWORDS", "KICK_CAPS",
"KICK_FLOOD", "KICK_REPEAT", "KICK_ITALICS", "KICK_AMSGS", "MSG_PRIVMSG", "MSG_NOTICE",
"MSG_NOTICEOPS", ""
};
/* Indices for TTB (Times To Ban) */
enum
{
TTB_BOLDS,
TTB_COLORS,
TTB_REVERSES,
TTB_UNDERLINES,
TTB_BADWORDS,
TTB_CAPS,
TTB_FLOOD,
TTB_REPEAT,
TTB_ITALICS,
TTB_AMSGS,
TTB_SIZE
};
#endif // BOTSERV_H
+137 -93
View File
@@ -1,9 +1,10 @@
/* Channel support
*
* (C) 2008-2012 Anope Team
* (C) 2008-2013 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
*/
#ifndef CHANNELS_H
@@ -14,62 +15,57 @@
#include "modes.h"
#include "serialize.h"
typedef Anope::insensitive_map<Channel *> channel_map;
typedef Anope::hash_map<Channel *> channel_map;
extern CoreExport channel_map ChannelList;
struct UserContainer : public Extensible
/* A user container, there is one of these per user per channel. */
struct ChanUserContainer : public Extensible
{
User *user;
ChannelStatus *Status;
Channel *chan;
/* Status the user has in the channel */
ChannelStatus status;
UserContainer(User *u) : user(u) { }
virtual ~UserContainer() { }
ChanUserContainer(User *u, Channel *c) : user(u), chan(c) { }
};
typedef std::list<UserContainer *> CUserList;
enum ChannelFlag
{
/* ChanServ is currently holding the channel */
CH_INHABIT,
/* Channel still exists when emptied */
CH_PERSIST,
/* If set the channel is syncing users (channel was just created) and it should not be deleted */
CH_SYNCING
};
const Anope::string ChannelFlagString[] = { "CH_INABIT", "CH_PERSIST", "CH_SYNCING", "" };
class CoreExport Channel : public virtual Base, public Extensible, public Flags<ChannelFlag, 3>
class CoreExport Channel : public Base, public Extensible
{
public:
typedef std::multimap<ChannelModeName, Anope::string> ModeList;
typedef std::multimap<Anope::string, Anope::string> ModeList;
private:
/** A map of channel modes with their parameters set on this channel
*/
ModeList modes;
public:
/** Default constructor
* @param name The channel name
* @param ts The time the channel was created
/* Channel name */
Anope::string name;
/* Set if this channel is registered. ci->c == this. Contains information relevant to the registered channel */
Serialize::Reference<ChannelInfo> ci;
/* When the channel was created */
time_t creation_time;
/* If the channel has just been created in a netjoin */
bool syncing;
/* Is configured in the conf as a channel bots should be in */
bool botchannel;
/* Users in the channel */
typedef std::map<User *, ChanUserContainer *> ChanUserList;
ChanUserList users;
/* Current topic of the channel */
Anope::string topic;
/* Who set the topic */
Anope::string topic_setter;
/* The timestamp associated with the topic. Not necessarually anywhere close to Anope::CurTime.
* This is the time the topic was *originally set*. When we restore the topic we want to change the TS back
* to this, but we can only do this on certain IRCds.
*/
Channel(const Anope::string &nname, time_t ts = Anope::CurTime);
/** Default destructor
*/
~Channel();
Anope::string name; /* Channel name */
serialize_obj<ChannelInfo> ci; /* Corresponding ChannelInfo */
time_t creation_time; /* When channel was created */
/* List of users in the channel */
CUserList users;
Anope::string topic; /* Current topic of the channel */
Anope::string topic_setter; /* Who set the topic */
time_t topic_time; /* When the topic was set*/
time_t topic_ts;
/* The actual time the topic was set, probably close to Anope::CurTime */
time_t topic_time;
time_t server_modetime; /* Time of last server MODE */
time_t chanserv_modetime; /* Time of last check_modes() */
@@ -77,6 +73,18 @@ class CoreExport Channel : public virtual Base, public Extensible, public Flags<
int16_t chanserv_modecount; /* Number of check_mode()'s this sec */
int16_t bouncy_modes; /* Did we fail to set modes here? */
private:
/** Constructor
* @param name The channel name
* @param ts The time the channel was created
*/
Channel(const Anope::string &nname, time_t ts = Anope::CurTime);
public:
/** Destructor
*/
~Channel();
/** Call if we need to unset all modes and clear all user status (internally).
* Only useful if we get a SJOIN with a TS older than what we have here
*/
@@ -90,10 +98,16 @@ class CoreExport Channel : public virtual Base, public Extensible, public Flags<
*/
void CheckModes();
/** Check if this channel should be deleted
*/
bool CheckDelete();
/** Join a user internally to the channel
* @param u The user
* @param status The status to give the user, if any
* @return The UserContainer for the user
*/
void JoinUser(User *u);
ChanUserContainer* JoinUser(User *u, const ChannelStatus *status);
/** Remove a user internally from the channel
* @param u The user
@@ -104,113 +118,114 @@ class CoreExport Channel : public virtual Base, public Extensible, public Flags<
* @param u The user
* @return A user container if found, else NULL
*/
UserContainer *FindUser(const User *u) const;
ChanUserContainer *FindUser(User *u) const;
/** Check if a user has a status on a channel
* @param u The user
* @param cms The status mode, or NULL to represent no status
* @return true or false
*/
bool HasUserStatus(const User *u, ChannelModeStatus *cms) const;
bool HasUserStatus(User *u, ChannelModeStatus *cms);
/** Check if a user has a status on a channel
* Use the overloaded function for ChannelModeStatus* to check for no status
* @param u The user
* @param Name The Mode name, eg CMODE_OP, CMODE_VOICE
* @param name The mode name, eg CMODE_OP, CMODE_VOICE
* @return true or false
*/
bool HasUserStatus(const User *u, ChannelModeName Name) const;
bool HasUserStatus(User *u, const Anope::string &name);
/** See if a channel has a mode
* @param Name The mode name
* @param name The mode name
* @return The number of modes set
* @param param The optional mode param
*/
size_t HasMode(ChannelModeName Name, const Anope::string &param = "");
/** Get a list of modes on a channel
* @param Name A mode name to get the list of
* @return a pair of iterators for the beginning and end of the list
*/
std::pair<ModeList::iterator, ModeList::iterator> GetModeList(ChannelModeName Name);
size_t HasMode(const Anope::string &name, const Anope::string &param = "");
/** Set a mode internally on a channel, this is not sent out to the IRCd
* @param setter The setter
* @param cm The mode
* @param param The param
* @param EnforceMLock true if mlocks should be enforced, false to override mlock
* @param enforce_mlock true if mlocks should be enforced, false to override mlock
*/
void SetModeInternal(User *setter, ChannelMode *cm, const Anope::string &param = "", bool EnforceMLock = true);
void SetModeInternal(MessageSource &source, ChannelMode *cm, const Anope::string &param = "", bool enforce_mlock = true);
/** Remove a mode internally on a channel, this is not sent out to the IRCd
* @param setter The Setter
* @param cm The mode
* @param param The param
* @param EnforceMLock true if mlocks should be enforced, false to override mlock
* @param enforce_mlock true if mlocks should be enforced, false to override mlock
*/
void RemoveModeInternal(User *setter, ChannelMode *cm, const Anope::string &param = "", bool EnforceMLock = true);
void RemoveModeInternal(MessageSource &source, ChannelMode *cm, const Anope::string &param = "", bool enforce_mlock = true);
/** Set a mode on a channel
* @param bi The client setting the modes
* @param cm The mode
* @param param Optional param arg for the mode
* @param EnforceMLock true if mlocks should be enforced, false to override mlock
* @param enforce_mlock true if mlocks should be enforced, false to override mlock
*/
void SetMode(BotInfo *bi, ChannelMode *cm, const Anope::string &param = "", bool EnforceMLock = true);
void SetMode(BotInfo *bi, ChannelMode *cm, const Anope::string &param = "", bool enforce_mlock = true);
/**
* Set a mode on a channel
* @param bi The client setting the modes
* @param Name The mode name
* @param name The mode name
* @param param Optional param arg for the mode
* @param EnforceMLock true if mlocks should be enforced, false to override mlock
* @param enforce_mlock true if mlocks should be enforced, false to override mlock
*/
void SetMode(BotInfo *bi, ChannelModeName Name, const Anope::string &param = "", bool EnforceMLock = true);
void SetMode(BotInfo *bi, const Anope::string &name, const Anope::string &param = "", bool enforce_mlock = true);
/** Remove a mode from a channel
* @param bi The client setting the modes
* @param cm The mode
* @param param Optional param arg for the mode
* @param EnforceMLock true if mlocks should be enforced, false to override mlock
* @param enforce_mlock true if mlocks should be enforced, false to override mlock
*/
void RemoveMode(BotInfo *bi, ChannelMode *cm, const Anope::string &param = "", bool EnforceMLock = true);
void RemoveMode(BotInfo *bi, ChannelMode *cm, const Anope::string &param = "", bool enforce_mlock = true);
/**
* Remove a mode from a channel
* @param bi The client setting the modes
* @param Name The mode name
* @param name The mode name
* @param param Optional param arg for the mode
* @param EnforceMLock true if mlocks should be enforced, false to override mlock
* @param enforce_mlock true if mlocks should be enforced, false to override mlock
*/
void RemoveMode(BotInfo *bi, ChannelModeName Name, const Anope::string &param = "", bool EnforceMLock = true);
void RemoveMode(BotInfo *bi, const Anope::string &name, const Anope::string &param = "", bool enforce_mlock = true);
/** Get a param from the channel
* @param Name The mode
* @param Target a string to put the param into
* @return true on success
/** Get a modes parameter for the channel
* @param name The mode
* @param target a string to put the param into
* @return true if the parameter was fetched, false if on error (mode not set) etc.
*/
bool GetParam(ChannelModeName Name, Anope::string &Target) const;
bool GetParam(const Anope::string &name, Anope::string &target) const;
/** Set a string of modes on the channel
* @param bi The client setting the modes
* @param EnforceMLock Should mlock be enforced on this mode change
* @param enforce_mlock Should mlock be enforced on this mode change
* @param cmodes The modes to set
*/
void SetModes(BotInfo *bi, bool EnforceMLock, const char *cmodes, ...);
void SetModes(BotInfo *bi, bool enforce_mlock, const char *cmodes, ...);
/** Set a string of modes internally on a channel
* @param setter the setter (if it is a user)
* @param source The setter
* @param mode the modes
* @param EnforceMLock true to enforce mlock
* @param enforce_mlock true to enforce mlock
*/
void SetModesInternal(User *setter, const Anope::string &mode, bool EnforceMLock = true);
void SetModesInternal(MessageSource &source, const Anope::string &mode, time_t ts = 0, bool enforce_mlock = true);
/** Does the given user match the given list? (CMODE_BAN, CMODE_EXCEPT, etc, a list mode)
* @param u The user
* @param list The mode of the list to check (eg CMODE_BAN)
* @return true if the user matches the list
*/
bool MatchesList(User *u, const Anope::string &list);
/** Kick a user from a channel internally
* @param source The sender of the kick
* @param nick The nick being kicked
* @param reason The reason for the kick
*/
void KickInternal(const Anope::string &source, const Anope::string &nick, const Anope::string &reason);
void KickInternal(const MessageSource &source, const Anope::string &nick, const Anope::string &reason);
/** Kick a user from the channel
* @param bi The sender, can be NULL for the service bot for this channel
@@ -220,6 +235,17 @@ class CoreExport Channel : public virtual Base, public Extensible, public Flags<
*/
bool Kick(BotInfo *bi, User *u, const char *reason = NULL, ...);
/** Get all modes set on this channel, excluding status modes.
* @return a map of modes and their optional parameters.
*/
const ModeList &GetModes() const;
/** Get a list of modes on a channel
* @param name A mode name to get the list of
* @return a pair of iterators for the beginning and end of the list
*/
std::pair<ModeList::iterator, ModeList::iterator> GetModeList(const Anope::string &name);
/** Get a string of the modes set on this channel
* @param complete Include mode parameters
* @param plus If set to false (with complete), mode parameters will not be given for modes requring no parameters to be unset
@@ -228,7 +254,7 @@ class CoreExport Channel : public virtual Base, public Extensible, public Flags<
Anope::string GetModes(bool complete, bool plus);
/** Update the topic of the channel internally, and reset it if topiclock etc says to
* @param user THe user setting the new topic
* @param user The user setting the new topic
* @param newtopic The new topic
* @param ts The time the new topic is being set
*/
@@ -241,20 +267,38 @@ class CoreExport Channel : public virtual Base, public Extensible, public Flags<
*/
void ChangeTopic(const Anope::string &user, const Anope::string &newtopic, time_t ts = Anope::CurTime);
/** Hold the channel open using ChanServ
/** Set the correct modes, or remove the ones granted without permission,
* for the specified user.
* @param user The user to give/remove modes to/from
* @param give_modes if true modes may be given to the user
*/
void Hold();
void SetCorrectModes(User *u, bool give_modes);
/** Unbans a user from this channel.
* @param u The user to unban
* @param full Whether or not to match using the user's real host and IP
* @return whether or not a ban was removed
*/
bool Unban(User *u, bool full = false);
/** Check whether a user is permitted to be on this channel
* @param u The user
* @return true if they are allowed, false if they aren't and were kicked
*/
bool CheckKick(User *user);
/** Finds a channel
* @param name The channel to find
* @return The channel, if found
*/
static Channel* Find(const Anope::string &name);
/** Finds or creates a channel
* @param name The channel name
* @param created Set to true if the channel was just created
* @param ts The time the channel was created
*/
static Channel *FindOrCreate(const Anope::string &name, bool &created, time_t ts = Anope::CurTime);
};
extern CoreExport Channel *findchan(const Anope::string &chan);
extern CoreExport User *nc_on_chan(Channel *c, const NickCore *nc);
extern CoreExport void do_cmode(const Anope::string &source, const Anope::string &channel, const Anope::string &modes, const Anope::string &ts);
extern CoreExport void do_join(const Anope::string &source, const Anope::string &channels, const Anope::string &ts);
extern CoreExport void do_kick(const Anope::string &source, const Anope::string &channel, const Anope::string &users, const Anope::string &reason);
extern CoreExport void do_part(const Anope::string &source, const Anope::string &channels, const Anope::string &reason);
extern CoreExport void chan_set_correct_modes(const User *user, Channel *c, int give_modes);
#endif // CHANNELS_H
+67 -31
View File
@@ -1,6 +1,6 @@
/* Declarations for command data.
*
* (C) 2003-2012 Anope Team
* (C) 2003-2013 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -14,28 +14,39 @@
#include "service.h"
#include "anope.h"
#include "channels.h"
enum CommandFlag
struct CommandGroup
{
CFLAG_ALLOW_UNREGISTERED,
CFLAG_STRIP_CHANNEL
};
const Anope::string CommandFlagStrings[] = {
"CFLAG_ALLOW_UNREGISTERED",
"CFLAG_STRIP_CHANNEL",
""
Anope::string name, description;
};
/* Used in BotInfo::commands */
struct CommandInfo
{
typedef Anope::map<CommandInfo> map;
CommandInfo() : hide(false), prepend_channel(false) { }
/* Service name of the command */
Anope::string name;
/* Permission required to execute the command */
Anope::string permission;
/* Group this command is in */
Anope::string group;
/* whether or not to hide this command in help output */
bool hide;
/* Only used with fantasy */
bool prepend_channel;
};
struct CommandReply
/* Where the replies from commands go to. User inheits from this and is the normal
* source of a CommandReply
*/
struct CoreExport CommandReply
{
virtual void SendMessage(const BotInfo *source, const Anope::string &msg) = 0;
virtual ~CommandReply() { }
virtual void SendMessage(BotInfo *source, const Anope::string &msg) = 0;
};
/* The source for a command */
@@ -44,55 +55,59 @@ class CoreExport CommandSource
/* The nick executing the command */
Anope::string nick;
/* User executing the command, may be NULL */
User *u;
Reference<User> u;
public:
/* The account executing the command */
NickCore *nc;
Reference<NickCore> nc;
/* Where the reply should go */
CommandReply *reply;
/* Channel the command was executed on (fantasy) */
Channel *c;
Reference<Channel> c;
/* The service this command is on */
BotInfo *owner;
/* The service the reply should come from, *not* necessarily the service the command is on */
BotInfo *service;
Reference<BotInfo> service;
/* The actual name of the command being executed */
Anope::string command;
/* The permission of the command being executed */
Anope::string permission;
CommandSource(const Anope::string &n, User *user, NickCore *core, CommandReply *reply);
CommandSource(const Anope::string &n, User *user, NickCore *core, CommandReply *reply, BotInfo *bi);
const Anope::string &GetNick() const;
User *GetUser() const;
AccessGroup AccessFor(ChannelInfo *ci) const;
bool IsFounder(ChannelInfo *ci) const;
User *GetUser();
NickCore *GetAccount();
AccessGroup AccessFor(ChannelInfo *ci);
bool IsFounder(ChannelInfo *ci);
void Reply(const char *message, ...);
void Reply(const Anope::string &message);
bool HasCommand(const Anope::string &cmd);
bool HasPriv(const Anope::string &cmd);
bool IsServicesOper() const;
bool IsOper() const;
bool IsServicesOper();
bool IsOper();
};
/** Every services command is a class, inheriting from Command.
*/
class CoreExport Command : public Service, public Flags<CommandFlag>
class CoreExport Command : public Service
{
Anope::string desc;
std::vector<Anope::string> syntax;
/* Allow unregistered users to use this command */
bool allow_unregistered;
/* Command requires that a user is executing it */
bool require_user;
public:
/* Maximum paramaters accepted by this command */
size_t MaxParams;
size_t max_params;
/* Minimum parameters required to use this command */
size_t MinParams;
size_t min_params;
/* Module which owns us */
Module *module;
protected:
/** Create a new command.
* @param owner The owner of the command
* @param sname The command name
@@ -102,6 +117,7 @@ class CoreExport Command : public Service, public Flags<CommandFlag>
*/
Command(Module *owner, const Anope::string &sname, size_t min_params, size_t max_params = 0);
public:
virtual ~Command();
protected:
@@ -110,12 +126,19 @@ class CoreExport Command : public Service, public Flags<CommandFlag>
void ClearSyntax();
void SetSyntax(const Anope::string &s);
void SendSyntax(CommandSource &);
void SendSyntax(CommandSource &, const Anope::string &syntax);
void AllowUnregistered(bool b);
void RequireUser(bool b);
public:
bool AllowUnregistered() const;
bool RequireUser() const;
/** Get the command description
* @param source The source wanting the command description
* @return The commands description
*/
const Anope::string &GetDesc() const;
virtual const Anope::string GetDesc(CommandSource &source) const;
/** Execute this command.
* @param source The source
@@ -140,8 +163,21 @@ class CoreExport Command : public Service, public Flags<CommandFlag>
* @param subcommand The subcommand the user tried to use
*/
virtual void OnSyntaxError(CommandSource &source, const Anope::string &subcommand);
/** Runs a command
* @param source The source of the command
* @param message The full message to run, the command is at the beginning of the message
*/
static void Run(CommandSource &source, const Anope::string &message);
/** Looks up a command name from the service name.
* Note that if the same command exists multiple places this will return the first one encountered
* @param command_service The command service to lookup, eg, nickserv/register
* @param bot If found, is set to the bot the command is on, eg NickServ
* @param name If found, is set to the comand name, eg REGISTER
* @return true if the given command service exists
*/
static bool FindCommandFromService(const Anope::string &command_service, BotInfo* &bi, Anope::string &name);
};
extern CoreExport void RunCommand(CommandSource &source, const Anope::string &message);
#endif // COMMANDS_H
+114 -745
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2003-2012 Anope Team
* (C) 2003-2013 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -8,7 +8,6 @@
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*
*
*/
#ifndef CONFIG_H
@@ -17,336 +16,127 @@
#include "account.h"
#include "regchannel.h"
#include "users.h"
#include "opertype.h"
#include <stack>
/** A configuration key and value pair
*/
typedef std::pair<Anope::string, Anope::string> KeyVal;
/** A list of related configuration keys and values
*/
typedef std::vector<KeyVal> KeyValList;
/** An entire config file, built up of KeyValLists
*/
typedef std::multimap<Anope::string, KeyValList> ConfigDataHash;
// Required forward definitions
/** Types of data in the core config
*/
enum ConfigDataType
namespace Configuration
{
DT_NOTHING, // No data
DT_INTEGER, // Integer
DT_UINTEGER, // Unsigned Integer
DT_LUINTEGER, // Long Unsigned Integer
DT_STRING, // Anope::string
DT_BOOLEAN, // Boolean
DT_HOSTNAME, // Hostname syntax
DT_NOSPACES, // No spaces
DT_IPADDRESS, // IP address (v4, v6)
DT_TIME, // Time value
DT_NORELOAD = 32, // Item can't be reloaded after startup
DT_ALLOW_WILD = 64, // Allow wildcards/CIDR in DT_IPADDRESS
DT_ALLOW_NEWLINE = 128, // New line characters allowed in DT_STRING
DT_ALLOW_EMPTY = 256 // Allow empty value
};
/** Holds a config value, either string, integer or boolean.
* Callback functions receive one or more of these, either on
* their own as a reference, or in a reference to a deque of them.
* The callback function can then alter the values of the ValueItem
* classes to validate the settings.
*/
class CoreExport ValueItem
{
private:
/** Actual data */
Anope::string v;
public:
/** Initialize with nothing */
ValueItem();
/** Initialize with an int */
ValueItem(int);
/** Initialize with a bool */
ValueItem(bool);
/** Initialize with an Anope::string */
ValueItem(const Anope::string &);
/** Initialize with a long */
ValueItem(long);
/** Change value to an Anope::string */
void Set(const Anope::string &);
/** Change value to an int */
void Set(int);
/** Get value as an int */
int GetInteger() const;
/** Get value as a string */
const char *GetString() const;
/** Get value as an Anope::string */
inline const Anope::string &GetValue() const { return v; }
/** Get value as a bool */
bool GetBool() const;
};
/** The base class of the container 'ValueContainer'
* used internally by the core to hold core values.
*/
class ValueContainerBase
{
public:
/** Constructor */
ValueContainerBase() { }
/** Destructor */
virtual ~ValueContainerBase() { }
};
/** ValueContainer is used to contain pointers to different
* core values such as the server name, maximum number of
* clients etc.
* It is specialized to hold a data type, then pointed at
* a value in the ServerConfig class. When the value has been
* read and validated, the Set method is called to write the
* value safely in a type-safe manner.
*/
template<typename T> class ValueContainer : public ValueContainerBase
{
private:
/** Contained item */
T val;
public:
/** Initialize with nothing */
ValueContainer() : ValueContainerBase(), val(NULL) { }
/** Initialize with a value of type T */
ValueContainer(T Val) : ValueContainerBase(), val(Val) { }
/** Initialize with a copy */
ValueContainer(const ValueContainer &Val) : ValueContainerBase(), val(Val.val) { }
ValueContainer &operator=(const ValueContainer &Val)
class CoreExport Block
{
val = Val.val;
return *this;
}
/** Change value to type T of size s */
void Set(const T newval, size_t s)
friend struct Conf;
public:
typedef Anope::map<Anope::string> item_map;
typedef Anope::multimap<Block> block_map;
private:
Anope::string name;
item_map items;
block_map blocks;
int linenum;
public:
Block(const Anope::string &);
const Anope::string &GetName() const;
int CountBlock(const Anope::string &name);
Block* GetBlock(const Anope::string &name, int num = 0);
template<typename T> inline T Get(const Anope::string &tag)
{
return this->Get<T>(tag, "");
}
/* VS 2008 has an issue with having a default argument here (def = ""), which is why the above
* function exists.
*/
template<typename T> T Get(const Anope::string &tag, const Anope::string &def) const
{
const Anope::string &value = this->Get<const Anope::string>(tag, def);
try
{
return convertTo<T>(value);
}
catch (const ConvertException &)
{
return T();
}
}
bool Set(const Anope::string &tag, const Anope::string &value);
const item_map* GetItems() const;
};
template<> CoreExport const Anope::string Block::Get(const Anope::string &tag, const Anope::string& def) const;
template<> CoreExport time_t Block::Get(const Anope::string &tag, const Anope::string &def) const;
template<> CoreExport bool Block::Get(const Anope::string &tag, const Anope::string &def) const;
/** Represents a configuration file
*/
class File
{
memcpy(val, newval, s);
}
};
Anope::string name;
bool executable;
FILE *fp;
public:
File(const Anope::string &, bool);
~File();
const Anope::string &GetName() const;
/** This a specific version of ValueContainer to handle Anope::string specially
*/
template<> class ValueContainer<Anope::string *> : public ValueContainerBase
{
private:
/** Contained item */
Anope::string *val;
public:
/** Initialize with nothing */
ValueContainer() : ValueContainerBase(), val(NULL) { }
/** Initialize with an std::string */
ValueContainer(Anope::string *Val) : ValueContainerBase(), val(Val) { }
/** Initialize with a copy */
ValueContainer(const ValueContainer &Val) : ValueContainerBase(), val(Val.val) { }
ValueContainer &operator=(const ValueContainer &Val)
bool IsOpen() const;
bool Open();
void Close();
bool End() const;
Anope::string Read();
};
struct Uplink;
struct CoreExport Conf : Block
{
val = Val.val;
return *this;
}
/* options:readtimeout */
time_t ReadTimeout;
/* options:useprivmsg */
bool UsePrivmsg;
/* If we should default to privmsging clients */
bool DefPrivmsg;
/* Default language */
Anope::string DefLanguage;
/* options:timeoutcheck */
time_t TimeoutCheck;
/* options:usestrictprivmsg */
bool UseStrictPrivmsg;
/** Change value to given Anope::string */
void Set(const Anope::string &newval)
{
*val = newval;
}
/** Change value to given char pointer */
void Set(const char *newval)
{
*val = newval;
}
};
/* either "/msg " or "/" */
Anope::string StrictPrivmsg;
/* List of uplink servers to try and connect to */
std::vector<Uplink> Uplinks;
/* A vector of our logfile options */
std::vector<LogInfo> LogInfos;
/* Array of ulined servers */
std::vector<Anope::string> Ulines;
/* List of available opertypes */
std::vector<OperType *> MyOperTypes;
/* List of pairs of opers and their opertype from the config */
std::vector<Oper *> Opers;
/* Map of fantasy commands */
CommandInfo::map Fantasy;
/* Command groups */
std::vector<CommandGroup> CommandGroups;
/* List of modules to autoload */
std::vector<Anope::string> ModulesAutoLoad;
/** A specialization of ValueContainer to hold a pointer to a bool
*/
typedef ValueContainer<bool *> ValueContainerBool;
/* module configuration blocks */
std::map<Anope::string, Block *> modules;
Anope::map<Anope::string> bots;
/** A specialization of ValueContainer to hold a pointer to
* an unsigned int
*/
typedef ValueContainer<unsigned *> ValueContainerUInt;
Conf();
/** A specialization of ValueContainer to hold a pointer to
* a long unsigned int
*/
typedef ValueContainer<long unsigned *> ValueContainerLUInt;
void LoadConf(File &file);
/** A specialization of ValueContainer to hold a pointer to
* an int
*/
typedef ValueContainer<int *> ValueContainerInt;
Block *GetModule(Module *);
Block *GetModule(const Anope::string &name);
/** A specialization of ValueContainer to hold a pointer to
* a time_t
*/
typedef ValueContainer<time_t *> ValueContainerTime;
/** A specialization of ValueContainer to hold a pointer to
* an Anope::string
*/
typedef ValueContainer<Anope::string *> ValueContainerString;
/** A set of ValueItems used by multi-value validator functions
*/
typedef std::deque<ValueItem> ValueList;
/** A callback for validating a single value
*/
typedef bool (*Validator)(ServerConfig *, const Anope::string &, const Anope::string &, ValueItem &);
/** A callback for validating multiple value entries
*/
typedef bool (*MultiValidator)(ServerConfig *, const Anope::string &, const Anope::string *, ValueList &, int *);
/** A callback indicating the end of a group of entries
*/
typedef bool (*MultiNotify)(ServerConfig *, const Anope::string &);
bool ValidateNotEmpty(ServerConfig *, const Anope::string &tag, const Anope::string &value, ValueItem &data);
bool ValidateNotZero(ServerConfig *, const Anope::string &tag, const Anope::string &value, ValueItem &data);
bool ValidateEmailReg(ServerConfig *config, const Anope::string &tag, const Anope::string &value, ValueItem &data);
bool ValidatePort(ServerConfig *, const Anope::string &tag, const Anope::string &value, ValueItem &data);
bool ValidateGuestPrefix(ServerConfig *conf, const Anope::string &tag, const Anope::string &value, ValueItem &data);
bool ValidateBantype(ServerConfig *, const Anope::string &, const Anope::string &, ValueItem &data);
bool ValidateChanServ(ServerConfig *config, const Anope::string &tag, const Anope::string &value, ValueItem &data);
bool ValidateMemoServ(ServerConfig *config, const Anope::string &tag, const Anope::string &value, ValueItem &data);
bool ValidateBotServ(ServerConfig *config, const Anope::string &tag, const Anope::string &value, ValueItem &data);
bool ValidateHostServ(ServerConfig *config, const Anope::string &tag, const Anope::string &value, ValueItem &data);
bool ValidateLimitSessions(ServerConfig *config, const Anope::string &tag, const Anope::string &value, ValueItem &data);
bool ValidateOperServ(ServerConfig *config, const Anope::string &tag, const Anope::string &value, ValueItem &data);
bool ValidateGlobal(ServerConfig *config, const Anope::string &tag, const Anope::string &value, ValueItem &data);
bool ValidateNickLen(ServerConfig *, const Anope::string &, const Anope::string &, ValueItem &data);
bool ValidateMail(ServerConfig *config, const Anope::string &tag, const Anope::string &value, ValueItem &data);
bool ValidateGlobalOnCycle(ServerConfig *config, const Anope::string &tag, const Anope::string &value, ValueItem &data);
/** Represents a configuration file
*/
class ConfigurationFile
{
Anope::string name;
bool executable;
FILE *fp;
public:
ConfigurationFile(const Anope::string &, bool);
~ConfigurationFile();
const Anope::string &GetName() const;
bool IsOpen() const;
bool Open();
void Close();
bool End() const;
Anope::string Read();
};
/** Holds all of the core configuration items
*/
class CoreExport ConfigItems
{
public:
/** Holds a core configuration item and its callbacks
*/
struct Item
{
/** Tag name */
Anope::string tag;
/** Value name */
Anope::string value;
/** Default, if not defined */
Anope::string default_value;
/** Value containers */
ValueContainerBase *val;
/** Data types */
int datatype;
/** Validation function */
Validator validation_function;
} *Values;
/** Holds a core configuration item and its callbacks
* where there may be more than one item
*/
struct MultiItem
{
/** Tag name */
Anope::string tag;
/** One or more items within tag */
Anope::string items[17];
/** One or more defaults for items within tags */
Anope::string items_default[17];
/** One or more data types */
int datatype[17];
/** Initialization function */
MultiNotify init_function;
/** Validation function */
MultiValidator validation_function;
/** Completion function */
MultiNotify finish_function;
} *MultiValues;
ConfigItems(ServerConfig *conf);
~ConfigItems();
};
/** This class holds the bulk of the runtime configuration for Anope.
* It allows for reading new config values, accessing configuration files,
* and storage of the configuration data needed to run Anope.
*/
class CoreExport ServerConfig
{
private:
/** Check that there is only one of each configuration item
*/
bool CheckOnce(const Anope::string &);
public:
/** This holds all the information in the config file,
* it's indexed by tag name to a vector of key/values.
*/
ConfigDataHash config_data;
/** Construct a new ServerConfig
*/
ServerConfig();
/** Read the entire configuration into memory
* and initialize this class. All other methods
* should be used only by the core.
*/
void Read();
/** Load the configuration file into 'this'. With the new config parser everything is parsed into
* tag/key/value at load-time rather than at read-value time.
*/
void LoadConf(ConfigurationFile &file);
// Both these return true if the value existed or false otherwise
/** Writes 'length' chars into 'result' as a string
*/
bool ConfValue(ConfigDataHash &, const Anope::string &, const Anope::string &, int, Anope::string &, bool = false);
/** Writes 'length' chars into 'result' as a string
*/
bool ConfValue(ConfigDataHash &, const Anope::string &, const Anope::string &, const Anope::string &, int, Anope::string &, bool = false);
/** Tries to convert the value to an integer and write it to 'result'
*/
bool ConfValueInteger(ConfigDataHash &, const Anope::string &, const Anope::string &, int, int &);
/** Tries to convert the value to an integer and write it to 'result'
*/
bool ConfValueInteger(ConfigDataHash &, const Anope::string &, const Anope::string &, const Anope::string &, int, int &);
/** Returns true if the value exists and has a true value, false otherwise
*/
bool ConfValueBool(ConfigDataHash &, const Anope::string &, const Anope::string &, int);
/** Returns true if the value exists and has a true value, false otherwise
*/
bool ConfValueBool(ConfigDataHash &, const Anope::string &, const Anope::string &, const Anope::string &, int);
/** Returns the number of occurences of tag in the config file
*/
int ConfValueEnum(const ConfigDataHash &, const Anope::string &);
/** Returns the numbers of vars inside the index'th 'tag in the config file
*/
int ConfVarEnum(ConfigDataHash &, const Anope::string &, int);
void ValidateHostname(const Anope::string &, const Anope::string &, const Anope::string &) const;
void ValidateIP(const Anope::string &p, const Anope::string &, const Anope::string &, bool) const;
void ValidateNoSpaces(const Anope::string &, const Anope::string &, const Anope::string &) const;
BotInfo *GetClient(const Anope::string &name);
};
struct Uplink
{
@@ -356,329 +146,10 @@ class CoreExport ServerConfig
bool ipv6;
Uplink(const Anope::string &_host, int _port, const Anope::string &_password, bool _ipv6) : host(_host), port(_port), password(_password), ipv6(_ipv6) { }
bool operator==(const Uplink &other) const
{
if (this->host != other.host)
return false;
if (this->port != other.port)
return false;
if (this->password != other.password)
return false;
if (this->ipv6 != other.ipv6)
return false;
return true;
}
inline bool operator==(const Uplink &other) const { return host == other.host && port == other.port && password == other.password && ipv6 == other.ipv6; }
inline bool operator!=(const Uplink &other) const { return !(*this == other); }
};
/** Below here is a list of variables which contain the config files values
*/
/* Host to bind to */
Anope::string LocalHost;
/* List of uplink servers to try and connect to */
std::vector<Uplink *> Uplinks;
/* Our server name */
Anope::string ServerName;
/* Our servers description */
Anope::string ServerDesc;
/* Name of the network were on */
Anope::string NetworkName;
/* The max legnth of nicks */
unsigned NickLen;
/* Max length of idents */
unsigned UserLen;
/* Max lenght of hostnames */
unsigned HostLen;
/* Casemapping to use */
Anope::string CaseMap;
/* Max length of passwords */
unsigned PassLen;
/* Filename for the PID file */
Anope::string PIDFilename;
/* MOTD filename */
Anope::string MOTDFilename;
Anope::string BotServ;
Anope::string ChanServ;
Anope::string Global;
Anope::string HostServ;
Anope::string NickServ;
Anope::string OperServ;
Anope::string MemoServ;
/* True if its ok to not be able to save backs */
bool NoBackupOkay;
/* Do password checking when new people register */
bool StrictPasswords;
/* How many times you're allowed to give a bad password before being killed */
unsigned BadPassLimit;
/* How long before bad passwords are forgotten */
time_t BadPassTimeout;
/* Delay between automatic database updates */
time_t UpdateTimeout;
/* Delay between checks for expired nicks and channels */
time_t ExpireTimeout;
/* How long to wait for something from the uplink, this is passed to select() */
time_t ReadTimeout;
/* How often to send program errors */
time_t WarningTimeout;
/* How long to process things such as timers to see if there is anything to calll */
time_t TimeoutCheck;
/* Number of days backups are kept */
int KeepBackups;
/* Forbidding requires a reason */
bool ForceForbidReason;
/* Services should use privmsgs instead of notices */
bool UsePrivmsg;
/* Services only respond to full PRIVMSG client@services.server.name messages */
bool UseStrictPrivMsg;
/* This is not a configurable option.
* Config::Config will set it depending on the value of UseStrictPrivMsg */
Anope::string UseStrictPrivMsgString;
/* Number of seconds between consecutive uses of the REGISTER command
* Not to be confused with NSRegDelay */
unsigned NickRegDelay;
/* Max number if news items allowed in the list */
unsigned NewsCount;
/* Default mlock modes */
Anope::string MLock;
/* Unmlockable modes */
Anope::string NoMLock;
/* Modes that are required to be on registered channels */
Anope::string CSRequire;
/* Use server side mlock */
bool UseServerSideMLock;
/* Default botmodes on channels, defaults to ao */
Anope::string BotModes;
/* THe actual modes */
ChannelStatus BotModeList;
/* How long to wait between connection attempts */
int RetryWait;
/* If services should hide unprivileged commands */
bool HidePrivilegedCommands;
/* If set, nicks cant be owned/everything is entirely account based */
bool NoNicknameOwnership;
/* Regex engine to use */
Anope::string RegexEngine;
/* A vector of our logfile options */
std::vector<LogInfo *> LogInfos;
/* Services can use email */
bool UseMail;
/* Path to the sendmail executable */
Anope::string SendMailPath;
/* Address to send from */
Anope::string SendFrom;
/* Only opers can have services send mail */
bool RestrictMail;
/* Delay between sending mail */
time_t MailDelay;
/* Don't quote the To: address */
bool DontQuoteAddresses;
/* Mail messages to send */
Anope::string MailRegistrationSubject, MailRegistrationMessage;
Anope::string MailResetSubject, MailResetMessage;
Anope::string MailSendpassSubject, MailSendpassMessage;
Anope::string MailEmailchangeSubject, MailEmailchangeMessage;
Anope::string MailMemoSubject, MailMemoMessage;
/* Nameserver to use for resolving hostnames */
Anope::string NameServer;
/* TIme before a DNS query is considered dead */
time_t DNSTimeout;
/* Prefix of guest nicks when a user gets forced off of a nick */
Anope::string NSGuestNickPrefix;
/* Allow users to set kill immed on */
bool NSAllowKillImmed;
/* Don't allow nicks to use /ns group to regroup nicks */
bool NSNoGroupChange;
/* Default flags for newly registered nicks */
Flags<NickCoreFlag, NI_END> NSDefFlags;
/* All languages Anope is aware about */
Anope::string Languages;
/* Default language used by services */
Anope::string NSDefLanguage;
/* Users must be connected this long before they can register
* Not to be confused with NickRegDelay */
time_t NSRegDelay;
/* Time before the registering mail will be resent */
time_t NSResendDelay;
/* How long before nicks expire */
time_t NSExpire;
/* How long before suspended nicks expire */
time_t NSSuspendExpire;
/* Time before unconfirmed nicks expire */
time_t NSUnconfirmedExpire;
/* Force email when registering */
bool NSForceEmail;
/* Force users to validate new email addresses */
bool NSConfirmEmailChanges;
/* Max number of nicks in a group */
unsigned NSMaxAliases;
/* Max number of allowed strings on the access list */
unsigned NSAccessMax;
/* Enforcer client user name */
Anope::string NSEnforcerUser;
/* Enforcer client hostname */
Anope::string NSEnforcerHost;
/* How long before recovered nicks are released */
time_t NSReleaseTimeout;
/* Max number of entries that can be returned from the list command */
unsigned NSListMax;
/* Only allow usermode +a etc on real services admins */
bool NSSecureAdmins;
/* Services opers must be /operd on the ircd aswell */
bool NSStrictPrivileges;
/* Type of confirmation to use, or to disable registration completely */
Anope::string NSRegistration;
/* A message sent to unregistered users on connect */
Anope::string NSUnregisteredNotice;
/* Core NickServ modules */
Anope::string NickCoreModules;
/* Set the proper channel modes on users when they identify */
bool NSModeOnID;
/* Add the users hostnask their access list when they register */
bool NSAddAccessOnReg;
/* Maximum number of channels on AJoin */
unsigned AJoinMax;
/* Core ChanServ modules */
Anope::string ChanCoreModules;
/* Default flags for newly registered channels */
Flags<ChannelInfoFlag, CI_END> CSDefFlags;
/* Max number of channels a user can own */
unsigned CSMaxReg;
/* Time before a channel expires */
time_t CSExpire;
/* How long before suspended channels expire */
time_t CSSuspendExpire;
/* How long before forbidden channels expire */
time_t CSForbidExpire;
/* Default ban type to use for channels */
int CSDefBantype;
/* Max number of entries allowed on channel access lists */
unsigned CSAccessMax;
/* Max number of entries allowed on autokick lists */
unsigned CSAutokickMax;
/* Default autokick reason */
Anope::string CSAutokickReason;
/* Time ChanServ should stay in the channel to hold it to keep users from getting in */
time_t CSInhabit;
/* Max number of entries allowed to be returned from the LIST command */
unsigned CSListMax;
/* true to make ChanServ oper only */
bool CSOpersOnly;
/* Max number of memos allowed */
unsigned MSMaxMemos;
/* Time you must wait between sending memos */
time_t MSSendDelay;
/* Notify all of the aliases of the core the memo was sent to */
bool MSNotifyAll;
/* Who can use memos reciepts */
unsigned MSMemoReceipt;
/* Valid chars allowed in vhosts */
Anope::string VhostChars;
/* Allow undotted vhosts? */
bool VhostUndotted;
/* Chars disallowed at the beginning or end of vhosts */
Anope::string VhostDisallowBE;
/* Core BotServ modules */
Anope::string BotCoreModules;
/* Default BotServ flags */
Flags<BotServFlag> BSDefFlags;
/* How long before botserv forgets a user. This is used for flood kickers etc */
time_t BSKeepData;
/* Min number of users to have in the channel before the service bot joins */
unsigned BSMinUsers;
/* Max number of words allowed on the badwordslist */
unsigned BSBadWordsMax;
/* BotServ bot only joins if it would normally allowed to, abides by bans etc */
bool BSSmartJoin;
/* Dont tell users what badword they used */
bool BSGentleBWReason;
/* Case sensitive badwords matching */
bool BSCaseSensitive;
/* Char to use for the fantasy char, eg ! */
Anope::string BSFantasyCharacter;
/* Only show /stats o to opers */
bool HideStatsO;
/* Send out a global when services shut down or restart */
bool GlobalOnCycle;
/* Don't include the opers name in globals */
bool AnonymousGlobal;
/* Dont allow users to register nicks with oper names in them */
bool RestrictOperNicks;
/* Message to send when shutting down */
Anope::string GlobalOnCycleMessage;
/* Message to send when starting up */
Anope::string GlobalOnCycleUP;
/* Super admin is allowed */
bool SuperAdmin;
/* Default expiry time for akills */
time_t AutokillExpiry;
/* Default expiry time for chan kills */
time_t ChankillExpiry;
/* Default expiry time for SNLine Expire */
time_t SNLineExpiry;
/* Default expiry time for SQLines */
time_t SQLineExpiry;
/* Actually akill the user when the akill is added */
bool AkillOnAdd;
/* Kill users on SNLine */
bool KillonSNline;
/* Kill users on SQline */
bool KillonSQline;
/* Add the akillers nick to the akill reason */
bool AddAkiller;
/* Add akill ids to akill reason */
bool AkillIds;
/* Limit sessions */
bool LimitSessions;
/* The default session limit */
unsigned DefSessionLimit;
/* How long before exceptions expire */
time_t ExceptionExpiry;
/* How many times to kill before adding an KILL */
unsigned MaxSessionKill;
/* Max limit that can be used for exceptions */
unsigned MaxSessionLimit;
/* How long session akills should last */
time_t SessionAutoKillExpiry;
/* Reason to use for session kills */
Anope::string SessionLimitExceeded;
/* Optional second reason */
Anope::string SessionLimitDetailsLoc;
/* OperServ requires you to be an operator */
bool OSOpersOnly;
/* List of modules to autoload */
std::list<Anope::string> ModulesAutoLoad;
/* Seed to use for RNG */
unsigned long Seed;
/* Numeric */
Anope::string Numeric;
/* Array of ulined servers */
std::list<Anope::string> Ulines;
/* List of available opertypes */
std::list<OperType *> MyOperTypes;
/* List of pairs of opers and their opertype from the config */
std::vector<Oper *> Opers;
};
}
/** This class can be used on its own to represent an exception, or derived to represent a module-specific exception.
* When a module whishes to abort, e.g. within a constructor, it should throw an exception using ModuleException or
@@ -702,109 +173,7 @@ class ConfigException : public CoreException
virtual ~ConfigException() throw() { }
};
#define CONF_NO_ERROR 0x000000
#define CONF_NOT_A_NUMBER 0x000010
#define CONF_INT_NEGATIVE 0x000080
#define CONF_VALUE_NOT_FOUND 0x000100
#define CONF_FILE_NOT_FOUND 0x000200
/** Allows reading of values from configuration files
* This class allows a module to read from either the main configuration file (inspircd.conf) or from
* a module-specified configuration file. It may either be instantiated with one parameter or none.
* Constructing the class using one parameter allows you to specify a path to your own configuration
* file, otherwise, inspircd.conf is read.
*/
class CoreExport ConfigReader
{
protected:
/** True if an error occured reading the config file
*/
bool readerror;
/** Error code
*/
long error;
public:
/** Default constructor.
* This constructor initialises the ConfigReader class to read the configuration file(s).
*/
ConfigReader();
/** Overloaded constructor.
* This constructor initialises the ConfigReader class to read a user-specified config file
*/
ConfigReader(const Anope::string &);
/** Default destructor.
* This method destroys the ConfigReader class.
*/
~ConfigReader();
/** Retrieves a value from the config file.
* This method retrieves a value from the config file. Where multiple copies of the tag
* exist in the config file, index indicates which of the values to retrieve.
*/
Anope::string ReadValue(const Anope::string &, const Anope::string &, int, bool = false);
/** Retrieves a value from the config file.
* This method retrieves a value from the config file. Where multiple copies of the tag
* exist in the config file, index indicates which of the values to retrieve. If the
* tag is not found the default value is returned instead.
*/
Anope::string ReadValue(const Anope::string &, const Anope::string &, const Anope::string &, int, bool = false);
/** Retrieves a boolean value from the config file.
* This method retrieves a boolean value from the config file. Where multiple copies of the tag
* exist in the config file, index indicates which of the values to retrieve. The values "1", "yes"
* and "true" in the config file count as true to ReadFlag, and any other value counts as false.
*/
bool ReadFlag(const Anope::string &, const Anope::string &, int);
/** Retrieves a boolean value from the config file.
* This method retrieves a boolean value from the config file. Where multiple copies of the tag
* exist in the config file, index indicates which of the values to retrieve. The values "1", "yes"
* and "true" in the config file count as true to ReadFlag, and any other value counts as false.
* If the tag is not found, the default value is used instead.
*/
bool ReadFlag(const Anope::string &, const Anope::string &, const Anope::string &, int);
/** Retrieves an integer value from the config file.
* This method retrieves an integer value from the config file. Where multiple copies of the tag
* exist in the config file, index indicates which of the values to retrieve. Any invalid integer
* values in the tag will cause the objects error value to be set, and any call to GetError() will
* return CONF_INVALID_NUMBER to be returned. need_positive is set if the number must be non-negative.
* If a negative number is placed into a tag which is specified positive, 0 will be returned and GetError()
* will return CONF_INT_NEGATIVE. Note that need_positive is not suitable to get an unsigned int - you
* should cast the result to achieve that effect.
*/
int ReadInteger(const Anope::string &, const Anope::string &, int, bool);
/** Retrieves an integer value from the config file.
* This method retrieves an integer value from the config file. Where multiple copies of the tag
* exist in the config file, index indicates which of the values to retrieve. Any invalid integer
* values in the tag will cause the objects error value to be set, and any call to GetError() will
* return CONF_INVALID_NUMBER to be returned. needs_unsigned is set if the number must be unsigned.
* If a signed number is placed into a tag which is specified unsigned, 0 will be returned and GetError()
* will return CONF_NOT_UNSIGNED. If the tag is not found, the default value is used instead.
*/
int ReadInteger(const Anope::string &, const Anope::string &, const Anope::string &, int, bool);
/** Returns the last error to occur.
* Valid errors can be found by looking in modules.h. Any nonzero value indicates an error condition.
* A call to GetError() resets the error flag back to 0.
*/
long GetError();
/** Counts the number of times a given tag appears in the config file.
* This method counts the number of times a tag appears in a config file, for use where
* there are several tags of the same kind, e.g. with opers and connect types. It can be
* used with the index value of ConfigReader::ReadValue to loop through all copies of a
* multiple instance tag.
*/
int Enumerate(const Anope::string &) const;
/** Returns true if a config file is valid.
* This method is partially implemented and will only return false if the config
* file does not exist or could not be opened.
*/
bool Verify();
/** Returns the number of items within a tag.
* For example if the tag was &lt;test tag="blah" data="foo"&gt; then this
* function would return 2. Spaces and newlines both qualify as valid seperators
* between values.
*/
int EnumerateValues(const Anope::string &, int);
};
extern ConfigurationFile services_conf;
extern CoreExport ServerConfig *Config;
extern Configuration::File ServicesConf;
extern CoreExport Configuration::Conf *Config;
#endif // CONFIG_H
+8 -7
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2003-2012 Anope Team
* (C) 2003-2013 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -19,34 +19,35 @@ class ChanAccess;
class Channel;
class ChannelInfo;
class ChannelStatus;
struct ChanUserContainer;
class ClientSocket;
class Command;
class CommandSource;
namespace Configuration { struct Conf; }
class ConnectionSocket;
class DNSPacket;
class dynamic_reference_base;
namespace DNS { struct Query; }
class Entry;
class IdentifyRequest;
class InfoFormatter;
class IRCDProto;
class ListenSocket;
class Log;
class LogInfo;
class Memo;
class Message;
class MessageSource;
class Module;
class NickAlias;
class NickCore;
class OperType;
class ReferenceBase;
class Regex;
class Serializable;
class Server;
class ServerConfig;
class Socket;
class Thread;
class User;
class XLine;
class XLineManager;
struct BadWord;
struct DNSQuery;
struct Exception;
struct MemoInfo;
struct ModeLock;
-203
View File
@@ -1,203 +0,0 @@
/*
*
* (C) 2003-2012 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*
*
*/
#ifndef DNS_H
#define DNS_H
#include "sockets.h"
#include "timers.h"
#include "extern.h"
#include "config.h"
/** Valid query types
*/
enum QueryType
{
/* Nothing */
DNS_QUERY_NONE,
/* A simple A lookup */
DNS_QUERY_A = 1,
/* A CNAME lookup */
DNS_QUERY_CNAME = 5,
/* Reverse DNS lookup */
DNS_QUERY_PTR = 12,
/* IPv6 AAAA lookup */
DNS_QUERY_AAAA = 28
};
/** Flags that can be AND'd into DNSPacket::flags to receive certain values
*/
enum
{
DNS_QUERYFLAGS_QR = 0x8000,
DNS_QUERYFLAGS_OPCODE = 0x7800,
DNS_QUERYFLAGS_AA = 0x400,
DBS_QUERYFLAGS_TC = 0x200,
DNS_QUERYFLAGS_RD = 0x100,
DNS_QUERYFLAGS_RA = 0x80,
DNS_QUERYFLAGS_Z = 0x70,
DNS_QUERYFLAGS_RCODE = 0xF
};
enum DNSError
{
DNS_ERROR_NONE,
DNS_ERROR_UNKNOWN,
DNS_ERROR_UNLOADED,
DNS_ERROR_TIMEOUT,
DNS_ERROR_NOT_AN_ANSWER,
DNS_ERROR_NONSTANDARD_QUERY,
DNS_ERROR_FORMAT_ERROR,
DNS_ERROR_SERVER_FAILURE,
DNS_ERROR_DOMAIN_NOT_FOUND,
DNS_ERROR_NOT_IMPLEMENTED,
DNS_ERROR_REFUSED,
DNS_ERROR_NO_RECORDS,
DNS_ERROR_INVALIDTYPE
};
struct CoreExport Question
{
Anope::string name;
QueryType type;
unsigned short qclass;
Question();
Question(const Anope::string &, QueryType, unsigned short = 1);
};
struct CoreExport ResourceRecord : public Question
{
unsigned int ttl;
Anope::string rdata;
time_t created;
ResourceRecord(const Anope::string &, QueryType, unsigned short = 1);
ResourceRecord(const Question &);
};
struct CoreExport DNSQuery
{
std::vector<Question> questions;
std::vector<ResourceRecord> answers, authorities, additional;
DNSError error;
DNSQuery();
DNSQuery(const Question &q);
DNSQuery(const DNSPacket &p);
};
/** The request
*/
class CoreExport DNSRequest : public Timer, public Question
{
/* Use result cache if available */
bool use_cache;
public:
/* Request id */
unsigned short id;
/* Creator of this request */
Module *creator;
DNSRequest(const Anope::string &addr, QueryType qt, bool cache = false, Module *c = NULL);
virtual ~DNSRequest();
void Process();
virtual void OnLookupComplete(const DNSQuery *r) = 0;
virtual void OnError(const DNSQuery *r);
void Tick(time_t) anope_override;
};
/** A full packet sent or recieved to/from the nameserver, may contain multiple queries
*/
class DNSPacket : public DNSQuery
{
static const int DNS_POINTER = 0xC0;
static const int DNS_LABEL = 0x3F;
void PackName(unsigned char *output, unsigned short output_size, unsigned short &pos, const Anope::string &name);
Anope::string UnpackName(const unsigned char *input, unsigned short input_size, unsigned short &pos);
Question UnpackQuestion(const unsigned char *input, unsigned short input_size, unsigned short &pos);
ResourceRecord UnpackResourceRecord(const unsigned char *input, unsigned short input_size, unsigned short &poss);
public:
static const int HEADER_LENGTH = 12;
/* Our 16-bit id for this header */
unsigned short id;
/* Flags on the query */
unsigned short flags;
DNSPacket();
void Fill(const unsigned char *input, const unsigned short len);
unsigned short Pack(unsigned char *output, unsigned short output_size);
};
/** DNS manager, manages all requests
*/
class CoreExport DNSManager : public Timer, public Socket
{
typedef std::multimap<Anope::string, ResourceRecord, ci::less> cache_map;
cache_map cache;
sockaddrs addrs;
public:
std::deque<DNSPacket *> packets;
std::map<unsigned short, DNSRequest *> requests;
static const int DNSPort = 53;
DNSManager(const Anope::string &nameserver, int port);
~DNSManager();
bool ProcessRead();
bool ProcessWrite();
/** Add a record to the dns cache
* @param r The record
*/
void AddCache(DNSQuery &r);
/** Check the DNS cache to see if request can be handled by a cached result
* @return true if a cached result was found.
*/
bool CheckCache(DNSRequest *request);
/** Tick this timer, used to clear the DNS cache.
*/
void Tick(time_t now) anope_override;
/** Cleanup all pending DNS queries for a module
* @param mod The module
*/
void Cleanup(Module *mod);
/** Does a BLOCKING DNS query and returns the first IP.
* Only use this if you know what you are doing. Unless you specifically
* need a blocking query use the DNSRequest system
*/
static DNSQuery BlockingQuery(const Anope::string &mask, QueryType qt);
};
extern DNSManager *DNSEngine;
#endif // DNS_H
+220 -87
View File
@@ -1,125 +1,258 @@
/*
* Copyright (C) 2008-2012 Anope Team <team@anope.org>
*
* (C) 2003-2013 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
*/
#ifndef EXTENSIBLE_H
#define EXTENSIBLE_H
#include "anope.h"
#include "serialize.h"
#include "service.h"
#include "logger.h"
class CoreExport ExtensibleItem
class Extensible;
class CoreExport ExtensibleBase : public Service
{
protected:
std::map<Extensible *, void *> items;
ExtensibleBase(Module *m, const Anope::string &n);
~ExtensibleBase();
public:
ExtensibleItem();
virtual ~ExtensibleItem();
virtual void OnDelete();
};
virtual void Unset(Extensible *obj) = 0;
template<typename T> struct CoreExport ExtensibleItemClass : T, ExtensibleItem
{
ExtensibleItemClass(const T& t) : T(t) { }
/* called when an object we are keep track of is serializing */
virtual void ExtensibleSerialize(const Extensible *, const Serializable *, Serialize::Data &) const { }
virtual void ExtensibleUnserialize(Extensible *, Serializable *, Serialize::Data &) { }
};
class CoreExport Extensible
{
private:
typedef Anope::map<ExtensibleItem *> extensible_map;
extensible_map extension_items;
public:
std::set<ExtensibleBase *> extension_items;
virtual ~Extensible();
template<typename T> T* GetExt(const Anope::string &name) const;
bool HasExt(const Anope::string &name) const;
template<typename T> T* Extend(const Anope::string &name, const T &what);
template<typename T> T* Extend(const Anope::string &name);
template<typename T> T* Require(const Anope::string &name);
template<typename T> void Shrink(const Anope::string &name);
static void ExtensibleSerialize(const Extensible *, const Serializable *, Serialize::Data &data);
static void ExtensibleUnserialize(Extensible *, Serializable *, Serialize::Data &data);
};
template<typename T>
class BaseExtensibleItem : public ExtensibleBase
{
protected:
virtual T *Create(Extensible *) = 0;
public:
/** Default constructor, does nothing
*/
Extensible() { }
BaseExtensibleItem(Module *m, const Anope::string &n) : ExtensibleBase(m, n) { }
/** Default destructor, deletes all of the extensible items in this object
* then clears the map
*/
virtual ~Extensible()
~BaseExtensibleItem()
{
for (extensible_map::iterator it = extension_items.begin(), it_end = extension_items.end(); it != it_end; ++it)
if (it->second)
it->second->OnDelete();
extension_items.clear();
}
/** Extend an Extensible class.
*
* @param key The key parameter is an arbitary string which identifies the extension data
* @param p This parameter is a pointer to an ExtensibleItem or ExtensibleItemBase derived class
*
* You must provide a key to store the data as via the parameter 'key'.
* The data will be inserted into the map. If the data already exists, you may not insert it
* twice, Extensible::Extend will return false in this case.
*
* @return Returns true on success, false if otherwise
*/
void Extend(const Anope::string &key, ExtensibleItem *p)
{
this->Shrink(key);
this->extension_items[key] = p;
}
/** Shrink an Extensible class.
*
* @param key The key parameter is an arbitary string which identifies the extension data
*
* You must provide a key name. The given key name will be removed from the classes data. If
* you provide a nonexistent key (case is important) then the function will return false.
* @return Returns true on success.
*/
bool Shrink(const Anope::string &key)
{
extensible_map::iterator it = this->extension_items.find(key);
if (it != this->extension_items.end())
while (!items.empty())
{
if (it->second != NULL)
it->second->OnDelete();
/* map::size_type map::erase( const key_type& key );
* returns the number of elements removed, std::map
* is single-associative so this should only be 0 or 1
*/
return this->extension_items.erase(key) > 0;
}
std::map<Extensible *, void *>::iterator it = items.begin();
Extensible *obj = it->first;
T *value = static_cast<T *>(it->second);
return false;
obj->extension_items.erase(this);
items.erase(it);
delete value;
}
}
/** Get an extension item.
*
* @param key The key parameter is an arbitary string which identifies the extension data
* @return The item found
*/
template<typename T> T GetExt(const Anope::string &key) const
T* Set(Extensible *obj, const T &value)
{
extensible_map::const_iterator it = this->extension_items.find(key);
if (it != this->extension_items.end())
return anope_dynamic_reinterpret_cast<T>(it->second);
T* t = Set(obj);
if (t)
*t = value;
return t;
}
T* Set(Extensible *obj)
{
T* t = Create(obj);
Unset(obj);
items[obj] = t;
obj->extension_items.insert(this);
return t;
}
void Unset(Extensible *obj) anope_override
{
T *value = Get(obj);
items.erase(obj);
obj->extension_items.erase(this);
delete value;
}
T* Get(const Extensible *obj) const
{
std::map<Extensible *, void *>::const_iterator it = items.find(const_cast<Extensible *>(obj));
if (it != items.end())
return static_cast<T *>(it->second);
return NULL;
}
/** Check if an extension item exists.
*
* @param key The key parameter is an arbitary string which identifies the extension data
* @return True if the item was found.
*/
bool HasExt(const Anope::string &key) const
bool HasExt(const Extensible *obj) const
{
return this->extension_items.count(key) > 0;
return items.find(const_cast<Extensible *>(obj)) != items.end();
}
/** Get a list of all extension items names.
* @param list A deque of strings to receive the list
* @return This function writes a list of all extension items stored
* in this object by name into the given deque and returns void.
*/
void GetExtList(std::deque<Anope::string> &list) const
T* Require(Extensible *obj)
{
for (extensible_map::const_iterator it = extension_items.begin(), it_end = extension_items.end(); it != it_end; ++it)
list.push_back(it->first);
T* t = Get(obj);
if (t)
return t;
return Set(obj);
}
};
template<typename T>
class ExtensibleItem : public BaseExtensibleItem<T>
{
protected:
T* Create(Extensible *obj) anope_override
{
return new T(obj);
}
public:
ExtensibleItem(Module *m, const Anope::string &n) : BaseExtensibleItem<T>(m, n) { }
};
template<typename T>
class PrimitiveExtensibleItem : public BaseExtensibleItem<T>
{
protected:
T* Create(Extensible *obj) anope_override
{
return new T();
}
public:
PrimitiveExtensibleItem(Module *m, const Anope::string &n) : BaseExtensibleItem<T>(m, n) { }
};
template<>
class PrimitiveExtensibleItem<bool> : public BaseExtensibleItem<bool>
{
protected:
bool* Create(Extensible *) anope_override
{
return NULL;
}
public:
PrimitiveExtensibleItem(Module *m, const Anope::string &n) : BaseExtensibleItem<bool>(m, n) { }
};
template<typename T>
class SerializableExtensibleItem : public PrimitiveExtensibleItem<T>
{
public:
SerializableExtensibleItem(Module *m, const Anope::string &n) : PrimitiveExtensibleItem<T>(m, n) { }
void ExtensibleSerialize(const Extensible *e, const Serializable *s, Serialize::Data &data) const anope_override
{
T* t = this->Get(e);
data[this->name] << *t;
}
void ExtensibleUnserialize(Extensible *e, Serializable *s, Serialize::Data &data) anope_override
{
T t;
if (data[this->name] >> t)
this->Set(e, t);
}
};
template<>
class SerializableExtensibleItem<bool> : public PrimitiveExtensibleItem<bool>
{
public:
SerializableExtensibleItem(Module *m, const Anope::string &n) : PrimitiveExtensibleItem<bool>(m, n) { }
void ExtensibleSerialize(const Extensible *e, const Serializable *s, Serialize::Data &data) const anope_override
{
data[this->name] << true;
}
void ExtensibleUnserialize(Extensible *e, Serializable *s, Serialize::Data &data) anope_override
{
bool b = false;
data[this->name] >> b;
if (b)
this->Set(e);
}
};
template<typename T>
struct ExtensibleRef : ServiceReference<BaseExtensibleItem<T> >
{
ExtensibleRef(const Anope::string &n) : ServiceReference<BaseExtensibleItem<T> >("Extensible", n) { }
};
template<typename T>
T* Extensible::GetExt(const Anope::string &name) const
{
ExtensibleRef<T> ref(name);
if (ref)
return ref->Get(this);
Log(LOG_DEBUG) << "GetExt for nonexistent type " << name << " on " << static_cast<const void *>(this);
return NULL;
}
template<typename T>
T* Extensible::Extend(const Anope::string &name, const T &what)
{
T* t = Extend<T>(name);
if (t)
*t = what;
return t;
}
template<typename T>
T* Extensible::Extend(const Anope::string &name)
{
ExtensibleRef<T> ref(name);
if (ref)
return ref->Set(this);
Log(LOG_DEBUG) << "Extend for nonexistent type " << name << " on " << static_cast<void *>(this);
return NULL;
}
template<typename T>
T* Extensible::Require(const Anope::string &name)
{
if (HasExt(name))
return GetExt<T>(name);
else
return Extend<T>(name);
}
template<typename T>
void Extensible::Shrink(const Anope::string &name)
{
ExtensibleRef<T> ref(name);
if (ref)
ref->Unset(this);
else
Log(LOG_DEBUG) << "Shrink for nonexistent type " << name << " on " << static_cast<void *>(this);
}
#endif // EXTENSIBLE_H
-136
View File
@@ -1,136 +0,0 @@
/* Prototypes and external variable declarations.
*
* (C) 2003-2012 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*/
#ifndef EXTERN_H
#define EXTERN_H
#include "modes.h"
#define E extern CoreExport
#define EI extern DllExport
/**** actions.c ****/
E bool bad_password(User *u);
E void common_unban(const ChannelInfo *ci, User *u, bool full = false);
/**** encrypt.c ****/
E void enc_encrypt(const Anope::string &src, Anope::string &dest);
E bool enc_decrypt(const Anope::string &src, Anope::string &dest);
/**** init.c ****/
E Anope::string conf_dir, db_dir, modules_dir, locale_dir, log_dir;
E void introduce_user(const Anope::string &user);
E bool GetCommandLineArgument(const Anope::string &name, char shortname = 0);
E bool GetCommandLineArgument(const Anope::string &name, char shortname, Anope::string &param);
E bool AtTerm();
E void Fork();
E void Init(int ac, char **av);
/**** language.cpp ****/
E std::vector<Anope::string> languages;
E std::vector<Anope::string> domains;
E void InitLanguages();
E const char *translate(const char *string);
E const char *translate(User *u, const char *string);
E const char *translate(const NickCore *nc, const char *string);
E const char *anope_gettext(const char *lang, const char *string);
/**** main.c ****/
E Anope::string services_dir;
E Anope::string services_bin;
E int debug;
E bool readonly;
E bool nofork;
E bool nothird;
E bool noexpire;
E bool protocoldebug;
E bool quitting;
E int return_code;
E bool restarting;
E Anope::string quitmsg;
E time_t start_time;
E int CurrentUplink;
E void save_databases();
E void sighandler(int signum);
/**** messages.cpp ****/
E void init_core_messages();
E bool OnStats(const Anope::string &source, const std::vector<Anope::string> &);
E bool OnTime(const Anope::string &source, const std::vector<Anope::string> &);
E bool OnVersion(const Anope::string &source, const std::vector<Anope::string> &);
E bool On436(const Anope::string &, const std::vector<Anope::string> &);
E bool OnAway(const Anope::string &, const std::vector<Anope::string> &);
E bool OnJoin(const Anope::string &, const std::vector<Anope::string> &);
E bool OnKick(const Anope::string &, const std::vector<Anope::string> &);
E bool OnKill(const Anope::string &, const std::vector<Anope::string> &);
E bool OnMode(const Anope::string &, const std::vector<Anope::string> &);
E bool OnNick(const Anope::string &, const std::vector<Anope::string> &);
E bool OnUID(const Anope::string &, const std::vector<Anope::string> &);
E bool OnPart(const Anope::string &, const std::vector<Anope::string> &);
E bool OnPing(const Anope::string &, const std::vector<Anope::string> &);
E bool OnPrivmsg(const Anope::string &, const std::vector<Anope::string> &);
E bool OnQuit(const Anope::string &, const std::vector<Anope::string> &);
E bool OnServer(const Anope::string &, const std::vector<Anope::string> &);
E bool OnSQuit(const Anope::string &, const std::vector<Anope::string> &);
E bool OnTopic(const Anope::string &, const std::vector<Anope::string> &);
E bool OnWhois(const Anope::string &, const std::vector<Anope::string> &);
E bool OnCapab(const Anope::string &, const std::vector<Anope::string> &);
E bool OnSJoin(const Anope::string &, const std::vector<Anope::string> &);
E bool OnError(const Anope::string &, const std::vector<Anope::string> &);
/**** misc.c ****/
E bool IsFile(const Anope::string &filename);
E time_t dotime(const Anope::string &s);
E Anope::string duration(const time_t &seconds, const NickCore *nc = NULL);
E Anope::string expire_left(const NickCore *nc, time_t expires);
E Anope::string do_strftime(const time_t &t, const NickCore *nc = NULL, bool short_output = false);
E bool IsValidIdent(const Anope::string &ident);
E bool IsValidHost(const Anope::string &host);
E Anope::string myStrGetToken(const Anope::string &str, char dilim, int token_number);
E Anope::string myStrGetTokenRemainder(const Anope::string &str, char dilim, int token_number);
E int myNumToken(const Anope::string &str, char dilim);
E bool nickIsServices(const Anope::string &nick, bool bot);
E std::list<Anope::string> BuildStringList(const Anope::string &, char = ' ');
E std::vector<Anope::string> BuildStringVector(const Anope::string &, char = ' ');
E bool str_is_wildcard(const Anope::string &str);
E bool str_is_pure_wildcard(const Anope::string &str);
E Anope::string normalizeBuffer(const Anope::string &);
/**** modes.cpp ****/
/* Number of generic modes we support */
E unsigned GenericChannelModes, GenericUserModes;
E std::multimap<ChannelModeName, ModeLock *> def_mode_locks;
E void SetDefaultMLock(ServerConfig *config);
/**** process.c ****/
E void process(const Anope::string &buf);
#endif /* EXTERN_H */
+28 -16
View File
@@ -1,13 +1,10 @@
/*
*
* Copyright (C) 2002-2011 InspIRCd Development Team
* Copyright (C) 2009-2012 Anope Team <team@anope.org>
* Copyright (C) 2009-2013 Anope Team <team@anope.org>
*
* Please read COPYING and README for further details.
*
* These classes have been copied from InspIRCd and modified
* for use in Anope.
*
*
*/
#ifndef HASHCOMP_H
@@ -16,19 +13,33 @@
#include <string>
#include <locale>
#if defined _LIBCPP_VERSION || defined _WIN32
#include <unordered_map>
#define TR1NS std
#else
#include <tr1/unordered_map>
#define TR1NS std::tr1
#endif
#include "services.h"
namespace Anope
{
class string;
/* Casemap in use by Anope. ci::string's comparation functions use this (and thus Anope::string) */
extern std::locale casemap;
template<typename charT>
class ascii_ctype : public std::ctype<charT>
extern void CaseMapRebuild();
extern unsigned char tolower(unsigned char);
extern unsigned char toupper(unsigned char);
/* ASCII case insensitive ctype. */
template<typename char_type>
class ascii_ctype : public std::ctype<char_type>
{
public:
charT do_toupper(charT c) const anope_override
char_type do_toupper(char_type c) const anope_override
{
if (c >= 'a' && c <= 'z')
return c - 32;
@@ -36,7 +47,7 @@ namespace Anope
return c;
}
charT do_tolower(charT c) const anope_override
char_type do_tolower(char_type c) const anope_override
{
if (c >= 'A' && c <= 'Z')
return c + 32;
@@ -45,29 +56,30 @@ namespace Anope
}
};
template<typename charT>
class rfc1459_ctype : public ascii_ctype<charT>
/* rfc1459 case insensitive ctype, { = [, } = ], and | = \ */
template<typename char_type>
class rfc1459_ctype : public ascii_ctype<char_type>
{
public:
charT do_toupper(charT c) const anope_override
char_type do_toupper(char_type c) const anope_override
{
if (c == '{' || c == '}' || c == '|')
return c - 32;
else
return ascii_ctype<charT>::do_toupper(c);
return ascii_ctype<char_type>::do_toupper(c);
}
charT do_tolower(charT c) const anope_override
char_type do_tolower(char_type c) const anope_override
{
if (c == '[' || c == ']' || c == '\\')
return c + 32;
else
return ascii_ctype<charT>::do_tolower(c);
return ascii_ctype<char_type>::do_tolower(c);
}
};
}
/** The ci namespace contains a number of helper classes.
/** The ci namespace contains a number of helper classes relevant to case insensitive strings.
*/
namespace ci
{
+68 -24
View File
@@ -1,11 +1,69 @@
/* Commonly used language strings
/*
*
* (C) 2008-2012 Anope Team
* (C) 2008-2013 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
*/
#include "anope.h"
namespace Language
{
/* Languages we support as configured in services.conf. They are
* added to this list if we detect a language exists in the correct
* location for each language.
*/
extern CoreExport std::vector<Anope::string> Languages;
/* Domains to search when looking for translations other than the
* default "anope domain. This is used by modules who add their own
* language files (and thus domains) to Anope. If a module is loaded
* and we detect a language file exists for at least one of the supported
* languages for the module, then we add the module's domain (its name)
* here.
*
* When strings are translated they are checked against all domains.
*/
extern std::vector<Anope::string> Domains;
/** Initialize the language system. Finds valid language files and
* populates the Languages list.
*/
extern void InitLanguages();
/** Translates a string to the default language.
* @param string A string to translate
* @return The translated string if found, else the original string.
*/
extern CoreExport const char *Translate(const char *string);
/** Translates a string to the language of the given user.
* @param u The user to transate the string for
* @param string A string to translate
* @return The translated string if found, else the original string.
*/
extern CoreExport const char *Translate(User *u, const char *string);
/** Translates a string to the language of the given account.
* @param nc The account to translate the string for
* @param string A string to translate
* @return The translated string if count, else the original string
*/
extern CoreExport const char *Translate(const NickCore *nc, const char *string);
/** Translatesa string to the given language.
* @param lang The language to translate to
* @param string The string to translate
* @return The translated string if found, else the original string.
*/
extern CoreExport const char *Translate(const char *lang, const char *string);
} // namespace Language
/* Commonly used language strings */
#define MORE_INFO _("\002%s%s HELP %s\002 for more information.")
#define BAD_USERHOST_MASK _("Mask must be in the form \037user\037@\037host\037.")
#define BAD_EXPIRY_TIME _("Invalid expiry time.")
@@ -27,12 +85,9 @@
#define CHAN_X_NOT_IN_USE _("Channel \002%s\002 doesn't exist.")
#define NICK_IDENTIFY_REQUIRED _("Password authentication required for that command.")
#define MAIL_X_INVALID _("\002%s\002 is not a valid e-mail address.")
#define NO_REASON _("No reason")
#define UNKNOWN _("<unknown>")
#define NO_EXPIRE _("does not expire")
#define LIST_INCORRECT_RANGE _("Incorrect range specified. The correct syntax is \002#\037from\037-\037to\037\002.")
#define UNKNOWN_OPTION _("Unknown option \002%s\002.\n" \
"Type %s%s HELP %s for more information.")
#define NICK_IS_REGISTERED _("This nick is owned by someone else. Please choose another.\n" \
"(If this is your nick, type \002%s%s IDENTIFY \037password\037\002.)")
#define NICK_IS_SECURE _("This nickname is registered and protected. If it is your\n" \
@@ -41,24 +96,15 @@
#define FORCENICKCHANGE_NOW _("This nickname has been registered; you may not use it.")
#define NICK_CANNOT_BE_REGISTERED _("Nickname \002%s\002 may not be registered.")
#define NICK_ALREADY_REGISTERED _("Nickname \002%s\002 is already registered!")
#define NICK_SET_SYNTAX _("SET \037option\037 \037parameters\037")
#define NICK_SET_DISABLED _("Sorry, nickname option setting is temporarily disabled.")
#define NICK_SET_UNKNOWN_OPTION _("Unknown SET option \002%s%s\002.")
#define NICK_SET_DISPLAY_CHANGED _("The new display is now \002%s\002.")
#define NICK_LIST_SYNTAX _("LIST \037pattern\037")
#define NICK_RECOVERED _("User claiming your nick has been killed.\n" \
"\002%s%s RELEASE %s\002 to get it back before %s timeout.")
#define NICK_REQUESTED _("This nick has already been requested, please check your e-mail address for the pass code")
#define NICK_CONFIRM_INVALID _("Invalid passcode has been entered, please check the e-mail again, and retry")
#define NICK_CONFIRM_INVALID _("Invalid passcode has been entered, please check the e-mail again, and retry.")
#define CHAN_NOT_ALLOWED_TO_JOIN _("You are not permitted to be on this channel.")
#define CHAN_X_INVALID _("Channel %s is not a valid channel.")
#define CHAN_REACHED_CHANNEL_LIMIT _("Sorry, you have already reached your limit of \002%d\002 channels.")
#define CHAN_EXCEEDED_CHANNEL_LIMIT _("Sorry, you have already exceeded your limit of \002%d\002 channels.")
#define CHAN_SYMBOL_REQUIRED _("Please use the symbol of \002#\002 when attempting to register")
#define CHAN_SET_DISABLED _("Sorry, channel option setting is temporarily disabled.")
#define CHAN_SYMBOL_REQUIRED _("Please use the symbol of \002#\002 when attempting to register.")
#define CHAN_SETTING_CHANGED _("%s for %s set to %s.")
#define CHAN_SETTING_UNSET _("%s for %s unset.")
#define CHAN_SET_MLOCK_DEPRECATED _("MLOCK is deprecated. Use \002%s%s HELP MODE\002 instead.")
#define CHAN_ACCESS_LEVEL_RANGE _("Access level must be between %d and %d inclusive.")
#define CHAN_INFO_HEADER _("Information for channel \002%s\002:")
#define CHAN_EXCEPTED _("\002%s\002 matches an except on %s and cannot be banned until the except have been removed.")
@@ -68,18 +114,16 @@
"Type \002%s%s READ %d\002 to read it.")
#define MEMO_HAVE_NO_MEMOS _("You have no memos.")
#define MEMO_X_HAS_NO_MEMOS _("%s has no memos.")
#define MEMO_SEND_SYNTAX _("SEND {\037nick\037 | \037channel\037} \037memo-text\037")
#define MEMO_SEND_DISABLED _("Sorry, memo sending is temporarily disabled.")
#define MEMO_HAVE_NO_NEW_MEMOS _("You have no new memos.")
#define MEMO_X_HAS_NO_NEW_MEMOS _("%s has no new memos.")
#define BOT_DOES_NOT_EXIST _("Bot \002%s\002 does not exist.")
#define BOT_NOT_ASSIGNED _("You must assign a bot to the channel before using this command.")
#define BOT_NOT_ON_CHANNEL _("Bot is not on channel \002%s\002.")
#define BOT_ASSIGN_READONLY _("Sorry, bot assignment is temporarily disabled.")
#define HOST_SET_ERROR _("A vhost must be in the format of a valid hostmask.")
#define HOST_SET_IDENT_ERROR _("A vhost ident must be in the format of a valid ident")
#define HOST_SET_TOOLONG _("Error! The vhost is too long, please use a host shorter than %d characters.")
#define HOST_SET_IDENTTOOLONG _("Error! The Ident is too long, please use an ident shorter than %d characters.")
#define HOST_NOT_ASSIGNED _("Please contact an Operator to get a vhost assigned to this nick.")
#define HOST_NO_VIDENT _("Your IRCD does not support vIdent's, if this is incorrect, please report this as a possible bug")
#define HOST_SET_ERROR _("A vHost must be in the format of a valid hostname.")
#define HOST_SET_IDENT_ERROR _("A vHost ident must be in the format of a valid ident.")
#define HOST_SET_TOOLONG _("Error! The vHost is too long, please use a hostname shorter than %d characters.")
#define HOST_SET_IDENTTOOLONG _("Error! The vHost ident is too long, please use an ident shorter than %d characters.")
#define HOST_NOT_ASSIGNED _("Please contact an Operator to get a vHost assigned to this nick.")
#define HOST_NO_VIDENT _("Your IRCd does not support vIdent's, if this is incorrect, please report this as a possible bug")
+9 -7
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2003-2012 Anope Team
* (C) 2003-2013 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -8,7 +8,6 @@
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*
*
*/
#ifndef LISTS_H
@@ -48,9 +47,9 @@ class CoreExport NumberList
void Process();
/** Called with a number from the list
* @param Number The number
* @param number The number
*/
virtual void HandleNumber(unsigned Number);
virtual void HandleNumber(unsigned number);
/** Called when there is an error with the numbered list
* Return false to immediatly stop processing the list and return
@@ -68,12 +67,14 @@ class CoreExport ListFormatter
public:
typedef std::map<Anope::string, Anope::string> ListEntry;
private:
NickCore *nc;
std::vector<Anope::string> columns;
std::vector<ListEntry> entries;
public:
ListFormatter &addColumn(const Anope::string &name);
void addEntry(const ListEntry &entry);
bool isEmpty() const;
ListFormatter(NickCore *nc);
ListFormatter &AddColumn(const Anope::string &name);
void AddEntry(const ListEntry &entry);
bool IsEmpty() const;
void Process(std::vector<Anope::string> &);
};
@@ -88,6 +89,7 @@ class CoreExport InfoFormatter
InfoFormatter(NickCore *nc);
void Process(std::vector<Anope::string> &);
Anope::string &operator[](const Anope::string &key);
void AddOption(const Anope::string &opt);
};
#endif // LISTS_H
+52 -32
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2003-2012 Anope Team
* (C) 2003-2013 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -18,12 +18,18 @@
enum LogType
{
/* Used whenever an administrator uses an administrative comand */
LOG_ADMIN,
/* Used whenever an administrator overides something, such as adding
* access to a channel where they don't have permission to.
*/
LOG_OVERRIDE,
/* Any other command usage */
LOG_COMMAND,
LOG_SERVER,
LOG_CHANNEL,
LOG_USER,
LOG_MODULE,
LOG_NORMAL,
LOG_TERMINAL,
LOG_RAWIO,
@@ -36,47 +42,57 @@ enum LogType
struct LogFile
{
Anope::string filename;
public:
std::ofstream stream;
LogFile(const Anope::string &name);
Anope::string GetName() const;
~LogFile();
const Anope::string &GetName() const;
};
/* Represents a single log message */
class CoreExport Log
{
public:
const BotInfo *bi;
Anope::string nick;
const User *u;
const NickCore *nc;
/* Bot that should log this message */
BotInfo *bi;
/* For commands, the user executing the command, but might not always exist */
User *u;
/* For commands, the account executing the command, but will not always exist */
NickCore *nc;
/* For commands, the command being executed */
Command *c;
/* For commands, the command source */
CommandSource *source;
/* Used for LOG_CHANNEL */
Channel *chan;
/* For commands, the channel the command was executed on, will not always exist */
const ChannelInfo *ci;
/* For LOG_SERVER */
Server *s;
LogType Type;
Anope::string Category;
std::list<Anope::string> Sources;
/* For LOG_MODULE */
Module *m;
LogType type;
Anope::string category;
std::stringstream buf;
Log(LogType type = LOG_NORMAL, const Anope::string &category = "", const BotInfo *bi = NULL);
Log(LogType type = LOG_NORMAL, const Anope::string &category = "", BotInfo *bi = NULL);
/* LOG_COMMAND/OVERRIDE/ADMIN */
Log(LogType type, const CommandSource &source, Command *c, const ChannelInfo *ci = NULL);
Log(LogType type, CommandSource &source, Command *c, ChannelInfo *ci = NULL);
/* LOG_CHANNEL */
Log(const User *u, Channel *c, const Anope::string &category = "");
Log(User *u, Channel *c, const Anope::string &category = "");
/* LOG_USER */
explicit Log(const User *u, const Anope::string &category = "", const BotInfo *bi = NULL);
Log(User *u, const Anope::string &category = "", BotInfo *bi = NULL);
/* LOG_SERVER */
explicit Log(Server *s, const Anope::string &category = "", const BotInfo *bi = NULL);
Log(Server *s, const Anope::string &category = "", BotInfo *bi = NULL);
explicit Log(const BotInfo *b, const Anope::string &category = "");
Log(BotInfo *b, const Anope::string &category = "");
Log(Module *m, const Anope::string &category = "");
~Log();
@@ -89,31 +105,35 @@ class CoreExport Log
}
};
/* Configured in the configuration file, actually does the message logging */
class CoreExport LogInfo
{
public:
std::list<Anope::string> Targets;
std::map<Anope::string, LogFile *> Logfiles;
std::list<Anope::string> Sources;
int LogAge;
std::list<Anope::string> Admin;
std::list<Anope::string> Override;
std::list<Anope::string> Commands;
std::list<Anope::string> Servers;
std::list<Anope::string> Users;
std::list<Anope::string> Channels;
std::list<Anope::string> Normal;
bool RawIO;
bool Debug;
BotInfo *bot;
std::vector<Anope::string> targets;
std::vector<LogFile *> logfiles;
int last_day;
std::vector<Anope::string> sources;
int log_age;
std::vector<Anope::string> admin;
std::vector<Anope::string> override;
std::vector<Anope::string> commands;
std::vector<Anope::string> servers;
std::vector<Anope::string> users;
std::vector<Anope::string> channels;
std::vector<Anope::string> normal;
bool raw_io;
bool debug;
LogInfo(int logage, bool rawio, bool debug);
~LogInfo();
void AddType(std::list<Anope::string> &list, const Anope::string &type);
void OpenLogFiles();
bool HasType(LogType ltype, const Anope::string &type) const;
/* Logs the message l if configured to */
void ProcessMessage(const Log *l);
};
+33 -18
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2003-2012 Anope Team
* (C) 2003-2013 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -18,26 +18,41 @@
#include "threadengine.h"
#include "serialize.h"
extern CoreExport bool Mail(User *u, NickCore *nc, const BotInfo *service, const Anope::string &subject, const Anope::string &message);
extern CoreExport bool Mail(NickCore *nc, const Anope::string &subject, const Anope::string &message);
extern CoreExport bool MailValidate(const Anope::string &email);
class MailThread : public Thread
namespace Mail
{
private:
Anope::string MailTo;
Anope::string Addr;
Anope::string Subject;
Anope::string Message;
bool DontQuoteAddresses;
extern CoreExport bool Send(User *from, NickCore *to, BotInfo *service, const Anope::string &subject, const Anope::string &message);
extern CoreExport bool Send(NickCore *to, const Anope::string &subject, const Anope::string &message);
extern CoreExport bool Validate(const Anope::string &email);
bool Success;
public:
MailThread(const Anope::string &mailto, const Anope::string &addr, const Anope::string &subject, const Anope::string &message);
/* A email message being sent */
class Message : public Thread
{
private:
Anope::string sendmail_path;
Anope::string send_from;
Anope::string mail_to;
Anope::string addr;
Anope::string subject;
Anope::string message;
bool dont_quote_addresses;
~MailThread();
bool success;
public:
/** Construct this message. Once constructed call Thread::Start to launch the mail sending.
* @param sf Config->SendFrom
* @param mailto Name of person being mailed (u->nick, nc->display, etc)
* @param addr Destination address to mail
* @param subject Message subject
* @param message The actual message
*/
Message(const Anope::string &sf, const Anope::string &mailto, const Anope::string &addr, const Anope::string &subject, const Anope::string &message);
void Run();
};
~Message();
/* Called from within the thread to actually send the mail */
void Run() anope_override;
};
} // namespace Mail
#endif // MAIL_H
+15 -25
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2003-2012 Anope Team
* (C) 2003-2013 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -8,7 +8,6 @@
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*
*
*/
#ifndef MEMO_H
@@ -17,49 +16,40 @@
#include "anope.h"
#include "serialize.h"
/** Memo Flags
*/
enum MemoFlag
{
/* Memo is unread */
MF_UNREAD,
/* Sender requests a receipt */
MF_RECEIPT
};
const Anope::string MemoFlagStrings[] = {
"MF_UNREAD", "MF_RECEIPT", ""
};
/* Memo info structures. Since both nicknames and channels can have memos,
* we encapsulate memo data in a MemoList to make it easier to handle. */
class CoreExport Memo : public Flags<MemoFlag>, public Serializable
class CoreExport Memo : public Serializable
{
public:
bool unread;
bool receipt;
Memo();
~Memo();
const Anope::string serialize_name() const anope_override;
Serialize::Data serialize() const anope_override;
static Serializable* unserialize(Serializable *obj, Serialize::Data &);
void Serialize(Serialize::Data &data) const anope_override;
static Serializable* Unserialize(Serializable *obj, Serialize::Data &);
Anope::string owner;
time_t time; /* When it was sent */
/* When it was sent */
time_t time;
Anope::string sender;
Anope::string text;
};
/* Memo info structures. Since both nicknames and channels can have memos,
* we encapsulate memo data in a MemoInfo to make it easier to handle.
*/
struct CoreExport MemoInfo
{
int16_t memomax;
serialize_checker<std::vector<Memo *> > memos;
Serialize::Checker<std::vector<Memo *> > memos;
std::vector<Anope::string> ignores;
MemoInfo();
Memo *GetMemo(unsigned index) const;
unsigned GetIndex(Memo *m) const;
void Del(unsigned index);
void Del(Memo *m);
bool HasIgnore(User *u);
static MemoInfo *GetMemoInfo(const Anope::string &targ, bool &is_chan);
};
#endif // MEMO_H
+175
View File
@@ -0,0 +1,175 @@
/*
*
* (C) 2003-2013 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*
*/
#include "protocol.h"
/* Common IRCD messages.
* Protocol modules may chose to include some, none, or all of these handlers
* as they see fit.
*/
namespace Message
{
struct CoreExport Away : IRCDMessage
{
Away(Module *creator, const Anope::string &mname = "AWAY") : IRCDMessage(creator, mname, 0) { SetFlag(IRCDMESSAGE_REQUIRE_USER); SetFlag(IRCDMESSAGE_SOFT_LIMIT); }
void Run(MessageSource &source, const std::vector<Anope::string> &params) anope_override;
};
struct CoreExport Capab : IRCDMessage
{
Capab(Module *creator, const Anope::string &mname = "CAPAB") : IRCDMessage(creator, mname, 1) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); }
void Run(MessageSource &source, const std::vector<Anope::string> &params) anope_override;
};
struct CoreExport Error : IRCDMessage
{
Error(Module *creator, const Anope::string &mname = "ERROR") : IRCDMessage(creator, mname, 1) { }
void Run(MessageSource &source, const std::vector<Anope::string> &params) anope_override;
};
struct CoreExport Invite : IRCDMessage
{
Invite(Module *creator, const Anope::string &mname = "INVITE") : IRCDMessage(creator, mname, 2) { SetFlag(IRCDMESSAGE_REQUIRE_USER); SetFlag(IRCDMESSAGE_SOFT_LIMIT); }
void Run(MessageSource &source, const std::vector<Anope::string> &params) anope_override;
};
struct CoreExport Join : IRCDMessage
{
Join(Module *creator, const Anope::string &mname = "JOIN") : IRCDMessage(creator, mname, 1) { SetFlag(IRCDMESSAGE_REQUIRE_USER); SetFlag(IRCDMESSAGE_SOFT_LIMIT); }
void Run(MessageSource &source, const std::vector<Anope::string> &params) anope_override;
typedef std::pair<ChannelStatus, User *> SJoinUser;
/** Handle a SJOIN.
* @param source The source of the SJOIN
* @param chan The channel the users are joining to
* @param ts The TS for the channel
* @param modes The modes sent with the SJOIN, if any
* @param users The users and their status, if any
*/
static void SJoin(MessageSource &source, const Anope::string &chan, time_t ts, const Anope::string &modes, const std::list<SJoinUser> &users);
};
struct CoreExport Kick : IRCDMessage
{
Kick(Module *creator, const Anope::string &mname = "KICK") : IRCDMessage(creator, mname, 2) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); }
void Run(MessageSource &source, const std::vector<Anope::string> &params) anope_override;
};
struct CoreExport Kill : IRCDMessage
{
Kill(Module *creator, const Anope::string &mname = "KILL") : IRCDMessage(creator, mname, 2) { }
void Run(MessageSource &source, const std::vector<Anope::string> &params) anope_override;
};
struct CoreExport Mode : IRCDMessage
{
Mode(Module *creator, const Anope::string &mname = "MODE") : IRCDMessage(creator, mname, 2) { }
void Run(MessageSource &source, const std::vector<Anope::string> &params) anope_override;
};
struct CoreExport MOTD : IRCDMessage
{
MOTD(Module *creator, const Anope::string &mname = "MOTD") : IRCDMessage(creator, mname, 1) { }
void Run(MessageSource &source, const std::vector<Anope::string> &params) anope_override;
};
struct CoreExport Notice : IRCDMessage
{
Notice(Module *creator, const Anope::string &mname = "NOTICE") : IRCDMessage(creator, mname, 2) { SetFlag(IRCDMESSAGE_REQUIRE_USER); }
void Run(MessageSource &source, const std::vector<Anope::string> &params) anope_override;
};
struct CoreExport Part : IRCDMessage
{
Part(Module *creator, const Anope::string &mname = "PART") : IRCDMessage(creator, mname, 1) { SetFlag(IRCDMESSAGE_REQUIRE_USER); SetFlag(IRCDMESSAGE_SOFT_LIMIT); }
void Run(MessageSource &source, const std::vector<Anope::string> &params) anope_override;
};
struct CoreExport Ping : IRCDMessage
{
Ping(Module *creator, const Anope::string &mname = "PING") : IRCDMessage(creator, mname, 1) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); }
void Run(MessageSource &source, const std::vector<Anope::string> &params) anope_override;
};
struct CoreExport Privmsg : IRCDMessage
{
Privmsg(Module *creator, const Anope::string &mname = "PRIVMSG") : IRCDMessage(creator, mname, 2) { SetFlag(IRCDMESSAGE_REQUIRE_USER); }
void Run(MessageSource &source, const std::vector<Anope::string> &params) anope_override;
};
struct CoreExport Quit : IRCDMessage
{
Quit(Module *creator, const Anope::string &mname = "QUIT") : IRCDMessage(creator, mname, 1) { SetFlag(IRCDMESSAGE_REQUIRE_USER); }
void Run(MessageSource &source, const std::vector<Anope::string> &params) anope_override;
};
struct CoreExport SQuit : IRCDMessage
{
SQuit(Module *creator, const Anope::string &mname = "SQUIT") : IRCDMessage(creator, mname, 2) { SetFlag(IRCDMESSAGE_REQUIRE_SERVER); }
void Run(MessageSource &source, const std::vector<Anope::string> &params) anope_override;
};
struct CoreExport Stats : IRCDMessage
{
Stats(Module *creator, const Anope::string &mname = "STATS") : IRCDMessage(creator, mname, 1) { SetFlag(IRCDMESSAGE_REQUIRE_USER); SetFlag(IRCDMESSAGE_SOFT_LIMIT); }
void Run(MessageSource &source, const std::vector<Anope::string> &params) anope_override;
};
struct CoreExport Time : IRCDMessage
{
Time(Module *creator, const Anope::string &mname = "TIME") : IRCDMessage(creator, mname, 0) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); }
void Run(MessageSource &source, const std::vector<Anope::string> &params) anope_override;
};
struct CoreExport Topic : IRCDMessage
{
Topic(Module *creator, const Anope::string &mname = "TOPIC") : IRCDMessage(creator, mname, 2) { SetFlag(IRCDMESSAGE_REQUIRE_USER); }
void Run(MessageSource &source, const std::vector<Anope::string> &params) anope_override;
};
struct CoreExport Version : IRCDMessage
{
Version(Module *creator, const Anope::string &mname = "VERSION") : IRCDMessage(creator, mname, 0) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); }
void Run(MessageSource &source, const std::vector<Anope::string> &params) anope_override;
};
struct CoreExport Whois : IRCDMessage
{
Whois(Module *creator, const Anope::string &mname = "WHOIS") : IRCDMessage(creator, mname, 1) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); }
void Run(MessageSource &source, const std::vector<Anope::string> &params) anope_override;
};
} // namespace Message
+141 -267
View File
@@ -1,7 +1,7 @@
/* Mode support
*
* Copyright (C) 2008-2011 Adam <Adam@anope.org>
* Copyright (C) 2008-2012 Anope Team <team@anope.org>
* Copyright (C) 2008-2013 Anope Team <team@anope.org>
*
* Please read COPYING and README for further details.
*/
@@ -12,81 +12,6 @@
#include "anope.h"
#include "base.h"
/** All of the valid user mode names
*/
enum UserModeName
{
UMODE_BEGIN,
UMODE_SERV_ADMIN, UMODE_BOT, UMODE_CO_ADMIN, UMODE_FILTER, UMODE_HIDEOPER, UMODE_NETADMIN,
UMODE_REGPRIV, UMODE_PROTECTED, UMODE_NOCTCP, UMODE_WEBTV, UMODE_WEBIRC, UMODE_WHOIS, UMODE_ADMIN, UMODE_DEAF,
UMODE_GLOBOPS, UMODE_HELPOP, UMODE_INVIS, UMODE_OPER, UMODE_PRIV, UMODE_GOD, UMODE_REGISTERED,
UMODE_SNOMASK, UMODE_VHOST, UMODE_WALLOPS, UMODE_CLOAK, UMODE_SSL, UMODE_SOFTCALLERID, UMODE_CALLERID,
UMODE_COMMONCHANS, UMODE_HIDDEN, UMODE_STRIPCOLOR, UMODE_INVISIBLE_OPER, UMODE_RESTRICTED, UMODE_HIDEIDLE,
UMODE_END
};
const Anope::string UserModeNameStrings[] = {
"UMODE_BEGIN",
"UMODE_SERV_ADMIN", "UMODE_BOT", "UMODE_CO_ADMIN", "UMODE_FILTER", "UMODE_HIDEOPER", "UMODE_NETADMIN",
"UMODE_REGPRIV", "UMODE_PROTECTED", "UMODE_NOCTCP", "UMODE_WEBTV", "UMODE_WEBIRC", "UMODE_WHOIS", "UMODE_ADMIN", "UMODE_DEAF",
"UMODE_GLOBOPS", "UMODE_HELPOP", "UMODE_INVIS", "UMODE_OPER", "UMODE_PRIV", "UMODE_GOD", "UMODE_REGISTERED",
"UMODE_SNOMASK", "UMODE_VHOST", "UMODE_WALLOPS", "UMODE_CLOAK", "UMODE_SSL", "UMODE_SOFTCALLERID", "UMODE_CALLERID",
"UMODE_COMMONCHANS", "UMODE_HIDDEN", "UMODE_STRIPCOLOR", "UMODE_INVISIBLE_OPER", "UMODE_RESTRICTED", "UMODE_HIDEIDLE",
""
};
/** All of the valid channel mode names
*/
enum ChannelModeName
{
CMODE_BEGIN,
/* Channel modes */
CMODE_BLOCKCOLOR, CMODE_FLOOD, CMODE_INVITE, CMODE_KEY, CMODE_LIMIT, CMODE_MODERATED, CMODE_NOEXTERNAL,
CMODE_PRIVATE, CMODE_REGISTERED, CMODE_SECRET, CMODE_TOPIC, CMODE_AUDITORIUM, CMODE_SSL, CMODE_ADMINONLY,
CMODE_NOCTCP, CMODE_FILTER, CMODE_NOKNOCK, CMODE_REDIRECT, CMODE_REGMODERATED, CMODE_NONICK, CMODE_OPERONLY,
CMODE_NOKICK, CMODE_REGISTEREDONLY, CMODE_STRIPCOLOR, CMODE_NONOTICE, CMODE_NOINVITE, CMODE_ALLINVITE,
CMODE_BLOCKCAPS, CMODE_PERM, CMODE_NICKFLOOD, CMODE_JOINFLOOD, CMODE_DELAYEDJOIN, CMODE_NOREJOIN,
CMODE_BANDWIDTH,
/* b/e/I */
CMODE_BAN, CMODE_EXCEPT,
CMODE_INVITEOVERRIDE,
/* v/h/o/a/q */
CMODE_VOICE, CMODE_HALFOP, CMODE_OP,
CMODE_PROTECT, CMODE_OWNER,
CMODE_END
};
const Anope::string ChannelModeNameStrings[] = {
"CMODE_BEGIN",
/* Channel modes */
"CMODE_BLOCKCOLOR", "CMODE_FLOOD", "CMODE_INVITE", "CMODE_KEY", "CMODE_LIMIT", "CMODE_MODERATED", "CMODE_NOEXTERNAL",
"CMODE_PRIVATE", "CMODE_REGISTERED", "CMODE_SECRET", "CMODE_TOPIC", "CMODE_AUDITORIUM", "CMODE_SSL", "CMODE_ADMINONLY",
"CMODE_NOCTCP", "CMODE_FILTER", "CMODE_NOKNOCK", "CMODE_REDIRECT", "CMODE_REGMODERATED", "CMODE_NONICK", "CMODE_OPERONLY",
"CMODE_NOKICK", "CMODE_REGISTEREDONLY", "CMODE_STRIPCOLOR", "CMODE_NONOTICE", "CMODE_NOINVITE", "CMODE_ALLINVITE",
"CMODE_BLOCKCAPS", "CMODE_PERM", "CMODE_NICKFLOOD", "CMODE_JOINFLOOD", "CMODE_DELAYEDJOIN", "CMODE_NOREJOIN",
"CMODE_BANDWIDTH",
/* b/e/I */
"CMODE_BAN", "CMODE_EXCEPT",
"CMODE_INVITEOVERRIDE",
/* v/h/o/a/q */
"CMODE_VOICE", "CMODE_HALFOP", "CMODE_OP",
"CMODE_PROTECT", "CMODE_OWNER",
""
};
/** The different types of modes
*/
enum ModeType
@@ -105,9 +30,7 @@ enum ModeType
*/
enum ModeClass
{
/* Channel mode */
MC_CHANNEL,
/* User mode */
MC_USER
};
@@ -116,23 +39,28 @@ enum ModeClass
class CoreExport Mode : public Base
{
public:
/* Class of mode this is */
ModeClass Class;
/* Mode char for this */
char ModeChar;
/* Type of mode this is */
ModeType Type;
/* Mode name */
Anope::string name;
/* Class of mode this is (user/channel) */
ModeClass mclass;
/* Mode char for this, eg 'b' */
char mchar;
/* Type of mode this is, eg MODE_LIST */
ModeType type;
/** Default constructor
* @param mClass The type of mode this is
* @param modeChar The mode char
/** constructor
* @param mname The mode name
* @param mclass The type of mode this is
* @param mc The mode char
* @param type The mode type
*/
Mode(ModeClass mClass, char modeChar, ModeType type);
/** Default destructor
*/
Mode(const Anope::string &mname, ModeClass mclass, char mc, ModeType type);
virtual ~Mode();
/** Can a user set this mode, used for mlock
* @param u The user
*/
virtual bool CanSet(User *u) const;
};
/** This class is a user mode, all user modes use this/inherit from this
@@ -140,32 +68,21 @@ class CoreExport Mode : public Base
class CoreExport UserMode : public Mode
{
public:
/* Mode name */
UserModeName Name;
/** Default constructor
* @param nName The mode name
* @param modeChar The mode char
/** constructor
* @param name The mode name
* @param mc The mode char
*/
UserMode(UserModeName mName, char modeChar);
/** Default destructor
*/
virtual ~UserMode();
/** Returns the mode name as a string
*/
const Anope::string NameAsString();
UserMode(const Anope::string &name, char mc);
};
class CoreExport UserModeParam : public UserMode
{
public:
/** Default constructor
* @param mName The mode name
* @param modeChar The mode char
/** constructor
* @param name The mode name
* @param mc The mode char
*/
UserModeParam(UserModeName mName, char modeChar);
UserModeParam(const Anope::string &name, char mc);
/** Check if the param is valid
* @param value The param
@@ -179,45 +96,25 @@ class CoreExport UserModeParam : public UserMode
class CoreExport ChannelMode : public Mode
{
public:
/* Mode name */
ChannelModeName Name;
/** Default constructor
* @param mName The mode name
* @param modeChar The mode char
/** constructor
* @param name The mode name
* @param mc The mode char
*/
ChannelMode(ChannelModeName mName, char modeChar);
ChannelMode(const Anope::string &name, char mc);
/** Default destructor
*/
virtual ~ChannelMode();
/** Can a user set this mode, used for mlock
* NOTE: User CAN be NULL, this is for checking if it can be locked with defcon
* @param u The user, or NULL
*/
virtual bool CanSet(User *u) const;
/** Returns the mode name as a string
*/
const Anope::string NameAsString();
bool CanSet(User *u) const anope_override;
};
/** This is a mode for lists, eg b/e/I. These modes should inherit from this
*/
class CoreExport ChannelModeList : public ChannelMode
{
public:
/** Default constructor
* @param mName The mode name
* @param modeChar The mode char
/** constructor
* @param name The mode name
* @param mc The mode char
*/
ChannelModeList(ChannelModeName mName, char modeChar);
/** Default destructor
*/
virtual ~ChannelModeList();
ChannelModeList(const Anope::string &name, char mc);
/** Is the mask valid
* @param mask The mask
@@ -231,7 +128,7 @@ class CoreExport ChannelModeList : public ChannelMode
* @param e The entry to match against
* @return true on match
*/
virtual bool Matches(const User *u, const Entry *e) { return false; }
virtual bool Matches(User *u, const Entry *e) { return false; }
/** Called when a mask is added to a channel
* @param chan The channel
@@ -251,19 +148,15 @@ class CoreExport ChannelModeList : public ChannelMode
class CoreExport ChannelModeParam : public ChannelMode
{
public:
/** Default constructor
* @param mName The mode name
* @param modeChar The mode char
* @param MinusArg true if this mode sends no arg when unsetting
/** constructor
* @param name The mode name
* @param mc The mode char
* @param minus_no_arg true if this mode sends no arg when unsetting
*/
ChannelModeParam(ChannelModeName mName, char modeChar, bool MinusArg = false);
/** Default destructor
*/
virtual ~ChannelModeParam();
ChannelModeParam(const Anope::string &name, char mc, bool minus_no_arg = false);
/* Should we send an arg when unsetting this mode? */
bool MinusNoArg;
bool minus_no_arg;
/** Is the param valid
* @param value The param
@@ -278,23 +171,51 @@ class CoreExport ChannelModeStatus : public ChannelMode
{
public:
/* The symbol, eg @ % + */
char Symbol;
char symbol;
/* The "level" of the mode, used to compare with other modes.
* Used so we know op > halfop > voice etc.
*/
unsigned short Level;
short level;
/** Default constructor
* @param mName The mode name
* @param modeChar The mode char
* @param mSymbol The symbol for the mode, eg @ %
* @param mLevel A level for the mode, which is usually determined by the PREFIX capab
/** constructor
* @param name The mode name
* @param mc The mode char
* @param msymbol The symbol for the mode, eg @ %
* @param mlevel A level for the mode, which is usually determined by the PREFIX capab
*/
ChannelModeStatus(ChannelModeName mName, char modeChar, char mSymbol, unsigned short mLevel = 0);
ChannelModeStatus(const Anope::string &name, char mc, char msymbol, short mlevel);
};
/** Default destructor
*/
virtual ~ChannelModeStatus();
/* The status a user has on a channel (+v, +h, +o) etc */
class CoreExport ChannelStatus
{
Anope::string modes;
public:
ChannelStatus();
ChannelStatus(const Anope::string &modes);
void AddMode(char c);
void DelMode(char c);
bool HasMode(char c) const;
bool Empty() const;
void Clear();
const Anope::string &Modes() const;
Anope::string BuildModePrefixList() const;
};
class CoreExport UserModeOperOnly : public UserMode
{
public:
UserModeOperOnly(const Anope::string &mname, char um) : UserMode(mname, um) { }
bool CanSet(User *u) const anope_override;
};
class CoreExport UserModeNoone : public UserMode
{
public:
UserModeNoone(const Anope::string &mname, char um) : UserMode(mname, um) { }
bool CanSet(User *u) const anope_override;
};
/** Channel mode +k (key)
@@ -302,89 +223,53 @@ class CoreExport ChannelModeStatus : public ChannelMode
class CoreExport ChannelModeKey : public ChannelModeParam
{
public:
ChannelModeKey(char modeChar) : ChannelModeParam(CMODE_KEY, modeChar) { }
ChannelModeKey(char mc) : ChannelModeParam("KEY", mc) { }
bool IsValid(const Anope::string &value) const anope_override;
};
/** This class is used for channel mode +A (Admin only)
* Only opers can mlock it
/** This class is used for oper only channel modes
*/
class CoreExport ChannelModeAdmin : public ChannelMode
class CoreExport ChannelModeOperOnly : public ChannelMode
{
public:
ChannelModeAdmin(char modeChar) : ChannelMode(CMODE_ADMINONLY, modeChar) { }
ChannelModeOperOnly(const Anope::string &mname, char mc) : ChannelMode(mname, mc) { }
/* Opers only */
bool CanSet(User *u) const anope_override;
};
/** This class is used for channel mode +O (Opers only)
* Only opers can mlock it
/** This class is used for channel modes only servers may set
*/
class CoreExport ChannelModeOper : public ChannelMode
class CoreExport ChannelModeNoone : public ChannelMode
{
public:
ChannelModeOper(char modeChar) : ChannelMode(CMODE_OPERONLY, modeChar) { }
ChannelModeNoone(const Anope::string &mname, char mc) : ChannelMode(mname, mc) { }
/* Opers only */
bool CanSet(User *u) const anope_override;
};
/** This class is used for channel mode +r (registered channel)
* No one may mlock r
*/
class CoreExport ChannelModeRegistered : public ChannelMode
{
public:
ChannelModeRegistered(char modeChar) : ChannelMode(CMODE_REGISTERED, modeChar) { }
/* No one mlocks +r */
bool CanSet(User *u) const anope_override;
};
class StackerInfo
{
public:
/* Modes to be added */
std::list<std::pair<Mode *, Anope::string> > AddModes;
/* Modes to be deleted */
std::list<std::pair<Mode *, Anope::string> > DelModes;
/* Bot this is sent from */
const BotInfo *bi;
/** Add a mode to this object
* @param mode The mode
* @param Set true if setting, false if unsetting
* @param Param The param for the mode
*/
void AddMode(Mode *mode, bool Set, const Anope::string &Param);
};
/** This is mode manager
/** This is the mode manager
* It contains functions for adding modes to Anope so Anope can track them
* and do things such as MLOCK.
* This also contains a mode stacker that will combine multiple modes and set
* them on a channel all at once
* them on a channel or user at once
*/
class CoreExport ModeManager
{
protected:
/* List of pairs of user/channels and their stacker info */
static std::map<User *, StackerInfo *> UserStackerObjects;
static std::map<Channel *, StackerInfo *> ChannelStackerObjects;
/** Build a list of mode strings to send to the IRCd from the mode stacker
* @param info The stacker info for a channel or user
* @return a list of strings
/* Array of all modes Anope knows about. Modes are in this array at position
* modechar. Additionally, status modes are in this array (again) at statuschar.
*/
static std::list<Anope::string> BuildModeStrings(StackerInfo *info);
public:
/* List of all modes Anope knows about */
static std::vector<ChannelMode *> ChannelModes;
static std::vector<UserMode *> UserModes;
public:
/* Number of generic channel and user modes we are tracking */
static unsigned GenericChannelModes;
static unsigned GenericUserModes;
/** Add a user mode to Anope
* @param um A UserMode or UserMode derived class
* @return true on success, false on error
@@ -397,118 +282,107 @@ class CoreExport ModeManager
*/
static bool AddChannelMode(ChannelMode *cm);
/** Find a channel mode
* @param Mode The mode
* @return The mode class
/** Remove a user mode from Anope
* @param um A UserMode to remove
*/
static ChannelMode *FindChannelModeByChar(char Mode);
static void RemoveUserMode(UserMode *um);
/** Find a user mode
* @param Mode The mode
* @return The mode class
/** Remove a channel mode from Anope
* @param um A ChanneMode to remove
*/
static UserMode *FindUserModeByChar(char Mode);
static void RemoveChannelMode(ChannelMode *cm);
/** Find a channel mode
* @param Mode The modename
* @param mode The mode
* @return The mode class
*/
static ChannelMode *FindChannelModeByName(ChannelModeName Name);
static ChannelMode *FindChannelModeByChar(char mode);
/** Find a user mode
* @param Mode The modename
* @param mode The mode
* @return The mode class
*/
static UserMode *FindUserModeByName(UserModeName Name);
static UserMode *FindUserModeByChar(char mode);
/** Find channel mode by string
* @param name The mode name
* @return The mode
/** Find a channel mode
* @param name The modename
* @return The mode class
*/
static ChannelMode *FindChannelModeByString(const Anope::string &name);
static ChannelMode *FindChannelModeByName(const Anope::string &name);
/** Find user mode by string
* @param name The mode name
* @return The mode
/** Find a user mode
* @param name The modename
* @return The mode class
*/
static UserMode *FindUserModeByString(const Anope::string &name);
static UserMode *FindUserModeByName(const Anope::string &name);
/** Gets the channel mode char for a symbol (eg + returns v)
* @param Value The symbol
* @param symbol The symbol
* @return The char
*/
static char GetStatusChar(char Value);
static char GetStatusChar(char symbol);
static const std::vector<ChannelMode *> &GetChannelModes();
static const std::vector<UserMode *> &GetUserModes();
static const std::vector<ChannelModeStatus *> &GetStatusChannelModesByRank();
static void RebuildStatusModes();
/** Add a mode to the stacker to be set on a channel
* @param bi The client to set the modes from
* @param c The channel
* @param cm The channel mode
* @param Set true for setting, false for removing
* @param Param The param, if there is one
* @param set true for setting, false for removing
* @param param The param, if there is one
*/
static void StackerAdd(const BotInfo *bi, Channel *c, ChannelMode *cm, bool Set, const Anope::string &Param = "");
static void StackerAdd(BotInfo *bi, Channel *c, ChannelMode *cm, bool set, const Anope::string &param = "");
/** Add a mode to the stacker to be set on a user
* @param bi The client to set the modes from
* @param u The user
* @param um The user mode
* @param Set true for setting, false for removing
* @param set true for setting, false for removing
* @param param The param, if there is one
*/
static void StackerAdd(const BotInfo *bi, User *u, UserMode *um, bool Set, const Anope::string &Param = "");
static void StackerAdd(BotInfo *bi, User *u, UserMode *um, bool set, const Anope::string &param = "");
/** Process all of the modes in the stacker and send them to the IRCd to be set on channels/users
*/
static void ProcessModes();
/** Delete a user or channel from the stacker
/** Delete a user, channel, or mode from the stacker
*/
static void StackerDel(User *u);
static void StackerDel(Channel *c);
};
/** Entry flags
*/
enum EntryType
{
ENTRYTYPE_NONE,
ENTRYTYPE_CIDR,
ENTRYTYPE_NICK_WILD,
ENTRYTYPE_NICK,
ENTRYTYPE_USER_WILD,
ENTRYTYPE_USER,
ENTRYTYPE_HOST_WILD,
ENTRYTYPE_HOST
static void StackerDel(Mode *m);
};
/** Represents a mask set on a channel (b/e/I)
*/
class CoreExport Entry : public Flags<EntryType>
class CoreExport Entry
{
ChannelModeName modename;
public:
unsigned char cidr_len;
Anope::string name;
Anope::string mask;
Anope::string nick, user, host;
public:
unsigned short cidr_len;
Anope::string nick, user, host, real;
/** Constructor
* @param _host A full nick!ident@host/cidr mask
* @param mode What mode this host is for - can be CMODE_BEGIN for unknown/no mode
* @param mode What mode this host is for, can be empty for unknown/no mode
* @param host A full or poartial nick!ident@host/cidr#real name mask
*/
Entry(ChannelModeName mode, const Anope::string &_host);
Entry(const Anope::string &mode, const Anope::string &host);
/** Get the banned mask for this entry
* @return The mask
*/
const Anope::string GetMask();
const Anope::string GetMask() const;
/** Check if this entry matches a user
* @param u The user
* @param full True to match against a users real host and IP
* @return true on match
*/
bool Matches(const User *u, bool full = false) const;
bool Matches(User *u, bool full = false) const;
};
#endif // MODES_H
+7 -10
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2003-2012 Anope Team
* (C) 2003-2013 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -12,28 +12,24 @@
#ifndef MODULE_H
#define MODULE_H
/* Just include everything for now */
#include "access.h"
#include "account.h"
#include "anope.h"
#include "base.h"
#include "bots.h"
#include "botserv.h"
#include "channels.h"
#include "commands.h"
#include "config.h"
#include "dns.h"
#include "extensible.h"
#include "extern.h"
#include "hashcomp.h"
#include "language.h"
#include "lists.h"
#include "logger.h"
#include "mail.h"
#include "memo.h"
#include "messages.h"
#include "modes.h"
#include "modules.h"
#include "oper.h"
#include "opertype.h"
#include "protocol.h"
#include "regexpr.h"
@@ -42,16 +38,17 @@
#include "servers.h"
#include "service.h"
#include "services.h"
#include "signals.h"
#include "socketengine.h"
#include "sockets.h"
#include "threadengine.h"
#include "timers.h"
#include "uplink.h"
#include "users.h"
#include "xline.h"
#include "global.h"
#include "memoserv.h"
#include "nickserv.h"
#include "modules/pseudoclients/chanserv.h"
#include "modules/pseudoclients/global.h"
#include "modules/pseudoclients/memoserv.h"
#include "modules/pseudoclients/nickserv.h"
#endif // MODULE_H
+384 -317
View File
File diff suppressed because it is too large Load Diff
+73
View File
@@ -0,0 +1,73 @@
/* BotServ core functions
*
* (C) 2003-2013 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*
*
*/
/** Flags for badwords
*/
enum BadWordType
{
/* Always kicks if the word is said */
BW_ANY,
/* User must way the entire word */
BW_SINGLE,
/* The word has to start with the badword */
BW_START,
/* The word has to end with the badword */
BW_END
};
/* Structure used to contain bad words. */
struct BadWord
{
Anope::string chan;
Anope::string word;
BadWordType type;
virtual ~BadWord() { }
protected:
BadWord() { }
};
struct BadWords
{
virtual ~BadWords() { }
/** Add a badword to the badword list
* @param word The badword
* @param type The type (SINGLE START END)
* @return The badword
*/
virtual BadWord* AddBadWord(const Anope::string &word, BadWordType type) = 0;
/** Get a badword structure by index
* @param index The index
* @return The badword
*/
virtual BadWord* GetBadWord(unsigned index) const = 0;
/** Get how many badwords are on this channel
* @return The number of badwords in the vector
*/
virtual unsigned GetBadWordCount() const = 0;
/** Remove a badword
* @param index The index of the badword
*/
virtual void EraseBadWord(unsigned index) = 0;
/** Clear all badwords from the channel
*/
virtual void ClearBadWords() = 0;
virtual void Check() = 0;
};
+46
View File
@@ -0,0 +1,46 @@
/* BotServ core functions
*
* (C) 2003-2013 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*
*
*/
/* Indices for TTB (Times To Ban) */
enum
{
TTB_BOLDS,
TTB_COLORS,
TTB_REVERSES,
TTB_UNDERLINES,
TTB_BADWORDS,
TTB_CAPS,
TTB_FLOOD,
TTB_REPEAT,
TTB_ITALICS,
TTB_AMSGS,
TTB_SIZE
};
struct KickerData
{
bool amsgs, badwords, bolds, caps, colors, flood, italics, repeat, reverses, underlines;
int16_t ttb[TTB_SIZE]; /* Times to ban for each kicker */
int16_t capsmin, capspercent; /* For CAPS kicker */
int16_t floodlines, floodsecs; /* For FLOOD kicker */
int16_t repeattimes; /* For REPEAT kicker */
bool dontkickops, dontkickvoices;
protected:
KickerData() { }
public:
virtual ~KickerData() { }
virtual void Check(ChannelInfo *ci) = 0;
};
+43
View File
@@ -0,0 +1,43 @@
/* ChanServ core functions
*
* (C) 2003-2013 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*/
struct LogSetting
{
Anope::string chan;
/* Our service name of the command */
Anope::string service_name;
/* The name of the client the command is on */
Anope::string command_service;
/* Name of the command to the user, can have spaces */
Anope::string command_name;
Anope::string method, extra;
Anope::string creator;
time_t created;
virtual ~LogSetting() { }
protected:
LogSetting() { }
};
struct LogSettings : Serialize::Checker<std::vector<LogSetting *> >
{
typedef std::vector<LogSetting *>::iterator iterator;
protected:
LogSettings() : Serialize::Checker<std::vector<LogSetting *> >("LogSetting")
{
}
public:
virtual ~LogSettings() { }
virtual LogSetting *Create() = 0;
};
+90
View File
@@ -0,0 +1,90 @@
/* ChanServ core functions
*
* (C) 2003-2013 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*/
struct ModeLock
{
Anope::string ci;
bool set;
Anope::string name;
Anope::string param;
Anope::string setter;
time_t created;
virtual ~ModeLock() { }
protected:
ModeLock() { }
};
struct ModeLocks
{
typedef std::vector<ModeLock *> ModeList;
virtual ~ModeLocks() { }
/** Check if a mode is mlocked
* @param mode The mode
* @param An optional param
* @param status True to check mlock on, false for mlock off
* @return true on success, false on fail
*/
virtual bool HasMLock(ChannelMode *mode, const Anope::string &param, bool status) const = 0;
/** Set a mlock
* @param mode The mode
* @param status True for mlock on, false for mlock off
* @param param An optional param arg for + mlocked modes
* @param setter Who is setting the mlock
* @param created When the mlock was created
* @return true on success, false on failure (module blocking)
*/
virtual bool SetMLock(ChannelMode *mode, bool status, const Anope::string &param = "", Anope::string setter = "", time_t created = Anope::CurTime) = 0;
/** Remove a mlock
* @param mode The mode
* @param status True for mlock on, false for mlock off
* @param param The param of the mode, required if it is a list or status mode
* @return true on success, false on failure
*/
virtual bool RemoveMLock(ChannelMode *mode, bool status, const Anope::string &param = "") = 0;
virtual void RemoveMLock(ModeLock *mlock) = 0;
/** Clear all mlocks on the channel
*/
virtual void ClearMLock() = 0;
/** Get all of the mlocks for this channel
* @return The mlocks
*/
virtual const ModeList &GetMLock() const = 0;
/** Get a list of mode locks on a channel
* @param name The mode name to get a list of
* @return a list of mlocks for the given mode
*/
virtual std::list<ModeLock *> GetModeLockList(const Anope::string &name) = 0;
/** Get details for a specific mlock
* @param mname The mode name
* @param An optional param to match with
* @return The MLock, if any
*/
virtual const ModeLock *GetMLock(const Anope::string &mname, const Anope::string &param = "") = 0;
/** Get the current mode locks as a string
* @param complete True to show mlock parameters aswell
* @return A string of mode locks, eg: +nrt
*/
virtual Anope::string GetMLockAsString(bool complete) const = 0;
virtual void Check() = 0;
};
+20
View File
@@ -0,0 +1,20 @@
/* ChanServ core functions
*
* (C) 2003-2013 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*/
struct CSSuspendInfo
{
Anope::string chan, by, reason;
time_t time, expires;
virtual ~CSSuspendInfo() { }
protected:
CSSuspendInfo() { }
};
+181
View File
@@ -0,0 +1,181 @@
/*
*
* (C) 2003-2013 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*
*/
#ifndef DNS_H
#define DNS_H
namespace DNS
{
/** Valid query types
*/
enum QueryType
{
/* Nothing */
QUERY_NONE,
/* A simple A lookup */
QUERY_A = 1,
/* An authoritative name server */
QUERY_NS = 2,
/* A CNAME lookup */
QUERY_CNAME = 5,
/* Start of a zone of authority */
QUERY_SOA = 6,
/* Reverse DNS lookup */
QUERY_PTR = 12,
/* IPv6 AAAA lookup */
QUERY_AAAA = 28,
/* Zone transfer */
QUERY_AXFR = 252,
/* A lookup for any record */
QUERY_ANY = 255
};
/** Flags that can be AND'd into DNSPacket::flags to receive certain values
*/
enum
{
QUERYFLAGS_QR = 0x8000,
QUERYFLAGS_OPCODE = 0x7800,
QUERYFLAGS_OPCODE_NOTIFY = 0x2000,
QUERYFLAGS_AA = 0x400,
QUERYFLAGS_TC = 0x200,
QUERYFLAGS_RD = 0x100,
QUERYFLAGS_RA = 0x80,
QUERYFLAGS_Z = 0x70,
QUERYFLAGS_RCODE = 0xF
};
enum Error
{
ERROR_NONE,
ERROR_UNKNOWN,
ERROR_UNLOADED,
ERROR_TIMEDOUT,
ERROR_NOT_AN_ANSWER,
ERROR_NONSTANDARD_QUERY,
ERROR_FORMAT_ERROR,
ERROR_SERVER_FAILURE,
ERROR_DOMAIN_NOT_FOUND,
ERROR_NOT_IMPLEMENTED,
ERROR_REFUSED,
ERROR_NO_RECORDS,
ERROR_INVALIDTYPE
};
struct Question
{
Anope::string name;
QueryType type;
unsigned short qclass;
Question() : type(QUERY_NONE), qclass(0) { }
Question(const Anope::string &n, QueryType t, unsigned short c = 1) : name(n), type(t), qclass(c) { }
inline bool operator==(const Question & other) const { return name == other.name && type == other.type && qclass == other.qclass; }
struct hash
{
size_t operator()(const Question &q) const
{
return Anope::hash_ci()(q.name);
}
};
};
struct ResourceRecord : Question
{
unsigned int ttl;
Anope::string rdata;
time_t created;
ResourceRecord(const Anope::string &n, QueryType t, unsigned short c = 1) : Question(n, t, c), ttl(0), created(Anope::CurTime) { }
ResourceRecord(const Question &q) : Question(q), ttl(0), created(Anope::CurTime) { }
};
struct Query
{
std::vector<Question> questions;
std::vector<ResourceRecord> answers, authorities, additional;
Error error;
Query() : error(ERROR_NONE) { }
Query(const Question &q) : error(ERROR_NONE) { questions.push_back(q); }
};
class ReplySocket;
class Request;
/** DNS manager
*/
class Manager : public Service
{
public:
Manager(Module *creator) : Service(creator, "DNS::Manager", "dns/manager") { }
virtual ~Manager() { }
virtual void Process(Request *req) = 0;
virtual void RemoveRequest(Request *req) = 0;
virtual bool HandlePacket(ReplySocket *s, const unsigned char *const data, int len, sockaddrs *from) = 0;
virtual void UpdateSerial() = 0;
virtual void Notify(const Anope::string &zone) = 0;
virtual uint32_t GetSerial() const = 0;
};
/** A DNS query.
*/
class Request : public Timer, public Question
{
Manager *manager;
public:
/* Use result cache if available */
bool use_cache;
/* Request id */
unsigned short id;
/* Creator of this request */
Module *creator;
Request(Manager *mgr, Module *c, const Anope::string &addr, QueryType qt, bool cache = false) : Timer(0), Question(addr, qt), manager(mgr),
use_cache(cache), id(0), creator(c) { }
virtual ~Request()
{
manager->RemoveRequest(this);
}
/** Called when this request succeeds
* @param r The query sent back from the nameserver
*/
virtual void OnLookupComplete(const Query *r) = 0;
/** Called when this request fails or times out.
* @param r The query sent back from the nameserver, check the error code.
*/
virtual void OnError(const Query *r) { }
/** Used to time out the query, xalls OnError and lets the TimerManager
* delete this request.
*/
void Tick(time_t) anope_override
{
Log(LOG_DEBUG_2) << "Resolver: timeout for query " << this->name;
Query rr(*this);
rr.error = ERROR_TIMEDOUT;
this->OnError(&rr);
}
};
} // namespace DNS
#endif // DNS_H
@@ -21,6 +21,23 @@ struct HTTPReply
HTTPReply() : error(HTTP_ERROR_OK), length(0) { }
HTTPReply(const HTTPReply& other) : error(other.error), length(other.length)
{
content_type = other.content_type;
headers = other.headers;
cookies = other.cookies;
for (unsigned i = 0; i < other.out.size(); ++i)
out.push_back(new Data(other.out[i]->buf, other.out[i]->len));
}
~HTTPReply()
{
for (unsigned i = 0; i < out.size(); ++i)
delete out[i];
out.clear();
}
struct Data
{
char *buf;
@@ -87,10 +104,10 @@ class HTTPPage : public Base
* @param The HTTP header sent from the client to request the page
* @param The HTTP header that will be sent back to the client
*/
virtual void OnRequest(HTTPProvider *, const Anope::string &, HTTPClient *, HTTPMessage &, HTTPReply &) = 0;
virtual bool OnRequest(HTTPProvider *, const Anope::string &, HTTPClient *, HTTPMessage &, HTTPReply &) = 0;
};
class HTTPClient : public ClientSocket, public BufferedSocket, public BinarySocket
class HTTPClient : public ClientSocket, public BinarySocket, public Base
{
protected:
void WriteClient(const Anope::string &message)
@@ -99,41 +116,27 @@ class HTTPClient : public ClientSocket, public BufferedSocket, public BinarySock
}
public:
HTTPClient(ListenSocket *l, int f, const sockaddrs &a) : ClientSocket(l, a), BufferedSocket(), BinarySocket() { }
HTTPClient(ListenSocket *l, int f, const sockaddrs &a) : ClientSocket(l, a), BinarySocket() { }
virtual const Anope::string GetIP()
{
return this->clientaddr.addr();
}
bool ProcessRead() anope_override
{
return BufferedSocket::ProcessRead();
}
bool ProcessWrite() anope_override
{
return !BinarySocket::ProcessWrite() || BinarySocket::WriteBuffer.empty() ? false : true;
}
void Write(const char *buffer, size_t l) anope_override
{
BinarySocket::Write(buffer, l);
}
virtual void SendError(HTTPError err, const Anope::string &msg) = 0;
virtual void SendReply(HTTPReply *) = 0;
};
class HTTPProvider : public Service, public ListenSocket
class HTTPProvider : public ListenSocket, public Service
{
Anope::string ip;
unsigned short port;
bool ssl;
public:
Anope::string ext_ip;
std::vector<Anope::string> ext_headers;
HTTPProvider(Module *c, const Anope::string &n, const Anope::string &i, const unsigned short p) : Service(c, "HTTPProvider", n), ListenSocket(i, p, i.find(':') != Anope::string::npos), ip(i), port(p) { }
HTTPProvider(Module *c, const Anope::string &n, const Anope::string &i, const unsigned short p, bool s) : ListenSocket(i, p, i.find(':') != Anope::string::npos), Service(c, "HTTPProvider", n), ip(i), port(p), ssl(s) { }
const Anope::string &GetIP() const
{
@@ -145,6 +148,11 @@ class HTTPProvider : public Service, public ListenSocket
return this->port;
}
bool IsSSL() const
{
return this->ssl;
}
virtual bool RegisterPage(HTTPPage *page) = 0;
virtual void UnregisterPage(HTTPPage *page) = 0;
virtual HTTPPage* FindPage(const Anope::string &name) = 0;
@@ -116,6 +116,7 @@ class LDAPInterface
virtual void OnResult(const LDAPResult &r) = 0;
virtual void OnError(const LDAPResult &err) = 0;
virtual void OnDelete() { }
};
class LDAPProvider : public Service
+62
View File
@@ -0,0 +1,62 @@
/* NickServ core functions
*
* (C) 2003-2013 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*/
struct NSCertList
{
protected:
NSCertList() { }
public:
virtual ~NSCertList() { }
/** Add an entry to the nick's certificate list
*
* @param entry The fingerprint to add to the cert list
*
* Adds a new entry into the cert list.
*/
virtual void AddCert(const Anope::string &entry) = 0;
/** Get an entry from the nick's cert list by index
*
* @param entry Index in the certificaate list vector to retrieve
* @return The fingerprint entry of the given index if within bounds, an empty string if the vector is empty or the index is out of bounds
*
* Retrieves an entry from the certificate list corresponding to the given index.
*/
virtual Anope::string GetCert(unsigned entry) const = 0;
virtual unsigned GetCertCount() const = 0;
/** Find an entry in the nick's cert list
*
* @param entry The fingerprint to search for
* @return True if the fingerprint is found in the cert list, false otherwise
*
* Search for an fingerprint within the cert list.
*/
virtual bool FindCert(const Anope::string &entry) const = 0;
/** Erase a fingerprint from the nick's certificate list
*
* @param entry The fingerprint to remove
*
* Removes the specified fingerprint from the cert list.
*/
virtual void EraseCert(const Anope::string &entry) = 0;
/** Clears the entire nick's cert list
*
* Deletes all the memory allocated in the certificate list vector and then clears the vector.
*/
virtual void ClearCert() = 0;
virtual void Check() = 0;
};
+20
View File
@@ -0,0 +1,20 @@
/* NickServ core functions
*
* (C) 2003-2013 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*/
struct NSSuspendInfo
{
Anope::string nick, by, reason;
time_t when, expires;
virtual ~NSSuspendInfo() { }
protected:
NSSuspendInfo() { }
};
@@ -3,10 +3,11 @@
enum ForbidType
{
FT_NONE,
FT_NICK,
FT_NICK = 1,
FT_CHAN,
FT_EMAIL
FT_EMAIL,
FT_REGISTER,
FT_SIZE
};
struct ForbidData : Serializable
@@ -18,9 +19,9 @@ struct ForbidData : Serializable
time_t expires;
ForbidType type;
const Anope::string serialize_name() const anope_override { return "ForbidData"; }
Serialize::Data serialize() const anope_override;
static Serializable* unserialize(Serializable *obj, Serialize::Data &data);
ForbidData() : Serializable("ForbidData") { }
void Serialize(Serialize::Data &data) const anope_override;
static Serializable* Unserialize(Serializable *obj, Serialize::Data &data);
};
class ForbidService : public Service
@@ -34,26 +35,22 @@ class ForbidService : public Service
virtual ForbidData *FindForbid(const Anope::string &mask, ForbidType type) = 0;
virtual const std::vector<ForbidData *> &GetForbids() = 0;
virtual std::vector<ForbidData *> GetForbids() = 0;
};
static service_reference<ForbidService> forbid_service("ForbidService", "forbid");
static ServiceReference<ForbidService> forbid_service("ForbidService", "forbid");
Serialize::Data ForbidData::serialize() const
void ForbidData::Serialize(Serialize::Data &data) const
{
Serialize::Data data;
data["mask"] << this->mask;
data["creator"] << this->creator;
data["reason"] << this->reason;
data["created"] << this->created;
data["expires"] << this->expires;
data["type"] << this->type;
return data;
}
Serializable* ForbidData::unserialize(Serializable *obj, Serialize::Data &data)
Serializable* ForbidData::Unserialize(Serializable *obj, Serialize::Data &data)
{
if (!forbid_service)
return NULL;
@@ -73,6 +70,9 @@ Serializable* ForbidData::unserialize(Serializable *obj, Serialize::Data &data)
data["type"] >> t;
fb->type = static_cast<ForbidType>(t);
if (t > FT_SIZE - 1)
return NULL;
if (!obj)
forbid_service->AddForbid(fb);
return fb;
@@ -1,6 +1,6 @@
/* OperServ ignore interface
*
* (C) 2003-2012 Anope Team
* (C) 2003-2013 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -17,9 +17,9 @@ struct IgnoreData : Serializable
Anope::string reason;
time_t time; /* When do we stop ignoring them? */
const Anope::string serialize_name() const anope_override { return "IgnoreData"; }
Serialize::Data serialize() const anope_override;
static Serializable* unserialize(Serializable *obj, Serialize::Data &data);
IgnoreData() : Serializable("IgnoreData") { }
void Serialize(Serialize::Data &data) const anope_override;
static Serializable* Unserialize(Serializable *obj, Serialize::Data &data);
};
class IgnoreService : public Service
@@ -41,21 +41,17 @@ class IgnoreService : public Service
inline std::list<IgnoreData> &GetIgnores() { return this->ignores; }
};
static service_reference<IgnoreService> ignore_service("IgnoreService", "ignore");
static ServiceReference<IgnoreService> ignore_service("IgnoreService", "ignore");
Serialize::Data IgnoreData::serialize() const
void IgnoreData::Serialize(Serialize::Data &data) const
{
Serialize::Data data;
data["mask"] << this->mask;
data["creator"] << this->creator;
data["reason"] << this->reason;
data["time"] << this->time;
return data;
}
Serializable* IgnoreData::unserialize(Serializable *obj, Serialize::Data &data)
Serializable* IgnoreData::Unserialize(Serializable *obj, Serialize::Data &data)
{
if (!ignore_service)
return NULL;
@@ -70,9 +66,14 @@ Serializable* IgnoreData::unserialize(Serializable *obj, Serialize::Data &data)
return ign;
}
Anope::string smask, screator, sreason;
time_t t;
data["mask"] >> smask;
data["creator"] >> screator;
data["reason"] >> sreason;
data["time"] >> t;
return ignore_service->AddIgnore(data["mask"].astr(), data["creator"].astr(), data["reason"].astr(), t);
return ignore_service->AddIgnore(smask, screator, sreason, t);
}
@@ -22,9 +22,9 @@ struct NewsItem : Serializable
Anope::string who;
time_t time;
const Anope::string serialize_name() const anope_override { return "NewsItem"; }
Serialize::Data serialize() const anope_override;
static Serializable* unserialize(Serializable *obj, Serialize::Data &data);
NewsItem() : Serializable("NewsItem") { }
void Serialize(Serialize::Data &data) const anope_override;
static Serializable* Unserialize(Serializable *obj, Serialize::Data &data);
};
class NewsService : public Service
@@ -39,21 +39,17 @@ class NewsService : public Service
virtual std::vector<NewsItem *> &GetNewsList(NewsType t) = 0;
};
static service_reference<NewsService> news_service("NewsService", "news");
static ServiceReference<NewsService> news_service("NewsService", "news");
Serialize::Data NewsItem::serialize() const
void NewsItem::Serialize(Serialize::Data &data) const
{
Serialize::Data data;
data["type"] << this->type;
data["text"] << this->text;
data["who"] << this->who;
data["time"] << this->time;
return data;
}
Serializable* NewsItem::unserialize(Serializable *obj, Serialize::Data &data)
Serializable* NewsItem::Unserialize(Serializable *obj, Serialize::Data &data)
{
if (!news_service)
return NULL;
@@ -3,9 +3,11 @@
struct Session
{
Anope::string host; /* Host of the session */
cidr addr; /* A cidr (sockaddrs + len) representing this session */
unsigned count; /* Number of clients with this host */
unsigned hits; /* Number of subsequent kills for a host */
Session(const Anope::string &ip, int len) : addr(ip, len), count(1), hits(0) { }
};
struct Exception : Serializable
@@ -17,15 +19,15 @@ struct Exception : Serializable
time_t time; /* When this exception was added */
time_t expires; /* Time when it expires. 0 == no expiry */
const Anope::string serialize_name() const anope_override { return "Exception"; }
Serialize::Data serialize() const anope_override;
static Serializable* unserialize(Serializable *obj, Serialize::Data &data);
Exception() : Serializable("Exception") { }
void Serialize(Serialize::Data &data) const anope_override;
static Serializable* Unserialize(Serializable *obj, Serialize::Data &data);
};
class SessionService : public Service
{
public:
typedef Anope::map<Session *> SessionMap;
typedef TR1NS::unordered_map<cidr, Session *, cidr::hash> SessionMap;
typedef std::vector<Exception *> ExceptionVector;
SessionService(Module *m) : Service(m, "SessionService", "session") { }
@@ -40,32 +42,24 @@ class SessionService : public Service
virtual ExceptionVector &GetExceptions() = 0;
virtual void AddSession(Session *s) = 0;
virtual void DelSession(Session *s) = 0;
virtual Session *FindSession(const Anope::string &mask) = 0;
virtual Session *FindSession(const Anope::string &ip) = 0;
virtual SessionMap &GetSessions() = 0;
};
static service_reference<SessionService> session_service("SessionService", "session");
static ServiceReference<SessionService> session_service("SessionService", "session");
Serialize::Data Exception::serialize() const
void Exception::Serialize(Serialize::Data &data) const
{
Serialize::Data data;
data["mask"] << this->mask;
data["limit"] << this->limit;
data["who"] << this->who;
data["reason"] << this->reason;
data["time"] << this->time;
data["expires"] << this->expires;
return data;
}
Serializable* Exception::unserialize(Serializable *obj, Serialize::Data &data)
Serializable* Exception::Unserialize(Serializable *obj, Serialize::Data &data)
{
if (!session_service)
return NULL;
+18
View File
@@ -0,0 +1,18 @@
#ifndef CHANSERV_H
#define CHANSERV_H
class ChanServService : public Service
{
public:
ChanServService(Module *m) : Service(m, "ChanServService", "ChanServ")
{
}
/* Have ChanServ hold the channel, that is, join and set +nsti and wait
* for a few minutes so no one can join or rejoin.
*/
virtual void Hold(Channel *c) = 0;
};
#endif // CHANSERV_H
@@ -4,17 +4,17 @@
class GlobalService : public Service
{
public:
GlobalService(Module *m) : Service(m, "GlobalService", "Global") { }
GlobalService(Module *m) : Service(m, "GlobalService", "Global")
{
}
/** Send out a global message to all users
* @param sender Our client which should send the global
* @param source The sender of the global
* @param message The message
*/
virtual void SendGlobal(const BotInfo *sender, const Anope::string &source, const Anope::string &message) = 0;
virtual void SendGlobal(BotInfo *sender, const Anope::string &source, const Anope::string &message) = 0;
};
static service_reference<GlobalService> global("GlobalService", "Global");
#endif // GLOBAL_H
@@ -12,14 +12,9 @@ class MemoServService : public Service
MEMO_TARGET_FULL
};
MemoServService(Module *m) : Service(m, "MemoServService", "MemoServ") { }
/** Retrieve the memo info for a nick or channel
* @param target Target
* @param ischan Set to true if target is a channel
* @return A memoinfo structure or NULL
*/
virtual MemoInfo *GetMemoInfo(const Anope::string &target, bool &ischan) = 0;
MemoServService(Module *m) : Service(m, "MemoServService", "MemoServ")
{
}
/** Sends a memo.
* @param source The source of the memo, can be anythin.
@@ -35,7 +30,5 @@ class MemoServService : public Service
virtual void Check(User *u) = 0;
};
static service_reference<MemoServService> memoserv("MemoServService", "MemoServ");
#endif // MEMOSERV_H
@@ -4,12 +4,14 @@
class NickServService : public Service
{
public:
NickServService(Module *m) : Service(m, "NickServService", "NickServ") { }
NickServService(Module *m) : Service(m, "NickServService", "NickServ")
{
}
virtual void Validate(User *u) = 0;
virtual void Collide(User *u, NickAlias *na) = 0;
virtual void Release(NickAlias *na) = 0;
};
static service_reference<NickServService> nickserv("NickServService", "NickServ");
#endif // NICKSERV_H
+74
View File
@@ -0,0 +1,74 @@
/*
*
* (C) 2003-2013 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
*/
namespace Redis
{
struct Reply
{
enum Type
{
NOT_PARSED,
NOT_OK,
OK,
INT,
BULK,
MULTI_BULK
}
type;
Reply() { Clear(); }
~Reply() { Clear(); }
void Clear()
{
type = NOT_PARSED;
i = 0;
bulk.clear();
multi_bulk_size = 0;
for (unsigned j = 0; j < multi_bulk.size(); ++j)
delete multi_bulk[j];
multi_bulk.clear();
}
int64_t i;
Anope::string bulk;
int multi_bulk_size;
std::deque<Reply *> multi_bulk;
};
class Interface
{
public:
Module *owner;
Interface(Module *m) : owner(m) { }
virtual ~Interface() { }
virtual void OnResult(const Reply &r) = 0;
virtual void OnError(const Anope::string &error) { Log(owner) << error; }
};
class Provider : public Service
{
public:
Provider(Module *c, const Anope::string &n) : Service(c, "Redis::Provider", n) { }
virtual void SendCommand(Interface *i, const std::vector<Anope::string> &cmds) = 0;
virtual void SendCommand(Interface *i, const Anope::string &str) = 0;
virtual bool BlockAndProcess() = 0;
virtual void Subscribe(Interface *i, const Anope::string &pattern) = 0;
virtual void Unsubscribe(const Anope::string &pattern) = 0;
virtual void StartTransaction() = 0;
virtual void CommitTransaction() = 0;
};
}
+216
View File
@@ -0,0 +1,216 @@
/*
* (C) 2003-2013 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*/
namespace SQL
{
class Data : public Serialize::Data
{
public:
typedef std::map<Anope::string, std::stringstream *> Map;
Map data;
std::map<Anope::string, Type> types;
~Data()
{
Clear();
}
std::iostream& operator[](const Anope::string &key) anope_override
{
std::stringstream *&ss = data[key];
if (!ss)
ss = new std::stringstream();
return *ss;
}
std::set<Anope::string> KeySet() const anope_override
{
std::set<Anope::string> keys;
for (Map::const_iterator it = this->data.begin(), it_end = this->data.end(); it != it_end; ++it)
keys.insert(it->first);
return keys;
}
size_t Hash() const anope_override
{
size_t hash = 0;
for (Map::const_iterator it = this->data.begin(), it_end = this->data.end(); it != it_end; ++it)
if (!it->second->str().empty())
hash ^= Anope::hash_cs()(it->second->str());
return hash;
}
std::map<Anope::string, std::iostream *> GetData() const
{
std::map<Anope::string, std::iostream *> d;
for (Map::const_iterator it = this->data.begin(), it_end = this->data.end(); it != it_end; ++it)
d[it->first] = it->second;
return d;
}
void Clear()
{
for (Map::const_iterator it = this->data.begin(), it_end = this->data.end(); it != it_end; ++it)
delete it->second;
this->data.clear();
}
void SetType(const Anope::string &key, Type t) anope_override
{
this->types[key] = t;
}
Type GetType(const Anope::string &key) const anope_override
{
std::map<Anope::string, Type>::const_iterator it = this->types.find(key);
if (it != this->types.end())
return it->second;
return DT_TEXT;
}
};
/** A SQL exception, can be thrown at various points
*/
class Exception : public ModuleException
{
public:
Exception(const Anope::string &reason) : ModuleException(reason) { }
virtual ~Exception() throw() { }
};
/** A SQL query
*/
struct QueryData
{
Anope::string data;
bool escape;
};
struct Query
{
Anope::string query;
std::map<Anope::string, QueryData> parameters;
Query() { }
Query(const Anope::string &q) : query(q) { }
Query& operator=(const Anope::string &q)
{
this->query = q;
this->parameters.clear();
return *this;
}
bool operator==(const Query &other) const
{
return this->query == other.query;
}
inline bool operator!=(const Query &other) const
{
return !(*this == other);
}
template<typename T> void SetValue(const Anope::string &key, const T& value, bool escape = true)
{
try
{
Anope::string string_value = stringify(value);
this->parameters[key].data = string_value;
this->parameters[key].escape = escape;
}
catch (const ConvertException &ex) { }
}
};
/** A result from a SQL query
*/
class Result
{
protected:
/* Rows, column, item */
std::vector<std::map<Anope::string, Anope::string> > entries;
Query query;
Anope::string error;
public:
unsigned int id;
Anope::string finished_query;
Result() : id(0) { }
Result(unsigned int i, const Query &q, const Anope::string &fq, const Anope::string &err = "") : query(q), error(err), id(i), finished_query(fq) { }
inline operator bool() const { return this->error.empty(); }
inline const unsigned int GetID() const { return this->id; }
inline const Query &GetQuery() const { return this->query; }
inline const Anope::string &GetError() const { return this->error; }
int Rows() const { return this->entries.size(); }
const std::map<Anope::string, Anope::string> &Row(size_t index) const
{
try
{
return this->entries.at(index);
}
catch (const std::out_of_range &)
{
throw Exception("Out of bounds access to SQLResult");
}
}
const Anope::string Get(size_t index, const Anope::string &col) const
{
const std::map<Anope::string, Anope::string> rows = this->Row(index);
std::map<Anope::string, Anope::string>::const_iterator it = rows.find(col);
if (it == rows.end())
throw Exception("Unknown column name in SQLResult: " + col);
return it->second;
}
};
/* An interface used by modules to retrieve the results
*/
class Interface
{
public:
Module *owner;
Interface(Module *m) : owner(m) { }
virtual ~Interface() { }
virtual void OnResult(const Result &r) = 0;
virtual void OnError(const Result &r) = 0;
};
/** Class providing the SQL service, modules call this to execute queries
*/
class Provider : public Service
{
public:
Provider(Module *c, const Anope::string &n) : Service(c, "SQL::Provider", n) { }
virtual void Run(Interface *i, const Query &query) = 0;
virtual Result RunQuery(const Query &query) = 0;
virtual std::vector<Query> CreateTable(const Anope::string &table, const Data &data) = 0;
virtual Query BuildInsert(const Anope::string &table, unsigned int id, Data &data) = 0;
virtual Query GetTables(const Anope::string &prefix) = 0;
virtual Anope::string FromUnixtime(time_t) = 0;
};
}
+40
View File
@@ -0,0 +1,40 @@
#include "httpd.h"
class XMLRPCRequest
{
std::map<Anope::string, Anope::string> replies;
public:
Anope::string name;
Anope::string id;
std::deque<Anope::string> data;
HTTPReply& r;
XMLRPCRequest(HTTPReply &_r) : r(_r) { }
inline void reply(const Anope::string &dname, const Anope::string &ddata) { this->replies.insert(std::make_pair(dname, ddata)); }
inline const std::map<Anope::string, Anope::string> &get_replies() { return this->replies; }
};
class XMLRPCServiceInterface;
class XMLRPCEvent
{
public:
virtual ~XMLRPCEvent() { }
virtual bool Run(XMLRPCServiceInterface *iface, HTTPClient *client, XMLRPCRequest &request) = 0;
};
class XMLRPCServiceInterface : public Service
{
public:
XMLRPCServiceInterface(Module *creator, const Anope::string &sname) : Service(creator, "XMLRPCServiceInterface", sname) { }
virtual void Register(XMLRPCEvent *event) = 0;
virtual void Unregister(XMLRPCEvent *event) = 0;
virtual Anope::string Sanitize(const Anope::string &string) = 0;
virtual void Reply(XMLRPCRequest &request) = 0;
};
+11 -3
View File
@@ -1,8 +1,9 @@
/*
* Copyright (C) 2008-2011 Robin Burchell <w00t@inspircd.org>
* Copyright (C) 2008-2012 Anope Team <team@anope.org>
* Copyright (C) 2008-2013 Anope Team <team@anope.org>
*
* Please read COPYING and README for further details.
*
*/
#ifndef OPERTYPE_H
@@ -11,19 +12,26 @@
#include "services.h"
#include "account.h"
/* A services operator. Usually made by the configuration file, but not always.
* NickAlias::Find(name)->nc->o == this
*/
struct CoreExport Oper
{
/* The oper's nick */
Anope::string name;
/* The type of operator this operator is */
OperType *ot;
/* Whether the user must be an IRC operator (umode +o) to be considered a services operator */
bool require_oper;
Anope::string password;
Anope::string certfp;
/* True if this operator is set in the config */
bool config;
/* Hosts allowed to use this operator block */
std::vector<Anope::string> hosts;
Anope::string vhost;
Oper(const Anope::string &n, OperType *o) : name(n), ot(o) { this->config = false; }
Oper(const Anope::string &n, OperType *o) : name(n), ot(o), require_oper(false), config(false) { }
virtual ~Oper() { }
+223 -106
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2003-2012 Anope Team
* (C) 2003-2013 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -8,7 +8,6 @@
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*
*
*/
#ifndef PROTOCOL_H
@@ -16,101 +15,195 @@
#include "services.h"
#include "anope.h"
#include "service.h"
/* Protocol tweaks */
struct IRCDVar
/* Encapsultes the IRCd protocol we are speaking. */
class CoreExport IRCDProto : public Service
{
const char *name; /* Name of the IRCd command */
const char *pseudoclient_mode; /* Mode used by BotServ Bots */
int svsnick; /* Supports SVSNICK */
int vhost; /* Supports vhost */
int snline; /* Supports SNline */
int sqline; /* Supports SQline */
int szline; /* Supports SZline */
int join2msg; /* Join 2 Message */
int chansqline; /* Supports Channel Sqlines */
int quitonkill; /* IRCD sends QUIT when kill */
int vident; /* Supports vidents */
int svshold; /* Supports svshold */
int tsonmode; /* Timestamp on mode changes */
int omode; /* On the fly o:lines */
int umode; /* change user modes */
int knock_needs_i; /* Check if we needed +i when setting NOKNOCK */
int svsmode_ucmode; /* Can remove User Channel Modes with SVSMODE */
int sglineenforce;
int ts6; /* ircd is TS6 */
const char *globaltldprefix; /* TLD prefix used for Global */
unsigned maxmodes; /* Max modes to send per line */
int certfp; /* IRCd sends a SSL users certificate fingerprint */
};
Anope::string proto_name;
class CoreExport IRCDProto
{
protected:
virtual void SendSVSKillInternal(const BotInfo *, const User *, const Anope::string &);
virtual void SendModeInternal(const BotInfo *, const Channel *, const Anope::string &);
virtual void SendModeInternal(const BotInfo *, const User *, const Anope::string &) = 0;
virtual void SendKickInternal(const BotInfo *, const Channel *, const User *, const Anope::string &);
virtual void SendMessageInternal(const BotInfo *bi, const Anope::string &dest, const Anope::string &buf);
virtual void SendNoticeInternal(const BotInfo *bi, const Anope::string &dest, const Anope::string &msg);
virtual void SendPrivmsgInternal(const BotInfo *bi, const Anope::string &dest, const Anope::string &buf);
virtual void SendQuitInternal(const User *u, const Anope::string &buf);
virtual void SendPartInternal(const BotInfo *bi, const Channel *chan, const Anope::string &buf);
virtual void SendGlobopsInternal(const BotInfo *source, const Anope::string &buf);
virtual void SendCTCPInternal(const BotInfo *bi, const Anope::string &dest, const Anope::string &buf);
virtual void SendNumericInternal(int numeric, const Anope::string &dest, const Anope::string &buf);
IRCDProto(Module *creator, const Anope::string &proto_name);
public:
virtual ~IRCDProto() { }
virtual ~IRCDProto();
virtual void SendSVSNOOP(const Server *, bool) { }
virtual void SendTopic(BotInfo *, Channel *);
virtual void SendSVSKillInternal(const MessageSource &, User *, const Anope::string &);
virtual void SendModeInternal(const MessageSource &, const Channel *, const Anope::string &);
virtual void SendModeInternal(const MessageSource &, User *, const Anope::string &);
virtual void SendKickInternal(const MessageSource &, const Channel *, User *, const Anope::string &);
virtual void SendNoticeInternal(const MessageSource &, const Anope::string &dest, const Anope::string &msg);
virtual void SendPrivmsgInternal(const MessageSource &, const Anope::string &dest, const Anope::string &buf);
virtual void SendQuitInternal(User *, const Anope::string &buf);
virtual void SendPartInternal(User *, const Channel *chan, const Anope::string &buf);
virtual void SendGlobopsInternal(const MessageSource &, const Anope::string &buf);
virtual void SendCTCPInternal(const MessageSource &, const Anope::string &dest, const Anope::string &buf);
virtual void SendNumericInternal(int numeric, const Anope::string &dest, const Anope::string &buf);
const Anope::string &GetProtocolName();
/* Modes used by default by our clients */
Anope::string DefaultPseudoclientModes;
/* Can we force change a users's nick? */
bool CanSVSNick;
/* Can we force join or part users? */
bool CanSVSJoin;
/* Can we set vhosts/vidents on users? */
bool CanSetVHost, CanSetVIdent;
/* Can we ban specific gecos from being used? */
bool CanSNLine;
/* Can we ban specific nicknames from being used? */
bool CanSQLine;
/* Can we ban sepcific channel names from being used? */
bool CanSQLineChannel;
/* Can we ban by IP? */
bool CanSZLine;
/* Can we place temporary holds on specific nicknames? */
bool CanSVSHold;
/* See os_oline */
bool CanSVSO;
/* See ns_cert */
bool CanCertFP;
/* Whether this IRCd requires unique IDs for each user or server. See TS6/P10. */
bool RequiresID;
/* The maximum number of modes we are allowed to set with one MODE command */
unsigned MaxModes;
/* The maximum number of bytes a line may have */
unsigned MaxLine;
/** Sets the server in NOOP mode. If NOOP mode is enabled, no users
* will be able to oper on the server.
* @param s The server
* @param mode Whether to turn NOOP on or off
*/
virtual void SendSVSNOOP(const Server *s, bool mode) { }
/** Sets the topic on a channel
* @param bi The bot to set the topic from
* @param c The channel to set the topic on. The topic being set is Channel::topic
*/
virtual void SendTopic(const MessageSource &, Channel *);
/** Sets a vhost on a user.
* @param u The user
* @param vident The ident to set
* @param vhost The vhost to set
*/
virtual void SendVhost(User *u, const Anope::string &vident, const Anope::string &vhost) { }
virtual void SendVhostDel(User *) { }
/** Sets an akill. This is a recursive function that can be called multiple times
* for the same xline, but for different users, if the xline is not one that can be
* enforced by the IRCd, such as a nick/user/host/realname combination ban.
* @param u The user affected by the akill, if known
* @param x The akill
*/
virtual void SendAkill(User *, XLine *) = 0;
virtual void SendAkillDel(const XLine *) = 0;
virtual void SendSVSKill(const BotInfo *source, const User *user, const char *fmt, ...);
virtual void SendMode(const BotInfo *bi, const Channel *dest, const char *fmt, ...);
virtual void SendMode(const BotInfo *bi, const User *u, const char *fmt, ...);
virtual void SendClientIntroduction(const User *u) = 0;
virtual void SendKick(const BotInfo *bi, const Channel *chan, const User *user, const char *fmt, ...);
virtual void SendMessage(const BotInfo *bi, const Anope::string &dest, const char *fmt, ...);
virtual void SendNotice(const BotInfo *bi, const Anope::string &dest, const char *fmt, ...);
virtual void SendAction(const BotInfo *bi, const Anope::string &dest, const char *fmt, ...);
virtual void SendPrivmsg(const BotInfo *bi, const Anope::string &dest, const char *fmt, ...);
virtual void SendGlobalNotice(const BotInfo *bi, const Server *dest, const Anope::string &msg);
virtual void SendGlobalPrivmsg(const BotInfo *bi, const Server *desc, const Anope::string &msg);
virtual void SendQuit(const User *u, const char *fmt, ...);
/* Realname ban */
virtual void SendSGLine(User *, const XLine *) { }
virtual void SendSGLineDel(const XLine *) { }
/* IP ban */
virtual void SendSZLine(User *u, const XLine *) { }
virtual void SendSZLineDel(const XLine *) { }
/* Nick ban (and sometimes channel) */
virtual void SendSQLine(User *, const XLine *x) { }
virtual void SendSQLineDel(const XLine *x) { }
/** Kills a user
* @param source Who is doing the kill
* @param user The user to be killed
* @param fmt Kill reason
*/
virtual void SendSVSKill(const MessageSource &source, User *user, const char *fmt, ...);
virtual void SendMode(const MessageSource &source, const Channel *dest, const char *fmt, ...);
virtual void SendMode(const MessageSource &source, User *u, const char *fmt, ...);
/** Introduces a client to the rest of the network
* @param u The client to introduce
*/
virtual void SendClientIntroduction(User *u) = 0;
virtual void SendKick(const MessageSource &source, const Channel *chan, User *user, const char *fmt, ...);
virtual void SendNotice(const MessageSource &source, const Anope::string &dest, const char *fmt, ...);
virtual void SendPrivmsg(const MessageSource &source, const Anope::string &dest, const char *fmt, ...);
virtual void SendAction(const MessageSource &source, const Anope::string &dest, const char *fmt, ...);
virtual void SendCTCP(const MessageSource &source, const Anope::string &dest, const char *fmt, ...);
virtual void SendGlobalNotice(BotInfo *bi, const Server *dest, const Anope::string &msg) = 0;
virtual void SendGlobalPrivmsg(BotInfo *bi, const Server *desc, const Anope::string &msg) = 0;
virtual void SendQuit(User *u, const char *fmt, ...);
virtual void SendPing(const Anope::string &servname, const Anope::string &who);
virtual void SendPong(const Anope::string &servname, const Anope::string &who);
virtual void SendJoin(const User *, Channel *, const ChannelStatus *) = 0;
virtual void SendSQLineDel(const XLine *x) { }
virtual void SendInvite(const BotInfo *bi, const Channel *c, const User *u);
virtual void SendPart(const BotInfo *bi, const Channel *chan, const char *fmt, ...);
virtual void SendGlobops(const BotInfo *source, const char *fmt, ...);
virtual void SendSQLine(User *, const XLine *x) { }
virtual void SendSquit(Server *, const Anope::string &message);
virtual void SendSVSO(const BotInfo *, const Anope::string &, const Anope::string &) { }
virtual void SendChangeBotNick(const BotInfo *bi, const Anope::string &newnick);
virtual void SendForceNickChange(const User *u, const Anope::string &newnick, time_t when);
virtual void SendVhost(User *, const Anope::string &, const Anope::string &) { }
/** Joins one of our users to a channel.
* @param u The user to join
* @param c The channel to join the user to
* @param status The status to set on the user after joining. This may or may not already internally
* be set on the user. This may include the modes in the join, but will usually place them on the mode
* stacker to be set "soon".
*/
virtual void SendJoin(User *u, Channel *c, const ChannelStatus *status) = 0;
virtual void SendPart(User *u, const Channel *chan, const char *fmt, ...);
/** Force joins a user that isn't ours to a channel.
* @param bi The source of the message
* @param u The user to join
* @param chan The channel to join the user to
* @param param Channel key?
*/
virtual void SendSVSJoin(const MessageSource &source, User *u, const Anope::string &chan, const Anope::string &param) { }
/** Force parts a user that isn't ours from a channel.
* @param source The source of the message
* @param u The user to part
* @param chan The channel to part the user from
* @param param part reason, some IRCds don't support this
*/
virtual void SendSVSPart(const MessageSource &source, User *u, const Anope::string &chan, const Anope::string &param) { }
virtual void SendInvite(const MessageSource &source, const Channel *c, User *u);
virtual void SendGlobops(const MessageSource &source, const char *fmt, ...);
/** Sets oper flags on a user, currently only supported by Unreal
*/
virtual void SendSVSO(BotInfo *, const Anope::string &, const Anope::string &) { }
/** Sends a nick change of one of our clients.
*/
virtual void SendNickChange(User *u, const Anope::string &newnick);
/** Forces a nick change of a user that isn't ours (SVSNICK)
*/
virtual void SendForceNickChange(User *u, const Anope::string &newnick, time_t when);
/** Used to introduce ourselves to our uplink. Usually will SendServer(Me) and any other
* initial handshake requirements.
*/
virtual void SendConnect() = 0;
virtual void SendSVSHold(const Anope::string &) { }
virtual void SendSVSHoldDel(const Anope::string &) { }
virtual void SendSGLineDel(const XLine *) { }
virtual void SendSZLineDel(const XLine *) { }
virtual void SendSZLine(User *u, const XLine *) { }
virtual void SendSGLine(User *, const XLine *) { }
virtual void SendCTCP(const BotInfo *bi, const Anope::string &dest, const char *fmt, ...);
virtual void SendSVSJoin(const BotInfo *bi, const Anope::string &, const Anope::string &, const Anope::string &) { }
virtual void SendSWhois(const BotInfo *bi, const Anope::string &, const Anope::string &) { }
/** Called right before we begin our burst, after we have handshaked successfully with the uplink/
* At this point none of our servesr, users, or channels exist on the uplink
*/
virtual void SendBOB() { }
virtual void SendEOB() { }
virtual void SendSVSHold(const Anope::string &, time_t) { }
virtual void SendSVSHoldDel(const Anope::string &) { }
virtual void SendSWhois(const MessageSource &, const Anope::string &, const Anope::string &) { }
/** Introduces a server to the uplink
*/
virtual void SendServer(const Server *) = 0;
virtual bool IsNickValid(const Anope::string &) { return true; }
virtual bool IsChannelValid(const Anope::string &);
virtual void SendSquit(Server *, const Anope::string &message);
virtual void SendNumeric(int numeric, const Anope::string &dest, const char *fmt, ...);
virtual void SendLogin(User *u) = 0;
virtual void SendLogout(User *u) = 0;
@@ -118,38 +211,62 @@ class CoreExport IRCDProto
* On most TS6 IRCds this is a SJOIN with no nick
*/
virtual void SendChannel(Channel *c) { }
/** Make the user an IRC operator
* Normally this is a simple +o, though some IRCds require us to send the oper type
*/
virtual void SendOper(User *u);
virtual bool IsNickValid(const Anope::string &);
virtual bool IsChannelValid(const Anope::string &);
virtual bool IsIdentValid(const Anope::string &);
virtual bool IsHostValid(const Anope::string &);
virtual bool IsExtbanValid(const Anope::string &) { return false; }
/** Retrieve the maximum number of list modes settable on this channel
* Defaults to Config->ListSize
*/
virtual unsigned GetMaxListFor(Channel *c);
};
class CoreExport IRCdMessage
class CoreExport MessageSource
{
Anope::string source;
User *u;
Server *s;
public:
virtual bool On436(const Anope::string &, const std::vector<Anope::string> &);
virtual bool OnAway(const Anope::string &, const std::vector<Anope::string> &);
virtual bool OnJoin(const Anope::string &, const std::vector<Anope::string> &);
virtual bool OnKick(const Anope::string &, const std::vector<Anope::string> &);
virtual bool OnKill(const Anope::string &, const std::vector<Anope::string> &);
virtual bool OnMode(const Anope::string &, const std::vector<Anope::string> &) = 0;
virtual bool OnUID(const Anope::string &, const std::vector<Anope::string> &);
virtual bool OnNick(const Anope::string &, const std::vector<Anope::string> &) = 0;
virtual bool OnPart(const Anope::string &, const std::vector<Anope::string> &);
virtual bool OnPing(const Anope::string &, const std::vector<Anope::string> &);
virtual bool OnPrivmsg(const Anope::string &, const std::vector<Anope::string> &);
virtual bool OnQuit(const Anope::string &, const std::vector<Anope::string> &);
virtual bool OnServer(const Anope::string &, const std::vector<Anope::string> &) = 0;
virtual bool OnSQuit(const Anope::string &, const std::vector<Anope::string> &);
virtual bool OnTopic(const Anope::string &, const std::vector<Anope::string> &) = 0;
virtual bool OnWhois(const Anope::string &, const std::vector<Anope::string> &);
virtual bool OnCapab(const Anope::string &, const std::vector<Anope::string> &);
virtual bool OnSJoin(const Anope::string &, const std::vector<Anope::string> &) = 0;
virtual bool OnError(const Anope::string &, const std::vector<Anope::string> &);
MessageSource(const Anope::string &);
MessageSource(User *u);
MessageSource(Server *s);
const Anope::string &GetName() const;
const Anope::string &GetSource() const;
User *GetUser() const;
BotInfo *GetBot() const;
Server *GetServer() const;
};
extern CoreExport IRCDVar *ircd;
extern CoreExport IRCDProto *ircdproto;
extern CoreExport IRCdMessage *ircdmessage;
enum IRCDMessageFlag
{
IRCDMESSAGE_SOFT_LIMIT,
IRCDMESSAGE_REQUIRE_SERVER,
IRCDMESSAGE_REQUIRE_USER
};
extern CoreExport void pmodule_ircd_proto(IRCDProto *);
extern CoreExport void pmodule_ircd_var(IRCDVar *ircdvar);
extern CoreExport void pmodule_ircd_message(IRCdMessage *message);
class CoreExport IRCDMessage : public Service
{
Anope::string name;
unsigned param_count;
std::set<IRCDMessageFlag> flags;
public:
IRCDMessage(Module *owner, const Anope::string &n, unsigned p = 0);
unsigned GetParamCount() const;
virtual void Run(MessageSource &, const std::vector<Anope::string> &params) = 0;
void SetFlag(IRCDMessageFlag f) { flags.insert(f); }
bool HasFlag(IRCDMessageFlag f) const { return flags.count(f); }
};
extern CoreExport IRCDProto *IRCD;
#endif // PROTOCOL_H
+81 -283
View File
@@ -1,15 +1,15 @@
/* Modular support
/*
*
* (C) 2008-2012 Anope Team
* (C) 2008-2013 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
*/
#ifndef REGCHANNEL_H
#define REGCHANNEL_H
#include "botserv.h"
#include "memo.h"
#include "modes.h"
#include "extensible.h"
@@ -18,208 +18,85 @@
#include "serialize.h"
#include "bots.h"
typedef Anope::insensitive_map<ChannelInfo *> registered_channel_map;
typedef Anope::hash_map<ChannelInfo *> registered_channel_map;
extern CoreExport serialize_checker<registered_channel_map> RegisteredChannelList;
/** Flags used for the ChannelInfo class
*/
enum ChannelInfoFlag
{
CI_BEGIN,
/* Retain the topic even after the channel is emptied */
CI_KEEPTOPIC,
/* Don't allow non-authorized users to be opped */
CI_SECUREOPS,
/* Hide channel from ChanServ LIST command */
CI_PRIVATE,
/* Topic can only be changed by SET TOPIC */
CI_TOPICLOCK,
/* Only users on the access list may join */
CI_RESTRICTED,
/* Don't allow ChanServ and BotServ commands to do bad things to users with higher access levels */
CI_PEACE,
/* Don't allow any privileges unless a user is IDENTIFIED with NickServ */
CI_SECURE,
/* Channel does not expire */
CI_NO_EXPIRE,
/* Channel memo limit may not be changed */
CI_MEMO_HARDMAX,
/* Stricter control of channel founder status */
CI_SECUREFOUNDER,
/* Sign kicks with the user who did the kick */
CI_SIGNKICK,
/* Sign kicks if level is < than the one defined by the SIGNKIGK level */
CI_SIGNKICK_LEVEL,
/* Channel is suspended */
CI_SUSPENDED,
/* Channel still exists when emptied, this can be caused by setting a perm
* channel mode (+P on InspIRCd) or /cs set #chan persist on.
* This keeps the service bot in the channel regardless if a +P type mode
* is set or not
*/
CI_PERSIST,
/* Chanstats are enabled */
CI_STATS,
CI_END
};
const Anope::string ChannelInfoFlagStrings[] = {
"BEGIN", "KEEPTOPIC", "SECUREOPS", "PRIVATE", "TOPICLOCK", "RESTRICTED",
"PEACE", "SECURE", "NO_EXPIRE", "MEMO_HARDMAX", "SECUREFOUNDER",
"SIGNKICK", "SIGNKICK_LEVEL", "SUSPENDED", "PERSIST", "STATS", ""
};
/** Flags for badwords
*/
enum BadWordType
{
/* Always kicks if the word is said */
BW_ANY,
/* User must way the entire word */
BW_SINGLE,
/* The word has to start with the badword */
BW_START,
/* The word has to end with the badword */
BW_END
};
/* Structure used to contain bad words. */
struct CoreExport BadWord : Serializable
{
ChannelInfo *ci;
Anope::string word;
BadWordType type;
const Anope::string serialize_name() const anope_override;
Serialize::Data serialize() const anope_override;
static Serializable* unserialize(Serializable *obj, Serialize::Data &);
};
/** Flags for auto kick
*/
enum AutoKickFlag
{
/* Is by nick core, not mask */
AK_ISNICK
};
const Anope::string AutoKickFlagString[] = { "AK_ISNICK", "" };
extern CoreExport Serialize::Checker<registered_channel_map> RegisteredChannelList;
/* AutoKick data. */
class CoreExport AutoKick : public Flags<AutoKickFlag>, public Serializable
class CoreExport AutoKick : public Serializable
{
public:
AutoKick();
serialize_obj<ChannelInfo> ci;
/* Only one of these can be in use */
/* Channel this autokick is on */
Serialize::Reference<ChannelInfo> ci;
Anope::string mask;
serialize_obj<NickCore> nc;
Serialize::Reference<NickCore> nc;
Anope::string reason;
Anope::string creator;
time_t addtime;
time_t last_used;
const Anope::string serialize_name() const anope_override;
Serialize::Data serialize() const anope_override;
static Serializable* unserialize(Serializable *obj, Serialize::Data &);
AutoKick();
~AutoKick();
void Serialize(Serialize::Data &data) const anope_override;
static Serializable* Unserialize(Serializable *obj, Serialize::Data &);
};
struct CoreExport ModeLock : Serializable
{
public:
serialize_obj<ChannelInfo> ci;
bool set;
ChannelModeName name;
Anope::string param;
Anope::string setter;
time_t created;
ModeLock(ChannelInfo *ch, bool s, ChannelModeName n, const Anope::string &p, const Anope::string &se = "", time_t c = Anope::CurTime);
const Anope::string serialize_name() const anope_override;
Serialize::Data serialize() const anope_override;
static Serializable* unserialize(Serializable *obj, Serialize::Data &);
};
struct CoreExport LogSetting : Serializable
{
serialize_obj<ChannelInfo> ci;
/* Our service name of the command */
Anope::string service_name;
/* The name of the client the command is on */
Anope::string command_service;
/* Name of the command to the user, can have spaces */
Anope::string command_name;
Anope::string method, extra;
Anope::string creator;
time_t created;
const Anope::string serialize_name() const anope_override;
Serialize::Data serialize() const anope_override;
static Serializable* unserialize(Serializable *obj, Serialize::Data &);
};
class CoreExport ChannelInfo : public Extensible, public Flags<ChannelInfoFlag, CI_END>, public Serializable
/* It matters that Base is here before Extensible (it is inherited by Serializable)
*/
class CoreExport ChannelInfo : public Serializable, public Extensible
{
/* channels who reference this one */
Anope::map<int> references;
private:
serialize_obj<NickCore> founder; /* Channel founder */
serialize_checker<std::vector<ChanAccess *> > access; /* List of authorized users */
serialize_checker<std::vector<AutoKick *> > akick; /* List of users to kickban */
serialize_checker<std::vector<BadWord *> > badwords; /* List of badwords */
std::map<Anope::string, int16_t> levels;
Serialize::Reference<NickCore> founder; /* Channel founder */
Serialize::Reference<NickCore> successor; /* Who gets the channel if the founder nick is dropped or expires */
Serialize::Checker<std::vector<ChanAccess *> > access; /* List of authorized users */
Serialize::Checker<std::vector<AutoKick *> > akick; /* List of users to kickban */
Anope::map<int16_t> levels;
public:
typedef std::multimap<ChannelModeName, ModeLock *> ModeList;
serialize_checker<ModeList> mode_locks;
serialize_checker<std::vector<LogSetting *> > log_settings;
friend class ChanAccess;
friend class AutoKick;
/** Default constructor
* @param chname The channel name
*/
ChannelInfo(const Anope::string &chname);
/** Copy constructor
* @param ci The ChannelInfo to copy settings to
*/
ChannelInfo(const ChannelInfo &ci);
/** Default destructor
*/
~ChannelInfo();
Anope::string name; /* Channel name */
serialize_obj<NickCore> successor; /* Who gets the channel if the founder nick is dropped or expires */
Anope::string name; /* Channel name */
Anope::string desc;
time_t time_registered;
time_t last_used;
Anope::string last_topic; /* The last topic that was set on this channel */
Anope::string last_topic_setter; /* Setter */
time_t last_topic_time; /* Time */
Anope::string last_topic; /* The last topic that was set on this channel */
Anope::string last_topic_setter; /* Setter */
time_t last_topic_time; /* Time */
Channel::ModeList last_modes; /* The last modes set on this channel */
int16_t bantype;
MemoInfo memos;
Channel *c; /* Pointer to channel record (if channel is currently in use) */
Channel *c; /* Pointer to channel, if the channel exists */
/* For BotServ */
serialize_obj<BotInfo> bi; /* Bot used on this channel */
Flags<BotServFlag> botflags;
int16_t ttb[TTB_SIZE]; /* Times to ban for each kicker */
Serialize::Reference<BotInfo> bi; /* Bot used on this channel */
int16_t capsmin, capspercent; /* For CAPS kicker */
int16_t floodlines, floodsecs; /* For FLOOD kicker */
int16_t repeattimes; /* For REPEAT kicker */
time_t banexpire; /* Time bans expire in */
const Anope::string serialize_name() const anope_override;
Serialize::Data serialize() const anope_override;
static Serializable* unserialize(Serializable *obj, Serialize::Data &);
/** Constructor
* @param chname The channel name
*/
ChannelInfo(const Anope::string &chname);
/** Copy constructor
* @param ci The ChannelInfo to copy settings from
*/
ChannelInfo(const ChannelInfo &ci);
~ChannelInfo();
void Serialize(Serialize::Data &data) const anope_override;
static Serializable* Unserialize(Serializable *obj, Serialize::Data &);
/** Change the founder of the channek
* @params nc The new founder
@@ -231,6 +108,9 @@ class CoreExport ChannelInfo : public Extensible, public Flags<ChannelInfoFlag,
*/
NickCore *GetFounder() const;
void SetSuccessor(NickCore *nc);
NickCore *GetSuccessor() const;
/** Find which bot should send mode/topic/etc changes for this channel
* @return The bot
*/
@@ -261,21 +141,18 @@ class CoreExport ChannelInfo : public Extensible, public Flags<ChannelInfoFlag,
*/
unsigned GetAccessCount() const;
/** Get the number of access entries for this channel,
* including those that are on other channels.
*/
unsigned GetDeepAccessCount() const;
/** Erase an entry from the channel access list
*
* @param index The index in the access list vector
*
* Clears the memory used by the given access entry and removes it from the vector.
* @return The erased entry
*/
void EraseAccess(unsigned index);
/** Erase an entry from the channel access list
*
* @param taccess The access to remove
*
* Clears the memory used by the given access entry and removes it from the vector.
*/
void EraseAccess(const ChanAccess *taccess);
ChanAccess *EraseAccess(unsigned index);
/** Clear the entire channel access list
*
@@ -321,104 +198,6 @@ class CoreExport ChannelInfo : public Extensible, public Flags<ChannelInfoFlag,
*/
void ClearAkick();
/** Add a badword to the badword list
* @param word The badword
* @param type The type (SINGLE START END)
* @return The badword
*/
BadWord* AddBadWord(const Anope::string &word, BadWordType type);
/** Get a badword structure by index
* @param index The index
* @return The badword
*/
BadWord* GetBadWord(unsigned index) const;
/** Get how many badwords are on this channel
* @return The number of badwords in the vector
*/
unsigned GetBadWordCount() const;
/** Remove a badword
* @param index The index of the badword
*/
void EraseBadWord(unsigned index);
/** Clear all badwords from the channel
*/
void ClearBadWords();
/** Check if a mode is mlocked
* @param mode The mode
* @param An optional param
* @param status True to check mlock on, false for mlock off
* @return true on success, false on fail
*/
bool HasMLock(ChannelMode *mode, const Anope::string &param, bool status) const;
/** Set a mlock
* @param mode The mode
* @param status True for mlock on, false for mlock off
* @param param An optional param arg for + mlocked modes
* @param setter Who is setting the mlock
* @param created When the mlock was created
* @return true on success, false on failure (module blocking)
*/
bool SetMLock(ChannelMode *mode, bool status, const Anope::string &param = "", Anope::string setter = "", time_t created = Anope::CurTime);
/** Remove a mlock
* @param mode The mode
* @param status True for mlock on, false for mlock off
* @param param The param of the mode, required if it is a list or status mode
* @return true on success, false on failure
*/
bool RemoveMLock(ChannelMode *mode, bool status, const Anope::string &param = "");
/** Clear all mlocks on the channel
*/
void ClearMLock();
/** Get all of the mlocks for this channel
* @return The mlocks
*/
const ModeList &GetMLock() const;
/** Get a list of modes on a channel
* @param Name The mode name to get a list of
* @return a pair of iterators for the beginning and end of the list
*/
std::pair<ModeList::iterator, ModeList::iterator> GetModeList(ChannelModeName Name);
/** Get details for a specific mlock
* @param mname The mode name
* @param An optional param to match with
* @return The MLock, if any
*/
const ModeLock *GetMLock(ChannelModeName mname, const Anope::string &param = "");
/** Get the current mode locks as a string
* @param complete True to show mlock parameters aswell
* @return A string of mode locks, eg: +nrt
*/
Anope::string GetMLockAsString(bool complete) const;
/** Check whether a user is permitted to be on this channel
* @param u The user
* @return true if they are allowed, false if they aren't and were kicked
*/
bool CheckKick(User *user);
/** Check the channel topic
* If topic lock is enabled will change the topic back, else it records
* the new topic in the ChannelInfo
*/
void CheckTopic();
/** Restore the channel topic, used on channel creation when not syncing with the uplink
* and after uplink sync
*/
void RestoreTopic();
/** Get the level for a privilege
* @param priv The privilege name
* @return the level
@@ -440,11 +219,30 @@ class CoreExport ChannelInfo : public Extensible, public Flags<ChannelInfoFlag,
/** Clear all privileges from the channel
*/
void ClearLevels();
/** Gets a ban mask for the given user based on the bantype
* of the channel.
* @param u The user
* @return A ban mask that affects the user
*/
Anope::string GetIdealBan(User *u) const;
/** Finds a ChannelInfo
* @param name channel name to lookup
* @return the ChannelInfo associated with the channel
*/
static ChannelInfo* Find(const Anope::string &name);
void AddChannelReference(const Anope::string &what);
void RemoveChannelReference(const Anope::string &what);
void GetChannelReferences(std::deque<Anope::string> &chans);
};
extern CoreExport ChannelInfo *cs_findchan(const Anope::string &chan);
/** Is the user the real founder?
* @param user The user
* @param ci The channel
* @return true or false
*/
extern CoreExport bool IsFounder(const User *user, const ChannelInfo *ci);
extern CoreExport void update_cs_lastseen(User *user, ChannelInfo *ci);
extern CoreExport int get_idealban(const ChannelInfo *ci, User *u, Anope::string &ret);
#endif // REGCHANNEL_H
+1 -1
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2003-2012 Anope Team
* (C) 2003-2013 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
+168 -113
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2003-2012 Anope Team
* (C) 2003-2013 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -20,219 +20,277 @@
namespace Serialize
{
enum DataType
class Data
{
DT_TEXT,
DT_INT
public:
enum Type
{
DT_TEXT,
DT_INT
};
virtual ~Data() { }
virtual std::iostream& operator[](const Anope::string &key) = 0;
virtual std::set<Anope::string> KeySet() const { throw CoreException("Not supported"); }
virtual size_t Hash() const { throw CoreException("Not supported"); }
virtual void SetType(const Anope::string &key, Type t) { }
virtual Type GetType(const Anope::string &key) const { return DT_TEXT; }
};
extern void RegisterTypes();
extern void CheckTypes();
class Type;
template<typename T> class Checker;
template<typename T> class Reference;
}
class CoreExport stringstream : public std::stringstream
{
private:
Serialize::DataType type;
unsigned _max;
public:
stringstream();
stringstream(const stringstream &ss);
Anope::string astr() const;
template<typename T> std::istream &operator>>(T &val)
{
std::istringstream is(this->str());
is >> val;
return *this;
}
std::istream &operator>>(Anope::string &val);
bool operator==(const stringstream &other) const;
bool operator!=(const stringstream &other) const;
stringstream &setType(Serialize::DataType t);
Serialize::DataType getType() const;
stringstream &setMax(unsigned m);
unsigned getMax() const;
};
namespace Serialize
{
typedef std::map<Anope::string, stringstream> Data;
}
extern void RegisterTypes();
/** A serialziable object. Serializable objects can be serialized into
* abstract data types (Serialize::Data), and then reconstructed or
* updated later at any time.
*/
class CoreExport Serializable : public virtual Base
{
private:
static std::list<Serializable *> *serializable_items;
/* A list of every serializable item in Anope.
* Some of these are static and constructed at runtime,
* so this list must be on the heap, as it is not always
* constructed before other objects are if it isn't.
*/
static std::list<Serializable *> *SerializableItems;
/* The type of item this object is */
Serialize::Type *s_type;
private:
/* Iterator into serializable_items */
std::list<Serializable *>::iterator s_iter;
Serialize::Data last_commit;
/* The hash of the last serialized form of this object commited to the database */
size_t last_commit;
/* The last time this object was commited to the database */
time_t last_commit_time;
protected:
Serializable();
Serializable(const Anope::string &serialize_type);
Serializable(const Serializable &);
virtual ~Serializable();
Serializable &operator=(const Serializable &);
public:
unsigned int id;
virtual ~Serializable();
void destroy();
/* Unique ID (per type, not globally) for this object */
uint64_t id;
/* Only used by redis, to ignore updates */
unsigned short redis_ignore;
/** Marks the object as potentially being updated "soon".
*/
void QueueUpdate();
bool IsCached();
void UpdateCache();
bool IsCached(Serialize::Data &);
void UpdateCache(Serialize::Data &);
bool IsTSCached();
void UpdateTS();
virtual const Anope::string serialize_name() const = 0;
virtual Serialize::Data serialize() const = 0;
/** Get the type of serializable object this is
* @return The serializable object type
*/
Serialize::Type* GetSerializableType() const { return this->s_type; }
virtual void Serialize(Serialize::Data &data) const = 0;
static const std::list<Serializable *> &GetItems();
};
class CoreExport SerializeType
/* A serializable type. There should be one of these classes for each type
* of class that inherits from Serialiable. Used for unserializing objects
* of this type, as it requires a function pointer to a static member function.
*/
class CoreExport Serialize::Type
{
typedef Serializable* (*unserialize_func)(Serializable *obj, Serialize::Data &);
static std::vector<Anope::string> type_order;
static Anope::map<SerializeType *> types;
static std::vector<Anope::string> TypeOrder;
static std::map<Anope::string, Serialize::Type *> Types;
/* The name of this type, should be a class name */
Anope::string name;
unserialize_func unserialize;
/* Owner of this type. Used for placing objects of this type in separate databases
* based on what module, if any, owns it.
*/
Module *owner;
/* The timesatmp for this type. All objects of this type are as up to date as
* this timestamp. if curtime == timestamp then we have the most up to date
* version of every object of this type.
*/
time_t timestamp;
public:
std::map<unsigned int, Serializable *> objects;
/* Map of Serializable::id to Serializable objects */
std::map<uint64_t, Serializable *> objects;
SerializeType(const Anope::string &n, unserialize_func f);
~SerializeType();
/** Creates a new serializable type
* @param n Type name
* @param f Func to unserialize objects
* @param owner Owner of this type. Leave NULL for the core.
*/
Type(const Anope::string &n, unserialize_func f, Module *owner = NULL);
~Type();
const Anope::string &GetName();
/** Gets the name for this type
* @return The name, eg "NickAlias"
*/
const Anope::string &GetName() { return this->name; }
/** Unserialized an object.
* @param obj NULL if this object doesn't yet exist. If this isn't NULL, instead
* update the contents of this object.
* @param data The data to unserialize
* @return The unserialized object. If obj != NULL this should be obj.
*/
Serializable *Unserialize(Serializable *obj, Serialize::Data &data);
/** Check if this object type has any pending changes and update them.
*/
void Check();
/** Gets the timestamp for the object type. That is, the time we know
* all objects of this type are updated at least to.
*/
time_t GetTimestamp() const;
/** Bumps object type timestamp to current time
*/
void UpdateTimestamp();
static SerializeType *Find(const Anope::string &name);
Module* GetOwner() const { return this->owner; }
static Serialize::Type *Find(const Anope::string &name);
static const std::vector<Anope::string> &GetTypeOrder();
static const std::map<Anope::string, Serialize::Type *>& GetTypes();
};
/** Should be used to hold lists and other objects of a specific type,
* but not a specific object. Used for ensuring that any access to
* this object type is always up to date. These are usually constructed
* at run time, before main is called, so no types are registered. This
* is why there are static Serialize::Type* variables in every function.
*/
template<typename T>
class serialize_checker
class Serialize::Checker
{
Anope::string name;
T obj;
mutable Serialize::Type *type;
inline void Check() const
{
if (!type)
type = Serialize::Type::Find(this->name);
if (type)
type->Check();
}
public:
serialize_checker(const Anope::string &n) : name(n) { }
Checker(const Anope::string &n) : name(n), type(NULL) { }
inline const T* operator->() const
{
static SerializeType *type = SerializeType::Find(this->name);
if (type)
type->Check();
this->Check();
return &this->obj;
}
inline T* operator->()
{
static SerializeType *type = SerializeType::Find(this->name);
if (type)
type->Check();
this->Check();
return &this->obj;
}
inline const T& operator*() const
{
static SerializeType *type = SerializeType::Find(this->name);
if (type)
type->Check();
this->Check();
return this->obj;
}
inline T& operator*()
{
static SerializeType *type = SerializeType::Find(this->name);
if (type)
type->Check();
this->Check();
return this->obj;
}
inline operator const T&() const
{
static SerializeType *type = SerializeType::Find(this->name);
if (type)
type->Check();
this->Check();
return this->obj;
}
inline operator T&()
{
static SerializeType *type = SerializeType::Find(this->name);
if (type)
type->Check();
this->Check();
return this->obj;
}
};
#include "modules.h"
/** Used to hold references to serializable objects. Reference should always be
* used when holding references to serializable objects for extended periods of time
* to ensure that the object it refers to it always up to date. This also behaves like
* Reference in that it will invalidate itself if the object it refers to is
* destructed.
*/
template<typename T>
class serialize_obj : public dynamic_reference_base
class Serialize::Reference : public ReferenceBase
{
protected:
T *ref;
public:
serialize_obj() : ref(NULL)
Reference() : ref(NULL)
{
}
serialize_obj(T *obj) : ref(obj)
Reference(T *obj) : ref(obj)
{
if (obj)
obj->AddReference(this);
}
serialize_obj(const serialize_obj<T> &other) : ref(other.ref)
Reference(const Reference<T> &other) : ReferenceBase(other), ref(other.ref)
{
if (*this)
if (ref && !invalid)
this->ref->AddReference(this);
}
~serialize_obj()
~Reference()
{
if (*this)
if (ref && !invalid)
this->ref->DelReference(this);
}
inline Reference<T>& operator=(const Reference<T> &other)
{
if (this != &other)
{
if (ref && !invalid)
this->ref->DelReference(this);
this->ref = other.ref;
this->invalid = other.invalid;
if (ref && !invalid)
this->ref->AddReference(this);
}
return *this;
}
inline operator bool() const
{
if (!this->invalid)
return this->ref != NULL;
return NULL;
}
inline void operator=(T *newref)
{
if (*this)
this->ref->DelReference(this);
this->ref = newref;
this->invalid = false;
if (newref)
this->ref->AddReference(this);
return false;
}
inline operator T*() const
@@ -240,11 +298,10 @@ class serialize_obj : public dynamic_reference_base
if (!this->invalid)
{
if (this->ref)
{
FOREACH_MOD(I_OnSerializePtrAssign, OnSerializePtrAssign(this->ref));
// This can invalidate me
this->ref->QueueUpdate();
}
return this->ref;
if (!this->invalid)
return this->ref;
}
return NULL;
}
@@ -254,11 +311,10 @@ class serialize_obj : public dynamic_reference_base
if (!this->invalid)
{
if (this->ref)
{
FOREACH_MOD(I_OnSerializePtrAssign, OnSerializePtrAssign(this->ref));
// This can invalidate me
this->ref->QueueUpdate();
}
return this->ref;
if (!this->invalid)
return this->ref;
}
return NULL;
}
@@ -268,11 +324,10 @@ class serialize_obj : public dynamic_reference_base
if (!this->invalid)
{
if (this->ref)
{
FOREACH_MOD(I_OnSerializePtrAssign, OnSerializePtrAssign(this->ref));
// This can invalidate me
this->ref->QueueUpdate();
}
return this->ref;
if (!this->invalid)
return this->ref;
}
return NULL;
}
+70 -34
View File
@@ -1,52 +1,70 @@
/*
*
* (C) 2003-2013 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*
*/
#ifndef SERVERS_H
#define SERVERS_H
#include "services.h"
#include "anope.h"
#include "extensible.h"
/* Anope */
/* Anope. We are at the top of the server tree, our uplink is
* almost always me->GetLinks()[0]. We never have an uplink. */
extern CoreExport Server *Me;
extern CoreExport void do_server(const Anope::string &source, const Anope::string &servername, unsigned int hops, const Anope::string &descript, const Anope::string &numeric);
extern CoreExport const Anope::string ts6_uid_retrieve();
extern CoreExport const Anope::string ts6_sid_retrieve();
extern CoreExport std::set<Anope::string> Capab;
/** Flags set on servers
*/
enum ServerFlag
namespace Servers
{
SERVER_NONE,
/* Server is syncing */
SERVER_SYNCING,
/* This server was juped */
SERVER_JUPED
};
/* Retrieves the next free TS6 UID or SID */
extern CoreExport const Anope::string TS6_UID_Retrieve();
extern CoreExport const Anope::string TS6_SID_Retrieve();
const Anope::string ServerFlagStrings[] = { "SERVER_NONE", "SERVER_SYNCING", "SERVER_JUPED", "" };
/* Gets our uplink. Note we don't actually have an "uplink", this is just
* the only server whose uplink *is* Me that is not a juped server.
* @return Our uplink, or NULL if not uplinked to anything
*/
extern CoreExport Server* GetUplink();
/* Server maps by name and id */
extern CoreExport Anope::map<Server *> ByName;
extern CoreExport Anope::map<Server *> ByID;
/* CAPAB/PROTOCTL given by the uplink */
extern CoreExport std::set<Anope::string> Capab;
}
/** Class representing a server
*/
class CoreExport Server : public Flags<ServerFlag>
class CoreExport Server : public Extensible
{
private:
/* Server name */
Anope::string Name;
Anope::string name;
/* Hops between services and server */
unsigned int Hops;
unsigned int hops;
/* Server description */
Anope::string Description;
Anope::string description;
/* Server ID */
Anope::string SID;
Anope::string sid;
/* Links for this server */
std::vector<Server *> Links;
std::vector<Server *> links;
/* Uplink for this server */
Server *UplinkServer;
Server *uplink;
/* Server is syncing */
bool syncing;
/* The server is juped */
bool juped;
/* Reason this server was quit */
Anope::string QReason;
Anope::string quit_reason;
public:
/** Constructor
@@ -55,14 +73,19 @@ class CoreExport Server : public Flags<ServerFlag>
* @param hops Hops from services server
* @param description Server rdescription
* @param sid Server sid/numeric
* @param flag An optional server flag
* @param jupe If the server is juped
*/
Server(Server *uplink, const Anope::string &name, unsigned hops, const Anope::string &description, const Anope::string &sid, ServerFlag flag = SERVER_NONE);
Server(Server *uplink, const Anope::string &name, unsigned hops, const Anope::string &description, const Anope::string &sid = "", bool jupe = false);
private:
/** Destructor
*/
~Server();
public:
/* Number of users on the server */
unsigned users;
/** Delete this server with a reason
* @param reason The reason
*/
@@ -93,11 +116,15 @@ class CoreExport Server : public Flags<ServerFlag>
*/
void SetSID(const Anope::string &sid);
/** Get the server numeric/SID
/** Get the server numeric/SID, else the server name
* @return The numeric/SID
*/
const Anope::string &GetSID() const;
/** Retrieves the reason this server is quitting
*/
const Anope::string &GetQuitReason() const;
/** Get the list of links this server has, or NULL if it has none
* @return A list of servers
*/
@@ -119,32 +146,41 @@ class CoreExport Server : public Flags<ServerFlag>
void DelLink(Server *s);
/** Finish syncing this server and optionally all links to it
* @param SyncLinks True to sync the links for this server too (if any)
* @param sync_links True to sync the links for this server too (if any)
*/
void Sync(bool SyncLinks);
void Sync(bool sync_links);
/** Check if this server is synced
* @return true or false
*/
bool IsSynced() const;
/** Unsync the server. Only used for Me->Unsync()
*/
void Unsync();
/** Check if this server is ULined
* @return true or false
*/
bool IsULined() const;
/** Check if this server is juped (a pseudoserver other than us)
* @return true if this server is a juped server
*/
bool IsJuped() const;
/** Send a message to alll users on this server
* @param source The source of the message
* @param message The message
*/
void Notice(const BotInfo *source, const Anope::string &message);
void Notice(BotInfo *source, const Anope::string &message);
/** Find a server
* @param name The name or SID/numeric
* @param s The server list to search for this server on, defaults to our Uplink
* @param name_only set to true to only look up by name, not SID
* @return The server
*/
static Server *Find(const Anope::string &name, Server *s = NULL);
static Server *Find(const Anope::string &name, bool name_only = false);
};
#endif // SERVERS_H
+82 -17
View File
@@ -1,11 +1,13 @@
/*
* (C) 2003-2012 Anope Team
*
* (C) 2003-2013 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*
*/
#ifndef SERVICE_H
@@ -13,37 +15,76 @@
#include "services.h"
#include "anope.h"
#include "modules.h"
#include "base.h"
/** Anything that inherits from this class can be referred to
* using ServiceReference. Any interfaces provided by modules,
* such as commands, use this. This is also used for modules
* that publish a service (m_ssl, etc).
*/
class CoreExport Service : public virtual Base
{
static Anope::map<Anope::map<Service *> > services;
public:
static Service *FindService(const Anope::string &t, const Anope::string &n)
static std::map<Anope::string, std::map<Anope::string, Service *> > Services;
static std::map<Anope::string, std::map<Anope::string, Anope::string> > Aliases;
static Service *FindService(const std::map<Anope::string, Service *> &services, const std::map<Anope::string, Anope::string> *aliases, const Anope::string &n)
{
Anope::map<Anope::map<Service *> >::iterator it = services.find(t);
std::map<Anope::string, Service *>::const_iterator it = services.find(n);
if (it != services.end())
return it->second;
if (aliases != NULL)
{
Anope::map<Service *>::iterator it2 = it->second.find(n);
if (it2 != it->second.end())
return it2->second;
std::map<Anope::string, Anope::string>::const_iterator it2 = aliases->find(n);
if (it2 != aliases->end())
return FindService(services, aliases, it2->second);
}
return NULL;
}
public:
static Service *FindService(const Anope::string &t, const Anope::string &n)
{
std::map<Anope::string, std::map<Anope::string, Service *> >::const_iterator it = Services.find(t);
if (it == Services.end())
return NULL;
std::map<Anope::string, std::map<Anope::string, Anope::string> >::const_iterator it2 = Aliases.find(t);
if (it2 != Aliases.end())
return FindService(it->second, &it2->second, n);
return FindService(it->second, NULL, n);
}
static std::vector<Anope::string> GetServiceKeys(const Anope::string &t)
{
std::vector<Anope::string> keys;
Anope::map<Anope::map<Service *> >::iterator it = services.find(t);
if (it != services.end())
for (Anope::map<Service *>::iterator it2 = it->second.begin(); it2 != it->second.end(); ++it2)
std::map<Anope::string, std::map<Anope::string, Service *> >::iterator it = Services.find(t);
if (it != Services.end())
for (std::map<Anope::string, Service *>::iterator it2 = it->second.begin(); it2 != it->second.end(); ++it2)
keys.push_back(it2->first);
return keys;
}
static void AddAlias(const Anope::string &t, const Anope::string &n, const Anope::string &v)
{
std::map<Anope::string, Anope::string> &smap = Aliases[t];
smap[n] = v;
}
static void DelAlias(const Anope::string &t, const Anope::string &n)
{
std::map<Anope::string, Anope::string> &smap = Aliases[t];
smap.erase(n);
if (smap.empty())
Aliases.erase(t);
}
Module *owner;
/* Service type, which should be the class name (eg "Command") */
Anope::string type;
/* Service name, commands are usually named service/command */
Anope::string name;
Service(Module *o, const Anope::string &t, const Anope::string &n) : owner(o), type(t), name(n)
@@ -58,7 +99,7 @@ class CoreExport Service : public virtual Base
void Register()
{
Anope::map<Service *> &smap = services[this->type];
std::map<Anope::string, Service *> &smap = Services[this->type];
if (smap.find(this->name) != smap.end())
throw ModuleException("Service " + this->type + " with name " + this->name + " already exists");
smap[this->name] = this;
@@ -66,27 +107,32 @@ class CoreExport Service : public virtual Base
void Unregister()
{
Anope::map<Service *> &smap = services[this->type];
std::map<Anope::string, Service *> &smap = Services[this->type];
smap.erase(this->name);
if (smap.empty())
services.erase(this->type);
Services.erase(this->type);
}
};
/** Like Reference, but used to refer to Services.
*/
template<typename T>
class service_reference : public dynamic_reference<T>
class ServiceReference : public Reference<T>
{
Anope::string type;
Anope::string name;
public:
service_reference(const Anope::string &t, const Anope::string &n) : dynamic_reference<T>(NULL), type(t), name(n)
ServiceReference() { }
ServiceReference(const Anope::string &t, const Anope::string &n) : type(t), name(n)
{
}
inline void operator=(const Anope::string &n)
{
this->name = n;
this->invalid = true;
}
operator bool() anope_override
@@ -98,6 +144,10 @@ class service_reference : public dynamic_reference<T>
}
if (!this->ref)
{
/* This really could be dynamic_cast in every case, except for when a module
* creates its own service type (that other modules must include the header file
* for), as the core is not compiled with it so there is no RTTI for it.
*/
this->ref = static_cast<T *>(Service::FindService(this->type, this->name));
if (this->ref)
this->ref->AddReference(this);
@@ -106,5 +156,20 @@ class service_reference : public dynamic_reference<T>
}
};
class ServiceAlias
{
Anope::string t, f;
public:
ServiceAlias(const Anope::string &type, const Anope::string &from, const Anope::string &to) : t(type), f(from)
{
Service::AddAlias(type, from, to);
}
~ServiceAlias()
{
Service::DelAlias(t, f);
}
};
#endif // SERVICE_H
+2 -11
View File
@@ -1,6 +1,6 @@
/*
*
* (C) 2003-2012 Anope Team
* (C) 2003-2013 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -8,7 +8,6 @@
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*
*
*/
#ifndef SERVICES_H
@@ -44,6 +43,7 @@
#include <bitset>
#include <set>
#include <algorithm>
#include <iterator>
#include "defs.h"
@@ -66,13 +66,4 @@
# include "anope_windows.h"
#endif
/**
* RFC: defination of a valid nick
* nickname = ( letter / special ) *8( letter / digit / special / "-" )
* letter = %x41-5A / %x61-7A ; A-Z / a-z
* digit = %x30-39 ; 0-9
* special = %x5B-60 / %x7B-7D ; "[", "]", "\", "`", "_", "^", "{", "|", "}"
**/
#define isvalidnick(c) (isalnum(c) || ((c) >= '\x5B' && (c) <= '\x60') || ((c) >= '\x7B' && (c) <= '\x7D') || (c) == '-')
#endif // SERVICES_H
-49
View File
@@ -1,49 +0,0 @@
/*
*
* (C) 2003-2012 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*
*
*/
#ifndef SIGNAL_H
#define SIGNAL_H
#include <signal.h>
#include "sockets.h"
/** Represents a signal handler
*/
class Signal : public Pipe
{
static std::vector<Signal *> SignalHandlers;
static void SignalHandler(int signal);
struct sigaction action, old;
public:
int signal;
/** Constructor
* @param s The signal to listen for
*/
Signal(int s);
~Signal();
/**
* Called when the signal is received.
* Note this is not *immediatly* called when the signal is received,
* but it is saved and called at a later time when we are not doing something
* important. This is always called on the main thread, even on systems that
* spawn threads for signals, like Windows.
*/
virtual void OnNotify() anope_override = 0;
};
#endif
+8 -18
View File
@@ -1,21 +1,24 @@
/*
*
* (C) 2003-2012 Anope Team
* (C) 2003-2013 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*
*/
#ifndef SOCKETENGINE_H
#define SOCKETENGINE_H
#include "services.h"
#include "sockets.h"
class CoreExport SocketEngine
{
static const int DefaultSize = 2; // Uplink, mode stacker
public:
/* Map of sockets */
static std::map<int, Socket *> Sockets;
@@ -28,25 +31,12 @@ class CoreExport SocketEngine
*/
static void Shutdown();
/** Add a socket to the internal list
/** Set a flag on a socket
* @param s The socket
* @param set Whether setting or unsetting
* @param flag The flag to set or unset
*/
static void AddSocket(Socket *s);
/** Delete a socket from the internal list
* @param s The socket
*/
static void DelSocket(Socket *s);
/** Mark a socket as writeable
* @param s The socket
*/
static void MarkWritable(Socket *s);
/** Unmark a socket as writeable
* @param s The socket
*/
static void ClearWritable(Socket *s);
static void Change(Socket *s, bool set, SocketFlag flag);
/** Read from sockets and do things
*/
+76 -63
View File
@@ -1,12 +1,13 @@
/*
*
* (C) 2003-2012 Anope Team
* (C) 2003-2013 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*
*/
#ifndef SOCKETS_H
@@ -53,6 +54,9 @@ union CoreExport sockaddrs
*/
Anope::string addr() const;
/* Is this address ipv6? */
bool ipv6() const;
/** Check if this sockaddr has data in it
*/
bool operator()() const;
@@ -78,29 +82,41 @@ union CoreExport sockaddrs
* @throws A socket exception if given an invalid structure
*/
void ntop(int type, const void *src);
bool valid() const;
};
class CoreExport cidr
{
sockaddrs addr;
Anope::string cidr_ip;
unsigned char cidr_len;
unsigned short cidr_len;
public:
cidr(const Anope::string &ip);
cidr(const Anope::string &ip, unsigned char len);
Anope::string mask() const;
bool match(sockaddrs &other);
bool match(const sockaddrs &other);
bool valid() const;
bool operator<(const cidr &other) const;
bool operator==(const cidr &other) const;
bool operator!=(const cidr &other) const;
struct CoreExport hash
{
size_t operator()(const cidr &s) const;
};
};
class SocketException : public CoreException
{
public:
/** Default constructor for socket exceptions
/** Constructor for socket exceptions
* @param message Error message
*/
SocketException(const Anope::string &message) : CoreException(message) { }
/** Default destructor
/** Destructor
* @throws Nothing
*/
virtual ~SocketException() throw() { }
@@ -108,20 +124,21 @@ class SocketException : public CoreException
enum SocketFlag
{
SF_DEAD,
SF_DEAD = 1,
SF_READABLE,
SF_WRITABLE,
SF_CONNECTING,
SF_CONNECTED,
SF_ACCEPTING,
SF_ACCEPTED
SF_ACCEPTED,
SF_SIZE
};
static const Anope::string SocketFlagStrings[] = { "SF_DEAD", "SF_WRITABLE", "SF_CONNECTING", "SF_CONNECTED", "SF_ACCEPTING", "SF_ACCEPTED", "" };
class CoreExport SocketIO
{
public:
virtual ~SocketIO() { }
/** Receive something from the buffer
* @param s The socket
* @param buf The buf to read to
@@ -175,33 +192,35 @@ class CoreExport SocketIO
virtual void Destroy() { }
};
class CoreExport Socket : public Flags<SocketFlag>
class CoreExport Socket
{
protected:
/* Socket FD */
int Sock;
int sock;
/* Is this an IPv6 socket? */
bool IPv6;
bool ipv6;
public:
std::bitset<SF_SIZE> flags;
/* Sockaddrs for bind() (if it's bound) */
sockaddrs bindaddr;
/* I/O functions used for this socket */
SocketIO *IO;
SocketIO *io;
/** Empty constructor, should not be called.
*/
Socket();
/** Default constructor
/** Constructor, possibly creates the socket and adds it to the engine
* @param sock The socket to use, -1 if we need to create our own
* @param ipv6 true if using ipv6
* @param type The socket type, defaults to SOCK_STREAM
*/
Socket(int sock, bool ipv6 = false, int type = SOCK_STREAM);
/** Default destructor
/** Destructor, closes the socket and removes it from the engine
*/
virtual ~Socket();
@@ -215,15 +234,11 @@ class CoreExport Socket : public Flags<SocketFlag>
*/
bool IsIPv6() const;
/** Mark a socket as blockig
/** Mark a socket as (non)blocking
* @param state true to enable blocking, false to disable blocking
* @return true if the socket is now blocking
*/
bool SetBlocking();
/** Mark a socket as non-blocking
* @return true if the socket is now non-blocking
*/
bool SetNonBlocking();
bool SetBlocking(bool state);
/** Bind the socket to an ip and port
* @param ip The ip
@@ -255,20 +270,15 @@ class CoreExport Socket : public Flags<SocketFlag>
class CoreExport BufferedSocket : public virtual Socket
{
protected:
/* Things read from the socket */
Anope::string read_buffer;
/* Things to be written to the socket */
Anope::string WriteBuffer;
/* Part of a message sent from the server, but not totally received */
Anope::string extrabuf;
/* How much data was received from this socket */
int RecvLen;
Anope::string write_buffer;
/* How much data was received from this socket on this recv() */
int recv_len;
public:
/** Constructor
*/
BufferedSocket();
/** Default destructor
*/
virtual ~BufferedSocket();
/** Called when there is something to be received for this socket
@@ -281,11 +291,9 @@ class CoreExport BufferedSocket : public virtual Socket
*/
bool ProcessWrite() anope_override;
/** Called with a line received from the socket
* @param buf The line
* @return true to continue reading, false to drop the socket
/** Gets the new line from the input buffer, if any
*/
virtual bool Read(const Anope::string &buf);
const Anope::string GetLine();
/** Write to the socket
* @param message The message
@@ -320,15 +328,11 @@ class CoreExport BinarySocket : public virtual Socket
~DataBlock();
};
std::deque<DataBlock *> WriteBuffer;
/* Data to be written out */
std::deque<DataBlock *> write_buffer;
public:
/** Constructor
*/
BinarySocket();
/** Default destructor
*/
virtual ~BinarySocket();
/** Called when there is something to be received for this socket
@@ -357,7 +361,7 @@ class CoreExport BinarySocket : public virtual Socket
virtual bool Read(const char *buffer, size_t l);
};
class CoreExport ListenSocket : public Socket
class CoreExport ListenSocket : public virtual Socket
{
public:
/** Constructor
@@ -366,9 +370,6 @@ class CoreExport ListenSocket : public Socket
* @param ipv6 true for ipv6
*/
ListenSocket(const Anope::string &bindip, int port, bool ipv6);
/** Destructor
*/
virtual ~ListenSocket();
/** Process what has come in from the connection
@@ -390,10 +391,6 @@ class CoreExport ConnectionSocket : public virtual Socket
/* Sockaddrs for connection ip/port */
sockaddrs conaddr;
/** Constructor
*/
ConnectionSocket();
/** Connect the socket
* @param TargetHost The target host to connect to
* @param Port The target port to connect to
@@ -425,7 +422,7 @@ class CoreExport ClientSocket : public virtual Socket
{
public:
/* Listen socket this connection came from */
ListenSocket *LS;
ListenSocket *ls;
/* Clients address */
sockaddrs clientaddr;
@@ -458,34 +455,50 @@ class CoreExport ClientSocket : public virtual Socket
class CoreExport Pipe : public Socket
{
public:
/** The FD of the write pipe (if this isn't evenfd)
* this->Sock is the readfd
/** The FD of the write pipe
* this->sock is the readfd
*/
int WritePipe;
int write_pipe;
/** Constructor
*/
Pipe();
/** Destructor
*/
~Pipe();
/** Called when data is to be read
/** Called when data is to be read, reads the data then calls OnNotify
*/
bool ProcessRead() anope_override;
/** Write data to this pipe
* @param data The data to write
* @param sz The amount of data to wirite
*/
void Write(const char *data, size_t sz);
inline void Write(const Anope::string &data) { this->Write(data.c_str(), data.length() + 1); }
/** Read data from this pipe
* @param data A buffer to read data into
* @param sz The size of the buffer
* @return The amount of data read
*/
int Read(char *data, size_t sz);
/** Mark the write end of this pipe (non)blocking
* @param state true to enable blocking, false to disable blocking
* @return true if the socket is now blocking
*/
bool SetWriteBlocking(bool state);
/** Called when this pipe needs to be woken up
* Is the same as Write("\0", 1)
*/
void Notify();
/** Overload to do something useful
/** Called after ProcessRead comes back from Notify(), overload to do something useful
*/
virtual void OnNotify() = 0;
};
extern CoreExport uint32_t TotalRead;
extern CoreExport uint32_t TotalWritten;
extern CoreExport SocketIO normalSocketIO;
extern CoreExport SocketIO NormalSocketIO;
#endif // SOCKET_H
-2
View File
@@ -7,7 +7,6 @@
#cmakedefine HAVE_CSTDINT 1
#cmakedefine HAVE_STDINT_H 1
#cmakedefine HAVE_STDDEF_H 1
#cmakedefine HAVE_SETGRENT 1
#cmakedefine HAVE_STRCASECMP 1
#cmakedefine HAVE_STRICMP 1
#cmakedefine HAVE_STRINGS_H 1
@@ -16,7 +15,6 @@
#cmakedefine HAVE_EPOLL 1
#cmakedefine HAVE_POLL 1
#cmakedefine GETTEXT_FOUND 1
#cmakedefine RUNGROUP "@RUNGROUP@"
#ifdef HAVE_CSTDINT
# include <cstdint>
+13 -1
View File
@@ -1,3 +1,15 @@
/*
*
* (C) 2003-2013 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*
*/
#ifndef THREADENGINE_H
#define THREADENGINE_H
@@ -12,7 +24,7 @@ class CoreExport Thread : public Pipe, public Extensible
public:
/* Handle for this thread */
pthread_t Handle;
pthread_t handle;
/** Threads constructor
*/
+29 -10
View File
@@ -1,11 +1,13 @@
/* Timer include stuff.
*
* (C) 2003-2012 Anope Team
* (C) 2003-2013 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*
*/
#ifndef TIMERS_H
@@ -16,6 +18,10 @@
class CoreExport Timer
{
private:
/** The owner of the timer, if any
*/
Module *owner;
/** The time this was created
*/
time_t settime;
@@ -33,14 +39,22 @@ class CoreExport Timer
bool repeat;
public:
/** Default constructor, initializes the triggering time
/** Constructor, initializes the triggering time
* @param time_from_now The number of seconds from now to trigger the timer
* @param now The time now
* @param repeating Repeat this timer every time_from_now if this is true
*/
Timer(long time_from_now, time_t now = Anope::CurTime, bool repeating = false);
/** Default destructor, removes the timer from the list
/** Constructor, initializes the triggering time
* @param creator The creator of the timer
* @param time_from_now The number of seconds from now to trigger the timer
* @param now The time now
* @param repeating Repeat this timer every time_from_now if this is true
*/
Timer(Module *creator, long time_from_now, time_t now = Anope::CurTime, bool repeating = false);
/** Destructor, removes the timer from the list
*/
virtual ~Timer();
@@ -74,6 +88,11 @@ class CoreExport Timer
*/
time_t GetSetTime() const;
/** Returns the owner of this timer, if any
* @return The owner of the timer
*/
Module *GetOwner() const;
/** Called when the timer ticks
* This should be overridden with something useful
*/
@@ -88,26 +107,26 @@ class CoreExport TimerManager
{
/** A list of timers
*/
static std::vector<Timer *> Timers;
static std::multimap<time_t, Timer *> Timers;
public:
/** Add a timer to the list
* @param T A Timer derived class to add
* @param t A Timer derived class to add
*/
static void AddTimer(Timer *T);
static void AddTimer(Timer *t);
/** Deletes a timer
* @param T A Timer derived class to delete
* @param t A Timer derived class to delete
*/
static void DelTimer(Timer *T);
static void DelTimer(Timer *t);
/** Tick all pending timers
* @param ctime The current time
*/
static void TickTimers(time_t ctime = Anope::CurTime);
/** Compares two timers
/** Deletes all timers owned by the given module
*/
static bool TimerComparison(Timer *one, Timer *two);
static void DeleteTimersFor(Module *m);
};
#endif // TIMERS_H
+16 -10
View File
@@ -1,39 +1,45 @@
/*
*
* (C) 2003-2012 Anope Team
* (C) 2003-2013 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*
*/
#ifndef UPLINK_H
#define UPLINK_H
#include "sockets.h"
#include "protocol.h"
namespace Uplink
{
extern void Connect();
}
/* This is the socket to our uplink */
class UplinkSocket : public ConnectionSocket, public BufferedSocket
{
public:
UplinkSocket();
~UplinkSocket();
bool Read(const Anope::string &);
void OnConnect();
void OnError(const Anope::string &);
bool ProcessRead() anope_override;
void OnConnect() anope_override;
void OnError(const Anope::string &) anope_override;
/* A message sent over the uplink socket */
class CoreExport Message
{
private:
const Server *server;
const User *user;
MessageSource source;
std::stringstream buffer;
public:
Message();
explicit Message(const Server *);
explicit Message(const User *);
Message(const MessageSource &);
~Message();
template<typename T> Message &operator<<(const T &val)
{
+149 -97
View File
@@ -1,8 +1,14 @@
/*
* Copyright (C) 2008-2011 Robin Burchell <w00t@inspircd.org>
* Copyright (C) 2008-2012 Anope Team <team@anope.org>
*
* (C) 2008-2011 Robin Burchell <w00t@inspircd.org>
* (C) 2003-2013 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*
*/
#ifndef USERS_H
@@ -15,66 +21,76 @@
#include "commands.h"
#include "account.h"
extern CoreExport Anope::insensitive_map<User *> UserListByNick;
extern CoreExport Anope::map<User *> UserListByUID;
typedef Anope::hash_map<User *> user_map;
class CoreExport ChannelStatus : public Flags<ChannelModeName, CMODE_END * 2>
{
public:
ChannelStatus();
Anope::string BuildCharPrefixList() const;
Anope::string BuildModePrefixList() const;
};
struct ChannelContainer
{
Channel *chan;
ChannelStatus *Status;
ChannelContainer(Channel *c) : chan(c) { }
virtual ~ChannelContainer() { }
};
typedef std::list<ChannelContainer *> UChannelList;
extern CoreExport user_map UserListByNick, UserListByUID;
extern CoreExport int OperCount;
extern CoreExport unsigned MaxUserCount;
extern CoreExport time_t MaxUserTime;
/* Online user and channel data. */
class CoreExport User : public virtual Base, public Extensible, public CommandReply
{
/* true if the user was quit or killed */
bool quit;
/* Users that are in the process of quitting */
static std::list<User *> quitting_users;
public:
typedef std::map<Anope::string, Anope::string> ModeList;
protected:
Anope::string vident;
Anope::string ident;
Anope::string uid;
bool OnAccess; /* If the user is on the access list of the nick theyre on */
Flags<UserModeName, UMODE_END * 2> modes; /* Bitset of mode names the user has set on them */
std::map<UserModeName, Anope::string> Params; /* Map of user modes and the params this user has */
serialize_obj<NickCore> nc; /* NickCore account the user is currently loggged in as */
/* If the user is on the access list of the nick theyre on */
bool on_access;
/* Map of user modes and the params this user has (if any) */
ModeList modes;
/* NickCore account the user is currently loggged in as, if they are logged in */
Serialize::Reference<NickCore> nc;
/* # of invalid password attempts */
unsigned short invalid_pw_count;
/* Time of last invalid password */
time_t invalid_pw_time;
public: // XXX: exposing a tiny bit too much
Anope::string nick; /* User's current nick */
/* User's current nick */
Anope::string nick;
Anope::string host; /* User's real hostname */
Anope::string vhost; /* User's virtual hostname */
Anope::string chost; /* User's cloaked hostname */
Anope::string realname; /* Realname */
Anope::string fingerprint; /* SSL Fingerprint */
Anope::string ip; /* User's IP */
Server *server; /* Server user is connected to */
time_t timestamp; /* Timestamp of the nick */
time_t my_signon; /* When did _we_ see the user? */
bool SuperAdmin; /* is SuperAdmin on or off? */
/* User's real hostname */
Anope::string host;
/* User's virtual hostname */
Anope::string vhost;
/* User's cloaked hostname */
Anope::string chost;
/* Realname */
Anope::string realname;
/* SSL Fingerprint */
Anope::string fingerprint;
/* User's IP */
Anope::string ip;
/* Server user is connected to */
Server *server;
/* When the user signed on. Set on connect and never modified. */
time_t signon;
/* Timestamp of the nick. Updated when the nick changes. */
time_t timestamp;
/* Is the user as super admin? */
bool super_admin;
/* Channels the user is in */
UChannelList chans;
typedef std::map<Channel *, ChanUserContainer *> ChanUserList;
ChanUserList chans;
unsigned short invalid_pw_count; /* # of invalid password attempts */
time_t invalid_pw_time; /* Time of last invalid password */
time_t lastmemosend; /* Last time MS SEND command used */
time_t lastnickreg; /* Last time NS REGISTER cmd used */
time_t lastmail; /* Last time this user sent a mail */
/****************************************************************/
/* Last time this user sent a memo command used */
time_t lastmemosend;
/* Last time this user registered */
time_t lastnickreg;
/* Last time this user sent an email */
time_t lastmail;
/** Create a new user object, initialising necessary fields and
* adds it to the hash
@@ -82,18 +98,29 @@ class CoreExport User : public virtual Base, public Extensible, public CommandRe
* @param snick The nickname of the user.
* @param sident The username of the user
* @param shost The hostname of the user
* @param svhost The vhost of the user
* @param sip The ip of the user
* @param sserver The server of the user
* @param srealname The realname/gecos of teh user
* @param ssignon User's timestamp
* @param smodes User's modes
* @param suid The unique identifier of the user.
* @param nc The account the user is identified as, if any
*/
User(const Anope::string &snick, const Anope::string &sident, const Anope::string &shost, const Anope::string &suid = "");
User(const Anope::string &snick, const Anope::string &sident, const Anope::string &shost, const Anope::string &svhost, const Anope::string &sip, Server *sserver, const Anope::string &srealname, time_t ssignon, const Anope::string &smodes, const Anope::string &suid, NickCore *nc);
protected:
/** Destroy a user.
*/
virtual ~User();
public:
/** Update the nickname of a user record accordingly, should be
* called from ircd protocol.
* @param newnick The new username
* @param ts The time the nick was changed, User::timestamp will be updated to this.
*/
void SetNewNick(const Anope::string &newnick);
void ChangeNick(const Anope::string &newnick, time_t ts = Anope::CurTime);
/** Update the displayed (vhost) of a user record.
* This is used (if set) instead of real host.
@@ -116,8 +143,7 @@ class CoreExport User : public virtual Base, public Extensible, public CommandRe
*/
const Anope::string &GetCloakedHost() const;
/** Retrieves the UID of the user, where applicable, if set.
* This is not used on some IRCds, but is for a lot e.g. P10, TS6 protocols.
/** Retrieves the UID of the user, if set, else the nick.
* @return The UID of the user.
*/
const Anope::string &GetUID() const;
@@ -144,7 +170,7 @@ class CoreExport User : public virtual Base, public Extensible, public CommandRe
*/
const Anope::string &GetIdent() const;
/** Get the full mask ( nick!ident@realhost ) of a user
/** Get the full mask (nick!ident@realhost) of a user
*/
Anope::string GetMask() const;
@@ -162,24 +188,19 @@ class CoreExport User : public virtual Base, public Extensible, public CommandRe
* @param fmt Format of the Message
* @param ... any number of parameters
*/
void SendMessage(const BotInfo *source, const char *fmt, ...);
void SendMessage(const BotInfo *source, const Anope::string &msg) anope_override;
void SendMessage(BotInfo *source, const char *fmt, ...);
void SendMessage(BotInfo *source, const Anope::string &msg) anope_override;
/** Collide a nick
* See the comment in users.cpp
* @param na The nick
*/
void Collide(NickAlias *na);
/** Identify the user to the Nick
/** Identify the user to a nick.
* updates last_seen, logs the user in,
* send messages, checks for mails, set vhost and more
* @param the NickAlias
* @param na the nick to identify to, should be the same as
* the user's current nick
*/
void Identify(NickAlias *na);
/** Login the user to a NickCore
* @param core The account the user is useing
/** Login the user to an account
* @param core The account
*/
void Login(NickCore *core);
@@ -190,19 +211,19 @@ class CoreExport User : public virtual Base, public Extensible, public CommandRe
/** Get the account the user is logged in using
* @return The account or NULL
*/
virtual NickCore *Account() const;
NickCore *Account() const;
/** Check if the user is identified for their nick
* @param CheckNick True to check if the user is identified to the nickname they are on too
* @param check_nick True to check if the user is identified to the nickname they are on too
* @return true or false
*/
bool IsIdentified(bool CheckNick = false) const;
bool IsIdentified(bool check_nick = false) const;
/** Check if the user is recognized for their nick (on the nicks access list)
* @param CheckSecure Only returns true if the user has secure off
* @param check_secure Only returns true if the user has secure off
* @return true or false
*/
bool IsRecognized(bool CheckSecure = true) const;
bool IsRecognized(bool check_secure = true) const;
/** Check if the user is a services oper
* @return true if they are an oper
@@ -226,71 +247,78 @@ class CoreExport User : public virtual Base, public Extensible, public CommandRe
void UpdateHost();
/** Check if the user has a mode
* @param Name Mode name
* @param name Mode name
* @return true or false
*/
bool HasMode(UserModeName Name) const;
bool HasMode(const Anope::string &name) const;
/** Set a mode internally on the user, the IRCd is not informed
* @param setter who/what is setting the mode
* @param um The user mode
* @param Param The param, if there is one
*/
void SetModeInternal(UserMode *um, const Anope::string &Param = "");
void SetModeInternal(const MessageSource &setter, UserMode *um, const Anope::string &param = "");
/** Remove a mode internally on the user, the IRCd is not informed
* @param setter who/what is setting the mode
* @param um The user mode
*/
void RemoveModeInternal(UserMode *um);
void RemoveModeInternal(const MessageSource &setter, UserMode *um);
/** Set a mode on the user
* @param bi The client setting the mode
* @param um The user mode
* @param Param Optional param for the mode
*/
void SetMode(const BotInfo *bi, UserMode *um, const Anope::string &Param = "");
void SetMode(BotInfo *bi, UserMode *um, const Anope::string &param = "");
/** Set a mode on the user
* @param bi The client setting the mode
* @param Name The mode name
* @param name The mode name
* @param Param Optional param for the mode
*/
void SetMode(const BotInfo *bi, UserModeName Name, const Anope::string &Param = "");
void SetMode(BotInfo *bi, const Anope::string &name, const Anope::string &param = "");
/** Remove a mode on the user
* @param bi The client setting the mode
* @param um The user mode
* @param param Optional param for the mode
*/
void RemoveMode(const BotInfo *bi, UserMode *um);
void RemoveMode(BotInfo *bi, UserMode *um, const Anope::string &param = "");
/** Remove a mode from the user
* @param bi The client setting the mode
* @param Name The mode name
* @param name The mode name
* @param param Optional param for the mode
*/
void RemoveMode(const BotInfo *bi, UserModeName Name);
void RemoveMode(BotInfo *bi, const Anope::string &name, const Anope::string &param = "");
/** Set a string of modes on a user
* @param bi The client setting the modes
* @param umodes The modes
*/
void SetModes(const BotInfo *bi, const char *umodes, ...);
void SetModes(BotInfo *bi, const char *umodes, ...);
/** Set a string of modes on a user internally
* @param setter who/what is setting the mode
* @param umodes The modes
*/
void SetModesInternal(const char *umodes, ...);
void SetModesInternal(const MessageSource &source, const char *umodes, ...);
/** Get modes set for this user.
* @return A string of modes set on the user
*/
Anope::string GetModes() const;
const ModeList &GetModeList() const;
/** Find the channel container for Channel c that the user is on
* This is preferred over using FindUser in Channel, as there are usually more users in a channel
* than channels a user is in
* @param c The channel
* @return The channel container, or NULL
*/
ChannelContainer *FindChannel(const Channel *c) const;
ChanUserContainer *FindChannel(Channel *c) const;
/** Check if the user is protected from kicks and negative mode changes
* @return true or false
@@ -301,22 +329,46 @@ class CoreExport User : public virtual Base, public Extensible, public CommandRe
* @param source The user/server doing the kill
* @param reason The reason for the kill
*/
void Kill(const Anope::string &source, const Anope::string &reason);
void Kill(const MessageSource &source, const Anope::string &reason);
/** Process a kill for a user
* @param source The user/server doing the kill
* @param reason The reason for the kill
*/
void KillInternal(const MessageSource &source, const Anope::string &reason);
/** Processes a quit for the user, and marks them as quit
* @param reason The reason for the quit
*/
void Quit(const Anope::string &reason = "");
bool Quitting() const;
/* Returns a mask that will most likely match any address the
* user will have from that location. For IP addresses, wildcards the
* appropriate subnet mask (e.g. 35.1.1.1 -> 35.*; 128.2.1.1 -> 128.2.*);
* for named addresses, wildcards the leftmost part of the name unless the
* name only contains two parts. If the username begins with a ~, delete
* it.
*/
Anope::string Mask() const;
/** Notes the usage of an incorrect password. If too many
* incorrect passwords are used the user might be killed.
* @return true if the user was killed
*/
bool BadPassword();
/** Finds a user by nick, or possibly UID
* @param name The nick, or possibly UID, to lookup
* @param nick_only set to true to only look up by nick, not UID
* @return the user, if they exist
*/
static User* Find(const Anope::string &name, bool nick_only = false);
/** Quits all users who are pending to be quit
*/
static void QuitUsers();
};
extern CoreExport int32_t opcnt;
extern CoreExport uint32_t maxusercnt, usercnt;
extern CoreExport time_t maxusertime;
extern CoreExport User *finduser(const Anope::string &nick);
extern CoreExport User *do_nick(const Anope::string &source, const Anope::string &nick, const Anope::string &username, const Anope::string &host, const Anope::string &server, const Anope::string &realname, time_t ts, const Anope::string &ip, const Anope::string &vhost, const Anope::string &uid, const Anope::string &modes);
extern CoreExport void do_umode(const Anope::string &user, const Anope::string &modes);
extern CoreExport void do_kill(User *user, const Anope::string &reason);
extern CoreExport bool matches_list(Channel *c, User *user, ChannelModeName mode);
extern CoreExport Anope::string create_mask(User *u);
#endif // USERS_H
+1 -1
View File
@@ -1,6 +1,6 @@
/* Build bumper
*
* (C) 2003-2012 Anope Team
* (C) 2003-2013 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
+18 -16
View File
@@ -1,29 +1,31 @@
/* OperServ support
/*
*
* (C) 2008-2012 Anope Team
* (C) 2008-2013 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
*/
#ifndef OPER_H
#define OPER_H
#ifndef XLINE_H
#define XLINE_H
#include "serialize.h"
#include "service.h"
/* An Xline, eg, anything added with operserv/akill, or any of the operserv/sxline commands */
class CoreExport XLine : public Serializable
{
void InitRegex();
public:
Anope::string Mask;
Anope::string mask;
Regex *regex;
Anope::string By;
time_t Created;
time_t Expires;
Anope::string Reason;
Anope::string by;
time_t created;
time_t expires;
Anope::string reason;
XLineManager *manager;
Anope::string UID;
Anope::string id;
XLine(const Anope::string &mask, const Anope::string &reason = "", const Anope::string &uid = "");
@@ -40,18 +42,18 @@ class CoreExport XLine : public Serializable
bool HasNickOrReal() const;
bool IsRegex() const;
const Anope::string serialize_name() const anope_override;
Serialize::Data serialize() const anope_override;
static Serializable* unserialize(Serializable *obj, Serialize::Data &data);
void Serialize(Serialize::Data &data) const anope_override;
static Serializable* Unserialize(Serializable *obj, Serialize::Data &data);
};
/* Managers XLines. There is one XLineManager per type of XLine. */
class CoreExport XLineManager : public Service
{
char type;
/* List of XLines in this XLineManager */
serialize_checker<std::vector<XLine *> > XLines;
Serialize::Checker<std::vector<XLine *> > xlines;
/* Akills can have the same IDs, sometimes */
static serialize_checker<std::multimap<Anope::string, XLine *, ci::less> > XLinesByUID;
static Serialize::Checker<std::multimap<Anope::string, XLine *, ci::less> > XLinesByUID;
public:
/* List of XLine managers we check users against in XLineManager::CheckAll */
static std::list<XLineManager *> XLineManagers;
@@ -175,4 +177,4 @@ class CoreExport XLineManager : public Service
virtual void SendDel(XLine *x) = 0;
};
#endif // OPER_H
#endif // XLINE_H
-1
View File
@@ -29,7 +29,6 @@ if(GETTEXT_FOUND)
endif(NOT WIN32)
# Install the new language file
install(CODE "FILE(MAKE_DIRECTORY \"${LOCALE_DIR}/${LANG_LANG}/LC_MESSAGES/\")")
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${LANG_MO} DESTINATION ${LOCALE_DIR}/${LANG_LANG}/LC_MESSAGES RENAME ${LANG_DOMAIN}.mo PERMISSIONS ${PERMS})
endforeach(LANG_PO)
+5154 -4443
View File
File diff suppressed because it is too large Load Diff
+7217 -6507
View File
File diff suppressed because it is too large Load Diff
+6598 -5875
View File
File diff suppressed because it is too large Load Diff
+6763 -6739
View File
File diff suppressed because it is too large Load Diff

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